Sent acks are received by multiple nodes in Veins-

2019-06-02 03:10发布

问题:

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).



标签: omnet++ veins