mirror of
https://github.com/espressif/openthread.git
synced 2026-07-18 10:04:08 +00:00
[link-quality] introduce RssAverager and keep track of average RSS for a received message (#1961)
This commit introduces a new class `RssAverager` (which contains the existing averaging logic from`LinkQualityInfo` class). It also updates `Message` class to maintain the average RSS for a received message (note that a message may be composed of multiple 802.15.4 fragments data frames each received with different signal strength). The `MeshForwarder::LogIp6Message()` is updated to log the RSS value for received/dropped messages.
This commit is contained in:
committed by
Jonathan Hui
parent
3078359e38
commit
92b0ddca0a
@@ -87,6 +87,12 @@ void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
int8_t otMessageGetRss(otMessage *aMessage)
|
||||
{
|
||||
Message *message = static_cast<Message *>(aMessage);
|
||||
return message->GetAverageRss();
|
||||
}
|
||||
|
||||
otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength)
|
||||
{
|
||||
Message *message = static_cast<Message *>(aMessage);
|
||||
|
||||
Reference in New Issue
Block a user