|
INET Framework for OMNeT++/OMNEST
|
This class defines the interface for packet collections. More...
#include <IPacketCollection.h>
Public Member Functions | |
| 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... | |
This class defines the interface for packet collections.
|
pure virtual |
Returns maximum allowed number of packets in the collection.
The value -1 means no such limit.
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
|
pure virtual |
Returns maximum allowed total length of all packets in the collection.
The value -1 means no such limit.
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
|
pure virtual |
Returns the number of available packets in the collection in the range [0, inf).
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::ieee80211::BasicMsduAggregationPolicy::computeAggregateFrames(), inet::queueing::CompoundPacketQueueBase::getNumPackets(), inet::queueing::PacketBufferBase::resolveDirective(), and inet::queueing::PacketQueueBase::resolveDirective().
|
pure virtual |
Returns the packet at the given index.
Throws error when the index is out of range.
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::WrrScheduler, inet::queueing::PacketBuffer, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::ieee80211::BasicMsduAggregationPolicy::computeAggregateFrames(), inet::queueing::CompoundPacketQueueBase::getPacket(), and inet::queueing::PacketQueueBase::resolveDirective().
|
pure virtual |
Returns the total length of all packets in the collection in the range [0, inf).
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::queueing::CompoundPacketQueueBase::getTotalLength(), inet::queueing::PacketBufferBase::resolveDirective(), and inet::queueing::PacketQueueBase::resolveDirective().
|
pure virtual |
Returns true if there are no packets available in the collection.
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::ieee80211::BasicMsduAggregationPolicy::computeAggregateFrames(), inet::ieee80211::OriginatorMacDataService::extractFramesToTransmit(), inet::ieee80211::OriginatorQosMacDataService::extractFramesToTransmit(), inet::queueing::CompoundPacketQueueBase::isEmpty(), and inet::queueing::PacketQueueBase::resolveDirective().
|
pure virtual |
Removes all packets from the collection.
Implemented in inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::queueing::CompoundPacketQueueBase::removeAllPackets(), and inet::queueing::PacketQueue::removeAllPackets().
|
pure virtual |
Removes a packet from the collection.
The collection must contain the packet.
Implemented in inet::queueing::IPacketBuffer, inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::queueing::CompoundPacketQueueBase, inet::queueing::PacketBuffer, inet::queueing::WrrScheduler, inet::queueing::LabelScheduler, and inet::queueing::PriorityScheduler.
Referenced by inet::ieee80211::OriginatorQosMacDataService::aMsduAggregateIfNeeded(), and inet::queueing::CompoundPacketQueueBase::removePacket().