INET Framework for OMNeT++/OMNEST
inet::PacketTransmitterBase Class Reference

#include <PacketTransmitterBase.h>

Inheritance diagram for inet::PacketTransmitterBase:
inet::ClockUserModuleMixin< OperationalMixin< PacketProcessorBase > > inet::queueing::IPassivePacketSink inet::OperationalMixin< PacketProcessorBase > inet::queueing::PacketProcessorBase inet::ILifecycle inet::queueing::IPacketProcessor inet::StringFormat::IDirectiveResolver inet::PacketTransmitter inet::StreamingTransmitterBase inet::StreamingTransmitter inet::StreamThroughTransmitter

Public Member Functions

virtual ~PacketTransmitterBase ()
 
virtual bool supportsPacketPushing (cGate *gate) const override
 Returns true if the processor supports pushing packets at the given gate. More...
 
virtual bool supportsPacketPulling (cGate *gate) const override
 Returns true if the processor supports pulling packets at the given gate. More...
 
virtual bool canPushSomePacket (cGate *gate) const override
 Returns false if the packet sink is full at the given gate and no more packets can be pushed into it without raising an error. More...
 
virtual bool canPushPacket (Packet *packet, cGate *gate) const override
 Returns true if the given packet can be pushed at the given gate into the packet sink without raising an error. More...
 
virtual void pushPacketStart (Packet *packet, cGate *gate, bps datarate) override
 Starts pushing the packet into the packet sink at the given gate. More...
 
virtual void pushPacketEnd (Packet *packet, cGate *gate) override
 Ends pushing the packet into the packet sink at the given gate. More...
 
virtual void pushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength=b(0)) override
 Progresses pushing the packet into the packet sink at the given gate. More...
 
- Public Member Functions inherited from inet::ClockUserModuleMixin< OperationalMixin< PacketProcessorBase > >
virtual void scheduleClockEventAt (clocktime_t time, ClockEvent *msg)
 
virtual void scheduleClockEventAfter (clocktime_t delay, ClockEvent *msg)
 
virtual cMessage * cancelClockEvent (ClockEvent *msg)
 
virtual void cancelAndDeleteClockEvent (ClockEvent *msg)
 
virtual void rescheduleClockEventAt (clocktime_t time, ClockEvent *msg)
 
virtual void rescheduleClockEventAfter (clocktime_t time, ClockEvent *msg)
 
virtual clocktime_t computeClockTimeFromSimTime (simtime_t time) const
 
virtual simtime_t computeSimTimeFromClockTime (clocktime_t time) const
 
virtual clocktime_t getClockTime () const
 
virtual clocktime_t getArrivalClockTime (ClockEvent *msg) const
 
- Public Member Functions inherited from inet::OperationalMixin< PacketProcessorBase >
virtual ~OperationalMixin ()
 }@ More...
 
- Public Member Functions inherited from inet::queueing::PacketProcessorBase
virtual bool supportsPacketSending (cGate *gate) const override
 Returns true if the processor supports sending packets at the given gate. More...
 
virtual bool supportsPacketPassing (cGate *gate) const override
 Returns true if the processor supports passing packets as a whole at the given gate. More...
 
virtual bool supportsPacketStreaming (cGate *gate) const override
 Returns true if the processor supports streaming packets at the given gate. More...
 
virtual const char * resolveDirective (char directive) const override
 
- Public Member Functions inherited from inet::queueing::IPacketProcessor
virtual ~IPacketProcessor ()
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 
- Public Member Functions inherited from inet::queueing::IPassivePacketSink
virtual ~IPassivePacketSink ()
 
virtual void pushPacket (Packet *packet, cGate *gate)=0
 Pushes the packet into the packet sink at the given gate. More...
 

Protected Member Functions

virtual void initialize (int stage) override
 
virtual void finish () override
 
virtual void handleMessageWhenUp (cMessage *message) override
 
virtual bool isInitializeStage (int stage) const override
 
virtual bool isModuleStartStage (int stage) const override
 
virtual bool isModuleStopStage (int stage) const override
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual SignalencodePacket (Packet *packet)
 
virtual void prepareSignal (Signal *signal)
 
virtual void sendSignalStart (Signal *signal, int transmissionId)
 
virtual void sendSignalProgress (Signal *signal, int transmissionId, b bitPosition, clocktime_t timePosition)
 
virtual void sendSignalEnd (Signal *signal, int transmissionId)
 
