60 lines
1.4 KiB
C++
60 lines
1.4 KiB
C++
#ifndef SYSTEMCONFIG_H
|
|
#define SYSTEMCONFIG_H
|
|
|
|
#include "CANDevice.h"
|
|
#include <QList>
|
|
#include <QFile>
|
|
#include <QDataStream>
|
|
#include "CANDeviceConfig.h"
|
|
#include "CloudParams.h"
|
|
#include "CANWatchdogConfig.h"
|
|
#include "GeneralSystemParams.h"
|
|
|
|
#define OTARCIK_CURRENT_CONFIG_FILE_VERSION 0x01
|
|
#define OTARCIK_CONFIG_FILE_MAGIC_NBR 0xDEADBEEF
|
|
//class CCANDeviceConfig;
|
|
|
|
class CSystemConfig
|
|
{
|
|
public:
|
|
CSystemConfig();
|
|
~CSystemConfig();
|
|
|
|
int LoadConfig(/*QList<CCANDevice*> *DevicesList*/);
|
|
int SaveConfig(/*QList<CCANDeviceConfig*> *DevicesConfigList*/);
|
|
int CreateEmptyConfig();
|
|
|
|
|
|
int SetCANDevicesConfigList(QList<CCANDeviceConfig*> *DevicesConfigList);
|
|
QList<CCANDeviceConfig*> *GetCANDevicesConfigList();
|
|
|
|
CCloudParams *GetCloudParams();
|
|
int SetCloudParams(CCloudParams *CloudParams);
|
|
CGeneralSystemParams *GetGeneralSystemSettings();
|
|
int SetGeneralSystemParams(CGeneralSystemParams *GeneralParams);
|
|
|
|
|
|
|
|
|
|
//Can devices configs
|
|
QList<CCANDeviceConfig*> mCANDeviceConfigList;
|
|
|
|
//Cloud interface config
|
|
CCloudParams mCloudLoggingParams;
|
|
|
|
//Misc general system settings
|
|
CGeneralSystemParams mGeneralSystemParams;
|
|
|
|
//CAN Module watchdog settings
|
|
CCANWatchdogConfig mCANWatchdogParams;
|
|
CCANWatchdogConfig *GetCANWatchdogConfig();
|
|
int SetCANWatchdogConfig(CCANWatchdogConfig *Config);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SYSTEMCONFIG_H
|