EthernetStreamingMacLayer

Package: inet.linklayer.ethernet.modular

compound module EthernetStreamingMacLayer

(no description)

EthernetStreamingMacLayerupperLayerIn --> queue.inqueue.out --> streamer.instreamer.out --> outboundEmitter.inoutboundEmitter.out --> lowerLayerOutlowerLayerIn --> inboundEmitter.ininboundEmitter.out --> fcsChecker.infcsChecker.out --> upperLayerOutlifetimer: inet.protocolelement.contract.IPacketLifeTimer (like IPacketLifeTimer) Source: lifetimer: <default("")> like IPacketLifeTimer if typename != "" { @display("p=100,100;is=s"); }lifetimerqueue: inet.queueing.queue.PacketQueue (like IPacketQueue) PacketQueue: Implements a configurable packet queue, which is suitable for use in MAC protocols, traffic condi... IPacketQueue: Interface for packet queue modules. Source: queue: <default("PacketQueue")> like IPacketQueue { @display("p=200,100"); }queuestreamer: inet.protocolelement.common.PacketStreamer (like IPacketFlow) PacketStreamer: Takes packets passed to its input and streams them to its output. IPacketFlow: Interface for packet flows. Source: streamer: <default("PacketStreamer")> like IPacketFlow { @display("p=200,200"); }streameroutboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: outboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=200,300"); }outboundEmitterfcsChecker: inet.linklayer.ethernet.modular.EthernetFcsChecker (like IPacketFilter) IPacketFilter: Interface for packet filter modules. Source: fcsChecker: <default("EthernetFcsChecker")> like IPacketFilter { popFcs = default(false); @display("p=500,200"); }fcsCheckerinboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: inboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=500,300"); }inboundEmitter

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

EthernetPreemptingMacLayer

compound module

(no description)

Parameters

Name

Type

Default value

Description

bitrate

double

Properties

Name

Value

Description

display

i=block/layer

Gates

Name

Direction

Size

Description

upperLayerIn

input

upperLayerOut

output

lowerLayerIn

input

lowerLayerOut

output

Unassigned submodule parameters

Name

Type

Default value

Description

queue.displayStringTextFormat

string

“contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

queue.packetCapacity

int

-1

Maximum number of packets in the queue, no limit by default

queue.dataCapacity

int

-1b

Maximum total length of packets in the queue, no limit by default

queue.dropperClass

string

“”

Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class

queue.comparatorClass

string

“”

Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class

queue.bufferModule

string

“”

Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default

streamer.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

streamer.clockModule

string

“”

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

streamer.datarate

double

nan bps

outboundEmitter.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

outboundEmitter.packetFilter

object

“*”

Which packets are considered, matches all packets by default

outboundEmitter.direction

string

“undefined”

outboundEmitter.signalName

string

fcsChecker.displayStringTextFormat

string

“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

fcsChecker.backpressure

bool

false

fcsChecker.popFcs

bool

false

inboundEmitter.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

inboundEmitter.packetFilter

object

“*”

Which packets are considered, matches all packets by default

inboundEmitter.direction

string

“undefined”

inboundEmitter.signalName

string

Source code

module EthernetStreamingMacLayer like IEthernetMacLayer
{
    parameters:
        double bitrate @unit(bps);
        *.bitrate = default(this.bitrate);
        lifetimer.collectionModule = default("^.queue");
        streamer.minPacketLength = 60B;
        outboundEmitter.signalName = "packetSentToLower";
        outboundEmitter.direction = "outbound";
        inboundEmitter.signalName = "packetReceivedFromLower";
        inboundEmitter.direction = "inbound";
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        lifetimer: <default("")> like IPacketLifeTimer if typename != "" {
            @display("p=100,100;is=s");
        }
        queue: <default("PacketQueue")> like IPacketQueue {
            @display("p=200,100");
        }
        streamer: <default("PacketStreamer")> like IPacketFlow {
            @display("p=200,200");
        }
        outboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=200,300");
        }
        fcsChecker: <default("EthernetFcsChecker")> like IPacketFilter {
            popFcs = default(false);
            @display("p=500,200");
        }
        inboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=500,300");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> queue.in;
        queue.out --> streamer.in;
        streamer.out --> outboundEmitter.in;
        outboundEmitter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> inboundEmitter.in;
        inboundEmitter.out --> fcsChecker.in;
        fcsChecker.out --> { @display("m=n"); } --> upperLayerOut;
}

File: src/inet/linklayer/ethernet/modular/EthernetStreamingMacLayer.ned