[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:
Abtin Keshavarzian
2017-07-11 09:10:54 -07:00
committed by Jonathan Hui
parent 3078359e38
commit 92b0ddca0a
10 changed files with 439 additions and 274 deletions
+6
View File
@@ -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);