nRF5 SDK for Thread and Zigbee v3.1.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
General

This module includes functions for all Thread roles. More...

Data Structures

struct  otMasterKey
 
struct  otNetworkName
 
struct  otExtendedPanId
 
struct  otMeshLocalPrefix
 
struct  otPSKc
 
struct  otSecurityPolicy
 
struct  otOperationalDatasetComponents
 
struct  otOperationalDataset
 
struct  otBorderRouterConfig
 
struct  otExternalRouteConfig
 
struct  otLinkModeConfig
 
struct  otNeighborInfo
 
struct  otLeaderData
 
struct  otRouterInfo
 
struct  otIpCounters
 
struct  otMleCounters
 
struct  otThreadParentResponseInfo
 

Macros

#define OT_MASTER_KEY_SIZE   16
 Size of the Thread Master Key (bytes)
 
#define OT_NETWORK_NAME_MAX_SIZE   16
 Maximum size of the Thread Network Name field (bytes)
 
#define OT_EXT_PAN_ID_SIZE   8
 Size of a Thread PAN ID (bytes)
 
#define OT_MESH_LOCAL_PREFIX_SIZE   8
 Size of the Mesh Local Prefix (bytes)
 
#define OT_PSKC_MAX_SIZE   16
 Maximum size of the PSKc (bytes)
 
#define OT_CHANNEL_1_MASK   (1 << 1)
 Channel 1.
 
#define OT_CHANNEL_2_MASK   (1 << 2)
 Channel 2.
 
#define OT_CHANNEL_3_MASK   (1 << 3)
 Channel 3.
 
#define OT_CHANNEL_4_MASK   (1 << 4)
 Channel 4.
 
#define OT_CHANNEL_5_MASK   (1 << 5)
 Channel 5.
 
#define OT_CHANNEL_6_MASK   (1 << 6)
 Channel 6.
 
#define OT_CHANNEL_7_MASK   (1 << 7)
 Channel 7.
 
#define OT_CHANNEL_8_MASK   (1 << 8)
 Channel 8.
 
#define OT_CHANNEL_9_MASK   (1 << 9)
 Channel 9.
 
#define OT_CHANNEL_10_MASK   (1 << 10)
 Channel 10.
 
#define OT_CHANNEL_11_MASK   (1 << 11)
 Channel 11.
 
#define OT_CHANNEL_12_MASK   (1 << 12)
 Channel 12.
 
#define OT_CHANNEL_13_MASK   (1 << 13)
 Channel 13.
 
#define OT_CHANNEL_14_MASK   (1 << 14)
 Channel 14.
 
#define OT_CHANNEL_15_MASK   (1 << 15)
 Channel 15.
 
#define OT_CHANNEL_16_MASK   (1 << 16)
 Channel 16.
 
#define OT_CHANNEL_17_MASK   (1 << 17)
 Channel 17.
 
#define OT_CHANNEL_18_MASK   (1 << 18)
 Channel 18.
 
#define OT_CHANNEL_19_MASK   (1 << 19)
 Channel 19.
 
#define OT_CHANNEL_20_MASK   (1 << 20)
 Channel 20.
 
#define OT_CHANNEL_21_MASK   (1 << 21)
 Channel 21.
 
#define OT_CHANNEL_22_MASK   (1 << 22)
 Channel 22.
 
#define OT_CHANNEL_23_MASK   (1 << 23)
 Channel 23.
 
#define OT_CHANNEL_24_MASK   (1 << 24)
 Channel 24.
 
#define OT_CHANNEL_25_MASK   (1 << 25)
 Channel 25.
 
#define OT_CHANNEL_26_MASK   (1 << 26)
 Channel 26.
 
#define OT_NETWORK_DATA_ITERATOR_INIT   0
 Initializer for otNetworkDataIterator.
 
#define OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES   19
 
#define OT_NEIGHBOR_INFO_ITERATOR_INIT   0
 Initializer for otNeighborInfoIterator.
 

Typedefs

typedef struct otMasterKey otMasterKey
 
typedef struct otNetworkName otNetworkName
 
typedef struct otExtendedPanId otExtendedPanId
 
typedef struct otMeshLocalPrefix otMeshLocalPrefix
 
typedef struct otPSKc otPSKc
 
typedef struct otSecurityPolicy otSecurityPolicy
 
typedef uint32_t otChannelMask
 
typedef struct
otOperationalDatasetComponents 
otOperationalDatasetComponents
 
typedef struct otOperationalDataset otOperationalDataset
 
typedef enum otMeshcopTlvType otMeshcopTlvType
 
typedef uint32_t otNetworkDataIterator
 Used to iterate through Network Data information.
 
typedef struct otBorderRouterConfig otBorderRouterConfig
 
typedef struct
otExternalRouteConfig 
otExternalRouteConfig
 
typedef enum otRoutePreference otRoutePreference
 
typedef struct otLinkModeConfig otLinkModeConfig
 
typedef int16_t otNeighborInfoIterator
 Used to iterate through neighbor table.
 
typedef struct otLeaderData otLeaderData
 
typedef struct otIpCounters otIpCounters
 
typedef struct otMleCounters otMleCounters
 
typedef struct
otThreadParentResponseInfo 
otThreadParentResponseInfo
 
