0.01.00
thread_api.cpp File Reference

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

Macros

#define WPP_NAME   "thread_api.tmh"
 

Functions

uint32_t otThreadGetChildTimeout (otInstance *aInstance)
 Get the Thread Child Timeout used when operating in the Child role. More...
 
void otThreadSetChildTimeout (otInstance *aInstance, uint32_t aTimeout)
 Set the Thread Child Timeout used when operating in the Child role. More...
 
const uint8_t * otThreadGetExtendedPanId (otInstance *aInstance)
 Get the IEEE 802.15.4 Extended PAN ID. More...
 
otError otThreadSetExtendedPanId (otInstance *aInstance, const uint8_t *aExtendedPanId)
 Set the IEEE 802.15.4 Extended PAN ID. More...
 
otError otThreadGetLeaderRloc (otInstance *aInstance, otIp6Address *aAddress)
 This function returns a pointer to the Leader's RLOC. More...
 
otLinkModeConfig otThreadGetLinkMode (otInstance *aInstance)
 Get the MLE Link Mode configuration. More...
 
otError otThreadSetLinkMode (otInstance *aInstance, otLinkModeConfig aConfig)
 Set the MLE Link Mode configuration. More...
 
const otMasterKeyotThreadGetMasterKey (otInstance *aInstance)
 Get the thrMasterKey. More...
 
otError otThreadSetMasterKey (otInstance *aInstance, const otMasterKey *aKey)
 Set the thrMasterKey. More...
 
const otIp6AddressotThreadGetMeshLocalEid (otInstance *aInstance)
 This function returns a pointer to the Mesh Local EID. More...
 
const uint8_t * otThreadGetMeshLocalPrefix (otInstance *aInstance)
 This function returns a pointer to the Mesh Local Prefix. More...
 
otError 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...
 
const char * otThreadGetNetworkName (otInstance *aInstance)
 Get the Thread Network Name. More...
 
otError otThreadSetNetworkName (otInstance *aInstance, const char *aNetworkName)
 Set the Thread Network Name. More...
 
uint32_t otThreadGetKeySequenceCounter (otInstance *aInstance)
 Get the thrKeySequenceCounter. More...
 
void otThreadSetKeySequenceCounter (otInstance *aInstance, uint32_t aKeySequenceCounter)
 Set the thrKeySequenceCounter. More...
 
uint32_t otThreadGetKeySwitchGuardTime (otInstance *aInstance)
 Get the thrKeySwitchGuardTime. More...
 
void otThreadSetKeySwitchGuardTime (otInstance *aInstance, uint32_t aKeySwitchGuardTime)
 Set the thrKeySwitchGuardTime. More...
 
otError otThreadBecomeDetached (otInstance *aInstance)
 Detach from the Thread network. More...
 
otError otThreadBecomeChild (otInstance *aInstance)
 Attempt to reattach as a child. More...
 
otError otThreadGetNextNeighborInfo (otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
 This function gets the next neighbor information. More...
 
otDeviceRole otThreadGetDeviceRole (otInstance *aInstance)
 Get the device role. More...
 
otError otThreadGetLeaderData (otInstance *aInstance, otLeaderData *aLeaderData)
 This function get the Thread Leader Data. More...
 
uint8_t otThreadGetLeaderRouterId (otInstance *aInstance)
 Get the Leader's Router ID. More...
 
uint8_t otThreadGetLeaderWeight (otInstance *aInstance)
 Get the Leader's Weight. More...
 
uint32_t otThreadGetPartitionId (otInstance *aInstance)
 Get the Partition ID. More...
 
uint16_t otThreadGetRloc16 (otInstance *aInstance)
 Get the RLOC16. More...
 
otError otThreadGetParentInfo (otInstance *aInstance, otRouterInfo *aParentInfo)
 The function retrieves diagnostic information for a Thread Router as parent. More...
 
otError otThreadGetParentAverageRssi (otInstance *aInstance, int8_t *aParentRssi)
 The function retrieves the average RSSI for the Thread Parent. More...
 
otError otThreadGetParentLastRssi (otInstance *aInstance, int8_t *aLastRssi)
 The function retrieves the RSSI of the last packet from the Thread Parent. More...
 
const char * otGetVersionString (void)
 Get the OpenThread version string. More...
 
otError otThreadSetEnabled (otInstance *aInstance, bool aEnabled)
 This function starts Thread protocol operation. More...
 
bool otThreadGetAutoStart (otInstance *aInstance)
 This function queries if the Thread stack is configured to automatically start on reinitialization. More...
 
otError otThreadSetAutoStart (otInstance *aInstance, bool aStartAutomatically)
 This function configures the Thread stack to automatically start on reinitialization. More...
 
bool otThreadIsSingleton (otInstance *aInstance)
 This function indicates whether a node is the only router on the network. More...
 
otError 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...
 
bool otThreadIsDiscoverInProgress (otInstance *aInstance)
 This function determines if an MLE Thread Discovery is currently in progress. More...
 
const otIpCountersotThreadGetIp6Counters (otInstance *aInstance)
 Get the IPv6 counters. More...
 

Detailed Description

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

Function Documentation

§ otGetVersionString()

const char* otGetVersionString ( void  )

Get the OpenThread version string.

Returns
A pointer to the OpenThread version.

PLATFORM_VERSION_ATTR_PREFIX and PLATFORM_VERSION_ATTR_SUFFIX are intended to be used to specify compiler directives to indicate what linker section the platform version string should be stored.

This is useful for specifying an exact locaiton of where the version string will be located so that it can be easily retrieved from the raw firmware image.

If PLATFORM_VERSION_ATTR_PREFIX is unspecified, the keyword static is used instead.

If both are unspecified, the location of the string in the firmware image will be undefined and may change.