Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
c7302dfe
Commit
c7302dfe
authored
12 years ago
by
Alexander van Amesfoort
Browse files
Options
Downloads
Patches
Plain Diff
Task #3185: add define to compile out TBB Writer crc checks
parent
335ff266
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
RTCP/Storage/src/TBB_Writer.cc
+8
-0
8 additions, 0 deletions
RTCP/Storage/src/TBB_Writer.cc
with
8 additions
and
0 deletions
RTCP/Storage/src/TBB_Writer.cc
+
8
−
0
View file @
c7302dfe
...
...
@@ -155,8 +155,12 @@ void TBB_Dipole::processFrameData(const TBB_Frame& frame, Mutex& h5Mutex) {
off_t
offset
=
(
frame
.
header
.
time
-
itsTime0
)
*
itsSampleFreq
+
frame
.
header
.
sampleNr
-
itsSampleNr0
;
if
(
frame
.
header
.
nOfFreqBands
==
0
)
{
// transient mode
#ifdef DISABLE_CRCS
uint32_t
csum
=
0
;
#else
// Verify data checksum.
uint32_t
csum
=
crc32tbb
(
reinterpret_cast
<
const
uint16_t
*>
(
frame
.
payload
.
data
),
frame
.
header
.
nOfSamplesPerFrame
+
2
/*=crc32*/
);
#endif
if
(
csum
!=
0
)
{
/*
* On a data checksum error 'flag' this offset, but still store the data.
...
...
@@ -766,8 +770,12 @@ uint32_t TBB_Dipole::crc32tbb(const uint16_t* buf, size_t len) const {
void
TBB_StreamWriter
::
processHeader
(
TBB_Header
&
header
,
size_t
recvPayloadSize
)
const
{
frameHeaderLittleNativeBSwap
(
header
);
// no-op on little endian
#ifdef DISABLE_CRCS
uint16_t
csum
=
0
;
#else
header
.
seqNr
=
0
;
// for the crc; don't save/restore it as we don't need this field
uint16_t
csum
=
crc16tbb
(
reinterpret_cast
<
uint16_t
*>
(
&
header
),
sizeof
(
header
)
/
sizeof
(
uint16_t
));
#endif
if
(
csum
!=
0
)
{
/*
* Spec says each frame has the same fixed length, so the previous values are a good base guess if the header crc fails.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment