Add API to retrieve router diag information. (#225)

This commit is contained in:
Jonathan Hui
2016-07-01 10:47:40 -07:00
committed by GitHub
parent 4779fb20eb
commit 50acd07a17
8 changed files with 179 additions and 0 deletions
+18
View File
@@ -394,6 +394,24 @@ typedef enum
kDeviceRoleLeader, ///< The Thread Leader role.
} otDeviceRole;
/**
* This structure holds diagnostics information for a Thread Router
*
*/
typedef struct
{
otExtAddress mExtAddress; ///< IEEE 802.15.4 Extended Address
uint16_t mRloc16; ///< RLOC16
uint8_t mRouterId; ///< Router ID
uint8_t mNextHop; ///< Next hop to router
uint8_t mPathCost; ///< Path cost to router
uint8_t mLinkQualityIn; ///< Link Quality In
uint8_t mLinkQualityOut; ///< Link Quality Out
uint8_t mAge; ///< Time last heard
bool mAllocated : 1; ///< Router ID allocated or not
bool mLinkEstablished : 1; ///< Link established with Router ID or not
} otRouterInfo;
/**
* This structure represents the MAC layer counters.
*/
+9
View File
@@ -907,6 +907,15 @@ uint16_t otGetRloc16(void);
*/
uint8_t otGetRouterIdSequence(void);
/**
* The function retains diagnostic information for a given Thread Router.
*
* @param[in] aRouterId The router ID or RLOC16 for a given router.
* @param[out] aRouterInfo A pointer to where the router information is placed.
*
*/
ThreadError otGetRouterInfo(uint16_t aRouterId, otRouterInfo *aRouterInfo);
/**
* Get the Stable Network Data Version.
*