【发布时间】:2017-08-02 23:38:16
【问题描述】:
我是 Veins 的新手,我正在尝试实施一种机制来检测之前是否收到过 WSM 数据包。我使用“psid”作为主要变量来识别数据包 - 是否正确?
这种类型的代码会起作用吗? :
bool MyVeinsApp::msgReceivedBefore(int psid){
/*
This function will be used to determine if the message was received before
and should be discarded or processed further
*/
if(msg_log.find(psid) == msg_log.end()){
return false
}
else {
return true;
}
}
这里的 msg.log 是一个 C++ 数据结构,用于存储基于 psid 的 WSM。
【问题讨论】:
标签: c++ simulation omnet++ veins sumo