Joiner
This module includes functions for the Thread Joiner role.
Summary
Enumerations |
|
---|---|
otJoinerState
|
enum Defines the Joiner State. |
Typedefs |
|
---|---|
otJoinerCallback)(otError aError, void *aContext)
|
typedefvoid(*
Pointer is called to notify the completion of a join operation. |
otJoinerDiscerner
|
typedefstruct otJoinerDiscerner
Represents a Joiner Discerner. |
otJoinerState
|
typedefenum otJoinerState
Defines the Joiner State. |
Functions |
|
---|---|
otJoinerGetDiscerner(otInstance *aInstance)
|
const otJoinerDiscerner *
Gets the Joiner Discerner.
|
otJoinerGetId(otInstance *aInstance)
|
const otExtAddress *
Gets the Joiner ID.
|
otJoinerGetState(otInstance *aInstance)
|
Gets the Joiner State.
|
otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerner)
|
Sets the Joiner Discerner.
|
otJoinerStart(otInstance *aInstance, const char *aPskd, const char *aProvisioningUrl, const char *aVendorName, const char *aVendorModel, const char *aVendorSwVersion, const char *aVendorData, otJoinerCallback aCallback, void *aContext)
|
Enables the Thread Joiner role.
|
otJoinerStateToString(otJoinerState aState)
|
const char *
Converts a given joiner state enumeration value to a human-readable string.
|
otJoinerStop(otInstance *aInstance)
|
void
Disables the Thread Joiner role.
|
Macros |
|
---|---|
OT_JOINER_MAX_DISCERNER_LENGTH 64
|
Maximum length of a Joiner Discerner in bits.
|
Structs |
|
---|---|
otJoinerDiscerner |
Represents a Joiner Discerner. |
Enumerations
otJoinerState
otJoinerState
Defines the Joiner State.
Typedefs
otJoinerCallback
void(* otJoinerCallback)(otError aError, void *aContext)
Pointer is called to notify the completion of a join operation.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
Functions
otJoinerGetDiscerner
const otJoinerDiscerner * otJoinerGetDiscerner( otInstance *aInstance )
Gets the Joiner Discerner.
For more information, refer to otJoinerSetDiscerner.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to Joiner Discerner or NULL if none is set.
|
otJoinerGetId
const otExtAddress * otJoinerGetId( otInstance *aInstance )
Gets the Joiner ID.
If a Joiner Discerner is not set, Joiner ID is the first 64 bits of the result of computing SHA-256 over factory-assigned IEEE EUI-64. Otherwise the Joiner ID is calculated from the Joiner Discerner value.
The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during the commissioning process.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Joiner ID.
|
otJoinerGetState
otJoinerState otJoinerGetState( otInstance *aInstance )
Gets the Joiner State.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The joiner state.
|
otJoinerSetDiscerner
otError otJoinerSetDiscerner( otInstance *aInstance, otJoinerDiscerner *aDiscerner )
Sets the Joiner Discerner.
The Joiner Discerner is used to calculate the Joiner ID during the Thread Commissioning process. For more information, refer to otJoinerGetId.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otJoinerStart
otError otJoinerStart( otInstance *aInstance, const char *aPskd, const char *aProvisioningUrl, const char *aVendorName, const char *aVendorModel, const char *aVendorSwVersion, const char *aVendorData, otJoinerCallback aCallback, void *aContext )
Enables the Thread Joiner role.
Details | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||
Return Values |
|
otJoinerStateToString
const char * otJoinerStateToString( otJoinerState aState )
Converts a given joiner state enumeration value to a human-readable string.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A human-readable string representation of
aState . |
otJoinerStop
void otJoinerStop( otInstance *aInstance )
Disables the Thread Joiner role.
Details | |||
---|---|---|---|
Parameters |
|
Macros
OT_JOINER_MAX_DISCERNER_LENGTH
OT_JOINER_MAX_DISCERNER_LENGTH 64
Maximum length of a Joiner Discerner in bits.
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.