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

#include <InterpacketGapInserter.h>

Inheritance diagram for inet::InterpacketGapInserter:
inet::ClockUserModuleMixin< PacketPusherBase > inet::queueing::PacketPusherBase inet::queueing::PacketProcessorBase inet::queueing::IPacketPusher inet::queueing::IPacketProcessor inet::StringFormat::IDirectiveResolver inet::queueing::IPassivePacketSink inet::queueing::IActivePacketSource

Public Member Functions

virtual ~InterpacketGapInserter ()
 
virtual IPassivePacketSinkgetConsumer (cGate *gate) override
 Returns the passive packet sink where packets are pushed or nullptr if the connected module doesn't implement the interface. More...
 
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 pushPacket (Packet *packet, cGate *gate) override
 Pushes the packet into the packet sink at the given gate. 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...
 
virtual void handleCanPushPacketChanged (cGate *gate) override
 Notifies about a change in the possibility of pushing some packet into the passive packet sink at the given gate. More...
 
virtual void handlePushPacketProcessed (Packet *packet, cGate *gate, bool successful) override
 Notifies about the completion of the packet processing for a packet that was pushed earlier independently whether the packet is passed or streamed. More...
 
- Public Member Functions inherited from inet::ClockUserModuleMixin< PacketPusherBase >
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::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...
 
- Public Member Functions inherited from inet::queueing::IPacketProcessor
virtual ~IPacketProcessor ()
 
- Public Member Functions inherited from inet::queueing::IPassivePacketSink
virtual ~IPassivePacketSink ()
 
- Public Member Functions inherited from inet::queueing::IActivePacketSource
virtual ~IActivePacketSource ()
 

Protected Member Functions

virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *message) override
 
virtual void receivePacketStart (cPacket *packet, cGate *gate, double datarate)
 
virtual void receivePacketProgress (cPacket *packet, cGate *gate, double datarate, int bitPosition, simtime_t timePosition, int extraProcessableBitLength, simtime_t extraProcessableDuration)
 
virtual void receivePacketEnd (cPacket *packet, cGate *gate, double datarate)
 
virtual void pushOrSendOrSchedulePacketProgress (Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength=b(0))
 
virtual const char * resolveDirective (char directive) const override
 
- 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 * durationPar = nullptr
 
ClockEventtimer = nullptr
 
ClockEventprogress = nullptr
 
clocktime_t packetDelay
 
clocktime_t packetStartTime
 
clocktime_t packetEndTime
 
bps streamDatarate = bps(NaN)
 
- Protected Attributes inherited from inet::queueing::PacketPusherBase
cGate * inputGate = nullptr
 
IActivePacketSourceproducer = nullptr
 
cGate * outputGate = nullptr
 
IPassivePacketSinkconsumer = nullptr
 
- 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::queueing::PacketProcessorBase
enum  Action { PUSH, PULL }
 

Constructor & Destructor Documentation

◆ ~InterpacketGapInserter()

inet::InterpacketGapInserter::~InterpacketGapInserter ( )
virtual
20 {
21  cancelAndDelete(timer);
23 }

Member Function Documentation

◆ canPushPacket()

bool inet::InterpacketGapInserter::canPushPacket ( Packet packet,
cGate *  gate 
) const
overridevirtual

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.

Reimplemented from inet::queueing::PacketPusherBase.

115 {
116  // TODO getting a value from the durationPar here is wrong, because it's volatile and this method can be called any number of times
117  return (getClockTime() >= packetEndTime + durationPar->doubleValue()) &&
118  (consumer == nullptr || consumer->canPushPacket(packet, outputGate->getPathEndGate()));
119 }

◆ canPushSomePacket()

bool inet::InterpacketGapInserter::canPushSomePacket ( cGate *  gate) const
overridevirtual

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.

Reimplemented from inet::queueing::PacketPusherBase.

108 {
109  // TODO getting a value from the durationPar here is wrong, because it's volatile and this method can be called any number of times
110  return (getClockTime() >= packetEndTime + durationPar->doubleValue()) &&
111  (consumer == nullptr || consumer->canPushSomePacket(outputGate->getPathEndGate()));
112 }

Referenced by handleMessage().

◆ getConsumer()

virtual IPassivePacketSink* inet::InterpacketGapInserter::getConsumer ( cGate *  gate)
inlineoverridevirtual

Returns the passive packet sink where packets are pushed or nullptr if the connected module doesn't implement the interface.

