Go to the documentation of this file.
28 std::stable_sort(_time_data.begin(), _time_data.end());
37 Data::const_iterator di;
38 if (_time_data.size() >= 65536 || _level_data.size() >= 65536) {
40 <<
"Dropping frame with " << _time_data.size()
41 <<
" time measurements and " << _level_data.size()
42 <<
" level measurements.\n";
47 for (di = _time_data.begin(); di != _time_data.end(); ++di) {
52 for (di = _level_data.begin(); di != _level_data.end(); ++di) {
69 for (i = 0; i < time_size; i++) {
74 _time_data.push_back(dp);
77 for (i = 0; i < level_size; i++) {
82 _level_data.push_back(dp);
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
void sort_time()
Ensures the frame data is in monotonically increasing order by time.
PN_float32 get_float32()
Extracts a 32-bit single-precision floating-point number.
void clear()
Removes all the data points from the frame data, in preparation for building up a new frame's worth.
A class to retrieve the individual data elements previously stored in a Datagram.
Records the version number of a particular client.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
bool write_datagram(Datagram &destination, PStatClient *client) const
Writes the definition of the FrameData to the datagram.
void read_datagram(DatagramIterator &source, PStatClientVersion *version)
Extracts the FrameData definition from the datagram.
Manages the communications to report statistics via a network connection to a remote PStatServer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
size_t get_remaining_size() const
Return the bytes left in the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_float32(PN_float32 value)
Adds a 32-bit single-precision floating-point number to the datagram.