PacketSchedulerBase

Package: inet.queueing.base

PacketSchedulerBase

simple module

This is a 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 also: 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

This 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

This module schedules packets based on the attached labels in a LabelsTag.

MarkovScheduler simple module

This 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

This 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 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

This module implements weighted round-robin scheduling.

Extends

Name Type Description
PacketProcessorBase simple module

This is a 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

reverseOrder bool false

Properties

Name Value Description
display i=block/join
class PacketSchedulerBase

Gates

Name Direction Size Description
in [ ] input
out output

Signals

Name Type Unit
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetLengths packet lengths packetLength(packetPulled) sum, histogram, vector b none
dataRate data rate throughput(packetPulled) vector bps linear
packets packets packetPulled count pk

Source code

//
// This is a 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