typedef void(* otReceiveDiagnosticGetCallback )(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
 
typedef void(OTCALLotThreadParentResponseCallback )(otThreadParentResponseInfo *aInfo, void *aContext)
 

Enumerations

enum  {
  OT_SECURITY_POLICY_OBTAIN_MASTER_KEY = 1 << 7, OT_SECURITY_POLICY_NATIVE_COMMISSIONING = 1 << 6, OT_SECURITY_POLICY_ROUTERS = 1 << 5, OT_SECURITY_POLICY_EXTERNAL_COMMISSIONER = 1 << 4,
  OT_SECURITY_POLICY_BEACONS = 1 << 3
}
 
enum  otMeshcopTlvType {
  OT_MESHCOP_TLV_CHANNEL = 0, OT_MESHCOP_TLV_PANID = 1, OT_MESHCOP_TLV_EXTPANID = 2, OT_MESHCOP_TLV_NETWORKNAME = 3,
  OT_MESHCOP_TLV_PSKC = 4, OT_MESHCOP_TLV_MASTERKEY = 5, OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE = 6, OT_MESHCOP_TLV_MESHLOCALPREFIX = 7,
  OT_MESHCOP_TLV_STEERING_DATA = 8, OT_MESHCOP_TLV_BORDER_AGENT_RLOC = 9, OT_MESHCOP_TLV_COMMISSIONER_ID = 10, OT_MESHCOP_TLV_COMM_SESSION_ID = 11,
  OT_MESHCOP_TLV_SECURITYPOLICY = 12, OT_MESHCOP_TLV_GET = 13, OT_MESHCOP_TLV_ACTIVETIMESTAMP = 14, OT_MESHCOP_TLV_COMMISSIONER_UDP_PORT = 15,
  OT_MESHCOP_TLV_STATE = 16, OT_MESHCOP_TLV_JOINER_DTLS = 17, OT_MESHCOP_TLV_JOINER_UDP_PORT = 18, OT_MESHCOP_TLV_JOINER_IID = 19,
  OT_MESHCOP_TLV_JOINER_RLOC = 20, OT_MESHCOP_TLV_JOINER_ROUTER_KEK = 21, OT_MESHCOP_TLV_PROVISIONING_URL = 32, OT_MESHCOP_TLV_VENDOR_NAME_TLV = 33,
  OT_MESHCOP_TLV_VENDOR_MODEL_TLV = 34, OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV = 35, OT_MESHCOP_TLV_VENDOR_DATA_TLV = 36, OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV = 37,
  OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV = 48, OT_MESHCOP_TLV_IPV6_ADDRESS_TLV = 49, OT_MESHCOP_TLV_PENDINGTIMESTAMP = 51, OT_MESHCOP_TLV_DELAYTIMER = 52,
  OT_MESHCOP_TLV_CHANNELMASK = 53, OT_MESHCOP_TLV_COUNT = 54, OT_MESHCOP_TLV_PERIOD = 55, OT_MESHCOP_TLV_SCAN_DURATION = 56,
  OT_MESHCOP_TLV_ENERGY_LIST = 57, OT_MESHCOP_TLV_DISCOVERYREQUEST = 128, OT_MESHCOP_TLV_DISCOVERYRESPONSE = 129
}
 
enum  otRoutePreference { OT_ROUTE_PREFERENCE_LOW = -1, OT_ROUTE_PREFERENCE_MED = 0, OT_ROUTE_PREFERENCE_HIGH = 1 }
 
enum  otDeviceRole {
  OT_DEVICE_ROLE_DISABLED = 0, OT_DEVICE_ROLE_DETACHED = 1, OT_DEVICE_ROLE_CHILD = 2, OT_DEVICE_ROLE_ROUTER = 3,
  OT_DEVICE_ROLE_LEADER = 4
}
 

Functions

OTAPI bool OTCALL otDatasetIsCommissioned (otInstance *aInstance)
 
OTAPI otError OTCALL otDatasetGetActive (otInstance *aInstance, otOperationalDataset *aDataset)
 
OTAPI otError OTCALL otDatasetSetActive (otInstance *aInstance, const otOperationalDataset *aDataset)
 
OTAPI otError OTCALL otDatasetGetPending (otInstance *aInstance, otOperationalDataset *aDataset)
 
OTAPI otError OTCALL otDatasetSetPending (otInstance *aInstance, const otOperationalDataset *aDataset)
 
OTAPI otError OTCALL otDatasetSendMgmtActiveGet (otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
 
OTAPI otError OTCALL otDatasetSendMgmtActiveSet (otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
 
OTAPI otError OTCALL otDatasetSendMgmtPendingGet (otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
 
OTAPI otError OTCALL otDatasetSendMgmtPendingSet (otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
 
OTAPI otError OTCALL otDatasetCreateNewNetwork (otInstance *aInstance, otOperationalDataset *aDataset)
 
OTAPI uint32_t OTCALL otDatasetGetDelayTimerMinimal (otInstance *aInstance)
 
OTAPI otError OTCALL otDatasetSetDelayTimerMinimal (otInstance *aInstance, uint32_t aDelayTimerMinimal)
 
OTAPI otError OTCALL otNetDataGet (otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
 
OTAPI otError OTCALL otNetDataGetNextOnMeshPrefix (otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig)
 
otError otNetDataGetNextRoute (otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig)
 
OTAPI uint8_t OTCALL otNetDataGetVersion (otInstance *aInstance)
 
OTAPI uint8_t OTCALL otNetDataGetStableVersion (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetEnabled (otInstance *aInstance, bool aEnabled)
 
OTAPI bool OTCALL otThreadGetAutoStart (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetAutoStart (otInstance *aInstance, bool aStartAutomatically)
 
OTAPI bool OTCALL otThreadIsSingleton (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadDiscover (otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext)
 
OTAPI bool OTCALL otThreadIsDiscoverInProgress (otInstance *aInstance)
 
OTAPI uint32_t OTCALL otThreadGetChildTimeout (otInstance *aInstance)
 
OTAPI void OTCALL otThreadSetChildTimeout (otInstance *aInstance, uint32_t aTimeout)
 
OTAPI const otExtendedPanId *OTCALL otThreadGetExtendedPanId (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetExtendedPanId (otInstance *aInstance, const otExtendedPanId *aExtendedPanId)
 
OTAPI otError OTCALL otThreadGetLeaderRloc (otInstance *aInstance, otIp6Address *aLeaderRloc)
 
OTAPI otLinkModeConfig OTCALL otThreadGetLinkMode (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetLinkMode (otInstance *aInstance, otLinkModeConfig aConfig)
 
OTAPI const otMasterKey *OTCALL otThreadGetMasterKey (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetMasterKey (otInstance *aInstance, const otMasterKey *aKey)
 
OTAPI const otIp6Address *OTCALL otThreadGetRloc (otInstance *aInstance)
 
OTAPI const otIp6Address *OTCALL otThreadGetMeshLocalEid (otInstance *aInstance)
 
OTAPI const otMeshLocalPrefix
*OTCALL 
otThreadGetMeshLocalPrefix (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetMeshLocalPrefix (otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix)
 
const otIp6AddressotThreadGetLinkLocalIp6Address (otInstance *aInstance)
 
OTAPI const char *OTCALL otThreadGetNetworkName (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadSetNetworkName (otInstance *aInstance, const char *aNetworkName)
 
OTAPI uint32_t OTCALL otThreadGetKeySequenceCounter (otInstance *aInstance)
 
OTAPI void OTCALL otThreadSetKeySequenceCounter (otInstance *aInstance, uint32_t aKeySequenceCounter)
 
OTAPI uint32_t OTCALL otThreadGetKeySwitchGuardTime (otInstance *aInstance)
 
OTAPI void OTCALL otThreadSetKeySwitchGuardTime (otInstance *aInstance, uint32_t aKeySwitchGuardTime)
 
OTAPI otError OTCALL otThreadBecomeDetached (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadBecomeChild (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadGetNextNeighborInfo (otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
 
OTAPI otDeviceRole OTCALL otThreadGetDeviceRole (otInstance *aInstance)
 
OTAPI otError 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 otError OTCALL otThreadGetParentInfo (otInstance *aInstance, otRouterInfo *aParentInfo)
 
OTAPI otError OTCALL otThreadGetParentAverageRssi (otInstance *aInstance, int8_t *aParentRssi)
 
OTAPI otError OTCALL otThreadGetParentLastRssi (otInstance *aInstance, int8_t *aLastRssi)
 
void otThreadSetReceiveDiagnosticGetCallback (otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext)
 
OTAPI otError OTCALL otThreadSendDiagnosticGet (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
 
OTAPI otError OTCALL otThreadSendDiagnosticReset (otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
 
OTAPI const otIpCounters *OTCALL otThreadGetIp6Counters (otInstance *aInstance)
 
OTAPI const otMleCounters *OTCALL otThreadGetMleCounters (otInstance *aInstance)
 
void otThreadResetMleCounters (otInstance *aInstance)
 
OTAPI otError OTCALL otThreadRegisterParentResponseCallback (otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext)
 

Variables

OT_TOOL_PACKED_BEGIN struct
otMasterKey 
OT_TOOL_PACKED_END
 

Detailed Description

This module includes functions for all Thread roles.

Macro Definition Documentation

#define OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES   19

Maximum Number of Network Diagnostic TLV Types to Request or Reset.

Typedef Documentation

This structure represents a Border Router configuration.

typedef uint32_t otChannelMask

This type represents Channel Mask.

This structure represents an Extended PAN ID.

This structure represents an External Route configuration.

typedef struct otIpCounters otIpCounters

This structure represents the IP level counters.

typedef struct otLeaderData otLeaderData

This structure represents the Thread Leader Data.

This structure represents an MLE Link Mode configuration.

typedef struct otMasterKey otMasterKey

This structure represents a Thread Master Key.

This enumeration represents meshcop TLV types.

This structure represents a Mesh Local Prefix.

typedef struct otMleCounters otMleCounters

This structure represents the Thread MLE counters.

typedef struct otNetworkName otNetworkName

This structure represents a Network Name.

This structure represents an Active or Pending Operational Dataset.

Components in Dataset are optional. mComponets structure specifies which components are present in the Dataset.

This structure represents presence of different components in Active or Pending Operational Dataset.

typedef struct otPSKc otPSKc

This structure represents a PSKc.

typedef void(* otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)

This function pointer is called when Network Diagnostic Get response is received.

Parameters
[in]aMessageA pointer to the message buffer containing the received Network Diagnostic Get response payload.
[in]aMessageInfoA pointer to the message info for aMessage.
[in]aContextA pointer to application-specific context.

Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.

This structure represent Security Policy.

typedef void(OTCALL * otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext)

This function pointer is called every time an MLE Parent Response message is received.

Parameters
[in]aStatspointer to a location on stack holding the stats data.
[in]aContextA pointer to callback client-specific context.

This structure represents the MLE Parent Response data.

Enumeration Type Documentation

anonymous enum

This enumeration defines the Security Policy TLV flags.

Enumerator
OT_SECURITY_POLICY_OBTAIN_MASTER_KEY 

Obtaining the Master Key.

OT_SECURITY_POLICY_NATIVE_COMMISSIONING 

Native Commissioning.

OT_SECURITY_POLICY_ROUTERS 

Routers enabled.

OT_SECURITY_POLICY_EXTERNAL_COMMISSIONER 

External Commissioner allowed.

OT_SECURITY_POLICY_BEACONS 

Beacons enabled.

Represents a Thread device role.

Enumerator
OT_DEVICE_ROLE_DISABLED 

The Thread stack is disabled.

OT_DEVICE_ROLE_DETACHED 

Not currently participating in a Thread network/partition.

OT_DEVICE_ROLE_CHILD 

The Thread Child role.

OT_DEVICE_ROLE_ROUTER 

The Thread Router role.

OT_DEVICE_ROLE_LEADER 

The Thread Leader role.

This enumeration represents meshcop TLV types.

Enumerator
OT_MESHCOP_TLV_CHANNEL 

meshcop Channel TLV

OT_MESHCOP_TLV_PANID 

meshcop Pan Id TLV

OT_MESHCOP_TLV_EXTPANID 

meshcop Extended Pan Id TLV

OT_MESHCOP_TLV_NETWORKNAME 

meshcop Network Name TLV

OT_MESHCOP_TLV_PSKC 

meshcop PSKc TLV

OT_MESHCOP_TLV_MASTERKEY 

meshcop Network Master Key TLV

OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE 

meshcop Network Key Sequence TLV

OT_MESHCOP_TLV_MESHLOCALPREFIX 

meshcop Mesh Local Prefix TLV

OT_MESHCOP_TLV_STEERING_DATA 

meshcop Steering Data TLV

OT_MESHCOP_TLV_BORDER_AGENT_RLOC 

meshcop Border Agent Locator TLV

OT_MESHCOP_TLV_COMMISSIONER_ID 

meshcop Commissioner ID TLV

OT_MESHCOP_TLV_COMM_SESSION_ID 

meshcop Commissioner Session ID TLV

OT_MESHCOP_TLV_SECURITYPOLICY 

meshcop Security Policy TLV

OT_MESHCOP_TLV_GET 

meshcop Get TLV

OT_MESHCOP_TLV_ACTIVETIMESTAMP 

meshcop Active Timestamp TLV

OT_MESHCOP_TLV_COMMISSIONER_UDP_PORT 

meshcop Commissioner UDP Port TLV

OT_MESHCOP_TLV_STATE 

meshcop State TLV

OT_MESHCOP_TLV_JOINER_DTLS 

meshcop Joiner DTLS Encapsulation TLV

OT_MESHCOP_TLV_JOINER_UDP_PORT 

meshcop Joiner UDP Port TLV

OT_MESHCOP_TLV_JOINER_IID 

meshcop Joiner IID TLV

OT_MESHCOP_TLV_JOINER_RLOC 

meshcop Joiner Router Locator TLV

OT_MESHCOP_TLV_JOINER_ROUTER_KEK 

meshcop Joiner Router KEK TLV

OT_MESHCOP_TLV_PROVISIONING_URL 

meshcop Provisioning URL TLV

OT_MESHCOP_TLV_VENDOR_NAME_TLV 

meshcop Vendor Name TLV

OT_MESHCOP_TLV_VENDOR_MODEL_TLV 

meshcop Vendor Model TLV

OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV 

meshcop Vendor SW Version TLV

OT_MESHCOP_TLV_VENDOR_DATA_TLV 

meshcop Vendor Data TLV

OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV 

meshcop Vendor Stack Version TLV

OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV 

meshcop UDP encapsulation TLV

OT_MESHCOP_TLV_IPV6_ADDRESS_TLV 

meshcop IPv6 address TLV

OT_MESHCOP_TLV_PENDINGTIMESTAMP 

meshcop Pending Timestamp TLV

OT_MESHCOP_TLV_DELAYTIMER 

meshcop Delay Timer TLV

OT_MESHCOP_TLV_CHANNELMASK 

meshcop Channel Mask TLV

OT_MESHCOP_TLV_COUNT 

meshcop Count TLV

OT_MESHCOP_TLV_PERIOD 

meshcop Period TLV

OT_MESHCOP_TLV_SCAN_DURATION 

meshcop Scan Duration TLV

OT_MESHCOP_TLV_ENERGY_LIST 

meshcop Energy List TLV

OT_MESHCOP_TLV_DISCOVERYREQUEST 

meshcop Discovery Request TLV

OT_MESHCOP_TLV_DISCOVERYRESPONSE 

meshcop Discovery Response TLV

Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.

Enumerator
OT_ROUTE_PREFERENCE_LOW 

Low route preference.

OT_ROUTE_PREFERENCE_MED 

Medium route preference.

OT_ROUTE_PREFERENCE_HIGH 

High route preference.

Function Documentation

OTAPI otError OTCALL otDatasetCreateNewNetwork ( otInstance aInstance,
otOperationalDataset aDataset 
)

This method creates a new Operational Dataset to use when forming a new network.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aDatasetThe Operational Dataset.
Return values
OT_ERROR_NONESuccessfully created a new Operational Dataset.
OT_ERROR_FAILEDFailed to generate random values for new parameters.
OTAPI otError OTCALL otDatasetGetActive ( otInstance aInstance,
otOperationalDataset aDataset 
)

This function gets the Active Operational Dataset.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aDatasetA pointer to where the Active Operational Dataset will be placed.
Return values
OT_ERROR_NONESuccessfully retrieved the Active Operational Dataset.
OT_ERROR_INVALID_ARGSaDataset was NULL.
OTAPI uint32_t OTCALL otDatasetGetDelayTimerMinimal ( otInstance aInstance)

Get minimal delay timer.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
thevalue of minimal delay timer (in ms).
OTAPI otError OTCALL otDatasetGetPending ( otInstance aInstance,
otOperationalDataset aDataset 
)

This function gets the Pending Operational Dataset.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aDatasetA pointer to where the Pending Operational Dataset will be placed.
Return values
OT_ERROR_NONESuccessfully retrieved the Pending Operational Dataset.
OT_ERROR_INVALID_ARGSaDataset was NULL.
OTAPI bool OTCALL otDatasetIsCommissioned ( otInstance aInstance)

This function indicates whether a valid network is present in the Active Operational Dataset or not.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
OTAPI otError OTCALL otDatasetSendMgmtActiveGet ( otInstance aInstance,
const otOperationalDatasetComponents aDatasetComponents,
const uint8_t *  aTlvTypes,
uint8_t  aLength,
const otIp6Address aAddress 
)

This function sends MGMT_ACTIVE_GET.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetComponentsA pointer to a Dataset Components structure specifying which components to request.
[in]aTlvTypesA pointer to array containing additional raw TLV types to be requested.
[in]aLengthThe length of aTlvTypes.
[in]aAddressA pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
Return values
OT_ERROR_NONESuccessfully send the meshcop dataset command.
OT_ERROR_NO_BUFSInsufficient buffer space to send.
OTAPI otError OTCALL otDatasetSendMgmtActiveSet ( otInstance aInstance,
const otOperationalDataset aDataset,
const uint8_t *  aTlvs,
uint8_t  aLength 
)

This function sends MGMT_ACTIVE_SET.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetA pointer to operational dataset.
[in]aTlvsA pointer to TLVs.
[in]aLengthThe length of TLVs.
Return values
OT_ERROR_NONESuccessfully send the meshcop dataset command.
OT_ERROR_NO_BUFSInsufficient buffer space to send.
OTAPI otError OTCALL otDatasetSendMgmtPendingGet ( otInstance aInstance,
const otOperationalDatasetComponents aDatasetComponents,
const uint8_t *  aTlvTypes,
uint8_t  aLength,
const otIp6Address aAddress 
)

This function sends MGMT_PENDING_GET.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetComponentsA pointer to a Dataset Components structure specifying which components to request.
[in]aTlvTypesA pointer to array containing additional raw TLV types to be requested.
[in]aLengthThe length of aTlvTypes.
[in]aAddressA pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
Return values
OT_ERROR_NONESuccessfully send the meshcop dataset command.
OT_ERROR_NO_BUFSInsufficient buffer space to send.
OTAPI otError OTCALL otDatasetSendMgmtPendingSet ( otInstance aInstance,
const otOperationalDataset aDataset,
const uint8_t *  aTlvs,
uint8_t  aLength 
)

This function sends MGMT_PENDING_SET.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetA pointer to operational dataset.
[in]aTlvsA pointer to TLVs.
[in]aLengthThe length of TLVs.
Return values
OT_ERROR_NONESuccessfully send the meshcop dataset command.
OT_ERROR_NO_BUFSInsufficient buffer space to send.
OTAPI otError OTCALL otDatasetSetActive ( otInstance aInstance,
const otOperationalDataset aDataset 
)

This function sets the Active Operational Dataset.

If the dataset does not include an Active Timestamp, the dataset is only partially complete.

If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. The minimum set of information needed to attach is the PAN ID and Thread Master Key.

If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.

If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetA pointer to the Active Operational Dataset.
Return values
OT_ERROR_NONESuccessfully set the Active Operational Dataset.
OT_ERROR_NO_BUFSInsufficient buffer space to set the Active Operational Dataset.
OT_ERROR_INVALID_ARGSaDataset was NULL.
OTAPI otError OTCALL otDatasetSetDelayTimerMinimal ( otInstance aInstance,
uint32_t  aDelayTimerMinimal 
)

Set minimal delay timer.

Note
This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDelayTimerMinimalThe value of minimal delay timer (in ms).
Return values
OT_ERROR_NONESuccessfully set minimal delay timer.
OT_ERROR_INVALID_ARGSIf aDelayTimerMinimal is not valid.
OTAPI otError OTCALL otDatasetSetPending ( otInstance aInstance,
const otOperationalDataset aDataset 
)

This function sets the Pending Operational Dataset.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDatasetA pointer to the Pending Operational Dataset.
Return values
OT_ERROR_NONESuccessfully set the Pending Operational Dataset.
OT_ERROR_NO_BUFSInsufficient buffer space to set the Pending Operational Dataset.
OT_ERROR_INVALID_ARGSaDataset was NULL.
OTAPI otError OTCALL otNetDataGet ( otInstance aInstance,
bool  aStable,
uint8_t *  aData,
uint8_t *  aDataLength 
)

This method provides a full or stable copy of the Leader's Thread Network Data.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aStableTRUE when copying the stable version, FALSE when copying the full version.
[out]aDataA pointer to the data buffer.
[in,out]aDataLengthOn entry, size of the data buffer pointed to by aData. On exit, number of copied bytes.
OTAPI otError OTCALL otNetDataGetNextOnMeshPrefix ( otInstance aInstance,
otNetworkDataIterator aIterator,
otBorderRouterConfig aConfig 
)

This function gets the next On Mesh Prefix in the partition's Network Data.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in,out]aIteratorA pointer to the Network Data iterator context. To get the first on-mesh entry it should be set to OT_NETWORK_DATA_ITERATOR_INIT.
[out]aConfigA pointer to where the On Mesh Prefix information will be placed.
Return values
OT_ERROR_NONESuccessfully found the next On Mesh prefix.
OT_ERROR_NOT_FOUNDNo subsequent On Mesh prefix exists in the Thread Network Data.
otError otNetDataGetNextRoute ( otInstance aInstance,
otNetworkDataIterator aIterator,
otExternalRouteConfig aConfig 
)

This function gets the next external route in the partition's Network Data.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in,out]aIteratorA pointer to the Network Data iterator context. To get the first external route entry it should be set to OT_NETWORK_DATA_ITERATOR_INIT.
[out]aConfigA pointer to where the External Route information will be placed.
Return values
OT_ERROR_NONESuccessfully found the next External Route.
OT_ERROR_NOT_FOUNDNo subsequent external route entry exists in the Thread Network Data.
OTAPI uint8_t OTCALL otNetDataGetStableVersion ( otInstance aInstance)

Get the Stable Network Data Version.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The Stable Network Data Version.
OTAPI uint8_t OTCALL otNetDataGetVersion ( otInstance aInstance)

Get the Network Data Version.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The Network Data Version.
OTAPI otError OTCALL otThreadBecomeChild ( otInstance aInstance)

Attempt to reattach as a child.

Note
This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_ERROR_NONESuccessfully begin attempt to become a child.
OT_ERROR_INVALID_STATEThread is disabled.
OTAPI otError OTCALL otThreadBecomeDetached ( otInstance aInstance)

Detach from the Thread network.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_ERROR_NONESuccessfully detached from the Thread network.
OT_ERROR_INVALID_STATEThread is disabled.
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.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aScanChannelsA bit vector indicating which channels to scan (e.g. OT_CHANNEL_11_MASK).
[in]aPanIdThe PAN ID filter (set to Broadcast PAN to disable filter).
[in]aJoinerValue of the Joiner Flag in the Discovery Request TLV.
[in]aEnableEui64FilteringTRUE to filter responses on EUI-64, FALSE otherwise.
[in]aCallbackA pointer to a function called on receiving an MLE Discovery Response or scan completes.
[in]aCallbackContextA pointer to application-specific context.
Return values
OT_ERROR_NONEAccepted the Thread Discovery request.
OT_ERROR_BUSYAlready performing an Thread Discovery.
OTAPI bool OTCALL otThreadGetAutoStart ( otInstance aInstance)

This function queries if the Thread stack is configured to automatically start on reinitialization.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
TRUEIt is configured to automatically start.
FALSEIt is not configured to automatically start.
OTAPI uint32_t OTCALL otThreadGetChildTimeout ( otInstance aInstance)

Get the Thread Child Timeout used when operating in the Child role.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The Thread Child Timeout value in seconds.
See also
otThreadSetChildTimeout
OTAPI otDeviceRole OTCALL otThreadGetDeviceRole ( otInstance aInstance)

Get the device role.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_DEVICE_ROLE_DISABLEDThe Thread stack is disabled.
OT_DEVICE_ROLE_DETACHEDThe device is not currently participating in a Thread network/partition.
OT_DEVICE_ROLE_CHILDThe device is currently operating as a Thread Child.
OT_DEVICE_ROLE_ROUTERThe device is currently operating as a Thread Router.
OT_DEVICE_ROLE_LEADERThe device is currently operating as a Thread Leader.
OTAPI const otExtendedPanId* OTCALL otThreadGetExtendedPanId ( otInstance aInstance)

Get the IEEE 802.15.4 Extended PAN ID.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the IEEE 802.15.4 Extended PAN ID.
See also
otThreadSetExtendedPanId
OTAPI const otIpCounters* OTCALL otThreadGetIp6Counters ( otInstance aInstance)

Get the IPv6 counters.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the IPv6 counters.
OTAPI uint32_t OTCALL otThreadGetKeySequenceCounter ( otInstance aInstance)

Get the thrKeySequenceCounter.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The thrKeySequenceCounter value.
See also
otThreadSetKeySequenceCounter
OTAPI uint32_t OTCALL otThreadGetKeySwitchGuardTime ( otInstance aInstance)

Get the thrKeySwitchGuardTime

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The thrKeySwitchGuardTime value (in hours).
See also
otThreadSetKeySwitchGuardTime
OTAPI otError OTCALL otThreadGetLeaderData ( otInstance aInstance,
otLeaderData aLeaderData 
)

This function get the Thread Leader Data.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aLeaderDataA pointer to where the leader data is placed.
Return values
OT_ERROR_NONESuccessfully retrieved the leader data.
OT_ERROR_DETACHEDNot currently attached.
OT_ERROR_INVALID_ARGSaLeaderData is NULL.
OTAPI otError OTCALL otThreadGetLeaderRloc ( otInstance aInstance,
otIp6Address aLeaderRloc 
)

This function returns a pointer to the Leader's RLOC.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aLeaderRlocA pointer to the Leader's RLOC.
Return values
OT_ERROR_NONEThe Leader's RLOC was successfully written to aLeaderRloc.
OT_ERROR_INVALID_ARGSaLeaderRloc was NULL.
OT_ERROR_DETACHEDNot currently attached to a Thread Partition.
OTAPI uint8_t OTCALL otThreadGetLeaderRouterId ( otInstance aInstance)

Get the Leader's Router ID.

Parameters
[in]aInstanceA 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]aInstanceA pointer to an OpenThread instance.
Returns
The Leader's Weight.
const otIp6Address* otThreadGetLinkLocalIp6Address ( otInstance aInstance)

This function returns the Thread link-local IPv6 address.

The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to Thread link-local IPv6 address.
OTAPI otLinkModeConfig OTCALL otThreadGetLinkMode ( otInstance aInstance)

Get the MLE Link Mode configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The MLE Link Mode configuration.
See also
otThreadSetLinkMode
OTAPI const otMasterKey* OTCALL otThreadGetMasterKey ( otInstance aInstance)

Get the thrMasterKey.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to a buffer containing the thrMasterKey.
See also
otThreadSetMasterKey
OTAPI const otIp6Address* OTCALL otThreadGetMeshLocalEid ( otInstance aInstance)

This function returns a pointer to the Mesh Local EID address.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the Mesh Local EID address.
OTAPI const otMeshLocalPrefix* OTCALL otThreadGetMeshLocalPrefix ( otInstance aInstance)

This function returns a pointer to the Mesh Local Prefix.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the Mesh Local Prefix.
OTAPI const otMleCounters* OTCALL otThreadGetMleCounters ( otInstance aInstance)

Get the Thread MLE counters.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the Thread MLE counters.
OTAPI const char* OTCALL otThreadGetNetworkName ( otInstance aInstance)

Get the Thread Network Name.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the Thread Network Name.
See also
otThreadSetNetworkName
OTAPI otError OTCALL otThreadGetNextNeighborInfo ( otInstance aInstance,
otNeighborInfoIterator aIterator,
otNeighborInfo aInfo 
)

This function gets the next neighbor information. It is used to go through the entries of the neighbor table.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in,out]aIteratorA pointer to the iterator context. To get the first neighbor entry it should be set to OT_NEIGHBOR_INFO_ITERATOR_INIT.
[out]aInfoA pointer to the neighbor information.
Return values
OT_ERROR_NONESuccessfully found the next neighbor entry in table.
OT_ERROR_NOT_FOUNDNo subsequent neighbor entry exists in the table.
OT_ERROR_INVALID_ARGSaIterator or aInfo was NULL.
OTAPI otError OTCALL otThreadGetParentAverageRssi ( otInstance aInstance,
int8_t *  aParentRssi 
)

The function retrieves the average RSSI for the Thread Parent.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aParentRssiA pointer to where the parent RSSI should be placed.
OTAPI otError OTCALL otThreadGetParentInfo ( otInstance aInstance,
otRouterInfo aParentInfo 
)

The function retrieves diagnostic information for a Thread Router as parent.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aParentInfoA pointer to where the parent router information is placed.
OTAPI otError OTCALL otThreadGetParentLastRssi ( otInstance aInstance,
int8_t *  aLastRssi 
)

The function retrieves the RSSI of the last packet from the Thread Parent.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aLastRssiA pointer to where the last RSSI should be placed.
Return values
OT_ERROR_NONESuccessfully retrieved the RSSI data.
OT_ERROR_FAILEDUnable to get RSSI data.
OT_ERROR_INVALID_ARGSaLastRssi is NULL.
OTAPI uint32_t OTCALL otThreadGetPartitionId ( otInstance aInstance)

Get the Partition ID.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The Partition ID.
OTAPI const otIp6Address* OTCALL otThreadGetRloc ( otInstance aInstance)

This function returns a pointer to the Thread Routing Locator (RLOC) address.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
A pointer to the Thread Routing Locator (RLOC) address.
OTAPI uint16_t OTCALL otThreadGetRloc16 ( otInstance aInstance)

Get the RLOC16.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Returns
The RLOC16.
OTAPI bool OTCALL otThreadIsDiscoverInProgress ( otInstance aInstance)

This function determines if an MLE Thread Discovery is currently in progress.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
OTAPI bool OTCALL otThreadIsSingleton ( otInstance aInstance)

This function indicates whether a node is the only router on the network.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
TRUEIt is the only router in the network.
FALSEIt is a child or is not a single router in the network.
OTAPI otError OTCALL otThreadRegisterParentResponseCallback ( otInstance aInstance,
otThreadParentResponseCallback  aCallback,
void *  aContext 
)

This function registers a callback to receive MLE Parent Response data.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aCallbackA pointer to a function that is called upon receiving an MLE Parent Response message.
[in]aContextA pointer to callback client-specific context.
Return values
OT_ERROR_NONEOn successful registration
OT_ERROR_DISABLED_FEATUREIf the feature is not supported
void otThreadResetMleCounters ( otInstance aInstance)

Reset the Thread MLE counters.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
OTAPI otError OTCALL otThreadSendDiagnosticGet ( otInstance aInstance,
const otIp6Address aDestination,
const uint8_t  aTlvTypes[],
uint8_t  aCount 
)

Send a Network Diagnostic Get request.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDestinationA pointer to destination address.
[in]aTlvTypesAn array of Network Diagnostic TLV types.
[in]aCountNumber of types in aTlvTypes
OTAPI otError OTCALL otThreadSendDiagnosticReset ( otInstance aInstance,
const otIp6Address aDestination,
const uint8_t  aTlvTypes[],
uint8_t  aCount 
)

Send a Network Diagnostic Reset request.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDestinationA pointer to destination address.
[in]aTlvTypesAn array of Network Diagnostic TLV types. Currently only Type 9 is allowed.
[in]aCountNumber of types in aTlvTypes
OTAPI otError OTCALL otThreadSetAutoStart ( otInstance aInstance,
bool  aStartAutomatically 
)

This function configures the Thread stack to automatically start on reinitialization. It has no effect on the current Thread state.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aStartAutomaticallyTRUE to automatically start; FALSE to not automatically start.
OTAPI void OTCALL otThreadSetChildTimeout ( otInstance aInstance,
uint32_t  aTimeout 
)

Set the Thread Child Timeout used when operating in the Child role.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aTimeoutThe timeout value in seconds.
See also
otThreadGetChildTimeout
OTAPI otError OTCALL otThreadSetEnabled ( otInstance aInstance,
bool  aEnabled 
)

This function starts Thread protocol operation.

The interface must be up when calling this function.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aEnabledTRUE if Thread is enabled, FALSE otherwise.
Return values
OT_ERROR_NONESuccessfully started Thread protocol operation.
OT_ERROR_INVALID_STATEThe network interface was not not up.
OTAPI otError OTCALL otThreadSetExtendedPanId ( otInstance aInstance,
const otExtendedPanId aExtendedPanId 
)

Set the IEEE 802.15.4 Extended PAN ID.

This function can only be called while Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aExtendedPanIdA pointer to the IEEE 802.15.4 Extended PAN ID.
Return values
OT_ERROR_NONESuccessfully set the Extended PAN ID.
OT_ERROR_INVALID_STATEThread protocols are enabled.
See also
otThreadGetExtendedPanId
OTAPI void OTCALL otThreadSetKeySequenceCounter ( otInstance aInstance,
uint32_t  aKeySequenceCounter 
)

Set the thrKeySequenceCounter.

Note
This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aKeySequenceCounterThe thrKeySequenceCounter value.
See also
otThreadGetKeySequenceCounter
OTAPI void OTCALL otThreadSetKeySwitchGuardTime ( otInstance aInstance,
uint32_t  aKeySwitchGuardTime 
)

Set the thrKeySwitchGuardTime

Note
This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aKeySwitchGuardTimeThe thrKeySwitchGuardTime value (in hours).
See also
otThreadGetKeySwitchGuardTime
OTAPI otError OTCALL otThreadSetLinkMode ( otInstance aInstance,
otLinkModeConfig  aConfig 
)

Set the MLE Link Mode configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aConfigA pointer to the Link Mode configuration.
Return values
OT_ERROR_NONESuccessfully set the MLE Link Mode configuration.
See also
otThreadGetLinkMode
OTAPI otError OTCALL otThreadSetMasterKey ( otInstance aInstance,
const otMasterKey aKey 
)

Set the thrMasterKey.

This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aKeyA pointer to a buffer containing the thrMasterKey.
Return values
OT_ERROR_NONESuccessfully set the thrMasterKey.
OT_ERROR_INVALID_ARGSIf aKeyLength is larger than 16.
OT_ERROR_INVALID_STATEThread protocols are enabled.
See also
otThreadGetMasterKey
OTAPI otError OTCALL otThreadSetMeshLocalPrefix ( otInstance aInstance,
const otMeshLocalPrefix aMeshLocalPrefix 
)

This function sets the Mesh Local Prefix.

This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aMeshLocalPrefixA pointer to the Mesh Local Prefix.
Return values
OT_ERROR_NONESuccessfully set the Mesh Local Prefix.
OT_ERROR_INVALID_STATEThread protocols are enabled.
OTAPI otError OTCALL otThreadSetNetworkName ( otInstance aInstance,
const char *  aNetworkName 
)

Set the Thread Network Name.

This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aNetworkNameA pointer to the Thread Network Name.
Return values
OT_ERROR_NONESuccessfully set the Thread Network Name.
OT_ERROR_INVALID_STATEThread protocols are enabled.
See also
otThreadGetNetworkName
void otThreadSetReceiveDiagnosticGetCallback ( otInstance aInstance,
otReceiveDiagnosticGetCallback  aCallback,
void *  aCallbackContext 
)

This function registers a callback to provide received raw Network Diagnostic Get response payload.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aCallbackA pointer to a function that is called when Network Diagnostic Get response is received or NULL to disable the callback.
[in]aCallbackContextA pointer to application-specific context.

Documentation feedback | Developer Zone | Subscribe | Updated