This module includes functions that expose internal state.
More...
|
OTAPI ThreadError OTCALL | otThreadGetChildInfoById (otInstance *aInstance, uint16_t aChildId, otChildInfo *aChildInfo) |
|
OTAPI ThreadError OTCALL | otThreadGetChildInfoByIndex (otInstance *aInstance, uint8_t aChildIndex, otChildInfo *aChildInfo) |
|
OTAPI ThreadError OTCALL | otThreadGetNextNeighborInfo (otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo) |
|
OTAPI otDeviceRole OTCALL | otThreadGetDeviceRole (otInstance *aInstance) |
|
OTAPI ThreadError OTCALL | otThreadGetEidCacheEntry (otInstance *aInstance, uint8_t aIndex, otEidCacheEntry *aEntry) |
|
OTAPI ThreadError OTCALL | otThreadGetLeaderData (otInstance *aInstance, otLeaderData *aLeaderData) |
|
OTAPI uint8_t OTCALL | otThreadGetLeaderRouterId (otInstance *aInstance) |
|
OTAPI uint8_t OTCALL | otThreadGetLeaderWeight (otInstance *aInstance) |
|
OTAPI uint32_t OTCALL | otThreadGetPartitionId (otInstance *aInstance) |
|
OTAPI uint16_t OTCALL | otThreadGetRloc16 (otInstance *aInstance) |
|
OTAPI uint8_t OTCALL | otThreadGetRouterIdSequence (otInstance *aInstance) |
|
OTAPI ThreadError OTCALL | otThreadGetRouterInfo (otInstance *aInstance, uint16_t aRouterId, otRouterInfo *aRouterInfo) |
|
OTAPI ThreadError OTCALL | otThreadGetParentInfo (otInstance *aInstance, otRouterInfo *aParentInfo) |
|
OTAPI ThreadError OTCALL | otThreadGetParentAverageRssi (otInstance *aInstance, int8_t *aParentRssi) |
|
OTAPI ThreadError OTCALL | otThreadGetParentLastRssi (otInstance *aInstance, int8_t *aLastRssi) |
|
void | otThreadSetReceiveDiagnosticGetCallback (otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext) |
|
OTAPI ThreadError OTCALL | otThreadSendDiagnosticGet (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount) |
|
OTAPI ThreadError OTCALL | otThreadSendDiagnosticReset (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount) |
|
This module includes functions that expose internal state.
This structure represents the message buffer information.
This structure represents an EID cache entry.
This structure represents the Thread Leader Data.
This structure represents the MAC layer counters.
typedef void(* otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext) |
This function pointer is called when Network Diagnostic Get response is received.
- Parameters
-
[in] | aMessage | A pointer to the message buffer containing the received Network Diagnostic Get response payload. |
[in] | aMessageInfo | A pointer to the message info for aMessage . |
[in] | aContext | A pointer to application-specific context. |
Represents a Thread device role.
Enumerator |
---|
kDeviceRoleOffline |
The Thread device is offline and unavailable.
|
kDeviceRoleDisabled |
The Thread stack is disabled.
|
kDeviceRoleDetached |
Not currently participating in a Thread network/partition.
|
kDeviceRoleChild |
The Thread Child role.
|
kDeviceRoleRouter |
The Thread Router role.
|
kDeviceRoleLeader |
The Thread Leader role.
|
OTAPI ThreadError OTCALL otThreadGetChildInfoById |
( |
otInstance * |
aInstance, |
|
|
uint16_t |
aChildId, |
|
|
otChildInfo * |
aChildInfo |
|
) |
| |
The function retains diagnostic information for an attached Child by its Child ID or RLOC16.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildId | The Child ID or RLOC16 for the attached child. |
[out] | aChildInfo | A pointer to where the child information is placed. |
kThreadError_None aChildInfo
was successfully updated with the info for the given ID.
- Return values
-
kThreadError_NotFound | No valid child with this Child ID. kThreadError_InvalidArgs If aChildInfo is NULL. |
OTAPI ThreadError OTCALL otThreadGetChildInfoByIndex |
( |
otInstance * |
aInstance, |
|
|
uint8_t |
aChildIndex, |
|
|
otChildInfo * |
aChildInfo |
|
) |
| |
The function retains diagnostic information for an attached Child by the internal table index.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildIndex | The table index. |
[out] | aChildInfo | A pointer to where the child information is placed. |
kThreadError_None aChildInfo
was successfully updated with the info for the given index.
- Return values
-
kThreadError_NotFound | No valid child at this index. kThreadError_InvalidArgs Either aChildInfo is NULL, or aChildIndex is out of range (higher than max table index). |
- See Also
- otGetMaxAllowedChildren
OTAPI otDeviceRole OTCALL otThreadGetDeviceRole |
( |
otInstance * |
aInstance | ) |
|
Get the device role.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Return values
-
OTAPI ThreadError OTCALL otThreadGetEidCacheEntry |
( |
otInstance * |
aInstance, |
|
|
uint8_t |
aIndex, |
|
|
otEidCacheEntry * |
aEntry |
|
) |
| |
This function gets an EID cache entry.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aIndex | An index into the EID cache table. |
[out] | aEntry | A pointer to where the EID information is placed. |
- Return values
-
kThreadError_None | Successfully retrieved the EID cache entry. |
kThreadError_InvalidArgs | aIndex was out of bounds or aEntry was NULL. |
OTAPI ThreadError OTCALL otThreadGetLeaderData |
( |
otInstance * |
aInstance, |
|
|
otLeaderData * |
aLeaderData |
|
) |
| |
This function get the Thread Leader Data.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aLeaderData | A pointer to where the leader data is placed. |
- Return values
-
kThreadError_None | Successfully retrieved the leader data. |
kThreadError_Detached | Not currently attached. |
kThreadError_InvalidArgs | aLeaderData is NULL. |
OTAPI uint8_t OTCALL otThreadGetLeaderRouterId |
( |
otInstance * |
aInstance | ) |
|
Get the Leader's Router ID.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Leader's Router ID.
OTAPI uint8_t OTCALL otThreadGetLeaderWeight |
( |
otInstance * |
aInstance | ) |
|
Get the Leader's Weight.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Leader's Weight.
This function gets the next neighbor information. It is used to go through the entries of the neighbor table.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in,out] | aIterator | A pointer to the iterator context. To get the first neighbor entry it should be set to OT_NEIGHBOR_INFO_ITERATOR_INIT. |
[out] | aInfo | A pointer to where the neighbor information will be placed. |
- Return values
-
kThreadError_None | Successfully found the next neighbor entry in table. |
kThreadError_NotFound | No subsequent neighbor entry exists in the table. |
kThreadError_InvalidArgs | aIterator or aInfo was NULL. |
OTAPI ThreadError OTCALL otThreadGetParentAverageRssi |
( |
otInstance * |
aInstance, |
|
|
int8_t * |
aParentRssi |
|
) |
| |
The function retrieves the average RSSI for the Thread Parent.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aParentRssi | A pointer to where the parent rssi should be placed. |
OTAPI ThreadError OTCALL otThreadGetParentInfo |
( |
otInstance * |
aInstance, |
|
|
otRouterInfo * |
aParentInfo |
|
) |
| |
The function retrieves diagnostic information for a Thread Router as parent.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aParentInfo | A pointer to where the parent router information is placed. |
OTAPI ThreadError OTCALL otThreadGetParentLastRssi |
( |
otInstance * |
aInstance, |
|
|
int8_t * |
aLastRssi |
|
) |
| |
The function retrieves the RSSI of the last packet from the Thread Parent.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aLastRssi | A pointer to where the last rssi should be placed. |
- Return values
-
kThreadError_None | Successfully retrieved the RSSI data. |
kThreadError_Failed | Unable to get RSSI data. |
kThreadError_InvalidArgs | aLastRssi is NULL. |
OTAPI uint32_t OTCALL otThreadGetPartitionId |
( |
otInstance * |
aInstance | ) |
|
Get the Partition ID.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Partition ID.
OTAPI uint16_t OTCALL otThreadGetRloc16 |
( |
otInstance * |
aInstance | ) |
|
Get the RLOC16.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The RLOC16.
OTAPI uint8_t OTCALL otThreadGetRouterIdSequence |
( |
otInstance * |
aInstance | ) |
|
Get the current Router ID Sequence.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Router ID Sequence.
OTAPI ThreadError OTCALL otThreadGetRouterInfo |
( |
otInstance * |
aInstance, |
|
|
uint16_t |
aRouterId, |
|
|
otRouterInfo * |
aRouterInfo |
|
) |
| |
The function retains diagnostic information for a given Thread Router.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterId | The router ID or RLOC16 for a given router. |
[out] | aRouterInfo | A pointer to where the router information is placed. |
OTAPI ThreadError OTCALL otThreadSendDiagnosticGet |
( |
otInstance * |
aInstance, |
|
|
const otIp6Address * |
aDestination, |
|
|
const uint8_t |
aTlvTypes[], |
|
|
uint8_t |
aCount |
|
) |
| |
Send a Network Diagnostic Get request.
- Parameters
-
[in] | aDestination | A pointer to destination address. |
[in] | aTlvTypes | An array of Network Diagnostic TLV types. |
[in] | aCount | Number of types in aTlvTypes |
OTAPI ThreadError OTCALL otThreadSendDiagnosticReset |
( |
otInstance * |
aInstance, |
|
|
const otIp6Address * |
aDestination, |
|
|
const uint8_t |
aTlvTypes[], |
|
|
uint8_t |
aCount |
|
) |
| |
Send a Network Diagnostic Reset request.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDestination | A pointer to destination address. |
[in] | aTlvTypes | An array of Network Diagnostic TLV types. Currently only Type 9 is allowed. |
[in] | aCount | Number of types in aTlvTypes |
This function registers a callback to provide received raw Network Diagnostic Get response payload.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aCallback | A pointer to a function that is called when Network Diagnostic Get response is received or NULL to disable the callback. |
[in] | aCallbackContext | A pointer to application-specific context. |