| Name | Type | Description |
|---|---|---|
| MobileDTRoutingHost | compound module |
Models a mobile host with a wireless (802.11g) card in ad-hoc mode. This model contains the new IEEE 802.11 implementation, Ieee80211gNicAdhoc, and IP, TCP and UDP protocols. The mobility model can be dynamically specified with the mobilityType parameter.Supports opportunistic routing protocols by setting the **dtrouting.saorsmanager.routingProtocol parameter. |
// // Copyright (C) 2012 Nikolaos Vastardis // Copyright (C) 2012 University of Essex // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // package saors.simulations; import inet.applications.pingapp.PingApp; import inet.applications.tcpapp.TCPApp; import inet.applications.udpapp.UDPApp; import inet.base.NotificationBoard; import inet.mobility.BasicMobility; import inet.linklayer.ieee80211.Ieee80211NicAdhoc; import inet.linklayer.ieee80211.Ieee80211aNicAdhoc; import inet.linklayer.ieee80211.Ieee80211gNicAdhoc; import inet.networklayer.common.InterfaceTable; import inet.networklayer.ipv4.RoutingTable; import inet.nodes.inet.NetworkLayerGlobalArp; import inet.transport.tcp.TCP; import inet.transport.udp.UDP;; import inet.linklayer.ieee80211.Ieee80211NewNicAdhoc; import saors.DTRouting.DTRouting; // // Models a mobile host with a wireless (802.11g) card in ad-hoc mode. // This model contains the new IEEE 802.11 implementation, Ieee80211gNicAdhoc, // and IP, TCP and UDP protocols. The mobility model can be dynamically // specified with the mobilityType parameter.Supports opportunistic routing // protocols by setting the // **dtrouting.saorsmanager.routingProtocol // parameter. // // @see MFMobileHost, WirelessHost, DTRouting, SaorsManager // // @author: Nikolaos Vastardis // module MobileDTRoutingHost { parameters: @node(); int numTcpApps = default(0); int numUdpApps = default(0); string tcpAppType = default(""); string udpAppType = default(""); string routingFile = default(""); string mobilityType = default("NullMobility"); @display("i=device/pocketpc_s;bgb=591,451"); gates: input radioIn @directIn; submodules: notificationBoard: NotificationBoard { parameters: @display("p=83,54"); } interfaceTable: InterfaceTable { parameters: @display("p=83,173"); } routingTable: RoutingTable { parameters: IPForward = true; routerId = ""; routingFile = routingFile; @display("p=83,277"); } tcpApp[numTcpApps]: <tcpAppType> like TCPApp { parameters: @display("p=227,54"); } tcp: TCP { parameters: @display("p=227,173"); } udpApp[numUdpApps]: <udpAppType> like UDPApp { parameters: @display("p=385,54"); } udp: UDP { parameters: @display("p=385,173"); } pingApp: PingApp { parameters: @display("p=524,233"); } networkLayer: NetworkLayerGlobalArp { parameters: proxyARP = false; globalARP = true; @display("p=385,277;q=queue"); gates: ifIn[1]; ifOut[1]; } dtrouting: DTRouting { parameters: @display("p=227,277"); } wlan: Ieee80211gNicAdhoc { //wlan: Ieee80211NewNicAdhoc { parameters: @display("p=385,379;q=queue"); } mobility: <mobilityType> like BasicMobility { parameters: @display("p=227,366"); } 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; networkLayer.MANETOut --> dtrouting.from_ip; networkLayer.MANETIn <-- dtrouting.to_ip; // connections to network outside radioIn --> wlan.radioIn; wlan.uppergateOut --> networkLayer.ifIn[0]; wlan.uppergateIn <-- networkLayer.ifOut[0]; }