OMNeT++ Simulation Library  5.6.1
cOutVector Class Reference

#include <coutvector.h>

Description

Responsible for recording vector simulation results (an output vector).

A cOutVector object can write doubles to the output vector file (or any another device determined by the current cIOutputVectorManager).

Inheritance diagram for cOutVector:
cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject

Public Member Functions

Constructors, destructor, assignment
 cOutVector (const char *name=nullptr)
 
virtual ~cOutVector ()
 
Redefined cObject member functions.
virtual void setName (const char *name) override
 
virtual std::string str () const override
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
Metadata annotations.
virtual void setEnum (const char *registeredEnumName)
 
virtual void setEnum (cEnum *enumDecl)
 
virtual void setUnit (const char *unit)
 
virtual void setType (Type type)
 
virtual void setInterpolationMode (InterpolationMode mode)
 
virtual void setMin (double minValue)
 
virtual void setMax (double maxValue)
 
Writing to output vectors.
virtual bool record (double value)
 
virtual bool record (SimTime value)
 
virtual bool recordWithTimestamp (simtime_t t, double value)
 
virtual bool recordWithTimestamp (simtime_t t, SimTime value)
 
virtual void enable ()
 
virtual void disable ()
 
virtual void setEnabled (bool b)
 
virtual bool isEnabled () const
 
virtual void setRecordDuringWarmupPeriod (bool b)
 
virtual bool getRecordDuringWarmupPeriod () const
 
long getValuesReceived () const
 
long getValuesStored () const
 
- Public Member Functions inherited from cNoncopyableOwnedObject
 cNoncopyableOwnedObject (const char *name=nullptr, bool namepooling=true)
 
virtual cNoncopyableOwnedObjectdup () const override
 
- Public Member Functions inherited from cOwnedObject
 cOwnedObject ()
 
 cOwnedObject (const char *name, bool namepooling=true)
 
 cOwnedObject (const cOwnedObject &obj)
 
virtual ~cOwnedObject ()
 
cOwnedObjectoperator= (const cOwnedObject &o)
 
virtual cObjectgetOwner () const override
 
virtual bool isOwnedObject () const override
 
virtual bool isSoftOwner () const
 
- Public Member Functions inherited from cNamedObject
 cNamedObject ()
 
 cNamedObject (const char *name, bool namepooling=true)
 
 cNamedObject (const cNamedObject &obj)
 
virtual ~cNamedObject ()
 
cNamedObjectoperator= (const cNamedObject &o)
 
virtual const char * getName () const override
 
virtual void setNamePooling (bool b)
 
virtual bool getNamePooling ()
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
const cObjectgetThisPtr () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
void copyNotSupported () const
 

Additional Inherited Members

- Static Public Member Functions inherited from cOwnedObject
static long getTotalObjectCount ()
 
static long getLiveObjectCount ()
 
static void resetObjectCounters ()
 
static cDefaultListgetDefaultOwner ()
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Constructor & Destructor Documentation

◆ cOutVector()

cOutVector ( const char *  name = nullptr)
explicit

Constructor.

◆ ~cOutVector()

virtual ~cOutVector ( )
virtual

Destructor.

Member Function Documentation

◆ setName()

virtual void setName ( const char *  name)
overridevirtual

Sets the name of the object. It is not possible to call this method after the first call to record().

Reimplemented from cNamedObject.

◆ str()

virtual std::string str ( ) const
overridevirtual

Produces a one-line description of the object's contents. See cObject for more details.

Reimplemented from cObject.

◆ parsimPack()

virtual void parsimPack ( cCommBuffer buffer) const
overridevirtual

Packing and unpacking cannot be supported with this class. This methods raises an error.

Reimplemented from cNoncopyableOwnedObject.

◆ parsimUnpack()

virtual void parsimUnpack ( cCommBuffer buffer)
overridevirtual

Packing and unpacking cannot be supported with this class. This methods raises an error.

Reimplemented from cNoncopyableOwnedObject.

