General

This module includes functions for all Thread roles.

Summary

Enumerations

anonymous 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
This enumeration defines the Security Policy TLV flags.
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
}
enum
Represents a Thread device role.
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_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
This enumeration represents meshcop TLV types.
otRoutePreference{
  OT_ROUTE_PREFERENCE_LOW = -1,
  OT_ROUTE_PREFERENCE_MED = 0,
  OT_ROUTE_PREFERENCE_HIGH = 1
}
enum
Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.

Typedefs

otBorderRouterConfig typedef
This structure represents a Border Router configuration.
otChannelMaskPage0 typedef
uint32_t
This type represents Channel Mask Page 0.
otExtendedPanId typedef
This structure represents an Extended PAN ID.
otExternalRouteConfig typedef
This structure represents an External Route configuration.
otIpCounters typedef
struct otIpCounters
This structure represents the IP level counters.
otLeaderData typedef
struct otLeaderData
This structure represents the Thread Leader Data.
otLinkModeConfig typedef
This structure represents an MLE Link Mode configuration.
otMasterKey typedef
struct otMasterKey
This structure represents a Thread Master Key.
otMeshLocalPrefix typedef
This structure represents a Mesh Local Prefix.
otMeshcopTlvType typedef
This enumeration represents meshcop TLV types.
otMleCounters typedef
struct otMleCounters
This structure represents the Thread MLE counters.
otNeighborInfoIterator typedef
int16_t
Used to iterate through neighbor table.
otNetworkDataIterator typedef
uint32_t
Used to iterate through Network Data information.
otNetworkName typedef
struct otNetworkName
This structure represents a Network Name.
otOperationalDataset typedef
This structure represents an Active or Pending Operational Dataset.
otOperationalDatasetComponents typedef
This structure represents presence of different components in Active or Pending Operational Dataset.
otPSKc typedef
struct otPSKc
This structure represents PSKc.
otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext) typedef
void(*
This function pointer is called when Network Diagnostic Get response is received.
otRoutePreference typedef
Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.
otSecurityPolicy typedef
This structure represent Security Policy.
otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext) typedef
void(OTCALL *
This function pointer is called every time an MLE Parent Response message is received.
otThreadParentResponseInfo typedef
This structure represents the MLE Parent Response data.

Variables

OT_TOOL_PACKED_END

Functions

otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset)
This function gets the Active Operational Dataset.
otDatasetGetDelayTimerMinimal(otInstance *aInstance)
OTAPI uint32_t OTCALL
Get minimal delay timer.
otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset)
This function gets the Pending Operational Dataset.
otDatasetIsCommissioned(otInstance *aInstance)
OTAPI bool OTCALL
This function indicates whether a valid network is present in the Active Operational Dataset or not.
otDatasetSendMgmtActiveGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
This function sends MGMT_ACTIVE_GET.
otDatasetSendMgmtActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
This function sends MGMT_ACTIVE_SET.
otDatasetSendMgmtPendingGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
This function sends MGMT_PENDING_GET.
otDatasetSendMgmtPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
This function sends MGMT_PENDING_SET.
otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset)
This function sets the Active Operational Dataset.
otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal)
Set minimal delay timer.
otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset)
This function sets the Pending Operational Dataset.
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.
otNetDataGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig)
This function gets the next On Mesh Prefix in the partition's Network Data.
otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig)
This function gets the next external route in the partition's Network Data.
otNetDataGetStableVersion(otInstance *aInstance)
OTAPI uint8_t OTCALL
Get the Stable Network Data Version.
otNetDataGetVersion(otInstance *aInstance)
OTAPI uint8_t OTCALL
Get the Network Data Version.
otThreadBecomeChild(otInstance *aInstance)
Attempt to reattach as a child.
otThreadBecomeDetached(otInstance *aInstance)
Detach from the Thread network.
otThreadDiscover(otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext)
This function starts a Thread Discovery scan.
otThreadGetAutoStart(otInstance *aInstance)
OTAPI bool OTCALL
This function queries if the Thread stack is configured to automatically start on reinitialization.
otThreadGetChildTimeout(otInstance *aInstance)
OTAPI uint32_t OTCALL
Get the Thread Child Timeout used when operating in the Child role.
otThreadGetDeviceRole(otInstance *aInstance)
Get the device role.
otThreadGetExtendedPanId(otInstance *aInstance)
Get the IEEE 802.15.4 Extended PAN ID.
otThreadGetIp6Counters(otInstance *aInstance)
Get the IPv6 counters.
otThreadGetKeySequenceCounter(otInstance *aInstance)
OTAPI uint32_t OTCALL
Get the thrKeySequenceCounter.
otThreadGetKeySwitchGuardTime(otInstance *aInstance)
OTAPI uint32_t OTCALL
Get the thrKeySwitchGuardTime.
otThreadGetLeaderData(otInstance *aInstance, otLeaderData *aLeaderData)
This function get the Thread Leader Data.
otThreadGetLeaderRloc(otInstance *aInstance, otIp6Address *aLeaderRloc)
This function returns a pointer to the Leader's RLOC.
otThreadGetLeaderRouterId(otInstance *aInstance)
OTAPI uint8_t OTCALL
Get the Leader's Router ID.
otThreadGetLeaderWeight(otInstance *aInstance)
OTAPI uint8_t OTCALL
Get the Leader's Weight.
otThreadGetLinkLocalIp6Address(otInstance *aInstance)
const otIp6Address *
This function returns the Thread link-local IPv6 address.
otThreadGetLinkMode(otInstance *aInstance)
Get the MLE Link Mode configuration.
otThreadGetMasterKey(otInstance *aInstance)
Get the thrMasterKey.
otThreadGetMeshLocalEid(otInstance *aInstance)
This function returns a pointer to the Mesh Local EID.
otThreadGetMeshLocalPrefix(otInstance *aInstance)
This function returns a pointer to the Mesh Local Prefix.
otThreadGetMleCounters(otInstance *aInstance)
const otMleCounters *
Get the Thread MLE counters.
otThreadGetNetworkName(otInstance *aInstance)
OTAPI const char *OTCALL
Get the Thread Network Name.
otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
This function gets the next neighbor information.
otThreadGetParentAverageRssi(otInstance *aInstance, int8_t *aParentRssi)
The function retrieves the average RSSI for the Thread Parent.
otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
The function retrieves diagnostic information for a Thread Router as parent.
otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi)
The function retrieves the RSSI of the last packet from the Thread Parent.
otThreadGetPartitionId(otInstance *aInstance)
OTAPI uint32_t OTCALL
Get the Partition ID.
otThreadGetRloc16(otInstance *aInstance)
OTAPI uint16_t OTCALL
Get the RLOC16.
otThreadIsDiscoverInProgress(otInstance *aInstance)
OTAPI bool OTCALL
This function determines if an MLE Thread Discovery is currently in progress.
otThreadIsSingleton(otInstance *aInstance)
OTAPI bool OTCALL
This function indicates whether a node is the only router on the network.
otThreadRegisterParentResponseCallback(otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext)
This function registers a callback to receive MLE Parent Response data.
otThreadResetMleCounters(otInstance *aInstance)
void
Reset the Thread MLE counters.
otThreadSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
Send a Network Diagnostic Get request.
otThreadSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
Send a Network Diagnostic Reset request.
otThreadSetAutoStart(otInstance *aInstance, bool aStartAutomatically)
This function configures the Thread stack to automatically start on reinitialization.
otThreadSetChildTimeout(otInstance *aInstance, uint32_t aTimeout)
OTAPI void OTCALL
Set the Thread Child Timeout used when operating in the Child role.
otThreadSetEnabled(otInstance *aInstance, bool aEnabled)
This function starts Thread protocol operation.
otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId)
Set the IEEE 802.15.4 Extended PAN ID.
otThreadSetKeySequenceCounter(otInstance *aInstance, uint32_t aKeySequenceCounter)
OTAPI void OTCALL
Set the thrKeySequenceCounter.
otThreadSetKeySwitchGuardTime(otInstance *aInstance, uint32_t aKeySwitchGuardTime)
OTAPI void OTCALL
Set the thrKeySwitchGuardTime.
otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig)
Set the MLE Link Mode configuration.
otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey)
Set the thrMasterKey.
otThreadSetMeshLocalPrefix(otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix)
This function sets the Mesh Local Prefix.
otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName)
Set the Thread Network Name.
otThreadSetReceiveDiagnosticGetCallback(otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext)
void
This function registers a callback to provide received raw Network Diagnostic Get response payload.

