Documentation
Includes
tuya_cloud_types.h
#include "tuya_cloud_types.h"
tuya_os_adapter.h
#include "tuya_os_adapter.h"
coap.h
#include "coap.h"
Macros
Marco _COAP_SERVER_H
#define _COAP_SERVER_H
Functions
Func ty_coap_server_start
OPERATE_RET ty_coap_server_start(OUT TY_COAP_SERVER_HANLDER *p_handler, IN CONST UINT_T port, ty_coap_init_resource_cb init_res_cb);
Func ty_coap_add_resource
OPERATE_RET ty_coap_add_resource(IN TY_COAP_SERVER_HANLDER handler, IN CONST CHAR_T *p_uri, \
coap_method_handler_t post_cb, coap_method_handler_t get_cb, \
coap_method_handler_t put_cb, coap_method_handler_t delete_cb );
Func ty_coap_send_custom_msg
OPERATE_RET ty_coap_send_custom_msg(IN TY_COAP_SERVER_HANLDER server_handler,
CHAR_T *url, UCHAR_T upload_mode, UCHAR_T msg_type,
CHAR_T *data, TY_COAP_OPTION_S *option_arr, UINT_T arr_size,
coap_response_handler_t handler);
Vars
Consts
Types
Typedefs
Typedef TY_COAP_SERVER_HANLDER
typedef PVOID_T TY_COAP_SERVER_HANLDER;
Typedef ty_coap_init_resource_cb
typedef OPERATE_RET (*ty_coap_init_resource_cb)(IN TY_COAP_SERVER_HANLDER handler);
Typedef TY_COAP_OPTION_S;
typedef struct
{
/** option type */
SHORT_T type;
/** option length */
UINT_T length;
/** option data */
CHAR_T *p_data;
}TY_COAP_OPTION_S;