EthernetPreemptingPhyLayer

Package: inet.physicallayer.wired.ethernet

compound module EthernetPreemptingPhyLayer

(no description)

EthernetPreemptingPhyLayerupperLayerIn --> c1.inc1.out++ --> phyHeaderInserter.inc1.out++ --> fragmentPhyHeaderInserter.inphyHeaderInserter.out --> m1.in++fragmentPhyHeaderInserter.out --> m1.in++m1.out --> interFrameGapInserter.ininterFrameGapInserter.out --> outboundEmitter.inoutboundEmitter.out --> transmitter.intransmitter.out --> lowerLayerOutlowerLayerIn --> receiver.inreceiver.out --> inboundEmitter.ininboundEmitter.out --> c2.inc2.out++ --> phyHeaderChecker.inc2.out++ --> fragmentPhyHeaderChecker.inphyHeaderChecker.out --> m2.in++fragmentPhyHeaderChecker.out --> m2.in++m2.out --> upperLayerOutc1: inet.queueing.classifier.PacketClassifier Connects one packet producer to multiple packet consumers. Source: c1: PacketClassifier { classifierClass = default("inet::PacketFragmentTagClassifier"); @display("p=200,100"); }c1phyHeaderInserter: inet.physicallayer.wired.ethernet.EthernetPhyHeaderInserter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: phyHeaderInserter: <default("EthernetPhyHeaderInserter")> like IPacketFlow { @display("p=100,200"); }phyHeaderInserterfragmentPhyHeaderInserter: inet.physicallayer.wired.ethernet.EthernetFragmentPhyHeaderInserter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: fragmentPhyHeaderInserter: <default("EthernetFragmentPhyHeaderInserter")> like IPacketFlow { @display("p=300,200"); }fragmentPhyHeaderInserterm1: inet.queueing.common.PacketMultiplexer Connects multiple packet producers to one packet consumer. Source: m1: PacketMultiplexer { @display("p=200,300"); }m1interFrameGapInserter: inet.protocolelement.common.InterpacketGapInserter Enforces a minimum time gap between consecutive packets, which is important for protocols like Et... Source: interFrameGapInserter: InterpacketGapInserter { duration = default(96s / dropUnit(parent.bitrate)); @display("p=200,400"); }interFrameGapInserteroutboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: outboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=200,500"); }outboundEmittertransmitter: inet.protocolelement.transceiver.StreamThroughTransmitter (like IPacketTransmitter) StreamThroughTransmitter: Receives packets from the upper layer as a stream and also sends signals to the transmission medi... Source: transmitter: <default("StreamThroughTransmitter")> like IPacketTransmitter { datarate = default(parent.bitrate); @display("p=200,600"); }transmitterm2: inet.queueing.common.PacketMultiplexer Connects multiple packet producers to one packet consumer. Source: m2: PacketMultiplexer { @display("p=600,100"); }m2fragmentPhyHeaderChecker: inet.physicallayer.wired.ethernet.EthernetFragmentPhyHeaderChecker (like IPacketFilter) IPacketFilter: Interface for packet filter modules. Source: fragmentPhyHeaderChecker: <default("EthernetFragmentPhyHeaderChecker")> like IPacketFilter { @display("p=700,200"); }fragmentPhyHeaderCheckerphyHeaderChecker: inet.physicallayer.wired.ethernet.EthernetPhyHeaderChecker (like IPacketFilter) IPacketFilter: Interface for packet filter modules. Source: phyHeaderChecker: <default("EthernetPhyHeaderChecker")> like IPacketFilter { @display("p=500,200"); }phyHeaderCheckerc2: inet.queueing.classifier.PacketClassifier Connects one packet producer to multiple packet consumers. Source: c2: PacketClassifier { classifierClass = default("inet::PacketEthernetPreambleTypeClassifier"); @display("p=600,300"); }c2inboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: inboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=600,500"); }inboundEmitterreceiver: inet.protocolelement.transceiver.DestreamingReceiver (like IPacketReceiver) DestreamingReceiver: Receives signals from the transmission medium (wire) as a stream. Source: receiver: <default("DestreamingReceiver")> like IPacketReceiver { datarate = default(parent.bitrate); @display("p=600,600"); }receiver

Usage diagram

Inheritance diagram

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

c1.displayStringTextFormat

string

“classified %p pk (%l)”

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

c1.reverseOrder

bool

false

c1.classifierClass

string

