Modules#
Commissioner#
This module includes functions for the Thread Commissioner role.
Enumerations#
This enumeration defines the Commissioner State.
This enumeration defines a Joiner Event on the Commissioner.
This enumeration defines a Joiner Info Type.
Typedefs#
This enumeration defines the Commissioner State.
This enumeration defines a Joiner Event on the Commissioner.
This structure represents the steering data.
This structure represents a Commissioning Dataset.
This structure represents a Joiner PSKd.
This enumeration defines a Joiner Info Type.
This structure represents a Joiner Info.
This function pointer is called whenever the commissioner state changes.
This function pointer is called whenever the joiner state changes.
This function pointer is called when the Commissioner receives an Energy Report.
This function pointer is called when the Commissioner receives a PAN ID Conflict message.
Functions#
This function enables the Thread Commissioner role.
This function disables the Thread Commissioner role.
This function returns the Commissioner Id.
This function sets the Commissioner Id.
This function adds a Joiner entry.
This function adds a Joiner entry with a given Joiner Discerner value.
This method get joiner info at aIterator position.
This function removes a Joiner entry.
This function removes a Joiner entry.
This function gets the Provisioning URL.
This function sets the Provisioning URL.
This function sends an Announce Begin message.
This function sends an Energy Scan Query message.
This function sends a PAN ID Query message.
This function sends MGMT_COMMISSIONER_GET.
This function sends MGMT_COMMISSIONER_SET.
This function returns the Commissioner Session ID.
This function returns the Commissioner State.
Macros#
Minimum size of the Commissioning Passphrase.
Maximum size of the Commissioning Passphrase.
Max size (number of chars) in Provisioning URL string (excludes null char).
Max steering data length (bytes)
Maximum string length of a Joiner PSKd (does not include null char).
Enumeration Documentation#
otCommissionerState#
otCommissionerState
This enumeration defines the Commissioner State.
Enumerator | |
---|---|
OT_COMMISSIONER_STATE_DISABLED | Commissioner role is disabled. |
OT_COMMISSIONER_STATE_PETITION | Currently petitioning to become a Commissioner. |
OT_COMMISSIONER_STATE_ACTIVE | Commissioner role is active. |
62
of file include/openthread/commissioner.h
otCommissionerJoinerEvent#
otCommissionerJoinerEvent
This enumeration defines a Joiner Event on the Commissioner.
Enumerator | |
---|---|
OT_COMMISSIONER_JOINER_START | |
OT_COMMISSIONER_JOINER_CONNECTED | |
OT_COMMISSIONER_JOINER_FINALIZE | |
OT_COMMISSIONER_JOINER_END | |
OT_COMMISSIONER_JOINER_REMOVED |
73
of file include/openthread/commissioner.h
otJoinerInfoType#
otJoinerInfoType
This enumeration defines a Joiner Info Type.
Enumerator | |
---|---|
OT_JOINER_INFO_TYPE_ANY | Accept any Joiner (no EUI64 or Discerner is specified). |
OT_JOINER_INFO_TYPE_EUI64 | Joiner EUI-64 is specified ( |
OT_JOINER_INFO_TYPE_DISCERNER | Joiner Discerner is specified ( |
131
of file include/openthread/commissioner.h
Typedef Documentation#
otCommissionerState#
typedef enum otCommissionerState otCommissionerState
This enumeration defines the Commissioner State.
67
of file include/openthread/commissioner.h
otCommissionerJoinerEvent#
typedef enum otCommissionerJoinerEvent otCommissionerJoinerEvent
This enumeration defines a Joiner Event on the Commissioner.
80
of file include/openthread/commissioner.h
otSteeringData#
typedef struct otSteeringData otSteeringData
This structure represents the steering data.
97
of file include/openthread/commissioner.h
otCommissioningDataset#
typedef struct otCommissioningDataset otCommissioningDataset
This structure represents a Commissioning Dataset.
114
of file include/openthread/commissioner.h
otJoinerPskd#
typedef struct otJoinerPskd otJoinerPskd
This structure represents a Joiner PSKd.
125
of file include/openthread/commissioner.h
otJoinerInfoType#
typedef enum otJoinerInfoType otJoinerInfoType
This enumeration defines a Joiner Info Type.
136
of file include/openthread/commissioner.h
otJoinerInfo#
typedef struct otJoinerInfo otJoinerInfo
This structure represents a Joiner Info.
152
of file include/openthread/commissioner.h
otCommissionerStateCallback#
typedef void(* otCommissionerStateCallback) (otCommissionerState aState, void *aContext) )(otCommissionerState aState, void *aContext)
This function pointer is called whenever the commissioner state changes.
[in] | aState | The Commissioner state. |
[in] | aContext | A pointer to application-specific context. |
161
of file include/openthread/commissioner.h
otCommissionerJoinerCallback#
typedef void(* otCommissionerJoinerCallback) (otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext) )(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext)
This function pointer is called whenever the joiner state changes.
[in] | aEvent | The joiner event type. |
[in] | aJoinerInfo | A pointer to the Joiner Info. |
[in] | aJoinerId | A pointer to the Joiner ID (if not known, it will be NULL). |
[in] | aContext | A pointer to application-specific context. |
172
of file include/openthread/commissioner.h
otCommissionerEnergyReportCallback#
typedef void(* otCommissionerEnergyReportCallback) (uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext) )(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext)
This function pointer is called when the Commissioner receives an Energy Report.
[in] | aChannelMask | The channel mask value. |
[in] | aEnergyList | A pointer to the energy measurement list. |
[in] | aEnergyListLength | Number of entries in |
[in] | aContext | A pointer to application-specific context. |
369
of file include/openthread/commissioner.h
otCommissionerPanIdConflictCallback#
typedef void(* otCommissionerPanIdConflictCallback) (uint16_t aPanId, uint32_t aChannelMask, void *aContext) )(uint16_t aPanId, uint32_t aChannelMask, void *aContext)
This function pointer is called when the Commissioner receives a PAN ID Conflict message.
[in] | aPanId | The PAN ID value. |
[in] | aChannelMask | The channel mask value. |
[in] | aContext | A pointer to application-specific context. |
410
of file include/openthread/commissioner.h
Function Documentation#
otCommissionerStart#
otError otCommissionerStart (otInstance * aInstance, otCommissionerStateCallback aStateCallback, otCommissionerJoinerCallback aJoinerCallback, void * aCallbackContext)
This function enables the Thread Commissioner role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aStateCallback | A pointer to a function that is called when the commissioner state changes. |
[in] | aJoinerCallback | A pointer to a function that is called with a joiner event occurs. |
[in] | aCallbackContext | A pointer to application-specific context. |
190
of file include/openthread/commissioner.h
otCommissionerStop#
otError otCommissionerStop (otInstance * aInstance)
This function disables the Thread Commissioner role.
[in] | aInstance | A pointer to an OpenThread instance. |
204
of file include/openthread/commissioner.h
otCommissionerGetId#
const char * otCommissionerGetId (otInstance * aInstance)
This function returns the Commissioner Id.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Commissioner Id.
214
of file include/openthread/commissioner.h
otCommissionerSetId#
otError otCommissionerSetId (otInstance * aInstance, const char * aId)
This function sets the Commissioner Id.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aId | A pointer to a string character array. Must be null terminated. |
227
of file include/openthread/commissioner.h
otCommissionerAddJoiner#
otError otCommissionerAddJoiner (otInstance * aInstance, const otExtAddress * aEui64, const char * aPskd, uint32_t aTimeout)
This function adds a Joiner entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEui64 | A pointer to the Joiner's IEEE EUI-64 or NULL for any Joiner. |
[in] | aPskd | A pointer to the PSKd. |
[in] | aTimeout | A time after which a Joiner is automatically removed, in seconds. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
245
of file include/openthread/commissioner.h
otCommissionerAddJoinerWithDiscerner#
otError otCommissionerAddJoinerWithDiscerner (otInstance * aInstance, const otJoinerDiscerner * aDiscerner, const char * aPskd, uint32_t aTimeout)
This function adds a Joiner entry with a given Joiner Discerner value.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDiscerner | A pointer to the Joiner Discerner. |
[in] | aPskd | A pointer to the PSKd. |
[in] | aTimeout | A time after which a Joiner is automatically removed, in seconds. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
266
of file include/openthread/commissioner.h
otCommissionerGetNextJoinerInfo#
otError otCommissionerGetNextJoinerInfo (otInstance * aInstance, uint16_t * aIterator, otJoinerInfo * aJoiner)
This method get joiner info at aIterator position.
[in] | aInstance | A pointer to instance. |
[inout] | aIterator | A pointer to the Joiner Info iterator context. |
[out] | aJoiner | A reference to Joiner info. |
282
of file include/openthread/commissioner.h
otCommissionerRemoveJoiner#
otError otCommissionerRemoveJoiner (otInstance * aInstance, const otExtAddress * aEui64)
This function removes a Joiner entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEui64 | A pointer to the Joiner's IEEE EUI-64 or NULL for any Joiner. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
298
of file include/openthread/commissioner.h
otCommissionerRemoveJoinerWithDiscerner#
otError otCommissionerRemoveJoinerWithDiscerner (otInstance * aInstance, const otJoinerDiscerner * aDiscerner)
This function removes a Joiner entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDiscerner | A pointer to the Joiner Discerner. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
314
of file include/openthread/commissioner.h
otCommissionerGetProvisioningUrl#
const char * otCommissionerGetProvisioningUrl (otInstance * aInstance)
This function gets the Provisioning URL.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
A pointer to the URL string.
324
of file include/openthread/commissioner.h
otCommissionerSetProvisioningUrl#
otError otCommissionerSetProvisioningUrl (otInstance * aInstance, const char * aProvisioningUrl)
This function sets the Provisioning URL.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aProvisioningUrl | A pointer to the Provisioning URL (may be NULL to set as empty string). |
336
of file include/openthread/commissioner.h
otCommissionerAnnounceBegin#
otError otCommissionerAnnounceBegin (otInstance * aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address * aAddress)
This function sends an Announce Begin message.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannelMask | The channel mask value. |
[in] | aCount | The number of Announcement messages per channel. |
[in] | aPeriod | The time between two successive MLE Announce transmissions (in milliseconds). |
[in] | aAddress | A pointer to the IPv6 destination. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
354
of file include/openthread/commissioner.h
otCommissionerEnergyScan#
otError otCommissionerEnergyScan (otInstance * aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, uint16_t aScanDuration, const otIp6Address * aAddress, otCommissionerEnergyReportCallback aCallback, void * aContext)
This function sends an Energy Scan Query message.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannelMask | The channel mask value. |
[in] | aCount | The number of energy measurements per channel. |
[in] | aPeriod | The time between energy measurements (milliseconds). |
[in] | aScanDuration | The scan duration for each energy measurement (milliseconds). |
[in] | aAddress | A pointer to the IPv6 destination. |
[in] | aCallback | A pointer to a function called on receiving an Energy Report message. |
[in] | aContext | A pointer to application-specific context. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
393
of file include/openthread/commissioner.h
otCommissionerPanIdQuery#
otError otCommissionerPanIdQuery (otInstance * aInstance, uint16_t aPanId, uint32_t aChannelMask, const otIp6Address * aAddress, otCommissionerPanIdConflictCallback aCallback, void * aContext)
This function sends a PAN ID Query message.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPanId | The PAN ID to query. |
[in] | aChannelMask | The channel mask value. |
[in] | aAddress | A pointer to the IPv6 destination. |
[in] | aCallback | A pointer to a function called on receiving a PAN ID Conflict message. |
[in] | aContext | A pointer to application-specific context. |
Note
Only use this after successfully starting the Commissioner role with otCommissionerStart().
429
of file include/openthread/commissioner.h
otCommissionerSendMgmtGet#
otError otCommissionerSendMgmtGet (otInstance * aInstance, const uint8_t * aTlvs, uint8_t aLength)
This function sends MGMT_COMMISSIONER_GET.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aTlvs | A pointer to TLVs. |
[in] | aLength | The length of TLVs. |
448
of file include/openthread/commissioner.h
otCommissionerSendMgmtSet#
otError otCommissionerSendMgmtSet (otInstance * aInstance, const otCommissioningDataset * aDataset, const uint8_t * aTlvs, uint8_t aLength)
This function sends MGMT_COMMISSIONER_SET.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDataset | A pointer to commissioning dataset. |
[in] | aTlvs | A pointer to TLVs. |
[in] | aLength | The length of TLVs. |
463
of file include/openthread/commissioner.h
otCommissionerGetSessionId#
uint16_t otCommissionerGetSessionId (otInstance * aInstance)
This function returns the Commissioner Session ID.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The current commissioner session id.
476
of file include/openthread/commissioner.h
otCommissionerGetState#
otCommissionerState otCommissionerGetState (otInstance * aInstance)
This function returns the Commissioner State.
[in] | aInstance | A pointer to an OpenThread instance. |
488
of file include/openthread/commissioner.h
Macro Definition Documentation#
OT_COMMISSIONING_PASSPHRASE_MIN_SIZE#
#define OT_COMMISSIONING_PASSPHRASE_MIN_SIZEValue:
6
Minimum size of the Commissioning Passphrase.
82
of file include/openthread/commissioner.h
OT_COMMISSIONING_PASSPHRASE_MAX_SIZE#
#define OT_COMMISSIONING_PASSPHRASE_MAX_SIZEValue:
255
Maximum size of the Commissioning Passphrase.
83
of file include/openthread/commissioner.h
OT_PROVISIONING_URL_MAX_SIZE#
#define OT_PROVISIONING_URL_MAX_SIZEValue:
64
Max size (number of chars) in Provisioning URL string (excludes null char).
85
of file include/openthread/commissioner.h
OT_STEERING_DATA_MAX_LENGTH#
#define OT_STEERING_DATA_MAX_LENGTHValue:
16
Max steering data length (bytes)
87
of file include/openthread/commissioner.h
OT_JOINER_MAX_PSKD_LENGTH#
#define OT_JOINER_MAX_PSKD_LENGTHValue:
32
Maximum string length of a Joiner PSKd (does not include null char).
116
of file include/openthread/commissioner.h