Search code examples
omnet++veinsrssi

how to record rssi in veins (omnet++)


How can I record statistic of the RSSI value for a communication in veins ?, i'm using 5.1 version. in the previous version it was a function which calculates the rssi in phy802.11 layer but it doesn't exist anymore. thank you.


Solution

  • This is addressed in an answer to "How does veins calculate RSSI in a Simple Path Loss Model?":

    Taking Veins version 5 alpha 1 as an example, your application layer can access the ControlInfo of a frame and, from there, its RSS, e.g., as follows: check_and_cast<DeciderResult80211*>(check_and_cast<PhyToMacControlInfo*>(wsm->getControlInfo())->getDeciderResult())->getRecvPower_dBm()

    The above code returns the absolute receive power (in dBm) measured at the center frequency of the corresponding frame.

    Note that, while this gives you "some" indication of received signal strength, it is far from the only way to do that. In fact, vendors are free to implement whatever mechanism they deem fit to derive a number that indicates how strongly a signal was received.