Hi all,
I'm working on a simulation which requires vehicle type to be exchanged over VANET. Currently I've been stuck about getting the vehicle type through TraCI. The vehicle types was declared in SUMO route file along with the type distribution.
What I need is the vehicle (in OMNeT++) could know what its type. How to done this?
I've reading TraCICommandInterface, the getVehicleTypeIds(), is it the one I should use or not?
I am using OMNeT++ v4.5 and Veins 3.0.
Thanks in advance.
Regards,
Daniel
Sent from Gmail for Android
Thank you Dr. Sommer. I'll try to write it.
Regards,
Daniel
Sent from Gmail for Android
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
std::string getVehicleType() {
return
getCommandInterface()->getVehicleTypeId(getExternalId());
}
But when I tried to assign the return value of the a variable
in my application layer initialize method, I got following
message:
<!> Error in module
(TraCITDE) StRoadScenario.node[0].appl (id=8) at event #2,
t=0.1: Model error: TraCI server reported error executing
command 0xa5 ("Vehicle type 'type1.0' is not known").
I think my
presumption regarding nodeId is wrong. What is the suitable
value to be passed to the method of genericGetString() to
get the vClass?
Regards,
Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Oh, I see. Thank you for your explanations Sir. I'll check them out.
Regards,
Daniel
Sent from Gmail for Android
--
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+unsubscribe@googlegroups.com.
You probably want 0xA4 "Get Vehicle Variable" (Asks for the value of a certain variable of the named vehicle) [2]. In particular, you probably want to ask a vehicle for variable 0x4F "type id" (Returns the id of the type of the named vehicle).