eive-obsw/bsp_q7s/memory/LocalParameterHandler.cpp

23 lines
729 B
C++
Raw Normal View History

2023-02-13 11:28:27 +01:00
#include "LocalParameterHandler.h"
#include <fsfw/serviceinterface/ServiceInterface.h>
LocalParameterHandler::LocalParameterHandler(std::string sdRelativeName, SdCardMountedIF* sdcMan)
: sdRelativeName(sdRelativeName), sdcMan(sdcMan) {}
LocalParameterHandler::~LocalParameterHandler() {
}
ReturnValue_t LocalParameterHandler::initialize() {
std::string mountPrefix = sdcMan->getCurrentMountPrefix();
std::string fullname = mountPrefix + "/" + sdRelativeName;
setFullName(fullname);
ReturnValue_t result = readJsonFile();
if (result != returnvalue::OK) {
sif::warning << "LocalParameterHandler::initialize: Failed to read json file"
<< getFullName() << std::endl;
return result;
}
return returnvalue::OK;
}