WiseRouteNetworkLayer

Package: inet.networklayer.wiseroute

WiseRouteNetworkLayer

compound module

This module provides a simple network layer.

arp : GenericARP

TODO

Source:
arp: GenericARP {
    @display("p=50,50");
} np : WiseRoute

Wiseroute is a simple loop-free routing algorithm that builds a routing tree from a central network...

Source:
np: WiseRoute {
    parameters:
        arpModule = "^.arp";
        @display("p=85,95;q=queue");
    gates:
        lowerLayerIn[sizeof(parent.ifIn)];
        lowerLayerOut[sizeof(parent.ifOut)];
} echo : EchoProtocol

This module provides a mechanism to test network layer connectivity using echo request/response...

Source:
echo: EchoProtocol {
    parameters:
        @display("p=160,63");
}

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
interfaceTableModule string

Properties

Name Value Description
display i=block/fork

Gates

Name Direction Size Description
ifIn [ ] input
ifOut [ ] output
transportIn [ ] input
transportOut [ ] output
pingIn [ ] input
pingOut [ ] output

Unassigned submodule parameters

Name Type Default value Description
arp.interfaceTableModule string

The path to the InterfaceTable module

np.interfaceTableModule string
np.headerLength int 100b

length of the network packet header (in bits)

np.debug bool false

debug switch

np.trace bool false
np.useSimTracer bool false
np.sinkAddress string

sink node address

np.rssiThreshold double -50 dBm

RSSI threshold for route selection

np.routeFloodsInterval double 0 s

If set to zero, this node does not initiates route tree building. If set to a value larger than zero, this nodes periodically initiates route tree building.

Source code

//
// This module provides a simple network layer.
//
module WiseRouteNetworkLayer like INetworkLayer
{
    parameters:
        string interfaceTableModule;
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        @display("i=block/fork");

    gates:
        input ifIn[] @labels(INetworkDatagram);
        output ifOut[] @labels(INetworkDatagram);
        input transportIn[] @labels(ITransportPacket/down);
        output transportOut[] @labels(ITransportPacket/up);
        input pingIn[] @labels(PingPayload/down);
        output pingOut[] @labels(PingPayload/up);

    submodules:
        arp: GenericARP {
            @display("p=50,50");
        }
        np: WiseRoute {
            parameters:
                arpModule = "^.arp";
                @display("p=85,95;q=queue");
            gates:
                lowerLayerIn[sizeof(parent.ifIn)];
                lowerLayerOut[sizeof(parent.ifOut)];
        }
        echo: EchoProtocol {
            parameters:
                @display("p=160,63");
        }

    connections allowunconnected:
        for i=0..sizeof(transportIn)-1 {
            transportIn[i] --> { @display("m=n"); } --> np.upperLayerIn++;
        }
        for i=0..sizeof(transportOut)-1 {
            np.upperLayerOut++ --> { @display("m=n"); } --> transportOut[i];
        }

        np.upperLayerOut++ --> echo.localIn;
        np.upperLayerIn++ <-- echo.sendOut;

        for i=0..sizeof(pingOut)-1 {
            echo.pingOut++ --> { @display("m=n"); } --> pingOut[i];
        }
        for i=0..sizeof(pingIn)-1 {
            echo.pingIn++ <-- { @display("m=n"); } <-- pingIn[i];
        }

        for i=0..sizeof(ifIn)-1 {
            ifIn[i] --> { @display("m=s"); } --> np.lowerLayerIn[i];
        }
        for i=0..sizeof(ifOut)-1 {
            np.lowerLayerOut[i] --> { @display("m=s"); } --> ifOut[i];
        }
}
File: src/inet/networklayer/wiseroute/WiseRouteNetworkLayer.ned