Joiner#
This module includes functions for the Thread Joiner role.
Note
The functions in this module require
OPENTHREAD_CONFIG_JOINER_ENABLE=1
.
Modules#
Enumerations#
Defines the Joiner State.
Typedefs#
Defines the Joiner State.
Represents a Joiner Discerner.
Pointer is called to notify the completion of a join operation.
Functions#
Enables the Thread Joiner role.
Disables the Thread Joiner role.
Gets the Joiner State.
Gets the Joiner ID.
Sets the Joiner Discerner.
Gets the Joiner Discerner.
Converts a given joiner state enumeration value to a human-readable string.
Macros#
Maximum length of a Joiner Discerner in bits.
Enumeration Documentation#
otJoinerState#
otJoinerState
Defines the Joiner State.
Enumerator | |
---|---|
OT_JOINER_STATE_IDLE | |
OT_JOINER_STATE_DISCOVER | |
OT_JOINER_STATE_CONNECT | |
OT_JOINER_STATE_CONNECTED | |
OT_JOINER_STATE_ENTRUST | |
OT_JOINER_STATE_JOINED |
60
of file include/openthread/joiner.h
Typedef Documentation#
otJoinerState#
typedef enum otJoinerState otJoinerState
Defines the Joiner State.
68
of file include/openthread/joiner.h
otJoinerDiscerner#
typedef struct otJoinerDiscerner otJoinerDiscerner
Represents a Joiner Discerner.
79
of file include/openthread/joiner.h
otJoinerCallback#
typedef void(* otJoinerCallback) (otError aError, void *aContext) )(otError aError, void *aContext)
Pointer is called to notify the completion of a join operation.
[in] | aError | OT_ERROR_NONE if the join process succeeded. OT_ERROR_SECURITY if the join process failed due to security credentials. OT_ERROR_NOT_FOUND if no joinable network was discovered. OT_ERROR_RESPONSE_TIMEOUT if a response timed out. |
[in] | aContext | A pointer to application-specific context. |
90
of file include/openthread/joiner.h
Function Documentation#
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.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPskd | A pointer to the PSKd. |
[in] | aProvisioningUrl | A pointer to the Provisioning URL (may be NULL). |
[in] | aVendorName | A pointer to the Vendor Name (may be NULL). |
[in] | aVendorModel | A pointer to the Vendor Model (may be NULL). |
[in] | aVendorSwVersion | A pointer to the Vendor SW Version (may be NULL). |
[in] | aVendorData | A pointer to the Vendor Data (may be NULL). |
[in] | aCallback | A pointer to a function that is called when the join operation completes. |
[in] | aContext | A pointer to application-specific context. |
110
of file include/openthread/joiner.h
otJoinerStop#
void otJoinerStop (otInstance * aInstance)
Disables the Thread Joiner role.
[in] | aInstance | A pointer to an OpenThread instance. |
125
of file include/openthread/joiner.h
otJoinerGetState#
otJoinerState otJoinerGetState (otInstance * aInstance)
Gets the Joiner State.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The joiner state.
134
of file include/openthread/joiner.h
otJoinerGetId#
const otExtAddress * otJoinerGetId (otInstance * aInstance)
Gets the Joiner ID.
[in] | aInstance | A pointer to the OpenThread instance. |
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.
Returns
A pointer to the Joiner ID.
148
of file include/openthread/joiner.h
otJoinerSetDiscerner#
otError otJoinerSetDiscerner (otInstance * aInstance, otJoinerDiscerner * aDiscerner)
Sets the Joiner Discerner.
[in] | aInstance | A pointer to the OpenThread instance. |
[in] | aDiscerner | A pointer to a Joiner Discerner. If NULL clears any previously set discerner. |
The Joiner Discerner is used to calculate the Joiner ID during the Thread Commissioning process. For more information, refer to otJoinerGetId. Note
The Joiner Discerner takes the place of the Joiner EUI-64 during the joiner session of Thread Commissioning.
164
of file include/openthread/joiner.h
otJoinerGetDiscerner#
const otJoinerDiscerner * otJoinerGetDiscerner (otInstance * aInstance)
Gets the Joiner Discerner.
[in] | aInstance | A pointer to the OpenThread instance. |
For more information, refer to otJoinerSetDiscerner.
Returns
A pointer to Joiner Discerner or NULL if none is set.
173
of file include/openthread/joiner.h
otJoinerStateToString#
const char * otJoinerStateToString (otJoinerState aState)
Converts a given joiner state enumeration value to a human-readable string.
[in] | aState | The joiner state. |
Returns
A human-readable string representation of
aState
.
182
of file include/openthread/joiner.h