58 lines
1.3 KiB
C
58 lines
1.3 KiB
C
//
|
|
// Created by CFIF on 19.12.22.
|
|
//
|
|
|
|
#ifndef HVAC_VarsTabDumpOBSERVER_H
|
|
#define HVAC_VarsTabDumpOBSERVER_H
|
|
|
|
#include <StorageIO.h>
|
|
#include "VariablesTable.h"
|
|
#include "LoggerInterface.h"
|
|
|
|
typedef struct {
|
|
tLoggerInterface *logger;
|
|
tStorageInterface *interface;
|
|
tVariablesTable *trackableVarsTab;
|
|
uint32_t trackableGroup;
|
|
void *data;
|
|
size_t size;
|
|
|
|
bool health;
|
|
|
|
osMutexId_t access;
|
|
osMutexId_t accessDumper;
|
|
uint32_t dumpAfter;
|
|
uint32_t delay;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[256];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
} tVarsTabDumpObserver;
|
|
|
|
void VarsTabDumpObserver_Init(
|
|
tVarsTabDumpObserver *env,
|
|
tStorageInterface *interface,
|
|
uint32_t delay,
|
|
void *data,
|
|
size_t size,
|
|
tVariablesTable *VarsTab,
|
|
uint32_t trackableGroup
|
|
);
|
|
|
|
bool VarsTabDumpObserver_Load(tVarsTabDumpObserver *env);
|
|
|
|
bool VarsTabDumpObserver_Dump(tVarsTabDumpObserver *env);
|
|
|
|
void VarsTabDumpObserver_RequireDump(tVarsTabDumpObserver *env);
|
|
|
|
void VarsTabDumpObserver_StartThread(tVarsTabDumpObserver *env);
|
|
|
|
void VarsTabDumpObserver_StopThread(tVarsTabDumpObserver *env);
|
|
|
|
void VarsTabDumpObserver_Flush(tVarsTabDumpObserver *env);
|
|
|
|
#endif //HVAC_VarsTabDumpOBSERVER_H
|