![]() |
MAK Data Logger API Documentation for DIS
|
Collection of data values sorted by time used for data views. More...
Inheritance diagram for MAKLogger::DtLgrDataViewSet:
Collaboration diagram for MAKLogger::DtLgrDataViewSet:Classes | |
| class | DataPoint |
| Data for a single data point. More... | |
Public Types | |
| typedef std::deque< DataPoint > | DataPointSet |
| typedef std::map< unsigned long, size_t > | DataPointIndexMap |
Public Member Functions | |
| virtual | ~DtLgrDataViewSet () |
| CTOR. More... | |
| virtual void | addPacketData (const DtPacket &packet) |
| Adds the desired data from a packet to the set. More... | |
| virtual void | addDataPoint (double time, unsigned char type, unsigned short size) |
| Adds a data point. More... | |
| virtual void | addDataPoint (DataPoint const &point) |
| Adds a data point. More... | |
| virtual void | append (const DtLgrDataViewSet &secondSet) |
| Append the data to the end of the current set. More... | |
| virtual void | clearAllBeforeTime (double time) |
| Remove all points with a time less that the input. More... | |
| virtual void | clearSet () |
| Clears the current set. More... | |
| DataPointSet::const_iterator | begin () const |
| Get the iterator to the first data point. More... | |
| DataPointSet::const_iterator | end () const |
| Get the iterator that is past the last data point. More... | |
| DataPoint const & | first () const |
| Return a reference to the first data point (invalid point if set is empty). More... | |
| bool | getFirst (DataPoint &firstPoint) const |
| Get the first data point. Return true if set is not empty. More... | |
| DataPoint const & | last () const |
| Return a reference to the last data point (invalid point if set is empty). More... | |
| bool | getLast (DataPoint &last) const |
| Get the last data point. Return true if set is not empty. More... | |
| size_t | size () const |
| Get size of data set. More... | |
| virtual size_t | fillSetFromTime (DtLgrDataViewSet &dataSet, double startTime, double endTime) |
| Get the data points from the given start time up to and including the given end time. More... | |
| virtual size_t | fillSetFromIndex (DtLgrDataViewSet &dataSet, size_t startIndex, double endTime) |
| Get the data points from the given start index up to and including the given end time. More... | |
Protected Member Functions | |
| virtual void | indexPacketTime (size_t index, unsigned long packetTime) |
| Update the packet time index. More... | |
| virtual void | adjustTimeIndex (const DtLgrDataViewSet &newSet) |
| Adjust the time-index map with the given set of points that will be added. More... | |
Protected Attributes | |
| DataPointSet | myPoints |
| The set of data points. More... | |
| DataPoint | myInvalidPoint |
| An invalid data point. More... | |
| DataPointIndexMap | myTimeIndexMap |
| Index into data points by time. More... | |
Collection of data values sorted by time used for data views.
The Data View components use this class to collect data points (e.g., packet counts/sizes) from a logger file. The data points can be used to generate a bar graph.
| typedef std::map<unsigned long, size_t> MAKLogger::DtLgrDataViewSet::DataPointIndexMap |
| typedef std::deque<DataPoint> MAKLogger::DtLgrDataViewSet::DataPointSet |
|
virtual |
CTOR.
DTOR
|
virtual |
Adds a data point.
|
virtual |
Adds a data point.
|
virtual |
Adds the desired data from a packet to the set.
A packet should only be added once to a set.
Reimplemented in MAKLogger::DtLgrDisDataViewSet.
|
protectedvirtual |
Adjust the time-index map with the given set of points that will be added.
Must be called before points are added!
|
virtual |
Append the data to the end of the current set.
| DataPointSet::const_iterator MAKLogger::DtLgrDataViewSet::begin | ( | ) | const |
Get the iterator to the first data point.
|
virtual |
Remove all points with a time less that the input.
This function assumes that data set is sorted by increasing time.
|
virtual |
Clears the current set.
| DataPointSet::const_iterator MAKLogger::DtLgrDataViewSet::end | ( | ) | const |
Get the iterator that is past the last data point.
|
virtual |
Get the data points from the given start index up to and including the given end time.
Return the index of the next data point after endTime (size of list if end is reached)
|
virtual |
Get the data points from the given start time up to and including the given end time.
Return the index of the next data point after endTime (size of list if end is reached)
| DataPoint const& MAKLogger::DtLgrDataViewSet::first | ( | ) | const |
Return a reference to the first data point (invalid point if set is empty).
| bool MAKLogger::DtLgrDataViewSet::getFirst | ( | DataPoint & | firstPoint | ) | const |
Get the first data point. Return true if set is not empty.
| bool MAKLogger::DtLgrDataViewSet::getLast | ( | DataPoint & | last | ) | const |
Get the last data point. Return true if set is not empty.
|
protectedvirtual |
Update the packet time index.
| DataPoint const& MAKLogger::DtLgrDataViewSet::last | ( | ) | const |
Return a reference to the last data point (invalid point if set is empty).
| size_t MAKLogger::DtLgrDataViewSet::size | ( | ) | const |
Get size of data set.
|
protected |
An invalid data point.
|
protected |
The set of data points.
|
protected |
Index into data points by time.