GONEC_ARTERY_Modem_Main/Inc/ModemLog.h

66 lines
1.2 KiB
C

//
// Created by cfif on 18.02.23.
//
#ifndef GONEC_LOG_MODEMLOG_H
#define GONEC_LOG_MODEMLOG_H
#include <SerialPortIO.h>
#include <DeviceStorageIni.h>
#include <Gnss.h>
#include "ModemGonec.h"
#include "fs_interface.h"
#include "RtcIO.h"
#include "ModemGnss.h"
#include "httpd_types.h"
#include "file_logger.h"
#include <DeviceStorageIni.h>
typedef struct {
tSerialPortIO *io;
// tLoggerInterface *logger;
// tAtCmd modemAt;
tFs *fs;
tRtcIO *rtcIO;
tDeviceStorageIni *store;
osMutexId_t access;
// struct {
// uint8_t modemRx[2048];
// uint8_t modemTx[2048];
// } mem;
struct {
osThreadId_t id;
uint32_t stack[4096];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread;
char filename[64];
char buf[24];
uint8_t bufLog[512];
time_t timestampWriteFileLogger;
} tModemMainLog;
void ModemMainLog_Init(
tModemMainLog *env,
tDeviceStorageIni *store,
tSerialPortIO *io,
tRtcIO *rtcIO,
tFs *fs,
osMutexId_t access_log
);
void ModemMainLog_StartThread(tModemMainLog *env);
uint32_t getStateWriteLog2(tModemMainLog *env);
#endif //GONEC_LOG_MODEMLOG_H