mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 14:20:29 +00:00
Parent last rssi (#1558)
* Added thread api call to get the last rssi for the parent
This commit is contained in:
@@ -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)
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user