Structs

otBorderRouterConfig

This structure represents a Border Router configuration.

otExtendedPanId

This structure represents an Extended PAN ID.

otExternalRouteConfig

This structure represents an External Route configuration.

otIpCounters

This structure represents the IP level counters.

otLeaderData

This structure represents the Thread Leader Data.

otLinkModeConfig

This structure represents an MLE Link Mode configuration.

otMasterKey

This structure represents a Thread Master Key.

otMeshLocalPrefix

This structure represents a Mesh Local Prefix.

otMleCounters

This structure represents the Thread MLE counters.

otNeighborInfo

This structure holds diagnostic information for a neighboring Thread node.

otNetworkName

This structure represents a Network Name.

otOperationalDataset

This structure represents an Active or Pending Operational Dataset.

otOperationalDatasetComponents

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

otPSKc

This structure represents PSKc.

otRouterInfo

This structure holds diagnostic information for a Thread Router.

otSecurityPolicy

This structure represent Security Policy.

otThreadParentResponseInfo

This structure represents the MLE Parent Response data.

Enumerations

anonymous enum

 anonymous enum

This enumeration defines the Security Policy TLV flags.

Properties
OT_SECURITY_POLICY_BEACONS

Beacons enabled.

OT_SECURITY_POLICY_EXTERNAL_COMMISSIONER

