EthernetPhyLayer

Package: inet.physicallayer.wired.ethernet

compound module EthernetPhyLayer

(no description)

EthernetPhyLayerupperLayerIn --> phyHeaderInserter.inphyHeaderInserter.out --> interFrameGapInserter.ininterFrameGapInserter.out --> outboundEmitter.inoutboundEmitter.out --> cutthroughSink.incutthroughSink.out --> transmitter.intransmitter.out --> lowerLayerOutlowerLayerIn --> receiver.inreceiver.out --> cutthroughSource.incutthroughSource.out --> inboundEmitter.ininboundEmitter.out --> phyHeaderChecker.inphyHeaderChecker.out --> upperLayerOutphyHeaderInserter: inet.physicallayer.wired.ethernet.EthernetPhyHeaderInserter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: phyHeaderInserter: <default("EthernetPhyHeaderInserter")> like IPacketFlow { @display("p=200,100"); }phyHeaderInserterinterFrameGapInserter: 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)); // 96 bits / <bitrate> bps @display("p=200,200"); }interFrameGapInserteroutboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: outboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=200,300"); }outboundEmittercutthroughSink: inet.queueing.contract.IPacketFlow (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: cutthroughSink: <default("")> like IPacketFlow { @display("p=200,400"); }cutthroughSinktransmitter: inet.protocolelement.transceiver.PacketTransmitter (like IPacketTransmitter) PacketTransmitter: Receives packets from the upper layer as a whole. Source: transmitter: <default("PacketTransmitter")> like IPacketTransmitter { datarate = default(parent.bitrate); @display("p=200,500"); }transmitterphyHeaderChecker: inet.physicallayer.wired.ethernet.EthernetPhyHeaderChecker (like IPacketFilter) IPacketFilter: Interface for packet filter modules. Source: phyHeaderChecker: <default("EthernetPhyHeaderChecker")> like IPacketFilter { @display("p=500,100"); }phyHeaderCheckerinboundEmitter: inet.protocolelement.common.PacketEmitter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: inboundEmitter: <default("PacketEmitter")> like IPacketFlow { @display("p=500,300"); }inboundEmittercutthroughSource: inet.queueing.contract.IPacketFlow (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: cutthroughSource: <default("")> like IPacketFlow { @display("p=500,400"); }cutthroughSourcereceiver: inet.protocolelement.transceiver.PacketReceiver (like IPacketReceiver) PacketReceiver: Receives signals from the physical medium (wire) as a whole. Source: receiver: <default("PacketReceiver")> like IPacketReceiver { datarate = default(parent.bitrate); @display("p=500,500"); }receiver

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

LayeredEthernetInterface

compound module

Implements an Ethernet network interface.

Known subclasses

Name

Type

Description

EthernetStreamingPhyLayer

compound module

(no description)

EthernetStreamThroughPhyLayer

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

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

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

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

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 EthernetPhyLayer like IEthernetPhyLayer
{
    parameters:
        volatile double bitrate @unit(bps);
        outboundEmitter.signalName = "packetSentToLower";
        outboundEmitter.direction = "outbound";
        inboundEmitter.signalName = "packetReceivedFromLower";
        inboundEmitter.direction = "inbound";
        *.bitrate = default(this.bitrate);
        *.datarate = default(this.bitrate);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        phyHeaderInserter: <default("EthernetPhyHeaderInserter")> like IPacketFlow {
            @display("p=200,100");
        }
        interFrameGapInserter: InterpacketGapInserter {
            duration = default(96s / dropUnit(parent.bitrate));  // 96 bits / <bitrate> bps
            @display("p=200,200");
        }
        outboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=200,300");
        }
        cutthroughSink: <default("")> like IPacketFlow {
            @display("p=200,400");
        }
        transmitter: <default("PacketTransmitter")> like IPacketTransmitter {
            datarate = default(parent.bitrate);
            @display("p=200,500");
        }
        phyHeaderChecker: <default("EthernetPhyHeaderChecker")> like IPacketFilter {
            @display("p=500,100");
        }
        inboundEmitter: <default("PacketEmitter")> like IPacketFlow {
            @display("p=500,300");
        }
        cutthroughSource: <default("")> like IPacketFlow {
            @display("p=500,400");
        }
        receiver: <default("PacketReceiver")> like IPacketReceiver {
            datarate = default(parent.bitrate);
            @display("p=500,500");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> phyHeaderInserter.in;
        phyHeaderInserter.out --> interFrameGapInserter.in;
        interFrameGapInserter.out --> outboundEmitter.in;
        outboundEmitter.out --> cutthroughSink.in;
        cutthroughSink.out --> transmitter.in;
        transmitter.out --> { @display("m=s"); } --> lowerLayerOut;

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

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