EthernetPreemptingPhyLayer

Package: inet.physicallayer.wired.ethernet

EthernetPreemptingPhyLayer

compound module

(no description)

c1 : PacketClassifier

This module connects one packet producer to multiple packet consumers.

Source:
c1: PacketClassifier {
    classifierClass = default("inet::PacketFragmentTagClassifier");
    @display("p=200,100");
} phyHeaderInserter : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
phyHeaderInserter: <default("EthernetPhyHeaderInserter")> like IPacketFlow {
    @display("p=100,200");
} fragmentPhyHeaderInserter : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
fragmentPhyHeaderInserter: <default("EthernetFragmentPhyHeaderInserter")> like IPacketFlow {
    @display("p=300,200");
} m1 : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
m1: PacketMultiplexer {
    @display("p=200,300");
} interFrameGapInserter : InterpacketGapInserter

Source:
interFrameGapInserter: InterpacketGapInserter {
    duration = default(96s / dropUnit(parent.bitrate));
    @display("p=200,400");
} outboundEmitter : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
outboundEmitter: <default("PacketEmitter")> like IPacketFlow {
    @display("p=200,500");
} transmitter : like IPacketTransmitter

StreamThroughTransmitter: This module receives packets from the upper layer as a stream and also sends signals to the...

Source:
transmitter: <default("StreamThroughTransmitter")> like IPacketTransmitter {
    datarate = default(parent.bitrate);
    @display("p=200,600");
} m2 : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
m2: PacketMultiplexer {
    @display("p=600,100");
} fragmentPhyHeaderChecker : like IPacketFilter

IPacketFilter: This module interface is implemented by packet filter modules.

Source:
fragmentPhyHeaderChecker: <default("EthernetFragmentPhyHeaderChecker")> like IPacketFilter {
    @display("p=700,200");
} phyHeaderChecker : like IPacketFilter

IPacketFilter: This module interface is implemented by packet filter modules.

Source:
phyHeaderChecker: <default("EthernetPhyHeaderChecker")> like IPacketFilter {
    @display("p=500,200");
} c2 : PacketClassifier

This module connects one packet producer to multiple packet consumers.

Source:
c2: PacketClassifier {
    classifierClass = default("inet::PacketEthernetPreambleTypeClassifier");
    @display("p=600,300");
} inboundEmitter : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
inboundEmitter: <default("PacketEmitter")> like IPacketFlow {
    @display("p=600,500");
} receiver : like IPacketReceiver

DestreamingReceiver: This module receives signals from the transmission medium (wire) as a stream.

Source:
receiver: <default("DestreamingReceiver")> like IPacketReceiver {
    datarate = default(parent.bitrate);
    @display("p=600,600");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the 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

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

m1.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

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

interFrameGapInserter.clockModule string ""

relative path of a module that implements IClock; optional

interFrameGapInserter.initialChannelBusy bool false

assume that channel was busy before the simulation started

interFrameGapInserter.duration double 96s / dropUnit(parent.bitrate)
m2.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

m2.forwardServiceRegistration bool true
m2.forwardProtocolRegistration bool true
c2.displayStringTextFormat string "classified %p pk (%l)"

determines the text that is written on top of the submodule

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

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