External Commissioner allowed.

OT_SECURITY_POLICY_NATIVE_COMMISSIONING

Native Commissioning.

OT_SECURITY_POLICY_OBTAIN_MASTER_KEY

Obtaining the Master Key.

OT_SECURITY_POLICY_ROUTERS

Routers enabled.

otDeviceRole

 otDeviceRole

Represents a Thread device role.

Properties
OT_DEVICE_ROLE_CHILD

The Thread Child role.

OT_DEVICE_ROLE_DETACHED

Not currently participating in a Thread network/partition.

OT_DEVICE_ROLE_DISABLED

The Thread stack is disabled.

OT_DEVICE_ROLE_LEADER

The Thread Leader role.

OT_DEVICE_ROLE_ROUTER

The Thread Router role.

otMeshcopTlvType

 otMeshcopTlvType

This enumeration represents meshcop TLV types.

Properties
OT_MESHCOP_TLV_ACTIVETIMESTAMP

meshcop Active Timestamp TLV

OT_MESHCOP_TLV_BORDER_AGENT_RLOC

meshcop Border Agent Locator TLV

OT_MESHCOP_TLV_CHANNEL

meshcop Channel TLV

OT_MESHCOP_TLV_CHANNELMASK

meshcop Channel Mask TLV

OT_MESHCOP_TLV_COMMISSIONER_ID

meshcop Commissioner ID TLV

OT_MESHCOP_TLV_COMM_SESSION_ID

meshcop Commissioner Session ID TLV

OT_MESHCOP_TLV_COUNT

meshcop Count TLV

OT_MESHCOP_TLV_DELAYTIMER

meshcop Delay Timer TLV

OT_MESHCOP_TLV_DISCOVERYREQUEST

meshcop Discovery Request TLV

OT_MESHCOP_TLV_DISCOVERYRESPONSE

meshcop Discovery Response TLV

OT_MESHCOP_TLV_ENERGY_LIST

meshcop Energy List TLV

OT_MESHCOP_TLV_EXTPANID

meshcop Extended Pan Id TLV

OT_MESHCOP_TLV_GET

meshcop Get TLV

OT_MESHCOP_TLV_IPV6_ADDRESS_TLV

meshcop IPv6 address TLV

OT_MESHCOP_TLV_JOINER_DTLS

meshcop Joiner DTLS Encapsulation 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_JOINER_UDP_PORT

meshcop Joiner UDP Port TLV

OT_MESHCOP_TLV_MASTERKEY

meshcop Network Master Key TLV

OT_MESHCOP_TLV_MESHLOCALPREFIX

meshcop Mesh Local Prefix TLV

OT_MESHCOP_TLV_NETWORKNAME

meshcop Network Name TLV

OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE

meshcop Network Key Sequence TLV

OT_MESHCOP_TLV_PANID

meshcop Pan Id TLV

OT_MESHCOP_TLV_PENDINGTIMESTAMP

meshcop Pending Timestamp TLV

OT_MESHCOP_TLV_PERIOD

meshcop Period TLV

OT_MESHCOP_TLV_PROVISIONING_URL

meshcop Provisioning URL TLV

OT_MESHCOP_TLV_PSKC

meshcop PSKc TLV

OT_MESHCOP_TLV_SCAN_DURATION

meshcop Scan Duration TLV

OT_MESHCOP_TLV_SECURITYPOLICY

meshcop Security Policy TLV

OT_MESHCOP_TLV_STATE

meshcop State TLV

OT_MESHCOP_TLV_STEERING_DATA

meshcop Steering Data TLV

OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV

meshcop UDP encapsulation TLV

OT_MESHCOP_TLV_VENDOR_DATA_TLV

meshcop Vendor Data TLV

OT_MESHCOP_TLV_VENDOR_MODEL_TLV

meshcop Vendor Model TLV

OT_MESHCOP_TLV_VENDOR_NAME_TLV

meshcop Vendor Name TLV

OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV

meshcop Vendor Stack Version TLV

OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV

meshcop Vendor SW Version TLV

otRoutePreference

 otRoutePreference

Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.

Properties
OT_ROUTE_PREFERENCE_HIGH

High route preference.

OT_ROUTE_PREFERENCE_LOW

Low route preference.

OT_ROUTE_PREFERENCE_MED

Medium route preference.

Typedefs

otBorderRouterConfig

struct otBorderRouterConfig otBorderRouterConfig

This structure represents a Border Router configuration.

otChannelMaskPage0

uint32_t otChannelMaskPage0

This type represents Channel Mask Page 0.

otExtendedPanId

struct otExtendedPanId otExtendedPanId

This structure represents an Extended PAN ID.

otExternalRouteConfig

struct otExternalRouteConfig otExternalRouteConfig

This structure represents an External Route configuration.

otIpCounters

struct otIpCounters otIpCounters

