Typedefs | |
typedef void(OTCALL * | otCommissionerEnergyReportCallback )(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext) |
typedef void(OTCALL * | otCommissionerPanIdConflictCallback )(uint16_t aPanId, uint32_t aChannelMask, void *aContext) |
typedef void(OTCALL * | otJoinerCallback )(ThreadError aError, void *aContext) |
Functions | |
OTAPI ThreadError OTCALL | otCommissionerStart (otInstance *aInstance) |
OTAPI ThreadError OTCALL | otCommissionerStop (otInstance *aInstance) |
OTAPI ThreadError OTCALL | otCommissionerAddJoiner (otInstance *aInstance, const otExtAddress *aExtAddress, const char *aPSKd, uint32_t aTimeout) |
OTAPI ThreadError OTCALL | otCommissionerRemoveJoiner (otInstance *aIntsance, const otExtAddress *aExtAddress) |
OTAPI ThreadError OTCALL | otCommissionerSetProvisioningUrl (otInstance *aInstance, const char *aProvisioningUrl) |
OTAPI ThreadError OTCALL | otCommissionerAnnounceBegin (otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address *aAddress) |
OTAPI ThreadError OTCALL | otCommissionerEnergyScan (otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, uint16_t aScanDuration, const otIp6Address *aAddress, otCommissionerEnergyReportCallback aCallback, void *aContext) |
OTAPI ThreadError OTCALL | otCommissionerPanIdQuery (otInstance *aInstance, uint16_t aPanId, uint32_t aChannelMask, const otIp6Address *aAddress, otCommissionerPanIdConflictCallback aCallback, void *aContext) |
OTAPI ThreadError OTCALL | otCommissionerSendMgmtGet (otInstance *, const uint8_t *aTlvs, uint8_t aLength) |
OTAPI ThreadError OTCALL | otCommissionerSendMgmtSet (otInstance *, const otCommissioningDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength) |
OTAPI uint16_t OTCALL | otCommissionerGetSessionId (otInstance *) |
OTAPI otCommissionerState OTCALL | otCommissionerGetState (otInstance *) |
OTAPI ThreadError OTCALL | otCommissionerGeneratePSKc (otInstance *aInstance, const char *aPassPhrase, const char *aNetworkName, const uint8_t *aExtPanId, uint8_t *aPSKc) |
OTAPI ThreadError OTCALL | 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) |
OTAPI ThreadError OTCALL | otJoinerStop (otInstance *aInstance) |
typedef void(OTCALL * 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.
[in] | aChannelMask | The channel mask value. |
[in] | aEnergyList | A pointer to the energy measurement list. |
[in] | aEnergyListLength | Number of entries in aEnergyListLength . |
[in] | aContext | A pointer to application-specific context. |
typedef void(OTCALL * otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext) |
This function pointer is called when the Commissioner receives a PAN ID Conflict message.
[in] | aPanId | The PAN ID value. |
[in] | aChannelMask | The channel mask value. |
[in] | aContext | A pointer to application-specific context. |
typedef void(OTCALL * otJoinerCallback)(ThreadError aError, void *aContext) |
This function pointer is called to notify the completion of a join operation.
[in] | aError | kThreadError_None if the join process succeeded. kThreadError_Security if the join process failed due to security credentials. kThreadError_NotFound if no joinable network was discovered. kThreadError_ResponseTimeout if a response timed out. |
[in] | aContext | A pointer to application-specific context. |
OTAPI ThreadError OTCALL otCommissionerAddJoiner | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress, | ||
const char * | aPSKd, | ||
uint32_t | aTimeout | ||
) |
This function adds a Joiner entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the Joiner's extended address or NULL for any Joiner. |
[in] | aPSKd | A pointer to the PSKd. |
[in] | aTimeout | A time after which a Joiner is automatically removed, in seconds. |
kThreadError_None | Successfully added the Joiner. |
kThreadError_NoBufs | No buffers available to add the Joiner. |
kThreadError_InvalidArgs | aExtAddress or aPSKd is invalid. |
OTAPI ThreadError OTCALL otCommissionerAnnounceBegin | ( | otInstance * | aInstance, |
uint32_t | aChannelMask, | ||
uint8_t | aCount, | ||
uint16_t | aPeriod, | ||
const otIp6Address * | aAddress | ||
) |
This function sends an Announce Begin message.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannelMask | The channel mask value. |
[in] | aCount | The number of energy measurements per channel. |
[in] | aPeriod | The time between energy measurements (milliseconds). |
[in] | aAddress | A pointer to the IPv6 destination. |
kThreadError_None | Successfully enqueued the Announce Begin message. |
kThreadError_NoBufs | Insufficient buffers to generate an Announce Begin message. |
OTAPI ThreadError OTCALL 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.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannelMask | The channel mask value. |
[in] | aCount | The number of energy measurements per channel. |
[in] | aPeriod | The time between energy measurements (milliseconds). |
[in] | aScanDuration | The scan duration for each energy measurement (milliseconds). |
[in] | aAddress | A pointer to the IPv6 destination. |
[in] | aCallback | A pointer to a function called on receiving an Energy Report message. |
[in] | aContext | A pointer to application-specific context. |
kThreadError_None | Successfully enqueued the Energy Scan Query message. |
kThreadError_NoBufs | Insufficient buffers to generate an Energy Scan Query message. |
OTAPI ThreadError OTCALL otCommissionerGeneratePSKc | ( | otInstance * | aInstance, |
const char * | aPassPhrase, | ||
const char * | aNetworkName, | ||
const uint8_t * | aExtPanId, | ||
uint8_t * | aPSKc | ||
) |
This method generates PSKc.
PSKc is used to establish the Commissioner Session.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPassPhrase | The commissioning passphrase. |
[in] | aNetworkName | The network name for PSKc computation. |
[in] | aExtPanId | The extended pan id for PSKc computation. |
[out] | aPSKc | A pointer to where the generated PSKc will be placed. |
kThreadErrorNone | Successfully generate PSKc. |
kThreadError_InvalidArgs | If any of the input arguments is invalid. |
OTAPI uint16_t OTCALL otCommissionerGetSessionId | ( | otInstance * | ) |
This function returns the Commissioner Session ID.
[in] | aInstance | A pointer to an OpenThread instance. |
OTAPI otCommissionerState OTCALL otCommissionerGetState | ( | otInstance * | ) |
This function returns the Commissioner State.
[in] | aInstance | A pointer to an OpenThread instance. |
kCommissionerStateDisabled | Commissioner disabled. |
kCommissionerStatePetition | Becoming the commissioner. |
kCommissionerStateActive | Commissioner enabled. |
OTAPI ThreadError OTCALL otCommissionerPanIdQuery | ( | otInstance * | aInstance, |
uint16_t | aPanId, | ||
uint32_t | aChannelMask, | ||
const otIp6Address * | aAddress, | ||
otCommissionerPanIdConflictCallback | aCallback, | ||
void * | aContext | ||
) |
This function sends a PAN ID Query message.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPanId | The PAN ID to query. |
[in] | aChannelMask | The channel mask value. |
[in] | aAddress | A pointer to the IPv6 destination. |
[in] | aCallback | A pointer to a function called on receiving an Energy Report message. |
[in] | aContext | A pointer to application-specific context. |
kThreadError_None | Successfully enqueued the PAN ID Query message. |
kThreadError_NoBufs | Insufficient buffers to generate a PAN ID Query message. |
OTAPI ThreadError OTCALL otCommissionerRemoveJoiner | ( | otInstance * | aIntsance, |
const otExtAddress * | aExtAddress | ||
) |
This function removes a Joiner entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the Joiner's extended address or NULL for any Joiner. |
kThreadError_None | Successfully added the Joiner. |
kThreadError_NotFound | The Joiner specified by aExtAddress was not found. |
kThreadError_InvalidArgs | aExtAddress is invalid. |
OTAPI ThreadError OTCALL otCommissionerSendMgmtGet | ( | otInstance * | , |
const uint8_t * | aTlvs, | ||
uint8_t | aLength | ||
) |
This function sends MGMT_COMMISSIONER_GET.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aTlvs | A pointer to TLVs. |
[in] | aLength | The length of TLVs. |
kThreadError_None | Successfully send the meshcop dataset command. |
kThreadError_NoBufs | Insufficient buffer space to send. |
OTAPI ThreadError OTCALL otCommissionerSendMgmtSet | ( | otInstance * | , |
const otCommissioningDataset * | aDataset, | ||
const uint8_t * | aTlvs, | ||
uint8_t | aLength | ||
) |
This function sends MGMT_COMMISSIONER_SET.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDataset | A pointer to commissioning dataset. |
[in] | aTlvs | A pointer to TLVs. |
[in] | aLength | The length of TLVs. |
kThreadError_None | Successfully send the meshcop dataset command. |
kThreadError_NoBufs | Insufficient buffer space to send. |
OTAPI ThreadError OTCALL otCommissionerSetProvisioningUrl | ( | otInstance * | aInstance, |
const char * | aProvisioningUrl | ||
) |
This function sets the Provisioning URL.
[in] | aProvisioningUrl | A pointer to the Provisioning URL (may be NULL). |
kThreadError_None | Successfully added the Joiner. |
kThreadError_InvalidArgs | aProvisioningUrl is invalid. |
OTAPI ThreadError OTCALL otCommissionerStart | ( | otInstance * | aInstance | ) |
This function enables the Thread Commissioner role.
[in] | aInstance | A pointer to an OpenThread instance. |
kThreadError_None | Successfully started the Commissioner role. |
OTAPI ThreadError OTCALL otCommissionerStop | ( | otInstance * | aInstance | ) |
This function disables the Thread Commissioner role.
[in] | aInstance | A pointer to an OpenThread instance. |
kThreadError_None | Successfully started the Commissioner role. |
OTAPI ThreadError OTCALL 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 | ||
) |
This function 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 (must be static). |
[in] | aVendorModel | A pointer to the Vendor Model (must be static). |
[in] | aVendorSwVersion | A pointer to the Vendor SW Version (must be static). |
[in] | aVendorData | A pointer to the Vendor Data (must be static). |
[in] | aCallback | A pointer to a function that is called when the join operation completes. |
[in] | aContext | A pointer to application-specific context. |
kThreadError_None | Successfully started the Commissioner role. |
kThreadError_InvalidArgs | aPSKd or aProvisioningUrl is invalid. |
OTAPI ThreadError OTCALL otJoinerStop | ( | otInstance * | aInstance | ) |
This function disables the Thread Joiner role.
[in] | aInstance | A pointer to an OpenThread instance. |