Commissioner
This module includes functions for the Thread Commissioner role.
Summary
Enumerations |
|
---|---|
otCommissionerJoinerEvent
|
enum This enumeration defines a Joiner Event on the Commissioner. |
otCommissionerState{
|
enum This enumeration defines the Commissioner State. |
otJoinerInfoType{
|
enum This enumeration defines a Joiner Info Typer. |
Typedefs |
|
---|---|
otCommissionerEnergyReportCallback)(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext)
|
typedefvoid(*
This function pointer is called when the Commissioner receives an Energy Report. |
otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext)
|
typedefvoid(*
This function pointer is called whenever the joiner state changes. |
otCommissionerJoinerEvent
|
typedef This enumeration defines a Joiner Event on the Commissioner. |
otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext)
|
typedefvoid(*
This function pointer is called when the Commissioner receives a PAN ID Conflict message. |
otCommissionerState
|
typedefenum otCommissionerState
This enumeration defines the Commissioner State. |
otCommissionerStateCallback)(otCommissionerState aState, void *aContext)
|
typedefvoid(*
This function pointer is called whenever the commissioner state changes. |
otCommissioningDataset
|
typedefstruct otCommissioningDataset
This structure represents a Commissioning Dataset. |
otJoinerInfo
|
typedefstruct otJoinerInfo
This structure represents a Joiner Info. |
otJoinerInfoType
|
typedefenum otJoinerInfoType
This enumeration defines a Joiner Info Typer. |
otJoinerPskd
|
typedefstruct otJoinerPskd
This structure represents a Joiner PSKd. |
otSteeringData
|
typedefstruct otSteeringData
This structure represents the steering data. |
Functions |
|
---|---|
otCommissionerAddJoiner(otInstance *aInstance, const otExtAddress *aEui64, const char *aPskd, uint32_t aTimeout)
|
This function adds a Joiner entry.
|
otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner, const char *aPskd, uint32_t aTimeout)
|
This function adds a Joiner entry with a given Joiner Discerner value.
|
otCommissionerAnnounceBegin(otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address *aAddress)
|
This function sends an Announce Begin message.
|
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.
|
otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner)
|
This method get joiner info at aIterator position.
|
otCommissionerGetProvisioningUrl(otInstance *aInstance)
|
const char *
This function gets the Provisioning URL.
|
otCommissionerGetSessionId(otInstance *aInstance)
|
uint16_t
This function returns the Commissioner Session ID.
|
otCommissionerGetState(otInstance *aInstance)
|
This function returns the Commissioner State.
|
otCommissionerPanIdQuery(otInstance *aInstance, uint16_t aPanId, uint32_t aChannelMask, const otIp6Address *aAddress, otCommissionerPanIdConflictCallback aCallback, void *aContext)
|
This function sends a PAN ID Query message.
|
otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64)
|
This function removes a Joiner entry.
|
otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner)
|
This function removes a Joiner entry.
|
otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength)
|
This function sends MGMT_COMMISSIONER_GET.
|
otCommissionerSendMgmtSet(otInstance *aInstance, const otCommissioningDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
|
This function sends MGMT_COMMISSIONER_SET.
|
otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl)
|
This function sets the Provisioning URL.
|
otCommissionerStart(otInstance *aInstance, otCommissionerStateCallback aStateCallback, otCommissionerJoinerCallback aJoinerCallback, void *aCallbackContext)
|
This function enables the Thread Commissioner role.
|
otCommissionerStop(otInstance *aInstance)
|
This function disables the Thread Commissioner role.
|
Structs |
|
---|---|
otCommissioningDataset |
This structure represents a Commissioning Dataset. |
otJoinerInfo |
This structure represents a Joiner Info. |
otJoinerPskd |
This structure represents a Joiner PSKd. |
otSteeringData |
This structure represents the steering data. |
Enumerations
otCommissionerJoinerEvent
otCommissionerJoinerEvent
This enumeration defines a Joiner Event on the Commissioner.
otCommissionerState
otCommissionerState
otJoinerInfoType
otJoinerInfoType
This enumeration defines a Joiner Info Typer.
Properties | |
---|---|
OT_JOINER_INFO_TYPE_ANY
|
Accept any Joiner (no EUI64 or Discerner is specified). |
OT_JOINER_INFO_TYPE_DISCERNER
|
Joiner Discerner is specified ( |
OT_JOINER_INFO_TYPE_EUI64
|
Joiner EUI-64 is specified ( |
Typedefs
otCommissionerEnergyReportCallback
void(* otCommissionerEnergyReportCallback)(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext)
This function pointer is called when the Commissioner receives an Energy Report.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otCommissionerJoinerCallback
void(* otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext)
This function pointer is called whenever the joiner state changes.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otCommissionerJoinerEvent
enum otCommissionerJoinerEvent otCommissionerJoinerEvent
This enumeration defines a Joiner Event on the Commissioner.
otCommissionerPanIdConflictCallback
void(* otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext)
This function pointer is called when the Commissioner receives a PAN ID Conflict message.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otCommissionerState
enum otCommissionerState otCommissionerState
This enumeration defines the Commissioner State.
otCommissionerStateCallback
void(* otCommissionerStateCallback)(otCommissionerState aState, void *aContext)
This function pointer is called whenever the commissioner state changes.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otCommissioningDataset
struct otCommissioningDataset otCommissioningDataset
This structure represents a Commissioning Dataset.
otJoinerInfoType
enum otJoinerInfoType otJoinerInfoType
This enumeration defines a Joiner Info Typer.
Functions
otCommissionerAddJoiner
otError otCommissionerAddJoiner( otInstance *aInstance, const otExtAddress *aEui64, const char *aPskd, uint32_t aTimeout )
This function adds a Joiner entry.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
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.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otCommissionerAnnounceBegin
otError otCommissionerAnnounceBegin( otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address *aAddress )
This function sends an Announce Begin message.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
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.
Details | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||
Return Values |
|
otCommissionerGetNextJoinerInfo
otError otCommissionerGetNextJoinerInfo( otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner )
This method get joiner info at aIterator position.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otCommissionerGetProvisioningUrl
const char * otCommissionerGetProvisioningUrl( otInstance *aInstance )
This function gets the Provisioning URL.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the URL string.
|
otCommissionerGetSessionId
uint16_t otCommissionerGetSessionId( otInstance *aInstance )
This function returns the Commissioner Session ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The current commissioner session id.
|
otCommissionerGetState
otCommissionerState otCommissionerGetState( otInstance *aInstance )
This function returns the Commissioner State.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
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.
Details | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||
Return Values |
|
otCommissionerRemoveJoiner
otError otCommissionerRemoveJoiner( otInstance *aInstance, const otExtAddress *aEui64 )
This function removes a Joiner entry.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otCommissionerRemoveJoinerWithDiscerner
otError otCommissionerRemoveJoinerWithDiscerner( otInstance *aInstance, const otJoinerDiscerner *aDiscerner )
This function removes a Joiner entry.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otCommissionerSendMgmtGet
otError otCommissionerSendMgmtGet( otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength )
This function sends MGMT_COMMISSIONER_GET.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otCommissionerSendMgmtSet
otError otCommissionerSendMgmtSet( otInstance *aInstance, const otCommissioningDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength )
This function sends MGMT_COMMISSIONER_SET.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otCommissionerSetProvisioningUrl
otError otCommissionerSetProvisioningUrl( otInstance *aInstance, const char *aProvisioningUrl )
This function sets the Provisioning URL.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otCommissionerStart
otError otCommissionerStart( otInstance *aInstance, otCommissionerStateCallback aStateCallback, otCommissionerJoinerCallback aJoinerCallback, void *aCallbackContext )
This function enables the Thread Commissioner role.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otCommissionerStop
otError otCommissionerStop( otInstance *aInstance )
This function disables the Thread Commissioner role.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Macros
OT_COMMISSIONING_PASSPHRASE_MAX_SIZE
OT_COMMISSIONING_PASSPHRASE_MAX_SIZE 255
Maximum size of the Commissioning Passphrase.
OT_COMMISSIONING_PASSPHRASE_MIN_SIZE
OT_COMMISSIONING_PASSPHRASE_MIN_SIZE 6
Minimum size of the Commissioning Passphrase.
OT_JOINER_MAX_PSKD_LENGTH
OT_JOINER_MAX_PSKD_LENGTH 32
Maximum string length of a Joiner PSKd (does not include null char).
OT_PROVISIONING_URL_MAX_SIZE
OT_PROVISIONING_URL_MAX_SIZE 64
Max size (number of chars) in Provisioning URL string (excludes null char).
OT_STEERING_DATA_MAX_LENGTH
OT_STEERING_DATA_MAX_LENGTH 16
Max steering data length (bytes)