Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
|
A mock class for implementing the interface of a DADA DB (Header/Data Unit) More...
#include <cheetah/psrdada/test_utils/TestDadaDB.h>
Public Member Functions | |
TestDadaDB (uint64_t nbufs=DADA_DEFAULT_BLOCK_NUM, uint64_t bufsz=DADA_DEFAULT_BLOCK_SIZE, uint64_t nhdrs=IPCBUF_XFERS, uint64_t hdrsz=DADA_DEFAULT_HEADER_SIZE) | |
Constructa new TestDadaDB instance. More... | |
TestDadaDB (TestDadaDB const &)=delete | |
void | create () |
Create the data and header blocks in shared memory. | |
void | destroy () |
Destroy the allocated shared memory blocks. | |
uint64_t | num_data_buffers () const |
Return the number of data buffers. | |
uint64_t | data_buffer_size () const |
Return the size of each data buffer. | |
uint64_t | num_header_buffers () const |
Return the number of header buffers. | |
uint64_t | header_buffer_size () const |
Return the size of each header buffer. | |
key_t | key () const |
Return the hexidecimal shared memory key. More... | |
Protected Member Functions | |
void | do_destroy () |
A mock class for implementing the interface of a DADA DB (Header/Data Unit)
A standard DADA HDU buffer is composed of a set of data buffers of equal size and a set of header buffers of equal size.
The standard use case is that a client connects to the header buffer, reads some metadata and then uses that to determine how to handle the data in the data buffers.
Definition at line 46 of file TestDadaDB.h.
ska::cheetah::psrdada::test_utils::TestDadaDB::TestDadaDB | ( | uint64_t | nbufs = DADA_DEFAULT_BLOCK_NUM , |
uint64_t | bufsz = DADA_DEFAULT_BLOCK_SIZE , |
||
uint64_t | nhdrs = IPCBUF_XFERS , |
||
uint64_t | hdrsz = DADA_DEFAULT_HEADER_SIZE |
||
) |
Constructa new TestDadaDB instance.
[in] | _key | A hexidecimal shared memory key |
[in] | _nbufs | The number of data buffers |
[in] | _bufsz | The size in bytes of each data buffer |
[in] | _nhdrs | The number of header buffers |
[in] | _hdrsz | The size in bytes of each header buffer |
Definition at line 70 of file TestDadaDB.cpp.
key_t ska::cheetah::psrdada::test_utils::TestDadaDB::key | ( | ) | const |
Return the hexidecimal shared memory key.
This key can be used by other processes to access the shared memory blocks.
Definition at line 158 of file TestDadaDB.cpp.