Class StatMsgPackStrategy
Defined in File StatMsgPackGenerator.h
Inheritance Relationships
Derived Types
public ska::pst::stat::StatBandpassMsgPackStrategy(Class StatBandpassMsgPackStrategy)public ska::pst::stat::StatHistogramMsgPackStrategy(Class StatHistogramMsgPackStrategy)public ska::pst::stat::StatTimeseriesMsgPackStrategy(Class StatTimeseriesMsgPackStrategy)
Class Documentation
-
class StatMsgPackStrategy
This class is used populate the “data_type”, “metadata”, and “data” sections of different dashboard MsgPack messages.
Subclassed by ska::pst::stat::StatBandpassMsgPackStrategy, ska::pst::stat::StatHistogramMsgPackStrategy, ska::pst::stat::StatTimeseriesMsgPackStrategy
Public Functions
-
virtual void pack_data_type(msgpack::packer<std::stringstream> &packer) = 0
Add data_type value to the output MsgPack message.
- Parameters
packer – the MsgPack packer to write the data type value to.
-
virtual void pack_metadata(msgpack::packer<std::stringstream> &packer, const StatStorage &storage, const ska::pst::common::AsciiHeader &config) = 0
Add metadata map to output MsgPack message.
Different messages types have metadata structure but are all encoded as a map/dictionary and the implementations of this abstract class need to pack the metadata as a MsgPack map.
The StatMsgPackGenerator will perform the packing of the key “metadata”, which means that implementations of this method need to pack an “anonymous” map, they shouldn’t try to pack the key “metadata” again, as that would create an invalid message.
- Parameters
packer – the MsgPack packer to pack the metadata record into.
storage – the StatStorage to get metadata from.
config – the current configuration of the scan
-
virtual void pack_data(msgpack::packer<std::stringstream> &packer, const StatStorage &storage, const ska::pst::common::AsciiHeader &config) = 0
Add data section to output MsgPack message.
Different messages types have data structure but are all encoded as a map/dictionary and the implementations of this need to add the ‘metadata’ field as a map encoded the individual elements of the map.
- Parameters
packer – the MsgPack packer to pack the metadata record into.
storage – the StatStorage to get metadata from.
config – the current configuration of the scan
-
virtual void pack_data_type(msgpack::packer<std::stringstream> &packer) = 0