Sent acks are received by multiple nodes in Veins-4a2 using prepareWSM method

蓝咒 提交于 2019-12-08 05:01:00

问题


I use OMNeT++-4.6, sumo-0.22.0 and Veins-4a2.

In my scenario, when an RSU receives a message from a node, it sends an ACK using the prepareWSM method:

sendWSM(prepareWSM("ack", ackLengthBits, type_SCH, ackPriority, senderId , 2))

So, the RSU sends an ACK to senderID which is the sender node of the message.

In my log file, I notice that there are some nodes - not only the original sender node - which receive this ACK.

I need to know if prepareWSM method diffuse the ACK to all nodes encountered or if what I did to send only the ACK to the sender node is correct?


回答1:


Although you can set the receiver address for the WaveShortMessage, it is ignored in the Mac1609_4.cc (line 178 ff.), since originally only broadcast transmission is used in C2X-communication:

//send the packet
Mac80211Pkt* mac = new Mac80211Pkt(pktToSend->getName(), pktToSend->getKind());
mac->setDestAddr(LAddress::L2BROADCAST);

To achieve your wished acknowledgement system you have to check the recipient address of each message you receive in the APP layer and ignore messages which are not addressed to your address (myId).



来源:https://stackoverflow.com/questions/42420468/sent-acks-are-received-by-multiple-nodes-in-veins-4a2-using-preparewsm-method

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!