Parent last rssi (#1558)

* Added thread api call to get the last rssi for the parent
This commit is contained in:
Adam Eliot
2017-04-05 19:21:33 -07:00
committed by Jonathan Hui
parent 90eaada3d4
commit 94fab38d4a
2 changed files with 29 additions and 1 deletions
+16
View File
@@ -511,6 +511,22 @@ exit:
return error;
}
ThreadError otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi)
{
ThreadError error = kThreadError_None;
Router *parent;
VerifyOrExit(aLastRssi != NULL, error = kThreadError_InvalidArgs);
parent = aInstance->mThreadNetif.GetMle().GetParent();
*aLastRssi = parent->mLinkInfo.GetLastRss();
VerifyOrExit(*aLastRssi != LinkQualityInfo::kUnknownRss, error = kThreadError_Failed);
exit:
return error;
}
const char *otGetVersionString(void)
{
/**