Eclipse SUMO - Simulation of Urban MObility
|
Representation of a timeline of floats with their names and moments. More...
#include <TrackerValueDesc.h>
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 RGBColor & | getColor () 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. | |
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.
TrackerValueDesc::TrackerValueDesc | ( | const std::string & | name, |
const RGBColor & | col, | ||
SUMOTime | recordBegin, | ||
double | aggregationSeconds | ||
) |
Constructor.
Definition at line 35 of file TrackerValueDesc.cpp.
TrackerValueDesc::~TrackerValueDesc | ( | ) |
|
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.
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().
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().
const RGBColor & TrackerValueDesc::getColor | ( | ) | const |
Returns the color to use to display the value.
Definition at line 108 of file TrackerValueDesc.cpp.
References myActiveCol.
double TrackerValueDesc::getMax | ( | ) | const |
Returns the values maximum.
Definition at line 96 of file TrackerValueDesc.cpp.
References myMax.
Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().
double TrackerValueDesc::getMin | ( | ) | const |
Returns the values minimum.
Definition at line 90 of file TrackerValueDesc.cpp.
References myMin.
Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().
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().
double TrackerValueDesc::getRange | ( | ) | const |
returns the maximum value range
Definition at line 84 of file TrackerValueDesc.cpp.
Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().
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().
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.
double TrackerValueDesc::getYCenter | ( | ) | const |
Returns the center of the value.
Definition at line 102 of file TrackerValueDesc.cpp.
Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValue().
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.
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().
|
private |
The color to use when the value is set as "active".
Definition at line 101 of file TrackerValueDesc.h.
Referenced by getColor().
|
private |
Collected values in their aggregated form.
Definition at line 110 of file TrackerValueDesc.h.
Referenced by addValue(), getAggregatedValues(), and setAggregationSpan().
|
private |
The aggregation interval in simulation steps.
Definition at line 119 of file TrackerValueDesc.h.
Referenced by addValue(), getAggregationSpan(), and setAggregationSpan().
|
private |
The color to use when the value is set as "inactive".
Definition at line 104 of file TrackerValueDesc.h.
|
private |
Values like this shall not be counted on aggregation.
Definition at line 122 of file TrackerValueDesc.h.
Referenced by addValue(), and setAggregationSpan().
|
private |
Definition at line 116 of file TrackerValueDesc.h.
Referenced by addValue(), getAggregatedValues(), getValues(), setAggregationSpan(), unlockValues(), and ~TrackerValueDesc().
|
private |
Definition at line 113 of file TrackerValueDesc.h.
Referenced by addValue(), getMax(), getRange(), and getYCenter().
|
private |
The minimum and the maximum of the value.
Definition at line 113 of file TrackerValueDesc.h.
Referenced by addValue(), getMin(), getRange(), and getYCenter().
|
private |
|
private |
The time step the values are added from.
Definition at line 128 of file TrackerValueDesc.h.
Referenced by getRecordingBegin().
|
private |
Temporary storage for the last aggregation interval.
Definition at line 131 of file TrackerValueDesc.h.
Referenced by addValue(), and setAggregationSpan().
|
private |
Counter for valid numbers within the current aggregation interval.
Definition at line 125 of file TrackerValueDesc.h.
Referenced by addValue(), and setAggregationSpan().
|
private |
Values collected.
Definition at line 107 of file TrackerValueDesc.h.
Referenced by addValue(), getValues(), and setAggregationSpan().