|
INET Framework for OMNeT++/OMNEST
|
This class defines the interface for passive packet sources. More...
#include <IPassivePacketSource.h>
Public Member Functions | |
| 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 passive packet sources.
See the corresponding NED file for more details.
|
pure virtual |
Returns the packet that can be pulled at the given gate.
The returned value is nullptr if there is no such packet.
The gate must be a valid gate of this module and it must support pushing packets.
Implemented in inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketQueue, inet::queueing::PacketFlowBase, inet::PacketDestreamer, inet::queueing::PacketGateBase, inet::queueing::CompoundPacketQueueBase, inet::queueing::MarkovClassifier, inet::queueing::PassivePacketSource, inet::queueing::PacketPullerBase, and inet::queueing::PacketDemultiplexer.
Referenced by inet::queueing::InstantServer::canProcessPacket(), inet::queueing::PacketDemultiplexer::canPullPacket(), inet::queueing::PacketPullerBase::canPullPacket(), inet::queueing::MarkovClassifier::canPullPacket(), inet::queueing::CompoundPacketQueueBase::canPullPacket(), inet::PacketDestreamer::canPullPacket(), inet::PacketStreamer::canPullPacket(), inet::queueing::PacketClassifierBase::canPullPacket(), inet::PreemptableStreamer::canPullPacket(), inet::queueing::PacketClassifierBase::handleCanPullPacketChanged(), and inet::queueing::TokenBasedServer::processPackets().
|
pure virtual |
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.
The gate must be a valid gate of this module and it must support pulling packets.
Implemented in inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketQueue, inet::queueing::PacketFlowBase, inet::PacketDestreamer, inet::queueing::PacketGateBase, inet::queueing::CompoundPacketQueueBase, inet::queueing::MarkovClassifier, inet::queueing::PassivePacketSource, inet::queueing::PacketQueueBase, inet::queueing::PacketPullerBase, inet::queueing::PacketDemultiplexer, and inet::queueing::PassivePacketSourceBase.
Referenced by inet::queueing::InstantServer::canProcessPacket(), inet::queueing::PacketDemultiplexer::canPullSomePacket(), inet::queueing::PacketPullerBase::canPullSomePacket(), inet::queueing::CompoundPacketQueueBase::canPullSomePacket(), inet::PacketDestreamer::canPullSomePacket(), inet::PacketStreamer::canPullSomePacket(), inet::PreemptableStreamer::canPullSomePacket(), inet::EthernetCutthroughSink::canPushPacket(), inet::queueing::PacketServer::canStartProcessingPacket(), inet::queueing::PreemptingServer::canStartStreaming(), inet::queueing::ActivePacketSink::handleCanPullPacketChanged(), inet::queueing::PacketDemultiplexer::handleCanPullPacketChanged(), inet::queueing::ActivePacketSink::handleMessage(), and inet::queueing::ActivePacketSink::initialize().
|
pure virtual |
Pulls the packet from the packet source at the given gate.
This operation pulls the packet as a whole. The onwership of the packet is transferred to the sink.
The source must not be empty at the given gate. The returned packet must not be nullptr. The gate must be a valid gate of this module and it must support pulling and passing packets.
Implemented in inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketFlowBase, inet::queueing::PacketQueue, inet::PacketDestreamer, inet::queueing::CompoundPacketQueueBase, inet::queueing::MarkovClassifier, inet::queueing::PassivePacketSource, inet::EligibilityTimeGate, inet::queueing::PacketPullerBase, and inet::queueing::PacketDemultiplexer.
Referenced by inet::queueing::ActivePacketSink::collectPacket(), inet::queueing::PacketQueueBase::dequeuePacket(), inet::queueing::InstantServer::processPacket(), inet::queueing::TokenBasedServer::processPackets(), inet::queueing::PacketDemultiplexer::pullPacket(), inet::queueing::MarkovClassifier::pullPacket(), inet::queueing::CompoundPacketQueueBase::pullPacket(), inet::queueing::PacketClassifierBase::pullPacket(), inet::PacketStreamer::pullPacketStart(), inet::PreemptableStreamer::pullPacketStart(), and inet::queueing::PacketServer::startProcessingPacket().
|
pure virtual |
Ends pulling the packet from the packet source 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 from the the source.
The source must not be empty at the gate and no other packet streaming can be in progress. The gate must be a valid gate of this module and it must support pulling and streaming packets. The returned packet must not be nullptr.
Implemented in inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketFlowBase, inet::PacketDestreamer, inet::queueing::MarkovClassifier, inet::queueing::PacketQueueBase, inet::queueing::PassivePacketSource, inet::queueing::PacketPullerBase, inet::queueing::PacketDemultiplexer, and inet::queueing::PassivePacketSourceBase.
Referenced by inet::queueing::PreemptingServer::endStreaming(), inet::queueing::PreemptingServer::handlePushPacketProcessed(), and inet::PacketDestreamer::pullPacket().
|
pure virtual |
Progresses pulling the packet from the packet source 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 source about a change in the packet data when a preemption occurs.
The source must not be empty at the gate and no other packet streaming can be in progress. The gate must be a valid gate of this module and it must support pulling and streaming packets. The returned packet must not be nullptr.
Implemented in inet::queueing::PacketPullerBase, inet::queueing::PassivePacketSourceBase, inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketFlowBase, inet::PacketDestreamer, inet::queueing::MarkovClassifier, inet::queueing::PacketQueueBase, inet::queueing::PassivePacketSource, and inet::queueing::PacketDemultiplexer.
|
pure virtual |
Starts pulling the packet from the packet source 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 from the source.
The source must not be empty at the gate and no other packet streaming can be in progress. The gate must be a valid gate of this module and it must support pulling and streaming packets. The returned packet must not be nullptr.
Implemented in inet::queueing::PacketFilterBase, inet::PreemptableStreamer, inet::queueing::PacketClassifierBase, inet::queueing::PacketSchedulerBase, inet::PacketStreamer, inet::queueing::PacketFlowBase, inet::PacketDestreamer, inet::queueing::MarkovClassifier, inet::queueing::PacketQueueBase, inet::queueing::PassivePacketSource, inet::queueing::PacketPullerBase, inet::queueing::PacketDemultiplexer, and inet::queueing::PassivePacketSourceBase.
Referenced by inet::PacketDestreamer::pullPacket(), and inet::queueing::PreemptingServer::startStreaming().