From 219c057fb9821b3b75805acb4b177b52e16d2f51 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 29 Dec 2020 14:08:48 +0100 Subject: [PATCH 1/4] added service 3 cmake support --- pus/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pus/CMakeLists.txt b/pus/CMakeLists.txt index 758c2629..c0e00448 100644 --- a/pus/CMakeLists.txt +++ b/pus/CMakeLists.txt @@ -5,6 +5,7 @@ target_sources(${LIB_FSFW_NAME} Service17Test.cpp Service1TelecommandVerification.cpp Service2DeviceAccess.cpp + Service3Housekeeping.cpp Service5EventReporting.cpp Service8FunctionManagement.cpp Service9TimeManagement.cpp From a5e20657c6eb22043c4313a00fd4c4f4bcf2e98a Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Thu, 14 Jan 2021 11:31:26 +0100 Subject: [PATCH 2/4] resolved merge conflicts --- datapoollocal/LocalPoolVariable.tpp | 55 ----------------------------- pus/CMakeLists.txt | 1 - 2 files changed, 56 deletions(-) diff --git a/datapoollocal/LocalPoolVariable.tpp b/datapoollocal/LocalPoolVariable.tpp index 7eea2a46..35de4ebd 100644 --- a/datapoollocal/LocalPoolVariable.tpp +++ b/datapoollocal/LocalPoolVariable.tpp @@ -32,37 +32,6 @@ inline ReturnValue_t LocalPoolVariable::read( template inline ReturnValue_t LocalPoolVariable::readWithoutLock() { -<<<<<<< HEAD - if(readWriteMode == pool_rwm_t::VAR_WRITE) { - object_id_t targetObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVector", - PoolVariableIF::INVALID_READ_WRITE_MODE, true, targetObjectId, - localPoolId); - return PoolVariableIF::INVALID_READ_WRITE_MODE; - } - - PoolEntry* poolEntry = nullptr; - ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); - if(result != RETURN_OK) { - object_id_t ownerObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVariable", result, - false, ownerObjectId, localPoolId); - return result; - } - - // Actually this should never happen.. - if(poolEntry->address == nullptr) { - result = PoolVariableIF::INVALID_POOL_ENTRY; - object_id_t ownerObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVariable", result, - false, ownerObjectId, localPoolId); - return result; - } - - this->value = *(poolEntry->address); - this->valid = poolEntry->valid; - return RETURN_OK; -======= if(readWriteMode == pool_rwm_t::VAR_WRITE) { object_id_t targetObjectId = hkManager->getCreatorObjectId(); reportReadCommitError("LocalPoolVector", @@ -94,7 +63,6 @@ inline ReturnValue_t LocalPoolVariable::readWithoutLock() { this->value = *(poolEntry->getDataPtr()); this->valid = poolEntry->getValid(); return RETURN_OK; ->>>>>>> upstream/mueller/master } template @@ -113,28 +81,6 @@ inline ReturnValue_t LocalPoolVariable::commit( template inline ReturnValue_t LocalPoolVariable::commitWithoutLock() { -<<<<<<< HEAD - if(readWriteMode == pool_rwm_t::VAR_READ) { - object_id_t targetObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVector", - PoolVariableIF::INVALID_READ_WRITE_MODE, false, targetObjectId, - localPoolId); - return PoolVariableIF::INVALID_READ_WRITE_MODE; - } - - PoolEntry* poolEntry = nullptr; - ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); - if(result != RETURN_OK) { - object_id_t ownerObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVariable", result, - false, ownerObjectId, localPoolId); - return result; - } - - *(poolEntry->address) = this->value; - poolEntry->valid = this->valid; - return RETURN_OK; -======= if(readWriteMode == pool_rwm_t::VAR_READ) { object_id_t targetObjectId = hkManager->getCreatorObjectId(); reportReadCommitError("LocalPoolVector", @@ -157,7 +103,6 @@ inline ReturnValue_t LocalPoolVariable::commitWithoutLock() { *(poolEntry->getDataPtr()) = this->value; poolEntry->setValid(this->valid); return RETURN_OK; ->>>>>>> upstream/mueller/master } template diff --git a/pus/CMakeLists.txt b/pus/CMakeLists.txt index c0e00448..758c2629 100644 --- a/pus/CMakeLists.txt +++ b/pus/CMakeLists.txt @@ -5,7 +5,6 @@ target_sources(${LIB_FSFW_NAME} Service17Test.cpp Service1TelecommandVerification.cpp Service2DeviceAccess.cpp - Service3Housekeeping.cpp Service5EventReporting.cpp Service8FunctionManagement.cpp Service9TimeManagement.cpp From d6b0af3be7a61ca2f00a1158b770d8a0a9c99878 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Thu, 14 Jan 2021 12:21:40 +0100 Subject: [PATCH 3/4] moved read helper into correct folder --- {datapoollocal => datapool}/PoolReadHelper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {datapoollocal => datapool}/PoolReadHelper.h (88%) diff --git a/datapoollocal/PoolReadHelper.h b/datapool/PoolReadHelper.h similarity index 88% rename from datapoollocal/PoolReadHelper.h rename to datapool/PoolReadHelper.h index b863a0f1..5c3153bb 100644 --- a/datapoollocal/PoolReadHelper.h +++ b/datapool/PoolReadHelper.h @@ -1,7 +1,7 @@ -#ifndef FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_ -#define FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_ +#ifndef FSFW_DATAPOOL_POOLREADHELPER_H_ +#define FSFW_DATAPOOL_POOLREADHELPER_H_ -#include "LocalPoolDataSetBase.h" +#include "ReadCommitIF.h" #include "../serviceinterface/ServiceInterface.h" #include @@ -48,4 +48,4 @@ private: -#endif /* FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_ */ +#endif /* FSFW_DATAPOOL_POOLREADHELPER_H_ */ From ffb6208b24278a10612f17180d142ac58aa5aab1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 19 Jan 2021 16:13:10 +0100 Subject: [PATCH 4/4] cmake lists update --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76542842..d6911f61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,15 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") -Wno-unused-parameter -Wno-psabi ) + + if(NOT DEFINED WARNING_SHADOW_LOCAL) + option(WARNING_SHADOW_LOCAL "Show shadows declarations warning." ON) endif() + + if(WARNING_SHADOW_LOCAL) + list(APPEND WARNING_FLAGS "-Wshadow=local") + endif() + endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")