Omnet++ 如何从框架中获取RSSI值?

Omnet++ 如何从框架中获取RSSI值?,omnet++,veins,Omnet++,Veins,我在stackoverflow上遇到了一些代码来获取RSSI。 但是,只提供了一些代码,因此我编写了如下代码来检查结果。然而,这是否正常获得了RSSI,这是值得怀疑的 RSU.h RSU.cc // If received some message from other node double rssi = check_and_cast<DeciderResult80211*>(check_and_cast<PhyToMacControlInfo*>(wsm ->

我在stackoverflow上遇到了一些代码来获取
RSSI
。 但是,只提供了一些代码,因此我编写了如下代码来检查结果。然而,这是否正常获得了
RSSI
,这是值得怀疑的

RSU.h

RSU.cc

// If received some message from other node
double rssi = check_and_cast<DeciderResult80211*>(check_and_cast<PhyToMacControlInfo*>(wsm -> getControlInfo()) -> getDeciderResult()) -> getRecvPower_dBm();
EV << "RSSI Value: " << rssi << std::endl;
...
//如果从其他节点收到一些消息
double rssi=check_和_cast(check_和_cast(wsm->getControlInfo())->getDeciderResult())->getRecvPower_dBm();

EV为了验证你的假设,你已经做了哪些实验?结果以何种方式与您的期望不符?@ChristophSommer在输出
EV
时,一些值会正常显示。例如,
-53.8234
。但是,我想知道这是否是由
RSSI
公式计算的
RSSI
值。
// If received some message from other node
double rssi = check_and_cast<DeciderResult80211*>(check_and_cast<PhyToMacControlInfo*>(wsm -> getControlInfo()) -> getDeciderResult()) -> getRecvPower_dBm();
EV << "RSSI Value: " << rssi << std::endl;
...