OMNeT++ Simulation Library  5.6.1
cIOutputVectorManager Class Referenceabstract

#include <envirext.h>

Description

Abstract base class for output vector managers for cEnvir.

cIOutputVectorManagers are plugins into the Envir user interface library (src/envir) that handle recording the output for cOutVectors.

The default output vector manager is cFileOutputVectorManager, defined in the Envir library.

To change the way output vectors are written, subclass cIOutputVectorManager, register your new class with the Register_Class() macro, then select it by adding the following to omnetpp.ini:

[General]
outputvectormanager-class="MyClass"
Inheritance diagram for cIOutputVectorManager:
cObject cISimulationLifecycleListener noncopyable

Public Member Functions

Constructor, destructor
 cIOutputVectorManager ()
 
virtual ~cIOutputVectorManager ()
 
Controlling the beginning and end of collecting data.
virtual void startRun ()=0
 
virtual void endRun ()=0
 
Output vectors.
virtual void * registerVector (const char *modulename, const char *vectorname)=0
 
virtual void deregisterVector (void *vechandle)=0
 
virtual void setVectorAttribute (void *vechandle, const char *name, const char *value)=0
 
virtual bool record (void *vechandle, simtime_t t, double value)=0
 
virtual const char * getFileName () const =0
 
virtual void flush ()=0
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)
 
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
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
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

◆ cIOutputVectorManager()

cIOutputVectorManager ( )
inlineexplicit

Constructor.

◆ ~cIOutputVectorManager()

virtual ~cIOutputVectorManager ( )
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.

◆ registerVector()

virtual void* registerVector ( const char *  modulename,
const char *  vectorname 
)
pure virtual

Registers an output vector, and returns a handle that identifies the vector in subsequent calls e.g. record().

Note: registerVector() calls are also allowed before startRun().

◆ deregisterVector()

virtual void deregisterVector ( void *  vechandle)
pure virtual

Deregisters an output vector. Deregistration makes the vector handle invalid.

Note: deregisterVector() calls are also allowed after endRun().

◆ setVectorAttribute()

virtual void setVectorAttribute ( void *  vechandle,
const char *  name,
const char *  value 
)
pure virtual

Sets an attribute on the output vector. setVectorAttribute() is not allowed after data have already been recorded into the vector.

◆ record()

virtual bool record ( void *  vechandle,
simtime_t  t,
double  value 
)
pure virtual

Write data into the output vector. The return value is true if the data was actually recorded, and false if it was not recorded (because of filtering, etc.)

Calling record() is only allowed between startRun() and endRun().

◆ getFileName()

virtual const char* getFileName ( ) const
pure virtual

Returns the output vector 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: