package vpro2;
import inet.networklayer.common.InterfaceTable;
import inet.networklayer.autorouting.ipv4.HostAutoConfigurator2;
import inet.base.NotificationBoard;
import inet.networklayer.ipv4.RoutingTable;
import inet.transport.IUDP;
import inet.applications.IUDPApp;
import inet.nodes.inet.NetworkLayer;
import inet.linklayer.ieee80211.Ieee80211Nic;
import inet.networklayer.routing.gpsr.IGPSR;
import inet.mobility.single.TraCIMobility;
import inet.linklayer.IWirelessNic;
import inet.mobility.contract.IMobility;
module Car
{
parameters:
string gpsrType = default("GPSR");
@node();
int numUdpApps = default(0);
bool hasUdp = default(numUdpApps>0);
string udpType = default(firstAvailable("UDP","UDP_None"));
string routingFile =default("");
string mobilityType = "TraCIMobility";
bool IPForward = true;
wlan[*].mgmtType = default("Ieee80211MgmtAdhoc");
gates:
input radioIn @directIn;
submodules:
interfaceTable: InterfaceTable {
parameters:
@display("p=140,326");
}
notificationBoard: NotificationBoard {
parameters:
@display("p=140,462");
}
routingTable: RoutingTable {
parameters:
IPForward = true;
routerId = "";
routingFile = routingFile;
@display("p=60,326");
}
udpApp[numUdpApps]: <> like IUDPApp {
parameters:
@display("p=329,54,row,60");
}
udp: <udpType> like IUDP if hasUdp {
parameters:
@display("p=329,141");
}
networkLayer: NetworkLayer {
parameters:
proxyARP = true;
@display("p=304,327;q=queue");
gates:
ifIn[1];
ifOut[1];
}
wlan0: <default("Ieee80211Nic")> like IWirelessNic {
parameters:
@display("p=216,406,row,60;q=queue");
}
gpsr: <gpsrType> like IGPSR {
@display("p=527,250");
}
mobility: <mobilityType> like IMobility if mobilityType != "" {
parameters:
@display("p=60,459");
}
ac_wlan: HostAutoConfigurator2 {
@display("p=321,375");
interfaces = "wlan0";
//addressBaseList = ("car[*]");
}
connections allowunconnected:
udp.ipOut --> networkLayer.transportIn++ if hasUdp;
udp.ipIn <-- networkLayer.transportOut++ if hasUdp;
for i=0..numUdpApps-1 {
udpApp[i].udpOut --> udp.appIn++;
udpApp[i].udpIn <-- udp.appOut++;
}
wlan0.upperLayerOut --> networkLayer.ifIn[0];
wlan0.upperLayerIn <-- networkLayer.ifOut[0];
radioIn --> wlan0.radioIn;
gpsr.ipOut --> networkLayer.transportIn++;
gpsr.ipIn <-- networkLayer.transportOut++;
}
package vpro2.simulations;
import inet.world.VACaMobil.VACaMobil;
import inet.world.annotations.AnnotationManager;
import inet.world.obstacles.ObstacleControl;
import inet.world.radio.ChannelControl;
network Highway
{
submodules:
channelControl: ChannelControl {
@display("p=257,169");
}
obstacles: ObstacleControl {
@display("p=240,50");
}
manager: VACaMobil {
@display("p=444,129");
}
annotations: AnnotationManager {
@display("p=144,108");
}
}
[General]
network = Highway
sim-time-limit = 100s
**.scalar-recording = true
**.vector-recording = true
num-rngs = 5
repeat = 1
**.manager.**.scalar-recording = true
**.manager.**.vector-recording = true
**.movStats.**.scalar-recording = true
**.movStats.**.vector-recording = true
**.vector-recording = false
**.scalar-recording = false
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 1069900m
**.constraintAreaMaxY = 1713100m
**.constraintAreaMaxZ = 1713100m
**.debug = true
**.coreDebug = false
# channel physical parameters
**.channelControl.carrierFrequency = 2.4GHz
**.channelControl.pMax = 30mW
**.channelControl.numChannels = 1
**.channelControl.propagationModel = "TwoRayGroundModel"
#**.channelNumber =
**.channelControl.sat = -89dBm
**.channelControl.alpha = 2
# nic settings
**.wlan.bitrate = 54Mbps
**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.wlan.opMode= "a"
**.wlan.mgmt.frameCapacity = 10
**.wlan.mac.address = "auto"
**.wlan.mac.maxQueueSize = 14
**.wlan.mac.rtsThresholdBytes = 3000B
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = 31
**.wlan.mac.cwMaxData = 1023
**.wlan.mac.cwMinBroadcast = 20
**.wlan.mac.slotTime = 13us
**.wlan[*].mac.cwMinMulticast = 31
**.wlan.radio.transmitterPower = 18mW
**.wlan.radio.thermalNoise = -110dBm
**.wlan.radio.sensitivity = -89dBm
**.wlan.radio.pathLossAlpha = 2
**.wlan.radio.snirThreshold = 4dB
# Capa de aplicación
**.car[*].numUdpApps = 1
**.car[*].udpApp[*].typename = "UDPBasicBurstNotification"
**.car[*].udpApp[*].destAddresses= moduleListByPath("**.car[*]")
**.car[*].udpApp[*].chooseDestAddrMode = "perBurst"
**.car[*].udpApp[*].startTime = simTime() + 5s
**.car[*].udpApp[*].burstDuration = 0s
**.car[*].udpApp[*].sleepDuration = 0s
**.car[*].udpApp[*].destPort = 1234
**.car[*].udpApp[*].localPort = 1234
**.car[*].udpApp[*].messageLength = 512B
**.car[*].udpApp[*].sendInterval = 0.5s + uniform(-0.001s,0.001s)
**.car[*].udpApp[*].delayLimit =20s
#**.vhost[*].udpApp[*].chooseNewIfDeleted = true
**.networkConfiguratorModule = ""
# Capa de transporte
**.udpType = "UDP"
**.phyOpMode= "p"
#**.wlan*.opMode="p"
**.wlan[*].radio.carrierFrequency = 5.9GHz
**.mac.basicBitrate = 6Mbps
# TraCIScenarioManagerLaunchd
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "vpro2.Car"
*.manager.moduleName = "car"
*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25
# Mobility
**.car[*].mobilityType = "TraCIMobility"
**.car[*0].mobility.accidentCount =1
**.car[*0].mobility.accidentStart = 30s
**.car[*0].mobility.accidentDuration = 40s
**.car[*0].mobility.accidentInterval = 50s
#**.vehicleRates = "coche=50 0 100"
**.meanNumberOfCars = 50
**.carHysteresisValue = 0
**.warmUpSeconds = 0s
**.autoShutdown = false
**.annotations.draw = true
**.car[*].planarizationMode = 0 #// 0 for GG, 1 for RNG
*.manager.launchConfig = xmldoc("2012LAZARO.launch.xml")
** Event #3 T=2 Highway.manager (VACaMobil, id=4), on selfmsg `step' (cMessage, id=21)
DEBUG: Triggering TraCI server simulation advance to t=2
DEBUG: Writing TraCI message of 6 bytes
DEBUG: Reading TraCI message of 1016 bytes
DEBUG: Getting 2 subscription results
DEBUG: TraCI reports 0 departed vehicles.
DEBUG: TraCI reports 0 arrived vehicles.
DEBUG: TraCI reports current time step as 2000ms.
TraCI reports 0 vehicles starting to teleport.
TraCI reports 0 vehicles ending teleport.
DEBUG: TraCI reports 50 active vehicles.
DEBUG: Writing TraCI message of 34 bytes
DEBUG: Reading TraCI message of 98 bytes
Initializing channel Highway.car[0].networkLayer.ip.transportOut[0].channel, stage 0
Initializing channel Highway.car[0].networkLayer.ip.transportOut[1].channel, stage 0
Initializing channel Highway.car[0].networkLayer.ip.queueOut[0].channel, stage 0
Initializing channel Highway.car[0].networkLayer.ifIn[0].channel, stage 0
Initializing channel Highway.car[0].networkLayer.transportIn[0].channel, stage 0
Initializing channel Highway.car[0].networkLayer.transportIn[1].channel, stage 0
Initializing channel Highway.car[0].wlan0.mgmt.upperLayerOut.channel, stage 0
Initializing channel Highway.car[0].wlan0.upperLayerIn.channel, stage 0
Initializing channel Highway.car[0].wlan0.radioIn.channel, stage 0
Initializing module Highway.car[0], stage 0
Initializing module Highway.car[0].interfaceTable, stage 0
Initializing module Highway.car[0].notificationBoard, stage 0
Initializing module Highway.car[0].routingTable, stage 0
Initializing module Highway.car[0].udpApp[0], stage 0
Initializing module Highway.car[0].udp, stage 0
Initializing module Highway.car[0].networkLayer, stage 0
Initializing module Highway.car[0].networkLayer.configurator, stage 0
Initializing module Highway.car[0].networkLayer.ip, stage 0
Initializing module Highway.car[0].networkLayer.arp, stage 0
Initializing module Highway.car[0].networkLayer.icmp, stage 0
Initializing module Highway.car[0].networkLayer.igmp, stage 0
Initializing module Highway.car[0].networkLayer.errorHandling, stage 0
Initializing module Highway.car[0].wlan0, stage 0
Initializing module Highway.car[0].wlan0.agent, stage 0
Initializing module Highway.car[0].wlan0.mgmt, stage 0
Initializing module Highway.car[0].wlan0.mac, stage 0
Initializing stage 0
Operating mode: 802.11g retryLimit=7 cwMinMulticast=31 slotTime=9us DIFS=28us basicBitrate=6M bitrate=54M IDLE=0 RECEIVE=8
MAC Transmission algorithm : Constant Rate
bitrate=54M IDLE=0 RECEIVE=8
Requesting first two frames from queue module
Initializing module Highway.car[0].wlan0.radio, stage 0
Initializing Radio, stage=0
Initialized channel with noise: 1e-11 sensitivity: 3.16228e-09
Found ObstacleControl
Initializing module Highway.car[0].gpsr, stage 0
GPSR at car[0] Scheduling beacon timer
GPSR at car[0] Scheduling purge neighbors timer
Initializing module Highway.car[0].mobility, stage 0
TRACE: initializing MobilityBase stage 0
Initializing module Highway.car[0].ac_wlan, stage 0
Initializing module Highway.car[0].interfaceTable, stage 1
Initializing module Highway.car[0].routingTable, stage 1
Initializing module Highway.car[0].udpApp[0], stage 1
Initializing module Highway.car[0].udp, stage 1
Initializing module Highway.car[0].networkLayer.configurator, stage 1
Initializing module Highway.car[0].networkLayer.ip, stage 1
Initializing module Highway.car[0].networkLayer.arp, stage 1
Initializing module Highway.car[0].networkLayer.igmp, stage 1
Initializing module Highway.car[0].wlan0.agent, stage 1
Initializing module Highway.car[0].wlan0.mgmt, stage 1
Initializing module Highway.car[0].wlan0.mac, stage 1
Initializing module Highway.car[0].wlan0.radio, stage 1
Initializing Radio, stage=1
** Notification at T=2 to Highway.car[0].wlan0.mac: RADIO-STATE IDLE, channel #0, 54Mbps
# state information: mode = DCF, state = INIT, backoff 0..1 = 0
# backoffPeriod 0..1 = -1
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
processing event in state machine Ieee80211Mac State Machine
leaving handleWithFSM
# state information: mode = DCF, state = INIT, backoff 0..1 = 0
# backoffPeriod 0..1 = -1
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
Initializing module Highway.car[0].gpsr, stage 1
Initializing module Highway.car[0].mobility, stage 1
TRACE: initializing MobilityBase stage 1
current position = (2994.95, 5720.59, 0)
Initializing module Highway.car[0].ac_wlan, stage 1
Initializing module Highway.car[0].routingTable, stage 2
Initializing module Highway.car[0].udpApp[0], stage 2
Initializing module Highway.car[0].networkLayer.configurator, stage 2
Initializing module Highway.car[0].networkLayer.arp, stage 2
Initializing module Highway.car[0].wlan0.radio, stage 2
Initializing Radio, stage=2
Initializing module Highway.car[0].gpsr, stage 2
Initializing module Highway.car[0].mobility, stage 2
TRACE: initializing MobilityBase stage 2
Initializing module Highway.car[0].ac_wlan, stage 2
host auto configuration started
interface wlan0 gets 192.168.0.1/255.255.0.0
Initializing module Highway.car[0].routingTable, stage 3
Initializing module Highway.car[0].udpApp[0], stage 3
Initializing module Highway.car[0].networkLayer.configurator, stage 3
Initializing module Highway.car[0].networkLayer.arp, stage 3
Initializing module Highway.car[0].gpsr, stage 3
Initializing module Highway.car[0].ac_wlan, stage 3
Initializing module Highway.car[0].networkLayer.arp, stage 4
Initializing module Highway.car[0].gpsr, stage 4
Initializing module Highway.car[0].ac_wlan, stage 4
<!> Error in module (HostAutoConfigurator2) Highway.car[0].ac_wlan (id=16) at event #3, t=2: Model error: interfaces and addressBaseList has different sizes.
Have you defined the addressBaseList parameter in the omnetpp.ini file?
This error is that the number of elements in the addressBaseList is different that the number of elements in the interfaces list.
--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...
import inet.world.obstacles.<span style="col
The problem is in the configuration file, you have defined more interfaces than address in the list
--