Why this program doesn't work? I just changed the message content.
Instead of sending road block id, I want to send a generic message with "MyMessage" string.
void TraCIDemoRSU11p::sendMessage(std::string blockedRoadId)
{
sentMessage = true;
t_channel channel = dataOnSch ? type_SCH : type_CCH;
WaveShortMessage* wsm = prepareWSM("data", dataLengthBits, channel, dataPriority, -1,2);
//wsm->setWsmData(blockedRoadId.c_str());
wsm->setWsmData("MyMessage");
sendWSM(wsm);
}
The simulation starts but when the first message will be sent an error appears:
TraCI Server reported error executing command 0xc4:"Referenced edge 'MyMessage' is not known".