This module includes functions for all Thread roles.
Classes |
|
| struct | otBorderRouterConfig |
|
This structure represents a Border Router configuration.
|
|
| struct | otExternalRouteConfig |
|
This structure represents an External Route configuration.
|
|
| struct | otServerConfig |
|
This structure represents a Server configuration.
|
|
| struct | otServiceConfig |
|
This structure represents a Service configuration.
|
|
| struct | otNetworkDiagConnectivity |
|
This structure represents a Network Diagnostic Connectivity value.
|
|
| struct | otNetworkDiagRouteData |
|
This structure represents a Network Diagnostic Route data.
|
|
| struct | otNetworkDiagRoute |
|
This structure represents a Network Diagnostic Route TLV value.
|
|
| struct | otNetworkDiagMacCounters |
|
This structure represents a Network Diagnostic Mac Counters value.
|
|
| struct | otNetworkDiagChildEntry |
|
This structure represents a Network Diagnostic Child Table Entry.
|
|
| struct | otNetworkDiagTlv |
|
This structure represents a Network Diagnostic TLV.
|
|
| struct | otLinkModeConfig |
|
This structure represents an MLE Link Mode configuration.
|
|
| struct | otNeighborInfo |
|
This structure holds diagnostic information for a neighboring Thread node.
|
|
| struct | otLeaderData |
|
This structure represents the Thread Leader Data.
|
|
| struct | otRouterInfo |
|
This structure holds diagnostic information for a Thread Router.
|
|
| struct | otIpCounters |
|
This structure represents the IP level counters.
|
|
| struct | otMleCounters |
|
This structure represents the Thread MLE counters.
|
|
| struct | otThreadParentResponseInfo |
|
This structure represents the MLE Parent Response data.
|
|
| struct | otThreadDiscoveryRequestInfo |
|
This structure represents the Thread Discovery Request data.
|
|
Macros |
|
| #define | OT_NETWORK_DATA_ITERATOR_INIT 0 |
|
Initializer for otNetworkDataIterator.
|
|
| #define | OT_SERVICE_DATA_MAX_SIZE 252 |
|
Maximum size of Service Data in bytes.
|
|
| #define | OT_SERVER_DATA_MAX_SIZE 248 |
|
Maximum size of Server Data in bytes. This is theoretical limit, practical one is much lower.
|
|
| #define | OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES 19 |
|
Maximum Number of Network Diagnostic TLV Types to Request or Reset.
|
|
| #define | OT_NETWORK_DIAGNOSTIC_CHILD_TABLE_ENTRY_SIZE 3 |
|
Size of Network Diagnostic Child Table entry.
|
|
| #define | OT_NETWORK_DIAGNOSTIC_ITERATOR_INIT 0 |
|
Initializer for otNetworkDiagIterator.
|
|
| #define | OT_NETWORK_BASE_TLV_MAX_LENGTH 254 |
|
Maximum value length of Thread Base TLV.
|
|
| #define | OT_NETWORK_MAX_ROUTER_ID 62 |
|
Maximum Router ID.
|
|
| #define | OT_NEIGHBOR_INFO_ITERATOR_INIT 0 |
|
Initializer for otNeighborInfoIterator.
|
|
| #define | OT_JOINER_ADVDATA_MAX_LENGTH 64 |
|
Maximum AdvData Length of Joiner Advertisement.
|
|
Typedefs |
|
| typedef uint32_t | otNetworkDataIterator |
|
Used to iterate through Network Data information.
|
|
| typedef struct otBorderRouterConfig | otBorderRouterConfig |
|
This structure represents a Border Router configuration.
|
|
| typedef struct otExternalRouteConfig | otExternalRouteConfig |
|
This structure represents an External Route configuration.
|
|
| typedef enum otRoutePreference | otRoutePreference |
|
Defines valid values for member mPreference in
otExternalRouteConfig
and
otBorderRouterConfig
.
|
|
| typedef struct otServerConfig | otServerConfig |
|
This structure represents a Server configuration.
|
|
| typedef struct otServiceConfig | otServiceConfig |
|
This structure represents a Service configuration.
|
|
| typedef uint16_t | otNetworkDiagIterator |
|
Used to iterate through Network Diagnostic TLV.
|
|
| typedef struct otNetworkDiagConnectivity | otNetworkDiagConnectivity |
|
This structure represents a Network Diagnostic Connectivity value.
|
|
| typedef struct otNetworkDiagRouteData | otNetworkDiagRouteData |
|
This structure represents a Network Diagnostic Route data.
|
|
| typedef struct otNetworkDiagRoute | otNetworkDiagRoute |
|
This structure represents a Network Diagnostic Route TLV value.
|
|
| typedef struct otNetworkDiagMacCounters | otNetworkDiagMacCounters |
|
This structure represents a Network Diagnostic Mac Counters value.
|
|
| typedef struct otNetworkDiagChildEntry | otNetworkDiagChildEntry |
|
This structure represents a Network Diagnostic Child Table Entry.
|
|
| typedef struct otNetworkDiagTlv | otNetworkDiagTlv |
|
This structure represents a Network Diagnostic TLV.
|
|
| typedef void(* | otReceiveDiagnosticGetCallback ) ( otError aError, otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext) |
|
This function pointer is called when Network Diagnostic Get response is received.
|
|
| typedef struct otLinkModeConfig | otLinkModeConfig |
|
This structure represents an MLE Link Mode configuration.
|
|
| typedef int16_t | otNeighborInfoIterator |
|
Used to iterate through neighbor table.
|
|
| typedef struct otLeaderData | otLeaderData |
|
This structure represents the Thread Leader Data.
|
|
| typedef struct otIpCounters | otIpCounters |
|
This structure represents the IP level counters.
|
|
| typedef struct otMleCounters | otMleCounters |
|
This structure represents the Thread MLE counters.
|
|
| typedef struct otThreadParentResponseInfo | otThreadParentResponseInfo |
|
This structure represents the MLE Parent Response data.
|
|
| typedef void(* | otThreadParentResponseCallback ) ( otThreadParentResponseInfo *aInfo, void *aContext) |
|
This function pointer is called every time an MLE Parent Response message is received.
|
|
| typedef struct otThreadDiscoveryRequestInfo | otThreadDiscoveryRequestInfo |
|
This structure represents the Thread Discovery Request data.
|
|
| typedef void(* | otThreadDiscoveryRequestCallback ) (const otThreadDiscoveryRequestInfo *aInfo, void *aContext) |
|
This function pointer is called every time an MLE Discovery Request message is received.
|
|
Functions |
|
| otError | otNetDataGet ( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength) |
|
This method provides a full or stable copy of the Partition's Thread Network Data.
|
|
| otError | otNetDataGetNextOnMeshPrefix ( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig) |
|
This function gets the next On Mesh Prefix in the partition's Network Data.
|
|
| otError | otNetDataGetNextRoute ( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig) |
|
This function gets the next external route in the partition's Network Data.
|
|
| otError | otNetDataGetNextService ( otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig) |
|
This function gets the next service in the partition's Network Data.
|
|
| uint8_t | otNetDataGetVersion ( otInstance *aInstance) |
|
Get the Network Data Version.
|
|
| uint8_t | otNetDataGetStableVersion ( otInstance *aInstance) |
|
Get the Stable Network Data Version.
|
|
| otError | otNetDataSteeringDataCheckJoiner ( otInstance *aInstance, const otExtAddress *aEui64) |
|
Check if the steering data includes a Joiner.
|
|
| otError | otNetDataSteeringDataCheckJoinerWithDiscerner ( otInstance *aInstance, const struct otJoinerDiscerner *aDiscerner) |
|
Check if the steering data includes a Joiner with a given discerner value.
|
|
| otError | otThreadGetNextDiagnosticTlv (const otMessage *aMessage, otNetworkDiagIterator *aIterator, otNetworkDiagTlv *aNetworkDiagTlv) |
|
This function gets the next Network Diagnostic TLV in the message.
|
|
| otError | otThreadSendDiagnosticGet ( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext) |
|
Send a Network Diagnostic Get request.
|
|
| otError | otThreadSendDiagnosticReset ( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount) |
|
Send a Network Diagnostic Reset request.
|
|
| otError | otThreadSetEnabled ( otInstance *aInstance, bool aEnabled) |
|
This function starts Thread protocol operation.
|
|
| uint16_t | otThreadGetVersion (void) |
|
This function gets the Thread protocol version.
|
|
| bool | otThreadIsSingleton ( otInstance *aInstance) |
|
This function indicates whether a node is the only router on the network.
|
|
| 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.
|
|
| bool | otThreadIsDiscoverInProgress ( otInstance *aInstance) |
|
This function determines if an MLE Thread Discovery is currently in progress.
|
|
| otError | otThreadSetJoinerAdvertisement ( otInstance *aInstance, uint32_t aOui, const uint8_t *aAdvData, uint8_t aAdvDataLength) |
|
This method sets the Thread Joiner Advertisement when discovering Thread network.
|
|
| uint32_t | otThreadGetChildTimeout ( otInstance *aInstance) |
|
Get the Thread Child Timeout used when operating in the Child role.
|
|
| void | otThreadSetChildTimeout ( otInstance *aInstance, uint32_t aTimeout) |
|
Set the Thread Child Timeout used when operating in the Child role.
|
|
| const otExtendedPanId * | otThreadGetExtendedPanId ( otInstance *aInstance) |
|
Get the IEEE 802.15.4 Extended PAN ID.
|
|
| otError | otThreadSetExtendedPanId ( otInstance *aInstance, const otExtendedPanId *aExtendedPanId) |
|
Set the IEEE 802.15.4 Extended PAN ID.
|
|
| otError | otThreadGetLeaderRloc ( otInstance *aInstance, otIp6Address *aLeaderRloc) |
|
This function returns a pointer to the Leader's RLOC.
|
|
| otLinkModeConfig | otThreadGetLinkMode ( otInstance *aInstance) |
|
Get the MLE Link Mode configuration.
|
|
| otError | otThreadSetLinkMode ( otInstance *aInstance, otLinkModeConfig aConfig) |
|
Set the MLE Link Mode configuration.
|
|
| const otMasterKey * | otThreadGetMasterKey ( otInstance *aInstance) |
|
Get the thrMasterKey.
|
|
| otError | otThreadSetMasterKey ( otInstance *aInstance, const otMasterKey *aKey) |
|
Set the thrMasterKey.
|
|
| const otIp6Address * | otThreadGetRloc ( otInstance *aInstance) |
|
This function returns a pointer to the Thread Routing Locator (RLOC) address.
|
|
| const otIp6Address * | otThreadGetMeshLocalEid ( otInstance *aInstance) |
|
This function returns a pointer to the Mesh Local EID address.
|
|
| const otMeshLocalPrefix * | otThreadGetMeshLocalPrefix ( otInstance *aInstance) |
|
This function returns a pointer to the Mesh Local Prefix.
|
|
| otError | otThreadSetMeshLocalPrefix ( otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix) |
|
This function sets the Mesh Local Prefix.
|
|
| const otIp6Address * | otThreadGetLinkLocalIp6Address ( otInstance *aInstance) |
|
This function returns the Thread link-local IPv6 address.
|
|
| const otIp6Address * | otThreadGetLinkLocalAllThreadNodesMulticastAddress ( otInstance *aInstance) |
|
This function returns the Thread Link-Local All Thread Nodes multicast address.
|
|
| const otIp6Address * | otThreadGetRealmLocalAllThreadNodesMulticastAddress ( otInstance *aInstance) |
|
This function returns the Thread Realm-Local All Thread Nodes multicast address.
|
|
| otError | otThreadGetServiceAloc ( otInstance *aInstance, uint8_t aServiceId, otIp6Address *aServiceAloc) |
|
This function retrieves the Service ALOC for given Service ID.
|
|
| const char * | otThreadGetNetworkName ( otInstance *aInstance) |
|
Get the Thread Network Name.
|
|
| otError | otThreadSetNetworkName ( otInstance *aInstance, const char *aNetworkName) |
|
Set the Thread Network Name.
|
|
| const char * | otThreadGetDomainName ( otInstance *aInstance) |
|
Get the Thread Domain Name.
|
|
| otError | otThreadSetDomainName ( otInstance *aInstance, const char *aDomainName) |
|
Set the Thread Domain Name.
|
|
| otError | otThreadSetFixedDuaInterfaceIdentifier ( otInstance *aInstance, const otIp6InterfaceIdentifier *aIid) |
|
Set/Clear the Interface Identifier manually specified for the Thread Domain Unicast Address.
|
|
| const otIp6InterfaceIdentifier * | otThreadGetFixedDuaInterfaceIdentifier ( otInstance *aInstance) |
|
Get the Interface Identifier manually specified for the Thread Domain Unicast Address.
|
|
| uint32_t | otThreadGetKeySequenceCounter ( otInstance *aInstance) |
|
Get the thrKeySequenceCounter.
|
|
| void | otThreadSetKeySequenceCounter ( otInstance *aInstance, uint32_t aKeySequenceCounter) |
|
Set the thrKeySequenceCounter.
|
|
| uint32_t | otThreadGetKeySwitchGuardTime ( otInstance *aInstance) |
|
Get the thrKeySwitchGuardTime.
|
|
| void | otThreadSetKeySwitchGuardTime ( otInstance *aInstance, uint32_t aKeySwitchGuardTime) |
|
Set the thrKeySwitchGuardTime.
|
|
| otError | otThreadBecomeDetached ( otInstance *aInstance) |
|
Detach from the Thread network.
|
|
| otError | otThreadBecomeChild ( otInstance *aInstance) |
|
Attempt to reattach as a child.
|
|
| otError | otThreadGetNextNeighborInfo ( otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo) |
|
This function gets the next neighbor information.
|
|
| otDeviceRole | otThreadGetDeviceRole ( otInstance *aInstance) |
|
Get the device role.
|
|
| otError | otThreadGetLeaderData ( otInstance *aInstance, otLeaderData *aLeaderData) |
|
This function get the Thread Leader Data.
|
|
| uint8_t | otThreadGetLeaderRouterId ( otInstance *aInstance) |
|
Get the Leader's Router ID.
|
|
| uint8_t | otThreadGetLeaderWeight ( otInstance *aInstance) |
|
Get the Leader's Weight.
|
|
| uint32_t | otThreadGetPartitionId ( otInstance *aInstance) |
|
Get the Partition ID.
|
|
| uint16_t | otThreadGetRloc16 ( otInstance *aInstance) |
|
Get the RLOC16.
|
|
| otError | otThreadGetParentInfo ( otInstance *aInstance, otRouterInfo *aParentInfo) |
|
The function retrieves diagnostic information for a Thread Router as parent.
|
|
| otError | otThreadGetParentAverageRssi ( otInstance *aInstance, int8_t *aParentRssi) |
|
The function retrieves the average RSSI for the Thread Parent.
|
|
| otError | otThreadGetParentLastRssi ( otInstance *aInstance, int8_t *aLastRssi) |
|
The function retrieves the RSSI of the last packet from the Thread Parent.
|
|
| const otIpCounters * | otThreadGetIp6Counters ( otInstance *aInstance) |
|
Get the IPv6 counters.
|
|
| void | otThreadResetIp6Counters ( otInstance *aInstance) |
|
Reset the IPv6 counters.
|
|
| const otMleCounters * | otThreadGetMleCounters ( otInstance *aInstance) |
|
Get the Thread MLE counters.
|
|
| void | otThreadResetMleCounters ( otInstance *aInstance) |
|
Reset the Thread MLE counters.
|
|
| void | otThreadRegisterParentResponseCallback ( otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext) |
|
This function registers a callback to receive MLE Parent Response data.
|
|
| void | otThreadSetDiscoveryRequestCallback ( otInstance *aInstance, otThreadDiscoveryRequestCallback aCallback, void *aContext) |
|
This function sets a callback to receive MLE Discovery Request data.
|
|
| void | otThreadSendAddressNotification ( otInstance *aInstance, otIp6Address *aDestination, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid) |
|
This function sends a Proactive Address Notification (ADDR_NTF.ntf) message.
|
|
| otError | otThreadSendProactiveBackboneNotification ( otInstance *aInstance, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid, uint32_t aTimeSinceLastTransaction) |
|
This function sends a Proactive Backbone Notification (PRO_BB.ntf) message on the Backbone link.
|
|
Detailed Description
This module includes functions for all Thread roles.
- Note
-
The functions in this module require
OPENTHREAD_FTD=1orOPENTHREAD_MTD=1.
Typedef Documentation
◆ otNetworkDiagMacCounters
| typedef struct otNetworkDiagMacCounters otNetworkDiagMacCounters |
This structure represents a Network Diagnostic Mac Counters value.
See RFC 2863 for definitions of member fields.
◆ otReceiveDiagnosticGetCallback
| typedef void(* otReceiveDiagnosticGetCallback) ( otError aError, otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext) |
This function pointer is called when Network Diagnostic Get response is received.
- Parameters
-
[in] aErrorThe error when failed to get the response. [in] aMessageA pointer to the message buffer containing the received Network Diagnostic Get response payload. Available only when aErrorisOT_ERROR_NONE.[in] aMessageInfoA pointer to the message info for aMessage. Available only whenaErrorisOT_ERROR_NONE.[in] aContextA pointer to application-specific context.
◆ otThreadDiscoveryRequestCallback
| typedef void(* otThreadDiscoveryRequestCallback) (const otThreadDiscoveryRequestInfo *aInfo, void *aContext) |
This function pointer is called every time an MLE Discovery Request message is received.
- Parameters
-
[in] aInfoA pointer to the Discovery Request info data. [in] aContextA pointer to callback application-specific context.
◆ otThreadParentResponseCallback
| typedef void(* 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.
Enumeration Type Documentation
◆ anonymous enum
| anonymous enum |
◆ otDeviceRole
| enum otDeviceRole |
Represents a Thread device role.
◆ otRoutePreference
| enum otRoutePreference |
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
◆ otNetDataGet()
| otError otNetDataGet | ( | otInstance * |
aInstance,
|
| bool |
aStable,
|
||
| uint8_t * |
aData,
|
||
| uint8_t * |
aDataLength
|
||
| ) |
This method provides a full or stable copy of the Partition'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.
◆ otNetDataGetNextOnMeshPrefix()
| otError 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.
◆ otNetDataGetNextRoute()
| 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.
◆ otNetDataGetNextService()
| otError otNetDataGetNextService | ( | otInstance * |
aInstance,
|
| otNetworkDataIterator * |
aIterator,
|
||
| otServiceConfig * |
aConfig
|
||
| ) |
This function gets the next service 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 service entry it should be set to OT_NETWORK_DATA_ITERATOR_INIT. [out] aConfigA pointer to where the service information will be placed.
- Return values
-
OT_ERROR_NONESuccessfully found the next service. OT_ERROR_NOT_FOUNDNo subsequent service exists in the partition's Network Data.
◆ otNetDataGetStableVersion()
| uint8_t otNetDataGetStableVersion | ( | otInstance * |
aInstance
|
) |
Get the Stable Network Data Version.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Stable Network Data Version.
◆ otNetDataGetVersion()
| uint8_t otNetDataGetVersion | ( | otInstance * |
aInstance
|
) |
Get the Network Data Version.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Network Data Version.
◆ otNetDataSteeringDataCheckJoiner()
| otError otNetDataSteeringDataCheckJoiner | ( | otInstance * |
aInstance,
|
| const otExtAddress * |
aEui64
|
||
| ) |
Check if the steering data includes a Joiner.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aEui64A pointer to the Joiner's IEEE EUI-64.
- Return values
-
OT_ERROR_NONEaEui64is included in the steering data.OT_ERROR_INVALID_STATENo steering data present. OT_ERROR_NOT_FOUNDaEui64is not included in the steering data.
◆ otNetDataSteeringDataCheckJoinerWithDiscerner()
| otError otNetDataSteeringDataCheckJoinerWithDiscerner | ( | otInstance * |
aInstance,
|
| const struct otJoinerDiscerner * |
aDiscerner
|
||
| ) |
Check if the steering data includes a Joiner with a given discerner value.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDiscernerA pointer to the Joiner Discerner.
- Return values
-
OT_ERROR_NONEaDiscerneris included in the steering data.OT_ERROR_INVALID_STATENo steering data present. OT_ERROR_NOT_FOUNDaDiscerneris not included in the steering data.
◆ otThreadBecomeChild()
| otError 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.
◆ otThreadBecomeDetached()
| otError 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.
◆ otThreadDiscover()
| 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.
- 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.
◆ otThreadGetChildTimeout()
| uint32_t 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
◆ otThreadGetDeviceRole()
| otDeviceRole 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.
◆ otThreadGetDomainName()
| const char* otThreadGetDomainName | ( | otInstance * |
aInstance
|
) |
Get the Thread Domain Name.
This function is only available since Thread 1.2.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to the Thread Domain Name.
- See also
- otThreadSetDomainName
◆ otThreadGetExtendedPanId()
| const otExtendedPanId * 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
◆ otThreadGetFixedDuaInterfaceIdentifier()
| const otIp6InterfaceIdentifier * otThreadGetFixedDuaInterfaceIdentifier | ( | otInstance * |
aInstance
|
) |
Get the Interface Identifier manually specified for the Thread Domain Unicast Address.
This function is only available since Thread 1.2 when
OPENTHREAD_CONFIG_DUA_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to the Interface Identifier which was set manually, or NULL if none was set.
◆ otThreadGetIp6Counters()
| const otIpCounters * otThreadGetIp6Counters | ( | otInstance * |
aInstance
|
) |
Get the IPv6 counters.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to the IPv6 counters.
◆ otThreadGetKeySequenceCounter()
| uint32_t otThreadGetKeySequenceCounter | ( | otInstance * |
aInstance
|
) |
Get the thrKeySequenceCounter.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The thrKeySequenceCounter value.
- See also
- otThreadSetKeySequenceCounter
◆ otThreadGetKeySwitchGuardTime()
| uint32_t otThreadGetKeySwitchGuardTime | ( | otInstance * |
aInstance
|
) |
Get the thrKeySwitchGuardTime.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The thrKeySwitchGuardTime value (in hours).
- See also
- otThreadSetKeySwitchGuardTime
◆ otThreadGetLeaderData()
| otError 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.
◆ otThreadGetLeaderRloc()
| otError 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_ARGSaLeaderRlocwas NULL.OT_ERROR_DETACHEDNot currently attached to a Thread Partition.
◆ otThreadGetLeaderRouterId()
| uint8_t otThreadGetLeaderRouterId | ( | otInstance * |
aInstance
|
) |
Get the Leader's Router ID.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Leader's Router ID.
◆ otThreadGetLeaderWeight()
| uint8_t otThreadGetLeaderWeight | ( | otInstance * |
aInstance
|
) |
Get the Leader's Weight.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Leader's Weight.
◆ otThreadGetLinkLocalAllThreadNodesMulticastAddress()
| const otIp6Address * otThreadGetLinkLocalAllThreadNodesMulticastAddress | ( | otInstance * |
aInstance
|
) |
This function returns the Thread Link-Local All Thread Nodes multicast address.
The address is a link-local Unicast Prefix-Based Multcast Address [RFC 3306], with:
- flgs set to 3 (P = 1 and T = 1)
- scop set to 2
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to Thread Link-Local All Thread Nodes multicast address.
◆ 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.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to Thread link-local IPv6 address.
◆ otThreadGetLinkMode()
| otLinkModeConfig 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
◆ otThreadGetMasterKey()
| const otMasterKey * 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
◆ otThreadGetMeshLocalEid()
| const otIp6Address * 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.
◆ otThreadGetMeshLocalPrefix()
| const otMeshLocalPrefix * 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.
◆ otThreadGetMleCounters()
| const otMleCounters * otThreadGetMleCounters | ( | otInstance * |
aInstance
|
) |
Get the Thread MLE counters.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to the Thread MLE counters.
◆ otThreadGetNetworkName()
| const char* 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
◆ otThreadGetNextDiagnosticTlv()
| otError otThreadGetNextDiagnosticTlv | ( | const otMessage * |
aMessage,
|
| otNetworkDiagIterator * |
aIterator,
|
||
| otNetworkDiagTlv * |
aNetworkDiagTlv
|
||
| ) |
This function gets the next Network Diagnostic TLV in the message.
- Parameters
-
[in] aMessageA pointer to a message. [in,out] aIteratorA pointer to the Network Diagnostic iterator context. To get the first Network Diagnostic TLV it should be set to OT_NETWORK_DIAGNOSTIC_ITERATOR_INIT. [out] aNetworkDiagTlvA pointer to where the Network Diagnostic TLV information will be placed.
- Return values
-
OT_ERROR_NONESuccessfully found the next Network Diagnostic TLV. OT_ERROR_NOT_FOUNDNo subsequent Network Diagnostic TLV exists in the message. OT_ERROR_PARSEParsing the next Network Diagnostic failed.
A subsequent call to this function is allowed only when current return value is OT_ERROR_NONE.
◆ otThreadGetNextNeighborInfo()
| otError 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_ARGSaIteratororaInfowas NULL.
◆ otThreadGetParentAverageRssi()
| otError 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.
◆ otThreadGetParentInfo()
| otError 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.
◆ otThreadGetParentLastRssi()
| otError 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_ARGSaLastRssiis NULL.
◆ otThreadGetPartitionId()
| uint32_t otThreadGetPartitionId | ( | otInstance * |
aInstance
|
) |
Get the Partition ID.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Partition ID.
◆ otThreadGetRealmLocalAllThreadNodesMulticastAddress()
| const otIp6Address * otThreadGetRealmLocalAllThreadNodesMulticastAddress | ( | otInstance * |
aInstance
|
) |
This function returns the Thread Realm-Local All Thread Nodes multicast address.
The address is a realm-local Unicast Prefix-Based Multcast Address [RFC 3306], with:
- flgs set to 3 (P = 1 and T = 1)
- scop set to 3
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- A pointer to Thread Realm-Local All Thread Nodes multicast address.
◆ otThreadGetRloc()
| const otIp6Address * 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.
◆ otThreadGetRloc16()
| uint16_t otThreadGetRloc16 | ( | otInstance * |
aInstance
|
) |
Get the RLOC16.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The RLOC16.
◆ otThreadGetServiceAloc()
| otError otThreadGetServiceAloc | ( | otInstance * |
aInstance,
|
| uint8_t |
aServiceId,
|
||
| otIp6Address * |
aServiceAloc
|
||
| ) |
This function retrieves the Service ALOC for given Service ID.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aServiceIdService ID to get ALOC for. [out] aServiceAlocA pointer to output the Service ALOC. MUST NOT BE NULL.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the Service ALOC. OT_ERROR_DETACHEDThe Thread interface is not currently attached to a Thread Partition.
◆ otThreadGetVersion()
| uint16_t otThreadGetVersion | ( | void |
|
) |
This function gets the Thread protocol version.
- Returns
- the Thread protocol version.
◆ otThreadIsDiscoverInProgress()
| bool otThreadIsDiscoverInProgress | ( | otInstance * |
aInstance
|
) |
This function determines if an MLE Thread Discovery is currently in progress.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
◆ otThreadIsSingleton()
| bool 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.
◆ otThreadRegisterParentResponseCallback()
| void 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.
◆ otThreadResetIp6Counters()
| void otThreadResetIp6Counters | ( | otInstance * |
aInstance
|
) |
Reset the IPv6 counters.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
◆ otThreadResetMleCounters()
| void otThreadResetMleCounters | ( | otInstance * |
aInstance
|
) |
Reset the Thread MLE counters.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
◆ otThreadSendAddressNotification()
| void otThreadSendAddressNotification | ( | otInstance * |
aInstance,
|
| otIp6Address * |
aDestination,
|
||
| otIp6Address * |
aTarget,
|
||
| otIp6InterfaceIdentifier * |
aMlIid
|
||
| ) |
This function sends a Proactive Address Notification (ADDR_NTF.ntf) message.
This function is only available when
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDestinationThe destination to send the ADDR_NTF.ntf message. [in] aTargetThe target address of the ADDR_NTF.ntf message. [in] aMlIidThe ML-IID of the ADDR_NTF.ntf message.
◆ otThreadSendDiagnosticGet()
| otError otThreadSendDiagnosticGet | ( | otInstance * |
aInstance,
|
| const otIp6Address * |
aDestination,
|
||
| const uint8_t |
aTlvTypes[],
|
||
| uint8_t |
aCount,
|
||
| otReceiveDiagnosticGetCallback |
aCallback,
|
||
| void * |
aCallbackContext
|
||
| ) |
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. [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.
- Return values
-
OT_ERROR_NONESuccessfully queued the DIAG_GET.req. OT_ERROR_NO_BUFSInsufficient message buffers available to send DIAG_GET.req.
◆ otThreadSendDiagnosticReset()
| otError 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
- Return values
-
OT_ERROR_NONESuccessfully queued the DIAG_RST.ntf. OT_ERROR_NO_BUFSInsufficient message buffers available to send DIAG_RST.ntf.
◆ otThreadSendProactiveBackboneNotification()
| otError otThreadSendProactiveBackboneNotification | ( | otInstance * |
aInstance,
|
| otIp6Address * |
aTarget,
|
||
| otIp6InterfaceIdentifier * |
aMlIid,
|
||
| uint32_t |
aTimeSinceLastTransaction
|
||
| ) |
This function sends a Proactive Backbone Notification (PRO_BB.ntf) message on the Backbone link.
This function is only available when
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aTargetThe target address of the PRO_BB.ntf message. [in] aMlIidThe ML-IID of the PRO_BB.ntf message. [in] aTimeSinceLastTransactionTime since last transaction (in seconds).
- Return values
-
OT_ERROR_NONESuccessfully sent PRO_BB.ntf on backbone link. OT_ERROR_NO_BUFSIf insufficient message buffers available.
◆ otThreadSetChildTimeout()
| void 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
◆ otThreadSetDiscoveryRequestCallback()
| void otThreadSetDiscoveryRequestCallback | ( | otInstance * |
aInstance,
|
| otThreadDiscoveryRequestCallback |
aCallback,
|
||
| void * |
aContext
|
||
| ) |
This function sets a callback to receive MLE Discovery Request data.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aCallbackA pointer to a function that is called upon receiving an MLE Discovery Request message. [in] aContextA pointer to callback application-specific context.
◆ otThreadSetDomainName()
| otError otThreadSetDomainName | ( | otInstance * |
aInstance,
|
| const char * |
aDomainName
|
||
| ) |
Set the Thread Domain Name.
This function is only available since Thread 1.2. This function succeeds only when Thread protocols are disabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDomainNameA pointer to the Thread Domain Name.
- Return values
-
OT_ERROR_NONESuccessfully set the Thread Domain Name. OT_ERROR_INVALID_STATEThread protocols are enabled.
- See also
- otThreadGetDomainName
◆ otThreadSetEnabled()
| otError 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.
◆ otThreadSetExtendedPanId()
| otError 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
◆ otThreadSetFixedDuaInterfaceIdentifier()
| otError otThreadSetFixedDuaInterfaceIdentifier | ( | otInstance * |
aInstance,
|
| const otIp6InterfaceIdentifier * |
aIid
|
||
| ) |
Set/Clear the Interface Identifier manually specified for the Thread Domain Unicast Address.
This function is only available since Thread 1.2 when
OPENTHREAD_CONFIG_DUA_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aIidA pointer to the Interface Identifier to set or NULL to clear.
- Return values
-
OT_ERROR_NONESuccessfully set/cleared the Interface Identifier. OT_ERROR_INVALID_ARGSThe specified Interface Identifier is reserved.
◆ otThreadSetJoinerAdvertisement()
| otError otThreadSetJoinerAdvertisement | ( | otInstance * |
aInstance,
|
| uint32_t |
aOui,
|
||
| const uint8_t * |
aAdvData,
|
||
| uint8_t |
aAdvDataLength
|
||
| ) |
This method sets the Thread Joiner Advertisement when discovering Thread network.
Thread Joiner Advertisement is used to allow a Joiner to advertise its own application-specific information (such as Vendor ID, Product ID, Discriminator, etc.) via a newly-proposed Joiner Advertisement TLV, and to make this information available to Commissioners or Commissioner Candidates without human interaction.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aOuiThe Vendor IEEE OUI value that will be included in the Joiner Advertisement. Only the least significant 3 bytes will be used, and the most significant byte will be ignored. [in] aAdvDataA pointer to the AdvData that will be included in the Joiner Advertisement. [in] aAdvDataLengthThe length of AdvData in bytes.
- Return values
-
OT_ERROR_NONESuccessfully set Joiner Advertisement. OT_ERROR_INVALID_ARGSInvalid AdvData.
◆ otThreadSetKeySequenceCounter()
| void 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
◆ otThreadSetKeySwitchGuardTime()
| void 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
◆ otThreadSetLinkMode()
| otError 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
◆ otThreadSetMasterKey()
| otError 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
◆ otThreadSetMeshLocalPrefix()
| otError 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.
◆ otThreadSetNetworkName()
| otError 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