The gate parameter must be a valid gate of this module.

Reimplemented from inet::queueing::PacketPusherBase.

46 { return consumer; }

◆ handleCanPushPacketChanged()

void inet::InterpacketGapInserter::handleCanPushPacketChanged ( cGate *  gate)
overridevirtual

Notifies about a change in the possibility of pushing some packet into the passive packet sink at the given gate.

This method is called, for example, when a new packet can be inserted into a queue. It allows the source to push a new packet into the queue.

The gate parameter must be a valid gate of this module.

Reimplemented from inet::queueing::PacketPusherBase.

144 {
145  Enter_Method("handleCanPushPacketChanged");
146  if (packetEndTime + durationPar->doubleValue() <= getClockTime()) {
147  if (producer != nullptr)
148  producer->handleCanPushPacketChanged(inputGate->getPathStartGate());
149  }
150  else {
151  double interpacketGapDuration = durationPar->doubleValue();
152  rescheduleClockEventAt(packetEndTime + interpacketGapDuration, timer);
153  emit(interpacketGapStartedSignal, interpacketGapDuration);
154  }
155 }

◆ handleMessage()

void inet::InterpacketGapInserter::handleMessage ( cMessage *  message)
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketPusherBase.

49 {
50  if (message->isSelfMessage()) {
51  if (message == timer) {
54  if (producer != nullptr)
55  producer->handleCanPushPacketChanged(inputGate->getPathStartGate());
56  }
57  else if (message == progress) {
58  auto packet = static_cast<Packet *>(message->getContextPointer());
59  if (packet->isUpdate()) {
60  auto progressTag = packet->getTag<ProgressTag>();
61  pushOrSendPacketProgress(packet, outputGate, consumer, progressTag->getDatarate(), progressTag->getPosition(), progressTag->getExtraProcessableLength(), packet->getTransmissionId());
62  }
63  else
65  handlePacketProcessed(packet);
66  }
67  else
68  throw cRuntimeError("Unknown message");
69  }
70  else {
71  // if an asynchronous message is received from the input gate
72  // then it's processed as if it were pushed as synchronous message
73  if (message->isPacket()) {
74  auto packet = check_and_cast<Packet *>(message);
75  if (packet->isUpdate()) {
76  auto progressTag = packet->getTag<ProgressTag>();
77  pushOrSendPacketProgress(packet, outputGate, consumer, progressTag->getDatarate(), progressTag->getPosition(), progressTag->getExtraProcessableLength(), packet->getTransmissionId());
78  }
79  else
80  pushPacket(packet, packet->getArrivalGate());
81  handlePacketProcessed(packet);
82  }
83  else
84  throw cRuntimeError("Unknown message");
85  }
87 }

◆ handlePushPacketProcessed()

void inet::InterpacketGapInserter::handlePushPacketProcessed ( Packet packet,
cGate *  gate,
bool  successful 
)
overridevirtual

Notifies about the completion of the packet processing for a packet that was pushed earlier independently whether the packet is passed or streamed.

This method is called, for example, when a previously pushed packet is failed to be processed successfully. It allows the source to retry the operation.

The gate parameter must be a valid gate of this module. The packet must not be nullptr.

Reimplemented from inet::queueing::PacketPusherBase.

185 {
187  if (producer != nullptr)
188  producer->handlePushPacketProcessed(packet, inputGate->getPathStartGate(), successful);
189 }

◆ initialize()

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

Reimplemented from inet::queueing::PacketPusherBase.

26 {
27  ClockUserModuleMixin::initialize(stage);
28  if (stage == INITSTAGE_LOCAL) {
29  durationPar = &par("duration");
30  timer = new ClockEvent("IfgTimer");
31  progress = new ClockEvent("ProgressTimer");
32  WATCH(packetStartTime);
33  WATCH(packetEndTime);
34  }
35  // KLUDGE: this runs after the clock stage, the clocks must be initialized
36  else if (stage == INITSTAGE_CLOCK + 1) {
37  packetEndTime = par("initialChannelBusy") ? getClockTime() : getClockTime().setRaw(INT64_MIN / 2); // INT64_MIN / 2 to prevent overflow
38  }
39  else if (stage == INITSTAGE_LAST) {
40  if (packetEndTime + durationPar->doubleValue() > getClockTime()) {
41  double interpacketGapDuration = durationPar->doubleValue();
42  scheduleClockEventAt(packetEndTime + interpacketGapDuration, timer);
43  emit(interpacketGapStartedSignal, interpacketGapDuration);
44  }
45  }
46 }

