46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
//
|
|
// Created by cfif on 18.04.23.
|
|
//
|
|
|
|
#ifndef GONEC_GSM_DEVICESTORAGEINI_H
|
|
#define GONEC_GSM_DEVICESTORAGEINI_H
|
|
|
|
#include "DeviceDataNonVolatile.h"
|
|
#include "DeviceDataRuntime.h"
|
|
//#include "JSONSettings.h"
|
|
#include "minIni.h"
|
|
#include "fs_interface.h"
|
|
#include "Settings.h"
|
|
|
|
typedef struct {
|
|
tLoggerInterface *logger;
|
|
tDeviceDataRuntime runtime;
|
|
tDeviceDataNonVolatile nvm;
|
|
|
|
int settingsCount;
|
|
const tSettings *settings;
|
|
osMutexId_t writeAccess;
|
|
tFs *fs;
|
|
const TCHAR *file_name_setup;
|
|
const TCHAR *file_name_counter;
|
|
|
|
} tDeviceStorageIni;
|
|
|
|
void DeviceStorageIni_Init(tDeviceStorageIni *env, const TCHAR *file_setup, const TCHAR *file_counter, tFs *fs, const tSettings *Settings, int SettingsCount);
|
|
|
|
void DeviceStorageSetupIni_Dump(tDeviceStorageIni *env);
|
|
void DeviceStorageSetupIni_Load(tDeviceStorageIni *env);
|
|
|
|
void DeviceStorageCounterIni_Dump(tDeviceStorageIni *env);
|
|
void DeviceStorageCounterIni_DumpRouting(tDeviceStorageIni *env);
|
|
void DeviceStorageCounterIni_DumpDist(tDeviceStorageIni *env);
|
|
void DeviceStorageCounterIni_DumpSos(tDeviceStorageIni *env);
|
|
void DeviceStorageCounterIni_Load(tDeviceStorageIni *env);
|
|
|
|
// Сохранение настроек во временные
|
|
void Nvm_To_RuntimeSettings(tDeviceStorageIni *env);
|
|
// Загрузка настроек из временных
|
|
void Runtime_To_NvmSettings(tDeviceStorageIni *env);
|
|
|
|
#endif //GONEC_GSM_DEVICESTORAGEINI_H
|