virtual clocktime_t calculateClockTimeDuration (const Packet *packet) const
 
virtual simtime_t calculateDuration (clocktime_t clockTimeDuration) const
 
virtual bool isTransmitting () const
 
- Protected Member Functions inherited from inet::OperationalMixin< PacketProcessorBase >
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void handleMessageWhenDown (cMessage *msg)
 
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 
virtual void handleStopOperation (LifecycleOperation *operation)=0
 
virtual void handleCrashOperation (LifecycleOperation *operation)=0
 
virtual State getInitialOperationalState () const
 Returns initial operational state: OPERATING or NOT_OPERATING. More...
 
virtual void handleActiveOperationTimeout (cMessage *message)
 
virtual bool isUp () const
 utility functions More...
 
virtual bool isDown () const
 
virtual void setOperationalState (State newState)
 
virtual void scheduleOperationTimeout (simtime_t timeout)
 
virtual void setupActiveOperation (LifecycleOperation *operation, IDoneCallback *doneCallback, State)
 
virtual void delayActiveOperationFinish (simtime_t timeout)
 
virtual void startActiveOperationExtraTime (simtime_t delay=SIMTIME_ZERO)
 
virtual void startActiveOperationExtraTimeOrFinish (simtime_t extraTime)
 
virtual void finishActiveOperation ()
 
- Protected Member Functions inherited from inet::queueing::PacketProcessorBase
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handlePacketProcessed (Packet *packet)
 
virtual void checkPacketOperationSupport (cGate *gate) const
 
virtual void checkPacketOperationSupport (cGate *startGate, cGate *endGate) const
 
virtual void animate (Packet *packet, cGate *gate, const SendOptions &sendOptions, Action action) const
 
virtual void animatePacket (Packet *packet, cGate *gate, Action action) const
 
virtual void animatePacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId, Action action) const
 
virtual void animatePacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions, Action action) const
 
virtual void animatePacketEnd (Packet *packet, cGate *gate, long transmissionId, Action action) const
 
virtual void animatePacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions, Action action) const
 
virtual void animatePacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId, Action action) const
 
virtual void animatePacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions, Action action) const
 
virtual void pushOrSendPacket (Packet *packet, cGate *gate, IPassivePacketSink *consumer)
 
virtual void pushOrSendPacketStart (Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, int transmissionId)
 
virtual void pushOrSendPacketEnd (Packet *packet, cGate *gate, IPassivePacketSink *consumer, int transmissionId)
 
virtual void pushOrSendPacketProgress (Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, b position, b extraProcessableLength, int transmissionId)
 
virtual void animatePush (Packet *packet, cGate *gate, const SendOptions &sendOptions) const
 
virtual void animatePushPacket (Packet *packet, cGate *gate) const
 
virtual void animatePushPacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId) const
 
virtual void animatePushPacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions) const
 
virtual void animatePushPacketEnd (Packet *packet, cGate *gate, long transmissionId) const
 
virtual void animatePushPacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions) const
 
virtual void animatePushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId) const
 
virtual void animatePushPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions) const
 
virtual void animatePull (Packet *packet, cGate *gate, const SendOptions &sendOptions) const
 
virtual void animatePullPacket (Packet *packet, cGate *gate) const
 
virtual void animatePullPacketStart (Packet *packet, cGate *gate, bps datarate, long transmissionId) const
 
virtual void animatePullPacketStart (Packet *packet, cGate *gate, bps datarate, const SendOptions &sendOptions) const
 
virtual void animatePullPacketEnd (Packet *packet, cGate *gate, long transmissionId) const
 
virtual void animatePullPacketEnd (Packet *packet, cGate *gate, const SendOptions &sendOptions) const
 
virtual void animatePullPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, long transmissionId) const
 
virtual void animatePullPacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength, const SendOptions &sendOptions) const
 
virtual void dropPacket (Packet *packet, PacketDropReason reason, int limit=-1)
 
virtual void updateDisplayString () const
 

Protected Attributes

cPar * dataratePar = nullptr
 
cGate * inputGate = nullptr
 
cGate * outputGate = nullptr
 
ModuleRef< IActivePacketSourceproducer
 
bps txDatarate = bps(NaN)
 
SignaltxSignal = nullptr
 
ClockEventtxEndTimer = nullptr
 
simtime_t txStartTime = -1
 
clocktime_t txStartClockTime = -1
 
clocktime_t txDurationClockTime = -1
 
