mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 22:50:07 +00:00
Add API to retrieve Leader Data information. (#231)
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user