Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
eda405d1
Commit
eda405d1
authored
12 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Task #3696: Added tSampleBuffer
parent
1e227f4d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
RTCP/InputProc/test/CMakeLists.txt
+1
-0
1 addition, 0 deletions
RTCP/InputProc/test/CMakeLists.txt
RTCP/InputProc/test/tSampleBuffer.cc
+64
-0
64 additions, 0 deletions
RTCP/InputProc/test/tSampleBuffer.cc
with
66 additions
and
0 deletions
.gitattributes
+
1
−
0
View file @
eda405d1
...
@@ -3653,6 +3653,7 @@ RTCP/InputProc/test/CMakeLists.txt -text
...
@@ -3653,6 +3653,7 @@ RTCP/InputProc/test/CMakeLists.txt -text
RTCP/InputProc/test/tGenerator.cc -text
RTCP/InputProc/test/tGenerator.cc -text
RTCP/InputProc/test/tRSPTimeStamp2.cc -text
RTCP/InputProc/test/tRSPTimeStamp2.cc -text
RTCP/InputProc/test/tRanges.cc -text
RTCP/InputProc/test/tRanges.cc -text
RTCP/InputProc/test/tSampleBuffer.cc -text
RTCP/InputProc/test/tSharedMemory.cc -text
RTCP/InputProc/test/tSharedMemory.cc -text
RTCP/Interface/include/Interface/BGPAsm.h -text
RTCP/Interface/include/Interface/BGPAsm.h -text
RTCP/Interface/include/Interface/BeamCoordinates.h -text
RTCP/Interface/include/Interface/BeamCoordinates.h -text
...
...
This diff is collapsed.
Click to expand it.
RTCP/InputProc/test/CMakeLists.txt
+
1
−
0
View file @
eda405d1
...
@@ -8,4 +8,5 @@ include_directories(${PACKAGE_SOURCE_DIR}/src)
...
@@ -8,4 +8,5 @@ include_directories(${PACKAGE_SOURCE_DIR}/src)
lofar_add_test
(
tGenerator tGenerator.cc
)
lofar_add_test
(
tGenerator tGenerator.cc
)
lofar_add_test
(
tRSPTimeStamp2 tRSPTimeStamp2.cc
)
lofar_add_test
(
tRSPTimeStamp2 tRSPTimeStamp2.cc
)
lofar_add_test
(
tRanges tRanges.cc
)
lofar_add_test
(
tRanges tRanges.cc
)
lofar_add_test
(
tSampleBuffer tSampleBuffer.cc
)
lofar_add_test
(
tSharedMemory tSharedMemory.cc
)
lofar_add_test
(
tSharedMemory tSharedMemory.cc
)
This diff is collapsed.
Click to expand it.
RTCP/InputProc/test/tSampleBuffer.cc
0 → 100644
+
64
−
0
View file @
eda405d1
#include
<lofar_config.h>
#include
"SampleBuffer.h"
#include
"SampleType.h"
#include
"OMPThread.h"
#include
<Common/LofarLogger.h>
#include
<vector>
#include
<string>
#include
"omp.h"
using
namespace
LOFAR
;
using
namespace
RTCP
;
using
namespace
std
;
// Duration of the test (seconds)
#define DURATION 2
// The number of packets to transmit (note: there are 16 time samples/packet)
#define NUMPACKETS (200000000/1024/16)
template
<
typename
T
>
void
test
(
struct
BufferSettings
&
settings
)
{
SampleBuffer
<
SampleType
<
T
>
>
buffer_create
(
settings
,
true
);
SampleBuffer
<
SampleType
<
T
>
>
buffer_read
(
settings
,
false
);
}
int
main
(
int
,
char
**
argv
)
{
INIT_LOGGER
(
argv
[
0
]
);
// Don't run forever if communication fails for some reason
alarm
(
10
);
omp_set_nested
(
true
);
omp_set_num_threads
(
16
);
OMPThread
::
init
();
unsigned
clock
=
200
*
1000
*
1000
;
struct
StationID
stationID
(
"RS106"
,
"LBA"
,
clock
,
16
);
struct
BufferSettings
settings
;
settings
.
station
=
stationID
;
settings
.
nrBeamlets
=
61
;
settings
.
nrBoards
=
1
;
settings
.
nrSamples
=
(
2
*
stationID
.
clock
/
1024
);
// & ~0xFL;
settings
.
nrFlagRanges
=
64
;
settings
.
dataKey
=
0x12345678
;
LOG_INFO
(
"Test 16-bit complex"
);
test
<
i16complex
>
(
settings
);
LOG_INFO
(
"Test 8-bit complex"
);
test
<
i8complex
>
(
settings
);
LOG_INFO
(
"Test 4-bit complex"
);
test
<
i4complex
>
(
settings
);
return
0
;
}
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