1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef __TASK_H
- #define __TASK_H
- #include "stm32f2xx.h"
- #include "gateway_message.h"
- #include "mqttclient.h"
- #include "FreeRTOS.h"
- #include "task.h"
- uint32_t my_pow(int x,int y);
- //主要的数据处理线程
- #define DATA_TASK_PRIO 3
- #define DATA_STK_SIZE 2*1024
- #define GetCurrentTime() xTaskGetTickCount()
- extern void data_task(void const * argument);
- /* 写入modbus寄存器 */
- void write_modbus_data(char* cJSONstring);
- /* 发送至mqtt */
- void send_mqtt(char*buf);
- /* 读取设备数据 */
- int read_device_data(DEVICE_PARAMS *current_device,char* string);
- ///* 读取设备数据 */
- //int read_device_data1(DEVICE_PARAMS *current_device,char* buf);
- //int read_device_data2(DEVICE_PARAMS *current_device,char* buf);
- typedef struct __JSON_CMD{
- uint8_t deviceId[25];
- uint8_t identifier[20];
- uint8_t messageId[20];
- uint8_t parameter;
- uint8_t action[1];
-
- }JSON_CMD;
- #endif
|