This structure represents the IP level counters.

otLeaderData

struct otLeaderData otLeaderData

This structure represents the Thread Leader Data.

otLinkModeConfig

struct otLinkModeConfig otLinkModeConfig

This structure represents an MLE Link Mode configuration.

otMasterKey

struct otMasterKey otMasterKey

This structure represents a Thread Master Key.

otMeshLocalPrefix

struct otMeshLocalPrefix otMeshLocalPrefix

This structure represents a Mesh Local Prefix.

otMeshcopTlvType

enum otMeshcopTlvType otMeshcopTlvType

This enumeration represents meshcop TLV types.

otMleCounters

struct otMleCounters otMleCounters

This structure represents the Thread MLE counters.

otNeighborInfoIterator

int16_t otNeighborInfoIterator

Used to iterate through neighbor table.

otNetworkDataIterator

uint32_t otNetworkDataIterator

Used to iterate through Network Data information.

otNetworkName

struct otNetworkName otNetworkName

This structure represents a Network Name.

otOperationalDataset

struct otOperationalDataset otOperationalDataset

This structure represents an Active or Pending Operational Dataset.

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

otOperationalDatasetComponents

struct otOperationalDatasetComponents otOperationalDatasetComponents

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

otPSKc

struct otPSKc otPSKc

This structure represents PSKc.

otReceiveDiagnosticGetCallback

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

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

Details
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.

otRoutePreference

enum otRoutePreference otRoutePreference

Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.

otSecurityPolicy

struct otSecurityPolicy otSecurityPolicy

This structure represent Security Policy.

otThreadParentResponseCallback

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

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

Details
Parameters
[in] aStats
pointer to a location on stack holding the stats data.
[in] aContext
A pointer to callback client-specific context.

otThreadParentResponseInfo

struct otThreadParentResponseInfo otThreadParentResponseInfo

This structure represents the MLE Parent Response data.

Variables

OT_TOOL_PACKED_END

OT_TOOL_PACKED_BEGIN struct otMasterKey OT_TOOL_PACKED_END

Functions

otDatasetGetActive

OTAPI otError OTCALL otDatasetGetActive(
  otInstance *aInstance,
  otOperationalDataset *aDataset
)

This function gets the Active Operational Dataset.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aDataset
A pointer to where the Active Operational Dataset will be placed.
Return Values
OT_ERROR_NONE
Successfully retrieved the Active Operational Dataset.
OT_ERROR_INVALID_ARGS
aDataset was NULL.

otDatasetGetDelayTimerMinimal

OTAPI uint32_t OTCALL otDatasetGetDelayTimerMinimal(
  otInstance *aInstance
)

Get minimal delay timer.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
the
value of minimal delay timer (in ms).

otDatasetGetPending

OTAPI otError OTCALL otDatasetGetPending(
  otInstance *aInstance,
  otOperationalDataset *aDataset
)

This function gets the Pending Operational Dataset.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aDataset
A pointer to where the Pending Operational Dataset will be placed.
Return Values
OT_ERROR_NONE
Successfully retrieved the Pending Operational Dataset.
OT_ERROR_INVALID_ARGS
aDataset was NULL.

otDatasetIsCommissioned

