ClientHost2

Package: inet.tutorials.protocol

ClientHost2

compound module

(no description)

app : ActivePacketSource

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

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

Receives packets from the upper layer as a whole.

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

Usage diagram

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

Used in

Name Type Description
Network2 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

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 ClientHost2
{
    parameters:
        @display("i=device/pc");
    gates:
        output out;
    submodules:
        app: ActivePacketSource {
            @display("p=150,100");
        }
        transmitter: PacketTransmitter {
            @display("p=150,200");
        }
    connections:
        app.out --> transmitter.in;
        transmitter.out --> out;
}

File: tutorials/protocol/Network2.ned