geopm
3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
|
#include <Accumulator.hpp>
Public Member Functions | |
AvgAccumulatorImp () | |
virtual | ~AvgAccumulatorImp ()=default |
void | update (double delta_time, double signal) override |
Called in control loop to update state. More... | |
void | enter (void) override |
Mark the beginning of an interval. More... | |
void | exit (void) override |
Mark the end of an interval. More... | |
double | average (void) const override |
Average of the signal tracked while the condition is true. More... | |
double | interval_average (void) const override |
Average of the signal tracked while the condition is true. More... | |
Public Member Functions inherited from geopm::AvgAccumulator | |
virtual | ~AvgAccumulator ()=default |
Virtual destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from geopm::AvgAccumulator | |
static std::unique_ptr< AvgAccumulator > | make_unique (void) |
Factory constructor. More... | |
Protected Member Functions inherited from geopm::AvgAccumulator | |
AvgAccumulator ()=default | |
geopm::AvgAccumulatorImp::AvgAccumulatorImp | ( | ) |
|
virtualdefault |
|
overridevirtual |
Average of the signal tracked while the condition is true.
Get the average value of the signal being tracked when the condition was true. This average is weighted by the duration of the control loop when each update() call was made.
Implements geopm::AvgAccumulator.
|
overridevirtual |
Mark the beginning of an interval.
Used to mark the beginning of an interval used for the interval_average() reporting. The next call to exit() will close the interval and update the value returned by interval_average() to reflect the interval between the enter() and exit() calls.
Implements geopm::AvgAccumulator.
|
overridevirtual |
Mark the end of an interval.
Used to mark the end of an interval that was previously started with a call to the enter() API. The call to exit() will update the value returned by interval_average() to reflect the interval since the enter() call.
Implements geopm::AvgAccumulator.
|
overridevirtual |
Average of the signal tracked while the condition is true.
Get the average value of the signal being tracked when the condition was true over the last interval. This average is weighted by the duration of the control loop when each update() call was made, and limited to the updates() made during the last enter()/exit() interval.
Implements geopm::AvgAccumulator.
|
overridevirtual |
Called in control loop to update state.
Update with the time interval and the value of the signal being tracked. This is called once in each control interval where the condition is true. The change in the time is measured over the period of the last control interval.
[in] | delta_time | Change in the time over the control interval. |
[in] | signal | Value of the signal being tracked. |
Implements geopm::AvgAccumulator.