◆ pushOrSendOrSchedulePacketProgress()

void inet::InterpacketGapInserter::pushOrSendOrSchedulePacketProgress ( Packet packet,
cGate *  gate,
bps  datarate,
b  position,
b  extraProcessableLength = b(0) 
)
protectedvirtual
192 {
193  auto now = getClockTime();
194  if (now >= packetEndTime) {
195  packetDelay = packetEndTime + durationPar->doubleValue() - now;
196  if (packetDelay < 0)
197  packetDelay = 0;
199  }
200  packetEndTime = packetStartTime + SIMTIME_AS_CLOCKTIME(packet->getDuration());
201  if (progress == nullptr || !progress->isScheduled()) {
202  if (packet->getTotalLength() == position + extraProcessableLength)
203  handlePacketProcessed(packet);
204  pushOrSendPacketProgress(packet, outputGate, consumer, datarate, position, extraProcessableLength, packet->getTransmissionId());
205  }
206  else {
207  EV_INFO << "Inserting packet gap before" << EV_FIELD(packet) << EV_ENDL;
209  auto progressTag = packet->addTagIfAbsent<ProgressTag>();
210  progressTag->setDatarate(datarate);
211  progressTag->setPosition(position);
212  progressTag->setExtraProcessableLength(extraProcessableLength);
213  progress->setContextPointer(packet);
215  }
216 }

Referenced by pushPacketEnd(), pushPacketProgress(), and pushPacketStart().

◆ pushPacket()

void inet::InterpacketGapInserter::pushPacket ( Packet packet,
cGate *  gate 
)
overridevirtual

Pushes the packet into the packet sink at the given gate.

This operation pushes the packet as a whole. The onwership of the packet is transferred to the sink.

This method is called, for example, when a packet source module pushes a packet into a queue module.

The sink must not be full at the gate. The packet must not be nullptr. The gate must be a valid gate of this module and it must support pushing and passing packets.

Reimplemented from inet::queueing::PacketPusherBase.

122 {
123  Enter_Method("pushPacket");
124  take(packet);
125  auto now = getClockTime();
126  packetDelay = packetEndTime + durationPar->doubleValue() - now;
127  if (packetDelay < 0)
128  packetDelay = 0;
130  packetEndTime = packetStartTime + SIMTIME_AS_CLOCKTIME(packet->getDuration());
131  if (packetDelay == 0) {
132  handlePacketProcessed(packet);
134  }
135  else {
136  EV_INFO << "Inserting packet gap before" << EV_FIELD(packet) << EV_ENDL;
137  progress->setContextPointer(packet);
139  }
141 }

Referenced by handleMessage().

◆ pushPacketEnd()

void inet::InterpacketGapInserter::pushPacketEnd ( Packet packet,
cGate *  gate 
)
overridevirtual

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.

Reimplemented from inet::queueing::PacketPusherBase.

167 {
168  Enter_Method("pushPacketEnd");
169  take(packet);
170  pushOrSendOrSchedulePacketProgress(packet, gate, streamDatarate, packet->getDataLength(), b(0));
173 }

◆ pushPacketProgress()

void inet::InterpacketGapInserter::pushPacketProgress ( Packet packet,
cGate *  gate,
bps  datarate,
b  position,
b  extraProcessableLength = b(0) 
)
overridevirtual

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.

Reimplemented from inet::queueing::PacketPusherBase.

176 {
177  Enter_Method("pushPacketProgress");
178  take(packet);
179  streamDatarate = datarate;
180  pushOrSendOrSchedulePacketProgress(packet, gate, datarate, position, extraProcessableLength);
182 }

◆ pushPacketStart()

void inet::InterpacketGapInserter::pushPacketStart ( Packet packet,
cGate *  gate,
bps  datarate 
)
overridevirtual

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.

Reimplemented from inet::queueing::PacketPusherBase.

158 {
159  Enter_Method("pushPacketStart");
160  take(packet);
161  streamDatarate = datarate;
162  pushOrSendOrSchedulePacketProgress(packet, gate, datarate, b(0), b(0));
164 }

◆ receivePacketEnd()

void inet::InterpacketGapInserter::receivePacketEnd ( cPacket *  packet,
cGate *  gate,
double  datarate 
)
protectedvirtual
102 {
103  auto packet = check_and_cast<Packet *>(cpacket);
104  pushOrSendPacketEnd(packet, outputGate, consumer, packet->getTransmissionId());
105 }