- Protected Attributes inherited from inet::OperationalMixin< PacketProcessorBase >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 
- Protected Attributes inherited from inet::queueing::PacketProcessorBase
const char * displayStringTextFormat = nullptr
 
int numProcessedPackets = -1
 
b processedTotalLength = b(-1)
 

Additional Inherited Members

- Protected Types inherited from inet::OperationalMixin< PacketProcessorBase >
enum  State
 
- Protected Types inherited from inet::queueing::PacketProcessorBase
enum  Action { PUSH, PULL }
 

Constructor & Destructor Documentation

◆ ~PacketTransmitterBase()

inet::PacketTransmitterBase::~PacketTransmitterBase ( )
virtual
18 {
20  txEndTimer = nullptr;
21  delete txSignal;
22  txSignal = nullptr;
23 }

Member Function Documentation

◆ calculateClockTimeDuration()

clocktime_t inet::PacketTransmitterBase::calculateClockTimeDuration ( const Packet packet) const
protectedvirtual
115 {
116  s duration = packet->getTotalLength() / txDatarate;
117  EV_TRACE << "Calculating signal duration" << EV_FIELD(packet) << EV_FIELD(duration, simsec(duration)) << EV_ENDL;
118  return duration.get();
119 }

Referenced by encodePacket().

◆ calculateDuration()

simtime_t inet::PacketTransmitterBase::calculateDuration ( clocktime_t  clockTimeDuration) const
protectedvirtual
122 {
123  return computeSimTimeFromClockTime(txStartClockTime + clockTimeDuration) - txStartTime;
124 }

Referenced by encodePacket().

◆ canPushPacket()

virtual bool inet::PacketTransmitterBase::canPushPacket ( Packet packet,
cGate *  gate 
) const
inlineoverridevirtual

Returns true if the given packet can be pushed at the given gate into the packet sink without raising an error.

The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing packets.

Implements inet::queueing::IPassivePacketSink.

70 { return canPushSomePacket(gate); }

◆ canPushSomePacket()

virtual bool inet::PacketTransmitterBase::canPushSomePacket ( cGate *  gate) const
inlineoverridevirtual

Returns false if the packet sink is full at the given gate and no more packets can be pushed into it without raising an error.

The gate must be a valid gate of this module and it must support pushing packets.

Implements inet::queueing::IPassivePacketSink.

Reimplemented in inet::StreamingTransmitterBase.

69 { return !txEndTimer->isScheduled(); } // TODO: add hasCarrier

Referenced by inet::StreamingTransmitterBase::canPushSomePacket().

◆ encodePacket()

Signal * inet::PacketTransmitterBase::encodePacket ( Packet packet)
protectedvirtual
62 {
64  // TODO: this is just a weak approximation which ignores the past and future drift and drift rate changes of the clock
65  simtime_t packetTransmissionTime = CLOCKTIME_AS_SIMTIME(txDurationClockTime);
66  simtime_t bitTransmissionTime = packet->getBitLength() != 0 ? CLOCKTIME_AS_SIMTIME(txDurationClockTime / packet->getBitLength()) : 0;
67  auto packetEvent = new PacketTransmittedEvent();
68  packetEvent->setDatarate(packet->getTotalLength() / s(txDurationClockTime.dbl()));
69  insertPacketEvent(this, packet, PEK_TRANSMITTED, bitTransmissionTime, packetEvent);
70  increaseTimeTag<TransmissionTimeTag>(packet, bitTransmissionTime, packetTransmissionTime);
71  if (auto channel = dynamic_cast<cDatarateChannel *>(outputGate->findTransmissionChannel())) {
72  insertPacketEvent(this, packet, PEK_PROPAGATED, channel->getDelay());
73  increaseTimeTag<PropagationTimeTag>(packet, channel->getDelay(), channel->getDelay());
74  }
75  auto signal = new Signal(packet->getName());
76  signal->encapsulate(packet);
77  signal->setDuration(calculateDuration(txDurationClockTime));
78  return signal;
79 }

Referenced by inet::StreamingTransmitter::abortTx(), inet::StreamThroughTransmitter::abortTx(), inet::StreamThroughTransmitter::progressTx(), inet::StreamingTransmitter::startTx(), inet::PacketTransmitter::startTx(), and inet::StreamThroughTransmitter::startTx().

◆ finish()

