PacketSchedulerBase

Package: inet.queueing.base

PacketSchedulerBase

simple module

C++ definition

Base module for various packet scheduler modules. Derived modules must implement a single packet scheduler function which determines the index of the input gate for the pulled packet.

<b>See also:</b> ~IPacketScheduler

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
ContentBasedScheduler simple module

Connects one packet collector to multiple packet providers. It can be pulled for packets by the connected packet collector. When this happens, the scheduler pulls a packet from one of its packet providers based on the configured packet filters. The first matching expression determines the index of the input gate.

LabelScheduler simple module

Schedules packets based on the attached labels in a ~LabelsTag.

MarkovScheduler simple module

Implements a packet scheduler using a Markov process that has as many states as input gates the scheduler has. The input gate for the next packet is determined by the current state of the Markov process.

PacketScheduler simple module

Connects one packet collector to multiple packet providers. When the packet collector pulls a pull packet from it, the scheduler pulls a packet from one of its packet providers based on the configured scheduler function. The packet scheduler function takes a list of packet providers and returns an integer which in turn is used for determining the input gate.

PriorityScheduler simple module

This scheduler pulls packets from the first non-empty among its connected packet providers.

WrrScheduler simple module

Implements weighted round-robin scheduling.

Extends

Name Type Description
PacketProcessorBase simple module

Base module for various packet processing modules which maintains a few statistics.

Parameters

Name Type Default value Description
displayStringTextFormat string "scheduled %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

reverseOrder bool false

Properties

Name Value Description
class PacketSchedulerBase
display i=block/join

Gates

Name Direction Size Description
in [ ] input
out output

Signals

Name Type Unit Description
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode Description
packetLengths packet lengths packetLength(packetPulled) sum, histogram, vector b none

the statistical value is the length of the scheduled packet

dataRate data rate throughput(packetPulled) vector bps linear

the statistical value is the data rate of the scheduled packets

packets packets packetPulled count pk

the statistical value is the scheduled packet

Source code

//
// Base module for various packet scheduler modules. Derived modules
// must implement a single packet scheduler function which determines the index
// of the input gate for the pulled packet.
//
// @see ~IPacketScheduler
//
simple PacketSchedulerBase extends PacketProcessorBase
{
    parameters:
        bool reverseOrder = default(false);
        displayStringTextFormat = default("scheduled %p pk (%l)");
        @class(PacketSchedulerBase);
        @display("i=block/join");
        @signal[packetPulled](type=inet::Packet);
        // the statistical value is the scheduled packet
        @statistic[packets](title="packets"; source=packetPulled; record=count; unit=pk);
        // the statistical value is the length of the scheduled packet
        @statistic[packetLengths](title="packet lengths"; source=packetLength(packetPulled); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the scheduled packets
        @statistic[dataRate](title="data rate"; source=throughput(packetPulled); record=vector; unit=bps; interpolationmode=linear);
    gates:
        input in[];
        output out;
}
File: src/inet/queueing/base/PacketSchedulerBase.ned