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
00d57656
Commit
00d57656
authored
8 years ago
by
Pieter Donker
Browse files
Options
Downloads
Patches
Plain Diff
Task #10073: changed dumping procedure in TBBDriver
parent
adc8ea24
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
MAC/APL/PIC/TBB_Driver/src/ReadCmd.cc
+12
-12
12 additions, 12 deletions
MAC/APL/PIC/TBB_Driver/src/ReadCmd.cc
with
12 additions
and
12 deletions
MAC/APL/PIC/TBB_Driver/src/ReadCmd.cc
+
12
−
12
View file @
00d57656
...
@@ -226,19 +226,19 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
...
@@ -226,19 +226,19 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
NsTimestamp
firstSampleTime
((
double
)
lastSampleTime
-
(
TS
->
getChPageSize
(
getChannelNr
())
*
itsLastSavedNrOfSamples
*
sampletime
));
NsTimestamp
firstSampleTime
((
double
)
lastSampleTime
-
(
TS
->
getChPageSize
(
getChannelNr
())
*
itsLastSavedNrOfSamples
*
sampletime
));
// calculate start and stop time
// calculate start and stop time
NsTimestamp
startTimestamp
(
itsTimestamp
-
itsTimeBefore
);
NsTimestamp
startTimestamp
(
(
double
)
itsTimestamp
-
(
double
)
itsTimeBefore
);
NsTimestamp
stopTimestamp
(
itsTimestamp
+
itsTimeAfter
);
NsTimestamp
stopTimestamp
(
(
double
)
itsTimestamp
+
(
double
)
itsTimeAfter
);
#if 1
#if 1
//LOG_DEBUG_STR(formatString("Timestamp = %lu seconds %lu nseconds", itsTimestamp.sec(), itsTimestamp.nsec()));
//LOG_DEBUG_STR(formatString("Timestamp = %lu seconds %lu nseconds", itsTimestamp.sec(), itsTimestamp.nsec()));
LOG_DEBUG_STR
(
formatString
(
"firstSampleTime= %lu seconds %lu nseconds"
,
firstSampleTime
.
sec
(),
firstSampleTime
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"firstSampleTime= %lu seconds %lu nseconds"
,
firstSampleTime
.
sec
(),
firstSampleTime
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"lastSampleTime = %lu seconds %lu nseconds"
,
lastSampleTime
.
sec
(),
lastSampleTime
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"lastSampleTime = %lu seconds %lu nseconds"
,
lastSampleTime
.
sec
(),
lastSampleTime
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"startTimestamp = %lu seconds %lu nseconds"
,
startTimestamp
.
sec
(),
startTimestamp
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"startTimestamp = %lu seconds %lu nseconds"
,
startTimestamp
.
sec
(),
startTimestamp
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"stopTimestamp = %lu seconds %lu nseconds"
,
stopTimestamp
.
sec
(),
stopTimestamp
.
nsec
()));
LOG_DEBUG_STR
(
formatString
(
"stopTimestamp = %lu seconds %lu nseconds"
,
stopTimestamp
.
sec
(),
stopTimestamp
.
nsec
()));
#endif
#endif
// to get last part of recording
// to get last part of recording
if
(
itsTimestamp
==
0.0
)
{
if
(
(
double
)
itsTimestamp
==
0.0
)
{
itsTimestamp
=
lastSampleTime
;
itsTimestamp
=
lastSampleTime
;
}
}
...
@@ -265,15 +265,15 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
...
@@ -265,15 +265,15 @@ void ReadCmd::saveTpAckEvent(GCFEvent& event)
setDone
(
true
);
setDone
(
true
);
}
}
itsTimeBefore
.
set
(
itsTimestamp
-
startTimestamp
);
itsTimeBefore
.
set
(
(
double
)
itsTimestamp
-
(
double
)
startTimestamp
);
itsTimeAfter
.
set
(
stopTimestamp
-
itsTimestamp
);
itsTimeAfter
.
set
(
(
double
)
stopTimestamp
-
(
double
)
itsTimestamp
);
// convert it to board units
// convert it to board units
itsSecondstime
=
(
uint32
)
itsTimestamp
.
sec
();
itsSecondstime
=
(
uint32
)
itsTimestamp
.
sec
();
itsSampleNr
=
(
uint32
)(
itsTimestamp
.
nsec
()
/
(
sampletime
*
1E9
));
itsSampleNr
=
(
uint32
)(
itsTimestamp
.
nsec
()
/
(
sampletime
*
1E9
));
itsPrepages
=
(
uint32
)
ceil
(((
double
)
(
itsTimestamp
-
startTimestamp
)
/
sampletime
)
/
itsLastSavedNrOfSamples
);
itsPrepages
=
(
uint32
)
ceil
(((
(
double
)
itsTimestamp
-
(
double
)
startTimestamp
)
/
sampletime
)
/
itsLastSavedNrOfSamples
);
itsPostpages
=
(
uint32
)
ceil
(((
double
)
(
stopTimestamp
-
itsTimestamp
)
/
sampletime
)
/
itsLastSavedNrOfSamples
);
itsPostpages
=
(
uint32
)
ceil
(((
(
double
)
stopTimestamp
-
(
double
)
itsTimestamp
)
/
sampletime
)
/
itsLastSavedNrOfSamples
);
//if (itsPostpages == 0) { itsPostpages = 1; }
//if (itsPostpages == 0) { itsPostpages = 1; }
LOG_DEBUG_STR
(
formatString
(
"Read request time=%lu samplenr=%lu prepages=%lu postpages=%lu"
,
LOG_DEBUG_STR
(
formatString
(
"Read request time=%lu samplenr=%lu prepages=%lu postpages=%lu"
,
itsSecondstime
,
itsSampleNr
,
itsPrepages
,
itsPostpages
));
itsSecondstime
,
itsSampleNr
,
itsPrepages
,
itsPostpages
));
...
...
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