void inet::PacketTransmitterBase::finish ( )
overrideprotectedvirtual
44 {
45  if (auto channel = dynamic_cast<cDatarateChannel *>(outputGate->findTransmissionChannel()))
46  recordScalar("propagationTime", channel->getDelay());
47 }

◆ handleMessageWhenUp()

void inet::PacketTransmitterBase::handleMessageWhenUp ( cMessage *  message)
overrideprotectedvirtual

◆ handleStartOperation()

void inet::PacketTransmitterBase::handleStartOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< PacketProcessorBase >.

56 {
57  if (producer != nullptr)
58  producer->handleCanPushPacketChanged(inputGate->getPathStartGate());
59 }

◆ initialize()

void inet::PacketTransmitterBase::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::OperationalMixin< PacketProcessorBase >.

Reimplemented in inet::StreamThroughTransmitter, and inet::StreamingTransmitterBase.

26 {
27  ClockUserModuleMixin::initialize(stage);
28  if (stage == INITSTAGE_LOCAL) {
29  dataratePar = &par("datarate");
31  inputGate = gate("in");
32  outputGate = gate("out");
33  producer.reference(inputGate, false);
34  txEndTimer = new ClockEvent("TxEndTimer");
35  }
36  else if (stage == INITSTAGE_QUEUEING) {
38  if (producer != nullptr)
39  producer->handleCanPushPacketChanged(inputGate->getPathStartGate());
40  }
41 }

Referenced by inet::StreamingTransmitterBase::initialize().

◆ isInitializeStage()

virtual bool inet::PacketTransmitterBase::isInitializeStage ( int  stage) const
inlineoverrideprotectedvirtual

◆ isModuleStartStage()

virtual bool inet::PacketTransmitterBase::isModuleStartStage ( int  stage) const
inlineoverrideprotectedvirtual

◆ isModuleStopStage()

virtual bool inet::PacketTransmitterBase::isModuleStopStage ( int  stage) const
inlineoverrideprotectedvirtual

◆ isTransmitting()

◆ prepareSignal()

void inet::PacketTransmitterBase::prepareSignal ( Signal signal)
protectedvirtual
82 {
83  auto packet = check_and_cast<Packet *>(signal->getEncapsulatedPacket());
84  auto oldPacketProtocolTag = packet->removeTagIfPresent<PacketProtocolTag>();
85  packet->clearTags();
86  if (oldPacketProtocolTag != nullptr) {
87  auto newPacketProtocolTag = packet->addTag<PacketProtocolTag>();
88  *newPacketProtocolTag = *oldPacketProtocolTag;
89  }
90 }

Referenced by sendSignalEnd(), sendSignalProgress(), sendSignalStart(), and inet::PacketTransmitter::startTx().

◆ pushPacketEnd()

virtual void inet::PacketTransmitterBase::pushPacketEnd ( Packet packet,
cGate *  gate 
)
inlineoverridevirtual

Ends pushing the packet into the packet sink at the given gate.

This is a packet streaming operation. The onwership of the packet is transferred to the sink.

Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.

This method is called, for example, when a preemption supporting server module ends streaming a packet to the sink.

The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.

Implements inet::queueing::IPassivePacketSink.

Reimplemented in inet::StreamThroughTransmitter.

73 { throw cRuntimeError("Invalid operation"); }

◆ pushPacketProgress()

virtual void inet::PacketTransmitterBase::pushPacketProgress ( Packet packet,
cGate *  gate,
bps  datarate,
b  position,
b  extraProcessableLength = b(0) 
)
inlineoverridevirtual

Progresses pushing the packet into the packet sink at the given gate.

This is a packet streaming operation. The position specifies where the packet streaming is at the moment. The extra length parameter partially fixes the future of the packet streaming operation. The onwership of the packet is transferred to the sink.

Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.

This method is called, for example, to notify the sink about a change in the packet data when a preemption occurs.

The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.

Implements inet::queueing::IPassivePacketSink.

Reimplemented in inet::StreamThroughTransmitter, and inet::PacketTransmitter.

74 { throw cRuntimeError("Invalid operation"); }

◆ pushPacketStart()

virtual void inet::PacketTransmitterBase::pushPacketStart ( Packet packet,
cGate *  gate,
bps  datarate 
)
inlineoverridevirtual

Starts pushing the packet into the packet sink at the given gate.

This is a packet streaming operation. The onwership of the packet is transferred to the sink.

Packet streaming can be started with any of the streaming operations, and ends when the streaming position plus the extra processable packet length equals to the total packet length.

