Я установил таймеры в TraciDemo11p и TraciDemoRSU11p для отправки сообщений
Код: Выделить всё
void TraCIDemo11p::handleMessage(cMessage* msg) {
if (msg->isSelfMessage()) {
TraCIDemo11pMessage* wsm = new TraCIDemo11pMessage();
populateWSM(wsm);
std::string arrayAsString;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
arrayAsString += std::to_string(mij[i][j]) + " ";
}
arrayAsString.pop_back();
arrayAsString += "\n";
}
std::string newWSM_str = arrayAsString;
wsm->setAMessage(newWSM_str.data());
wsm->setDemoData(mobility->getRoadId().c_str());
wsm->setSenderAddress(myId);
sendDown(wsm);
scheduleAt(simTime() + 53, msg);
}
else {
DemoBaseApplLayer::handleMessage(msg);
}
}
Код: Выделить всё
tyvoid TraCIDemoRSU11p::handleMessage(cMessage* msg)
{
if (msg->isSelfMessage()) {
TraCIDemo11pMessage* wsm = new TraCIDemo11pMessage();
populateWSM(wsm);
wsm->setAMessage(RSUsavedAMessage.data());
wsm->setSenderAddress(myId);
sendDown(wsm);
scheduleAt(simTime() + 250, msg);
}
else {
DemoBaseApplLayer::handleMessage(msg);
}
}
Код: Выделить всё
TraCI server reported status 255 executing command 0xc4 ("Edge '' is not known."). -- in module (veins::TraCIDemo11p) RSUExampleScenario.node[31].appl (id=207), at t=250.000244822538s, event #49654
Подробнее здесь: https://stackoverflow.com/questions/782 ... es-and-rsu
Мобильная версия