Permalink
Browse files

Merge branch traci from inet-sommer

  • Loading branch information...
2 parents 9395207 + 0d64c0e commit bec0647fb16bdcf47195be40731d2d4fa49e15c1 @sommer sommer committed Jun 15, 2012
Showing with 100,487 additions and 232 deletions.
  1. +677 −0 etc/sumo-launchd.py
  2. +45 −0 examples/hostautoconf/Host.ned
  3. +3 −0 examples/hostautoconf/README
  4. +39 −0 examples/hostautoconf/Scenario.ned
  5. +67 −0 examples/hostautoconf/omnetpp.ini
  6. +1 −0 examples/hostautoconf/run
  7. +1 −0 examples/hostautoconf/run.cmd
  8. +96 −0 examples/traci/Car.ned
  9. +37 −0 examples/traci/Highway.ned
  10. +5 −0 examples/traci/README
  11. +2 −0 examples/traci/debug
  12. +2 −0 examples/traci/memcheck
  13. +48,199 −0 examples/traci/net.net.xml
  14. +65 −0 examples/traci/omnetpp.ini
  15. +15 −0 examples/traci/routes.rou.xml
  16. +2 −0 examples/traci/run
  17. +25 −0 examples/traci/scenario.ned
  18. +18 −0 examples/traci/sumo.sumo.cfg
  19. +96 −0 examples/traci_launchd/Car.ned
  20. +37 −0 examples/traci_launchd/Highway.ned
  21. +6 −0 examples/traci_launchd/README
  22. +2 −0 examples/traci_launchd/debug
  23. +2 −0 examples/traci_launchd/memcheck
  24. +48,199 −0 examples/traci_launchd/net.net.xml
  25. +66 −0 examples/traci_launchd/omnetpp.ini
  26. +15 −0 examples/traci_launchd/routes.rou.xml
  27. +2 −0 examples/traci_launchd/run
  28. +25 −0 examples/traci_launchd/scenario.ned
  29. +8 −0 examples/traci_launchd/sumo-launchd.launch.xml
  30. +14 −0 examples/traci_launchd/sumo.sumo.cfg
  31. +85 −0 src/applications/traci/TraCIDemo.cc
  32. +58 −0 src/applications/traci/TraCIDemo.h
  33. +34 −0 src/applications/traci/TraCIDemo.ned
  34. +213 −0 src/applications/traci/TraCITestApp.cc
  35. +59 −0 src/applications/traci/TraCITestApp.h
  36. +33 −0 src/applications/traci/TraCITestApp.ned
  37. +1 −0 src/linklayer/radio/Radio.cc
  38. +173 −172 src/mobility/models/TraCIMobility.cc
  39. +28 −7 src/mobility/models/TraCIMobility.h
  40. +12 −4 src/mobility/models/TraCIMobility.ned
  41. +107 −0 src/networklayer/autorouting/HostAutoConfigurator.cc
  42. +48 −0 src/networklayer/autorouting/HostAutoConfigurator.h
  43. +35 −0 src/networklayer/autorouting/HostAutoConfigurator.ned
  44. +5 −12 src/world/radio/ChannelAccess.cc
  45. +1 −1 src/world/radio/ChannelAccess.h
  46. +56 −11 src/world/traci/TraCIScenarioManager.cc
  47. +41 −8 src/world/traci/TraCIScenarioManager.h
  48. +18 −5 src/world/traci/TraCIScenarioManager.ned
  49. +1 −1 src/world/traci/TraCIScenarioManagerLaunchd.cc
  50. +15 −3 src/world/traci/TraCIScenarioManagerLaunchd.h
  51. +21 −8 src/world/traci/TraCIScenarioManagerLaunchd.ned
  52. +89 −0 tests/traci/Car.ned
  53. +41 −0 tests/traci/Highway.ned
  54. +71 −0 tests/traci/net.edg.xml
  55. +1,298 −0 tests/traci/net.net.xml
  56. +17 −0 tests/traci/net.netconvert.cfg
  57. +38 −0 tests/traci/net.nod.xml
  58. +63 −0 tests/traci/omnetpp.ini
  59. +1 −0 tests/traci/package.ned
  60. +3 −0 tests/traci/polys.poly.xml
  61. +5 −0 tests/traci/routes.rou.xml
  62. +3 −0 tests/traci/runTest.sh
  63. +10 −0 tests/traci/sumo-launchd.launch.xml
  64. +15 −0 tests/traci/sumo.sumo.cfg
  65. +18 −0 tests/traci/tls.tls.xml
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,45 @@
+//
+// Copyright (C) 2006,2007 Christoph Sommer <christoph.sommer@informatik.uni-erlangen.de>
+//
+// 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 inet.examples.hostautoconf;
+
+import inet.applications.udpapp.UDPBasicApp;
+import inet.base.NotificationBoard;
+import inet.linklayer.mf80211.Nic80211;
+import inet.mobility.models.RandomWPMobility;
+import inet.networklayer.common.InterfaceTable;
+import inet.networklayer.ipv4.RoutingTable;
+import inet.nodes.inet.WirelessHost;
+import inet.transport.udp.UDP;
+import inet.networklayer.autorouting.HostAutoConfigurator;
+
+//
+// Wireless-enabled Host
+//
+module Host extends WirelessHost
+{
+ parameters:
+ @display("i=device/cellphone");
+
+ submodules:
+ ac_wlan: HostAutoConfigurator {
+ @display("p=171,335");
+ }
+
+}
+
@@ -0,0 +1,3 @@
+Example illustrating how to use the HostAutoConfigurator
+to automatically assign IP addresses to wireless hosts at runtime.
+
@@ -0,0 +1,39 @@
+//
+// Copyright (C) 2006,2007 Christoph Sommer <christoph.sommer@informatik.uni-erlangen.de>
+//
+// 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 inet.examples.hostautoconf;
+
+import inet.nodes.ethernet.EtherSwitch;
+import inet.world.radio.ChannelControl;
+
+network Scenario
+{
+ parameters:
+ double hosts;
+
+ submodules:
+ channelControl: ChannelControl {
+ parameters:
+ @display("p=44,-46;i=misc/sun");
+ }
+ host[hosts]: Host {
+ parameters:
+ @display("i=device/wifilaptop_vs");
+ }
+ connections allowunconnected:
+}
@@ -0,0 +1,67 @@
+[General]
+debug-on-errors = true
+
+network = Scenario
+sim-time-limit = 60min
+
+cmdenv-express-mode = true
+
+*.hosts = 3
+
+**.constraintAreaMinX = 0m
+**.constraintAreaMinY = 0m
+**.constraintAreaMinZ = 0m
+**.constraintAreaMaxX = 600m
+**.constraintAreaMaxY = 400m
+**.constraintAreaMaxZ = 0m
+**.debug = true
+**.coreDebug = false
+**.host*.**.channelNumber = 0
+
+# channel physical parameters
+*.channelControl.carrierFrequency = 2.4GHz
+*.channelControl.pMax = 2.0mW
+*.channelControl.sat = -110dBm
+*.channelControl.alpha = 2
+*.channelControl.numChannels = 1
+
+# mobility
+**.host*.mobilityType = "MassMobility"
+**.host*.mobility.initFromDisplayString = false
+**.host*.mobility.changeInterval = truncnormal(2s, 0.5s)
+**.host*.mobility.changeAngleBy = normal(0deg, 30deg)
+**.host*.mobility.speed = truncnormal(20mps, 8mps)
+**.host*.mobility.updateInterval = 100ms
+**.host*.ac_wlan.interfaces = "wlan0"
+
+# UDPBasicApp / UDPSink
+**.numUdpApps = 1
+**.udpApp[0].typename = "UDPBasicApp"
+**.udpApp[0].destAddresses = "host[0]"
+**.udpApp[0].localPort = 9001
+**.udpApp[0].destPort = 9001
+**.udpApp[0].messageLength = 100B
+**.udpApp[0].startTime = uniform(10s, 30s)
+**.udpApp[0].sendInterval = uniform(10s, 30s)
+
+# nic settings
+**.wlan[*].mgmtType = "Ieee80211MgmtAdhoc"
+
+**.wlan[*].mgmt.frameCapacity = 10
+**.wlan[*].mac.address = "auto"
+**.wlan[*].mac.maxQueueSize = 14
+**.wlan[*].mac.rtsThresholdBytes = 3000B
+**.wlan[*].mac.bitrate = 2Mbps
+**.wlan[*].mac.retryLimit = 7
+**.wlan[*].mac.cwMinData = 7
+**.wlan[*].mac.cwMinBroadcast = 31
+
+**.wlan[*].radio.bitrate = 2Mbps
+**.wlan[*].radio.transmitterPower = 2mW
+**.wlan[*].radio.thermalNoise = -110dBm
+**.wlan[*].radio.sensitivity = -85dBm
+**.wlan[*].radio.pathLossAlpha = 2
+**.wlan[*].radio.snirThreshold = 4dB
+
+**.udpapp.*.vector-recording = true
+**.vector-recording = true
@@ -0,0 +1 @@
+../../src/run_inet -n .:../../src $*
@@ -0,0 +1 @@
+..\..\src\run_inet -n .;../../src %*
View
@@ -0,0 +1,96 @@
+//
+// Copyright (C) 2006-2012 Christoph Sommer <christoph.sommer@uibk.ac.at>
+//
+// Documentation for these modules is at http://veins.car2x.org/
+//
+// 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 inet.examples.traci;
+
+import inet.base.NotificationBoard;
+import inet.networklayer.autorouting.HostAutoConfigurator;
+import inet.networklayer.common.InterfaceTable;
+import inet.applications.traci.TraCIDemo;
+import inet.mobility.models.TraCIMobility;
+import inet.networklayer.ipv4.RoutingTable;
+import inet.transport.udp.UDP;
+import inet.nodes.inet.NetworkLayer;
+import inet.linklayer.ieee80211.Ieee80211Nic;
+
+module Car
+{
+ parameters:
+ @node();
+
+ gates:
+ input radioIn @directIn;
+
+ submodules:
+ notificationBoard: NotificationBoard {
+ parameters:
+ @display("p=140,462");
+ }
+ ac_wlan: HostAutoConfigurator {
+ @display("p=296,402");
+ }
+ interfaceTable: InterfaceTable {
+ parameters:
+ @display("p=140,326");
+ }
+ app: TraCIDemo {
+ parameters:
+ @display("p=384,46");
+ }
+ mobility: TraCIMobility {
+ parameters:
+ @display("p=60,459");
+ }
+ routingTable: RoutingTable {
+ parameters:
+ IPForward = true;
+ routerId = "";
+ routingFile = "";
+ @display("p=60,326");
+ }
+ udp: UDP {
+ parameters:
+ @display("p=384,146");
+ }
+ networkLayer: NetworkLayer {
+ parameters:
+ proxyARP = false;
+ @display("p=304,327;q=queue");
+ gates:
+ ifIn[1];
+ ifOut[1];
+ }
+ wlan: Ieee80211Nic {
+ parameters:
+ @display("p=304,461;q=queue");
+ }
+ connections allowunconnected:
+ udp.appOut++ --> app.udp$i;
+ udp.appIn++ <-- app.udp$o;
+
+ udp.ipOut --> networkLayer.udpIn;
+ udp.ipIn <-- networkLayer.udpOut;
+
+ wlan.upperLayerOut --> networkLayer.ifIn[0];
+ wlan.upperLayerIn <-- networkLayer.ifOut[0];
+
+ radioIn --> wlan.radioIn;
+}
+
View
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 2006-2012 Christoph Sommer <christoph.sommer@uibk.ac.at>
+//
+// Documentation for these modules is at http://veins.car2x.org/
+//
+// 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 inet.examples.traci;
+
+import inet.world.radio.ChannelControl;
+import inet.world.traci.TraCIScenarioManager;
+
+module Highway
+{
+ submodules:
+ channelControl: ChannelControl {
+ parameters:
+ @display("p=256,128");
+ }
+ manager: TraCIScenarioManager {
+ parameters:
+ @display("p=512,128");
+ }
+}
View
@@ -0,0 +1,5 @@
+TraCI client modules to connect OMNeT++ and the SUMO road traffic simulator.
+
+This simulation requires SUMO to be started and listening for TraCI commands
+on a TCP socket, e.g. using "sumo-guisim -c sumo.sumo.cfg".
+
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+gdb --args opp_run -l../../src/inet -n"../../src;.." "$@"
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+valgrind --tool=memcheck --leak-check=full --dsymutil=yes --log-file=valgrind.out -- opp_run -l../../src/inet -n"../../src;.." "$@"
Oops, something went wrong.

0 comments on commit bec0647

Please sign in to comment.