Add initial commissioning commands support to the NCP (#1393)

* Add initial commissioning commands support to the NCP

* Make GetPropertyHandler_THREAD_COMMISSIONER_ENABLED send true only if commissioner active, move commissioner state enum to oepnthread/types.h

* Use enum to return commissioner state, make spinel property return true only if Commissioner State Active

* Fix spinel documentation
This commit is contained in:
pszkotak
2017-03-29 11:37:21 -07:00
committed by Jonathan Hui
parent 3c86327f70
commit 2fa7a13c1b
11 changed files with 648 additions and 441 deletions
+12
View File
@@ -224,6 +224,18 @@ OTAPI ThreadError OTCALL otCommissionerSendMgmtSet(otInstance *, const otCommiss
*/
OTAPI uint16_t OTCALL otCommissionerGetSessionId(otInstance *);
/**
* This function returns the Commissioner State.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @retval kCommissionerStateDisabled Commissioner disabled.
* @retval kCommissionerStatePetition Becoming the commissioner.
* @retval kCommissionerStateActive Commissioner enabled.
*
*/
OTAPI otCommissionerState OTCALL otCommissionerGetState(otInstance *);
/**
* This method generates PSKc.
*
+12
View File
@@ -282,6 +282,18 @@ enum
OT_SECURITY_POLICY_BEACONS = 1 << 3, ///< Beacons enabled
};
/**
* This enumeration defines the Commissioner State.
*
*/
typedef enum otCommissionerState
{
kCommissionerStateDisabled = 0,
kCommissionerStatePetition = 1,
kCommissionerStateActive = 2,
} otCommissionerState;
/**
* This type represents Channel Mask Page 0.
*