TuyaOS
|
#include "tuya_cloud_types.h"
#include "tuya_cloud_com_defs.h"
宏定义 | |
#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_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 更多... | |
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 更多... | |
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. 更多... | |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dpid | raw dp id |
[in] | data | raw data |
[in] | len | len of raw data |
[in] | timeout | function blocks until timeout seconds |
[in] | enable_auto_retrans |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dpid | raw dp id |
[in] | data | raw data |
[in] | len | len of raw data |
[in] | timeout | function blocks until timeout seconds |
[in] | enable_auto_retrans | |
[in] | time_str |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp status array header |
[in] | cnt | dp status array count |
[in] | timeout | function blocks until timeout seconds |
[in] | enable_auto_retrans |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
VOID tuya_iot_app_cbs_init | ( | IN CONST TY_IOT_APP_CBS_S * | app_cbs | ) |
tuya_iot_app_cbs_init
[in] | app_cbs |
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
[in] | data | |
[in] | len | |
[in] | topic | |
[in] | qos | |
[in] | timeout |
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 | ( | 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 | ( | 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 | ( | 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] | dps | data of DP |
[in] | cnt | count of DP |
[out] | obj_dps | get object type DP |
[out] | raw_dps | get raw type DP |
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
[in] | type | |
[out] | pp_cfg_str |
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_id | sub-device id |
[in] | dpid | dp id |
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_id | sub-device id |
[in] | dpid | dp id |
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
[in/out] | heartbeat_data_arr: heartbeat string arr |
[in/out] | p_len: heartbeat string len |
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
[in] | p_location |
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
[in/out] | p_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
[in/out] | wakeup_data_arr: wakeup string arr |
[in/out] | p_len: wakeup string len |
VOID tuya_iot_ignore_upgrade_set | ( | IN CONST BOOL_T | ignore | ) |
tuya_iot_ignore_upgrade_set @desc set rst log upload mode
[in] | ignore |
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_path | Storge path of KV database(Linux only) |
[in] | p_param | Extra init params, |
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_path | filesystem read write storge path (if os have no fs,then fs_storge_path is invalid) |
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 | ( | 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 | ( | 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 | ( | 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 | ( | IN CONST FLOW_BODY_ST * | dt_body, |
IN CONST UINT_T | timeout | ||
) |
tuya_iot_media_data_report
[in] | dt_body | media data |
[in] | timeout | need report time |
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_body | media data version 2 |
[in] | timeout | need report time |
@waring please dont use tuya_iot_media_data_report and tuya_iot_media_data_report_v2 in one application
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
[in] | oem |
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 | ( | 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 | ( | IN CHAR_T * | p_cfg_str | ) |
tuya_iot_release_custom_cfg
[in] | p_cfg_str |
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_ms | the time you want start the detect |
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
protocol | mqtt protocol |
p_data | 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
topic | mqtt topic |
protocol | mqtt protocol |
p_data | mqtt msg |
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 | ( | BOOL_T | if_ms_level | ) |
tuya_iot_set_log_bool_time
[in] | if_ms_level |
OPERATE_RET tuya_iot_set_udf_parameter | ( | IN CONST CHAR_T * | udf | ) |
tuya_iot_set_udf_parameter @desc set user defined funtions
[in] | udf | user defined funtions(json), max length: 255 |
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] | devid | if upgrade sub-device, then devid = sub-device_id if upgrade soc/mcu, then devid = NULL |
[in] | fw | firmware info |
[in] | get_file_cb | download content storage callback |
[in] | upgrd_nofity_cb | firmware download finish callback |
[in] | pri_data | private param of get_file_cb && upgrd_nofity_cb |
[in] | notify | |
[in] | download_buf_size |
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] | fw | firmware info |
[in] | get_file_cb | download content storage callback |
[in] | upgrd_nofity_cb | firmware download finish callback |
[in] | pri_data | private param of get_file_cb && upgrd_nofity_cb |
[in] | notify | notify app the upgrade status |
[in] | download_buf_size | max download buffer size when downloading |
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_id | Each map has an Id |
[in] | offset | Map data offset |
[in] | pbuffer | Map data cache pointer |
[in] | buf_len | Map data cache length |
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 |
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] | cb | callback function |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
[in] | para | report param |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dpid | raw dp id |
[in] | data | raw data |
[in] | len | len of raw data |
[in] | param | report params |
[in] | is_async | is async report |
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_id | if sub-device, then devid = sub-device_id if gateway/soc/mcu, then devid = NULL |
[in] | dp_data | dp array header |
[in] | cnt | dp array count |
[in] | para | report param |