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

#include <InProgressQueue.h>

Inheritance diagram for inet::queueing::InProgressQueue:
inet::queueing::PacketQueue inet::queueing::PacketQueueBase inet::queueing::IPacketBuffer::ICallback inet::queueing::PacketProcessorBase inet::queueing::IPacketQueue inet::queueing::IPacketProcessor inet::StringFormat::IDirectiveResolver inet::queueing::IPacketCollection inet::queueing::IPassivePacketSink inet::queueing::IPassivePacketSource

Public Member Functions

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...
 
- Public Member Functions inherited from inet::queueing::PacketQueue
virtual ~PacketQueue ()
 
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 bool isEmpty () const override
 Returns true if there are no packets available in the collection. More...
 
virtual PacketgetPacket (int index) const override
 Returns the packet at the given index. 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...
 
virtual bool supportsPacketPushing (cGate *gate) const override
 Returns true if the processor supports pushing 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 bool supportsPacketPulling (cGate *gate) const override
 Returns true if the processor supports pulling packets at the given gate. 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 PacketpullPacket (cGate *gate) override
 Pulls the packet from the packet source at the given gate. More...
 
virtual void handlePacketRemoved (Packet *packet) override
 Notifies the packet owner about the packet being removed from the buffer. More...
 
- Public Member Functions inherited from inet::queueing::PacketQueueBase
virtual void enqueuePacket (Packet *packet) override
 Enqueues the packet into the packet queue. More...
 
virtual PacketdequeuePacket () override
 Dequeues the packet from the packet queue. 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 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...
 
- 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::IPassivePacketSource
virtual ~IPassivePacketSource ()
 

Additional Inherited Members

- Protected Types inherited from inet::queueing::PacketProcessorBase
enum  Action { PUSH, PULL }
 
- Protected Member Functions inherited from inet::queueing::PacketQueue
virtual void initialize (int stage) override
 
virtual IPacketDropperFunctioncreateDropperFunction (const char *dropperClass) const
 
virtual IPacketComparatorFunctioncreateComparatorFunction (const char *comparatorClass) const
 
virtual bool isOverloaded () const
 
- Protected Member Functions inherited from inet::queueing::PacketQueueBase
virtual void handleMessage (cMessage *message) override
 
virtual void emit (simsignal_t signal, cObject *object, cObject *details=nullptr) override
 
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 inherited from inet::queueing::PacketQueue
int packetCapacity = -1
 
b dataCapacity = b(-1)
 
IActivePacketSourceproducer = nullptr
 
IActivePacketSinkcollector = nullptr
 
cPacketQueue queue
 
IPacketBufferbuffer = nullptr
 
IPacketDropperFunctionpacketDropperFunction = nullptr
 
IPacketComparatorFunctionpacketComparatorFunction = nullptr
 
- Protected Attributes inherited from inet::queueing::PacketQueueBase
int numPushedPackets = -1
 
int numPulledPackets = -1
 
int numRemovedPackets = -1
 
int numDroppedPackets = -1
 
int numCreatedPackets = -1
 
cGate * inputGate = nullptr
 
cGate * outputGate = nullptr
 
- Protected Attributes inherited from inet::queueing::PacketProcessorBase
const char * displayStringTextFormat = nullptr
 
int numProcessedPackets = -1
 
b processedTotalLength = b(-1)
 

Member Function Documentation

◆ canPushPacket()

bool inet::queueing::InProgressQueue::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::PacketQueue.

16 {
17  return queue.isEmpty() || packetComparatorFunction->comparePackets(packet, getPacket(0)) > 0;
18 }

◆ canPushSomePacket()

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

Reimplemented from inet::queueing::PacketQueue.

19 { return false; }

The documentation for this class was generated from the following files:
inet::queueing::PacketQueue::getPacket
virtual Packet * getPacket(int index) const override
Returns the packet at the given index.
Definition: PacketQueue.cc:74
inet::queueing::IPacketComparatorFunction::comparePackets
virtual int comparePackets(Packet *packet1, Packet *packet2) const =0
Returns the order of the given packets.
inet::queueing::PacketQueue::packetComparatorFunction
IPacketComparatorFunction * packetComparatorFunction
Definition: PacketQueue.h:34
inet::queueing::PacketQueue::queue
cPacketQueue queue
Definition: PacketQueue.h:30