16 #ifndef __OMNETPP_COUTVECTOR_H 17 #define __OMNETPP_COUTVECTOR_H 20 #include "cownedobject.h" 21 #include "simtime_t.h" 53 simtime_t lastTimestamp;
59 void *dataForInspector;
63 void setCallback(
RecordFunc f,
void *d) {recordInInspector=f; dataForInspector=d;}
66 enum Type { TYPE_INT, TYPE_DOUBLE, TYPE_ENUM };
67 enum InterpolationMode { NONE, SAMPLE_HOLD, BACKWARD_SAMPLE_HOLD, LINEAR };
90 virtual void setName(
const char *name)
override;
96 virtual std::string str()
const override;
102 virtual void parsimPack(
cCommBuffer *buffer)
const override;
108 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
120 virtual void setEnum(
const char *registeredEnumName);
129 virtual void setEnum(
cEnum *enumDecl);
136 virtual void setUnit(
const char *unit);
144 virtual void setType(Type type);
151 virtual void setInterpolationMode(InterpolationMode mode);
159 virtual void setMin(
double minValue);
167 virtual void setMax(
double maxValue);
178 virtual bool record(
double value);
194 virtual bool recordWithTimestamp(simtime_t t,
double value);
204 virtual void enable() {setFlag(FL_ENABLED,
true);}
210 virtual void disable() {setFlag(FL_ENABLED,
false);}
221 virtual bool isEnabled()
const {
return flags&FL_ENABLED;}
virtual void setEnabled(bool b)
Definition: coutvector.h:216
Responsible for recording vector simulation results (an output vector).
Definition: coutvector.h:44
SimTime simtime_t
Represents simulation time.
Definition: simtime_t.h:36
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual void disable()
Definition: coutvector.h:210
virtual bool getRecordDuringWarmupPeriod() const
Definition: coutvector.h:236
double dbl() const
Definition: simtime.h:301
virtual void enable()
Definition: coutvector.h:204
virtual void setRecordDuringWarmupPeriod(bool b)
Definition: coutvector.h:230
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual bool record(SimTime value)
Definition: coutvector.h:183
Provides string representation for enums.
Definition: cenum.h:32
Definition: cabstracthistogram.h:21
Base class for cOwnedObject-based classes that do not wish to support assignment and duplication...
Definition: cownedobject.h:248
virtual bool recordWithTimestamp(simtime_t t, SimTime value)
Definition: coutvector.h:199
virtual bool isEnabled() const
Definition: coutvector.h:221
long getValuesStored() const
Definition: coutvector.h:250
long getValuesReceived() const
Definition: coutvector.h:243
void(* RecordFunc)(void *, simtime_t, double)
Prototype for callback functions that are used to notify graphical user interfaces when values are re...
Definition: coutvector.h:31