Data Structures | |
struct | _st_UDIDInfo |
Macros | |
#define | NEBULA_LAN_API __declspec(dllimport) |
#define | NEBULA_LAN_API_DEPRECATED |
#define | MAX_DEVICE_NAME_LENGTH 128 |
#define | PWD_MAX_LENGTH 64 |
Typedefs | |
typedef struct _st_UDIDInfo | st_UDIDInfo |
Enumerations | |
enum | LanSearchRole { DEVICE, CLIENT } |
Functions | |
NEBULA_LAN_API int | Nebula_WiFi_Setup_Start_On_LAN (LanSearchRole role, int searchable) |
Start to lan search without UID for WiFi setup. | |
NEBULA_LAN_API int | Nebula_Device_Listen_On_LAN (const char *udid, const char *pwd, const char *device_name, uint16_t timeout_ms) |
Device can listen for tcp request on lan or response to lan search with search id. | |
NEBULA_LAN_API int | Nebula_App_Search_UDID_On_LAN (st_UDIDInfo *udid_array, uint16_t array_cnt, uint16_t timeout_ms) |
Used by client for searching devices's UDID on LAN. | |
NEBULA_LAN_API int | Nebula_App_Request_TCP_Connect_On_LAN (const char *udid, const char *pwd, uint16_t timeout_ms) |
Used by client for connect to devices with UDID on LAN. | |
NEBULA_LAN_API void | Nebula_WiFi_Setup_Stop_On_LAN () |
Stop to lan search for WiFi setup. | |
NEBULA_LAN_API int | Nebula_Send_IOCtrl_On_LAN (NebulaIOCtrlType type, const char *ioctrl_buf, uint16_t ioctrl_len) |
Send WiFi setup IO control. | |
NEBULA_LAN_API int | Nebula_Recv_IOCtrl_From_LAN (NebulaIOCtrlType *type, char *result_buf, uint16_t buf_size, uint16_t timeout_ms) |
Receive WiFi setup IO control. | |
This file describes all the APIs of the IOTC module in IOTC platform. IOTC module is a kind of data communication modules to provide basic data transfer among devices and clients.
Revision Table
Version | Name | Date | Description |
---|---|---|---|
4.0.0.0 | Terry Liu | 2019-08-07 | + Add Nebula_WiFi_Setup_Start_On_LAN, Nebula_Device_Listen_On_LAN |
4.0.0.0 | Terry Liu | 2019-08-07 | + Add Nebula_App_Search_UDID_On_LAN, Nebula_App_Request_TCP_Connect_On_LAN |
4.0.0.0 | Terry Liu | 2019-08-07 | + Add Nebula_WiFi_Setup_Stop_On_LAN, Nebula_Send_IOCtrl_On_LAN |
4.0.0.0 | Terry Liu | 2019-08-07 | + Add Nebula_Recv_IOCtrl_From_LAN |
#define MAX_DEVICE_NAME_LENGTH 128 |
#define NEBULA_LAN_API __declspec(dllimport) |
#define NEBULA_LAN_API_DEPRECATED |
#define PWD_MAX_LENGTH 64 |
typedef struct _st_UDIDInfo st_UDIDInfo |
enum LanSearchRole |
NEBULA_LAN_API int Nebula_App_Request_TCP_Connect_On_LAN | ( | const char * | udid, |
const char * | pwd, | ||
uint16_t | timeout_ms | ||
) |
Used by client for connect to devices with UDID on LAN.
When clients and devices are stay in a LAN environment, client can call this function to connect to device with TCP.
udid | [in] The udid of Device. |
pwd | [in] The pwd of Device, max length is 64. This param could be null, if device not support. |
timeout_ms | [in] The timeout in miliseconds before discovery process end. |
NEBULA_LAN_API int Nebula_App_Search_UDID_On_LAN | ( | st_UDIDInfo * | udid_array, |
uint16_t | array_cnt, | ||
uint16_t | timeout_ms | ||
) |
Used by client for searching devices's UDID on LAN.
When clients and devices are stay in a LAN environment, client can call this function to discovery devices.
udid_array | [in] The array of udid to store search result.The value of udid_array could not be null. |
array_cnt | [in] The size of the udid array, it could not be zero. |
timeout_ms | [in] The timeout in miliseconds before discovery process end and could not be zero. |
NEBULA_LAN_API int Nebula_Device_Listen_On_LAN | ( | const char * | udid, |
const char * | pwd, | ||
const char * | device_name, | ||
uint16_t | timeout_ms | ||
) |
Device can listen for tcp request on lan or response to lan search with search id.
Devcie will start listen for tcp request and create connection on LAN after calling this api.
udid | [in] The udid of Device. |
pwd | [in] The pwd of Device, max length is 64. This param could be null, if device don't want to use. |
device_name | [in] The name of Device, max length is 128. This param could be null, if device don't want to use. |
timeout_ms | [in] timeout in miliseconds for this api. |
NEBULA_LAN_API int Nebula_Recv_IOCtrl_From_LAN | ( | NebulaIOCtrlType * | type, |
char * | result_buf, | ||
uint16_t | buf_size, | ||
uint16_t | timeout_ms | ||
) |
Receive WiFi setup IO control.
This function is used by devices or clients to receive a WiFi setup io control.
type | [out] The type of IO control. |
result_buf | [in] The buffer of received IO control data. |
buf_size | [in] The max length of buffer of received IO control data. |
timeout_ms | [out] The timeout_ms for this function in unit of million-second, give 0 means return immediately. |
NEBULA_LAN_API int Nebula_Send_IOCtrl_On_LAN | ( | NebulaIOCtrlType | type, |
const char * | ioctrl_buf, | ||
uint16_t | ioctrl_len | ||
) |
Send WiFi setup IO control.
This function is used by devices or clients to send a WiFi setup IO control.
type | [in] The type of IO control. |
ioctrl_buf | [in] The buffer of IO control data |
ioctrl_len | [in] The length of IO control data |
NEBULA_LAN_API int Nebula_WiFi_Setup_Start_On_LAN | ( | LanSearchRole | role, |
int | searchable | ||
) |
Start to lan search without UID for WiFi setup.
Start to lan search for WiFi setup. After calling this api, user can listen or request tcp connect to create tcp connection.
role | [in] role of lan search. |
searchable | [in] This device could be searched with empty search name or not. |
NEBULA_LAN_API void Nebula_WiFi_Setup_Stop_On_LAN | ( | ) |
Stop to lan search for WiFi setup.
Stop to lan search for WiFi setup. This api must be called, if NEBULA_WiFi_Setup_Start_On_LAN has been called. This api will close tcp connection and free memory.