This method is called, for example, when a preemption supporting server module starts streaming a packet to the sink.

The sink must not be full at the gate and no other packet streaming can be in progress. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and streaming packets.

Implements inet::queueing::IPassivePacketSink.

Reimplemented in inet::StreamThroughTransmitter.

72 { throw cRuntimeError("Invalid operation"); }

◆ sendSignalEnd()

void inet::PacketTransmitterBase::sendSignalEnd ( Signal signal,
int  transmissionId 
)
protectedvirtual
108 {
109  EV_INFO << "Transmitting signal end to channel" << EV_FIELD(signal) << EV_FIELD(transmissionId) << EV_ENDL;
110  prepareSignal(signal);
111  send(signal, SendOptions().duration(signal->getDuration()).finishTx(transmissionId), outputGate);
112 }

Referenced by inet::StreamingTransmitter::abortTx(), inet::StreamThroughTransmitter::abortTx(), inet::StreamingTransmitter::endTx(), and inet::StreamThroughTransmitter::endTx().

◆ sendSignalProgress()

void inet::PacketTransmitterBase::sendSignalProgress ( Signal signal,
int  transmissionId,
b  bitPosition,
clocktime_t  timePosition 
)
protectedvirtual
100 {
101  simtime_t remainingDuration = signal->getDuration() - CLOCKTIME_AS_SIMTIME(timePosition);
102  EV_INFO << "Transmitting signal progress to channel" << EV_FIELD(signal) << EV_FIELD(transmissionId) << EV_FIELD(remainingDuration, simsec(remainingDuration)) << EV_ENDL;
103  prepareSignal(signal);
104  send(signal, SendOptions().duration(signal->getDuration()).updateTx(transmissionId, remainingDuration), outputGate);
105 }

Referenced by inet::StreamThroughTransmitter::progressTx(), and inet::StreamingTransmitterBase::scheduleAt().

◆ sendSignalStart()

void inet::PacketTransmitterBase::sendSignalStart ( Signal signal,
int  transmissionId 
)
protectedvirtual
93 {
94  EV_INFO << "Transmitting signal start to channel" << EV_FIELD(signal) << EV_ENDL;
95  prepareSignal(signal);
96  send(signal, SendOptions().duration(signal->getDuration()).transmissionId(transmissionId), outputGate);
97 }

Referenced by inet::StreamingTransmitter::startTx(), and inet::StreamThroughTransmitter::startTx().

◆ supportsPacketPulling()

virtual bool inet::PacketTransmitterBase::supportsPacketPulling ( cGate *  gate) const
inlineoverridevirtual

Returns true if the processor supports pulling packets at the given gate.

Pulling a packet is a synchronous operation that is initiated by the sink module. A pulled packet can be passed as a whole using pullPacket(), or it can be streamed from the source to the sink using pullPacketStart(), pullPacketEnd(), and pullPacketProgress().

For output gates, true means that the connected module can pull packets from this module. For input gates, true means that this module can pull packets from the connected module. For example, a packet server module can pull packets from a queue module.

Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(pull) in the NED file.

Implements inet::queueing::IPacketProcessor.

67 { return false; }

◆ supportsPacketPushing()

virtual bool inet::PacketTransmitterBase::supportsPacketPushing ( cGate *  gate) const
inlineoverridevirtual

Returns true if the processor supports pushing packets at the given gate.

Pushing a packet is a synchronous operation that is initiated by the source module. A pushed packet can be passed as a whole using pushPacket(), or it can be streamed from the source to the sink using pushPacketStart(), pushPacketEnd(), and pushPacketProgress().

For output gates, true means that this module can push packets into the connected module. For input gates, true means that the connected module can push packets into this module. For example, a packet generator module can push packets into a queue module.

Connecting incompatible gates raises an error during initialize. The gate parameter must be a valid gate of this module. The gate should be marked with @labels(push) in the NED file.

Implements inet::queueing::IPacketProcessor.

66 { return inputGate == gate; }

Member Data Documentation

◆ dataratePar

cPar* inet::PacketTransmitterBase::dataratePar = nullptr
protected

◆ inputGate

◆ outputGate

◆ producer

◆ txDatarate

◆ txDurationClockTime

clocktime_t inet::PacketTransmitterBase::txDurationClockTime = -1
protected

◆ txEndTimer

◆ txSignal

◆ txStartClockTime

◆ txStartTime


