ClientHost4

Package: inet.tutorials.protocol

ClientHost4

compound module

(no description)

app : ActivePacketSource

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

Source:
app: ActivePacketSource {
    @display("p=150,100");
} queue : PacketQueue

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

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

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

Source:
server: InstantServer {
    @display("p=150,300");
} fcsInserter : EthernetFcsHeaderInserter

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

Source:
fcsInserter: EthernetFcsHeaderInserter {
    @display("p=150,400");
} transmitter : PacketTransmitter

Receives packets from the upper layer as a whole.

Source:
transmitter: PacketTransmitter {
    @display("p=150,500");
}

Usage diagram

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

Used in

Name Type Description
Network4 network (no description)

Properties

Name Value Description
display i=device/pc

Gates

Name Direction Size Description
out output

Unassigned submodule parameters

Name Type Default value Description
app.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

app.packetNameFormat string "%a-%c"

See directives in module documentation

app.packetRepresentation string "byteCount"

Determines the chunk of the packet data

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

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

app.initialProductionOffset double -1s

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

app.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

app.scheduleForAbsoluteTime bool true

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

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

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

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"
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 ClientHost4
{
    parameters:
        @display("i=device/pc");
    gates:
        output out;
    submodules:
        app: ActivePacketSource {
            @display("p=150,100");
        }
        queue: PacketQueue {
            @display("p=150,200");
        }
        server: InstantServer {
            @display("p=150,300");
        }
        fcsInserter: EthernetFcsHeaderInserter {
            @display("p=150,400");
        }
        transmitter: PacketTransmitter {
            @display("p=150,500");
        }
    connections:
        app.out --> queue.in;
        queue.out --> server.in;
        server.out --> fcsInserter.in;
        fcsInserter.out --> transmitter.in;
        transmitter.out --> out;
}

File: tutorials/protocol/Network4.ned