|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CDATARATECHANNEL_H
17 #define __OMNETPP_CDATARATECHANNEL_H
20 #include "csimulation.h"
103 FL_ISDISABLED = 1 << 10,
104 FL_DELAY_NONZERO = 1 << 11,
105 FL_DATARATE_PRESENT = 1 << 12,
106 FL_BER_NONZERO = 1 << 13,
107 FL_PER_NONZERO = 1 << 14,
122 txid_t transmissionId = -1;
125 std::vector<Tx> txList;
130 void checkState()
const {
if (!parametersFinalized())
throw cRuntimeError(
this, E_PARAMSNOTREADY);}
137 virtual void handleParameterChange(
const char *parname)
override;
140 virtual void processPacket(cPacket *pkt,
const SendOptions& options,
simtime_t t, Result& inoutResult);
143 virtual void finish()
override;
154 explicit cDatarateChannel(
const char *name=
nullptr);
174 virtual std::string str()
const override;
188 virtual void setMode(Mode mode);
193 virtual void setDelay(
double d);
200 virtual void setDatarate(
double d);
207 virtual void setBitErrorRate(
double d);
214 virtual void setPacketErrorRate(
double d);
219 virtual void setDisabled(
bool d);
238 virtual double getDatarate()
const {checkState();
return datarate;}
261 virtual bool isDisabled()
const override {checkState();
return flags & FL_ISDISABLED;}
287 virtual simtime_t getTransmissionFinishTime()
const override;
295 virtual bool isBusy()
const override;
308 [[deprecated]]
virtual void forceTransmissionFinishTime(
simtime_t t)
override;
316 virtual void initialize()
override;
int simsignal_t
Signal handle.
Definition: clistener.h:27
virtual double getPacketErrorRate() const
Definition: cdataratechannel.h:254
virtual ~cDatarateChannel()
Definition: cdataratechannel.h:159
A transmission channel model that supports propagation delay, transmission duration computed from a d...
Definition: cdataratechannel.h:69
virtual bool isDisabled() const override
Definition: cdataratechannel.h:261
virtual double getNominalDatarate() const override
Definition: cdataratechannel.h:269
Base class for channels.
Definition: cchannel.h:46
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
Options for the cSimpleModule::send() and cSimpleModule::sendDirect() calls.
Definition: csimplemodule.h:82
virtual double getBitErrorRate() const
Definition: cdataratechannel.h:246
virtual simtime_t getDelay() const
Definition: cdataratechannel.h:230
@ MULTI
Definition: cdataratechannel.h:89
SimTime simtime_t
Represents simulation time.
Definition: simtime_t.h:40
virtual bool isTransmissionChannel() const override
Definition: cdataratechannel.h:182
int64_t txid_t
Transmission ID. See SendOptions::transmissionId(), cMessage::getTransmissionId().
Definition: simkerneldefs.h:92
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
virtual double getDatarate() const
Definition: cdataratechannel.h:238
virtual Mode getMode() const
Definition: cdataratechannel.h:224
Mode
Definition: cdataratechannel.h:80
@ SINGLE
Definition: cdataratechannel.h:84