SenderHost

Package: inet.tutorials.protocol

SenderHost

compound module

(no description)

sourceA : ActivePacketSource

An active packet source which pushes packets into the connected module.

Source:
sourceA: ActivePacketSource {
    @display("p=100,100");
} taggerA : PacketTagger

Attaches various request tags to packets.

Source:
taggerA: PacketTagger {
    @display("p=100,200");
} sourceB : ActivePacketSource

An active packet source which pushes packets into the connected module.

Source:
sourceB: ActivePacketSource {
    @display("p=200,100");
} taggerB : PacketTagger

Attaches various request tags to packets.

Source:
taggerB: PacketTagger {
    @display("p=200,200");
} sourceC : ActivePacketSource

An active packet source which pushes packets into the connected module.

Source:
sourceC: ActivePacketSource {
    @display("p=300,100");
} taggerC : PacketTagger

Attaches various request tags to packets.

Source:
taggerC: PacketTagger {
    @display("p=300,200");
} multiplexer1 : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
multiplexer1: PacketMultiplexer {
    @display("p=200,300");
} sequenceNumbering : SequenceNumbering

Adds sequence numbers to outgoing packets.

Source:
sequenceNumbering: SequenceNumbering {
    @display("p=200,400");
} pendingQueue : PacketQueue

Implements a configurable packet queue, which is suitable for use in MAC protocols, traffic...

Source:
pendingQueue: PacketQueue {
    @display("p=200,500");
} server : InstantServer

Repeatedly pulls packets from the connected packet provider and pushes the packet into the...

Source:
server: InstantServer {
    @display("p=200,600");
} fragmenter : FragmentNumberHeaderBasedDefragmenter

Source:
fragmenter: FragmentNumberHeaderBasedDefragmenter {
    @display("p=200,700");
} multiplexer2 : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
multiplexer2: PacketMultiplexer {
    @display("p=250,800");
} inProgressQueue : InProgressQueue

Specialized packet queue that only accepts packets with higher priority than those already in the...

Source:
inProgressQueue: InProgressQueue {
    @display("p=150,900");
} preemptingServer : PreemptingServer

Source:
preemptingServer: PreemptingServer {
    @display("p=250,1000");
} fcsInserter : EthernetFcsHeaderInserter

Inserts Ethernet FCS checksums as headers into packets to enable data integrity verification.

Source:
fcsInserter: EthernetFcsHeaderInserter {
    @display("p=200,1100");
} InterpacketGapInserter : InterpacketGapInserter

Enforces a minimum time gap between consecutive packets, which is important for protocols like...

Source:
InterpacketGapInserter: InterpacketGapInserter {
    @display("p=200,1200");
} transmitter : StreamThroughTransmitter

Receives packets from the upper layer as a stream and also sends signals to the transmission medium...

Source:
transmitter: StreamThroughTransmitter {
    @display("p=200,1300");
}

Usage diagram

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

Used in

Name Type Description
Network90 network (no description)

Properties

Name Value Description
networkNode
display i=device/pc

Gates

Name Direction Size Description
g output

Unassigned submodule parameters

Name Type Default value Description
sourceA.displayStringTextFormat string "created %p pk (%l)"

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

sourceA.packetNameFormat string "%a-%c"

See directives in module documentation

sourceA.packetRepresentation string "byteCount"

Determines the chunk of the packet data

sourceA.packetProtocol string "unknown"
sourceA.packetLength int
sourceA.packetData int -1
sourceA.attachCreationTimeTag bool true
sourceA.attachIdentityTag bool true
sourceA.attachDirectionTag bool true
sourceA.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sourceA.initialProductionOffset double -1s

Initial duration before which packets are not produced. When negative, then produce packet in initialize()

sourceA.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

sourceA.scheduleForAbsoluteTime bool true

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

taggerA.displayStringTextFormat string "tagged %p pk (%l)"

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

taggerA.dscp int -1

