TuyaOS
宏定义 | 函数
tuya_iot_com_api.h 文件参考
#include "tuya_cloud_types.h"
#include "tuya_cloud_com_defs.h"
tuya_iot_com_api.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define dev_report_dp_raw_sync(dev_id, dpid, data, len, timeout)    dev_report_dp_raw_sync_extend(dev_id, dpid, data, len, timeout, TRUE)
 
#define dev_report_dp_raw_sync_with_time(dev_id, dpid, data, len, timeout, time_str)    dev_report_dp_raw_sync_extend_with_time(dev_id, dpid, data, len, timeout, TRUE, time_str)
 
#define dev_report_dp_stat_sync(dev_id, dp_data, cnt, timeout)    dev_report_dp_stat_sync_extend(dev_id, dp_data, cnt, timeout, TRUE)
 
#define tuya_iot_dev_upgd_progress_rept(percent, devid, tp)    tuya_iot_dev_upgd_progress_with_remain_time(percent, devid, tp, 0)
 
#define tuya_iot_init(fs_storge_path)    tuya_iot_init_params(fs_storge_path, NULL)
 
#define tuya_iot_kv_flash_init   tuya_iot_kv_flash_init_param
 
#define tuya_iot_upgrade_dev(devid, fw, get_file_cb, upgrd_nofity_cb, pri_data)    tuya_iot_upgrade_dev_notify(devid, fw, get_file_cb, upgrd_nofity_cb, pri_data, TRUE, 0)
 
#define tuya_iot_upgrade_gw(fw, get_file_cb, upgrd_nofity_cb, pri_data)    tuya_iot_upgrade_gw_notify(fw, get_file_cb, upgrd_nofity_cb, pri_data, TRUE, 0)
 
#define tuya_iot_upload_layout_buffer(map_id, buffer, len)    tuya_iot_map_cleaner_upload_buffer(map_id, buffer, len, "layout/lay.bin", UP_CLEANER_MAP)
 
#define tuya_iot_upload_layout_file(map_id, local_file_name)    tuya_iot_map_cleaner_upload_file(map_id, local_file_name, "layout/lay.bin", UP_CLEANER_MAP)
 
#define tuya_iot_upload_route_buffer(map_id, buffer, len)    tuya_iot_map_cleaner_upload_buffer(map_id, buffer, len, "route/rou.bin", UP_CLEANER_PATH)
 
#define tuya_iot_upload_route_file(map_id, local_file_name)    tuya_iot_map_cleaner_upload_file(map_id, local_file_name, "route/rou.bin", UP_CLEANER_PATH)
 

函数