“inet::PacketFragmentTagClassifier”

Determines the output queue of packets, the parameter must be the name of a C++ class which implements the IPacketClassifierFunction interface and is registered via Register_Class

phyHeaderInserter.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

fragmentPhyHeaderInserter.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

m1.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

m1.forwardServiceRegistration

bool

true

m1.forwardProtocolRegistration

bool

true

interFrameGapInserter.displayStringTextFormat

string

“delayed %p pk (%l)\nifg: %g”

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

interFrameGapInserter.clockModule

string

“”

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

interFrameGapInserter.initialChannelBusy

bool

false

Assume that the channel was busy before the simulation started

interFrameGapInserter.duration

double

96s / dropUnit(parent.bitrate)

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

transmitter.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

transmitter.clockModule

string

“”

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

transmitter.datarate

double

parent.bitrate

m2.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

m2.forwardServiceRegistration

bool

true

m2.forwardProtocolRegistration

bool

true

fragmentPhyHeaderChecker.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

fragmentPhyHeaderChecker.backpressure

bool

false

phyHeaderChecker.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

phyHeaderChecker.backpressure

bool

false

c2.displayStringTextFormat

string

“classified %p pk (%l)”

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

c2.reverseOrder

bool

false

c2.classifierClass

string

“inet::PacketEthernetPreambleTypeClassifier”

Determines the output queue of packets, the parameter must be the name of a C++ class which implements the IPacketClassifierFunction interface and is registered via Register_Class

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

receiver.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

receiver.datarate

double

parent.bitrate

Source code

module EthernetPreemptingPhyLayer like IEthernetPhyLayer
{
    parameters:
        volatile double bitrate @unit(bps);
        outboundEmitter.signalName = "packetSentToLower";
        outboundEmitter.direction = "outbound";
        inboundEmitter.signalName = "packetReceivedFromLower";
        inboundEmitter.direction = "inbound";
        *.bitrate = default(this.bitrate);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        c1: PacketClassifier {
            classifierClass = default("inet::PacketFragmentTagClassifier");
            @display("p=200,100");
        }
        phyHeaderInserter: <default("EthernetPhyHeaderInserter")> like IPacketFlow {
            @display("p=100,200");
        }
        fragmentPhyHeaderInserter: <default("EthernetFragmentPhyHeaderInserter")> like IPacketFlow {
            @display("p=300,200");
        }
        m1: PacketMultiplexer {
            @display("p=200,300");
        }
        interFrameGapInserter: InterpacketGapInserter {
            duration = default(96s / dropUnit(parent.bitrate));
            @display("p=200,400");
        }
        outboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=200,500");
        }
        transmitter: <default("StreamThroughTransmitter")> like IPacketTransmitter {
            datarate = default(parent.bitrate);
            @display("p=200,600");
        }
        m2: PacketMultiplexer {
            @display("p=600,100");
        }
        fragmentPhyHeaderChecker: <default("EthernetFragmentPhyHeaderChecker")> like IPacketFilter {
            @display("p=700,200");
        }
        phyHeaderChecker: <default("EthernetPhyHeaderChecker")> like IPacketFilter {
            @display("p=500,200");
        }
        c2: PacketClassifier {
            classifierClass = default("inet::PacketEthernetPreambleTypeClassifier");
            @display("p=600,300");
        }
        inboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=600,500");
        }
        receiver: <default("DestreamingReceiver")> like IPacketReceiver {
            datarate = default(parent.bitrate);
            @display("p=600,600");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> c1.in;
        c1.out++ --> phyHeaderInserter.in;
        c1.out++ --> fragmentPhyHeaderInserter.in;
        phyHeaderInserter.out --> m1.in++;
        fragmentPhyHeaderInserter.out --> m1.in++;
        m1.out --> interFrameGapInserter.in;
        interFrameGapInserter.out --> outboundEmitter.in;
        outboundEmitter.out --> transmitter.in;
        transmitter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> receiver.in;
        receiver.out --> inboundEmitter.in;
        inboundEmitter.out --> c2.in;
        c2.out++ --> phyHeaderChecker.in;
        c2.out++ --> fragmentPhyHeaderChecker.in;
        phyHeaderChecker.out --> m2.in++;
        fragmentPhyHeaderChecker.out --> m2.in++;
        m2.out --> { @display("m=n"); } --> upperLayerOut;
}

File: src/inet/physicallayer/wired/ethernet/EthernetPreemptingPhyLayer.ned