16 #ifndef __OMNETPP_CTIMESTAMPEDVALUE_H 17 #define __OMNETPP_CTIMESTAMPEDVALUE_H 19 #include "clistener.h" 20 #include "simtime_t.h" 49 virtual bool boolValue(
simsignal_t signalID)
const = 0;
50 virtual long longValue(
simsignal_t signalID)
const = 0;
51 virtual unsigned long unsignedLongValue(
simsignal_t signalID)
const = 0;
52 virtual double doubleValue(
simsignal_t signalID)
const = 0;
54 virtual const char *stringValue(
simsignal_t signalID)
const = 0;
94 void set(
simtime_t timestamp,
bool b) {this->timestamp=timestamp; type=SIMSIGNAL_BOOL; this->b=b;}
95 void set(
simtime_t timestamp,
long l) {this->timestamp=timestamp; type=SIMSIGNAL_LONG; this->l=l;}
96 void set(
simtime_t timestamp,
unsigned long ul) {this->timestamp=timestamp; type=SIMSIGNAL_ULONG; this->ul=ul;}
97 void set(
simtime_t timestamp,
double d) {this->timestamp=timestamp; type=SIMSIGNAL_DOUBLE; this->d=d;}
98 void set(
simtime_t timestamp,
const SimTime& t) {this->timestamp=timestamp; type=SIMSIGNAL_SIMTIME; this->t=t;}
99 void set(
simtime_t timestamp,
const char *s) {this->timestamp=timestamp; type=SIMSIGNAL_STRING; this->s=s;}
100 void set(
simtime_t timestamp,
cObject *obj) {this->timestamp=timestamp; type=SIMSIGNAL_OBJECT; this->obj=obj;}
111 virtual bool boolValue(
simsignal_t signalID)
const override {
return b;}
112 virtual long longValue(
simsignal_t signalID)
const override {
return l;}
113 virtual unsigned long unsignedLongValue(
simsignal_t signalID)
const override {
return ul;}
114 virtual double doubleValue(
simsignal_t signalID)
const override {
return d;}
116 virtual const char *stringValue(
simsignal_t signalID)
const override {
return s;}
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual SimsignalType getValueType(simsignal_t signalID) const override
Definition: ctimestampedvalue.h:107
A straightforward implementation of cITimestampedValue.
Definition: ctimestampedvalue.h:64
Interface for emitting timestamped values as signals, primarily for result recording.
Definition: ctimestampedvalue.h:35
Definition: cabstracthistogram.h:21
SimsignalType
Signal data types.
Definition: clistener.h:44
virtual ~cITimestampedValue()
Definition: ctimestampedvalue.h:39
virtual simtime_t_cref getTimestamp(simsignal_t signalID) const override
Definition: ctimestampedvalue.h:104
int simsignal_t
Signal handle.
Definition: clistener.h:24