task.h 806 B

123456789101112131415161718192021222324252627
  1. #ifndef __TASK_H
  2. #define __TASK_H
  3. #include "includes.h"
  4. #include "stm32f2xx.h"
  5. #include "radio.h"
  6. #include "gateway_message.h"
  7. //主要的数据处理线程
  8. #define DATA_TASK_PRIO 8
  9. #define DATA_STK_SIZE 2*1024
  10. #define GetCurrentTime() OSTimeGet()
  11. extern void data_task(void *pdata);
  12. extern tRadioDriver *Radio;
  13. /* 写入modbus寄存器 */
  14. void write_modbus_data(char* buf);
  15. /* 发送至mqtt */
  16. void send_mqtt(char*buf, int jsonCunt,char*pubJsonStringCopy);
  17. /* 比较data1与data2*/
  18. void find_difference(char* data1, char* data2, char* string);
  19. /* 读取设备数据 */
  20. int read_device_data(DEVICE_PARAMS *current_device,char* buf);
  21. void send_modbus_data(GATEWAY_PARAMS *get, char* buf, int jsonCunt, char*pubJsonStringCopy);
  22. void send_dlt645_data(GATEWAY_PARAMS *get, char* buf, int jsonCunt, char*pubJsonStringCopy);
  23. #endif