|
TuyaOS
|
Utilities of DevOS 更多...


函数 | |
| DP_REPT_FLOW_CTRL_UNIT * | get_all_dp_flow_ctrl_rule (VOID) |
| Get DP flow control rules 更多... | |
| GW_WORK_STAT_T | get_gw_active (VOID) |
| Get activation state 更多... | |
| BOOL_T | get_gw_auth_status (VOID) |
| Get gateway's authentication status 更多... | |
| BOOL_T | get_gw_bind_status (VOID) |
| Get gateway's dp bind status 更多... | |
| CONST CHAR_T * | get_gw_country_code (VOID) |
| Get gateway country code 更多... | |
| CONST CHAR_T * | get_gw_dev_id (VOID) |
| Get gateway's device id 更多... | |
| GW_EXT_STAT_T | get_gw_ext_stat (VOID) |
| Get DevOS extension state 更多... | |
| GW_NW_STAT_T | get_gw_nw_status (VOID) |
| Get device network linkage state 更多... | |
| CONST CHAR_T * | get_gw_region (VOID) |
| Get gateway region 更多... | |
| CONST CHAR_T * | get_gw_ssid (VOID) |
| Get gateway's ssid 更多... | |
| CONST CHAR_T * | get_gw_sw_ver (GW_PERMIT_DEV_TP_T tp) |
| Get gateway's mcu software version 更多... | |
| VOID_T | gw_active_free_options (VOID_T) |
| Free all saved gw active options(internal api) | |
| CHAR_T * | gw_active_get_ext_param (VOID) |
| Get extension params for activation 更多... | |
| CHAR_T ** | gw_active_get_options (INT_T *len) |
| Get gw active options 更多... | |
| BOOL_T | gw_active_get_support_election (VOID) |
| Get election enable or not 更多... | |
| OPERATE_RET | gw_active_set_ext_param (IN CHAR_T *param) |
| Set extension params for activation 更多... | |
| OPERATE_RET | gw_active_set_options (CHAR_T *op) |
| Set gw active option 更多... | |
| OPERATE_RET | gw_active_set_support_election (BOOL_T enable) |
| Set election enable or not 更多... | |
| OPERATE_RET | gw_cad_ver_update (CHAR_T *old_ver, CHAR_T *new_ver, IN CONST DEV_TYPE_T tp, IN CONST GW_ATTACH_ATTR_T *attr, IN CONST UINT_T attr_num) |
| CHAR_T * | gw_dp_flow_ctrl_cfg_proc (ty_cJSON *result) |
| Parse DP flow control rules 更多... | |
| OPERATE_RET | gw_ext_active_start (ty_cJSON *root) |
| TY_EXT_AUTH_INFO * | gw_get_ext_auth_info (VOID_T) |
| OPERATE_RET | gw_get_ip (NW_IP_S *p_ip) |
| Get device IP 更多... | |
| OPERATE_RET | gw_get_mac (NW_MAC_S *p_mac) |
| Get device MAC 更多... | |
| GW_STRIDE_UPDATE_S * | gw_get_new_pid_key (VOID) |
| Get stride info 更多... | |
| OPERATE_RET | gw_get_rssi (SCHAR_T *p_rssi) |
| Get device RSSI level 更多... | |
| CHAR_T * | gw_get_udf (VOID) |
| Get user defined features(udf) for activation 更多... | |
| OPERATE_RET | gw_init_auth_info (ty_cJSON *auth_info) |
| OPERATE_RET | gw_load_sum_time_zone_tbl (IN CONST CHAR_T *tm_zone) |
| Load summer timezone talbe 更多... | |
| VOID | gw_oem_set (IN CONST BOOL_T oem) |
| Enable oem or not 更多... | |
| VOID | gw_register_cbs (IN CONST TY_IOT_CBS_S *cbs) |
| Set DevOS event handlers 更多... | |
| OPERATE_RET | gw_save_auth_token (IN CONST CHAR_T *token, IN CONST CHAR_T *region, IN CONST CHAR_T *regist_key) |
| Save network configuration token 更多... | |
| VOID | gw_set_psk30_cfg (BOOL_T flag) |
| set psk30 cfg flag 更多... | |
| OPERATE_RET | gw_set_udf (IN CONST CHAR_T *udf) |
| Set user defined features(udf) for activation 更多... | |
| OPERATE_RET | gw_update_versions (VOID) |
| Force to upload all versions 更多... | |
| BOOL_T | gw_upload_rst_log_get (VOID) |
| Enable reset log upload or not | |
| VOID | gw_upload_rst_log_set (IN CONST BOOL_T upload) |
| Enable reset log upload or not 更多... | |
| OPERATE_RET | gw_user_token_bind (IN CONST CHAR_T *token) |
| Set network configuration token 更多... | |
| BOOL_T | is_gw_oem (VOID) |
| Whether oem is enabled or not 更多... | |
| VOID | set_gw_active (GW_WORK_STAT_T stat) |
| Set activation state 更多... | |
| VOID | set_gw_ext_stat (IN CONST GW_EXT_STAT_T ext_stat) |
| Set DevOS extension state 更多... | |
| CHAR_T * | tuya_get_serialno (VOID) |
| Get serial number 更多... | |
| OPERATE_RET | tuya_iot_dev_enable_attach_update (BOOL_T enable) |
| OPERATE_RET | tuya_iot_dev_get_attach_attr (GW_PERMIT_DEV_TP_T tp, GW_ATTACH_ATTR_T *attr) |
| BOOL_T | tuya_iot_dev_get_attach_update_enable (VOID) |
| OPERATE_RET | tuya_iot_dev_set_attach_attr (GW_PERMIT_DEV_TP_T tp, GW_ATTACH_ATTR_T *attr) |
| OPERATE_RET | tuya_iot_dev_update_attachs (UINT_T attr_num, GW_ATTACH_ATTR_T *attrs) |
| Update versions of all attach modules. 更多... | |
| OPERATE_RET | ty_init_rtc (INT_T timeval) |
| Initialize rtc module 更多... | |
Utilities of DevOS
| DP_REPT_FLOW_CTRL_UNIT * get_all_dp_flow_ctrl_rule | ( | VOID | ) |
Get DP flow control rules
| GW_WORK_STAT_T get_gw_active | ( | VOID | ) |
Get activation state
| BOOL_T get_gw_auth_status | ( | VOID | ) |
Get gateway's authentication status
| BOOL_T get_gw_bind_status | ( | VOID | ) |
Get gateway's dp bind status
| CONST CHAR_T * get_gw_country_code | ( | VOID | ) |
Get gateway country code
| CONST CHAR_T * get_gw_dev_id | ( | VOID | ) |
Get gateway's device id
| GW_EXT_STAT_T get_gw_ext_stat | ( | VOID | ) |
Get DevOS extension state
| GW_NW_STAT_T get_gw_nw_status | ( | VOID | ) |
Get device network linkage state
| [out] | nw_stat | Linkage state, see GW_NW_STAT_T |
| CONST CHAR_T * get_gw_region | ( | VOID | ) |
Get gateway region
| CONST CHAR_T * get_gw_ssid | ( | VOID | ) |
Get gateway's ssid
| CONST CHAR_T * get_gw_sw_ver | ( | GW_PERMIT_DEV_TP_T | tp | ) |
Get gateway's mcu software version
| [in] | tp | device type |
| CHAR_T * gw_active_get_ext_param | ( | VOID | ) |
Get extension params for activation
| CHAR_T ** gw_active_get_options | ( | INT_T * | len | ) |
Get gw active options
| [out] | len | active options len |
| BOOL_T gw_active_get_support_election | ( | VOID | ) |
Get election enable or not
| OPERATE_RET gw_active_set_ext_param | ( | IN CHAR_T * | param | ) |
Set extension params for activation
| [in] | param | Extension params |
| OPERATE_RET gw_active_set_options | ( | CHAR_T * | op | ) |
Set gw active option
| OPERATE_RET gw_active_set_support_election | ( | BOOL_T | enable | ) |
Set election enable or not
| [in] | enable | election is supported or not |
| CHAR_T * gw_dp_flow_ctrl_cfg_proc | ( | ty_cJSON * | result | ) |
Parse DP flow control rules
| [in] | result | Json encoded flow control rules |
| OPERATE_RET gw_get_ip | ( | NW_IP_S * | p_ip | ) |
Get device IP
| [out] | p_ip | Device IP, see NW_IP_S |
| OPERATE_RET gw_get_mac | ( | NW_MAC_S * | p_mac | ) |
Get device MAC
| [out] | p_mac | Device MAC, see NW_MAC_S |
| GW_STRIDE_UPDATE_S * gw_get_new_pid_key | ( | VOID | ) |
Get stride info
| OPERATE_RET gw_get_rssi | ( | SCHAR_T * | p_rssi | ) |
Get device RSSI level
| [out] | p_rssi | Device RSSI level, if(*p_rssi == 99) then do't support get RSSI |
| CHAR_T * gw_get_udf | ( | VOID | ) |
Get user defined features(udf) for activation
| OPERATE_RET gw_load_sum_time_zone_tbl | ( | IN CONST CHAR_T * | tm_zone | ) |
Load summer timezone talbe
| [in] | tm_zone | Summer timezone table |
| VOID gw_oem_set | ( | IN CONST BOOL_T | oem | ) |
Enable oem or not
| [in] | oem | Enable or not |
| VOID gw_register_cbs | ( | IN CONST TY_IOT_CBS_S * | cbs | ) |
Set DevOS event handlers
| [in] | cbs | Handler of event, see TY_IOT_CBS_S |
| OPERATE_RET gw_save_auth_token | ( | IN CONST CHAR_T * | token, |
| IN CONST CHAR_T * | region, | ||
| IN CONST CHAR_T * | regist_key | ||
| ) |
Save network configuration token
| [in] | token | Token got from network configuration |
| VOID gw_set_psk30_cfg | ( | BOOL_T | flag | ) |
set psk30 cfg flag
| [in] | flag | TRUE or FALSE |
| OPERATE_RET gw_set_udf | ( | IN CONST CHAR_T * | udf | ) |
Set user defined features(udf) for activation
| OPERATE_RET gw_update_versions | ( | VOID | ) |
Force to upload all versions
| VOID gw_upload_rst_log_set | ( | IN CONST BOOL_T | upload | ) |
Enable reset log upload or not
| [in] | upload | Enable or not |
| OPERATE_RET gw_user_token_bind | ( | IN CONST CHAR_T * | token | ) |
Set network configuration token
| [in] | token | Token got from network configuration |
| BOOL_T is_gw_oem | ( | VOID | ) |
Whether oem is enabled or not
| VOID set_gw_active | ( | GW_WORK_STAT_T | stat | ) |
Set activation state
| [in] | stat | Work state, see GW_WORK_STAT_T |
| VOID set_gw_ext_stat | ( | IN CONST GW_EXT_STAT_T | ext_stat | ) |
Set DevOS extension state
| [in] | ext_stat | Extension state, see GW_EXT_STAT_T |
| CHAR_T * tuya_get_serialno | ( | VOID | ) |
Get serial number
| OPERATE_RET tuya_iot_dev_update_attachs | ( | UINT_T | attr_num, |
| GW_ATTACH_ATTR_T * | attrs | ||
| ) |
Update versions of all attach modules.
| [in] | attr_num | Count of attach modules |
| [in] | attrs | Attributes of attach modules |
| OPERATE_RET ty_init_rtc | ( | INT_T | timeval | ) |
Initialize rtc module
| [in] | timeval | Time interval to update local time |