HVAC_DEV_ComInt/Inc/ComInt.h

66 lines
1.4 KiB
C

//
// Created by ilya on 04.10.23.
//
#ifndef ERA_ELEMENT_2_COMINT_H
#define ERA_ELEMENT_2_COMINT_H
#include <SerialPortIO.h>
#include <XfcProtTable.h>
//#include <DeviceTestsTable.h>
//#include <DeviceStorageIni.h>
#include "XfcProtRespondent.h"
#include "ComIntCmd/Mandatory.h"
#include "ComIntCmd/SerialBridge.h"
#include "VersionsInfoTable.h"
#include "VariablesTable.h"
#include "cmsis_os2.h"
#include "FreeRTOS.h"
typedef struct {
tSerialPortIO *io;
struct {
tXfcProtProcessor table[16];
uint8_t rxArr[256];
uint8_t txArr[2048];
tSerialBridge serialBridge[8];
tVersionPair versions[3];
} memAlloc;
tXfcProtTable table;
tXfcProtRespondent service;
tSerialBridges serialBridges;
tVersionsInfoTable versionsTable;
struct {
tStringStatic board;
tStringStatic serialNumber;
tStringStatic firmware;
tStringStatic gsm;
} versions;
tComIntPing ping;
tString16 sn;
struct {
osThreadId_t id;
uint32_t stack[2048];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread;
} tComInt;
void ComInt_Init(
tComInt *env,
tSerialPortIO *io,
tVariablesTable *varsTab,
tSerialPortIO *gsmIo,
tSerialPortIO *gnssIo,
tSerialPortIO *cliIo,
tStringLink *currentModeName
);
void ComInt_StartThread(tComInt *env);
#endif //ERA_ELEMENT_2_COMINT_H