从 RSU 接收到信标后更改车辆的颜色?

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

我对 Omnet++、SUMO 和 Veins 还很陌生。我正在尝试进行模拟,我每 10 秒从 RSU 发送一次信标,在接收到信标后,汽车的颜色应该会改变。 我通过在 omnetpp.ini 文件中进行如下更改来生成信标:

在 omnetpp.ini 文件的 Wave App Layer 中,我选择了 MyVeinsApp:

在 MyVeinsApp.cc 文件中我做了以下更改:

void MyVeinsApp::onBSM(BasicSafetyMessage* bsm)
{
    traciVehicle->setColor(TraCIColor(255,0,0,0));
}

但是接收到信标后,我无法更改车辆的颜色?

尝试使用 findHost()->getDisplayString().setTagArg("i", 1, "green");