Class DataBlockCreate
Defined in File DataBlockCreate.h
Inheritance Relationships
Base Type
public ska::pst::smrb::DataBlock
(Class DataBlock)
Class Documentation
-
class DataBlockCreate : public ska::pst::smrb::DataBlock
Object Oriented class that provides an interface for allocation and destruction of PSRDADA Shared Memory Ring Buffers (SMRB).
Public Functions
-
explicit DataBlockCreate(const std::string &key)
Construct a new Data Block Create object. Supports creating an SMRB with the specified key which accesses a PSRDADA Shared Memory Ring Buffer (SMRB)
- Parameters
key – 4 character hexidecimal key that identifies the SMRB in shared memory.
-
~DataBlockCreate()
Destroy the Data Block Write object. Destruction of the object will result in destruction of the SMRB if it has not already been destroyed.
-
void create(uint64_t hdr_nbufs = 8, uint64_t hdr_bufsz = 4096, uint64_t data_nbufs = 4, uint64_t data_bufsz = 524288, unsigned num_readers = 1, int device_id = -1)
Creates an SMRB identified by the key using the specififed configuration. Supports allocation in CPU or GPU memory.
- Parameters
hdr_nbufs – Number of header_block elements
hdr_bufsz – Size of each header_block element in bytes
data_nbufs – Number of data_block elements
data_bufsz – Size of each data_block element in bytes
num_readers – Number of readers that must process data written to the ring buffer
device_id – CUDA GPU device on which the data_block element memory created, -1 indicates CPU memory
-
void destroy()
Destroys the SMRB identified by the key.
-
explicit DataBlockCreate(const std::string &key)