◆ receivePacketProgress()

void inet::InterpacketGapInserter::receivePacketProgress ( cPacket *  packet,
cGate *  gate,
double  datarate,
int  bitPosition,
simtime_t  timePosition,
int  extraProcessableBitLength,
simtime_t  extraProcessableDuration 
)
protectedvirtual
96 {
97  auto packet = check_and_cast<Packet *>(cpacket);
98  pushOrSendPacketProgress(packet, outputGate, consumer, bps(datarate), b(bitPosition), b(extraProcessableBitLength), packet->getTransmissionId());
99 }

◆ receivePacketStart()

void inet::InterpacketGapInserter::receivePacketStart ( cPacket *  packet,
cGate *  gate,
double  datarate 
)
protectedvirtual
90 {
91  auto packet = check_and_cast<Packet *>(cpacket);
92  pushOrSendPacketStart(packet, outputGate, consumer, bps(datarate), packet->getTransmissionId());
93 }

◆ resolveDirective()

const char * inet::InterpacketGapInserter::resolveDirective ( char  directive) const
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketProcessorBase.

219 {
220  static std::string result;
221  switch (directive) {
222  case 'g':
223  result = simtime_t(durationPar->doubleValue()).ustr().c_str();
224  break;
225  case 'd':
226  result = CLOCKTIME_AS_SIMTIME(packetDelay).ustr().c_str();
227  break;
228  default:
229  return PacketPusherBase::resolveDirective(directive);
230  }
231  return result.c_str();
232 }

◆ supportsPacketPulling()

virtual bool inet::InterpacketGapInserter::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.

Reimplemented from inet::queueing::PacketPusherBase.

49 { return false; }

◆ supportsPacketPushing()

virtual bool inet::InterpacketGapInserter::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.

Reimplemented from inet::queueing::PacketPusherBase.

48 { return true; }

Member Data Documentation

◆ durationPar

cPar* inet::InterpacketGapInserter::durationPar = nullptr
protected

◆ packetDelay

clocktime_t inet::InterpacketGapInserter::packetDelay
protected

◆ packetEndTime

◆ packetStartTime

clocktime_t inet::InterpacketGapInserter::packetStartTime
protected

◆ progress

ClockEvent* inet::InterpacketGapInserter::progress = nullptr
protected

◆ streamDatarate

bps inet::InterpacketGapInserter::streamDatarate = bps(NaN)
protected

◆ timer

ClockEvent* inet::InterpacketGapInserter::timer = nullptr
protected

