0.01.00
thread.h File Reference

This file defines the OpenThread Thread API (for both FTD and MTD). More...

Go to the source code of this file.

Typedefs

typedef void(* otReceiveDiagnosticGetCallback) (otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
 This function pointer is called when Network Diagnostic Get response is received. More...
 

Functions

OTAPI otError OTCALL otThreadSetEnabled (otInstance *aInstance, bool aEnabled)
 This function starts Thread protocol operation. More...
 
OTAPI bool OTCALL otThreadGetAutoStart (otInstance *aInstance)
 This function queries if the Thread stack is configured to automatically start on reinitialization. More...
 
OTAPI otError OTCALL otThreadSetAutoStart (otInstance *aInstance, bool aStartAutomatically)
 This function configures the Thread stack to automatically start on reinitialization. More...
 
OTAPI bool OTCALL otThreadIsSingleton (otInstance *aInstance)
 This function indicates whether a node is the only router on the network. More...
 
OTAPI otError OTCALL otThreadDiscover (otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext)
 This function starts a Thread Discovery scan. More...
 
OTAPI bool OTCALL otThreadIsDiscoverInProgress (otInstance *aInstance)
 This function determines if an MLE Thread Discovery is currently in progress. More...
 
OTAPI uint32_t OTCALL otThreadGetChildTimeout (otInstance *aInstance)
 Get the Thread Child Timeout used when operating in the Child role. More...
 
OTAPI void OTCALL otThreadSetChildTimeout (otInstance *aInstance, uint32_t aTimeout)
 Set the Thread Child Timeout used when operating in the Child role. More...
 
OTAPI const uint8_t *OTCALL otThreadGetExtendedPanId (otInstance *aInstance)
 Get the IEEE 802.15.4 Extended PAN ID. More...
 
OTAPI otError OTCALL otThreadSetExtendedPanId (otInstance *aInstance, const uint8_t *aExtendedPanId)
 Set the IEEE 802.15.4 Extended PAN ID. More...
 
OTAPI otError OTCALL otThreadGetLeaderRloc (otInstance *aInstance, otIp6Address *aLeaderRloc)
 This function returns a pointer to the Leader's RLOC. More...
 
OTAPI otLinkModeConfig OTCALL otThreadGetLinkMode (otInstance *aInstance)
 Get the MLE Link Mode configuration. More...
 
OTAPI otError OTCALL otThreadSetLinkMode (otInstance *aInstance, otLinkModeConfig aConfig)
 Set the MLE Link Mode configuration. More...
 
OTAPI const otMasterKey *OTCALL otThreadGetMasterKey (otInstance *aInstance)
 Get the thrMasterKey. More...
 
OTAPI otError OTCALL otThreadSetMasterKey (otInstance *aInstance, const otMasterKey *aKey)
 Set the thrMasterKey. More...
 
OTAPI const otIp6Address *OTCALL otThreadGetMeshLocalEid (otInstance *aInstance)
 This function returns a pointer to the Mesh Local EID. More...
 
OTAPI const uint8_t *OTCALL otThreadGetMeshLocalPrefix (otInstance *aInstance)
 This function returns a pointer to the Mesh Local Prefix. More...
 
OTAPI otError OTCALL otThreadSetMeshLocalPrefix (otInstance *aInstance, const uint8_t *aMeshLocalPrefix)
 This function sets the Mesh Local Prefix. More...
 
const otIp6AddressotThreadGetLinkLocalIp6Address (otInstance *aInstance)
 This function returns the Thread link-local IPv6 address. More...
 
OTAPI const char *OTCALL otThreadGetNetworkName (otInstance *aInstance)
 Get the Thread Network Name. More...
 
OTAPI otError OTCALL otThreadSetNetworkName (otInstance *aInstance, const char *aNetworkName)
 Set the Thread Network Name. More...
 
OTAPI uint32_t OTCALL otThreadGetKeySequenceCounter (otInstance *aInstance)
 Get the thrKeySequenceCounter. More...
 
OTAPI void OTCALL otThreadSetKeySequenceCounter (otInstance *aInstance, uint32_t aKeySequenceCounter)
 Set the thrKeySequenceCounter. More...
 
OTAPI uint32_t OTCALL otThreadGetKeySwitchGuardTime (otInstance *aInstance)
 Get the thrKeySwitchGuardTime. More...
 
OTAPI void OTCALL otThreadSetKeySwitchGuardTime (otInstance *aInstance, uint32_t aKeySwitchGuardTime)
 Set the thrKeySwitchGuardTime. More...
 
OTAPI otError OTCALL otThreadBecomeDetached (otInstance *aInstance)
 Detach from the Thread network. More...
 
OTAPI otError OTCALL otThreadBecomeChild (otInstance *aInstance)
 Attempt to reattach as a child. More...
 
OTAPI otError OTCALL otThreadGetNextNeighborInfo (otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
 This function gets the next neighbor information. More...
 
OTAPI otDeviceRole OTCALL otThreadGetDeviceRole (otInstance *aInstance)
 Get the device role. More...
 
OTAPI otError OTCALL otThreadGetLeaderData (otInstance *aInstance, otLeaderData *aLeaderData)
 This function get the Thread Leader Data. More...
 
OTAPI uint8_t OTCALL otThreadGetLeaderRouterId (otInstance *aInstance)
 Get the Leader's Router ID. More...
 
OTAPI uint8_t OTCALL otThreadGetLeaderWeight (otInstance *aInstance)
 Get the Leader's Weight. More...
 
OTAPI uint32_t OTCALL otThreadGetPartitionId (otInstance *aInstance)
 Get the Partition ID. More...
 
OTAPI uint16_t OTCALL otThreadGetRloc16 (otInstance *aInstance)
 Get the RLOC16. More...
 
OTAPI otError OTCALL otThreadGetParentInfo (otInstance *aInstance, otRouterInfo *aParentInfo)
 The function retrieves diagnostic information for a Thread Router as parent. More...
 
OTAPI otError OTCALL otThreadGetParentAverageRssi (otInstance *aInstance, int8_t *aParentRssi)
 The function retrieves the average RSSI for the Thread Parent. More...
 
OTAPI otError OTCALL otThreadGetParentLastRssi (otInstance *aInstance, int8_t *aLastRssi)
 The function retrieves the RSSI of the last packet from the Thread Parent. More...
 
void otThreadSetReceiveDiagnosticGetCallback (otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext)
 This function registers a callback to provide received raw Network Diagnostic Get response payload. More...
 
OTAPI otError OTCALL otThreadSendDiagnosticGet (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
 Send a Network Diagnostic Get request. More...
 
OTAPI otError OTCALL otThreadSendDiagnosticReset (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
 Send a Network Diagnostic Reset request. More...
 
OTAPI const otIpCounters *OTCALL otThreadGetIp6Counters (otInstance *aInstance)
 Get the IPv6 counters. More...
 

Detailed Description

This file defines the OpenThread Thread API (for both FTD and MTD).