Includes functions for the Operational Dataset API.
Classes |
|
| struct | otNetworkKey |
|
This structure represents a Thread Network Key.
|
|
| struct | otNetworkName |
|
This structure represents a Network Name.
|
|
| struct | otExtendedPanId |
|
This structure represents an Extended PAN ID.
|
|
| struct | otPskc |
|
This structure represents PSKc.
|
|
| struct | otSecurityPolicy |
|
This structure represent Security Policy.
|
|
| struct | otOperationalDatasetComponents |
|
This structure represents presence of different components in Active or Pending Operational Dataset.
|
|
| struct | otTimestamp |
|
This structure represents a Thread Dataset timestamp component.
|
|
| struct | otOperationalDataset |
|
This structure represents an Active or Pending Operational Dataset.
|
|
| struct | otOperationalDatasetTlvs |
|
This structure represents an Active or Pending Operational Dataset.
|
|
Macros |
|
| #define | OT_NETWORK_KEY_SIZE 16 |
|
Size of the Thread Network Key (bytes)
|
|
| #define | OT_NETWORK_NAME_MAX_SIZE 16 |
|
Maximum size of the Thread Network Name field (bytes)
|
|
| #define | OT_EXT_PAN_ID_SIZE 8 |
|
Size of a Thread PAN ID (bytes)
|
|
| #define | OT_MESH_LOCAL_PREFIX_SIZE OT_IP6_PREFIX_SIZE |
|
Size of the Mesh Local Prefix (bytes)
|
|
| #define | OT_PSKC_MAX_SIZE 16 |
|
Maximum size of the PSKc (bytes)
|
|
| #define | OT_CHANNEL_1_MASK (1 << 1) |
|
Channel 1.
|
|
| #define | OT_CHANNEL_2_MASK (1 << 2) |
|
Channel 2.
|
|
| #define | OT_CHANNEL_3_MASK (1 << 3) |
|
Channel 3.
|
|
| #define | OT_CHANNEL_4_MASK (1 << 4) |
|
Channel 4.
|
|
| #define | OT_CHANNEL_5_MASK (1 << 5) |
|
Channel 5.
|
|
| #define | OT_CHANNEL_6_MASK (1 << 6) |
|
Channel 6.
|
|
| #define | OT_CHANNEL_7_MASK (1 << 7) |
|
Channel 7.
|
|
| #define | OT_CHANNEL_8_MASK (1 << 8) |
|
Channel 8.
|
|
| #define | OT_CHANNEL_9_MASK (1 << 9) |
|
Channel 9.
|
|
| #define | OT_CHANNEL_10_MASK (1 << 10) |
|
Channel 10.
|
|
| #define | OT_CHANNEL_11_MASK (1 << 11) |
|
Channel 11.
|
|
| #define | OT_CHANNEL_12_MASK (1 << 12) |
|
Channel 12.
|
|
| #define | OT_CHANNEL_13_MASK (1 << 13) |
|
Channel 13.
|
|
| #define | OT_CHANNEL_14_MASK (1 << 14) |
|
Channel 14.
|
|
| #define | OT_CHANNEL_15_MASK (1 << 15) |
|
Channel 15.
|
|
| #define | OT_CHANNEL_16_MASK (1 << 16) |
|
Channel 16.
|
|
| #define | OT_CHANNEL_17_MASK (1 << 17) |
|
Channel 17.
|
|
| #define | OT_CHANNEL_18_MASK (1 << 18) |
|
Channel 18.
|
|
| #define | OT_CHANNEL_19_MASK (1 << 19) |
|
Channel 19.
|
|
| #define | OT_CHANNEL_20_MASK (1 << 20) |
|
Channel 20.
|
|
| #define | OT_CHANNEL_21_MASK (1 << 21) |
|
Channel 21.
|
|
| #define | OT_CHANNEL_22_MASK (1 << 22) |
|
Channel 22.
|
|
| #define | OT_CHANNEL_23_MASK (1 << 23) |
|
Channel 23.
|
|
| #define | OT_CHANNEL_24_MASK (1 << 24) |
|
Channel 24.
|
|
| #define | OT_CHANNEL_25_MASK (1 << 25) |
|
Channel 25.
|
|
| #define | OT_CHANNEL_26_MASK (1 << 26) |
|
Channel 26.
|
|
| #define | OT_OPERATIONAL_DATASET_MAX_LENGTH 254 |
|
Maximum length of Operational Dataset in bytes.
|
|
Typedefs |
|
| typedef struct otNetworkKey | otNetworkKey |
|
This structure represents a Thread Network Key.
|
|
| typedef otCryptoKeyRef | otNetworkKeyRef |
|
This datatype represents KeyRef to NetworkKey.
|
|
| typedef struct otNetworkName | otNetworkName |
|
This structure represents a Network Name.
|
|
| typedef struct otExtendedPanId | otExtendedPanId |
|
This structure represents an Extended PAN ID.
|
|
| typedef otIp6NetworkPrefix | otMeshLocalPrefix |
|
This structure represents a Mesh Local Prefix.
|
|
| typedef struct otPskc | otPskc |
|
This structure represents a PSKc.
|
|
| typedef otCryptoKeyRef | otPskcRef |
|
This datatype represents KeyRef to PSKc.
|
|
| typedef struct otSecurityPolicy | otSecurityPolicy |
|
This structure represent Security Policy.
|
|
| typedef uint32_t | otChannelMask |
|
This type represents Channel Mask.
|
|
| typedef struct otOperationalDatasetComponents | otOperationalDatasetComponents |
|
This structure represents presence of different components in Active or Pending Operational Dataset.
|
|
| typedef struct otTimestamp | otTimestamp |
|
This structure represents a Thread Dataset timestamp component.
|
|
| typedef struct otOperationalDataset | otOperationalDataset |
|
This structure represents an Active or Pending Operational Dataset.
|
|
| typedef struct otOperationalDatasetTlvs | otOperationalDatasetTlvs |
|
This structure represents an Active or Pending Operational Dataset.
|
|
| typedef enum otMeshcopTlvType | otMeshcopTlvType |
|
This enumeration represents meshcop TLV types.
|
|
| typedef void(* | otDatasetMgmtSetCallback ) ( otError aResult, void *aContext) |
|
This function pointer is called when a response to a MGMT_SET request is received or times out.
|
|
| typedef void(* | otDatasetUpdaterCallback ) ( otError aError, void *aContext) |
|
This callback function pointer is called when a Dataset update request finishes, reporting success or failure status of the Dataset update request.
|
|
Functions |
|
| bool | otDatasetIsCommissioned ( otInstance *aInstance) |
|
This function indicates whether a valid network is present in the Active Operational Dataset or not.
|
|
| otError | otDatasetGetActive ( otInstance *aInstance, otOperationalDataset *aDataset) |
|
Gets the Active Operational Dataset.
|
|
| otError | otDatasetGetActiveTlvs ( otInstance *aInstance, otOperationalDatasetTlvs *aDataset) |
|
This function gets the Active Operational Dataset.
|
|
| otError | otDatasetSetActive ( otInstance *aInstance, const otOperationalDataset *aDataset) |
|
Sets the Active Operational Dataset.
|
|
| otError | otDatasetSetActiveTlvs ( otInstance *aInstance, const otOperationalDatasetTlvs *aDataset) |
|
This function sets the Active Operational Dataset.
|
|
| otError | otDatasetGetPending ( otInstance *aInstance, otOperationalDataset *aDataset) |
|
This function gets the Pending Operational Dataset.
|
|
| otError | otDatasetGetPendingTlvs ( otInstance *aInstance, otOperationalDatasetTlvs *aDataset) |
|
This function gets the Pending Operational Dataset.
|
|
| otError | otDatasetSetPending ( otInstance *aInstance, const otOperationalDataset *aDataset) |
|
Sets the Pending Operational Dataset.
|
|
| otError | otDatasetSetPendingTlvs ( otInstance *aInstance, const otOperationalDatasetTlvs *aDataset) |
|
This function sets the Pending Operational Dataset.
|
|
| otError | otDatasetSendMgmtActiveGet ( otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress) |
|
Sends MGMT_ACTIVE_GET.
|
|
| otError | otDatasetSendMgmtActiveSet ( otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength, otDatasetMgmtSetCallback aCallback, void *aContext) |
|
Sends MGMT_ACTIVE_SET.
|
|
| otError | otDatasetSendMgmtPendingGet ( otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress) |
|
Sends MGMT_PENDING_GET.
|
|
| otError | otDatasetSendMgmtPendingSet ( otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength, otDatasetMgmtSetCallback aCallback, void *aContext) |
|
Sends MGMT_PENDING_SET.
|
|
| otError | otDatasetGeneratePskc (const char *aPassPhrase, const otNetworkName *aNetworkName, const otExtendedPanId *aExtPanId, otPskc *aPskc) |
|
This function generates PSKc from a given pass-phrase, network name, and extended PAN ID.
|
|
| otError | otNetworkNameFromString ( otNetworkName *aNetworkName, const char *aNameString) |
Sets an
otNetworkName
instance from a given null terminated C string.
|
|
| otError | otDatasetParseTlvs (const otOperationalDatasetTlvs *aDatasetTlvs, otOperationalDataset *aDataset) |
This function parses an Operational Dataset from a
otOperationalDatasetTlvs
.
|
|
| otError | otDatasetCreateNewNetwork ( otInstance *aInstance, otOperationalDataset *aDataset) |
|
For FTD only, creates a new Operational Dataset to use when forming a new network.
|
|
| uint32_t | otDatasetGetDelayTimerMinimal ( otInstance *aInstance) |
|
For FTD only, gets a minimal delay timer.
|
|
| otError | otDatasetSetDelayTimerMinimal ( otInstance *aInstance, uint32_t aDelayTimerMinimal) |
|
For FTD only, sets a minimal delay timer.
|
|
| otError | otDatasetUpdaterRequestUpdate ( otInstance *aInstance, const otOperationalDataset *aDataset, otDatasetUpdaterCallback aCallback, void *aContext) |
|
This function requests an update to Operational Dataset.
|
|
| void | otDatasetUpdaterCancelUpdate ( otInstance *aInstance) |
|
This function cancels an ongoing (if any) Operational Dataset update request.
|
|
| bool | otDatasetUpdaterIsUpdateOngoing ( otInstance *aInstance) |
|
This function indicates whether there is an ongoing Operation Dataset update request.
|
|
Variables |
|
| OT_TOOL_PACKED_BEGIN struct otNetworkKey | OT_TOOL_PACKED_END |
Detailed Description
Includes functions for the Operational Dataset API.
For FTD builds only, Dataset Updater includes functions to manage dataset updates.
For FTD and MTD builds, the Operational Dataset API includes functions to manage Active and Pending datasets and dataset TLVs.
Typedef Documentation
◆ otDatasetMgmtSetCallback
| typedef void(* otDatasetMgmtSetCallback) ( otError aResult, void *aContext) |
This function pointer is called when a response to a MGMT_SET request is received or times out.
- Parameters
-
[in] aResultA result of the operation. [in] aContextA pointer to application-specific context.
- Return values
-
OT_ERROR_NONEThe request was accepted by the leader. OT_ERROR_REJECTEDThe request was rejected by the leader. OT_ERROR_PARSEAn error occurred during parsing the response. OT_ERROR_ABORTThe request was reset by peer. OT_ERROR_RESPONSE_TIMEOUTNo response or acknowledgment received during timeout period.
◆ otDatasetUpdaterCallback
| typedef void(* otDatasetUpdaterCallback) ( otError aError, void *aContext) |
This callback function pointer is called when a Dataset update request finishes, reporting success or failure status of the Dataset update request.
Available when
OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE
is enabled.
- Parameters
-
[in] aErrorThe error status. OT_ERROR_NONE indicates successful Dataset update. OT_ERROR_INVALID_STATE indicates failure due invalid state (MLE being disabled). OT_ERROR_ALREADY indicates failure due to another device within network requesting a conflicting Dataset update. [in] aContextA pointer to the arbitrary context (provided by user in otDatasetUpdaterRequestUpdate()).
◆ otNetworkKeyRef
| typedef otCryptoKeyRef otNetworkKeyRef |
This datatype represents KeyRef to NetworkKey.
Reference to Key
◆ otNetworkName
| typedef struct otNetworkName otNetworkName |
This structure represents a Network Name.
The
otNetworkName
is a null terminated C string (i.e.,
m8
char array MUST end with null char
\0
).
◆ otOperationalDataset
| typedef 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.
◆ otOperationalDatasetTlvs
| typedef struct otOperationalDatasetTlvs otOperationalDatasetTlvs |
This structure represents an Active or Pending Operational Dataset.
The Operational Dataset is TLV encoded as specified by Thread.
◆ otPskcRef
| typedef otCryptoKeyRef otPskcRef |
This datatype represents KeyRef to PSKc.
Reference to Key
Enumeration Type Documentation
◆ otMeshcopTlvType
| enum otMeshcopTlvType |
This enumeration represents meshcop TLV types.
Function Documentation
◆ otDatasetCreateNewNetwork()
| otError otDatasetCreateNewNetwork | ( | otInstance * |
aInstance,
|
| otOperationalDataset * |
aDataset
|
||
| ) |
For FTD only, creates a new Operational Dataset to use when forming a new network.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [out] aDatasetThe Operational Dataset.
- Return values
-
OT_ERROR_NONESuccessfully created a new Operational Dataset. OT_ERROR_FAILEDFailed to generate random values for new parameters.
◆ otDatasetGeneratePskc()
| otError otDatasetGeneratePskc | ( | const char * |
aPassPhrase,
|
| const otNetworkName * |
aNetworkName,
|
||
| const otExtendedPanId * |
aExtPanId,
|
||
| otPskc * |
aPskc
|
||
| ) |
This function generates PSKc from a given pass-phrase, network name, and extended PAN ID.
PSKc is used to establish the Commissioner Session.
- Parameters
-
[in] aPassPhraseThe commissioning pass-phrase. [in] aNetworkNameThe network name for PSKc computation. [in] aExtPanIdThe extended PAN ID for PSKc computation. [out] aPskcA pointer to variable to output the generated PSKc.
- Return values
-
OT_ERROR_NONESuccessfully generate PSKc. OT_ERROR_INVALID_ARGSIf any of the input arguments is invalid.
◆ otDatasetGetActive()
| otError otDatasetGetActive | ( | otInstance * |
aInstance,
|
| otOperationalDataset * |
aDataset
|
||
| ) |
Gets the Active Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [out] aDatasetA pointer to where the Active Operational Dataset will be placed.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the Active Operational Dataset. OT_ERROR_NOT_FOUNDNo corresponding value in the setting store.
◆ otDatasetGetActiveTlvs()
| otError otDatasetGetActiveTlvs | ( | otInstance * |
aInstance,
|
| otOperationalDatasetTlvs * |
aDataset
|
||
| ) |
This function gets the Active Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [out] aDatasetA pointer to where the Active Operational Dataset will be placed.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the Active Operational Dataset. OT_ERROR_NOT_FOUNDNo corresponding value in the setting store.
◆ otDatasetGetDelayTimerMinimal()
| uint32_t otDatasetGetDelayTimerMinimal | ( | otInstance * |
aInstance
|
) |
For FTD only, gets a minimal delay timer.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Return values
-
thevalue of minimal delay timer (in ms).
◆ otDatasetGetPending()
| otError otDatasetGetPending | ( | otInstance * |
aInstance,
|
| otOperationalDataset * |
aDataset
|
||
| ) |
This function gets the Pending Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [out] aDatasetA pointer to where the Pending Operational Dataset will be placed.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the Pending Operational Dataset. OT_ERROR_NOT_FOUNDNo corresponding value in the setting store.
◆ otDatasetGetPendingTlvs()
| otError otDatasetGetPendingTlvs | ( | otInstance * |
aInstance,
|
| otOperationalDatasetTlvs * |
aDataset
|
||
| ) |
This function gets the Pending Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [out] aDatasetA pointer to where the Pending Operational Dataset will be placed.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the Pending Operational Dataset. OT_ERROR_NOT_FOUNDNo corresponding value in the setting store.
◆ otDatasetIsCommissioned()
| bool otDatasetIsCommissioned | ( | otInstance * |
aInstance
|
) |
This function indicates whether a valid network is present in the Active Operational Dataset or not.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
◆ otDatasetParseTlvs()
| otError otDatasetParseTlvs | ( | const otOperationalDatasetTlvs * |
aDatasetTlvs,
|
| otOperationalDataset * |
aDataset
|
||
| ) |
This function parses an Operational Dataset from a
otOperationalDatasetTlvs
.
- Parameters
-
[in] aDatasetTlvsA pointer to dataset TLVs. [out] aDatasetA pointer to where the dataset will be placed.
- Return values
-
OT_ERROR_NONESuccessfully set aDatasetfromaDatasetTlvs.OT_ERROR_INVALID_ARGSaDatasetTlvsis invalid.
◆ otDatasetSendMgmtActiveGet()
| otError otDatasetSendMgmtActiveGet | ( | otInstance * |
aInstance,
|
| const otOperationalDatasetComponents * |
aDatasetComponents,
|
||
| const uint8_t * |
aTlvTypes,
|
||
| uint8_t |
aLength,
|
||
| const otIp6Address * |
aAddress
|
||
| ) |
Sends MGMT_ACTIVE_GET.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetComponentsA pointer to a Dataset Components structure specifying which components to request. [in] aTlvTypesA pointer to array containing additional raw TLV types to be requested. [in] aLengthThe length of aTlvTypes.[in] aAddressA pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
- Return values
-
OT_ERROR_NONESuccessfully send the meshcop dataset command. OT_ERROR_NO_BUFSInsufficient buffer space to send.
◆ otDatasetSendMgmtActiveSet()
| otError otDatasetSendMgmtActiveSet | ( | otInstance * |
aInstance,
|
| const otOperationalDataset * |
aDataset,
|
||
| const uint8_t * |
aTlvs,
|
||
| uint8_t |
aLength,
|
||
| otDatasetMgmtSetCallback |
aCallback,
|
||
| void * |
aContext
|
||
| ) |
Sends MGMT_ACTIVE_SET.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to operational dataset. [in] aTlvsA pointer to TLVs. [in] aLengthThe length of TLVs. [in] aCallbackA pointer to a function that is called on response reception or timeout. [in] aContextA pointer to application-specific context for aCallback.
- Return values
-
OT_ERROR_NONESuccessfully send the meshcop dataset command. OT_ERROR_NO_BUFSInsufficient buffer space to send. OT_ERROR_BUSYA previous request is ongoing.
◆ otDatasetSendMgmtPendingGet()
| otError otDatasetSendMgmtPendingGet | ( | otInstance * |
aInstance,
|
| const otOperationalDatasetComponents * |
aDatasetComponents,
|
||
| const uint8_t * |
aTlvTypes,
|
||
| uint8_t |
aLength,
|
||
| const otIp6Address * |
aAddress
|
||
| ) |
Sends MGMT_PENDING_GET.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetComponentsA pointer to a Dataset Components structure specifying which components to request. [in] aTlvTypesA pointer to array containing additional raw TLV types to be requested. [in] aLengthThe length of aTlvTypes.[in] aAddressA pointer to the IPv6 destination, if it is NULL, will use Leader ALOC as default.
- Return values
-
OT_ERROR_NONESuccessfully send the meshcop dataset command. OT_ERROR_NO_BUFSInsufficient buffer space to send.
◆ otDatasetSendMgmtPendingSet()
| otError otDatasetSendMgmtPendingSet | ( | otInstance * |
aInstance,
|
| const otOperationalDataset * |
aDataset,
|
||
| const uint8_t * |
aTlvs,
|
||
| uint8_t |
aLength,
|
||
| otDatasetMgmtSetCallback |
aCallback,
|
||
| void * |
aContext
|
||
| ) |
Sends MGMT_PENDING_SET.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to operational dataset. [in] aTlvsA pointer to TLVs. [in] aLengthThe length of TLVs. [in] aCallbackA pointer to a function that is called on response reception or timeout. [in] aContextA pointer to application-specific context for aCallback.
- Return values
-
OT_ERROR_NONESuccessfully send the meshcop dataset command. OT_ERROR_NO_BUFSInsufficient buffer space to send. OT_ERROR_BUSYA previous request is ongoing.
◆ otDatasetSetActive()
| otError otDatasetSetActive | ( | otInstance * |
aInstance,
|
| const otOperationalDataset * |
aDataset
|
||
| ) |
Sets the Active Operational Dataset.
If the dataset does not include an Active Timestamp, the dataset is only partially complete.
If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.
If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.
If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to the Active Operational Dataset.
- Return values
-
OT_ERROR_NONESuccessfully set the Active Operational Dataset. OT_ERROR_NO_BUFSInsufficient buffer space to set the Active Operational Dataset. OT_ERROR_NOT_IMPLEMENTEDThe platform does not implement settings functionality.
◆ otDatasetSetActiveTlvs()
| otError otDatasetSetActiveTlvs | ( | otInstance * |
aInstance,
|
| const otOperationalDatasetTlvs * |
aDataset
|
||
| ) |
This function sets the Active Operational Dataset.
If the dataset does not include an Active Timestamp, the dataset is only partially complete.
If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.
If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.
If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to the Active Operational Dataset.
- Return values
-
OT_ERROR_NONESuccessfully set the Active Operational Dataset. OT_ERROR_NO_BUFSInsufficient buffer space to set the Active Operational Dataset. OT_ERROR_NOT_IMPLEMENTEDThe platform does not implement settings functionality.
◆ otDatasetSetDelayTimerMinimal()
| otError otDatasetSetDelayTimerMinimal | ( | otInstance * |
aInstance,
|
| uint32_t |
aDelayTimerMinimal
|
||
| ) |
For FTD only, sets a minimal delay timer.
- Note
- This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDelayTimerMinimalThe value of minimal delay timer (in ms).
- Return values
-
OT_ERROR_NONESuccessfully set minimal delay timer. OT_ERROR_INVALID_ARGSIf aDelayTimerMinimalis not valid.
◆ otDatasetSetPending()
| otError otDatasetSetPending | ( | otInstance * |
aInstance,
|
| const otOperationalDataset * |
aDataset
|
||
| ) |
Sets the Pending Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to the Pending Operational Dataset.
- Return values
-
OT_ERROR_NONESuccessfully set the Pending Operational Dataset. OT_ERROR_NO_BUFSInsufficient buffer space to set the Pending Operational Dataset. OT_ERROR_NOT_IMPLEMENTEDThe platform does not implement settings functionality.
◆ otDatasetSetPendingTlvs()
| otError otDatasetSetPendingTlvs | ( | otInstance * |
aInstance,
|
| const otOperationalDatasetTlvs * |
aDataset
|
||
| ) |
This function sets the Pending Operational Dataset.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to the Pending Operational Dataset.
- Return values
-
OT_ERROR_NONESuccessfully set the Pending Operational Dataset. OT_ERROR_NO_BUFSInsufficient buffer space to set the Pending Operational Dataset. OT_ERROR_NOT_IMPLEMENTEDThe platform does not implement settings functionality.
◆ otDatasetUpdaterCancelUpdate()
| void otDatasetUpdaterCancelUpdate | ( | otInstance * |
aInstance
|
) |
This function cancels an ongoing (if any) Operational Dataset update request.
Available when
OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
◆ otDatasetUpdaterIsUpdateOngoing()
| bool otDatasetUpdaterIsUpdateOngoing | ( | otInstance * |
aInstance
|
) |
This function indicates whether there is an ongoing Operation Dataset update request.
Available when
OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE
is enabled.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Return values
-
TRUEThere is an ongoing update. FALSEThere is no ongoing update.
◆ otDatasetUpdaterRequestUpdate()
| otError otDatasetUpdaterRequestUpdate | ( | otInstance * |
aInstance,
|
| const otOperationalDataset * |
aDataset,
|
||
| otDatasetUpdaterCallback |
aCallback,
|
||
| void * |
aContext
|
||
| ) |
This function requests an update to Operational Dataset.
Available when
OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE
is enabled.
aDataset
should contain the fields to be updated and their new value. It must not contain Active or Pending Timestamp fields. The Delay field is optional, if not provided a default value (1000 ms) would be used.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aDatasetA pointer to the Dataset containing the fields to change. [in] aCallbackA callback to indicate when Dataset update request finishes. [in] aContextAn arbitrary context passed to callback.
- Return values
-
OT_ERROR_NONEDataset update started successfully ( aCallbackwill be invoked on completion).OT_ERROR_INVALID_STATEDevice is disabled (MLE is disabled). OT_ERROR_INVALID_ARGSThe aDatasetis not valid (contains Active or Pending Timestamp).OT_ERROR_BUSYCannot start update, a previous one is ongoing. OT_ERROR_NO_BUFSCould not allocated buffer to save Dataset.
◆ otNetworkNameFromString()
| otError otNetworkNameFromString | ( | otNetworkName * |
aNetworkName,
|
| const char * |
aNameString
|
||
| ) |
Sets an
otNetworkName
instance from a given null terminated C string.
aNameString
must follow UTF-8 encoding and the Network Name length must not be longer than
OT_NETWORK_NAME_MAX_SIZE
.
- Parameters
-
[out] aNetworkNameA pointer to the otNetworkNameto set.[in] aNameStringA name C string.
- Return values
-
OT_ERROR_NONESuccessfully set aNetworkNamefromaNameString.OT_ERROR_INVALID_ARGSaNameStrngis invalid (too long or does not follow UTF-8 encoding).