67 lines
1.5 KiB
C
67 lines
1.5 KiB
C
//
|
|
// Created by cfif on 04.10.2022.
|
|
//
|
|
|
|
#ifndef XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H
|
|
#define XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H
|
|
|
|
#include <SerialPortIO.h>
|
|
#include <XfcProtTable.h>
|
|
#include <DeviceTestsTable.h>
|
|
#include <DeviceStorage.h>
|
|
#include "XfcProtRespondent.h"
|
|
#include "ComIntCmd/Mandatory.h"
|
|
#include "ComIntCmd/SerialBridge.h"
|
|
#include "VersionsInfoTable.h"
|
|
#include "ComIntCmd/AccelCalibration.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;
|
|
tAccelCalibData accelCalibData;
|
|
|
|
struct {
|
|
tStringStatic board;
|
|
tStringStatic serialNumber;
|
|
tStringStatic firmware;
|
|
tStringStatic gsm;
|
|
} versions;
|
|
|
|
tComIntPing ping;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[2048];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
} tComInt;
|
|
|
|
void ComInt_Init(
|
|
tComInt *env,
|
|
tSerialPortIO *io,
|
|
tString16 *deviceId,
|
|
tVariablesTable *varsTab,
|
|
tDeviceTestsTable *tests,
|
|
tSerialPortIO *gsmIo,
|
|
tSerialPortIO *cliIo,
|
|
tSerialPortIO *gnssIo,
|
|
tStringLink *currentModeName,
|
|
tCarFlipDetection *flipDetect
|
|
);
|
|
|
|
void ComInt_StartThread(tComInt *env);
|
|
|
|
#endif //XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H
|