|
INET Framework for OMNeT++/OMNEST
|
This class defines the interface for packet queues. More...
#include <IPacketQueue.h>
Public Member Functions | |
| virtual void | enqueuePacket (Packet *packet)=0 |
| Enqueues the packet into the packet queue. More... | |
| virtual Packet * | dequeuePacket ()=0 |
| Dequeues the packet from the packet queue. More... | |
Public Member Functions inherited from inet::queueing::IPacketCollection | |
| virtual int | getMaxNumPackets () const =0 |
| Returns maximum allowed number of packets in the collection. More... | |
| virtual int | getNumPackets () const =0 |
| Returns the number of available packets in the collection in the range [0, inf). More... | |
| virtual b | getMaxTotalLength () const =0 |
| Returns maximum allowed total length of all packets in the collection. More... | |
| virtual b | getTotalLength () const =0 |
| Returns the total length of all packets in the collection in the range [0, inf). More... | |
| virtual Packet * | getPacket (int index) const =0 |
| Returns the packet at the given index. More... | |
| virtual bool | isEmpty () const =0 |
| Returns true if there are no packets available in the collection. More... | |
| virtual void | removePacket (Packet *packet)=0 |
| Removes a packet from the collection. More... | |
| virtual void | removeAllPackets ()=0 |
| Removes all packets from the collection. More... | |
Public Member Functions inherited from inet::queueing::IPassivePacketSink | |
| virtual | ~IPassivePacketSink () |
| 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 without raising an error. More... | |
| 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 an error. More... | |
| virtual void | pushPacket (Packet *packet, cGate *gate)=0 |
| Pushes the packet into the packet sink at the given gate. More... | |
| virtual void | pushPacketStart (Packet *packet, cGate *gate, bps datarate)=0 |
| Starts pushing the packet into the packet sink at the given gate. More... | |
| virtual void | pushPacketEnd (Packet *packet, cGate *gate)=0 |
| 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))=0 |
| Progresses pushing the packet into the packet sink at the given gate. More... | |
Public Member Functions inherited from inet::queueing::IPassivePacketSource | |
| virtual | ~IPassivePacketSource () |
| virtual bool | canPullSomePacket (cGate *gate) const =0 |
| 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 Packet * | canPullPacket (cGate *gate) const =0 |
| Returns the packet that can be pulled at the given gate. More... | |
| virtual Packet * | pullPacket (cGate *gate)=0 |
| Pulls the packet from the packet source at the given gate. More... | |
| virtual Packet * | pullPacketStart (cGate *gate, bps datarate)=0 |
| Starts pulling the packet from the packet source at the given gate. More... | |
| virtual Packet * | pullPacketEnd (cGate *gate)=0 |
| Ends pulling the packet from the packet source at the given gate. More... | |
| virtual Packet * | pullPacketProgress (cGate *gate, bps datarate, b position, b extraProcessableLength)=0 |
| Progresses pulling the packet from the packet source at the given gate. More... | |
This class defines the interface for packet queues.
|
pure virtual |
Dequeues the packet from the packet queue.
The onwership of the packet is transferred from the queue to the caller.
The queue must not be empty. The returned packet must not be nullptr.
Implemented in inet::queueing::PacketQueueBase.
Referenced by inet::ieee80211::OriginatorMacDataService::extractFramesToTransmit(), and inet::ieee80211::OriginatorQosMacDataService::extractFramesToTransmit().
|
pure virtual |
Enqueues the packet into the packet queue.
The onwership of the packet is transferred from the caller to the queue.
The queue must not be full. The packet must not be nullptr.
Implemented in inet::queueing::PacketQueueBase.