FAQ Database Discussion Community


Node creation or apperance at run time in Omnet (INET)

c++,omnet++,inet
I need to create a node at run time, with similar parameters as the other nodes. For that I am creating a dynamic node in ned file as:- host_send4: meshnode { parameters: @dynamic; @display("p=1000,535;r=200,green;i=device/smallrouter"); } To implement this node in C++ file, I add this code:- cModuleType *meshnode1 = cModuleType::get("inet.networklayer.manetrouting.PASER.meshnode");...

finding a memory allocation error with omnet++

c++,gdb,std,valgrind,omnet++
I am doing networks simulations under omnet++ & veins(v2.0-rc1), for this purpose I experiment 4 scenarios with 20 repetitions for both one. I am getting some errors (i guess that is a memory allocation error) during the simulations of the 3rd & 4th scenarios wich share a common functionnality (ack)....

Send the same message to several hosts (Broadcast in Ethernet LAN)

omnet++
I'm trying to understand how Omnet++ works since a couple of months and I'm facing a problem. I'm working with the INET framework, more particullary with the Networks NED file (examples/ethernet/lans/networks.ned). In a given simulation, I want to send the same packet at the same time, for all neighbouring hosts....

OMNET++ Tkenv/GUI doesn't appear anymore

omnet++
I'm using OMNET++ since two weeks and everything was working pretty good until I run a simulation a couple of minutes ago and the simulation Tkenv window doesn't appear anymore ? Any idea about this bug ? Thank you...

How can I convert an IPv4Address to char in omnet++(inet)?

omnet++,inet
How can I convert an IPv4Address to char in omnet++(inet)? I want to use emit() and i need to cast ipv4Address into one of types are available with emit().

What are the units of distance in the MiXiM based Veins simulation scenarios?

omnet++
Hello StackEx community. I am running a scenario in Veins 3.0 where I am using the commandDistanceRequest()function to find out the distance between two nodes. I am getting values which, I suppose, is in the domain of the MiXiM - OMNeT++ simulation play-field. My questions here are: What is the...

“socket.error: [Errno 98] Address already in use” in heterogeneous example on veins-lte

omnet++
I'm trying to change the application type in the veins-lte "heterogeneous" example and I get the following error (in the SUMO log): "socket.error: [Errno 98] Address already in use" I tried with different traffic configurations in SUMO or with different applications, but I always get the same error. I'm able...

RoadId() from the BaseWaveApplLayer.cc (VEINS, OMNET++)

omnet++
how can i get information such as roadid in order to use it as a new field for example in beacon messages from BaseWaveApplLayer.cc? best, Pavlos...

How do I find a car's vehicle type in Veins?

omnet++
In my scenario in Veins 3.0, I want to find the vType for a given car node. How do I extract this information from TraCI? In the TraCICommandInterface.h file, a function getVehicleTypeID() is declared but is not defined in the code. Another function getVehicleTypeIDs() is defined but it returns a...

Running parallel simulations

omnet++
How can I run the simulation with different configurations? I am using omnet++ version 4.6. My omnetpp.ini file looks as below : [General] [Config Dcn2] network = Dcn2 # leaf switch #**.down_port = 2 **.up_port = 16 #12 # 4 # spine switch **.port = 28 # 20 #2048 #...

Broadcasting of Messages in Veins example

omnet++
I noticed that in the Veins demo scenario a node broadcasts the data message it creates to each and every other node in the simulation. I tried to modify that a bit. I modified the sendMessage() function in TraCIDemo11p.cc file by initializing the address of the recipient in the WSMusing...

Calculating end-to-end delay for SimpleServerApp in Veins-LTE

omnet++
I'm trying to calculate end-to-end delay for SimpleServerApp in Veins-LTE and I'm unable to get any results, when I open the result file all the statistics related to the delay are 0 or NaN. I looked in the Tic-Toc tutorial and tried to do something like that, but that way...

error in final step of veins tutorial

