16 #ifndef __OMNETPP_CDATARATECHANNEL_H 17 #define __OMNETPP_CDATARATECHANNEL_H 20 #include "csimulation.h" 39 FL_ISDISABLED = 1 << 10,
40 FL_DELAY_NONZERO = 1 << 11,
41 FL_DATARATE_NONZERO = 1 << 12,
42 FL_BER_NONZERO = 1 << 13,
43 FL_PER_NONZERO = 1 << 14,
57 void checkState()
const {
if (!parametersFinalized())
throw cRuntimeError(
this, E_PARAMSNOTREADY);}
64 virtual void handleParameterChange(
const char *parname)
override;
67 virtual void finish()
override;
98 virtual std::string str()
const override;
111 virtual void setDelay(
double d);
118 virtual void setDatarate(
double d);
125 virtual void setBitErrorRate(
double d);
132 virtual void setPacketErrorRate(
double d);
137 virtual void setDisabled(
bool d);
151 virtual double getDatarate()
const {checkState();
return datarate;}
174 virtual bool isDisabled()
const {checkState();
return flags & FL_ISDISABLED;}
215 virtual void forceTransmissionFinishTime(
simtime_t t)
override;
223 virtual void initialize()
override;
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
Thrown when the simulation kernel or other components detect a runtime error.
Definition: cexception.h:283
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual double getDatarate() const
Definition: cdataratechannel.h:151
Allows returning multiple values from the processMessage() method.
Definition: cchannel.h:64
virtual double getBitErrorRate() const
Definition: cdataratechannel.h:159
simtime_t simTime()
Returns the current simulation time.
Definition: csimulation.h:568
virtual bool isBusy() const override
Definition: cdataratechannel.h:207
virtual double getNominalDatarate() const override
Definition: cdataratechannel.h:182
virtual simtime_t getDelay() const
Definition: cdataratechannel.h:143
Definition: cabstracthistogram.h:21
virtual simtime_t getTransmissionFinishTime() const override
Definition: cdataratechannel.h:201
virtual bool isTransmissionChannel() const override
Definition: cdataratechannel.h:106
int simsignal_t
Signal handle.
Definition: clistener.h:24
Base class for channels.
Definition: cchannel.h:34
virtual double getPacketErrorRate() const
Definition: cdataratechannel.h:167
Channel that models delay, bit error rate and data rate.
Definition: cdataratechannel.h:30
virtual bool isDisabled() const
Definition: cdataratechannel.h:174