OMNeT++ Simulation Library
6.0.3
|
16 #ifndef __OMNETPP_CCHANNEL_H
17 #define __OMNETPP_CCHANNEL_H
19 #include "ccomponent.h"
20 #include "ccomponenttype.h"
22 #include "ctimestampedvalue.h"
50 cGate *srcGate =
nullptr;
51 int nedConnectionElementId = -1;
55 void setSourceGate(
cGate *g) {srcGate=g;}
58 void setNedConnectionElementId(
int id) {nedConnectionElementId = id;}
59 int getNedConnectionElementId() {
return nedConnectionElementId;}
63 virtual bool initializeChannel(
int stage);
66 virtual void finalizeParameters()
override;
69 virtual void callRefreshDisplay()
override;
72 virtual void callPreDelete(
cComponent *root)
override;
75 virtual cModule *doFindModuleByPath(
const char *s)
const override;
115 virtual bool boolValue(
simsignal_t signalID)
const override {error();
return false;}
118 virtual double doubleValue(
simsignal_t signalID)
const override {error();
return 0;}
119 virtual SimTime simtimeValue(
simsignal_t signalID)
const override {error();
return timestamp;}
120 virtual const char *stringValue(
simsignal_t signalID)
const override {error();
return nullptr;}
130 explicit cChannel(
const char *name=
nullptr);
145 virtual std::string str()
const override;
158 virtual void callInitialize()
override;
164 virtual bool callInitialize(
int stage)
override;
169 virtual void callFinish()
override;
186 virtual cModule *getParentModule()
const override;
197 virtual cProperties *getProperties()
const override;
210 virtual bool isTransmissionChannel()
const = 0;
251 virtual double getNominalDatarate()
const = 0;
285 virtual simtime_t getTransmissionFinishTime()
const = 0;
294 virtual bool isBusy()
const;
378 virtual bool isBusy()
const override {
return false;}
const typedef simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition: simtime_t.h:48
This class represents modules in the simulation.
Definition: cmodule.h:48
Allows returning multiple values from the processMessage() method.
Definition: cchannel.h:33
int simsignal_t
Signal handle.
Definition: clistener.h:27
cChannelType * getChannelType() const
Definition: cchannel.h:191
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
cIdealChannel(const char *name=nullptr)
Definition: cchannel.h:334
virtual cGate * getSourceGate() const
Definition: cchannel.h:202
virtual bool isBusy() const override
Definition: cchannel.h:378
Base class for channels.
Definition: cchannel.h:46
virtual bool isDisabled() const
Definition: cchannel.h:313
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 ~cIdealChannel()
Definition: cchannel.h:339
Options for the cSimpleModule::send() and cSimpleModule::sendDirect() calls.
Definition: csimplemodule.h:82
virtual simtime_t_cref getTimestamp(simsignal_t signalID) const override
Definition: cchannel.h:98
virtual bool isTransmissionChannel() const override
Definition: cchannel.h:363
Represents a module gate.
Definition: cgate.h:62
A collection of properties (cProperty).
Definition: cproperties.h:34
virtual simtime_t calculateDuration(cMessage *msg) const override
Definition: cchannel.h:368
Interface for emitting timestamped values as signals, primarily for result recording.
Definition: ctimestampedvalue.h:35
cMessage * getMessage() const
Definition: cchannel.h:108
Result * getChannelResult() const
Definition: cchannel.h:111
virtual SimsignalType getValueType(simsignal_t signalID) const override
Definition: cchannel.h:101
SimsignalType
Signal data types.
Definition: clistener.h:47
#define SIMTIME_ZERO
Zero simulation time.
Definition: simtime_t.h:70
Abstract base class for creating a channel of a given type.
Definition: ccomponenttype.h:326
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
Channel with zero propagation delay, zero transmission delay (infinite datarate), and always enabled.
Definition: cchannel.h:324
virtual Result processMessage(cMessage *msg, const SendOptions &options, simtime_t t) override
Definition: cchannel.h:353
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
Common base for module and channel classes.
Definition: ccomponent.h:49
virtual simtime_t getTransmissionFinishTime() const override
Definition: cchannel.h:373
MessageSentSignalValue(simtime_t_cref t, cMessage *m, Result *r)
Definition: cchannel.h:93
virtual ComponentKind getComponentKind() const override
Definition: cchannel.h:177
virtual cObject * objectValue(simsignal_t signalID) const override
Definition: cchannel.h:104
virtual double getNominalDatarate() const override
Definition: cchannel.h:358
virtual void forceTransmissionFinishTime(simtime_t t)
Definition: cchannel.h:307
Signal value that accompanies the "messageSent" signal.
Definition: cchannel.h:83