PacketServerBase

Package: inet.queueing.base

PacketServerBase

simple module

This is a base module for various packet server modules.

See also: IPacketServer

Inheritance diagram

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

Known subclasses

Name Type Description
InstantServer simple module

This module repeatedly pulls packets from the connected packet provider and pushes the packet into the connected packet consumer without delay.

PacketServer simple module

This module repeatedly pulls packets from the connected packet provider and after a processing delay it pushes the packet into the connected packet consumer. The processing delay is processingTime + packetLength / processingBitrate.

PreemptingServer simple module (no description)
TokenBasedServer simple module

This module repeatedly pulls packets from the connected packet provider and it pushes them into the connected packet consumer. The packets are processed in zero simulation time, and the process continues until the available number of tokens is not sufficient anymore.

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 "served %p pk (%l)"

determines the text that is written on top of the submodule

Properties

Name Value Description
display i=block/server
class PacketServerBase

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
packetPushed inet::Packet
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
outgoingDataRate outgoing datarate throughput(packetPushed) vector bps linear
incomingDataRate incoming datarate throughput(packetPulled) vector bps linear
outgoingPacketLengths outgoing packet lengths packetLength(packetPushed) sum, histogram, vector b none
incomingPacketLengths incoming packet lengths packetLength(packetPulled) sum, histogram, vector b none
incomingPackets incoming packets packetPulled count pk
outgoingPackets outgoing packets packetPushed count pk

Source code

//
// This is a base module for various packet server modules.
//
// @see ~IPacketServer
//
simple PacketServerBase extends PacketProcessorBase
{
    parameters:
        displayStringTextFormat = default("served %p pk (%l)");
        @class(PacketServerBase);
        @display("i=block/server");
        @signal[packetPushed](type=inet::Packet);
        @signal[packetPulled](type=inet::Packet);
        // the statistical value is the incoming packet
        @statistic[incomingPackets](title="incoming packets"; source=packetPulled; record=count; unit=pk);
        // the statistical value is the length of the incoming packet
        @statistic[incomingPacketLengths](title="incoming packet lengths"; source=packetLength(packetPulled); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the incoming packets
        @statistic[incomingDataRate](title="incoming datarate"; source=throughput(packetPulled); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the outgoing packet
        @statistic[outgoingPackets](title="outgoing packets"; source=packetPushed; record=count; unit=pk);
        // the statistical value is the length of the outgoing packet
        @statistic[outgoingPacketLengths](title="outgoing packet lengths"; source=packetLength(packetPushed); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the outgoing packets
        @statistic[outgoingDataRate](title="outgoing datarate"; source=throughput(packetPushed); record=vector; unit=bps; interpolationmode=linear);
    gates:
        input in;
        output out;
}
File: src/inet/queueing/base/PacketServerBase.ned