added local parameter handler

This commit is contained in:
Jakob Meier
2023-02-21 14:13:46 +01:00
parent a13ae7abcc
commit 7dae81c122
9 changed files with 241 additions and 122 deletions

View File

@ -15,7 +15,6 @@
#include <fsfw/storagemanager/StorageManagerIF.h>
#include <fsfw/tasks/ExecutableObjectIF.h>
#include <utility>
#include <sstream>
#include <string>
@ -25,6 +24,10 @@
#include "fsfw/parameters/ParameterHelper.h"
#include "mission/memory/NVMParameterBase.h"
static std::map<ParamIds, std::string> PARAM_KEY_MAP = {
{PARAM0, "Parameter0"},
{PARAM1, "Parameter1"},
};
/*
* Idea: This class is intended to be used as a subclass for the Core Controller.
* Its tasks is managing a configuration JSON file containing config values important for various
@ -51,12 +54,12 @@ class GlobalConfigHandler : public SystemObject,
ReturnValue_t initialize();
template <typename T>
ReturnValue_t setConfigFileValue(std::string paramName, T data);
ReturnValue_t setConfigFileValue(ParamIds paramID, T data);
template <typename T>
ReturnValue_t getConfigFileValue(std::string paramName, T& data);
ReturnValue_t getConfigFileValue(ParamIds paramID, T& data);
ReturnValue_t resetConfigFile();
ReturnValue_t writeConfigFile();
ReturnValue_t ResetConfigFile();
ReturnValue_t WriteConfigFile();
std::string getConfigFileName();
private:
@ -68,7 +71,7 @@ class GlobalConfigHandler : public SystemObject,
ReturnValue_t setConfigFileName(std::string configFileName);
ReturnValue_t readConfigFile();
ReturnValue_t ReadConfigFile();
MessageQueueIF* commandQueue;
};