TuyaOS
结构体 | 宏定义 | 类型定义 | 函数
netcfg_module.h 文件参考

tuya netcfg module 更多...

#include "tal_wifi.h"
#include "tuya_list.h"
#include "stdint.h"
#include "stdbool.h"
netcfg_module.h 的引用(Include)关系图:

浏览源代码.

结构体

struct  NETCFG_HANDLER
 netcfg handler 更多...
 

宏定义

#define API_USER   (0x1 << 8)
 
#define BLE   (0x1 << 2)
 
#define CAMERA_QR   (0x1 << 3)
 
#define DEF_AP_SSID_PF   "SmartLife"
 
#define NETCFG_AMAZON_WIFI_FFS   ((VENDOR_AMAZON << 16) | (WIFI_FFS))
 
#define NETCFG_JD_WIFI_SMART   ((VENDOR_JD << 16) | WIFI_SMARTCFG)
 
#define NETCFG_STOP_ALL_CFG_MODULE   (0)
 
#define NETCFG_TY_API_USER   ((VENDOR_TUYA << 16) | API_USER)
 
#define NETCFG_TY_BLE   ((VENDOR_TUYA << 16) | BLE)
 
#define NETCFG_TY_CAMERA_QR   ((VENDOR_TUYA << 16) | CAMERA_QR)
 
#define NETCFG_TY_WIFI_AP   ((VENDOR_TUYA << 16) | WIFI_AP)
 
#define NETCFG_TY_WIFI_AP_COEXIST   ((VENDOR_TUYA << 16) | WIFI_AP_COEXIST)
 
#define NETCFG_TY_WIFI_PEGASUS   ((VENDOR_TUYA << 16) | WIFI_PEGASUS)
 
#define NETCFG_TY_WIFI_SMARTCFG   ((VENDOR_TUYA << 16) | WIFI_SMARTCFG)
 
#define NETCFG_TY_WIFI_SMARTCFG_COEXIST   ((VENDOR_TUYA << 16) | WIFI_SMARTCFG_COEXIST)
 
#define NETCFG_WX_WIFI_AIRKISS   ((VENDOR_WEIXIN << 16) | WIFI_SMARTCFG)
 
#define VENDOR_AMAZON   (0x1 << 3)
 
#define VENDOR_JD   (0x1 << 1)
 
#define VENDOR_TUYA   (0x1 << 0)
 
#define VENDOR_WEIXIN   (0x1 << 2)
 
#define WIFI_AP   (0x1 << 1)
 
#define WIFI_AP_COEXIST   (0x1 << 5)
 
#define WIFI_FFS   (0x1 << 6)
 
#define WIFI_PEGASUS   (0x1 << 7)
 
#define WIFI_SMARTCFG   (0x1 << 0)
 
#define WIFI_SMARTCFG_COEXIST   (0x1 << 4)
 
#define WL_TOKEN_LEN   (16)
 

类型定义

typedef struct apSsidPasswd_s ApSsidPasswd_t
 ssid and password info
 
typedef int(* FN_NETCFG_CB) (PTR_SSID_PASSWORD_TOKEN info, int type)
 netcfg finished callback function. 更多...
 
typedef int(* FN_NETCFG_START) (FN_NETCFG_CB cb, void *args, int type)
 netcfg start function. 更多...
 
typedef int(* FN_NETCFG_STOP) (int type)
 netcfg stop function. 更多...
 
typedef struct AP_NETCFG_ARGSP_AP_NETCFG_ARGS
 
typedef struct NETCFG_HANDLERPTR_NETCFG_HANDLER
 
typedef struct SSID_PASSWORD_TOKENPTR_SSID_PASSWORD_TOKEN
 
typedef struct apSsidPasswd_sptrApSsidPasswd
 

函数

BOOL_T is_netcfg_module_inited (VOID_T)
 whether netcfg module is inited or not 更多...
 
VOID_T netcfg_module_clear (VOID_T)
 
int netcfg_module_init (VOID_T)
 init netcfg module. 更多...
 