◆ setEnum() [1/2]

virtual void setEnum ( const char *  registeredEnumName)
virtual

Associate the vector with an enum defined in a msg file. This information gets recorded into the output vector file and may be used by result analysis tools. cOutVector does not verify that recorded values actually comply with this annotation.

◆ setEnum() [2/2]

virtual void setEnum ( cEnum enumDecl)
virtual

Associate the vector with an enum. The enum name as well as the symbols and their integer values will get recorded into the output vector file, and may be used by result analysis tools. cOutVector does not verify that recorded values actually comply with this annotation.

◆ setUnit()

virtual void setUnit ( const char *  unit)
virtual

Annotate the vector with a physical unit (like "s", "mW" or "bytes"). This information gets recorded into the output vector file, and may be used by result analysis tools.

◆ setType()

virtual void setType ( Type  type)
virtual

Annotate the vector with a data type. This information gets recorded into the output vector file, and may be used by result analysis tools. cOutVector does not verify that recorded values actually comply with this annotation.

◆ setInterpolationMode()

virtual void setInterpolationMode ( InterpolationMode  mode)
virtual

Annotate the vector with an interpolation mode. This information gets recorded into the output vector file, and may be used by result analysis tools as a hint for choosing a plotting style.

◆ setMin()

virtual void setMin ( double  minValue)
virtual

Annotate the vector with a minimum value. This information gets recorded into the output vector file and may be used by result analysis tools. cOutVector does not verify that recorded values actually comply with this annotation.

◆ setMax()

virtual void setMax ( double  maxValue)
virtual

Annotate the vector with a maximum value. This information gets recorded into the output vector file and may be used by result analysis tools. cOutVector does not verify that recorded values actually comply with this annotation.

◆ record() [1/2]

virtual bool record ( double  value)
virtual

Records the value with the current simulation time as timestamp.

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

◆ record() [2/2]

virtual bool record ( SimTime  value)
inlinevirtual

Convenience method, delegates to record(double).

References SimTime::dbl(), and cOutVector::record().

Referenced by cOutVector::record().

◆ recordWithTimestamp() [1/2]

virtual bool recordWithTimestamp ( simtime_t  t,
double  value 
)
virtual

Records the value with the given time as timestamp. Values must be recorded in increasing timestamp order, that is, it is not possible to record a value with a timestamp that is less than that of the last recorded value.

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

◆ recordWithTimestamp() [2/2]

virtual bool recordWithTimestamp ( simtime_t  t,
SimTime  value 
)
inlinevirtual

◆ enable()

virtual void enable ( )
inlinevirtual

Enables recording data via this object. (It is enabled by default.)

◆ disable()

virtual void disable ( )
inlinevirtual

Disables recording data via this object. record() methods will return false without doing anything.

◆ setEnabled()

virtual void setEnabled ( bool  b)
inlinevirtual

Enables/disables recording data via this object.

See also
enable(), disable()

◆ isEnabled()

virtual bool isEnabled ( ) const
inlinevirtual

Returns true if recording the data is enabled, false otherwise.

◆ setRecordDuringWarmupPeriod()

virtual void setRecordDuringWarmupPeriod ( bool  b)
inlinevirtual

Enables/disables recording data during the warm-up period. When set to false, record() calls will be ignored during warm-up period.

See also
cSimulation::getWarmupPeriod()

◆ getRecordDuringWarmupPeriod()

virtual bool getRecordDuringWarmupPeriod ( ) const
inlinevirtual

Returns true if the object will record data during the warm-up period.

See also
cSimulation::getWarmupPeriod()

◆ getValuesReceived()

long getValuesReceived ( ) const
inline

Returns the total number of values passed to the record() method of this output vector object. This includes the values passed while the object was disabled (see disable()).

◆ getValuesStored()

long getValuesStored ( ) const
inline

Returns the number of values actually stored by this output vector object. The values passed while the object was disabled (via disable(), environment configuration, filtering, etc.) do not count.


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