#include <stdint.h>
Data Structures | |
struct | _IOTC_WakeUpData |
struct | _IOTC_WakeUpDataEx |
Macros | |
#define | P2PAPI_API __declspec(dllimport) |
#define | P2PAPI_API_DEPRECATED |
Typedefs | |
typedef struct _IOTC_WakeUpData | IOTC_WakeUpData |
typedef struct _IOTC_WakeUpDataEx | IOTC_WakeUpDataEx |
typedef void(* | IOTC_WakeUp_SleepPacketCB )(IOTC_WakeUpData *pData, uint32_t nDataCnt, int32_t nErrCode) |
the callback funciton for IOTC_WakeUp_Get_SleepPacket | |
typedef void(* | IOTC_WakeUp_SleepPacketExCB )(IOTC_WakeUpDataEx *pData, uint32_t nDataCnt, int32_t nErrCode) |
the callback funciton for IOTC_WakeUp_Get_SleepPacketEx | |
Functions | |
void | IOTC_WakeUp_Init () |
Initial IOTC WakeUp feature. | |
P2PAPI_API_DEPRECATED void | IOTC_WakeUp_DeInit (IOTC_WakeUpData *pData) |
DeInitial IOTC WakeUp feature. | |
void | IOTC_WakeUp_DeInitEx (IOTC_WakeUpDataEx *pData) |
DeInitial IOTC WakeUp feature. | |
int32_t | IOTC_WakeUp_WakeDevice (const char *pcszUID) |
Send IOTC WakeUp request to wake device up. | |
P2PAPI_API_DEPRECATED int32_t | IOTC_WakeUp_Get_SleepPacket (IOTC_WakeUp_SleepPacketCB fptrReadyForSleepingCB, int32_t nTimeoutMs) |
notify P2P servers that device is going to sleep. | |
P2PAPI_API_DEPRECATED int32_t | IOTC_WakeUp_Get_SleepPacket2 (IOTC_WakeUp_SleepPacketCB fptrReadyForSleepingCB, int32_t nTimeoutMs) |
notify P2P servers that device is going to sleep with Wake Up 3.0 protocol. | |
int32_t | IOTC_WakeUp_Get_SleepPacketEx (IOTC_WakeUp_SleepPacketExCB fptrReadyForSleepingCB, int32_t nTimeoutMs) |
notify P2P servers that device is going to sleep and wake up with Wake Up 3.0 protocol. | |
void | IOTC_WakeUp_Setup_Auto_WakeUp (int32_t nEnableAutoWakeUp) |
enable that IOTC_Connect_ByUID and IOTC_Connect_ByUID_Parallel will auto wake up device. Use this function before calling IOTC_Connect_ByUID and IOTC_Connect_ByUID_Parallel. Default value is disable. This Setup will reset to disable in IOTC_DeInitialize. | |
Due to power consumption concern, device will enter sleep mode and all. IOTC module will be disconnected. It needs a way to keep login and wake IOTC up.
Revision Table
Version | Name | Date | Description |
---|---|---|---|
3.1.5.0 | Ferando | 2017-03-03 | Add new API IOTC_WakeUp_Setup_Auto_WakeUp, IOTC_WakeUp_Get_SleepPacket, IOTC_WakeUp_SleepPacketCB is a function callback for IOTC_WakeUp_Get_SleepPacket |
====*====*====*====*====*====*====*====*====*====*====*====*====*====*====
#define P2PAPI_API __declspec(dllimport) |
#define P2PAPI_API_DEPRECATED |
typedef void(* IOTC_WakeUp_SleepPacketCB)(IOTC_WakeUpData *pData, uint32_t nDataCnt, int32_t nErrCode) |
the callback funciton for IOTC_WakeUp_Get_SleepPacket
pData | pointer to IOTC_WakeUpData structure |
nDataCnt | the length of pData |
nErrCode | error code. 0 for success. |
typedef void(* IOTC_WakeUp_SleepPacketExCB)(IOTC_WakeUpDataEx *pData, uint32_t nDataCnt, int32_t nErrCode) |
the callback funciton for IOTC_WakeUp_Get_SleepPacketEx
pData | pointer to IOTC_WakeUpDataEx structure |
nDataCnt | the length of pData |
nErrCode | error code. 0 for success. |
typedef struct _IOTC_WakeUpData IOTC_WakeUpData |
typedef struct _IOTC_WakeUpDataEx IOTC_WakeUpDataEx |
P2PAPI_API_DEPRECATED void IOTC_WakeUp_DeInit | ( | IOTC_WakeUpData * | pData | ) |
DeInitial IOTC WakeUp feature.
pData[in] | pointer to IOTC_WakeUpData structure |
void IOTC_WakeUp_DeInitEx | ( | IOTC_WakeUpDataEx * | pData | ) |
DeInitial IOTC WakeUp feature.
pData[in] | pointer to IOTC_WakeUpDataEx structure |
P2PAPI_API_DEPRECATED int32_t IOTC_WakeUp_Get_SleepPacket | ( | IOTC_WakeUp_SleepPacketCB | fptrReadyForSleepingCB, |
int32_t | nTimeoutMs | ||
) |
notify P2P servers that device is going to sleep.
fptrReadyForSleepingCB[in] | fptrReadyForSleepingCB will be called when all servers reponse or reach timeout. |
nTimeout[in] | set the timeout of waiting ack from servers. default 6 sec if given 0. |
P2PAPI_API_DEPRECATED int32_t IOTC_WakeUp_Get_SleepPacket2 | ( | IOTC_WakeUp_SleepPacketCB | fptrReadyForSleepingCB, |
int32_t | nTimeoutMs | ||
) |
notify P2P servers that device is going to sleep with Wake Up 3.0 protocol.
fptrReadyForSleepingCB[in] | fptrReadyForSleepingCB will be called when all servers reponse or reach timeout. |
nTimeout[in] | set the timeout of waiting ack from servers. default 6 sec if given 0. |
int32_t IOTC_WakeUp_Get_SleepPacketEx | ( | IOTC_WakeUp_SleepPacketExCB | fptrReadyForSleepingCB, |
int32_t | nTimeoutMs | ||
) |
notify P2P servers that device is going to sleep and wake up with Wake Up 3.0 protocol.
fptrReadyForSleepingCB[in] | fptrReadyForSleepingCB will be called when all servers reponse or reach timeout. |
nTimeout[in] | set the timeout of waiting ack from servers. default 6 sec if given 0. |
void IOTC_WakeUp_Init | ( | ) |
Initial IOTC WakeUp feature.
None |
void IOTC_WakeUp_Setup_Auto_WakeUp | ( | int32_t | nEnableAutoWakeUp | ) |
enable that IOTC_Connect_ByUID and IOTC_Connect_ByUID_Parallel will auto wake up device. Use this function before calling IOTC_Connect_ByUID and IOTC_Connect_ByUID_Parallel. Default value is disable. This Setup will reset to disable in IOTC_DeInitialize.
nEnableAutoWakeUp[in] | 0:disable, 1:enable. |
int32_t IOTC_WakeUp_WakeDevice | ( | const char * | pcszUID | ) |
Send IOTC WakeUp request to wake device up.
pcszUID[in] | The UID of a device that client wants to connect |