INET Framework for OMNeT++/OMNEST
inet::queueing::CreditBasedGate Class Reference

#include <CreditBasedGate.h>

Inheritance diagram for inet::queueing::CreditBasedGate:
inet::queueing::PacketGateBase inet::queueing::PacketFlowBase inet::TransparentProtocolRegistrationListener inet::queueing::IPacketGate inet::queueing::PacketProcessorBase inet::queueing::IPacketFlow inet::queueing::IPacketCollection inet::IProtocolRegistrationListener inet::queueing::IPacketProcessor inet::StringFormat::IDirectiveResolver inet::queueing::IPacketSink inet::queueing::IPacketSource inet::queueing::IPassivePacketSink inet::queueing::IActivePacketSink inet::queueing::IPassivePacketSource inet::queueing::IActivePacketSource

Public Member Functions

virtual ~CreditBasedGate ()
 
virtual void handleCanPullPacketChanged (cGate *gate) override
 Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate. More...
 
virtual const char * resolveDirective (char directive) const override
 
virtual void receiveSignal (cComponent *source, simsignal_t signal, double value, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signal, cObject *object, cObject *details) override
 
- Public Member Functions inherited from inet::queueing::PacketGateBase
virtual bool isOpen () const override
 Returns true if the gate is open. More...
 
virtual bool isClosed () const
 
virtual void open () override
 Opens the gate and starts traffic go through. More...
 
virtual void close () override
 Closes the gate and stops traffic. More...
 
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 IPassivePacketSourcegetProvider (cGate *gate) override
 Returns the passive packet source from where packets are pulled 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 bool canPullSomePacket (cGate *gate) const override
 Returns false if the packet source is empty at the given gate and no more packets can be pulled from it without raising an error. More...
 
virtual PacketcanPullPacket (cGate *gate) const override
 Returns the packet that can be pulled 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...
 
- Public Member Functions inherited from inet::queueing::PacketFlowBase
virtual bool supportsPacketStreaming (cGate *gate) const override
 Returns true if the processor supports streaming packets at the given gate. 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 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...
 
virtual PacketpullPacket (cGate *gate) override
 Pulls the packet from the packet source at the given gate. More...
 
virtual PacketpullPacketStart (cGate *gate, bps datarate) override
 Starts pulling the packet from the packet source at the given gate. More...
 
virtual PacketpullPacketEnd (cGate *gate) override
 Ends pulling the packet from the packet source at the given gate. More...
 
virtual PacketpullPacketProgress (cGate *gate, bps datarate, b position, b extraProcessableLength) override
 Progresses pulling the packet from the packet source at the given gate. More...
 
virtual void handlePullPacketProcessed (Packet *packet, cGate *gate, bool successful) override
 Notifies about the completion of the packet processing for a packet that was pulled earlier independently whether the packet is passed or streamed. More...
 
virtual int getMaxNumPackets () const override
 Returns maximum allowed number of packets in the collection. More...
 
virtual int getNumPackets () const override
 Returns the number of available packets in the collection in the range [0, inf). More...
 
virtual b getMaxTotalLength () const override
 Returns maximum allowed total length of all packets in the collection. More...
 
virtual b getTotalLength () const override
 Returns the total length of all packets in the collection in the range [0, inf). More...
 
virtual PacketgetPacket (int index) const override
 Returns the packet at the given index. More...
 
virtual bool isEmpty () const override
 Returns true if there are no packets available in the collection. More...
 
virtual void removePacket (Packet *packet) override
 Removes a packet from the collection. More...
 
virtual void removeAllPackets () override
 Removes all packets from the collection. 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...
 
- 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::IActivePacketSink
virtual ~IActivePacketSink ()
 
- Public Member Functions inherited from inet::queueing::IPassivePacketSource
virtual ~IPassivePacketSource ()
 
- Public Member Functions inherited from inet::queueing::IActivePacketSource
virtual ~IActivePacketSource ()
 
- Public Member Functions inherited from inet::TransparentProtocolRegistrationListener
virtual void mapRegistrationForwardingGates (cGate *gate, std::function< void(cGate *)> f)
 
