Class SmrbSegmentProducer

Inheritance Relationships

Base Type

Class Documentation

class SmrbSegmentProducer : public ska::pst::common::BlockSegmentProducer

Class used for reading voltage data and weights from file.

Public Functions

SmrbSegmentProducer(const std::string &data_key, const std::string &weights_key)

Create instance of a SmrbSegmentProducer object.

Parameters
  • data_key – 4 character hexidecimal key that identifies the data SMRB in shared memory.

  • weights_key – 4 character hexidecimal key that identifies the weights SMRB in shared memory.

~SmrbSegmentProducer()

Destroy the SmrbSegmentProducer object.

void connect(int timeout)

Attempt to connect to the existing data and weights SMRBs within the specified timeout, and read the beam configurations in the data and weights SMRBs.

Parameters

timeout – the timeout for SMRB connection in seconds

void open()

Open the data and weights SMRBs for viewing and read the scan configurations in the data and weights SMRBs.

Call this method at the start of perform_scan in an application

void close()

Close the shared memory ring buffers.

virtual ska::pst::common::SegmentProducer::Segment next_segment() override

Get the next Segment of data and weights, ensuring that they are synchronized.

void disconnect()

Disconnect from the SMRB.

inline size_t get_obs_offset() const

Get the offset of the segement’s current data_block, from the start of the scan, in bytes.

Returns

size_t offset from the start of the scan in bytes.