OMNeT++ Simulation Library
6.0.3
|
16 #ifndef __OMNETPP_CRESULTRECORDER_H
17 #define __OMNETPP_CRESULTRECORDER_H
19 #include "cresultlistener.h"
20 #include "ccomponent.h"
21 #include "onstartup.h"
22 #include "opp_pooledstring.h"
27 class cResultRecorder;
43 #define Register_ResultRecorder(NAME, CLASSNAME) \
44 __REGISTER_CLASS_X(CLASSNAME, omnetpp::cResultRecorder, "result recorder", omnetpp::internal::resultRecorders.getInstance()->add(new omnetpp::cResultRecorderType(NAME,omnetpp::opp_typename(typeid(CLASSNAME)))) )
59 #define Register_ResultRecorder2(NAME, CLASSNAME, DESCRIPTION) \
60 __REGISTER_CLASS_X(CLASSNAME, omnetpp::cResultRecorder, "result recorder", omnetpp::internal::resultRecorders.getInstance()->add(new omnetpp::cResultRecorderType(NAME,omnetpp::opp_typename(typeid(CLASSNAME)),DESCRIPTION)) )
96 bool finishCalled =
false;
107 virtual void init(Context *ctx);
108 [[deprecated]]
virtual void init(cComponent *component,
const char *statisticName,
const char *recordingMode, cProperty *attrsProperty, opp_string_map *manualAttrs=
nullptr) {}
109 virtual cResultRecorder *clone()
const override;
110 virtual const char *
getName()
const override {
return getStatisticName();}
111 virtual std::string
getFullPath()
const override {
return getComponent()->getFullPath() +
"." + getResultName();}
112 virtual cComponent *getComponent()
const {
return component;}
113 virtual const char *getStatisticName()
const {
return statisticName.c_str();}
114 virtual const char *getRecordingMode()
const {
return recordingMode.c_str();}
115 virtual const char *getDemuxLabel()
const {
return demuxLabel.c_str();}
116 virtual void setDemuxLabel(
const char *s) {demuxLabel = s;}
117 virtual std::string getResultName()
const;
151 std::string description;
152 std::string className;
158 cResultRecorderType(
const char *name,
const char *className,
const char *description=
nullptr);
const typedef simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition: simtime_t.h:48
cProperty * attrsProperty
An optional property from which extra attributes can be taken; usually the @statistic property.
Definition: cresultrecorder.h:86
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
virtual const char * getName() const override
Definition: cresultrecorder.h:110
cComponent * component
The statistic should be recorded for this module/channel; usually the module on which the @statistic ...
Definition: cresultrecorder.h:83
Lightweight string class, used internally in some parts of OMNeT++.
Definition: opp_string.h:39
const char * statisticName
The base name for the statistic; usually the index of the @statistic[] property (the name in brackets...
Definition: cresultrecorder.h:84
Definition: cresultrecorder.h:82
const char * getDescription() const
Definition: cresultrecorder.h:168
Lightweight string-to-string map, used internally in some parts of OMNeT++.
Definition: opp_string.h:219
Abstract base class for numeric result recorders.
Definition: cresultrecorder.h:128
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
uint64_t uintval_t
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the libr...
Definition: simkerneldefs.h:109
Abstract base class for result recorders.
Definition: cresultrecorder.h:70
const char * recordingMode
The recording mode; usually an element the the record=... list in the @statistic property.
Definition: cresultrecorder.h:85
virtual std::string getFullPath() const override
Definition: cresultrecorder.h:111
Registers a cResultRecorder.
Definition: cresultrecorder.h:148
int64_t intval_t
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the librar...
Definition: simkerneldefs.h:101
Common base for module and channel classes.
Definition: ccomponent.h:49
Definition: opp_pooledstring.h:63
Base class for result filters.
Definition: cresultfilter.h:72
Base class for cOwnedObject-based classes that do not wish to support assignment and duplication.
Definition: cownedobject.h:242
Common abstract base class for result filters and result recorders.
Definition: cresultlistener.h:34
Stores a (NED) property with its (possibly compound) value.
Definition: cproperty.h:38