Nehal
Nehal

Reputation: 17

Change the color of the vehicle after reception of a beacon from RSU?

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:

enter image description here

In Wave App Layer in omnetpp.ini file I have choosen MyVeinsApp: enter image description here

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

Answers (1)

Sreeram M
Sreeram M

Reputation: 134

Try using findHost()->getDisplayString().setTagArg("i", 1, "green");

Upvotes: 1

Related Questions