mirror of
https://github.com/espressif/openthread.git
synced 2026-09-30 21:07:39 +00:00
Add API to retrieve child diag information. (#226)
This commit is contained in:
+31
-11
@@ -395,21 +395,41 @@ typedef enum
|
||||
} otDeviceRole;
|
||||
|
||||
/**
|
||||
* This structure holds diagnostics information for a Thread Router
|
||||
* This structure holds diagnostic information for a Thread Child
|
||||
*
|
||||
*/
|
||||
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
|
||||
otExtAddress mExtAddress; ///< IEEE 802.15.4 Extended Address
|
||||
uint32_t mTimeout; ///< Timeout
|
||||
uint16_t mRloc16; ///< RLOC16
|
||||
uint8_t mChildId; ///< Router ID
|
||||
uint8_t mNetworkDataVersion; ///< Network Data Version
|
||||
uint8_t mAge; ///< Time last heard
|
||||
uint8_t mLinkQualityIn; ///< Link Quality In
|
||||
int8_t mAverageRssi; ///< Average RSSI
|
||||
bool mRxOnWhenIdle : 1; ///< rx-on-when-idle
|
||||
bool mSecureDataRequest : 1; ///< Secure Data Requests
|
||||
bool mFullFunction : 1; ///< Full Function Device
|
||||
bool mFullNetworkData : 1; ///< Full Network Data
|
||||
} otChildInfo;
|
||||
|
||||
/**
|
||||
* This structure holds diagnostic 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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -854,6 +854,24 @@ ThreadError otBecomeLeader(void);
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* The function retains diagnostic information for an attached Child by its Child ID or RLOC16.
|
||||
*
|
||||
* @param[in] aChildId The Child ID or RLOC16 for the attached child.
|
||||
* @param[out] aChildInfo A pointer to where the child information is placed.
|
||||
*
|
||||
*/
|
||||
ThreadError otGetChildInfoById(uint16_t aChildId, otChildInfo *aChildInfo);
|
||||
|
||||
/**
|
||||
* The function retains diagnostic information for an attached Child by the internal table index.
|
||||
*
|
||||
* @param[in] aChildIndex The table index.
|
||||
* @param[out] aChildInfo A pointer to where the child information is placed.
|
||||
*
|
||||
*/
|
||||
ThreadError otGetChildInfoByIndex(uint8_t aChildIndex, otChildInfo *aChildInfo);
|
||||
|
||||
/**
|
||||
* Get the device role.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user