#include <FigureRecorder.h>
|
virtual void | init (cComponent *component, const char *statisticName, const char *recordingMode, cProperty *attrsProperty, opp_string_map *manualAttrs=nullptr) override |
|
virtual void | collect (simtime_t_cref t, double value, cObject *details) override |
|
void inet::FigureRecorder::collect |
( |
simtime_t_cref |
t, |
|
|
double |
value, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
void inet::FigureRecorder::init |
( |
cComponent * |
component, |
|
|
const char * |
statisticName, |
|
|
const char * |
recordingMode, |
|
|
cProperty * |
attrsProperty, |
|
|
opp_string_map * |
manualAttrs = nullptr |
|
) |
| |
|
overrideprotectedvirtual |
26 cNumericResultRecorder::init(component, statisticName, recordingMode, attrsProperty, manualAttrs);
28 cModule *module = check_and_cast<cModule *>(getComponent());
29 const char *figureSpec = attrsProperty->getValue(
"targetFigure");
31 figureSpec = statisticName;
32 std::string figureName;
34 if (
const char *lastColon = strrchr(figureSpec,
':')) {
35 figureName = std::string(figureSpec, lastColon - figureSpec).c_str();
39 figureName = figureSpec;
42 cFigure *figure = module->getCanvas()->getFigureByPath(figureName.c_str());
44 throw cRuntimeError(
"Figure '%s' in module '%s' not found", figureName.c_str(), module->getFullPath().c_str());
46 if (series > indicatorFigure->getNumSeries())
47 throw cRuntimeError(
"series :%d is out of bounds, figure '%s' supports %d series", series, figureName.c_str(), indicatorFigure->getNumSeries());
unsigned long atoul(const char *s)
Converts string to unsigned long.
Definition: INETUtils.cc:47
int inet::FigureRecorder::series = 0 |
|
protected |
The documentation for this class was generated from the following files: