ForwardingService

Package: inet.tutorials.protocol

ForwardingService

compound module

(no description)

d1 : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
d1: MessageDispatcher {
    @display("p=300,100");
} forwarding : Forwarding

Source:
forwarding: Forwarding {
    @display("p=300,200");
} sendWithHopLimit : SendWithHopLimit

Source:
sendWithHopLimit: SendWithHopLimit {
    @display("p=150,300");
} receiveWithHopLimit : ReceiveWithHopLimit

Source:
receiveWithHopLimit: ReceiveWithHopLimit {
    @display("p=450,300");
}

Usage diagram

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

Used in compound modules

Name Type Description
Node compound module (no description)

Properties

Name Value Description
display i=block/routing

Gates

Name Direction Size Description
upperLayerIn input
upperLayerOut output
lowerLayerIn input
lowerLayerOut output

Unassigned submodule parameters

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

d1.interfaceTableModule string

Module path to the ~InterfaceTable module

d1.forwardServiceRegistration bool true
d1.forwardProtocolRegistration bool true
d1.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

d1.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

d1.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

forwarding.displayStringTextFormat string ""

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

forwarding.address string ""
sendWithHopLimit.displayStringTextFormat string ""

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

sendWithHopLimit.hopLimit int
receiveWithHopLimit.displayStringTextFormat string ""

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

Source code

module ForwardingService
{
    parameters:
        @display("i=block/routing");
    gates:
        input upperLayerIn @loose;
        output upperLayerOut @loose;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        d1: MessageDispatcher {
            @display("p=300,100");
        }
        forwarding: Forwarding {
            @display("p=300,200");
        }
        sendWithHopLimit: SendWithHopLimit {
            @display("p=150,300");
        }
        receiveWithHopLimit: ReceiveWithHopLimit {
            @display("p=450,300");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> d1.in++;
        d1.out++ --> forwarding.in;
        forwarding.out --> d1.in++;
        d1.out++ --> sendWithHopLimit.in;
        sendWithHopLimit.out --> { @display("m=s"); } --> lowerLayerOut;
        lowerLayerIn --> { @display("m=s"); } --> receiveWithHopLimit.in;
        receiveWithHopLimit.out --> d1.in++;
        d1.out++ --> { @display("m=n"); } --> upperLayerOut;
}

File: tutorials/protocol/Network91.ned