Contains the raw timing and level data for a single frame. More...
#include "pStatFrameData.h"
Public Member Functions | |
void | add_level (int index, double level) |
Adds a particular level value associated with a given collector to the frame data. More... | |
void | add_start (int index, double time) |
Adds a 'start collector' data point to the frame data. More... | |
void | add_stop (int index, double time) |
Adds a 'stop collector' data point to the frame data. More... | |
void | clear () |
Removes all the data points from the frame data, in preparation for building up a new frame's worth. More... | |
double | get_end () const |
Returns the time of the last data point in the frame data. More... | |
double | get_level (size_t n) const |
Returns the height of the nth level value. More... | |
int | get_level_collector (size_t n) const |
Returns the index of the collector associated with the nth level value. More... | |
double | get_net_time () const |
Returns the total time elapsed for the frame. More... | |
size_t | get_num_events () const |
Returns the number of individual events stored in the FrameData. More... | |
size_t | get_num_levels () const |
Returns the number of individual level values stored in the FrameData. More... | |
double | get_start () const |
Returns the time of the first data point in the frame data. More... | |
double | get_time (size_t n) const |
Returns the timestamp of the nth event, in seconds elapsed since some undefined epoch (which is guaranteed to be shared among all events returned from a given client). More... | |
int | get_time_collector (size_t n) const |
Returns the index of the collector associated with the nth event. More... | |
bool | is_empty () const |
Returns true if the FrameData has no time or level data. More... | |
bool | is_level_empty () const |
Returns true if there are no levels indicated in the frame data, false otherwise. More... | |
bool | is_start (size_t n) const |
Returns true if the nth event represents a start event, or false if it represents a stop event. More... | |
bool | is_time_empty () const |
Returns true if there are no time events in the frame data, false otherwise. More... | |
void | read_datagram (DatagramIterator &source, PStatClientVersion *version) |
Extracts the FrameData definition from the datagram. More... | |
void | sort_time () |
Ensures the frame data is in monotonically increasing order by time. More... | |
void | swap (PStatFrameData &other) |
Exchanges the data in this object with the data in the other. More... | |
bool | write_datagram (Datagram &destination, PStatClient *client) const |
Writes the definition of the FrameData to the datagram. More... | |
Contains the raw timing and level data for a single frame.
This is a sequence of start/stop events, as well as a table of level values, associated with a number of collectors within a single frame.
Definition at line 33 of file pStatFrameData.h.
|
inline |
Adds a particular level value associated with a given collector to the frame data.
Definition at line 92 of file pStatFrameData.I.
|
inline |
Adds a 'start collector' data point to the frame data.
Definition at line 63 of file pStatFrameData.I.
|
inline |
Adds a 'stop collector' data point to the frame data.
Definition at line 77 of file pStatFrameData.I.
|
inline |
Removes all the data points from the frame data, in preparation for building up a new frame's worth.
Definition at line 45 of file pStatFrameData.I.
Referenced by read_datagram().
|
inline |
Returns the time of the last data point in the frame data.
This will generally be the time of the end of the frame.
Definition at line 120 of file pStatFrameData.I.
|
inline |
Returns the height of the nth level value.
Definition at line 195 of file pStatFrameData.I.
|
inline |
Returns the index of the collector associated with the nth level value.
Definition at line 186 of file pStatFrameData.I.
|
inline |
Returns the total time elapsed for the frame.
Definition at line 130 of file pStatFrameData.I.
|
inline |
Returns the number of individual events stored in the FrameData.
Definition at line 140 of file pStatFrameData.I.
Referenced by TextMonitor::new_data().
|
inline |
Returns the number of individual level values stored in the FrameData.
Definition at line 178 of file pStatFrameData.I.
|
inline |
Returns the time of the first data point in the frame data.
This will generally be the time of the start of the frame.
Definition at line 107 of file pStatFrameData.I.
References is_empty().
Referenced by PStatStripChart::update().
|
inline |
Returns the timestamp of the nth event, in seconds elapsed since some undefined epoch (which is guaranteed to be shared among all events returned from a given client).
Definition at line 169 of file pStatFrameData.I.
|
inline |
Returns the index of the collector associated with the nth event.
Definition at line 148 of file pStatFrameData.I.
|
inline |
Returns true if the FrameData has no time or level data.
Definition at line 36 of file pStatFrameData.I.
References is_level_empty(), and is_time_empty().
Referenced by get_start().
|
inline |
Returns true if there are no levels indicated in the frame data, false otherwise.
Definition at line 28 of file pStatFrameData.I.
Referenced by is_empty().
|
inline |
Returns true if the nth event represents a start event, or false if it represents a stop event.
Definition at line 158 of file pStatFrameData.I.
|
inline |
Returns true if there are no time events in the frame data, false otherwise.
Definition at line 19 of file pStatFrameData.I.
Referenced by is_empty().
void PStatFrameData::read_datagram | ( | DatagramIterator & | source, |
PStatClientVersion * | version | ||
) |
Extracts the FrameData definition from the datagram.
Definition at line 64 of file pStatFrameData.cxx.
References clear().
void PStatFrameData::sort_time | ( | ) |
Ensures the frame data is in monotonically increasing order by time.
Definition at line 27 of file pStatFrameData.cxx.
|
inline |
Exchanges the data in this object with the data in the other.
Definition at line 54 of file pStatFrameData.I.
bool PStatFrameData::write_datagram | ( | Datagram & | destination, |
PStatClient * | client | ||
) | const |
Writes the definition of the FrameData to the datagram.
Returns true on success, false on failure.
Definition at line 36 of file pStatFrameData.cxx.
References Datagram::add_float32(), and Datagram::add_uint16().