Specifies differentiated services code point

taggerA.ecn int -1

Specifies explicit congestion notification

taggerA.tos int -1

If not -1, set the Type Of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

taggerA.interfaceName string ""

Specifies outgoing interface, unused by default

taggerA.hopLimit int -1

Specifies network layer TTL, unused by default

taggerA.vlanId int -1

Specifies VLAN, unused by default

taggerA.pcp int -1

Specifies PCP, unused by default

taggerA.userPriority int -1

Specifies user priority, unused by default

taggerA.transmissionPower double nan W

Specifies signal transmission power, unused by default

taggerA.encapsulationProtocols object []
taggerA.filterClass string "inet::queueing::AnyPacketFilter"

Determines which packets are tagged

sourceB.displayStringTextFormat string "created %p pk (%l)"

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

sourceB.packetNameFormat string "%a-%c"

See directives in module documentation

sourceB.packetRepresentation string "byteCount"

Determines the chunk of the packet data

sourceB.packetProtocol string "unknown"
sourceB.packetLength int
sourceB.packetData int -1
sourceB.attachCreationTimeTag bool true
sourceB.attachIdentityTag bool true
sourceB.attachDirectionTag bool true
sourceB.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sourceB.initialProductionOffset double -1s

Initial duration before which packets are not produced. When negative, then produce packet in initialize()

sourceB.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

sourceB.scheduleForAbsoluteTime bool true

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

taggerB.displayStringTextFormat string "tagged %p pk (%l)"

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

taggerB.dscp int -1

Specifies differentiated services code point

taggerB.ecn int -1

Specifies explicit congestion notification

taggerB.tos int -1

If not -1, set the Type Of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

taggerB.interfaceName string ""

Specifies outgoing interface, unused by default

taggerB.hopLimit int -1

Specifies network layer TTL, unused by default

taggerB.vlanId int -1

Specifies VLAN, unused by default

taggerB.pcp int -1

Specifies PCP, unused by default

taggerB.userPriority int -1

Specifies user priority, unused by default

taggerB.transmissionPower double nan W

Specifies signal transmission power, unused by default

taggerB.encapsulationProtocols object []
taggerB.filterClass string "inet::queueing::AnyPacketFilter"

Determines which packets are tagged

sourceC.displayStringTextFormat string "created %p pk (%l)"

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

sourceC.packetNameFormat string "%a-%c"

See directives in module documentation

sourceC.packetRepresentation string "byteCount"

Determines the chunk of the packet data

sourceC.packetProtocol string "unknown"
sourceC.packetLength int
sourceC.packetData int -1
sourceC.attachCreationTimeTag bool true
sourceC.attachIdentityTag bool true
sourceC.attachDirectionTag bool true
sourceC.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sourceC.initialProductionOffset double -1s

Initial duration before which packets are not produced. When negative, then produce packet in initialize()

sourceC.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

sourceC.scheduleForAbsoluteTime bool true

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

taggerC.displayStringTextFormat string "tagged %p pk (%l)"

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

taggerC.dscp int -1

Specifies differentiated services code point

taggerC.ecn int -1

Specifies explicit congestion notification

taggerC.tos int -1

If not -1, set the Type Of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

taggerC.interfaceName string ""

Specifies outgoing interface, unused by default

taggerC.hopLimit int -1

Specifies network layer TTL, unused by default

taggerC.vlanId int -1

Specifies VLAN, unused by default

taggerC.pcp int -1

Specifies PCP, unused by default

taggerC.userPriority int -1

Specifies user priority, unused by default

taggerC.transmissionPower double nan W

Specifies signal transmission power, unused by default

taggerC.encapsulationProtocols object []
taggerC.filterClass string "inet::queueing::AnyPacketFilter"

Determines which packets are tagged

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

multiplexer1.forwardServiceRegistration bool true
multiplexer1.forwardProtocolRegistration bool true
sequenceNumbering.displayStringTextFormat string "processed %p pk (%l)"

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

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

