unittest builds now
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-09-29 13:20:05 +02:00
parent 26dc4ba56e
commit 1463963532
8 changed files with 29 additions and 27 deletions

View File

@ -13,13 +13,14 @@
#include "fsfw/serviceinterface/ServiceInterface.h"
MutexIF* GlobalConfigHandler::configLock = nullptr;
MutexIF* GlobalConfigHandler::CONFIG_LOCK = nullptr;
GlobalConfigHandler::GlobalConfigHandler(object_id_t objectId, std::string configFilePath)
: SystemObject(objectId),
NVMParameterBase(configFilePath),
commandQueue(QueueFactory::instance()->createMessageQueue(20)) {
if (configLock == nullptr) {
configLock = MutexFactory::instance()->createMutex();
if (CONFIG_LOCK == nullptr) {
CONFIG_LOCK = MutexFactory::instance()->createMutex();
}
}
ReturnValue_t GlobalConfigHandler::initialize() {
@ -59,12 +60,12 @@ ReturnValue_t GlobalConfigHandler::performOperation(uint8_t operationCode) {
ReturnValue_t GlobalConfigHandler::lockConfigFile() {
ReturnValue_t result = returnvalue::OK;
result = configLock->lockMutex(MutexIF::TimeoutType::WAITING, 10);
result = CONFIG_LOCK->lockMutex(MutexIF::TimeoutType::WAITING, 10);
return result;
}
ReturnValue_t GlobalConfigHandler::unlockConfigFile() {
ReturnValue_t result = returnvalue::OK;
result = configLock->unlockMutex();
result = CONFIG_LOCK->unlockMutex();
return result;
}