Reputation: 17
I am very new to Omnet++, SUMO and Veins. I am trying to make a simulation where, I transmit beacon from RSU every 10s and after the reception of the beacon the color of the car should change. I have generated beacons by making changes in omnetpp.ini file as follows:
In Wave App Layer in omnetpp.ini file I have choosen MyVeinsApp:
In MyVeinsApp.cc file I have made following Changes:
void MyVeinsApp::onBSM(BasicSafetyMessage* bsm)
{
traciVehicle->setColor(TraCIColor(255,0,0,0));
}
But yet I am not able to change the color of the vehicles after the reception of beacons?
Upvotes: 0
Views: 242
Reputation: 134
Try using findHost()->getDisplayString().setTagArg("i", 1, "green");
Upvotes: 1