Commissioner joiner list. (#729)

This commit is contained in:
Jonathan Hui
2016-10-03 08:54:54 -07:00
committed by GitHub
parent 95d2e8cdec
commit cb04fe8391
12 changed files with 343 additions and 40 deletions
+43 -6
View File
@@ -50,23 +50,60 @@ extern "C" {
* This function enables the Thread Commissioner role.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPSKd A pointer to the PSKd.
* @param[in] aProvisioningUrl A pointer to the Provisioning URL (may be NULL).
*
* @retval kThreadError_None Successfully started the Commissioner role.
* @retval kThreadError_InvalidArgs @p aPSKd or @p aProvisioningUrl is invalid.
* @retval kThreadError_None Successfully started the Commissioner role.
*
*/
ThreadError otCommissionerStart(otInstance *aInstance, const char *aPSKd, const char *aProvisioningUrl);
ThreadError otCommissionerStart(otInstance *aInstance);
/**
* This function disables the Thread Commissioner role.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval kThreadError_None Successfully started the Commissioner role.
*
*/
ThreadError otCommissionerStop(otInstance *aInstance);
/**
* This function adds a Joiner entry.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aExtAddress A pointer to the Joiner's extended address or NULL for any Joiner.
* @param[in] aPSKd A pointer to the PSKd.
*
* @retval kThreadError_None Successfully added the Joiner.
* @retval kThreadError_NoBufs No buffers available to add the Joiner.
* @retval kThreadError_InvalidArgs @p aExtAddress or @p aPSKd is invalid.
*
*/
ThreadError otCommissionerAddJoiner(otInstance *aInstance, const otExtAddress *aExtAddress, const char *aPSKd);
/**
* This function removes a Joiner entry.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aExtAddress A pointer to the Joiner's extended address or NULL for any Joiner.
*
* @retval kThreadError_None Successfully added the Joiner.
* @retval kThreadError_NotFound The Joiner specified by @p aExtAddress was not found.
* @retval kThreadError_InvalidArgs @p aExtAddress is invalid.
*
*/
ThreadError otCommissionerRemoveJoiner(otInstance *aIntsance, const otExtAddress *aExtAddress);
/**
* This function sets the Provisioning URL.
*
* @param[in] aProvisioningUrl A pointer to the Provisioning URL (may be NULL).
*
* @retval kThreadError_None Successfully added the Joiner.
* @retval kThreadError_InvalidArgs @p aProvisioningUrl is invalid.
*
*/
ThreadError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl);
/**
* This function pointer is called when the Commissioner receives an Energy Report.
*