pendingQueue.packetCapacity int -1

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

pendingQueue.dataCapacity int -1b

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

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

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

pendingQueue.bufferModule string ""

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

server.displayStringTextFormat string "served %p pk (%l)"

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

server.serveSchedulingPriority int -1

Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event

fragmenter.displayStringTextFormat string "processed %p pk (%l)"

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

fragmenter.deleteSelf bool false
fragmenter.headerPosition string "front"
multiplexer2.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

multiplexer2.forwardServiceRegistration bool true
multiplexer2.forwardProtocolRegistration bool true
inProgressQueue.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

inProgressQueue.packetCapacity int -1

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

inProgressQueue.dataCapacity int -1b

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

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

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

inProgressQueue.bufferModule string ""

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

preemptingServer.displayStringTextFormat string "served %p pk (%l)"

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

preemptingServer.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

preemptingServer.datarate double
fcsInserter.displayStringTextFormat string "processed %p pk (%l)"

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

fcsInserter.checksumMode string "declared"
fcsInserter.headerPosition string "front"
InterpacketGapInserter.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

InterpacketGapInserter.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

InterpacketGapInserter.initialChannelBusy bool false

Assume that the channel was busy before the simulation started

InterpacketGapInserter.duration double
transmitter.displayStringTextFormat string "processed %p pk (%l)"

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,2); optional

transmitter.datarate double

Source code

module SenderHost
{
    parameters:
        @networkNode;
        @display("i=device/pc");
    gates:
        output g;
    submodules:
        sourceA: ActivePacketSource {
            @display("p=100,100");
        }
        taggerA: PacketTagger {
            @display("p=100,200");
        }
        sourceB: ActivePacketSource {
            @display("p=200,100");
        }
        taggerB: PacketTagger {
            @display("p=200,200");
        }
        sourceC: ActivePacketSource {
            @display("p=300,100");
        }
        taggerC: PacketTagger {
            @display("p=300,200");
        }
        multiplexer1: PacketMultiplexer {
            @display("p=200,300");
        }
        sequenceNumbering: SequenceNumbering {
            @display("p=200,400");
        }
        pendingQueue: PacketQueue {
            @display("p=200,500");
        }
        server: InstantServer {
            @display("p=200,600");
        }
        fragmenter: FragmentNumberHeaderBasedDefragmenter {
            @display("p=200,700");
        }
        multiplexer2: PacketMultiplexer {
            @display("p=250,800");
        }
        inProgressQueue: InProgressQueue {
            @display("p=150,900");
        }
        preemptingServer: PreemptingServer {
            @display("p=250,1000");
        }
        fcsInserter: EthernetFcsHeaderInserter {
            @display("p=200,1100");
        }
        InterpacketGapInserter: InterpacketGapInserter {
            @display("p=200,1200");
        }
        transmitter: StreamThroughTransmitter {
            @display("p=200,1300");
        }
    connections:
        sourceA.out --> taggerA.in;
        sourceB.out --> taggerB.in;
        sourceC.out --> taggerC.in;
        taggerA.out --> multiplexer1.in++;
        taggerB.out --> multiplexer1.in++;
        taggerC.out --> multiplexer1.in++;
        multiplexer1.out --> sequenceNumbering.in;
        sequenceNumbering.out --> pendingQueue.in;
        pendingQueue.out --> server.in;
        server.out --> fragmenter.in;
        fragmenter.out --> multiplexer2.in++;
        multiplexer2.out --> inProgressQueue.in;
        inProgressQueue.out --> preemptingServer.in;
        // TODO:        preemptingServer.preemptedOut --> multiplexer2.in++;
        preemptingServer.out --> fcsInserter.in;
        fcsInserter.out --> InterpacketGapInserter.in;
        InterpacketGapInserter.out --> transmitter.in;
        transmitter.out --> g;
}

File: tutorials/protocol/Network90.ned