The documentation for this class was generated from the following files:
inet::ClockUserModuleMixin< OperationalMixin< PacketProcessorBase > >::computeSimTimeFromClockTime
virtual simtime_t computeSimTimeFromClockTime(clocktime_t time) const
Definition: ClockUserModuleMixin.h:71
inet::units::values::simsec
value< simtime_t, units::s > simsec
Definition: Units.h:1236
inet::PEK_TRANSMITTED
@ PEK_TRANSMITTED
Definition: PacketEventTag_m.h:68
inet::PacketTransmitterBase::inputGate
cGate * inputGate
Definition: PacketTransmitterBase.h:30
inet::PacketTransmitterBase::txStartClockTime
clocktime_t txStartClockTime
Definition: PacketTransmitterBase.h:39
CLOCKTIME_AS_SIMTIME
#define CLOCKTIME_AS_SIMTIME(x)
Definition: contract/ClockTime.h:19
inet::units::units::bps
compose< b, pow< s, -1 > > bps
Definition: Units.h:1169
inet::PacketTransmitterBase::dataratePar
cPar * dataratePar
Definition: PacketTransmitterBase.h:28
inet::INITSTAGE_QUEUEING
INET_API InitStage INITSTAGE_QUEUEING
Initialization of queueing modules.
inet::queueing::IPassivePacketSink::pushPacket
virtual void pushPacket(Packet *packet, cGate *gate)=0
Pushes the packet into the packet sink at the given gate.
inet::PacketTransmitterBase::txSignal
Signal * txSignal
Definition: PacketTransmitterBase.h:35
inet::PacketTransmitterBase::canPushSomePacket
virtual bool canPushSomePacket(cGate *gate) const override
Returns false if the packet sink is full at the given gate and no more packets can be pushed into it ...
Definition: PacketTransmitterBase.h:69
inet::PacketTransmitterBase::txDurationClockTime
clocktime_t txDurationClockTime
Definition: PacketTransmitterBase.h:40
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::ClockEvent
cMessage ClockEvent
Definition: contract/ClockEvent.h:18
inet::PacketTransmitterBase::calculateClockTimeDuration
virtual clocktime_t calculateClockTimeDuration(const Packet *packet) const
Definition: PacketTransmitterBase.cc:114
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::PEK_PROPAGATED
@ PEK_PROPAGATED
Definition: PacketEventTag_m.h:69
inet::PacketTransmitterBase::outputGate
cGate * outputGate
Definition: PacketTransmitterBase.h:31
EV_FIELD
#define EV_FIELD(...)
Definition: INETDefs.h:112
inet::PacketTransmitterBase::prepareSignal
virtual void prepareSignal(Signal *signal)
Definition: PacketTransmitterBase.cc:81
inet::ModuleStopOperation::STAGE_LINK_LAYER
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:54
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::ClockUserModuleMixin< OperationalMixin< PacketProcessorBase > >::cancelAndDeleteClockEvent
virtual void cancelAndDeleteClockEvent(ClockEvent *msg)
Definition: ClockUserModuleMixin.h:67
inet::ClockTime::dbl
double dbl() const
Converts simulation time (in seconds) to a double.
Definition: common/ClockTime.h:205
inet::queueing::PacketProcessorBase::checkPacketOperationSupport
virtual void checkPacketOperationSupport(cGate *gate) const
Definition: PacketProcessorBase.cc:40
inet::PacketTransmitterBase::txDatarate
bps txDatarate
Definition: PacketTransmitterBase.h:34
inet::PacketTransmitterBase::txEndTimer
ClockEvent * txEndTimer
Definition: PacketTransmitterBase.h:36
inet::PacketTransmitterBase::calculateDuration
virtual simtime_t calculateDuration(clocktime_t clockTimeDuration) const
Definition: PacketTransmitterBase.cc:121
inet::PacketTransmitterBase::txStartTime
simtime_t txStartTime
Definition: PacketTransmitterBase.h:38
inet::ModuleStartOperation::STAGE_LINK_LAYER
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:28
inet::PacketTransmitterBase::producer
ModuleRef< IActivePacketSource > producer
Definition: PacketTransmitterBase.h:32
EV_ENDL
#define EV_ENDL
Definition: INETDefs.h:114
inet::insertPacketEvent
void insertPacketEvent(const cModule *module, Packet *packet, int kind, simtime_t duration, PacketEvent *packetEvent)
Definition: PacketEventTag.cc:12
inet::INITSTAGE_LINK_LAYER
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.