|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
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;
52 virtual double doubleValue(
simsignal_t signalID)
const = 0;
54 virtual const char *stringValue(
simsignal_t signalID)
const = 0;
57 [[deprecated]]
uintval_t unsignedLongValue(
simsignal_t signalID)
const {
return uintValue(signalID);}
96 void set(
simtime_t timestamp,
bool b) {this->timestamp=timestamp; type=SIMSIGNAL_BOOL; this->b=b;}
97 void set(
simtime_t timestamp,
intval_t l) {this->timestamp=timestamp; type=SIMSIGNAL_INT; this->l=l;}
98 void set(
simtime_t timestamp,
uintval_t ul) {this->timestamp=timestamp; type=SIMSIGNAL_UINT; this->ul=ul;}
99 void set(
simtime_t timestamp,
double d) {this->timestamp=timestamp; type=SIMSIGNAL_DOUBLE; this->d=d;}
100 void set(
simtime_t timestamp,
const SimTime& t) {this->timestamp=timestamp; type=SIMSIGNAL_SIMTIME; this->t=t;}
101 void set(
simtime_t timestamp,
const char *s) {this->timestamp=timestamp; type=SIMSIGNAL_STRING; this->s=s;}
102 void set(
simtime_t timestamp,
cObject *obj) {this->timestamp=timestamp; type=SIMSIGNAL_OBJECT; this->obj=obj;}
113 virtual bool boolValue(
simsignal_t signalID)
const override {
return b;}
116 virtual double doubleValue(
simsignal_t signalID)
const override {
return d;}
117 virtual SimTime simtimeValue(
simsignal_t signalID)
const override {
return t;}
118 virtual const char *stringValue(
simsignal_t signalID)
const override {
return s;}
119 virtual cObject *objectValue(
simsignal_t signalID)
const override {
return obj;}
const typedef simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition: simtime_t.h:48
int simsignal_t
Signal handle.
Definition: clistener.h:27
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
virtual SimsignalType getValueType(simsignal_t signalID) const override
Definition: ctimestampedvalue.h:109
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
uint64_t uintval_t
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the libr...
Definition: simkerneldefs.h:109
virtual simtime_t_cref getTimestamp(simsignal_t signalID) const override
Definition: ctimestampedvalue.h:106
Interface for emitting timestamped values as signals, primarily for result recording.
Definition: ctimestampedvalue.h:35
SimsignalType
Signal data types.
Definition: clistener.h:47
int64_t intval_t
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the librar...
Definition: simkerneldefs.h:101
A straightforward implementation of cITimestampedValue.
Definition: ctimestampedvalue.h:66
virtual ~cITimestampedValue()
Definition: ctimestampedvalue.h:39