Struct StreamStats

Struct Documentation

struct StreamStats

Class for keeping track of OSF stream stats.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats

Public Functions

StreamStats() = default

Default constructor, sets everthing to 0.

StreamStats(uint32_t s_id, ts_t receive_ts, ts_t sensor_ts, uint32_t msg_size)

Construct a StreamStats with the specified values.

Parameters:
  • s_id[in] – Specify the stream_id to use.

  • receive_ts[in] – Set the start and end timestamps to the specified value and add it to the receive timestamps.

  • sensor_ts[in] – Add to the sensor timestamps.

  • msg_size[in] – Set the average message size to the specified value.

void update(ts_t receive_ts, ts_t sensor_ts, uint32_t msg_size)

Update values within the StreamStats.

Parameters:
  • receive_ts[in] – Add another receive timestamp and calculate the start and end values.

  • sensor_ts[in] – Add another sensor timestamp

  • msg_size[in] – Add another message size and calculate the average.

Public Members

uint32_t stream_id

The specific stream the chunk is associated with.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: stream_id

ts_t start_ts

The first timestamp in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: start_ts

ts_t end_ts

The last timestamp in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: end_ts

uint64_t message_count

The number of messages in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: message_count

uint32_t message_avg_size

The average size of the messages in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: message_avg_size

std::vector<uint64_t> receive_timestamps

The receive timestamps of each message in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: receive_timestamps

std::vector<uint64_t> sensor_timestamps

The sensor timestamps of each message in the stream.

Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: sensor_timestamps