omnet++
When I run the command to start SUMO,it prints Listening on port 9999 and starts directly to print also : Handling connection from 127.0.0.1 on port 63825 Got Traci message of length 1347375952 Got Traci command of length 31 Got Traci command 0x2f Aborting on error:Expected CMD-FILE_SEND(0x75),but got 0x2f Closing...

Overriding Functions with omnet++

c++,override,omnet++,inet
How to override function from an included class in omnet++? I get a redefinition-error when I try to override the function as I do in c++. redefinition of "handleMessage(cMessage *msg)" This is the current code: #include "MalAODVRouter.h" #include "AODVRouting.cc" #include "AODVRouting.h" Define_Module(MalAODVRouter); void AODVRouting::handleMessage(cMessage *msg) // Error here { //-----------------------------------------------------Added...

Omnet access method of another submodule error - no matching function for call to ‘check_and_cast(cModule*&)’

c++,omnet++,inet
Error: no matching function for call to ‘check_and_cast(cModule*&)’ I am trying to use the current position from another module "mobility" with n class type MassMobility. cModule* parentmod = getParentModule(); cModule* mobilitymod = parentmod->getParentModule()->getSubmodule("mobility"); EV<<"Current module is "<<mobilitymod->getFullName() <<endl; MassMobility* mobility = check_and_cast<MassMobility *>(mobilitymod); mobility->getCurrentPosition(); I am getting compile time error...

How to read value from `Link` between two nodes using omnet++

c++,algorithm,omnet++
I'm trying to implement Ford Fulkerson algorithm in omnet++ using c++. I took the c++ class from this article but I couldn't read the values from the network which should come from Links my class algorithm : // C++ program for implementation of Ford Fulkerson algorithm #include <iostream> #include <limits.h>...

How do I take actions every step in Veins?

omnet++
I am using Veins to implement a scenario in which I shall update a vehicle's route every time step characterized by the step selfmsg. In which module shall I find this behavior? I want to add some more functions to this module in the application layer by extending it. Is...

header file error with omnet++

c++,omnet++
i'm struggling to compile my code under omnet++ simulator (i am using mixim & veins framework), after including ContactCtrlInfo.h header file in BaseLayer.h Here is the output: fatal error: ContactCtrlInfo.h: No such file or directory Here is my current project structure: src |_base | | | |_folder1 | |_folder2 |...

Transmission of vehicular status in Veins

omnet++
I want to transmit a given car's vehicular data such as it's vType, instantaneous speed and position to a RSU in a scenario in Veins. How can I obtain the data from SUMO and send it through MiXiM methods to an RSU node?...

OMNET ++, How to pass message between two car in VEINS?

omnet++
I am new in VEINS. I can run a sumo simulation in Veins but don't know hot to communicate or pass message between cars. Can anyone please help?

Navigation hierarchy error in omnet: Simulation terminated with exit code: 139

c++,segmentation-fault,omnet++,inet
I am trying to navigate to a 2 level up module using following code:- cModule* parentmod = getParentModule(); cModule* grantParentmod = parentmod->getParentModule(); for (cSubModIterator iter(*grantParentmod); !iter.end();iter++) EV<<"Current module is "<< iter()->getFullName() <<endl; And the output is:- Current module is notificationBoard Current module is mobility Current module is udpApp[0] Current module...

Changing .cc file doesn't affect the simulation

omnet++
I changed some .cc files in OMNeT++, but when I run the simulation I see that none of them are applied. I've seen here that the problem might be solved removing the .exe (in the case of Windows). However, I'm using Ubuntu and I'm not sure about what to do......

Changing model parameters by cPar in other module

c++,omnet++,inet
I am using this module hierarchy : Node: {udpApp[0]<->udp<->networkLayer->wlan[0]} and wlan[0]: {CNPCBeacon<->mac<->radio} I have given some initial parameter in the ini file for udpApp as : **.host*.numUdpApps = 2 **.host*.udpApp[0].typename = "UDPBasicApp" **.host*.udpApp[0].chooseDestAddrMode = "perBurst" **.host*.udpApp[0].destAddresses = "gw1" **.host*.udpApp[0].startTime = 1.32s **.host*.udpApp[0].stopTime = 1.48s But at run time I want...