#include // // Created by 李建 on 2023/12/6. // #ifndef TEST_ACCESS_H #define TEST_ACCESS_H #include "gateway_defs.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include #define MQTT_CONNECTED BIT0 #define MQTT_DISCONNECTED BIT1 typedef struct { TaskHandle_t taskHandle; int32_t event_id; uint8_t return_code; } MQTT_t; typedef struct { char *topic; // 发布的主题 cJSON *data; // 上报的data字段 } publish_message_t; // device access the mqtt server _Noreturn void device_access_task(void *pv); /** * 设备上报状态 */ void sparrow_publish_status(publish_message_t message); /** * 设备上报事件 */ void sparrow_publish_event(publish_message_t message); /** * 设备上报指令响应 */ void sparrow_publish_command(publish_message_t message); #endif // TEST_ACCESS_H