Skip to content

Commit

Permalink
Merged TraCI module taken from https://github.com/sommer/inet-sommer @
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornig committed Jun 18, 2012
1 parent ba9d76e commit cd7fd58
Show file tree
Hide file tree
Showing 53 changed files with 100,134 additions and 219 deletions.
677 changes: 677 additions & 0 deletions etc/sumo-launchd.py

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions examples/traci/Car.ned
@@ -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;
}

37 changes: 37 additions & 0 deletions examples/traci/Highway.ned
@@ -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");
}
}
5 changes: 5 additions & 0 deletions examples/traci/README
@@ -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".

2 changes: 2 additions & 0 deletions examples/traci/debug
@@ -0,0 +1,2 @@
#!/bin/sh
gdb --args opp_run -l../../src/inet -n"../../src;.." "$@"
2 changes: 2 additions & 0 deletions examples/traci/memcheck
@@ -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;.." "$@"

0 comments on commit cd7fd58

Please sign in to comment.