OPERATE_RET dev_query_dp_json_async (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_query_dp_json_async @desc report dp info a-synced. 更多...
 
OPERATE_RET dev_query_dp_json_async_force (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_query_dp_json_async_force @desc report dp info a-synced. 更多...
 
OPERATE_RET dev_report_dp_json_async (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_report_dp_json_async @desc report dp info a-synced. 更多...
 
OPERATE_RET dev_report_dp_json_async_force (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_report_dp_json_async_force @desc report dp info a-synced. 更多...
 
OPERATE_RET dev_report_dp_raw_sync_extend (IN CONST CHAR_T *dev_id, IN CONST BYTE_T dpid, IN CONST BYTE_T *data, IN CONST UINT_T len, IN CONST UINT_T timeout, IN CONST BOOL_T enable_auto_retrans)
 dev_report_dp_raw_sync_extend @desc report dp raw info synced. 更多...
 
OPERATE_RET dev_report_dp_raw_sync_extend_with_time (IN CONST CHAR_T *dev_id, IN CONST BYTE_T dpid, IN CONST BYTE_T *data, IN CONST UINT_T len, IN CONST UINT_T timeout, IN CONST BOOL_T enable_auto_retrans, IN CONST CHAR_T *time_str)
 dev_report_dp_raw_sync_extend_with_time @desc report dp raw info synced. 更多...
 
OPERATE_RET dev_report_dp_stat_sync_extend (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt, IN CONST UINT_T timeout, IN CONST BOOL_T enable_auto_retrans)
 dev_report_dp_stat_sync_extend @desc: report dp status info synced. if time_stamp==0, time_stamp = time of msg arrival of the server 更多...
 
OPERATE_RET dev_sync_dp_json_async (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_sync_dp_json_async @desc report dp info a-synced. 更多...
 
OPERATE_RET dev_sync_dp_json_async_force (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt)
 dev_sync_dp_json_async_force @desc report dp info a-synced. 更多...
 
VOID tuya_iot_app_cbs_init (IN CONST TY_IOT_APP_CBS_S *app_cbs)
 tuya_iot_app_cbs_init 更多...
 
OPERATE_RET tuya_iot_book_additional_topic (IN CHAR_T *topic)
 tuya_iot_book_additional_topic @desc subscribe additional topic 更多...
 
OPERATE_RET tuya_iot_book_wakeup_topic (VOID)
 tuya_iot_book_wakeup_topic @desc unscribe mqtt msg topic and subscribe wakeup topic 更多...
 
OPERATE_RET tuya_iot_custom_data_report_async (IN CONST BYTE_T *data, IN CONST INT_T len, IN CONST CHAR_T *topic, IN CONST BYTE_T qos, IN CONST UINT_T timeout)
 tuya_iot_custom_data_report_async 更多...
 
OPERATE_RET tuya_iot_custom_data_report_sync (IN CONST BYTE_T *data, IN CONST INT_T len, IN CONST CHAR_T *topic, IN CONST BYTE_T qos, IN CONST UINT_T timeout)
 tuya_iot_custom_data_report_sync 更多...
 
OPERATE_RET tuya_iot_dev_upgd_progress_with_remain_time (IN CONST UINT_T percent, IN CONST CHAR_T *devid, IN CONST DEV_TYPE_T tp, IN CONST UINT_T remain_time)
 tuya_iot_dev_upgd_progress_with_remain_time 更多...
 
OPERATE_RET tuya_iot_dev_upgd_result_report (IN CONST CHAR_T *dev_id, IN CONST DEV_TYPE_T type, IN CONST INT_T result)
 tuya_iot_dev_upgd_result_report 更多...
 
OPERATE_RET tuya_iot_dp_low_power_query (IN CONST UCHAR_T *dps, IN CONST UINT_T cnt, OUT TY_RECV_OBJ_DP_S **obj_dps, OUT TY_RECV_MULTI_RAW_DP_S **raw_dps)
 tuya_iot_dp_low_power_query 更多...
 
BYTE_T tuya_iot_get_active_stat (VOID)
 tuya_iot_get_active_stat 更多...
 
OPERATE_RET tuya_iot_get_custom_cfg (IN CONST TY_CUSTOM_CFG_E type, OUT CHAR_T **pp_cfg_str)
 tuya_iot_get_custom_cfg 更多...
 
DP_DESC_IF_Stuya_iot_get_dp_desc (IN CONST CHAR_T *dev_id, IN CONST BYTE_T dpid)
 tuya_iot_get_dp_desc @desc get dp info of a sub-device and a dp id 更多...
 
DP_PROP_VALUE_Utuya_iot_get_dp_prop_value (IN CONST CHAR_T *dev_id, IN CONST BYTE_T dpid)
 tuya_iot_get_dp_prop_value @desc get dp value of a sub-device and a dp id 更多...
 
OPERATE_RET tuya_iot_get_ext_module_info (DEV_EXT_MODULE_INFO *ext_module_info)
 
DEV_EXT_MODE_TYPE tuya_iot_get_ext_module_type (VOID)
 
CHAR_T * tuya_iot_get_gw_id (VOID)
 tuya_iot_get_gw_id 更多...
 
OPERATE_RET tuya_iot_get_heartbeat_data (INOUT BYTE_T *heartbeat_data_arr, INOUT UINT_T *p_len)
 tuya_iot_get_heartbeat_data @desc get mqtt heartbeat string pattern 更多...
 
INT_T tuya_iot_get_heartbeat_interval (VOID)
 tuya_iot_get_heartbeat_interval @desc get mqtt heartbeat interval 更多...
 
OPERATE_RET tuya_iot_get_location_info (INOUT TY_LOCATION_INFO_S *p_location)
 tuya_iot_get_location_info 更多...
 
INT_T tuya_iot_get_mqtt_socket_fd (VOID)
 tuya_iot_get_mqtt_socket_fd @desc get curr mqtt socket fd 更多...
 
CHAR_T * tuya_iot_get_os_adapt_info (VOID_T)
 tuya_iot_get_os_adapt_info 更多...
 
OPERATE_RET tuya_iot_get_region_info (INOUT TY_IOT_REGION_INFO_S *p_region_info)
 tuya_iot_get_region_info 更多...
 
CHAR_T * tuya_iot_get_sdk_info (VOID)
 tuya_iot_get_sdk_info 更多...
 
OPERATE_RET tuya_iot_get_wakeup_data (INOUT BYTE_T *wakeup_data_arr, INOUT UINT_T *p_len)
 tuya_iot_get_wakeup_data @desc get mqtt wakeup string pattern 更多...
 
VOID tuya_iot_ignore_upgrade_set (IN CONST BOOL_T ignore)
 tuya_iot_ignore_upgrade_set @desc set rst log upload mode 更多...
 
OPERATE_RET tuya_iot_init_params (IN CONST CHAR_T *fs_storge_path, IN CONST TY_INIT_PARAMS_S *p_param)
 TuyaOS system service init 更多...
 
OPERATE_RET tuya_iot_kv_flash_init_param (IN CONST CHAR_T *fs_storge_path)
 tuya_iot_kv_flash_init_param @desc init kv flash 更多...
 
OPERATE_RET tuya_iot_map_cleaner_upload_buffer (IN CONST INT_T map_id, IN CONST BYTE_T *buffer, IN CONST UINT_T len, IN CONST CHAR_T *cloud_file_name, IN CONST UP_MAP_TYPE_E map_type)
 tuya_iot_map_cleaner_upload_buffer @desc sweeper function. upload cleaner map info 更多...
 
OPERATE_RET tuya_iot_map_cleaner_upload_file (IN CONST INT_T map_id, IN CONST CHAR_T *local_file_name, IN CONST CHAR_T *cloud_file_name, IN CONST UP_MAP_TYPE_E map_type)
 tuya_iot_map_cleaner_upload_file @desc sweeper function. upload cleaner map info 更多...
 
OPERATE_RET tuya_iot_map_record_upload_buffer (IN CONST INT_T map_id, IN CONST BYTE_T *buffer, IN CONST UINT_T len, IN CONST CHAR_T *descript)
 tuya_iot_map_record_upload_buffer @desc sweeper function. upload record map info 更多...
 
OPERATE_RET tuya_iot_map_record_upload_buffer_with_filename (IN CONST INT_T map_id, IN CONST BYTE_T *buffer, IN CONST UINT_T len, IN CONST CHAR_T *cloud_file_name, IN CONST CHAR_T *descript)
 tuya_iot_map_record_upload_buffer_with_filename @desc sweeper function. upload record map info 更多...
 
OPERATE_RET tuya_iot_media_data_report (IN CONST FLOW_BODY_ST *dt_body, IN CONST UINT_T timeout)
 tuya_iot_media_data_report 更多...
 
OPERATE_RET tuya_iot_media_data_report_v2 (IN CONST FLOW_BODY_V2_ST *dt_body, IN CONST UINT_T timeout)
 tuya_iot_media_data_report_v2 更多...
 
VOID tuya_iot_mqtt_disconnect (VOID)
 tuya_iot_mqtt_disconnect @desc force disconnect MQTT 更多...
 
VOID tuya_iot_mqtt_restart (VOID)
 tuya_iot_mqtt_restart @desc restart MQTT 更多...
 
VOID tuya_iot_oem_set (IN CONST BOOL_T oem)
 tuya_iot_oem_set @desc set oem mode 更多...
 
OPERATE_RET tuya_iot_refuse_upgrade (IN CONST FW_UG_S *fw, IN CONST CHAR_T *dev_id)
 tuya_iot_refuse_upgrade 更多...
 
OPERATE_RET tuya_iot_regist_dp_rept_cb (IN DP_REPT_HADLE_CB_S *dp_rept_cbs)
 tuya_iot_regist_dp_rept_cb 更多...
 
OPERATE_RET tuya_iot_release_custom_cfg (IN CHAR_T *p_cfg_str)
 tuya_iot_release_custom_cfg 更多...
 
OPERATE_RET tuya_iot_reset_upgrade_detect_timer (IN CONST INT_T time_ms)
 tuya_iot_reset_upgrade_detect_timer @desc reset the upgrade detect time 更多...
 
OPERATE_RET tuya_iot_send_custom_mqtt_msg (IN CONST UINT_T protocol, IN CONST BYTE_T *p_data)
 tuya_iot_send_custom_mqtt_msg @desc send a custom protocol mqtt msg 更多...
 
OPERATE_RET tuya_iot_send_mqtt_msg_with_topic (IN CONST CHAR_T *topic, IN CONST UINT_T protocol, IN CONST BYTE_T *p_data)
 tuya_iot_send_mqtt_msg_with_topic @desc send a custom protocol mqtt msg to topic 更多...
 
OPERATE_RET tuya_iot_set_ext_active_info (const char *active_info)
 
OPERATE_RET tuya_iot_set_ext_auth_info (const CHAR_T *auth_info)
 
VOID_T tuya_iot_set_ext_module_type (DEV_EXT_MODE_TYPE emt)
 
OPERATE_RET tuya_iot_set_log_attr (IN CONST INT_T log_level)
 tuya_iot_set_log_attr 更多...
 
OPERATE_RET tuya_iot_set_log_bool_time (BOOL_T if_ms_level)
 tuya_iot_set_log_bool_time 更多...
 
OPERATE_RET tuya_iot_set_udf_parameter (IN CONST CHAR_T *udf)
 tuya_iot_set_udf_parameter @desc set user defined funtions 更多...
 
OPERATE_RET tuya_iot_upgrade_dev_notify (IN CONST CHAR_T *devid, IN CONST FW_UG_S *fw, IN CONST GET_FILE_DATA_CB get_file_cb, IN CONST UPGRADE_NOTIFY_CB upgrd_nofity_cb, IN CONST PVOID_T pri_data, BOOL_T notify, UINT_T download_buf_size)
 tuya_iot_upgrade_dev_notify @desc upgrage sub-device/soc/mcu firmware 更多...
 
OPERATE_RET tuya_iot_upgrade_gw_notify (IN CONST FW_UG_S *fw, IN CONST GET_FILE_DATA_CB get_file_cb, IN CONST UPGRADE_NOTIFY_CB upgrd_nofity_cb, IN CONST PVOID_T pri_data, BOOL_T notify, UINT_T download_buf_size)
 tuya_iot_upgrade_gw_notify @desc upgrage gateway firmware 更多...
 
OPERATE_RET tuya_iot_upload_incre_data (IN CONST USHORT_T map_id, IN CONST UINT_T offset, IN CONST BYTE_T *pbuffer, IN CONST USHORT_T buf_len)
 ‍*********************************************************** 更多...
 
VOID tuya_iot_upload_rst_log_set (IN CONST BOOL_T upload)
 tuya_iot_upload_rst_log_set @desc set rst log upload mode 更多...
 
OPERATE_RET tuya_regist_raw_dp_async_report_cb (RAW_DP_ASYNC_REPT_CB cb)
 tuya_regist_dp_async_report_cb @desc regist callback fucntion for dp async report. 更多...
 
OPERATE_RET tuya_report_dp_async (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt, IN TY_DP_REPT_PARAM_ASYNC *param)
 tuya_report_dp_async @desc report dp info a-synced. 更多...
 
OPERATE_RET tuya_report_dp_raw (IN CONST CHAR_T *dev_id, IN CONST BYTE_T dpid, IN CONST BYTE_T *data, IN CONST UINT_T len, IN TY_DP_REPT_PARAM_SYNC *param, IN CONST BOOL_T is_async)
 tuya_report_dp_raw @desc report dp raw info synced. 更多...
 
OPERATE_RET tuya_report_dp_sync (IN CONST CHAR_T *dev_id, IN CONST TY_OBJ_DP_S *dp_data, IN CONST UINT_T cnt, IN TY_DP_REPT_PARAM_SYNC *param)
 tuya_report_dp_sync @desc report dp info status info synced. 更多...
 

详细描述

作者
tuya
版本
1.0.0
日期
2021-01-11

函数说明

◆ dev_query_dp_json_async()

OPERATE_RET dev_query_dp_json_async ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_query_dp_json_async @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ dev_query_dp_json_async_force()

OPERATE_RET dev_query_dp_json_async_force ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_query_dp_json_async_force @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ dev_report_dp_json_async()

OPERATE_RET dev_report_dp_json_async ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_report_dp_json_async @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ dev_report_dp_json_async_force()

OPERATE_RET dev_report_dp_json_async_force ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_report_dp_json_async_force @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ dev_report_dp_raw_sync_extend()

OPERATE_RET dev_report_dp_raw_sync_extend ( IN CONST CHAR_T *  dev_id,
IN CONST BYTE_T  dpid,
IN CONST BYTE_T *  data,
IN CONST UINT_T  len,
IN CONST UINT_T  timeout,
IN CONST BOOL_T  enable_auto_retrans 
)

dev_report_dp_raw_sync_extend @desc report dp raw info synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dpidraw dp id
[in]dataraw data
[in]lenlen of raw data
[in]timeoutfunction blocks until timeout seconds
[in]enable_auto_retrans
返回
OPRT_OK: success Other: fail

◆ dev_report_dp_raw_sync_extend_with_time()

OPERATE_RET dev_report_dp_raw_sync_extend_with_time ( IN CONST CHAR_T *  dev_id,
IN CONST BYTE_T  dpid,
IN CONST BYTE_T *  data,
IN CONST UINT_T  len,
IN CONST UINT_T  timeout,
IN CONST BOOL_T  enable_auto_retrans,
IN CONST CHAR_T *  time_str 
)

dev_report_dp_raw_sync_extend_with_time @desc report dp raw info synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dpidraw dp id
[in]dataraw data
[in]lenlen of raw data
[in]timeoutfunction blocks until timeout seconds
[in]enable_auto_retrans
[in]time_str
返回
OPRT_OK: success Other: fail

◆ dev_report_dp_stat_sync_extend()

OPERATE_RET dev_report_dp_stat_sync_extend ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt,
IN CONST UINT_T  timeout,
IN CONST BOOL_T  enable_auto_retrans 
)

dev_report_dp_stat_sync_extend @desc: report dp status info synced. if time_stamp==0, time_stamp = time of msg arrival of the server

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp status array header
[in]cntdp status array count
[in]timeoutfunction blocks until timeout seconds
[in]enable_auto_retrans
返回
OPRT_OK: success Other: fail

◆ dev_sync_dp_json_async()

OPERATE_RET dev_sync_dp_json_async ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_sync_dp_json_async @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ dev_sync_dp_json_async_force()

OPERATE_RET dev_sync_dp_json_async_force ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt 
)

dev_sync_dp_json_async_force @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
返回
OPRT_OK: success Other: fail

◆ tuya_iot_app_cbs_init()

VOID tuya_iot_app_cbs_init ( IN CONST TY_IOT_APP_CBS_S app_cbs)

tuya_iot_app_cbs_init

参数
[in]app_cbs
返回

◆ tuya_iot_book_additional_topic()

OPERATE_RET tuya_iot_book_additional_topic ( IN CHAR_T *  topic)

tuya_iot_book_additional_topic @desc subscribe additional topic

返回
OPRT_OK: success Other: fail

◆ tuya_iot_book_wakeup_topic()

OPERATE_RET tuya_iot_book_wakeup_topic ( VOID  )

tuya_iot_book_wakeup_topic @desc unscribe mqtt msg topic and subscribe wakeup topic

返回
OPRT_OK: success Other: fail

◆ tuya_iot_custom_data_report_async()

OPERATE_RET tuya_iot_custom_data_report_async ( IN CONST BYTE_T *  data,
IN CONST INT_T  len,
IN CONST CHAR_T *  topic,
IN CONST BYTE_T  qos,
IN CONST UINT_T  timeout 
)

tuya_iot_custom_data_report_async

参数
[in]data
[in]len
[in]topic
[in]qos
[in]timeout
返回
OPERATE_RET

◆ tuya_iot_custom_data_report_sync()

OPERATE_RET tuya_iot_custom_data_report_sync ( IN CONST BYTE_T *  data,
IN CONST INT_T  len,
IN CONST CHAR_T *  topic,
IN CONST BYTE_T  qos,
IN CONST UINT_T  timeout 
)

tuya_iot_custom_data_report_sync

参数
[in]data
[in]len
[in]topic
[in]qos
[in]timeout
返回
OPERATE_RET

◆ tuya_iot_dev_upgd_progress_with_remain_time()

OPERATE_RET tuya_iot_dev_upgd_progress_with_remain_time ( IN CONST UINT_T  percent,
IN CONST CHAR_T *  devid,
IN CONST DEV_TYPE_T  tp,
IN CONST UINT_T  remain_time 
)

tuya_iot_dev_upgd_progress_with_remain_time

参数
[in]percent
[in]devid
[in]tp
[in]remain_time
返回
OPERATE_RET

◆ tuya_iot_dev_upgd_result_report()

OPERATE_RET tuya_iot_dev_upgd_result_report ( IN CONST CHAR_T *  dev_id,
IN CONST DEV_TYPE_T  type,
IN CONST INT_T  result 
)

tuya_iot_dev_upgd_result_report

参数
[in]dev_id
[in]type
[in]result
返回
OPERATE_RET

◆ tuya_iot_dp_low_power_query()

OPERATE_RET tuya_iot_dp_low_power_query ( IN CONST UCHAR_T *  dps,
IN CONST UINT_T  cnt,
OUT TY_RECV_OBJ_DP_S **  obj_dps,
OUT TY_RECV_MULTI_RAW_DP_S **  raw_dps 
)

tuya_iot_dp_low_power_query

参数
[in]dpsdata of DP
[in]cntcount of DP
[out]obj_dpsget object type DP
[out]raw_dpsget raw type DP
返回

◆ tuya_iot_get_active_stat()

BYTE_T tuya_iot_get_active_stat ( VOID  )

tuya_iot_get_active_stat

返回

◆ tuya_iot_get_custom_cfg()

OPERATE_RET tuya_iot_get_custom_cfg ( IN CONST TY_CUSTOM_CFG_E  type,
OUT CHAR_T **  pp_cfg_str 
)

tuya_iot_get_custom_cfg

参数
[in]type
[out]pp_cfg_str
返回
OPERATE_RET

◆ tuya_iot_get_dp_desc()

DP_DESC_IF_S * tuya_iot_get_dp_desc ( IN CONST CHAR_T *  dev_id,
IN CONST BYTE_T  dpid 
)

tuya_iot_get_dp_desc @desc get dp info of a sub-device and a dp id

参数
[in]dev_idsub-device id
[in]dpiddp id
返回
(DP_DESC_IF_S *): success NULL: fail

◆ tuya_iot_get_dp_prop_value()

DP_PROP_VALUE_U * tuya_iot_get_dp_prop_value ( IN CONST CHAR_T *  dev_id,
IN CONST BYTE_T  dpid 
)

tuya_iot_get_dp_prop_value @desc get dp value of a sub-device and a dp id

参数
[in]dev_idsub-device id
[in]dpiddp id
返回
(DP_PROP_VALUE_U *): success NULL: fail

◆ tuya_iot_get_gw_id()

CHAR_T * tuya_iot_get_gw_id ( VOID  )

tuya_iot_get_gw_id

返回
device id

◆ tuya_iot_get_heartbeat_data()

OPERATE_RET tuya_iot_get_heartbeat_data ( INOUT BYTE_T *  heartbeat_data_arr,
INOUT UINT_T *  p_len 
)

tuya_iot_get_heartbeat_data @desc get mqtt heartbeat string pattern

参数
[in/out]heartbeat_data_arr: heartbeat string arr
[in/out]p_len: heartbeat string len
返回
OPRT_OK: success Other: fail

◆ tuya_iot_get_heartbeat_interval()

INT_T tuya_iot_get_heartbeat_interval ( VOID  )

tuya_iot_get_heartbeat_interval @desc get mqtt heartbeat interval

返回
interval value

◆ tuya_iot_get_location_info()

OPERATE_RET tuya_iot_get_location_info ( INOUT TY_LOCATION_INFO_S p_location)

tuya_iot_get_location_info

参数
[in]p_location
返回
OPERATE_RET

◆ tuya_iot_get_mqtt_socket_fd()

INT_T tuya_iot_get_mqtt_socket_fd ( VOID  )

tuya_iot_get_mqtt_socket_fd @desc get curr mqtt socket fd

返回
mqtt socket fd

◆ tuya_iot_get_os_adapt_info()

CHAR_T * tuya_iot_get_os_adapt_info ( VOID_T  )

tuya_iot_get_os_adapt_info

返回
os adapter information

◆ tuya_iot_get_region_info()

OPERATE_RET tuya_iot_get_region_info ( INOUT TY_IOT_REGION_INFO_S p_region_info)

tuya_iot_get_region_info

参数
[in/out]p_region_info
返回
OPERATE_RET

◆ tuya_iot_get_sdk_info()

CHAR_T * tuya_iot_get_sdk_info ( VOID  )

tuya_iot_get_sdk_info

返回
sdk information

◆ tuya_iot_get_wakeup_data()

OPERATE_RET tuya_iot_get_wakeup_data ( INOUT BYTE_T *  wakeup_data_arr,
INOUT UINT_T *  p_len 
)

tuya_iot_get_wakeup_data @desc get mqtt wakeup string pattern

参数
[in/out]wakeup_data_arr: wakeup string arr
[in/out]p_len: wakeup string len
返回
OPRT_OK: success Other: fail

◆ tuya_iot_ignore_upgrade_set()

VOID tuya_iot_ignore_upgrade_set ( IN CONST BOOL_T  ignore)

tuya_iot_ignore_upgrade_set @desc set rst log upload mode

参数
[in]ignore
返回
none
注解
must call first

◆ tuya_iot_init_params()

OPERATE_RET tuya_iot_init_params ( IN CONST CHAR_T *  fs_storge_path,
IN CONST TY_INIT_PARAMS_S p_param 
)

TuyaOS system service init

参数
[in]fs_storge_pathStorge path of KV database(Linux only)
[in]p_paramExtra init params,
参见
TY_INIT_PARAMS_S
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_iot_kv_flash_init_param()

OPERATE_RET tuya_iot_kv_flash_init_param ( IN CONST CHAR_T *  fs_storge_path)

tuya_iot_kv_flash_init_param @desc init kv flash

参数
[in]fs_storge_pathfilesystem read write storge path (if os have no fs,then fs_storge_path is invalid)
返回
OPRT_OK: success Other: fail

◆ tuya_iot_map_cleaner_upload_buffer()

OPERATE_RET tuya_iot_map_cleaner_upload_buffer ( IN CONST INT_T  map_id,
IN CONST BYTE_T *  buffer,
IN CONST UINT_T  len,
IN CONST CHAR_T *  cloud_file_name,
IN CONST UP_MAP_TYPE_E  map_type 
)

tuya_iot_map_cleaner_upload_buffer @desc sweeper function. upload cleaner map info

参数
[in]map_id
[in]buffer
[in]len
[in]cloud_file_name
[in]map_type
返回
OPERATE_RET

◆ tuya_iot_map_cleaner_upload_file()

OPERATE_RET tuya_iot_map_cleaner_upload_file ( IN CONST INT_T  map_id,
IN CONST CHAR_T *  local_file_name,
IN CONST CHAR_T *  cloud_file_name,
IN CONST UP_MAP_TYPE_E  map_type 
)

tuya_iot_map_cleaner_upload_file @desc sweeper function. upload cleaner map info

参数
[in]map_id
[in]local_file_name
[in]cloud_file_name
[in]map_type
返回
OPERATE_RET

◆ tuya_iot_map_record_upload_buffer()

OPERATE_RET tuya_iot_map_record_upload_buffer ( IN CONST INT_T  map_id,
IN CONST BYTE_T *  buffer,
IN CONST UINT_T  len,
IN CONST CHAR_T *  descript 
)

tuya_iot_map_record_upload_buffer @desc sweeper function. upload record map info

参数
[in]map_id
[in]buffer
[in]len
[in]descript
返回
OPERATE_RET

◆ tuya_iot_map_record_upload_buffer_with_filename()

OPERATE_RET tuya_iot_map_record_upload_buffer_with_filename ( IN CONST INT_T  map_id,
IN CONST BYTE_T *  buffer,
IN CONST UINT_T  len,
IN CONST CHAR_T *  cloud_file_name,
IN CONST CHAR_T *  descript 
)

tuya_iot_map_record_upload_buffer_with_filename @desc sweeper function. upload record map info

参数
[in]map_id
[in]buffer
[in]len
[in]cloud_file_name
[in]descript
返回
OPERATE_RET

◆ tuya_iot_media_data_report()

OPERATE_RET tuya_iot_media_data_report ( IN CONST FLOW_BODY_ST dt_body,
IN CONST UINT_T  timeout 
)

tuya_iot_media_data_report

参数
[in]dt_bodymedia data
[in]timeoutneed report time
返回
OPERATE_RET
警告
please dont use tuya_iot_media_data_report and tuya_iot_media_data_report_v2 in one application

◆ tuya_iot_media_data_report_v2()

OPERATE_RET tuya_iot_media_data_report_v2 ( IN CONST FLOW_BODY_V2_ST dt_body,
IN CONST UINT_T  timeout 
)

tuya_iot_media_data_report_v2

参数
[in]dt_bodymedia data version 2
[in]timeoutneed report time
返回
OPERATE_RET

@waring please dont use tuya_iot_media_data_report and tuya_iot_media_data_report_v2 in one application

◆ tuya_iot_mqtt_disconnect()

VOID tuya_iot_mqtt_disconnect ( VOID  )

tuya_iot_mqtt_disconnect @desc force disconnect MQTT

返回
none
注解
must call first

◆ tuya_iot_mqtt_restart()

VOID tuya_iot_mqtt_restart ( VOID  )

tuya_iot_mqtt_restart @desc restart MQTT

返回
注解
must call first

◆ tuya_iot_oem_set()

VOID tuya_iot_oem_set ( IN CONST BOOL_T  oem)

tuya_iot_oem_set @desc set oem mode

参数
[in]oem
返回
none

◆ tuya_iot_refuse_upgrade()

OPERATE_RET tuya_iot_refuse_upgrade ( IN CONST FW_UG_S fw,
IN CONST CHAR_T *  dev_id 
)

tuya_iot_refuse_upgrade

参数
[in]fw
[in]dev_id
返回
OPERATE_RET

◆ tuya_iot_regist_dp_rept_cb()

OPERATE_RET tuya_iot_regist_dp_rept_cb ( IN DP_REPT_HADLE_CB_S dp_rept_cbs)

tuya_iot_regist_dp_rept_cb

参数
[in]dp_rept_cbs
返回
OPERATE_RET

◆ tuya_iot_release_custom_cfg()

OPERATE_RET tuya_iot_release_custom_cfg ( IN CHAR_T *  p_cfg_str)

tuya_iot_release_custom_cfg

参数
[in]p_cfg_str
返回
OPERATE_RET

◆ tuya_iot_reset_upgrade_detect_timer()

OPERATE_RET tuya_iot_reset_upgrade_detect_timer ( IN CONST INT_T  time_ms)

tuya_iot_reset_upgrade_detect_timer @desc reset the upgrade detect time

参数
[in]time_msthe time you want start the detect
返回
OPRT_OK: success Other: fail

◆ tuya_iot_send_custom_mqtt_msg()

OPERATE_RET tuya_iot_send_custom_mqtt_msg ( IN CONST UINT_T  protocol,
IN CONST BYTE_T *  p_data 
)

tuya_iot_send_custom_mqtt_msg @desc send a custom protocol mqtt msg

参数
protocolmqtt protocol
p_datamqtt msg
返回
OPRT_OK: success Other: fail

◆ tuya_iot_send_mqtt_msg_with_topic()

OPERATE_RET tuya_iot_send_mqtt_msg_with_topic ( IN CONST CHAR_T *  topic,
IN CONST UINT_T  protocol,
IN CONST BYTE_T *  p_data 
)

tuya_iot_send_mqtt_msg_with_topic @desc send a custom protocol mqtt msg to topic

参数
topicmqtt topic
protocolmqtt protocol
p_datamqtt msg
返回
OPRT_OK: success Other: fail

◆ tuya_iot_set_log_attr()

OPERATE_RET tuya_iot_set_log_attr ( IN CONST INT_T  log_level)

tuya_iot_set_log_attr

参数
[in]log_level
返回
OPERATE_RET

◆ tuya_iot_set_log_bool_time()

OPERATE_RET tuya_iot_set_log_bool_time ( BOOL_T  if_ms_level)

tuya_iot_set_log_bool_time

参数
[in]if_ms_level
返回
OPERATE_RET

◆ tuya_iot_set_udf_parameter()

OPERATE_RET tuya_iot_set_udf_parameter ( IN CONST CHAR_T *  udf)

tuya_iot_set_udf_parameter @desc set user defined funtions

参数
[in]udfuser defined funtions(json), max length: 255
返回
OPRT_OK: success Other: fail
注解
call before init

◆ tuya_iot_upgrade_dev_notify()

OPERATE_RET tuya_iot_upgrade_dev_notify ( IN CONST CHAR_T *  devid,
IN CONST FW_UG_S fw,
IN CONST GET_FILE_DATA_CB  get_file_cb,
IN CONST UPGRADE_NOTIFY_CB  upgrd_nofity_cb,
IN CONST PVOID_T  pri_data,
BOOL_T  notify,
UINT_T  download_buf_size 
)

tuya_iot_upgrade_dev_notify @desc upgrage sub-device/soc/mcu firmware

参数
[in]devidif upgrade sub-device, then devid = sub-device_id if upgrade soc/mcu, then devid = NULL
[in]fwfirmware info
[in]get_file_cbdownload content storage callback
[in]upgrd_nofity_cbfirmware download finish callback
[in]pri_dataprivate param of get_file_cb && upgrd_nofity_cb
[in]notify
[in]download_buf_size
返回
OPRT_OK: success Other: fail

◆ tuya_iot_upgrade_gw_notify()

OPERATE_RET tuya_iot_upgrade_gw_notify ( IN CONST FW_UG_S fw,
IN CONST GET_FILE_DATA_CB  get_file_cb,
IN CONST UPGRADE_NOTIFY_CB  upgrd_nofity_cb,
IN CONST PVOID_T  pri_data,
BOOL_T  notify,
UINT_T  download_buf_size 
)

tuya_iot_upgrade_gw_notify @desc upgrage gateway firmware

参数
[in]fwfirmware info
[in]get_file_cbdownload content storage callback
[in]upgrd_nofity_cbfirmware download finish callback
[in]pri_dataprivate param of get_file_cb && upgrd_nofity_cb
[in]notifynotify app the upgrade status
[in]download_buf_sizemax download buffer size when downloading
返回
OPRT_OK: success Other: fail

◆ tuya_iot_upload_incre_data()

OPERATE_RET tuya_iot_upload_incre_data ( IN CONST USHORT_T  map_id,
IN CONST UINT_T  offset,
IN CONST BYTE_T *  pbuffer,
IN CONST USHORT_T  buf_len 
)

‍***********************************************************

tuya_iot_upload_incre_data

参数
[in]map_idEach map has an Id
[in]offsetMap data offset
[in]pbufferMap data cache pointer
[in]buf_lenMap data cache length
返回
OPERATE_RET

◆ tuya_iot_upload_rst_log_set()

VOID tuya_iot_upload_rst_log_set ( IN CONST BOOL_T  upload)

tuya_iot_upload_rst_log_set @desc set rst log upload mode

参数
[in]upload
返回
none
注解
must call first

◆ tuya_regist_raw_dp_async_report_cb()

OPERATE_RET tuya_regist_raw_dp_async_report_cb ( RAW_DP_ASYNC_REPT_CB  cb)

tuya_regist_dp_async_report_cb @desc regist callback fucntion for dp async report.

参数
[in]cbcallback function
返回
OPRT_OK: success Other: fail

◆ tuya_report_dp_async()

OPERATE_RET tuya_report_dp_async ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt,
IN TY_DP_REPT_PARAM_ASYNC param 
)

tuya_report_dp_async @desc report dp info a-synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
[in]parareport param
返回
OPRT_OK: success Other: fail

◆ tuya_report_dp_raw()

OPERATE_RET tuya_report_dp_raw ( IN CONST CHAR_T *  dev_id,
IN CONST BYTE_T  dpid,
IN CONST BYTE_T *  data,
IN CONST UINT_T  len,
IN TY_DP_REPT_PARAM_SYNC param,
IN CONST BOOL_T  is_async 
)

tuya_report_dp_raw @desc report dp raw info synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dpidraw dp id
[in]dataraw data
[in]lenlen of raw data
[in]paramreport params
[in]is_asyncis async report
返回
OPRT_OK: success Other: fail

◆ tuya_report_dp_sync()

OPERATE_RET tuya_report_dp_sync ( IN CONST CHAR_T *  dev_id,
IN CONST TY_OBJ_DP_S dp_data,
IN CONST UINT_T  cnt,
IN TY_DP_REPT_PARAM_SYNC param 
)

tuya_report_dp_sync @desc report dp info status info synced.

参数
[in]dev_idif sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL
[in]dp_datadp array header
[in]cntdp array count
[in]parareport param
返回
OPRT_OK: success Other: fail