int netcfg_module_register (int type, FN_NETCFG_START start, FN_NETCFG_STOP stop)
 register netcfg type 更多...
 
int netcfg_module_uninit (VOID_T)
 uninit netcfg module. 更多...
 
int netcfg_module_unregister (int type)
 unregister netcfg type 更多...
 
int netcfg_set_transporter_switch_interval (int ms_interval)
 set channel switch interval(default:110ms) 更多...
 
int netcfg_start (int type, FN_NETCFG_CB netcfg_finish_cb, void *args)
 start netcfg type 更多...
 
int netcfg_start_other_all (int type)
 start all netcfg type except the specified type 更多...
 
int netcfg_stop (int type)
 stop netcfg type 更多...
 
int netcfg_stop_other_all (int type)
 stop all netcfg type except the specified type 更多...
 

详细描述

tuya netcfg module

版本
0.1
日期
2020-11-09

类型定义说明

◆ FN_NETCFG_CB

typedef int(* FN_NETCFG_CB) (PTR_SSID_PASSWORD_TOKEN info, int type)

netcfg finished callback function.

参数
[in]PTR_SSID_PASSWORD_TOKENnetcfg info: ssid,passwd,token
[in]typerefer to netcfg type definitions
注解
netcfg finished callback function.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ FN_NETCFG_START

typedef int(* FN_NETCFG_START) (FN_NETCFG_CB cb, void *args, int type)

netcfg start function.

参数
[in]cbnetcfg finished callback function
[in]argsargs for start
[in]typerefer to netcfg type definitions
注解
netcfg start function.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ FN_NETCFG_STOP

typedef int(* FN_NETCFG_STOP) (int type)

netcfg stop function.

参数
[in]typerefer to netcfg type definitions
注解
netcfg stop function.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

函数说明

◆ is_netcfg_module_inited()

BOOL_T is_netcfg_module_inited ( VOID_T  )

whether netcfg module is inited or not

注解
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_module_init()

int netcfg_module_init ( VOID_T  )

init netcfg module.

注解
init netcfg module.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_module_register()

int netcfg_module_register ( int  type,
FN_NETCFG_START  start,
FN_NETCFG_STOP  stop 
)

register netcfg type

参数
[in]typenetcfg type,refer to netcfg type definitions
[in]startcallback function to start netcfg
[in]stopcallback function to stop netcfg
注解
register netcfg module start and stop callback.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_module_uninit()

int netcfg_module_uninit ( VOID_T  )

uninit netcfg module.

注解
release netcfg module resources.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_module_unregister()

int netcfg_module_unregister ( int  type)

unregister netcfg type

参数
[in]typenetcfg type,refer to netcfg type definitions
注解
register netcfg module start and stop callback.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_set_transporter_switch_interval()

int netcfg_set_transporter_switch_interval ( int  ms_interval)

set channel switch interval(default:110ms)

参数
[in]ms_intervalunit:ms
注解
set channel switch interval(default:110ms)
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_start()

int netcfg_start ( int  type,
FN_NETCFG_CB  netcfg_finish_cb,
void *  args 
)

start netcfg type

参数
[in]typenetcfg type,refer to netcfg type definitions
[in]netcfg_finish_cbcallback function when netcfg finished
[in]argsprivate data for netcfg_finish_cb
注解
start netcfg type.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_start_other_all()

int netcfg_start_other_all ( int  type)

start all netcfg type except the specified type

参数
[in]typenetcfg type,refer to netcfg type definitions 0 : stop all netcfg type
注解
start all netcfg type except the specified type.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_stop()

int netcfg_stop ( int  type)

stop netcfg type

参数
[in]typenetcfg type,refer to netcfg type definitions 0 : stop all netcfg type
注解
stop netcfg type.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ netcfg_stop_other_all()

int netcfg_stop_other_all ( int  type)

stop all netcfg type except the specified type

参数
[in]typenetcfg type,refer to netcfg type definitions 0 : stop all netcfg type
注解
stop all netcfg type except the specified type.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h