Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
TrackerValueDesc Class Reference

Representation of a timeline of floats with their names and moments. More...

#include <TrackerValueDesc.h>

Inheritance diagram for TrackerValueDesc:
[legend]
Collaboration diagram for TrackerValueDesc:
[legend]

Public Member Functions

void addValue (double value)
 Adds a new value to the list.
 
const std::vector< double > & getAggregatedValues ()
 returns the vector of aggregated values The values will be locked - no further addition will be perfomed until the method "unlockValues" will be called
 
SUMOTime getAggregationSpan () const
 get the aggregation amount
 
const RGBColorgetColor () const
 Returns the color to use to display the value.
 
double getMax () const
 Returns the values maximum.
 
double getMin () const
 Returns the values minimum.
 
const std::string & getName () const
 Returns the name of the value.
 
double getRange () const
 returns the maximum value range
 
SUMOTime getRecordingBegin () const
 Returns the timestep the recording started.
 
const std::vector< double > & getValues ()
 returns the vector of collected values The values will be locked - no further addition will be perfomed until the method "unlockValues" will be called
 
double getYCenter () const
 Returns the center of the value.
 
void setAggregationSpan (SUMOTime as)
 set the aggregation amount
 
 TrackerValueDesc (const std::string &name, const RGBColor &col, SUMOTime recordBegin, double aggregationSeconds)
 Constructor.
 
void unlockValues ()
 Releases the locking after the values have been drawn.
 
 ~TrackerValueDesc ()
 Destructor.
 

Private Attributes

RGBColor myActiveCol
 The color to use when the value is set as "active".
 
std::vector< double > myAggregatedValues
 Collected values in their aggregated form.
 
int myAggregationInterval
 The aggregation interval in simulation steps.
 
RGBColor myInactiveCol
 The color to use when the value is set as "inactive".
 
double myInvalidValue
 Values like this shall not be counted on aggregation.
 
FXMutex myLock
 
double myMax
 
double myMin
 The minimum and the maximum of the value.
 
std::string myName
 The name of the value.
 
SUMOTime myRecordingBegin
 The time step the values are added from.
 
double myTmpLastAggValue
 Temporary storage for the last aggregation interval.
 
int myValidNo
 Counter for valid numbers within the current aggregation interval.
 
std::vector< double > myValues
 Values collected.
 

Detailed Description

Representation of a timeline of floats with their names and moments.

This class contains the information needed to display a time line of float values.

Definition at line 42 of file TrackerValueDesc.h.

Constructor & Destructor Documentation

◆ TrackerValueDesc()

TrackerValueDesc::TrackerValueDesc ( const std::string &  name,
const RGBColor col,
SUMOTime  recordBegin,
double  aggregationSeconds 
)

Constructor.

Definition at line 35 of file TrackerValueDesc.cpp.

◆ ~TrackerValueDesc()

TrackerValueDesc::~TrackerValueDesc ( )

Destructor.

Definition at line 47 of file TrackerValueDesc.cpp.

References myLock.

Member Function Documentation

◆ addValue()

void TrackerValueDesc::addValue ( double  value)
virtual

Adds a new value to the list.

Implements ValueRetriever< double >.

Definition at line 56 of file TrackerValueDesc.cpp.

References myAggregatedValues, myAggregationInterval, myInvalidValue, myLock, myMax, myMin, myTmpLastAggValue, myValidNo, and myValues.

◆ getAggregatedValues()

const std::vector< double > & TrackerValueDesc::getAggregatedValues ( )

returns the vector of aggregated values The values will be locked - no further addition will be perfomed until the method "unlockValues" will be called

Definition at line 121 of file TrackerValueDesc.cpp.

References myAggregatedValues, and myLock.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUIParameterTracker::onCmdSave().

Here is the caller graph for this function:

◆ getAggregationSpan()

SUMOTime TrackerValueDesc::getAggregationSpan ( ) const

get the aggregation amount

Definition at line 167 of file TrackerValueDesc.cpp.

References DELTA_T, and myAggregationInterval.

Referenced by GUIParameterTracker::addTrackedMultiplot(), and GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ getColor()

const RGBColor & TrackerValueDesc::getColor ( ) const

Returns the color to use to display the value.

Definition at line 108 of file TrackerValueDesc.cpp.

References myActiveCol.

◆ getMax()

double TrackerValueDesc::getMax ( ) const

Returns the values maximum.

Definition at line 96 of file TrackerValueDesc.cpp.

References myMax.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ getMin()

double TrackerValueDesc::getMin ( ) const

Returns the values minimum.

Definition at line 90 of file TrackerValueDesc.cpp.

References myMin.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ getName()