virtual bool isForwardingProtocol (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingProtocolGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingAnyProtocol (cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingProtocol (cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingService (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingServiceGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingAnyService (cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual bool isForwardingService (cGate *gate, ServicePrimitive servicePrimitive) const
 
virtual void handleRegisterService (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocol (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterServiceGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocolGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterAnyService (cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterAnyProtocol (cGate *gate, ServicePrimitive servicePrimitive) override
 

Static Public Attributes

static simsignal_t creditsChangedSignal = cComponent::registerSignal("creditsChanged")
 
- Static Public Attributes inherited from inet::queueing::PacketGateBase
static simsignal_t gateStateChangedSignal = registerSignal("gateStateChanged")
 

Protected Member Functions

virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *message) override
 
virtual void finish () override
 
virtual void refreshDisplay () const override
 
virtual void processPacket (Packet *packet) override
 
virtual bool hasAvailablePacket () const
 
virtual void updateCurrentCredit ()
 
virtual void updateCurrentCreditGainRate ()
 
virtual void emitCurrentCredit ()
 
virtual void scheduleChangeTimer ()
 
virtual void processChangeTimer ()
 
- Protected Member Functions inherited from inet::queueing::PacketGateBase
virtual cGate * getRegistrationForwardingGate (cGate *gate) override
 
virtual bool canPacketFlowThrough (Packet *packet) const
 
virtual void updateDisplayString () const override
 
- Protected Member Functions inherited from inet::queueing::PacketFlowBase
virtual bool isStreamingPacket () const
 
virtual void startPacketStreaming (Packet *packet)
 
virtual void endPacketStreaming (Packet *packet)
 
virtual void checkPacketStreaming (Packet *packet)
 
- Protected Member Functions inherited from inet::queueing::PacketProcessorBase
virtual int numInitStages () 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)
 

Protected Attributes

double idleCreditGainRate = NaN
 
double transmitCreditSpendRate = NaN
 
double transmitCreditLimit = NaN
 
double minCredit = NaN
 
double maxCredit = NaN
 
bool isTransmitting = false
 
bool isInterpacketGap = false
 
double currentCredit = NaN
 
double currentCreditGainRate = NaN
 
double lastCurrentCreditEmitted = NaN
 
simtime_t lastCurrentCreditEmittedTime = -1
 
cMessage * changeTimer = nullptr
 
- Protected Attributes inherited from inet::queueing::PacketGateBase
bps bitrate = bps(NaN)
 
b extraLength = b(-1)
 
simtime_t extraDuration
 
bool isOpen_ = false
 
- Protected Attributes inherited from inet::queueing::PacketFlowBase
cGate * inputGate = nullptr
 
ModuleRef< IActivePacketSourceproducer
 
ModuleRef< IPassivePacketSourceprovider
 
ModuleRef< IPacketCollectioncollection
 
cGate * outputGate = nullptr
 
ModuleRef< IPassivePacketSinkconsumer
 
ModuleRef< IActivePacketSinkcollector
 
int inProgressStreamId = -1
 
- 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

◆ ~CreditBasedGate()

virtual inet::queueing::CreditBasedGate::~CreditBasedGate ( )
inlinevirtual
54 { cancelAndDelete(changeTimer); }

Member Function Documentation

◆ emitCurrentCredit()

void inet::queueing::CreditBasedGate::emitCurrentCredit ( )
protectedvirtual
127 {
128  simtime_t now = simTime();
129  if (!initialized() || lastCurrentCreditEmitted != currentCredit || lastCurrentCreditEmittedTime != now) {
133  }
134 }

Referenced by finish(), handleCanPullPacketChanged(), handleMessage(), initialize(), and receiveSignal().

◆ finish()

void inet::queueing::CreditBasedGate::finish ( )
overrideprotectedvirtual

◆ handleCanPullPacketChanged()

void inet::queueing::CreditBasedGate::handleCanPullPacketChanged ( cGate *  gate)
overridevirtual

Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate.

This method is called, for example, when a new packet is inserted into a queue. It allows the sink to pull a new packet from the queue.

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

Reimplemented from inet::queueing::PacketGateBase.

203 {
204  Enter_Method("handleCanPullPacketChanged");
205  // 1. update currentCredit and currentCreditGainRate
208  // 2. notify listeners about currentCredit change
210  // 3. reschedule change timer when currentCredit reaches transmitCreditLimit
213 }

◆ handleMessage()

void inet::queueing::CreditBasedGate::handleMessage ( cMessage *  message)
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketFlowBase.

59 {
60  if (message == changeTimer) {
61  // 1. timer is executed when currentCredit reaches transmitCreditLimit with currentCreditGainRate
63  // 2. notify listeners and update lastCurrentCreditEmitted
65  // 3. open/close gate and allow consumer to pull packet if necessary
67  // 4. update currentCreditGainRate to know the slope when the timer is rescheduled
69  // 5. reschedule change timer based on currentCredit and currentCreditGainRate
71  }
72  else
73  throw cRuntimeError("Unknown message");
74 }

◆ hasAvailablePacket()

virtual bool inet::queueing::CreditBasedGate::hasAvailablePacket ( ) const
inlineprotectedvirtual
46 { return provider->canPullSomePacket(inputGate->getPathStartGate()); }

Referenced by receiveSignal(), and updateCurrentCreditGainRate().

◆ initialize()

void inet::queueing::CreditBasedGate::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketGateBase.

26 {
28  if (stage == INITSTAGE_LOCAL) {
29  idleCreditGainRate = par("idleCreditGainRate");
30  transmitCreditSpendRate = par("transmitCreditSpendRate");
31  transmitCreditLimit = par("transmitCreditLimit");
32  minCredit = par("minCredit");
33  maxCredit = par("maxCredit");
34  displayStringTextFormat = par("displayStringTextFormat");
35  currentCredit = par("initialCredit");
38  lastCurrentCreditEmittedTime = simTime();
40  cModule *module = getContainingNicModule(this);
41  module->subscribe(transmissionStartedSignal, this);
42  module->subscribe(transmissionEndedSignal, this);
43  module->subscribe(interpacketGapEndedSignal, this);
44  changeTimer = new cMessage("ChangeTimer");
45  WATCH(currentCredit);
46  WATCH(currentCreditGainRate);
47  }
48  else if (stage == INITSTAGE_QUEUEING) {
53  }
54  else if (stage == INITSTAGE_LAST)
56 }

◆ processChangeTimer()

void inet::queueing::CreditBasedGate::processChangeTimer ( )
protectedvirtual
113 {
114  if (isOpen_)
115  close();
116  else
117  open();
118 }

Referenced by handleMessage().

◆ processPacket()

void inet::queueing::CreditBasedGate::processPacket ( Packet packet)
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketGateBase.

107 {
109  packet->addTag<CreditGateTag>()->setId(getId());
110 }

◆ receiveSignal() [1/2]

void inet::queueing::CreditBasedGate::receiveSignal ( cComponent *  source,
simsignal_t  signal,
cObject *  object,
cObject *  details 
)
overridevirtual
168 {
169  Enter_Method("%s", cComponent::getSignalName(simsignal));
170  if (simsignal == transmissionStartedSignal || simsignal == transmissionEndedSignal) {
171 #ifdef INET_WITH_PHYSICALLAYERWIRELESSCOMMON
172  auto signal = check_and_cast<physicallayer::Signal *>(object);
173  auto packet = check_and_cast<Packet *>(signal->getEncapsulatedPacket());
174  auto creditGateTag = packet->findTag<CreditGateTag>();
175  if (creditGateTag != nullptr && creditGateTag->getId() == getId()) {
176  // 1. update currentCredit and currentCreditGainRate because some time may have elapsed
180  // 2. update transmitting state
181  if (simsignal == transmissionStartedSignal)
182  isTransmitting = true;
183  else if (simsignal == transmissionEndedSignal) {
184  isTransmitting = false;
185  isInterpacketGap = true;
186  }
187  else
188  throw cRuntimeError("Unknown signal");
189  // 3. update currentCreditGainRate and notify listeners about currentCredit change
193  // 4. reschedule change timer when currentCredit reaches transmitCreditLimit
195  }
196 #endif
197  }
198  else
199  throw cRuntimeError("Unknown signal");
200 }

◆ receiveSignal() [2/2]

void inet::queueing::CreditBasedGate::receiveSignal ( cComponent *  source,
simsignal_t  signal,
double  value,
cObject *  details 
)
overridevirtual
147 {
148  Enter_Method("%s", cComponent::getSignalName(simsignal));
149  if (simsignal == interpacketGapEndedSignal) {
150  if (isInterpacketGap) {
151  isInterpacketGap = false;
152  // 1. immediately set currentCredit to 0 if there are no packets to transmit
153  if (!hasAvailablePacket())
155  // 2. update currentCreditGainRate and notify listeners about currentCredit change
159  // 3. reschedule change timer when currentCredit reaches transmitCreditLimit
161  }
162  }
163  else
164  throw cRuntimeError("Unknown signal");
165 }

◆ refreshDisplay()

void inet::queueing::CreditBasedGate::refreshDisplay ( ) const
overrideprotectedvirtual

Reimplemented from inet::queueing::PacketProcessorBase.

84 {
85  // NOTE: don't emit current credit and no need to call updateCurrentCreditGainRate
86  const_cast<CreditBasedGate *>(this)->updateCurrentCredit();
88 }

◆ resolveDirective()

const char * inet::queueing::CreditBasedGate::resolveDirective ( char  directive) const
overridevirtual

Reimplemented from inet::queueing::PacketProcessorBase.

216 {
217  static std::string result;
218  switch (directive) {
219  case 'n': {
220  std::stringstream stream;
221  stream << currentCredit;
222  result = stream.str();
223  break;
224  }
225  default:
226  return PacketGateBase::resolveDirective(directive);
227  }
228  return result.c_str();
229 }

◆ scheduleChangeTimer()

void inet::queueing::CreditBasedGate::scheduleChangeTimer ( )
protectedvirtual
91 {
93  ASSERT(lastCurrentCreditEmittedTime == simTime());
94  if (currentCreditGainRate == 0)
95  cancelEvent(changeTimer);
96  else {
98  if (changeTime < 0)
99  cancelEvent(changeTimer);
100  else if (changeTime > 0 || (isOpen_ ? currentCreditGainRate < 0 : currentCreditGainRate > 0))
101  // NOTE: schedule for future or for now if credit change direction and gate state requires
102  rescheduleAfter(changeTime, changeTimer);
103  }
104 }

Referenced by handleCanPullPacketChanged(), handleMessage(), initialize(), and receiveSignal().

◆ updateCurrentCredit()

void inet::queueing::CreditBasedGate::updateCurrentCredit ( )
protectedvirtual

◆ updateCurrentCreditGainRate()

void inet::queueing::CreditBasedGate::updateCurrentCreditGainRate ( )
protectedvirtual

Member Data Documentation

◆ changeTimer

cMessage* inet::queueing::CreditBasedGate::changeTimer = nullptr
protected

◆ creditsChangedSignal

simsignal_t inet::queueing::CreditBasedGate::creditsChangedSignal = cComponent::registerSignal("creditsChanged")
static

Referenced by emitCurrentCredit().

◆ currentCredit

double inet::queueing::CreditBasedGate::currentCredit = NaN
protected

◆ currentCreditGainRate

double inet::queueing::CreditBasedGate::currentCreditGainRate = NaN
protected

◆ idleCreditGainRate

double inet::queueing::CreditBasedGate::idleCreditGainRate = NaN
protected

◆ isInterpacketGap

bool inet::queueing::CreditBasedGate::isInterpacketGap = false
protected

◆ isTransmitting

bool inet::queueing::CreditBasedGate::isTransmitting = false
protected

◆ lastCurrentCreditEmitted

double inet::queueing::CreditBasedGate::lastCurrentCreditEmitted = NaN
protected

◆ lastCurrentCreditEmittedTime

simtime_t inet::queueing::CreditBasedGate::lastCurrentCreditEmittedTime = -1
protected

◆ maxCredit

double inet::queueing::CreditBasedGate::maxCredit = NaN
protected

Referenced by initialize(), and updateCurrentCredit().

◆ minCredit

double inet::queueing::CreditBasedGate::minCredit = NaN
protected

Referenced by initialize(), and updateCurrentCredit().

◆ transmitCreditLimit

double inet::queueing::CreditBasedGate::transmitCreditLimit = NaN
protected

◆ transmitCreditSpendRate

double inet::queueing::CreditBasedGate::transmitCreditSpendRate = NaN
protected

The documentation for this class was generated from the following files:
inet::INITSTAGE_LAST
INET_API InitStage INITSTAGE_LAST
Operations that no other initializations can depend on, e.g.
inet::queueing::CreditBasedGate::updateCurrentCreditGainRate
virtual void updateCurrentCreditGainRate()
Definition: CreditBasedGate.cc:136
inet::queueing::CreditBasedGate::transmitCreditLimit
double transmitCreditLimit
Definition: CreditBasedGate.h:25
inet::queueing::PacketGateBase::close
virtual void close() override
Closes the gate and stops traffic.
Definition: PacketGateBase.cc:52
inet::queueing::CreditBasedGate::lastCurrentCreditEmitted
double lastCurrentCreditEmitted
Definition: CreditBasedGate.h:34
inet::queueing::CreditBasedGate::hasAvailablePacket
virtual bool hasAvailablePacket() const
Definition: CreditBasedGate.h:46
inet::queueing::CreditBasedGate::idleCreditGainRate
double idleCreditGainRate
Definition: CreditBasedGate.h:23
inet::INITSTAGE_QUEUEING
INET_API InitStage INITSTAGE_QUEUEING
Initialization of queueing modules.
inet::queueing::PacketGateBase::handleCanPullPacketChanged
virtual void handleCanPullPacketChanged(cGate *gate) override
Notifies about a change in the possibility of pulling some packet from the passive packet source at t...
Definition: PacketGateBase.cc:99
inet::sctp::min
double min(const double a, const double b)
Returns the minimum of a and b.
Definition: SctpAssociation.h:261
inet::queueing::CreditBasedGate::transmitCreditSpendRate
double transmitCreditSpendRate
Definition: CreditBasedGate.h:24
inet::queueing::PacketGateBase::isOpen_
bool isOpen_
Definition: PacketGateBase.h:31
inet::queueing::CreditBasedGate::maxCredit
double maxCredit
Definition: CreditBasedGate.h:27
inet::queueing::CreditBasedGate::updateCurrentCredit
virtual void updateCurrentCredit()
Definition: CreditBasedGate.cc:120
inet::getContainingNicModule
NetworkInterface * getContainingNicModule(const cModule *from)
Find the nic module (inside the networkNode) containing the given module.
Definition: NetworkInterface.cc:691
inet::queueing::CreditBasedGate::changeTimer
cMessage * changeTimer
Definition: CreditBasedGate.h:37
inet::queueing::CreditBasedGate::minCredit
double minCredit
Definition: CreditBasedGate.h:26
inet::queueing::CreditBasedGate::scheduleChangeTimer
virtual void scheduleChangeTimer()
Definition: CreditBasedGate.cc:90
inet::queueing::CreditBasedGate::isTransmitting
bool isTransmitting
Definition: CreditBasedGate.h:30
inet::queueing::PacketProcessorBase::resolveDirective
virtual const char * resolveDirective(char directive) const override
Definition: PacketProcessorBase.cc:407
inet::transmissionEndedSignal
simsignal_t transmissionEndedSignal
Definition: Simsignals.cc:117
inet::queueing::PacketFlowBase::provider
ModuleRef< IPassivePacketSource > provider
Definition: PacketFlowBase.h:24
inet::queueing::PacketGateBase::open
virtual void open() override
Opens the gate and starts traffic go through.
Definition: PacketGateBase.cc:39
inet::transmissionStartedSignal
simsignal_t transmissionStartedSignal
Definition: Simsignals.cc:116
inet::queueing::CreditBasedGate::isInterpacketGap
bool isInterpacketGap
Definition: CreditBasedGate.h:31
inet::queueing::CreditBasedGate::processChangeTimer
virtual void processChangeTimer()
Definition: CreditBasedGate.cc:112
inet::queueing::CreditBasedGate::currentCredit
double currentCredit
Definition: CreditBasedGate.h:32
inet::queueing::CreditBasedGate::currentCreditGainRate
double currentCreditGainRate
Definition: CreditBasedGate.h:33
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::queueing::PacketFlowBase::inputGate
cGate * inputGate
Definition: PacketFlowBase.h:22
inet::sctp::max
double max(const double a, const double b)
Returns the maximum of a and b.
Definition: SctpAssociation.h:266
inet::queueing::CreditBasedGate::creditsChangedSignal
static simsignal_t creditsChangedSignal
Definition: CreditBasedGate.h:19
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::queueing::PacketProcessorBase::displayStringTextFormat
const char * displayStringTextFormat
Definition: PacketProcessorBase.h:29
inet::queueing::PacketGateBase::updateDisplayString
virtual void updateDisplayString() const override
Definition: PacketGateBase.cc:111
inet::queueing::CreditBasedGate::emitCurrentCredit
virtual void emitCurrentCredit()
Definition: CreditBasedGate.cc:126
inet::queueing::PacketGateBase::initialize
virtual void initialize(int stage) override
Definition: PacketGateBase.cc:15
inet::queueing::PacketGateBase::processPacket
virtual void processPacket(Packet *packet) override
Definition: PacketGateBase.cc:65
inet::queueing::CreditBasedGate::lastCurrentCreditEmittedTime
simtime_t lastCurrentCreditEmittedTime
Definition: CreditBasedGate.h:35
inet::interpacketGapEndedSignal
simsignal_t interpacketGapEndedSignal
Definition: Simsignals.cc:27