diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d35e6ff5..5a7319cde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ set(FSFW_ETL_LIB_MAJOR_VERSION 20 CACHE STRING "ETL library major version requirement") set(FSFW_ETL_LIB_VERSION - ${FSFW_ETL_LIB_MAJOR_VERSION}.35.14 + ${FSFW_ETL_LIB_MAJOR_VERSION}.36.0 CACHE STRING "ETL library exact version requirement") set(FSFW_ETL_LINK_TARGET etl::etl) @@ -80,7 +80,7 @@ set(FSFW_CATCH2_LIB_MAJOR_VERSION 3 CACHE STRING "Catch2 library major version requirement") set(FSFW_CATCH2_LIB_VERSION - v${FSFW_CATCH2_LIB_MAJOR_VERSION}.1.0 + v${FSFW_CATCH2_LIB_MAJOR_VERSION}.3.2 CACHE STRING "Catch2 library exact version requirement") # Keep this off by default for now. See PR: diff --git a/src/fsfw/action.h b/src/fsfw/action.h index ba9151e3a..1002420ea 100644 --- a/src/fsfw/action.h +++ b/src/fsfw/action.h @@ -1,6 +1,7 @@ #ifndef FSFW_INC_FSFW_ACTION_H_ #define FSFW_INC_FSFW_ACTION_H_ +#include "fsfw/action/Action.h" #include "fsfw/action/ActionHelper.h" #include "fsfw/action/ActionMessage.h" #include "fsfw/action/CommandActionHelper.h" diff --git a/src/fsfw/action/Action.cpp b/src/fsfw/action/Action.cpp index ca0f7c52e..91a8185e9 100644 --- a/src/fsfw/action/Action.cpp +++ b/src/fsfw/action/Action.cpp @@ -34,12 +34,12 @@ size_t Action::getSerializedSize() const { ReturnValue_t Action::serialize(uint8_t **buffer, size_t *size, size_t maxSize, Endianness streamEndianness) const { ReturnValue_t result = SerializeAdapter::serialize(&id, buffer, size, maxSize, streamEndianness); - if (result != HasReturnvaluesIF::RETURN_OK) { + if (result != returnvalue::OK) { return result; } for (auto parameter : *getParameters()) { result = parameter->serialize(buffer, size, maxSize, streamEndianness); - if (result != HasReturnvaluesIF::RETURN_OK) { + if (result != returnvalue::OK) { return result; } } @@ -48,13 +48,13 @@ ReturnValue_t Action::serialize(uint8_t **buffer, size_t *size, size_t maxSize, ReturnValue_t Action::deSerialize(const uint8_t **buffer, size_t *size, Endianness streamEndianness) { - ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;/* TODO not needed as must have been read before to find this action = SerializeAdapter::deSerialize(&id, buffer, size, streamEndianness); - if (result != HasReturnvaluesIF::RETURN_OK) { + ReturnValue_t result = returnvalue::OK;/* TODO not needed as must have been read before to find this action = SerializeAdapter::deSerialize(&id, buffer, size, streamEndianness); + if (result != returnvalue::OK) { return result; }*/ for (auto parameter : *getParameters()) { result = parameter->deSerialize(buffer, size, streamEndianness); - if (result != HasReturnvaluesIF::RETURN_OK) { + if (result != returnvalue::OK) { return result; } } diff --git a/src/fsfw/action/ActionHelper.cpp b/src/fsfw/action/ActionHelper.cpp index dee995ae6..64f902844 100644 --- a/src/fsfw/action/ActionHelper.cpp +++ b/src/fsfw/action/ActionHelper.cpp @@ -83,7 +83,7 @@ void ActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId_t act } Action* action = actionIter->second; result = action->deSerialize(&dataPtr, &size, SerializeIF::Endianness::NETWORK); - if ((result != HasReturnvaluesIF::RETURN_OK) || (size != 0)){ //TODO write unittest for second condition + if ((result != returnvalue::OK) || (size != 0)){ //TODO write unittest for second condition CommandMessage reply; ActionMessage::setStepReply(&reply, actionId, 0, HasActionsIF::INVALID_PARAMETERS); queueToUse->sendMessage(commandedBy, &reply); diff --git a/src/fsfw/action/HasActionsIF.h b/src/fsfw/action/HasActionsIF.h index 49d3e8399..0b8aa8f2d 100644 --- a/src/fsfw/action/HasActionsIF.h +++ b/src/fsfw/action/HasActionsIF.h @@ -1,6 +1,7 @@ #ifndef FSFW_ACTION_HASACTIONSIF_H_ #define FSFW_ACTION_HASACTIONSIF_H_ +#include "Action.h" #include "ActionHelper.h" #include "ActionMessage.h" #include "SimpleActionHelper.h" diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.h b/src/fsfw/devicehandlers/DeviceHandlerBase.h index d1df0645f..b6a638fc3 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.h @@ -340,7 +340,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, */ virtual ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData, - size_t commandDataLen) {return HasReturnvaluesIF::RETURN_FAILED;} + size_t commandDataLen) {return returnvalue::FAILED;} /* Reply handling */ /** diff --git a/src/fsfw/introspection/ClasslessEnum.h b/src/fsfw/introspection/ClasslessEnum.h index 5c3f36350..d115a0732 100644 --- a/src/fsfw/introspection/ClasslessEnum.h +++ b/src/fsfw/introspection/ClasslessEnum.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include @@ -45,4 +45,4 @@ #define FSFW_CLASSLESS_ENUM(name, type, elements) \ enum name : type { BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_FOR_EACH(CLEAN_ENUM_ITEM, "", elements)) }; -#endif \ No newline at end of file +#endif diff --git a/src/fsfw/introspection/Enum.h b/src/fsfw/introspection/Enum.h index 93b01bdd5..df0f08370 100644 --- a/src/fsfw/introspection/Enum.h +++ b/src/fsfw/introspection/Enum.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include @@ -61,4 +61,4 @@ }; -#endif \ No newline at end of file +#endif diff --git a/src/fsfw/modes/ModeHelper.cpp b/src/fsfw/modes/ModeHelper.cpp index 0bea0dc36..e98b8b574 100644 --- a/src/fsfw/modes/ModeHelper.cpp +++ b/src/fsfw/modes/ModeHelper.cpp @@ -127,7 +127,7 @@ std::vector> ModeHelper::getSubmodes(Mode_t m for (size_t i = 0; i < submode->getSize(); i++) { uint32_t ignored; if (owner->checkModeCommand(mode, submode->getElements()[i], &ignored) == - HasReturnvaluesIF::RETURN_OK) { + returnvalue::OK) { submodeVector.push_back(std::pair(submode->getElements()[i], submode->getDescriptions()[i])); } diff --git a/src/fsfw/objectmanager/ObjectManager.cpp b/src/fsfw/objectmanager/ObjectManager.cpp index 879020339..dab15632e 100644 --- a/src/fsfw/objectmanager/ObjectManager.cpp +++ b/src/fsfw/objectmanager/ObjectManager.cpp @@ -104,6 +104,10 @@ void ObjectManager::produce() { return; } objectFactoryFunction(factoryArgs); +} + +void ObjectManager::initialize() { + produce(); ReturnValue_t result = returnvalue::FAILED; uint32_t errorCount = 0; for (auto const& it : objectList) { diff --git a/src/fsfw/timemanager/CcsdsTimeStampReader.cpp b/src/fsfw/timemanager/CcsdsTimeStampReader.cpp index d23d0387a..8076c3fe3 100644 --- a/src/fsfw/timemanager/CcsdsTimeStampReader.cpp +++ b/src/fsfw/timemanager/CcsdsTimeStampReader.cpp @@ -4,7 +4,7 @@ ReturnValue_t CcsdsTimestampReader::readTimeStamp(const uint8_t* buffer, uint8_t maxSize) { ReturnValue_t result = CCSDSTime::convertFromCcsds(&time, buffer, ×tampLen, maxSize); - if (result != HasReturnvaluesIF::RETURN_OK) { + if (result != returnvalue::OK) { return result; } return result; diff --git a/src/fsfw/tmtcpacket/ccsds/SpacePacketCreator.h b/src/fsfw/tmtcpacket/ccsds/SpacePacketCreator.h index 59234a1b2..37a6328ed 100644 --- a/src/fsfw/tmtcpacket/ccsds/SpacePacketCreator.h +++ b/src/fsfw/tmtcpacket/ccsds/SpacePacketCreator.h @@ -76,7 +76,7 @@ class SpacePacketCreator : public SpacePacketIF, public SerializeIF { SpacePacketParams params{}; /** - * Forbidden to call and always return HasReturnvaluesIF::RETURN_FAILED + * Forbidden to call and always return returnvalue::FAILED * @param buffer * @param size * @param streamEndianness diff --git a/src/fsfw/tmtcpacket/pus/tm/PusTmReader.h b/src/fsfw/tmtcpacket/pus/tm/PusTmReader.h index c12bb4c86..a738dea27 100644 --- a/src/fsfw/tmtcpacket/pus/tm/PusTmReader.h +++ b/src/fsfw/tmtcpacket/pus/tm/PusTmReader.h @@ -37,7 +37,7 @@ class PusTmReader : public PusTmIF, /** * Performs a CRC check on the data as well * @return - * - HasReturnvaluesIF::RETURN_OK: Successfully parsed the packet + * - returnvalue::OK: Successfully parsed the packet * - SerializeIF::STREAM_TOO_SHORT: Stream too short for detected packet size * - PusIF::INVALID_CRC_16 on invalid CRC */ diff --git a/unittests/action/TestActionHelper.cpp b/unittests/action/TestActionHelper.cpp index 51db63b8f..7513d1129 100644 --- a/unittests/action/TestActionHelper.cpp +++ b/unittests/action/TestActionHelper.cpp @@ -10,7 +10,7 @@ TEST_CASE("Action Helper", "[ActionHelper]") { - MessageQueueMockBase testMqMock; + MessageQueueMock testMqMock(1); ActionHelperOwnerMockBase testDhMock(&testMqMock); CommandMessage actionMessage; ActionId_t testActionId = (ActionId_t) TestActions::TEST_ACTION; @@ -24,7 +24,7 @@ TEST_CASE("Action Helper", "[ActionHelper]") { SECTION("Simple tests") { ActionMessage::setCommand(&actionMessage, testActionId, paramAddress); CHECK(not testDhMock.executeActionCalled); - REQUIRE(testDhMock.getActionHelper()->handleActionMessage(&actionMessage) == retval::CATCH_OK); + REQUIRE(testDhMock.getActionHelper()->handleActionMessage(&actionMessage) == returnvalue::OK); CHECK(testDhMock.executeActionCalled); // No message is sent if everything is alright. CHECK(not testMqMock.wasMessageSent());