PeriodicGate

Package: inet.queueing.gate

simple module PeriodicGate

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.

inet.queueing.gate.PeriodicGatePeriodicGatesimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

Ieee8021qTimeAwareShaper

compound module

Implements the IEEE 802.1Q time aware shaper.

GatingPriorityQueue

compound module

Implements a priority queue with multiple inner queues each having its own periodic gate for packet selection and an optional shared memory buffer.

GatingQueue

compound module

Implements a queue having its own periodic gate.

Extends

Name

Type

Description

PacketGateBase

simple module

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

bitrate

double

nan bps

extraLength

int

0b

extraDuration

double

0s

clockModule

string

“”

Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional

initiallyOpen

bool

true

Specifies if the gate is initially open or closed

offset

double

0s

Specifies where the period starts in the list of gate state change durations; where it is in the period at the start

durations

object

[]

List of time durations within the period that determine if the gate is open or closed; period is the sum of the durations

scheduleForAbsoluteTime

bool

true

When a clock is used relative means that setting the clock will not affect the simulation time of the event

openSchedulingPriority

int

0

FES scheduling priority for the next gate open event

closeSchedulingPriority

int

0

FES scheduling priority for the next gate close event

enableImplicitGuardBand

bool

true

Implicit guard band means that a packet is not allowed to be forwarded if it cannot finish transmission before the end of window.

Properties

Name

Value

Description

class

PeriodicGate

display

i=block/cogwheel

Gates

Name

Direction

Size

Description

in

input

out

output

Signals

Name

Type

Unit

Description

gateStateChanged

bool

guardBandStateChanged

bool

packetPulledIn

inet::Packet

packetPulledOut

inet::Packet

packetPushedIn

inet::Packet

packetPushedOut

inet::Packet

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

flowIncomingDataRate

flow specific incoming data rate

throughput(demuxFlow(merge(packetPushedIn, packetPulledIn)))

vector

bps

linear

the statistical value is the flow specific data rate of the incoming packets

flowIncomingPacketLengths

flow specific incoming packet lengths

packetLength(demuxFlow(merge(packetPushedIn, packetPulledIn)))

sum,histogram,vector

b

none

the statistical value is the flow specific length of the incoming packet

flowOutgoingDataRate

flow specific outgoing data rate

throughput(demuxFlow(merge(packetPushedOut, packetPulledOut)))

vector

bps

linear

the statistical value is the flow specific data rate of the outgoing packets

flowOutgoingPacketLengths

flow specific outgoing packet lengths

packetLength(demuxFlow(merge(packetPushedOut, packetPulledOut)))

sum,histogram,vector

b

none

the statistical value is the flow specific length of the outgoing packet

gateState

gate state

gateStateChanged

vector

sample-hold

guardBandState

guard band state

guardBandStateChanged

vector

sample-hold

incomingDataRate

incoming data rate

throughput(merge(packetPushedIn, packetPulledIn))

vector

bps

linear

the statistical value is the data rate of the incoming packets

incomingPacketLengths

incoming packet lengths

packetLength(merge(packetPushedIn, packetPulledIn))

sum,histogram,vector

b

none

the statistical value is the length of the incoming packet

incomingPackets

incoming packets

merge(packetPushedIn, packetPulledIn)

count

pk

the statistical value is the incoming packet

outgoingDataRate

outgoing data rate

throughput(merge(packetPushedOut, packetPulledOut))

vector

bps

linear

the statistical value is the data rate of the outgoing packets

outgoingPacketLengths

outgoing packet lengths

packetLength(merge(packetPushedOut, packetPulledOut))

sum,histogram,vector

b

none

the statistical value is the length of the outgoing packet

outgoingPackets

outgoing packets

merge(packetPushedOut, packetPulledOut)

count

pk

the statistical value is the outgoing packet

Source code

//
// 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.
//
simple PeriodicGate extends PacketGateBase like IPacketGate
{
    parameters:
        string clockModule = default(""); // Relative path of a module that implements IClock; optional
        bool initiallyOpen @mutable = default(true); // Specifies if the gate is initially open or closed
        double offset @mutable @unit(s) = default(0s); // Specifies where the period starts in the list of gate state change durations; where it is in the period at the start
        object durations @mutable @unit(s) = default([]); // List of time durations within the period that determine if the gate is open or closed; period is the sum of the durations
        bool scheduleForAbsoluteTime = default(true); // When a clock is used relative means that setting the clock will not affect the simulation time of the event
        int openSchedulingPriority = default(0); // FES scheduling priority for the next gate open event
        int closeSchedulingPriority = default(0); // FES scheduling priority for the next gate close event
        bool enableImplicitGuardBand = default(true); // Implicit guard band means that a packet is not allowed to be forwarded if it cannot finish transmission before the end of window.
        @class(PeriodicGate);
        @signal[guardBandStateChanged](type=bool);
        @statistic[guardBandState](title="guard band state"; type=enum; enum=ON, OFF; source=guardBandStateChanged; record=vector; interpolationmode=sample-hold);
}

File: src/inet/queueing/gate/PeriodicGate.ned