The documentation for this class was generated from the following files:
inet::queueing::PacketPusherBase::inputGate
cGate * inputGate
Definition: PacketPusherBase.h:22
inet::INITSTAGE_LAST
INET_API InitStage INITSTAGE_LAST
Operations that no other initializations can depend on, e.g.
inet::queueing::PacketProcessorBase::pushOrSendPacket
virtual void pushOrSendPacket(Packet *packet, cGate *gate, IPassivePacketSink *consumer)
Definition: PacketProcessorBase.cc:126
inet::InterpacketGapInserter::packetDelay
clocktime_t packetDelay
Definition: InterpacketGapInserter.h:25
inet::queueing::IPassivePacketSink::canPushPacket
virtual bool canPushPacket(Packet *packet, cGate *gate) const =0
Returns true if the given packet can be pushed at the given gate into the packet sink without raising...
inet::InterpacketGapInserter::progress
ClockEvent * progress
Definition: InterpacketGapInserter.h:23
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::queueing::PacketProcessorBase::pushOrSendPacketProgress
virtual void pushOrSendPacketProgress(Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, b position, b extraProcessableLength, int transmissionId)
Definition: PacketProcessorBase.cc:171
inet::InterpacketGapInserter::pushOrSendOrSchedulePacketProgress
virtual void pushOrSendOrSchedulePacketProgress(Packet *packet, cGate *gate, bps datarate, b position, b extraProcessableLength=b(0))
Definition: InterpacketGapInserter.cc:191
inet::ClockUserModuleMixin< PacketPusherBase >::scheduleClockEventAt
virtual void scheduleClockEventAt(clocktime_t time, ClockEvent *msg)
Definition: ClockUserModuleMixin.h:64
inet::InterpacketGapInserter::streamDatarate
bps streamDatarate
Definition: InterpacketGapInserter.h:29
inet::interpacketGapStartedSignal
simsignal_t interpacketGapStartedSignal
Definition: Simsignals.cc:26
inet::ClockUserModuleMixin< PacketPusherBase >::getClockTime
virtual clocktime_t getClockTime() const
Definition: ClockUserModuleMixin.h:72
inet::queueing::IPassivePacketSink::canPushSomePacket
virtual bool canPushSomePacket(cGate *gate) const =0
Returns false if the packet sink is full at the given gate and no more packets can be pushed into it ...
inet::queueing::PacketProcessorBase::handlePacketProcessed
virtual void handlePacketProcessed(Packet *packet)
Definition: PacketProcessorBase.cc:34
inet::ClockEvent
cMessage ClockEvent
Definition: contract/ClockEvent.h:18
SIMTIME_AS_CLOCKTIME
#define SIMTIME_AS_CLOCKTIME(x)
Definition: contract/ClockTime.h:20
inet::InterpacketGapInserter::durationPar
cPar * durationPar
Definition: InterpacketGapInserter.h:21
inet::queueing::PacketProcessorBase::resolveDirective
virtual const char * resolveDirective(char directive) const override
Definition: PacketProcessorBase.cc:407
inet::InterpacketGapInserter::packetStartTime
clocktime_t packetStartTime
Definition: InterpacketGapInserter.h:26
inet::queueing::PacketPusherBase::outputGate
cGate * outputGate
Definition: PacketPusherBase.h:25
inet::InterpacketGapInserter::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: InterpacketGapInserter.cc:107
EV_FIELD
#define EV_FIELD(...)
Definition: INETDefs.h:112
NaN
#define NaN
Definition: INETMath.h:91
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::queueing::IActivePacketSource::handleCanPushPacketChanged
virtual void handleCanPushPacketChanged(cGate *gate)=0
Notifies about a change in the possibility of pushing some packet into the passive packet sink at the...
inet::queueing::PacketProcessorBase::pushOrSendPacketEnd
virtual void pushOrSendPacketEnd(Packet *packet, cGate *gate, IPassivePacketSink *consumer, int transmissionId)
Definition: PacketProcessorBase.cc:154
inet::ClockUserModuleMixin< PacketPusherBase >::cancelAndDeleteClockEvent
virtual void cancelAndDeleteClockEvent(ClockEvent *msg)
Definition: ClockUserModuleMixin.h:67
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::queueing::IActivePacketSource::handlePushPacketProcessed
virtual void handlePushPacketProcessed(Packet *packet, cGate *gate, bool successful)=0
Notifies about the completion of the packet processing for a packet that was pushed earlier independe...
inet::queueing::PacketProcessorBase::updateDisplayString
virtual void updateDisplayString() const
Definition: PacketProcessorBase.cc:399
inet::ClockUserModuleMixin< PacketPusherBase >::rescheduleClockEventAt
virtual void rescheduleClockEventAt(clocktime_t time, ClockEvent *msg)
Definition: ClockUserModuleMixin.h:68
inet::InterpacketGapInserter::packetEndTime
clocktime_t packetEndTime
Definition: InterpacketGapInserter.h:27
inet::queueing::PacketPusherBase::consumer
IPassivePacketSink * consumer
Definition: PacketPusherBase.h:26
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::queueing::PacketProcessorBase::pushOrSendPacketStart
virtual void pushOrSendPacketStart(Packet *packet, cGate *gate, IPassivePacketSink *consumer, bps datarate, int transmissionId)
Definition: PacketProcessorBase.cc:136
inet::InterpacketGapInserter::timer
ClockEvent * timer
Definition: InterpacketGapInserter.h:22
inet::ClockUserModuleMixin< PacketPusherBase >::cancelClockEvent
virtual cMessage * cancelClockEvent(ClockEvent *msg)
Definition: ClockUserModuleMixin.h:66
inet::InterpacketGapInserter::pushPacket
virtual void pushPacket(Packet *packet, cGate *gate) override
Pushes the packet into the packet sink at the given gate.
Definition: InterpacketGapInserter.cc:121
EV_ENDL
#define EV_ENDL
Definition: INETDefs.h:114
inet::INITSTAGE_CLOCK
INET_API InitStage INITSTAGE_CLOCK
Initialization of clocks.
inet::queueing::PacketPusherBase::producer
IActivePacketSource * producer
Definition: PacketPusherBase.h:23
inet::interpacketGapEndedSignal
simsignal_t interpacketGapEndedSignal
Definition: Simsignals.cc:27