PacketGateBase

Package: inet.queueing.base

PacketGateBase

simple module

This is a base module for various packet gate modules.

See also: IPacketGate

Inheritance diagram

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

Known subclasses

Name Type Description
CreditBasedGate simple module

This module is a packet gate that operates based on the number of credits it contains. The gate is open if the number of credits is greater than the configured transmit credit limit, it is closed otherwise. The module attaches a CreditGateTag to all packets that pass through. The attached tag allows the gate module to determine if a packet belongs to it when the packet is eventually transmitted.

EligibilityTimeGate simple module

This module is a packet gate that operates based on the EligibilityTimeTag attached to the next packet waiting to be pulled through. The gate is closed if the eligibility time is greater than the current simulation time, it is open otherwise.

InteractiveGate simple module

This packet gate module allows or forbids packets to pass through depending on whether the gate is open or closed as specified by the parameter. The gate can also be controlled by the user by manually changing the open parameter from the graphical user interface while the simulation is paused.

PacketGate simple module

This module allows or forbids packets to pass through depending on whether the gate is open or closed.

PeriodicGate simple module

This module allows or forbids packets to pass through depending on whether the gate is open or closed. The gate is open and closed according to the list of change times periodically.

Extends

Name Type Description
PacketFlowBase simple module

This is a base module for various packet flow modules. A packet flow module passes or streams all pushed or pulled packets after processing them from its input to its output.

Parameters

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

determines the text that is written on top of the submodule

bitrate double nan bps
extraLength int 0b
extraDuration double 0s

Properties

Name Value Description
display i=block/cogwheel
class PacketGateBase

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
gateStateChanged bool

Statistics

Name Title Source Record Unit Interpolation Mode
gateState gate state gateStateChanged vector sample-hold

Source code

//
// This is a base module for various packet gate modules.
//
// @see ~IPacketGate
//
simple PacketGateBase extends PacketFlowBase
{
    parameters:
        displayStringTextFormat = default("passed %p pk (%l)");
        double bitrate @unit(bps) = default(nan bps);
        int extraLength @unit(b) = default(0b);
        double extraDuration @unit(s) = default(0s);
        @class(PacketGateBase);
        @display("i=block/cogwheel");
        @signal[gateStateChanged](type=bool);
        @statistic[gateState](title="gate state"; type=enum; enum=CLOSED,OPEN; source=gateStateChanged; record=vector; interpolationmode=sample-hold);
}
File: src/inet/queueing/base/PacketGateBase.ned