使用prepareWSM方法在Veins-4a2中的多个节点接收已发送的ack [英] Sent acks are received by multiple nodes in Veins-4a2 using prepareWSM method

查看:93
本文介绍了使用prepareWSM方法在Veins-4a2中的多个节点接收已发送的ack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用OMNeT ++-4.6,sumo-0.22.0和Veins-4a2.

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

在我的情况下,当RSU从节点接收消息时,它使用prepareWSM方法发送ACK:

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

因此,RSU将ACK发送到消息的发送者节点senderID.

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

在我的日志文件中,我注意到有一些节点-不仅是原始发送者节点-都收到此ACK.

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

我需要知道prepareWSM方法是否将ACK散发到所有遇到的节点,或者我只发送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?

推荐答案

尽管您可以设置WaveShortMessage的接收方地址,但

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

要实现您希望的确认系统,您必须检查在APP层收到的每条消息的收件人地址,并忽略未寻址到您的地址( myId )的消息.

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

这篇关于使用prepareWSM方法在Veins-4a2中的多个节点接收已发送的ack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