const std::string & TrackerValueDesc::getName ( ) const

Returns the name of the value.

Definition at line 128 of file TrackerValueDesc.cpp.

References myName.

Referenced by GUIParameterTracker::addTrackedMultiplot(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUIParameterTracker::onCmdSave().

Here is the caller graph for this function:

◆ getRange()

double TrackerValueDesc::getRange ( ) const

returns the maximum value range

Definition at line 84 of file TrackerValueDesc.cpp.

References myMax, and myMin.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ getRecordingBegin()

SUMOTime TrackerValueDesc::getRecordingBegin ( ) const

Returns the timestep the recording started.

Definition at line 173 of file TrackerValueDesc.cpp.

References myRecordingBegin.

Referenced by GUIParameterTracker::addTrackedMultiplot(), and GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ getValues()

const std::vector< double > & TrackerValueDesc::getValues ( )

returns the vector of collected values The values will be locked - no further addition will be perfomed until the method "unlockValues" will be called

Definition at line 114 of file TrackerValueDesc.cpp.

References myLock, and myValues.

◆ getYCenter()

double TrackerValueDesc::getYCenter ( ) const

Returns the center of the value.

Definition at line 102 of file TrackerValueDesc.cpp.

References myMax, and myMin.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().

Here is the caller graph for this function:

◆ setAggregationSpan()

void TrackerValueDesc::setAggregationSpan ( SUMOTime  as)

set the aggregation amount

Definition at line 139 of file TrackerValueDesc.cpp.

References DELTA_T, myAggregatedValues, myAggregationInterval, myInvalidValue, myLock, myTmpLastAggValue, myValidNo, and myValues.

◆ unlockValues()

void TrackerValueDesc::unlockValues ( )

Releases the locking after the values have been drawn.

Definition at line 133 of file TrackerValueDesc.cpp.

References myLock.

Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUIParameterTracker::onCmdSave().

Here is the caller graph for this function:

Field Documentation

◆ myActiveCol

RGBColor TrackerValueDesc::myActiveCol
private

The color to use when the value is set as "active".

Definition at line 101 of file TrackerValueDesc.h.

Referenced by getColor().

◆ myAggregatedValues

std::vector<double> TrackerValueDesc::myAggregatedValues
private

Collected values in their aggregated form.

Definition at line 110 of file TrackerValueDesc.h.

Referenced by addValue(), getAggregatedValues(), and setAggregationSpan().

◆ myAggregationInterval

int TrackerValueDesc::myAggregationInterval
private

The aggregation interval in simulation steps.

Definition at line 119 of file TrackerValueDesc.h.

Referenced by addValue(), getAggregationSpan(), and setAggregationSpan().

◆ myInactiveCol

RGBColor TrackerValueDesc::myInactiveCol
private

The color to use when the value is set as "inactive".

Definition at line 104 of file TrackerValueDesc.h.

◆ myInvalidValue

double TrackerValueDesc::myInvalidValue
private

Values like this shall not be counted on aggregation.

Definition at line 122 of file TrackerValueDesc.h.

Referenced by addValue(), and setAggregationSpan().

◆ myLock

FXMutex TrackerValueDesc::myLock
private

◆ myMax

double TrackerValueDesc::myMax
private

Definition at line 113 of file TrackerValueDesc.h.

Referenced by addValue(), getMax(), getRange(), and getYCenter().

◆ myMin

double TrackerValueDesc::myMin
private

The minimum and the maximum of the value.

Definition at line 113 of file TrackerValueDesc.h.

Referenced by addValue(), getMin(), getRange(), and getYCenter().

◆ myName

std::string TrackerValueDesc::myName
private

The name of the value.

Definition at line 98 of file TrackerValueDesc.h.

Referenced by getName().

◆ myRecordingBegin

SUMOTime TrackerValueDesc::myRecordingBegin
private

The time step the values are added from.

Definition at line 128 of file TrackerValueDesc.h.

Referenced by getRecordingBegin().

◆ myTmpLastAggValue

double TrackerValueDesc::myTmpLastAggValue
private

Temporary storage for the last aggregation interval.

Definition at line 131 of file TrackerValueDesc.h.

Referenced by addValue(), and setAggregationSpan().

◆ myValidNo

int TrackerValueDesc::myValidNo
private

Counter for valid numbers within the current aggregation interval.

Definition at line 125 of file TrackerValueDesc.h.

Referenced by addValue(), and setAggregationSpan().

◆ myValues

std::vector<double> TrackerValueDesc::myValues
private

Values collected.

Definition at line 107 of file TrackerValueDesc.h.

Referenced by addValue(), getValues(), and setAggregationSpan().


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