46 EV_DETAIL <<
"Processing @" <<
property->getFullName() <<
" on " << module->getFullPath() << endl;
49 cModule *sourceModule;
51 parseSignalPath(property->getValue(
"source"), module, sourceModule, signal);
54 cResultFilter *filter =
nullptr;
55 if (
const char *filterName = property->getValue(
"filter")) {
56 filter = cResultFilterType::get(filterName)->create();
60 const char *figurePath =
property->getValue(
"figure");
62 figurePath =
property->getIndex();
63 cFigure *figure = module->getCanvas()->getFigureByPath(figurePath);
65 throw cRuntimeError(
"Figure '%s' not found", figurePath);
66 IIndicatorFigure *meterFigure = check_and_cast<IIndicatorFigure *>(figure);
70 const char *seriesAttr =
property->getValue(
"series");
72 if (series > meterFigure->getNumSeries())
73 throw cRuntimeError(
"series=%d is out of bounds, figure supports %d series", series, meterFigure->getNumSeries());
74 FigureRecorder *figureRecorder =
new FigureRecorder(meterFigure, series);
75 figureRecorder->init(module,
nullptr,
nullptr, property);
78 cResultListener *listener = figureRecorder;
80 filter->addDelegate(figureRecorder);
83 sourceModule->subscribe(signal, listener);
85 catch (std::exception&
e) {
86 throw cRuntimeError(
"While processing @%s on %s: %s", property->getFullName(), module->getFullPath().c_str(), e.what());
std::vector< IIndicatorFigure * > indicatorFigures
Definition: DelegateSignalConfigurator.h:65
virtual void parseSignalPath(const char *signalPath, cModule *context, cModule *&module, simsignal_t &signal)
Definition: DelegateSignalConfigurator.cc:110
unsigned long atoul(const char *s)
Converts string to unsigned long.
Definition: INETUtils.cc:47
const value< double, units::C > e(1.602176487e-19)