OMNeT++ API 6.1
Discrete Event Simulation Library
cIOutputScalarManager Class Referenceabstract

Description

Abstract base class for handling recording of output scalar data.

cIOutputScalarManagers are plugins into the Envir user interface library (src/envir) that ultimately handle calls to the cComponent::recordScalar() family of functions.

The default output scalar manager is cFileOutputScalarManager, defined in the Envir library.

To change the way scalar results are recorded, subclass cIOutputScalarManager, register your new class with the Register_Class() macro, then select it by adding the following to omnetpp.ini:

[General]
outputscalarmanager-class="MyClass"
Inheritance diagram for cIOutputScalarManager:
[legend]

Public Member Functions

Constructor, destructor
 cIOutputScalarManager ()
 
virtual ~cIOutputScalarManager ()
 
Controlling the beginning and end of collecting data.
virtual void startRun ()=0
 
virtual void endRun ()=0
 
Scalar statistics.
virtual bool recordScalar (cComponent *component, const char *name, double value, opp_string_map *attributes=nullptr)=0
 
virtual bool recordStatistic (cComponent *component, const char *name, cStatistic *statistic, opp_string_map *attributes=nullptr)=0
 
virtual bool recordParameter (cPar *par)=0
 
virtual bool recordComponentType (cComponent *component)=0
 
virtual const char * getFileName () const =0
 
virtual void flush ()=0
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)=default
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
virtual const char * getName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual bool isSoftOwner () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 
- Public Member Functions inherited from cISimulationLifecycleListener
virtual ~cISimulationLifecycleListener ()
 
virtual void listenerAdded ()
 
virtual void listenerRemoved ()
 

Protected Member Functions

virtual void lifecycleEvent (SimulationLifecycleEventType eventType, cObject *details) override
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Additional Inherited Members

- Static Public Member Functions inherited from cISimulationLifecycleListener
static const char * getSimulationLifecycleEventName (SimulationLifecycleEventType eventType)
 

Constructor & Destructor Documentation

◆ cIOutputScalarManager()

cIOutputScalarManager ( )
inlineexplicit

Constructor.

◆ ~cIOutputScalarManager()

virtual ~cIOutputScalarManager ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ lifecycleEvent()

virtual void lifecycleEvent ( SimulationLifecycleEventType  eventType,
cObject details 
)
overrideprotectedvirtual

A cISimulationLifecycleListener method. Delegates to startRun(), endRun() and flush(); override if needed.

Implements cISimulationLifecycleListener.

◆ startRun()

virtual void startRun ( )
pure virtual

Opens collecting. Called at the beginning of a simulation run.

◆ endRun()

virtual void endRun ( )
pure virtual

Closes collecting. Called at the end of a simulation run.

◆ recordScalar()

virtual bool recordScalar ( cComponent component,
const char *  name,
double  value,
opp_string_map attributes = nullptr 
)
pure virtual

Records a double scalar result, in a default configuration into the scalar result file. The return value indicates whether the recording has actually taken place (true=yes).

◆ recordStatistic()

virtual bool recordStatistic ( cComponent component,
const char *  name,
cStatistic statistic,
opp_string_map attributes = nullptr 
)
pure virtual

Records a histogram or statistic object into the scalar result file. This operation may invoke the setUpBins() method on the histogram object. The return value indicates whether the recording has actually taken place (true=yes).

◆ recordParameter()

virtual bool recordParameter ( cPar par)
pure virtual

Records a module or channel parameter, in a default configuration into the scalar result file. The return value indicates whether the recording has actually taken place (true=yes).

◆ recordComponentType()

virtual bool recordComponentType ( cComponent component)
pure virtual

Records the runtime NED type of module or channel, in a default configuration into the scalar result file. The return value indicates whether the recording has actually taken place (true=yes).

◆ getFileName()

virtual const char* getFileName ( ) const
pure virtual

Returns the output scalar file name. Returns nullptr if this object is not producing file output.

◆ flush()

virtual void flush ( )
pure virtual

Force writing out all buffered output.


The documentation for this class was generated from the following file: