#include <pStatFrameData.h>
Public Member Functions | |
bool | is_time_empty () const |
Returns true if there are no time events in the frame data, false otherwise. | |
bool | is_level_empty () const |
Returns true if there are no levels indicated in the frame data, false otherwise. | |
bool | is_empty () const |
Returns true if the FrameData has no time or level data. | |
void | clear () |
Removes all the data points from the frame data, in preparation for building up a new frame's worth. | |
void | add_start (int index, float time) |
Adds a 'start collector' data point to the frame data. | |
void | add_stop (int index, float time) |
Adds a 'stop collector' data point to the frame data. | |
void | add_level (int index, float level) |
Adds a particular level value associated with a given collector to the frame data. | |
float | get_start () const |
Returns the time of the first data point in the frame data. | |
float | get_end () const |
Returns the time of the last data point in the frame data. | |
float | get_net_time () const |
Returns the total time elapsed for the frame. | |
int | get_num_events () const |
Returns the number of individual events stored in the FrameData. | |
int | get_time_collector (int n) const |
Returns the index of the collector associated with the nth event. | |
bool | is_start (int n) const |
Returns true if the nth event represents a start event, or false if it represents a stop event. | |
float | get_time (int 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). | |
int | get_num_levels () const |
Returns the number of individual level values stored in the FrameData. | |
int | get_level_collector (int n) const |
Returns the index of the collector associated with the nth level value. | |
float | get_level (int n) const |
Returns the height of the nth level value. | |
void | write_datagram (Datagram &destination) const |
Writes the definition of the FrameData to the datagram. | |
void | read_datagram (DatagramIterator &source, PStatClientVersion *version) |
Extracts the FrameData definition from the datagram. | |
Private Types | |
typedef pvector< DataPoint > | Data |
Private Attributes | |
Data | _time_data |
Data | _level_data |
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 48 of file pStatFrameData.h.
|
Definition at line 81 of file pStatFrameData.h. |
|
Adds a particular level value associated with a given collector to the frame data.
Definition at line 137 of file pStatFrameData.I. References _time_data, INLINE, is_empty(), and nassertr. |
|
Adds a 'start collector' data point to the frame data.
Definition at line 95 of file pStatFrameData.I. References _time_data. |
|
Adds a 'stop collector' data point to the frame data.
Definition at line 116 of file pStatFrameData.I. References _time_data, INLINE, is_empty(), and nassertr. |
|
Removes all the data points from the frame data, in preparation for building up a new frame's worth.
Definition at line 79 of file pStatFrameData.I. References _time_data. |
|
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 179 of file pStatFrameData.I. References _time_data, INLINE, and nassertr. |
|
Returns the height of the nth level value.
Definition at line 307 of file pStatFrameData.I. |
|
Returns the index of the collector associated with the nth level value.
Definition at line 293 of file pStatFrameData.I. |
|
Returns the total time elapsed for the frame.
Definition at line 194 of file pStatFrameData.I. References _time_data, INLINE, and nassertr. |
|
Returns the number of individual events stored in the FrameData.
Definition at line 211 of file pStatFrameData.I. References _level_data, and INLINE. |
|
Returns the number of individual level values stored in the FrameData.
Definition at line 278 of file pStatFrameData.I. |
|
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 160 of file pStatFrameData.I. References _time_data, and 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 262 of file pStatFrameData.I. |
|
Returns the index of the collector associated with the nth event.
Definition at line 226 of file pStatFrameData.I. |
|
Returns true if the FrameData has no time or level data.
Definition at line 64 of file pStatFrameData.I. References PStatFrameData::DataPoint::_index, PStatFrameData::DataPoint::_value, INLINE, and nassertv. Referenced by add_level(), and add_stop(). |
|
Returns true if there are no levels indicated in the frame data, false otherwise.
Definition at line 49 of file pStatFrameData.I. References is_time_empty(). |
|
Returns true if the nth event represents a start event, or false if it represents a stop event.
Definition at line 242 of file pStatFrameData.I. |
|
Returns true if there are no time events in the frame data, false otherwise.
Definition at line 34 of file pStatFrameData.I. References _level_data, and INLINE. Referenced by is_level_empty(). |
|
Extracts the FrameData definition from the datagram.
Definition at line 62 of file pStatFrameData.cxx. References _time_data. |
|
Writes the definition of the FrameData to the datagram.
Definition at line 39 of file pStatFrameData.cxx. |
|
Definition at line 83 of file pStatFrameData.h. Referenced by get_num_events(), and is_time_empty(). |
|
Definition at line 83 of file pStatFrameData.h. Referenced by add_level(), add_start(), add_stop(), clear(), get_end(), get_net_time(), get_start(), and read_datagram(). |