SMART_COMPONENTS_CLI/ComandLineInterface.h

73 lines
1.7 KiB
C

//
// Created by zemon on 20.02.24.
//
#ifndef HEAVY_TERMINAL_COMANDLINEINTERFACE_H
#define HEAVY_TERMINAL_COMANDLINEINTERFACE_H
#include "CliRedirectTable.h"
#include "ComandLineInterface.h"
#include "CmsisRtosThreadUtils.h"
#include "EraGlonassUveos_Dumper.h"
#include "CliCmd/CmsisReboot.h"
#include "CliCmd/Vars.h"
#include "CliCmd/SerialBridge.h"
#include "CliCmd/FlipSetting.h"
#include "CliCmd/MsdTable.h"
#include "CliCmd/EcoolSimulation.h"
#include "CliCmd/NetGsmUpDown.h"
typedef struct {
struct {
char data[128];
size_t length;
} rxCommandBuffer;
char res[64];
tSerialPortIO *serialCommandPort;
tSerialPortIO *serialSnifferPort;
tVariablesTable *externTable;
struct {
tCliRedirectItem commandPrefixes[10];
uint8_t cmdRxLine[512];
} mem;
tCliRedirectTable redirectTable;
tCliCmd cmd;
struct {
tCliCmdSerialBridge serialBridge;
tFlipSetting flipSet;
tCliCmdMsdTable msdTab;
tEcoolSimulation uvEmrgSimInter;
tAddFunc addFunc;
} sub;
tStaticThreadBlock(1024) thread;
} tCli;
void Cli_Init(
tCli *env,
tSerialPortIO *serial,
tSerialPortIO *serialSniffer,
tVariablesTable *extTable,
tCarFlipDetection *tFlip,
tEraGlonassMsdTable *msdTable,
tUveosEmergencySimulationInterface *uvEmrgSimInter,
tUserInputButtonWatcher *userIntButtWatch,
tEraGlonassUveosDumperInterface *dumperInterface,
tPowerManagement *power,
tGsmWithGnss *gsmWithGnss,
tEraGlonassUveos *uveos,
tAccelCoor *tAccelCoor,
tCarCrashDetection *carCrashDetection
);
void Cli_StartThread(tCli *env);
#endif //HEAVY_TERMINAL_COMANDLINEINTERFACE_H