Hello Everyone,
I am using VEINS for my project. I want to find out the speed of a particular vehicle.I came to know it from
http://veins.car2x.org/documentation/modules/traci/ that compound module can get speed of a vehicle using getSpeed() method. Can any One please tell me how exactly can I use this method. The steps which I have followed are:
1. Defined a simple module speed.
2. In its c++ file wrote the following code
cModule* parent =getParentModule();c*mobility=parent->getSubmodule("TraCIMobility");
double myspeed=mobility->getspeed();3. Then included this simple module as submodule in the compound module Car given in traci_launchd example of veins. But this is not working and giving the error cModule* does not have member function getSpeed().
Ithink the approach I am following is wrong. Van anyone tell me what is correct way to use getspeed() method of TraCIMobility.
Thank You!
--
Neeraj Mudgil
M.Tech Computer Engg.(2010-12)
NIT Kurukshetra
Contact: 09992300873
(¨`·.·´¨) Alwayz
`·.¸(¨`·.·´¨) Keep
(¨`·.·´¨)¸.·´
Smiling!
`·.¸.·´