TuyaOS
tuya_svc_wired.h
浏览该文件的文档.
1
10#ifndef __TUYA_SVC_WIRED_H__
11#define __TUYA_SVC_WIRED_H__
12
13#include "tuya_hal_wired.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef BYTE_T GW_BASE_NW_STAT_T;
20#define GB_STAT_LAN_UNCONN 0 // offline in LAN
21#define GB_STAT_LAN_CONN 1 // online in LAN, offline in WAN
22#define GB_STAT_CLOUD_CONN 2 // online in WAN
23
27typedef struct {
28 CHAR_T *uuid; // strlen(uuid) <= 16,must not be null
29 CHAR_T *auth_key; // strlen(auth_key) <= 32,must not be null
31
37typedef VOID (*GET_NW_STAT_CB)(IN CONST GW_BASE_NW_STAT_T stat);
38
44OPERATE_RET tuya_svc_wired_init(VOID);
45
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif //__TUYA_SVC_WIRED_H__
Definition of product info(wired)
Definition: tuya_svc_wired.h:27
Common process - compatible the tuya_hal_wifi.h
OPERATE_RET tuya_svc_wired_register_netstat_cb(GET_NW_STAT_CB cb)
Register wired network state callback
VOID(* GET_NW_STAT_CB)(IN CONST GW_BASE_NW_STAT_T stat)
Handler when network state error happens(wired)
Definition: tuya_svc_wired.h:37
OPERATE_RET tuya_svc_wired_init(VOID)
Init wired network, and register a linkage to network manager