Add API to retrieve Leader Data information. (#231)

This commit is contained in:
Jonathan Hui
2016-07-04 10:11:47 -07:00
committed by GitHub
parent 6a815e147a
commit 8f8b332fd6
7 changed files with 85 additions and 0 deletions
+13
View File
@@ -452,6 +452,19 @@ typedef struct otEidCacheEntry
bool mValid : 1; ///< Indicates whether or not the cache entry is valid
} otEidCacheEntry;
/**
* This structure represents the Thread Leader Data.
*
*/
typedef struct otLeaderData
{
uint32_t mPartitionId; ///< Partition ID
uint8_t mWeighting; ///< Leader Weight
uint8_t mDataVersion; ///< Full Network Data Version
uint8_t mStableDataVersion; ///< Stable Network Data Version
uint8_t mLeaderRouterId; ///< Leader Router ID
} otLeaderData;
/**
* This structure represents the MAC layer counters.
*/
+12
View File
@@ -929,6 +929,18 @@ otDeviceRole otGetDeviceRole(void);
*/
ThreadError otGetEidCacheEntry(uint8_t aIndex, otEidCacheEntry *aEntry);
/**
* This function get the Thread Leader Data.
*
* @param[out] aLeaderData A pointer to where the leader data is placed.
*
* @retval kThreadError_None Successfully retrieved the leader data.
* @retval kThreadError_Detached Not currently attached.
* @retval kThreadError_InvalidArgs @p aLeaderData is NULL.
*
*/
ThreadError otGetLeaderData(otLeaderData *aLeaderData);
/**
* Get the Leader's Router ID.
*