Class StatTimeseriesMsgPackStrategy
Defined in File StatTimeseriesMsgPackStrategy.h
Inheritance Relationships
Base Type
public ska::pst::stat::StatMsgPackStrategy(Class StatMsgPackStrategy)
Class Documentation
-
class StatTimeseriesMsgPackStrategy : public ska::pst::stat::StatMsgPackStrategy
This class is used populate the “data_type”, “metadata”, and “data” sections of Timeseries MsgPack messages.
Public Functions
-
virtual void pack_data_type(msgpack::packer<std::stringstream> &packer) override
Sets the value of the data_type as “pst_timeseries”.
- 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) override
Add metadata map to output MsgPack message.
The timeseries metadata are a map of the following:
“utc_start” - a ISO8601 UTC timestamp string of when the scan started, including microsecond precision.
”timeseries_bins” - the time offset for each bin in the timeseries data.
- 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) override
Add data to output MsgPack message.
The timeseries data are an array of polarisation data. The data for each polarisation is packed as a map with the following values:
“polarisation” - the name of the polarisation.
”data” - the mean timeseries data averaged over all channels. The length of this array is the number of bins (NBINS) from the StatStorage.
- 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) override