Compound Module MFMobileHost

Package: inet.nodes.adhoc
File: src/nodes/adhoc/MFMobileHost.ned

Models a mobile host with a wireless (802.11b) card in ad-hoc mode. This model contains the Mobility Framework's 802.11 implementation, Nic80211, and IP, TCP and UDP protocols. The mobility model can be dynamically specified with the mobilityType parameter.

See also: MobileHost, WirelessHost

NotificationBoard InterfaceTable RoutingTable TCPApp TCP UDPApp UDP PingApp NetworkLayer Nic80211 BasicMobility

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Networks:

Net80211 (network) (no description)

Parameters:

Name Type Default value Description
numTcpApps int 0
numUdpApps int 0
tcpAppType string ""
udpAppType string ""
IPForward bool false
routingFile string ""
mobilityType string "NullMobility"

Properties:

Name Value Description
node
display i=device/pocketpc_s

Gates:

Name Direction Size Description
radioIn input

Unassigned submodule parameters:

Name Type Default value Description
tcp.mss int 1024

maximum segment size

tcp.advertisedWindow int 14*this.mss

in bytes (Note: normally, NIC queues should be at least this size)

tcp.tcpAlgorithmClass string "TCPReno"

TCPTahoe/TCPReno/TCPNoCongestionControl/DumbTCP

tcp.sendQueueClass string "TCPMsgBasedSendQueue"

TCPVirtualDataSendQueue/TCPMsgBasedSendQueue

tcp.receiveQueueClass string "TCPMsgBasedRcvQueue"

TCPVirtualDataRcvQueue/TCPMsgBasedRcvQueue

tcp.recordStats bool true

recording seqNum etc. into output vectors on/off

pingApp.destAddr string ""

destination IP or IPv6 address

pingApp.srcAddr string ""

source IP or IPv6 address (useful with multi-homing)

pingApp.packetSize double 56B

of ping payload, in bytes

pingApp.interval double 1s

time to wait between pings (can be random)

pingApp.hopLimit double 32

TTL or hopLimit for IP packets

pingApp.count double 0

stop after count ping requests, 0 means continuously

pingApp.startTime double uniform(0s,this.interval)

send first ping at startTime

pingApp.stopTime double 0s

send no pings after stopTime, 0 means forever

pingApp.printPing bool true

dump on stdout

networkLayer.ip.procDelay double 0s
networkLayer.arp.retryTimeout double 1s

number seconds ARP waits between retries to resolve an IP address

networkLayer.arp.retryCount int 3

number of times ARP will attempt to resolve an IP address

networkLayer.arp.cacheTimeout double 120s

number seconds unused entries in the cache will time out

wlan.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

wlan.mac.maxQueueSize int
wlan.mac.rtsCts bool false
wlan.mac.bitrate double
wlan.mac.broadcastBackoff int
wlan.mac.mtu int 1500
wlan.decider.debug bool false

debug switch

wlan.decider.snirThreshold double 4dB
wlan.decider.bitrate double
wlan.snrEval.channelNumber int

channel identifier

wlan.snrEval.debug bool false

debug switch

wlan.snrEval.transmitterPower double
wlan.snrEval.bitrate double
wlan.snrEval.headerLength int
wlan.snrEval.carrierFrequency double
wlan.snrEval.thermalNoise double
wlan.snrEval.pathLossAlpha double
wlan.snrEval.sensitivity double

Source code:

//
// Models a mobile host with a wireless (802.11b) card in ad-hoc mode.
// This model contains the Mobility Framework's 802.11 implementation, Nic80211,
// and IP, TCP and UDP protocols. The mobility model can be dynamically
// specified with the mobilityType parameter.
//
// @see MobileHost, WirelessHost
//
module MFMobileHost
{
    parameters:
        @node();
        int numTcpApps = default(0);
        int numUdpApps = default(0);
        string tcpAppType = default("");
        string udpAppType = default("");
        bool IPForward = default(false);
        string routingFile = default("");
        string mobilityType = default("NullMobility");
        @display("i=device/pocketpc_s");
    gates:
        input radioIn @directIn;
    submodules:
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,70");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=60,150");
        }
        routingTable: RoutingTable {
            parameters:
                IPForward = IPForward;
                routerId = "";
                routingFile = routingFile;
                @display("p=60,230");
        }
        tcpApp[numTcpApps]: <tcpAppType> like TCPApp {
            parameters:
                @display("p=163,67");
        }
        tcp: TCP {
            parameters:
                @display("p=163,154");
        }
        udpApp[numUdpApps]: <udpAppType> like UDPApp {
            parameters:
                @display("p=272,67");
        }
        udp: UDP {
            parameters:
                @display("p=272,154");
        }
        pingApp: PingApp {
            parameters:
                @display("p=343,200");
        }
        networkLayer: NetworkLayer {
            parameters:
                proxyARP = false;
                @display("p=248,247;q=queue");
            gates:
                ifIn[1];
                ifOut[1];
        }
        wlan: Nic80211 {
            parameters:
                @display("p=248,349;q=queue");
        }
        mobility: <mobilityType> like BasicMobility {
            parameters:
                @display("p=149,307");
        }
    connections allowunconnected:
        for i=0..numTcpApps-1 {
            tcpApp[i].tcpOut --> tcp.appIn++;
            tcpApp[i].tcpIn <-- tcp.appOut++;
        }

        tcp.ipOut --> networkLayer.tcpIn;
        tcp.ipIn <-- networkLayer.TCPOut;

        for i=0..numUdpApps-1 {
            udpApp[i].udpOut --> udp.appIn++;
            udpApp[i].udpIn <-- udp.appOut++;
        }

        udp.ipOut --> networkLayer.udpIn;
        udp.ipIn <-- networkLayer.udpOut;

        networkLayer.pingOut --> pingApp.pingIn;
        networkLayer.pingIn <-- pingApp.pingOut;

        // connections to network outside
        radioIn --> wlan.radioIn;
        wlan.uppergateOut --> networkLayer.ifIn[0];
        wlan.uppergateIn <-- networkLayer.ifOut[0];
}