PacketGate

Package: inet.queueing.gate

PacketGate

simple module

C++ definition

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

PacketGate

Inheritance diagram

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

Used in

Name Type Description
Gate1TutorialStep network (no description)
Gate2TutorialStep network (no description)

Extends

Name Type Description
PacketGateBase simple module

This is a base module for various packet gate modules.

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
clockModule string ""

relative path of a module that implements IClock(1,2); optional

initiallyOpen bool false
openTime double
closeTime double

Properties

Name Value Description
display i=block/cogwheel
class PacketGate

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 module allows or forbids packets to pass through depending on whether
// the gate is open or closed.
//
simple PacketGate extends PacketGateBase like IPacketGate
{
    parameters:
        string clockModule = default(""); // relative path of a module that implements IClock; optional
        bool initiallyOpen = default(false);
        double openTime @unit(s);
        double closeTime @unit(s);
        @class(PacketGate);
}
File: src/inet/queueing/gate/PacketGate.ned