Compound Module MobileHost

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

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

See also: MFMobileHost, WirelessHost

NotificationBoard InterfaceTable RoutingTable TCPApp TCP UDPApp UDP PingApp NetworkLayer Ieee80211NicAdhoc BasicMobility

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.

Networks:

Name Type Description
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
labels node
display i=device/pocketpc_s

Gates:

Name Direction Size Description
radioIn input

Unassigned submodule parameters:

Name Type Default value Description
tcp.advertisedWindow int 14*this.mss

in bytes, corresponds with the maximal receiver buffer capacity (Note: normally, NIC queues should be at least this size)

tcp.delayedAcksEnabled bool false

delayed ACK algorithm (RFC 1122) enabled/disabled

tcp.nagleEnabled bool true

Nagle's algorithm (RFC 896) enabled/disabled

tcp.limitedTransmitEnabled bool false

Limited Transmit algorithm (RFC 3042) enabled/disabled (can be used for TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl)

tcp.increasedIWEnabled bool false

Increased Initial Window (RFC 3390) enabled/disabled

tcp.sackSupport bool false

Selective Acknowledgment (RFC 2018, 2883, 3517) support (header option) (SACK will be enabled for a connection if both endpoints support it)

tcp.windowScalingSupport bool false

Window Scale (RFC 1323) support (header option) (WS will be enabled for a connection if both endpoints support it)

tcp.timestampSupport bool false

Timestamps (RFC 1323) support (header option) (TS will be enabled for a connection if both endpoints support it)

tcp.mss int 536

Maximum Segment Size (RFC 793) (header option)

tcp.tcpAlgorithmClass string "TCPReno"

TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl/DumbTCP

tcp.sendQueueClass string "TCPVirtualDataSendQueue"

TCPVirtualDataSendQueue/TCPMsgBasedSendQueue

tcp.receiveQueueClass string "TCPVirtualDataRcvQueue"

TCPVirtualDataRcvQueue/TCPMsgBasedRcvQueue

tcp.recordStats bool true

recording of seqNum etc. into output vectors enabled/disabled

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.mgmt.frameCapacity int 100
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

max queue length in frames; only used if queueModule==""

wlan.mac.bitrate double
wlan.mac.rtsThresholdBytes int 2346B

longer messages will be sent using RTS/CTS

wlan.mac.retryLimit int -1

maximum number of retries per message, -1 means default

wlan.mac.cwMinData int -1

contention window for normal data frames, -1 means default

wlan.mac.cwMinBroadcast int -1

contention window for broadcast messages, -1 means default

wlan.mac.mtu int 1500
wlan.radio.channelNumber int 0

channel identifier

wlan.radio.transmitterPower double 20mW

power used for transmission of messages (in mW)

wlan.radio.bitrate double

(in bits/s)

wlan.radio.thermalNoise double -110dBm

base noise level (dBm)

wlan.radio.pathLossAlpha double 2

used by the path loss calculation

wlan.radio.shadowingDeviation double 0dB

used by the shadowing model calculation

wlan.radio.snirThreshold double 4dB

if signal-noise ratio is below this threshold, frame is considered noise (in dB)

wlan.radio.sensitivity double

received signals with power below sensitivity are ignored

Source code:

//
// Models a mobile host with a wireless (802.11b) card in ad-hoc mode.
// This model contains the new IEEE 802.11 implementation, Ieee80211Nic,
// and IP, TCP and UDP protocols. The mobility model can be
// dynamically specified with the mobilityType parameter.
//
// @see MFMobileHost, WirelessHost
//
module MobileHost
{
    parameters:
        @node();
        @labels(node,wireless-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: Ieee80211NicAdhoc {
            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];
}