OTAPI bool OTCALL otDatasetIsCommissioned(
  otInstance *aInstance
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.

otDatasetSendMgmtActiveGet

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDatasetComponents
A pointer to a Dataset Components structure specifying which components to request.
[in] aTlvTypes
A pointer to array containing additional raw TLV types to be requested.
[in] aLength
The length of aTlvTypes.
[in] aAddress
A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
Return Values
OT_ERROR_NONE
Successfully send the meshcop dataset command.
OT_ERROR_NO_BUFS
Insufficient buffer space to send.

otDatasetSendMgmtActiveSet

OTAPI otError OTCALL otDatasetSendMgmtActiveSet(
  otInstance *aInstance,
  const otOperationalDataset *aDataset,
  const uint8_t *aTlvs,
  uint8_t aLength
)

This function sends MGMT_ACTIVE_SET.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDataset
A pointer to operational dataset.
[in] aTlvs
A pointer to TLVs.
[in] aLength
The length of TLVs.
Return Values
OT_ERROR_NONE
Successfully send the meshcop dataset command.
OT_ERROR_NO_BUFS
Insufficient buffer space to send.

otDatasetSendMgmtPendingGet

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDatasetComponents
A pointer to a Dataset Components structure specifying which components to request.
[in] aTlvTypes
A pointer to array containing additional raw TLV types to be requested.
[in] aLength
The length of aTlvTypes.
[in] aAddress
A pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
Return Values
OT_ERROR_NONE
Successfully send the meshcop dataset command.
OT_ERROR_NO_BUFS
Insufficient buffer space to send.

otDatasetSendMgmtPendingSet

OTAPI otError OTCALL otDatasetSendMgmtPendingSet(
  otInstance *aInstance,
  const otOperationalDataset *aDataset,
  const uint8_t *aTlvs,
  uint8_t aLength
)

This function sends MGMT_PENDING_SET.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDataset
A pointer to operational dataset.
[in] aTlvs
A pointer to TLVs.
[in] aLength
The length of TLVs.
Return Values
OT_ERROR_NONE
Successfully send the meshcop dataset command.
OT_ERROR_NO_BUFS
Insufficient buffer space to send.

otDatasetSetActive

OTAPI otError OTCALL otDatasetSetActive(
  otInstance *aInstance,
  const otOperationalDataset *aDataset
)

This function sets the Active Operational Dataset.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDataset
A pointer to the Active Operational Dataset.
Return Values
OT_ERROR_NONE
Successfully set the Active Operational Dataset.
OT_ERROR_NO_BUFS
Insufficient buffer space to set the Active Operational Dataset.
OT_ERROR_INVALID_ARGS
aDataset was NULL.

otDatasetSetDelayTimerMinimal

OTAPI otError OTCALL otDatasetSetDelayTimerMinimal(
  otInstance *aInstance,
  uint32_t aDelayTimerMinimal
)

Set minimal delay timer.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDelayTimerMinimal
The value of minimal delay timer (in ms).
Return Values
OT_ERROR_NONE
Successfully set minimal delay timer.
OT_ERROR_INVALID_ARGS
If aDelayTimerMinimal is not valid.

otDatasetSetPending

OTAPI otError OTCALL otDatasetSetPending(
  otInstance *aInstance,
  const otOperationalDataset *aDataset
)

This function sets the Pending Operational Dataset.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDataset
A pointer to the Pending Operational Dataset.
Return Values
OT_ERROR_NONE
Successfully set the Pending Operational Dataset.
OT_ERROR_NO_BUFS
Insufficient buffer space to set the Pending Operational Dataset.
OT_ERROR_INVALID_ARGS
aDataset was NULL.

otNetDataGet

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aStable
TRUE when copying the stable version, FALSE when copying the full version.
[out] aData
A pointer to the data buffer.
[in,out] aDataLength
On entry, size of the data buffer pointed to by aData. On exit, number of copied bytes.

otNetDataGetNextOnMeshPrefix

OTAPI otError OTCALL otNetDataGetNextOnMeshPrefix(
  otInstance *aInstance,
  otNetworkDataIterator *aIterator,
  otBorderRouterConfig *aConfig
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in,out] aIterator
A 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] aConfig
A pointer to where the On Mesh Prefix information will be placed.
Return Values
OT_ERROR_NONE
Successfully found the next On Mesh prefix.
OT_ERROR_NOT_FOUND
No subsequent On Mesh prefix exists in the Thread Network Data.

otNetDataGetNextRoute

otError otNetDataGetNextRoute(
  otInstance *aInstance,
  otNetworkDataIterator *aIterator,
  otExternalRouteConfig *aConfig
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in,out] aIterator
A 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] aConfig
A pointer to where the External Route information will be placed.
Return Values
OT_ERROR_NONE
Successfully found the next External Route.
OT_ERROR_NOT_FOUND
No subsequent external route entry exists in the Thread Network Data.

otNetDataGetStableVersion

OTAPI uint8_t OTCALL otNetDataGetStableVersion(
  otInstance *aInstance
)

Get the Stable Network Data Version.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Stable Network Data Version.

otNetDataGetVersion

OTAPI uint8_t OTCALL otNetDataGetVersion(
  otInstance *aInstance
)

Get the Network Data Version.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Network Data Version.

otThreadBecomeChild

OTAPI otError OTCALL otThreadBecomeChild(
  otInstance *aInstance
)

Attempt to reattach as a child.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
OT_ERROR_NONE
Successfully begin attempt to become a child.
OT_ERROR_INVALID_STATE
Thread is disabled.

otThreadBecomeDetached

OTAPI otError OTCALL otThreadBecomeDetached(
  otInstance *aInstance
)

Detach from the Thread network.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
OT_ERROR_NONE
Successfully detached from the Thread network.
OT_ERROR_INVALID_STATE
Thread is disabled.

otThreadDiscover

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aScanChannels
A bit vector indicating which channels to scan (e.g. OT_CHANNEL_11_MASK).
[in] aPanId
The PAN ID filter (set to Broadcast PAN to disable filter).
[in] aJoiner
Value of the Joiner Flag in the Discovery Request TLV.
[in] aEnableEui64Filtering
TRUE to filter responses on EUI-64, FALSE otherwise.
[in] aCallback
A pointer to a function called on receiving an MLE Discovery Response or scan completes.
[in] aCallbackContext
A pointer to application-specific context.
Return Values
OT_ERROR_NONE
Accepted the Thread Discovery request.
OT_ERROR_BUSY
Already performing an Thread Discovery.

otThreadGetAutoStart

