PacketServerBase

Package: inet.queueing.base

PacketServerBase

simple module

C++ definition

Base module for various packet server modules.

<b>See also:</b> ~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

Repeatedly pulls packets from the connected packet provider and pushes the packet into the connected packet consumer without delay.

PacketServer simple 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

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

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, supports displaying pars, watches, and module-specific information

Properties

Name Value Description
class PacketServerBase
display i=block/server

Gates

Name Direction Size Description
in input
out output

Signals

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

Statistics

Name Title Source Record Unit Interpolation Mode Description
outgoingDataRate outgoing datarate throughput(packetPushed) vector bps linear

the statistical value is the data rate of the outgoing packets

incomingDataRate incoming datarate throughput(packetPulled) vector bps linear

the statistical value is the data rate of the incoming packets

outgoingPacketLengths outgoing packet lengths packetLength(packetPushed) sum, histogram, vector b none

the statistical value is the length of the outgoing packet

incomingPacketLengths incoming packet lengths packetLength(packetPulled) sum, histogram, vector b none

the statistical value is the length of the incoming packet

incomingPackets incoming packets packetPulled count pk

the statistical value is the incoming packet

outgoingPackets outgoing packets packetPushed count pk

the statistical value is the outgoing packet

Source code

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