MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
MAKLogger::DtLgrDataViewSet Class Reference

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< DataPointDataPointSet
 
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...
 

Detailed Description

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.

Member Typedef Documentation

typedef std::map<unsigned long, size_t> MAKLogger::DtLgrDataViewSet::DataPointIndexMap

Constructor & Destructor Documentation

virtual MAKLogger::DtLgrDataViewSet::~DtLgrDataViewSet ( )
virtual

CTOR.

DTOR

Member Function Documentation

virtual void MAKLogger::DtLgrDataViewSet::addDataPoint ( double  time,
unsigned char  type,
unsigned short  size 
)
virtual

Adds a data point.

virtual void MAKLogger::DtLgrDataViewSet::addDataPoint ( DataPoint const &  point)
virtual

Adds a data point.

virtual void MAKLogger::DtLgrDataViewSet::addPacketData ( const DtPacket packet)
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.

virtual void MAKLogger::DtLgrDataViewSet::adjustTimeIndex ( const DtLgrDataViewSet newSet)
protectedvirtual

Adjust the time-index map with the given set of points that will be added.

Must be called before points are added!

virtual void MAKLogger::DtLgrDataViewSet::append ( const DtLgrDataViewSet secondSet)
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 void MAKLogger::DtLgrDataViewSet::clearAllBeforeTime ( double  time)
virtual

Remove all points with a time less that the input.

This function assumes that data set is sorted by increasing time.

virtual void MAKLogger::DtLgrDataViewSet::clearSet ( )
virtual

Clears the current set.

DataPointSet::const_iterator MAKLogger::DtLgrDataViewSet::end ( ) const

Get the iterator that is past the last data point.

virtual size_t MAKLogger::DtLgrDataViewSet::fillSetFromIndex ( DtLgrDataViewSet dataSet,
size_t  startIndex,
double  endTime 
)
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 size_t MAKLogger::DtLgrDataViewSet::fillSetFromTime ( DtLgrDataViewSet dataSet,
double  startTime,
double  endTime 
)
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.

virtual void MAKLogger::DtLgrDataViewSet::indexPacketTime ( size_t  index,
unsigned long  packetTime 
)
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.

Member Data Documentation

DataPoint MAKLogger::DtLgrDataViewSet::myInvalidPoint
protected

An invalid data point.

DataPointSet MAKLogger::DtLgrDataViewSet::myPoints
protected

The set of data points.

DataPointIndexMap MAKLogger::DtLgrDataViewSet::myTimeIndexMap
protected

Index into data points by time.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)