OTAPI bool OTCALL otThreadGetAutoStart(
  otInstance *aInstance
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
TRUE
It is configured to automatically start.
FALSE
It is not configured to automatically start.

otThreadGetChildTimeout

OTAPI uint32_t OTCALL otThreadGetChildTimeout(
  otInstance *aInstance
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Thread Child Timeout value in seconds.
See also:
otThreadSetChildTimeout

otThreadGetDeviceRole

OTAPI otDeviceRoleOTCALL otThreadGetDeviceRole(
  otInstance *aInstance
)

Get the device role.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
OT_DEVICE_ROLE_DISABLED
The Thread stack is disabled.
OT_DEVICE_ROLE_DETACHED
The device is not currently participating in a Thread network/partition.
OT_DEVICE_ROLE_CHILD
The device is currently operating as a Thread Child.
OT_DEVICE_ROLE_ROUTER
The device is currently operating as a Thread Router.
OT_DEVICE_ROLE_LEADER
The device is currently operating as a Thread Leader.

otThreadGetExtendedPanId

OTAPI const otExtendedPanId *OTCALL otThreadGetExtendedPanId(
  otInstance *aInstance
)

Get the IEEE 802.15.4 Extended PAN ID.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the IEEE 802.15.4 Extended PAN ID.
See also:
otThreadSetExtendedPanId

otThreadGetIp6Counters

OTAPI const otIpCounters *OTCALL otThreadGetIp6Counters(
  otInstance *aInstance
)

Get the IPv6 counters.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the IPv6 counters.

otThreadGetKeySequenceCounter

OTAPI uint32_t OTCALL otThreadGetKeySequenceCounter(
  otInstance *aInstance
)

Get the thrKeySequenceCounter.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The thrKeySequenceCounter value.
See also:
otThreadSetKeySequenceCounter

otThreadGetKeySwitchGuardTime

OTAPI uint32_t OTCALL otThreadGetKeySwitchGuardTime(
  otInstance *aInstance
)

Get the thrKeySwitchGuardTime.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The thrKeySwitchGuardTime value (in hours).
See also:
otThreadSetKeySwitchGuardTime

otThreadGetLeaderData

OTAPI otError OTCALL otThreadGetLeaderData(
  otInstance *aInstance,
  otLeaderData *aLeaderData
)

This function get the Thread Leader Data.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aLeaderData
A pointer to where the leader data is placed.
Return Values
OT_ERROR_NONE
Successfully retrieved the leader data.
OT_ERROR_DETACHED
Not currently attached.
OT_ERROR_INVALID_ARGS
aLeaderData is NULL.

otThreadGetLeaderRloc

OTAPI otError OTCALL otThreadGetLeaderRloc(
  otInstance *aInstance,
  otIp6Address *aLeaderRloc
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aLeaderRloc
A pointer to the Leader's RLOC.
Return Values
OT_ERROR_NONE
The Leader's RLOC was successfully written to aLeaderRloc.
OT_ERROR_INVALID_ARGS
aLeaderRloc was NULL.
OT_ERROR_DETACHED
Not currently attached to a Thread Partition.

otThreadGetLeaderRouterId

OTAPI uint8_t OTCALL otThreadGetLeaderRouterId(
  otInstance *aInstance
)

Get the Leader's Router ID.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Leader's Router ID.

otThreadGetLeaderWeight

OTAPI uint8_t OTCALL otThreadGetLeaderWeight(
  otInstance *aInstance
)

Get the Leader's Weight.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Leader's Weight.

otThreadGetLinkLocalIp6Address

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to Thread link-local IPv6 address.

otThreadGetLinkMode

OTAPI otLinkModeConfigOTCALL otThreadGetLinkMode(
  otInstance *aInstance
)

Get the MLE Link Mode configuration.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The MLE Link Mode configuration.
See also:
otThreadSetLinkMode

otThreadGetMasterKey

OTAPI const otMasterKey *OTCALL otThreadGetMasterKey(
  otInstance *aInstance
)

Get the thrMasterKey.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to a buffer containing the thrMasterKey.
See also:
otThreadSetMasterKey

otThreadGetMeshLocalEid

OTAPI const otIp6Address *OTCALL otThreadGetMeshLocalEid(
  otInstance *aInstance
)

This function returns a pointer to the Mesh Local EID.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the Mesh Local EID.

otThreadGetMeshLocalPrefix

OTAPI const otMeshLocalPrefix *OTCALL otThreadGetMeshLocalPrefix(
  otInstance *aInstance
)

This function returns a pointer to the Mesh Local Prefix.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the Mesh Local Prefix.

otThreadGetMleCounters

const otMleCounters * otThreadGetMleCounters(
  otInstance *aInstance
)

Get the Thread MLE counters.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the Thread MLE counters.

otThreadGetNetworkName

OTAPI const char *OTCALL otThreadGetNetworkName(
  otInstance *aInstance
)

Get the Thread Network Name.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
A pointer to the Thread Network Name.
See also:
otThreadSetNetworkName

otThreadGetNextNeighborInfo

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.

Details
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 the neighbor information.
Return Values
OT_ERROR_NONE
Successfully found the next neighbor entry in table.
OT_ERROR_NOT_FOUND
No subsequent neighbor entry exists in the table.
OT_ERROR_INVALID_ARGS
aIterator or aInfo was NULL.

otThreadGetParentAverageRssi

OTAPI otError OTCALL otThreadGetParentAverageRssi(
  otInstance *aInstance,
  int8_t *aParentRssi
)

The function retrieves the average RSSI for the Thread Parent.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aParentRssi
A pointer to where the parent RSSI should be placed.

otThreadGetParentInfo

OTAPI otError OTCALL otThreadGetParentInfo(
  otInstance *aInstance,
  otRouterInfo *aParentInfo
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aParentInfo
A pointer to where the parent router information is placed.

otThreadGetParentLastRssi

OTAPI otError OTCALL otThreadGetParentLastRssi(
  otInstance *aInstance,
  int8_t *aLastRssi
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aLastRssi
A pointer to where the last RSSI should be placed.
Return Values
OT_ERROR_NONE
Successfully retrieved the RSSI data.
OT_ERROR_FAILED
Unable to get RSSI data.
OT_ERROR_INVALID_ARGS
aLastRssi is NULL.

otThreadGetPartitionId

OTAPI uint32_t OTCALL otThreadGetPartitionId(
  otInstance *aInstance
)

Get the Partition ID.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The Partition ID.

otThreadGetRloc16

OTAPI uint16_t OTCALL otThreadGetRloc16(
  otInstance *aInstance
)

Get the RLOC16.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Returns
The RLOC16.

otThreadIsDiscoverInProgress

OTAPI bool OTCALL otThreadIsDiscoverInProgress(
  otInstance *aInstance
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.

otThreadIsSingleton

OTAPI bool OTCALL otThreadIsSingleton(
  otInstance *aInstance
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
TRUE
It is the only router in the network.
FALSE
It is a child or is not a single router in the network.

otThreadRegisterParentResponseCallback

OTAPI otError OTCALL otThreadRegisterParentResponseCallback(
  otInstance *aInstance,
  otThreadParentResponseCallback aCallback,
  void *aContext
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aCallback
A pointer to a function that is called upon receiving an MLE Parent Response message.
[in] aContext
A pointer to callback client-specific context.
Return Values
OT_ERROR_NONE
On successful registration
OT_ERROR_DISABLED_FEATURE
If the feature is not supported

otThreadResetMleCounters

void otThreadResetMleCounters(
  otInstance *aInstance
)

Reset the Thread MLE counters.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.

otThreadSendDiagnosticGet

OTAPI otError OTCALL otThreadSendDiagnosticGet(
  otInstance *aInstance,
  const otIp6Address *aDestination,
  const uint8_t aTlvTypes[],
  uint8_t aCount
)

Send a Network Diagnostic Get request.

Details
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.
[in] aCount
Number of types in aTlvTypes

otThreadSendDiagnosticReset

OTAPI otError OTCALL otThreadSendDiagnosticReset(
  otInstance *aInstance,
  const otIp6Address *aDestination,
  const uint8_t aTlvTypes[],
  uint8_t aCount
)

Send a Network Diagnostic Reset request.

Details
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

otThreadSetAutoStart

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aStartAutomatically
TRUE to automatically start; FALSE to not automatically start.

otThreadSetChildTimeout

OTAPI void OTCALL otThreadSetChildTimeout(
  otInstance *aInstance,
  uint32_t aTimeout
)

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

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aTimeout
The timeout value in seconds.
See also:
otThreadSetChildTimeout

otThreadSetEnabled

OTAPI otError OTCALL otThreadSetEnabled(
  otInstance *aInstance,
  bool aEnabled
)

This function starts Thread protocol operation.

The interface must be up when calling this function.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aEnabled
TRUE if Thread is enabled, FALSE otherwise.
Return Values
OT_ERROR_NONE
Successfully started Thread protocol operation.
OT_ERROR_INVALID_STATE
The network interface was not not up.

otThreadSetExtendedPanId

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aExtendedPanId
A pointer to the IEEE 802.15.4 Extended PAN ID.
Return Values
OT_ERROR_NONE
Successfully set the Extended PAN ID.
OT_ERROR_INVALID_STATE
Thread protocols are enabled.
See also:
otThreadGetExtendedPanId

otThreadSetKeySequenceCounter

OTAPI void OTCALL otThreadSetKeySequenceCounter(
  otInstance *aInstance,
  uint32_t aKeySequenceCounter
)

Set the thrKeySequenceCounter.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aKeySequenceCounter
The thrKeySequenceCounter value.
See also:
otThreadGetKeySequenceCounter

otThreadSetKeySwitchGuardTime

OTAPI void OTCALL otThreadSetKeySwitchGuardTime(
  otInstance *aInstance,
  uint32_t aKeySwitchGuardTime
)

Set the thrKeySwitchGuardTime.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aKeySwitchGuardTime
The thrKeySwitchGuardTime value (in hours).
See also:
otThreadGetKeySwitchGuardTime

otThreadSetLinkMode

OTAPI otError OTCALL otThreadSetLinkMode(
  otInstance *aInstance,
  otLinkModeConfig aConfig
)

Set the MLE Link Mode configuration.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aConfig
A pointer to the Link Mode configuration.
Return Values
OT_ERROR_NONE
Successfully set the MLE Link Mode configuration.
See also:
otThreadGetLinkMode

otThreadSetMasterKey

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aKey
A pointer to a buffer containing the thrMasterKey.
Return Values
OT_ERROR_NONE
Successfully set the thrMasterKey.
OT_ERROR_INVALID_ARGS
If aKeyLength is larger than 16.
OT_ERROR_INVALID_STATE
Thread protocols are enabled.
See also:
otThreadGetMasterKey

otThreadSetMeshLocalPrefix

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aMeshLocalPrefix
A pointer to the Mesh Local Prefix.
Return Values
OT_ERROR_NONE
Successfully set the Mesh Local Prefix.
OT_ERROR_INVALID_STATE
Thread protocols are enabled.

otThreadSetNetworkName

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.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aNetworkName
A pointer to the Thread Network Name.
Return Values
OT_ERROR_NONE
Successfully set the Thread Network Name.
OT_ERROR_INVALID_STATE
Thread protocols are enabled.
See also:
otThreadGetNetworkName

otThreadSetReceiveDiagnosticGetCallback

void otThreadSetReceiveDiagnosticGetCallback(
  otInstance *aInstance,
  otReceiveDiagnosticGetCallback aCallback,
  void *aCallbackContext
)

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

Details
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.

Macros

OT_CHANNEL_11_MASK

 OT_CHANNEL_11_MASK (1 << 11)

Channel 11.

OT_CHANNEL_12_MASK

 OT_CHANNEL_12_MASK (1 << 12)

Channel 12.

OT_CHANNEL_13_MASK

 OT_CHANNEL_13_MASK (1 << 13)

Channel 13.

OT_CHANNEL_14_MASK

 OT_CHANNEL_14_MASK (1 << 14)

Channel 14.

OT_CHANNEL_15_MASK

 OT_CHANNEL_15_MASK (1 << 15)

Channel 15.

OT_CHANNEL_16_MASK

 OT_CHANNEL_16_MASK (1 << 16)

Channel 16.

OT_CHANNEL_17_MASK

 OT_CHANNEL_17_MASK (1 << 17)

Channel 17.

OT_CHANNEL_18_MASK

 OT_CHANNEL_18_MASK (1 << 18)

Channel 18.

OT_CHANNEL_19_MASK

 OT_CHANNEL_19_MASK (1 << 19)

Channel 19.

OT_CHANNEL_20_MASK

 OT_CHANNEL_20_MASK (1 << 20)

Channel 20.

OT_CHANNEL_21_MASK

 OT_CHANNEL_21_MASK (1 << 21)

Channel 21.

OT_CHANNEL_22_MASK

 OT_CHANNEL_22_MASK (1 << 22)

Channel 22.

OT_CHANNEL_23_MASK

 OT_CHANNEL_23_MASK (1 << 23)

Channel 23.

OT_CHANNEL_24_MASK

 OT_CHANNEL_24_MASK (1 << 24)

Channel 24.

OT_CHANNEL_25_MASK

 OT_CHANNEL_25_MASK (1 << 25)

Channel 25.

OT_CHANNEL_26_MASK

 OT_CHANNEL_26_MASK (1 << 26)

Channel 26.

OT_CHANNEL_ALL

 OT_CHANNEL_ALL 0xffffffff

All channels.

OT_EXT_PAN_ID_SIZE

 OT_EXT_PAN_ID_SIZE 8

Size of a Thread PAN ID (bytes)

OT_MASTER_KEY_SIZE

 OT_MASTER_KEY_SIZE 16

Size of the Thread Master Key (bytes)

OT_MESH_LOCAL_PREFIX_SIZE

 OT_MESH_LOCAL_PREFIX_SIZE 8

Size of the Mesh Local Prefix (bytes)

OT_NEIGHBOR_INFO_ITERATOR_INIT

 OT_NEIGHBOR_INFO_ITERATOR_INIT 0

Initializer for otNeighborInfoIterator.

OT_NETWORK_DATA_ITERATOR_INIT

 OT_NETWORK_DATA_ITERATOR_INIT 0

Initializer for otNetworkDataIterator.

OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES

 OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES 19

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

OT_NETWORK_NAME_MAX_SIZE

 OT_NETWORK_NAME_MAX_SIZE 16

Maximum size of the Thread Network Name field (bytes)

OT_PSKC_MAX_SIZE

 OT_PSKC_MAX_SIZE 16

Maximum size of the PSKc (bytes)