diff --git a/CHANGELOG.md b/CHANGELOG.md index 45712b68..515580b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [v6.0.0] +## Changes + ## Added - Add new `UnsignedByteField` class @@ -41,7 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - HAL Devicehandlers: Periodic printout is run-time configurable now - `oneShotAction` flag in the `TestTask` class is not static anymore - `SimpleRingBuffer::writeData` now checks if the amount is larger than the total size of the - Buffer and rejects such writeData calls with `HasReturnvaluesIF::RETURN_FAILED` + Buffer and rejects such writeData calls with `returnvalue::FAILED` PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/586 - Major update for version handling, using `git describe` to fetch version information with git. PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/601 diff --git a/docs/README-highlevel.md b/docs/README-highlevel.md index 262138a7..9005af8d 100644 --- a/docs/README-highlevel.md +++ b/docs/README-highlevel.md @@ -14,7 +14,7 @@ FSFW to achieve that. The fsfw uses run-time type information but exceptions are # Failure Handling Functions should return a defined `ReturnValue_t` to signal to the caller that something has -gone wrong. Returnvalues must be unique. For this the function `HasReturnvaluesIF::makeReturnCode` +gone wrong. Returnvalues must be unique. For this the function `returnvalue::makeCode` or the macro `MAKE_RETURN` can be used. The `CLASS_ID` is a unique id for that type of object. See `returnvalues/FwClassIds` folder. The user can add custom `CLASS_ID`s via the `fsfwconfig` folder. diff --git a/docs/README-localpools.md b/docs/README-localpools.md index 2ee75189..1770efb9 100644 --- a/docs/README-localpools.md +++ b/docs/README-localpools.md @@ -144,7 +144,7 @@ ReturnValue_t GyroHandler::initializeLocalDataPool(localpool::DataPool &localDat new PoolEntry({0})); poolManager.subscribeForPeriodicPacket(gyroData.getSid(), false, 4.0, false); - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } ``` @@ -154,7 +154,7 @@ in any case: ```cpp PoolReadGuard readHelper(&gyroData); -if(readHelper.getReadResult() == HasReturnvaluesIF::RETURN_OK) { +if(readHelper.getReadResult() == returnvalue::OK) { if(not gyroData.isValid()) { gyroData.setValidity(true, true); } diff --git a/docs/api/returnvalue.rst b/docs/api/returnvalue.rst index b0d43916..da65c141 100644 --- a/docs/api/returnvalue.rst +++ b/docs/api/returnvalue.rst @@ -3,7 +3,7 @@ Returnvalue API ================== -.. doxygenfile:: HasReturnvaluesIF.h +.. doxygenfile:: returnvalue.h .. _fwclassids: diff --git a/docs/devicehandlers.rst b/docs/devicehandlers.rst index 0008edb3..9c6929e8 100644 --- a/docs/devicehandlers.rst +++ b/docs/devicehandlers.rst @@ -75,11 +75,11 @@ and the respective source file with sensible default return values: void TestDeviceHandler::doShutDown() {} ReturnValue_t TestDeviceHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } ReturnValue_t TestDeviceHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } void TestDeviceHandler::fillCommandAndReplyMap() {} @@ -87,17 +87,17 @@ and the respective source file with sensible default return values: ReturnValue_t TestDeviceHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData, size_t commandDataLen) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } ReturnValue_t TestDeviceHandler::scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId, size_t* foundLen) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } ReturnValue_t TestDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } uint32_t TestDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { @@ -106,5 +106,5 @@ and the respective source file with sensible default return values: ReturnValue_t TestDeviceHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } diff --git a/docs/highlevel.rst b/docs/highlevel.rst index 04eb5e7b..3c9baae2 100644 --- a/docs/highlevel.rst +++ b/docs/highlevel.rst @@ -18,7 +18,7 @@ Failure Handling ----------------- Functions should return a defined :cpp:type:`ReturnValue_t` to signal to the caller that something has -gone wrong. Returnvalues must be unique. For this the function :cpp:func:`HasReturnvaluesIF::makeReturnCode` +gone wrong. Returnvalues must be unique. For this the function :cpp:func:`returnvalue::makeCode` or the :ref:`macro MAKE_RETURN_CODE ` can be used. The ``CLASS_ID`` is a unique ID for that type of object. See the :ref:`FSFW Class IDs file `. The user can add custom ``CLASS_ID``\s via the ``fsfwconfig`` folder. diff --git a/docs/localpools.rst b/docs/localpools.rst index d2afd0a0..f7e1ca47 100644 --- a/docs/localpools.rst +++ b/docs/localpools.rst @@ -150,7 +150,7 @@ with a housekeeping service command. new PoolEntry({0})); poolManager.subscribeForPeriodicPacket(gyroData.getSid(), false, 4.0, false); - return HasReturnvaluesIF::RETURN_OK; + return returnvalue::OK; } Now, if we receive some sensor data and converted them into the right format, @@ -160,7 +160,7 @@ in any case: .. code-block:: cpp PoolReadGuard readHelper(&gyroData); - if(readHelper.getReadResult() == HasReturnvaluesIF::RETURN_OK) { + if(readHelper.getReadResult() == returnvalue::OK) { if(not gyroData.isValid()) { gyroData.setValidity(true, true); } diff --git a/misc/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h b/misc/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h index c5d41b7d..622cc49a 100644 --- a/misc/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h +++ b/misc/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h @@ -1,7 +1,7 @@ #ifndef POLLINGSEQUENCEFACTORY_H_ #define POLLINGSEQUENCEFACTORY_H_ -#include +#include class FixedTimeslotTaskIF; diff --git a/src/fsfw/action/ActionHelper.h b/src/fsfw/action/ActionHelper.h index 16abb212..4bcecbae 100644 --- a/src/fsfw/action/ActionHelper.h +++ b/src/fsfw/action/ActionHelper.h @@ -45,7 +45,7 @@ class ActionHelper { * helper function * @param queueToUse_ Pointer to the messageQueue to be used, optional * if queue was set in constructor - * @return Returns RETURN_OK if successful + * @return Returns returnvalue::OK if successful */ ReturnValue_t initialize(MessageQueueIF* queueToUse_ = nullptr); /** @@ -75,7 +75,7 @@ class ActionHelper { * message to * @param replyId ID of the executed command * @param data Pointer to the data - * @return Returns RETURN_OK if successful, otherwise failure code + * @return Returns returnvalue::OK if successful, otherwise failure code */ ReturnValue_t reportData(MessageQueueId_t reportTo, ActionId_t replyId, SerializeIF* data, bool hideSender = false); @@ -86,7 +86,7 @@ class ActionHelper { * message to * @param replyId ID of the executed command * @param data Pointer to the data - * @return Returns RETURN_OK if successful, otherwise failure code + * @return Returns returnvalue::OK if successful, otherwise failure code */ ReturnValue_t reportData(MessageQueueId_t reportTo, ActionId_t replyId, const uint8_t* data, size_t dataSize, bool hideSender = false); diff --git a/src/fsfw/action/CommandActionHelper.h b/src/fsfw/action/CommandActionHelper.h index a6ec0ca7..55176e09 100644 --- a/src/fsfw/action/CommandActionHelper.h +++ b/src/fsfw/action/CommandActionHelper.h @@ -4,7 +4,7 @@ #include "ActionMessage.h" #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/objectmanager/ObjectManagerIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serialize/SerializeIF.h" #include "fsfw/storagemanager/StorageManagerIF.h" diff --git a/src/fsfw/action/CommandsActionsIF.h b/src/fsfw/action/CommandsActionsIF.h index 94d9a7c4..a183051d 100644 --- a/src/fsfw/action/CommandsActionsIF.h +++ b/src/fsfw/action/CommandsActionsIF.h @@ -3,7 +3,7 @@ #include "CommandActionHelper.h" #include "fsfw/ipc/MessageQueueIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * Interface to separate commanding actions of other objects. diff --git a/src/fsfw/action/HasActionsIF.h b/src/fsfw/action/HasActionsIF.h index 89e58add..29e267a0 100644 --- a/src/fsfw/action/HasActionsIF.h +++ b/src/fsfw/action/HasActionsIF.h @@ -5,7 +5,7 @@ #include "ActionMessage.h" #include "SimpleActionHelper.h" #include "fsfw/ipc/MessageQueueIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief @@ -53,7 +53,7 @@ class HasActionsIF { * * @return * -@c EXECUTION_FINISHED Finish reply will be generated - * -@c Not RETURN_OK Step failure reply will be generated + * -@c Not returnvalue::OK Step failure reply will be generated */ virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t* data, size_t size) = 0; diff --git a/src/fsfw/cfdp/CfdpHandler.h b/src/fsfw/cfdp/CfdpHandler.h index 7fe6826c..94bb529e 100644 --- a/src/fsfw/cfdp/CfdpHandler.h +++ b/src/fsfw/cfdp/CfdpHandler.h @@ -3,7 +3,7 @@ #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tcdistribution/CFDPDistributor.h" #include "fsfw/tmtcservices/AcceptsTelecommandsIF.h" diff --git a/src/fsfw/cfdp/definitions.h b/src/fsfw/cfdp/definitions.h index 9ec9db59..53022432 100644 --- a/src/fsfw/cfdp/definitions.h +++ b/src/fsfw/cfdp/definitions.h @@ -7,7 +7,7 @@ #include #include "fsfw/returnvalues/FwClassIds.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" namespace cfdp { diff --git a/src/fsfw/cfdp/pdu/HeaderDeserializer.h b/src/fsfw/cfdp/pdu/HeaderDeserializer.h index 70a7908c..4c237117 100644 --- a/src/fsfw/cfdp/pdu/HeaderDeserializer.h +++ b/src/fsfw/cfdp/pdu/HeaderDeserializer.h @@ -36,7 +36,7 @@ class HeaderDeserializer : public RedirectableDataPointerIF, public PduHeaderIF /** * This needs to be called before accessing the PDU fields to avoid segmentation faults. * @return - * - RETURN_OK on parse success + * - returnvalue::OK on parse success * - returnvalue::FAILED Invalid raw data * - SerializeIF::BUFFER_TOO_SHORT if buffer is shorter than expected */ diff --git a/src/fsfw/cfdp/tlv/Tlv.h b/src/fsfw/cfdp/tlv/Tlv.h index a67c6dd1..dded5652 100644 --- a/src/fsfw/cfdp/tlv/Tlv.h +++ b/src/fsfw/cfdp/tlv/Tlv.h @@ -23,7 +23,7 @@ class Tlv : public TlvIF { * @param maxSize * @param streamEndianness * @return - * - RETURN_OK on success + * - returnvalue::OK on success * - INVALID_TLV_TYPE * - SerializeIF returncode on wrong serialization parameters */ @@ -37,7 +37,7 @@ class Tlv : public TlvIF { * @param buffer Raw buffer including the size field * @param size * @param streamEndianness - * - RETURN_OK on success + * - returnvalue::OK on success * - INVALID_TLV_TYPE * - SerializeIF returncode on wrong deserialization parameters */ diff --git a/src/fsfw/container/ArrayList.h b/src/fsfw/container/ArrayList.h index 522ddf3b..f5f74cf1 100644 --- a/src/fsfw/container/ArrayList.h +++ b/src/fsfw/container/ArrayList.h @@ -1,7 +1,7 @@ #ifndef FSFW_CONTAINER_ARRAYLIST_H_ #define FSFW_CONTAINER_ARRAYLIST_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serialize/SerializeAdapter.h" #include "../serialize/SerializeIF.h" @@ -183,7 +183,7 @@ class ArrayList { * @param entry * @return * -@c FULL if the List is full - * -@c RETURN_OK else + * -@c returnvalue::OK else */ ReturnValue_t insert(T entry) { if (size >= maxSize_) { diff --git a/src/fsfw/container/FIFOBase.h b/src/fsfw/container/FIFOBase.h index 25c75515..bb92790c 100644 --- a/src/fsfw/container/FIFOBase.h +++ b/src/fsfw/container/FIFOBase.h @@ -4,7 +4,7 @@ #include #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" template class FIFOBase { @@ -20,24 +20,24 @@ class FIFOBase { /** * Insert value into FIFO * @param value - * @return RETURN_OK on success, FULL if full + * @return returnvalue::OK on success, FULL if full */ ReturnValue_t insert(T value); /** * Retrieve item from FIFO. This removes the item from the FIFO. * @param value Must point to a valid T - * @return RETURN_OK on success, EMPTY if empty and FAILED if nullptr check failed + * @return returnvalue::OK on success, EMPTY if empty and FAILED if nullptr check failed */ ReturnValue_t retrieve(T* value); /** * Retrieve item from FIFO without removing it from FIFO. * @param value Must point to a valid T - * @return RETURN_OK on success, EMPTY if empty and FAILED if nullptr check failed + * @return returnvalue::OK on success, EMPTY if empty and FAILED if nullptr check failed */ ReturnValue_t peek(T* value); /** * Remove item from FIFO. - * @return RETURN_OK on success, EMPTY if empty + * @return returnvalue::OK on success, EMPTY if empty */ ReturnValue_t pop(); diff --git a/src/fsfw/container/FixedMap.h b/src/fsfw/container/FixedMap.h index c6b2c9b5..def219d1 100644 --- a/src/fsfw/container/FixedMap.h +++ b/src/fsfw/container/FixedMap.h @@ -4,7 +4,7 @@ #include #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "ArrayList.h" /** diff --git a/src/fsfw/container/FixedOrderedMultimap.h b/src/fsfw/container/FixedOrderedMultimap.h index f402d622..73b010ed 100644 --- a/src/fsfw/container/FixedOrderedMultimap.h +++ b/src/fsfw/container/FixedOrderedMultimap.h @@ -100,7 +100,7 @@ class FixedOrderedMultimap { * @param[in] value Value of the new element * @param[in/out] (optional) storedValue On success this points to the new value, otherwise a * nullptr - * @return RETURN_OK if insert was successful, MAP_FULL if no space is available + * @return returnvalue::OK if insert was successful, MAP_FULL if no space is available */ ReturnValue_t insert(key_t key, T value, Iterator* storedValue = nullptr); @@ -108,14 +108,14 @@ class FixedOrderedMultimap { * Used to insert new pair instead of single values * * @param pair Pair to be inserted - * @return RETURN_OK if insert was successful, MAP_FULL if no space is available + * @return returnvalue::OK if insert was successful, MAP_FULL if no space is available */ ReturnValue_t insert(std::pair pair); /*** * Can be used to check if a certain key is in the map * @param key Key to be checked - * @return RETURN_OK if the key exists KEY_DOES_NOT_EXIST otherwise + * @return returnvalue::OK if the key exists KEY_DOES_NOT_EXIST otherwise */ ReturnValue_t exists(key_t key) const; @@ -127,14 +127,14 @@ class FixedOrderedMultimap { * * @warning The iterator needs to be valid and dereferenceable * @param[in/out] iter Pointer to iterator to the element that needs to be ereased - * @return RETURN_OK if erased, KEY_DOES_NOT_EXIST if the there is no element like this + * @return returnvalue::OK if erased, KEY_DOES_NOT_EXIST if the there is no element like this */ ReturnValue_t erase(Iterator* iter); /*** * Used to erase by key * @param key Key to be erased - * @return RETURN_OK if erased, KEY_DOES_NOT_EXIST if the there is no element like this + * @return returnvalue::OK if erased, KEY_DOES_NOT_EXIST if the there is no element like this */ ReturnValue_t erase(key_t key); @@ -160,7 +160,7 @@ class FixedOrderedMultimap { * * @param key Key to search for * @param value Found value - * @return RETURN_OK if it points to the value, + * @return returnvalue::OK if it points to the value, * KEY_DOES_NOT_EXIST if the key is not in the map */ ReturnValue_t find(key_t key, T** value) const; diff --git a/src/fsfw/container/IndexedRingMemoryArray.h b/src/fsfw/container/IndexedRingMemoryArray.h index 4ad72592..127ed5d7 100644 --- a/src/fsfw/container/IndexedRingMemoryArray.h +++ b/src/fsfw/container/IndexedRingMemoryArray.h @@ -4,7 +4,7 @@ #include #include "../globalfunctions/CRC.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serialize/SerialArrayListAdapter.h" #include "../serviceinterface/ServiceInterfaceStream.h" #include "ArrayList.h" diff --git a/src/fsfw/container/PlacementFactory.h b/src/fsfw/container/PlacementFactory.h index e59fc134..668e71b8 100644 --- a/src/fsfw/container/PlacementFactory.h +++ b/src/fsfw/container/PlacementFactory.h @@ -51,7 +51,7 @@ class PlacementFactory { * This must be called by the user. * * @param thisElement Element to be destroyed - * @return RETURN_OK if the element was destroyed, different errors on failure + * @return returnvalue::OK if the element was destroyed, different errors on failure */ template ReturnValue_t destroy(T* thisElement) { diff --git a/src/fsfw/container/RingBufferBase.h b/src/fsfw/container/RingBufferBase.h index 77a0583b..e86f0ee1 100644 --- a/src/fsfw/container/RingBufferBase.h +++ b/src/fsfw/container/RingBufferBase.h @@ -3,7 +3,7 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" template class RingBufferBase { diff --git a/src/fsfw/container/SimpleRingBuffer.h b/src/fsfw/container/SimpleRingBuffer.h index 7495e31c..a9892c0c 100644 --- a/src/fsfw/container/SimpleRingBuffer.h +++ b/src/fsfw/container/SimpleRingBuffer.h @@ -47,7 +47,7 @@ class SimpleRingBuffer : public RingBufferBase<> { * Write to circular buffer and increment write pointer by amount. * @param data * @param amount - * @return -@c RETURN_OK if write operation was successful + * @return -@c returnvalue::OK if write operation was successful * -@c returnvalue::FAILED if */ ReturnValue_t writeData(const uint8_t* data, size_t amount); @@ -95,7 +95,7 @@ class SimpleRingBuffer : public RingBufferBase<> { * If readRemaining was set to true, the true amount read will be assigned * to the passed value. * @return - * - @c RETURN_OK if data was read successfully + * - @c returnvalue::OK if data was read successfully * - @c returnvalue::FAILED if not enough data was available and readRemaining * was set to false. */ diff --git a/src/fsfw/coordinates/Sgp4Propagator.h b/src/fsfw/coordinates/Sgp4Propagator.h index 0edaf459..5cbeb3f2 100644 --- a/src/fsfw/coordinates/Sgp4Propagator.h +++ b/src/fsfw/coordinates/Sgp4Propagator.h @@ -7,7 +7,7 @@ #ifndef PLATFORM_WIN #include #endif -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw_contrib/sgp4/sgp4unit.h" class Sgp4Propagator { diff --git a/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h b/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h index 22ff12e4..71d14e60 100644 --- a/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h +++ b/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h @@ -9,12 +9,12 @@ #define CCSDSRETURNVALUESIF_H_ #include "dllConf.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * This is a helper class to collect special return values that come up during CCSDS Handling. * @ingroup ccsds_handling */ -class CCSDSReturnValuesIF : public HasReturnvaluesIF { +class CCSDSReturnValuesIF { public: static const uint8_t INTERFACE_ID = CLASS_ID::CCSDS_HANDLER_IF; //!< Basic ID of the interface. diff --git a/src/fsfw/datalinklayer/DataLinkLayer.h b/src/fsfw/datalinklayer/DataLinkLayer.h index 64d33016..64d2f96b 100644 --- a/src/fsfw/datalinklayer/DataLinkLayer.h +++ b/src/fsfw/datalinklayer/DataLinkLayer.h @@ -51,7 +51,7 @@ class DataLinkLayer : public CCSDSReturnValuesIF { * This method tries to process a frame that is placed in #frameBuffer. * The procedures described in the Standard are performed. * @param length Length of the incoming frame candidate. - * @return @c RETURN_OK on successful handling, otherwise the return codes of the higher + * @return @c returnvalue::OK on successful handling, otherwise the return codes of the higher * methods. */ ReturnValue_t processFrame(uint16_t length); @@ -61,12 +61,12 @@ class DataLinkLayer : public CCSDSReturnValuesIF { * handle Frames directed to this VC. * @param virtualChannelId Id of the VC. Shall be smaller than 64. * @param object Reference to the object that handles the Frame. - * @return @c RETURN_OK on success, @c returnvalue::FAILED otherwise. + * @return @c returnvalue::OK on success, @c returnvalue::FAILED otherwise. */ ReturnValue_t addVirtualChannel(uint8_t virtualChannelId, VirtualChannelReceptionIF* object); /** * The initialization method calls the @c initialize routine of all virtual channels. - * @return The return code of the first failed VC initialization or @c RETURN_OK. + * @return The return code of the first failed VC initialization or @c returnvalue::OK. */ ReturnValue_t initialize(); @@ -91,19 +91,19 @@ class DataLinkLayer : public CCSDSReturnValuesIF { virtualChannels; //!< Map of all virtual channels assigned. /** * Method that performs all possible frame validity checks (as specified). - * @return Various error codes or @c RETURN_OK on success. + * @return Various error codes or @c returnvalue::OK on success. */ ReturnValue_t frameValidationCheck(); /** * First method to call. * Removes start sequence bytes and checks if the complete frame was received. * SHOULDDO: Maybe handling the start sequence must be done more variable. - * @return @c RETURN_OK or @c TOO_SHORT. + * @return @c returnvalue::OK or @c TOO_SHORT. */ ReturnValue_t frameDelimitingAndFillRemoval(); /** * Small helper method to check the CRC of the Frame. - * @return @c RETURN_OK or @c CRC_FAILED. + * @return @c returnvalue::OK or @c CRC_FAILED. */ ReturnValue_t frameCheckCRC(); /** diff --git a/src/fsfw/datalinklayer/Farm1StateOpen.h b/src/fsfw/datalinklayer/Farm1StateOpen.h index 0bca931d..a1c553ff 100644 --- a/src/fsfw/datalinklayer/Farm1StateOpen.h +++ b/src/fsfw/datalinklayer/Farm1StateOpen.h @@ -37,8 +37,8 @@ class Farm1StateOpen : public Farm1StateIF { * change to Farm1StateLockout. * @param frame The frame to handle. * @param clcw Any changes to the CLCW shall be done with the help of this interface. - * @return If the Sequence Number is ok, it returns #RETURN_OK. Otherwise either #NS_POSITIVE_W, - * #NS_NEGATIVE_W or NS_LOCKOUT is returned. + * @return If the Sequence Number is ok, it returns returnvalue::OK. Otherwise either + * #NS_POSITIVE_W, #NS_NEGATIVE_W or NS_LOCKOUT is returned. */ ReturnValue_t handleADFrame(TcTransferFrame* frame, ClcwIF* clcw); /** diff --git a/src/fsfw/datalinklayer/MapPacketExtraction.h b/src/fsfw/datalinklayer/MapPacketExtraction.h index 54faaf04..fab7f3c3 100644 --- a/src/fsfw/datalinklayer/MapPacketExtraction.h +++ b/src/fsfw/datalinklayer/MapPacketExtraction.h @@ -5,7 +5,7 @@ #include "dllConf.h" #include "fsfw/ipc/MessageQueueSenderIF.h" #include "fsfw/objectmanager/ObjectManagerIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class StorageManagerIF; @@ -36,7 +36,7 @@ class MapPacketExtraction : public MapPacketExtractionIF { * Method that is called if the segmentation flag is @c NO_SEGMENTATION. * The method extracts one or more packets within the frame and forwards them to the OBSW. * @param frame The TC Transfer Frame to work on. - * @return @c RETURN_OK if all Packets were extracted. If something is entirely wrong, + * @return @c returnvalue::OK if all Packets were extracted. If something is entirely wrong, * @c DATA_CORRUPTED is returned, if some bytes are left over @c RESIDUAL_DATA. */ ReturnValue_t unpackBlockingPackets(TcTransferFrame* frame); @@ -63,7 +63,7 @@ class MapPacketExtraction : public MapPacketExtractionIF { ReturnValue_t extractPackets(TcTransferFrame* frame); /** * The #packetStore and the default destination of #tcQueue are initialized here. - * @return @c RETURN_OK on success, @c returnvalue::FAILED otherwise. + * @return @c returnvalue::OK on success, @c returnvalue::FAILED otherwise. */ ReturnValue_t initialize(); /** diff --git a/src/fsfw/datalinklayer/VirtualChannelReception.h b/src/fsfw/datalinklayer/VirtualChannelReception.h index 94757941..429ae9de 100644 --- a/src/fsfw/datalinklayer/VirtualChannelReception.h +++ b/src/fsfw/datalinklayer/VirtualChannelReception.h @@ -77,7 +77,7 @@ class VirtualChannelReception : public VirtualChannelReceptionIF, public CCSDSRe * required. * @param frame The Tc Transfer Frame to handle. * @param clcw Any changes on the CLCW shall be done with this method. - * @return Always returns @c RETURN_OK. + * @return Always returns @c returnvalue::OK. */ ReturnValue_t handleBDFrame(TcTransferFrame* frame, ClcwIF* clcw); /** @@ -102,14 +102,14 @@ class VirtualChannelReception : public VirtualChannelReceptionIF, public CCSDSRe * Helper method to simplify adding a mapChannel during construction. * @param mapId The mapId of the object to add. * @param object Pointer to the MapPacketExtraction object itself. - * @return @c RETURN_OK if the channel was successfully inserted, @c returnvalue::FAILED + * @return @c returnvalue::OK if the channel was successfully inserted, @c returnvalue::FAILED * otherwise. */ ReturnValue_t addMapChannel(uint8_t mapId, MapPacketExtractionIF* object); /** * The initialization routine checks the set #slidingWindowWidth and initializes all MAP * channels. - * @return @c RETURN_OK on successful initialization, @c returnvalue::FAILED otherwise. + * @return @c returnvalue::OK on successful initialization, @c returnvalue::FAILED otherwise. */ ReturnValue_t initialize(); /** diff --git a/src/fsfw/datalinklayer/VirtualChannelReceptionIF.h b/src/fsfw/datalinklayer/VirtualChannelReceptionIF.h index 3426f21c..9239ee0e 100644 --- a/src/fsfw/datalinklayer/VirtualChannelReceptionIF.h +++ b/src/fsfw/datalinklayer/VirtualChannelReceptionIF.h @@ -11,7 +11,7 @@ #include "ClcwIF.h" #include "TcTransferFrame.h" #include "dllConf.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * This is the interface for Virtual Channel reception classes. @@ -33,13 +33,13 @@ class VirtualChannelReceptionIF { * Handling the Frame includes forwarding to higher-level procedures. * @param frame The Tc Transfer Frame that was received and checked. * @param clcw Any changes to the CLCW value are forwarded by using this parameter. - * @return The return Value shall indicate successful processing with @c RETURN_OK. + * @return The return Value shall indicate successful processing with @c returnvalue::OK. */ virtual ReturnValue_t frameAcceptanceAndReportingMechanism(TcTransferFrame* frame, ClcwIF* clcw) = 0; /** * If any other System Objects are required for operation they shall be initialized here. - * @return @c RETURN_OK for successful initialization. + * @return @c returnvalue::OK for successful initialization. */ virtual ReturnValue_t initialize() = 0; /** diff --git a/src/fsfw/datapool/DataSetIF.h b/src/fsfw/datapool/DataSetIF.h index 492bcf29..3d4be351 100644 --- a/src/fsfw/datapool/DataSetIF.h +++ b/src/fsfw/datapool/DataSetIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_DATAPOOL_DATASETIF_H_ #define FSFW_DATAPOOL_DATASETIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../timemanager/Clock.h" class PoolVariableIF; diff --git a/src/fsfw/datapool/PoolDataSetBase.h b/src/fsfw/datapool/PoolDataSetBase.h index 79a1095b..3e7e30c5 100644 --- a/src/fsfw/datapool/PoolDataSetBase.h +++ b/src/fsfw/datapool/PoolDataSetBase.h @@ -58,7 +58,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF { * freed afterwards. It is mandatory to call commit after a read call, * even if the read operation is not successful! * @return - * - @c RETURN_OK if all variables were read successfully. + * - @c returnvalue::OK if all variables were read successfully. * - @c INVALID_PARAMETER_DEFINITION if a pool entry does not exist or there * is a type conflict. * - @c SET_WAS_ALREADY_READ if read() is called twice without calling @@ -80,7 +80,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF { * commit() can only be called after read(). If the set only contains * variables which are write only, commit() can be called without a * preceding read() call. Every read call must be followed by a commit call! - * @return - @c RETURN_OK if all variables were read successfully. + * @return - @c returnvalue::OK if all variables were read successfully. * - @c COMMITING_WITHOUT_READING if set was not read yet and * contains non write-only variables */ @@ -97,7 +97,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF { /** * Provides the means to lock the underlying data structure to ensure * thread-safety. Default implementation is empty - * @return Always returns -@c RETURN_OK + * @return Always returns -@c returnvalue::OK */ virtual ReturnValue_t lockDataPool( MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING, @@ -105,7 +105,7 @@ class PoolDataSetBase : public PoolDataSetIF, public SerializeIF { /** * Provides the means to unlock the underlying data structure to ensure * thread-safety. Default implementation is empty - * @return Always returns -@c RETURN_OK + * @return Always returns -@c returnvalue::OK */ virtual ReturnValue_t unlockDataPool() override; diff --git a/src/fsfw/datapool/PoolVariableIF.h b/src/fsfw/datapool/PoolVariableIF.h index 95cf898e..69074310 100644 --- a/src/fsfw/datapool/PoolVariableIF.h +++ b/src/fsfw/datapool/PoolVariableIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_DATAPOOL_POOLVARIABLEIF_H_ #define FSFW_DATAPOOL_POOLVARIABLEIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serialize/SerializeIF.h" #include "ReadCommitIF.h" diff --git a/src/fsfw/datapool/ReadCommitIF.h b/src/fsfw/datapool/ReadCommitIF.h index 08554be1..ca074dec 100644 --- a/src/fsfw/datapool/ReadCommitIF.h +++ b/src/fsfw/datapool/ReadCommitIF.h @@ -2,7 +2,7 @@ #define FSFW_DATAPOOL_READCOMMITIF_H_ #include "../ipc/MutexIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" /** * @brief Common interface for all software objects which employ read-commit diff --git a/src/fsfw/datapool/ReadCommitIFAttorney.h b/src/fsfw/datapool/ReadCommitIFAttorney.h index 361ac6e4..cca76c97 100644 --- a/src/fsfw/datapool/ReadCommitIFAttorney.h +++ b/src/fsfw/datapool/ReadCommitIFAttorney.h @@ -2,7 +2,7 @@ #define FSFW_DATAPOOL_READCOMMITIFATTORNEY_H_ #include -#include +#include /** * @brief This class determines which members are allowed to access protected members diff --git a/src/fsfw/datapoollocal/LocalPoolObjectBase.h b/src/fsfw/datapoollocal/LocalPoolObjectBase.h index f454fea3..a4ecbd55 100644 --- a/src/fsfw/datapoollocal/LocalPoolObjectBase.h +++ b/src/fsfw/datapoollocal/LocalPoolObjectBase.h @@ -4,7 +4,7 @@ #include "MarkChangedIF.h" #include "fsfw/datapool/PoolVariableIF.h" #include "fsfw/objectmanager/SystemObjectIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "localPoolDefinitions.h" class LocalDataPoolManager; diff --git a/src/fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h b/src/fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h index c350bb60..baf91796 100644 --- a/src/fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h +++ b/src/fsfw/datapoollocal/ProvidesDataPoolSubscriptionIF.h @@ -4,7 +4,7 @@ #include "fsfw/housekeeping/AcceptsHkPacketsIF.h" #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/ipc/messageQueueDefinitions.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "localPoolDefinitions.h" namespace subdp { diff --git a/src/fsfw/devicehandlers/AssemblyBase.h b/src/fsfw/devicehandlers/AssemblyBase.h index 92feb6ae..ec0847f1 100644 --- a/src/fsfw/devicehandlers/AssemblyBase.h +++ b/src/fsfw/devicehandlers/AssemblyBase.h @@ -53,7 +53,7 @@ class AssemblyBase : public SubsystemBase { * @param mode * @param submode * @return - * - @c RETURN_OK if ok + * - @c returnvalue::OK if ok * - @c NEED_SECOND_STEP if children need to be commanded again */ virtual ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) = 0; diff --git a/src/fsfw/devicehandlers/DeviceCommunicationIF.h b/src/fsfw/devicehandlers/DeviceCommunicationIF.h index 5af3f3f0..a5546a36 100644 --- a/src/fsfw/devicehandlers/DeviceCommunicationIF.h +++ b/src/fsfw/devicehandlers/DeviceCommunicationIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_DEVICES_DEVICECOMMUNICATIONIF_H_ #define FSFW_DEVICES_DEVICECOMMUNICATIONIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "CookieIF.h" #include "DeviceHandlerIF.h" /** @@ -61,7 +61,7 @@ class DeviceCommunicationIF { * initialization. * @param cookie * @return - * - @c RETURN_OK if initialization was successfull + * - @c returnvalue::OK if initialization was successfull * - Everything else triggers failure event with returnvalue as parameter 1 */ virtual ReturnValue_t initializeInterface(CookieIF *cookie) = 0; @@ -74,7 +74,7 @@ class DeviceCommunicationIF { * @param data * @param len If this is 0, nothing shall be sent. * @return - * - @c RETURN_OK for successfull send + * - @c returnvalue::OK for successfull send * - Everything else triggers failure event with returnvalue as parameter 1 */ virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen) = 0; @@ -84,7 +84,7 @@ class DeviceCommunicationIF { * Get send confirmation that the data in sendMessage() was sent successfully. * @param cookie * @return - * - @c RETURN_OK if data was sent successfully but a reply is expected + * - @c returnvalue::OK if data was sent successfully but a reply is expected * - NO_REPLY_EXPECTED if data was sent successfully and no reply is expected * - Everything else to indicate failure */ @@ -99,7 +99,7 @@ class DeviceCommunicationIF { * * @param cookie * @param requestLen Size of data to read - * @return - @c RETURN_OK to confirm the request for data has been sent. + * @return - @c returnvalue::OK to confirm the request for data has been sent. * - Everything else triggers failure event with * returnvalue as parameter 1 */ @@ -113,7 +113,7 @@ class DeviceCommunicationIF { * @param buffer [out] Set reply here (by using *buffer = ...) * @param size [out] size pointer to set (by using *size = ...). * Set to 0 if no reply was received - * @return - @c RETURN_OK for successfull receive + * @return - @c returnvalue::OK for successfull receive * - @c NO_REPLY_RECEIVED if not reply was received. Setting size to * 0 has the same effect * - Everything else triggers failure event with diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.h b/src/fsfw/devicehandlers/DeviceHandlerBase.h index 35a33eab..a20eae0c 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.h @@ -18,7 +18,7 @@ #include "fsfw/objectmanager/SystemObject.h" #include "fsfw/parameters/ParameterHelper.h" #include "fsfw/power/PowerSwitchIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/serviceInterfaceDefintions.h" #include "fsfw/tasks/ExecutableObjectIF.h" @@ -144,7 +144,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * 4. Decrements counter for timeout of replies by calling * decrementDeviceReplyMap() * 5. Performs FDIR check for failures - * 6. If the device mode is MODE_OFF, return RETURN_OK. + * 6. If the device mode is MODE_OFF, return returnvalue::OK. * Otherwise, perform the Action property and performs depending * on value specified by input value counter (incremented in PST). * The child class tells base class what to do by setting this value. @@ -160,7 +160,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * - GET_READ: Access requested reading data by calling doGetRead() * which calls readReceivedMessage of #communicationInterface * @param counter Specifies which Action to perform - * @return RETURN_OK for successful execution + * @return returnvalue::OK for successful execution */ virtual ReturnValue_t performOperation(uint8_t counter) override; @@ -281,7 +281,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * * @param[out] id the device command id that has been built * @return - * - @c RETURN_OK to send command after setting #rawPacket and + * - @c returnvalue::OK to send command after setting #rawPacket and * #rawPacketLen. * - @c NOTHING_TO_SEND when no command is to be sent. * - Anything else triggers an even with the returnvalue as a parameter. @@ -305,7 +305,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * * @param[out] id the device command id built * @return - * - @c RETURN_OK when a command is to be sent + * - @c returnvalue::OK when a command is to be sent * - @c NOTHING_TO_SEND when no command is to be sent * - Anything else triggers an even with the returnvalue as a parameter */ @@ -327,7 +327,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param commandData Pointer to the data from the direct command * @param commandDataLen Length of commandData * @return - * - @c RETURN_OK to send command after #rawPacket and #rawPacketLen + * - @c returnvalue::OK to send command after #rawPacket and #rawPacketLen * have been set. * - @c HasActionsIF::EXECUTION_COMPLETE to generate a finish reply immediately. This can * be used if no reply is expected @@ -357,7 +357,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param[out] foundLen length of the data found. Is to be set in function, * buffer is scanned at previous position + foundLen. * @return - * - @c RETURN_OK a valid packet was found at @c start, @c foundLen is valid + * - @c returnvalue::OK a valid packet was found at @c start, @c foundLen is valid * - @c returnvalue::FAILED no reply could be found starting at @c start, * implies @c foundLen is not valid, base class will call scanForReply() * again with ++start @@ -387,7 +387,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param id the id found by scanForReply() * @param packet * @return - * - @c RETURN_OK when the reply was interpreted. + * - @c returnvalue::OK when the reply was interpreted. * - @c IGNORE_REPLY_DATA Ignore the reply and don't reset reply cycle * counter. * - @c returnvalue::FAILED when the reply could not be interpreted, @@ -450,7 +450,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param countdown Instead of using maxDelayCycles to timeout a device reply it is also possible * to provide a pointer to a Countdown object which will signal the timeout * when expired - * @return - @c RETURN_OK when the command was successfully inserted, + * @return - @c returnvalue::OK when the command was successfully inserted, * - @c returnvalue::FAILED else. */ ReturnValue_t insertInCommandAndReplyMap(DeviceCommandId_t deviceCommand, uint16_t maxDelayCycles, @@ -471,7 +471,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param countdown Instead of using maxDelayCycles to timeout a device reply it is also possible * to provide a pointer to a Countdown object which will signal the timeout * when expired - * @return - @c RETURN_OK when the command was successfully inserted, + * @return - @c returnvalue::OK when the command was successfully inserted, * - @c returnvalue::FAILED else. */ ReturnValue_t insertInReplyMap(DeviceCommandId_t deviceCommand, uint16_t maxDelayCycles, @@ -481,7 +481,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, /** * @brief A simple command to add a command to the commandList. * @param deviceCommand The command to add - * @return - @c RETURN_OK when the command was successfully inserted, + * @return - @c returnvalue::OK when the command was successfully inserted, * - @c returnvalue::FAILED else. */ ReturnValue_t insertInCommandMap(DeviceCommandId_t deviceCommand, @@ -518,7 +518,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param periodic Indicates if the command is periodic (i.e. it is sent * by the device repeatedly without request) or not. Default is aperiodic (0). * Warning: The setting always overrides the value that was entered in the map. - * @return - @c RETURN_OK when the command was successfully inserted, + * @return - @c returnvalue::OK when the command was successfully inserted, * - @c returnvalue::FAILED else. */ ReturnValue_t updateReplyMapEntry(DeviceCommandId_t deviceReply, uint16_t delayCycles, @@ -602,7 +602,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param mode * @param submode * @return - * - @c RETURN_OK if valid + * - @c returnvalue::OK if valid * - @c returnvalue::FAILED if invalid */ virtual ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode); @@ -622,7 +622,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param[out] switches pointer to an array of switches * @param[out] numberOfSwitches length of returned array * @return - * - @c RETURN_OK if the parameters were set + * - @c returnvalue::OK if the parameters were set * - @c returnvalue::FAILED if no switches exist */ virtual ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches); @@ -977,7 +977,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * - A failure code may be returned if something went fundamentally wrong. * * @param deviceCommand - * @return - RETURN_OK if a reply was activated. + * @return - returnvalue::OK if a reply was activated. * - NO_REPLY_EXPECTED if there was no reply found. This is not an * error case as many commands do not expect a reply. */ @@ -1004,7 +1004,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, * * @param[out] id the device command id built * @return - * - @c RETURN_OK when a command is to be sent + * - @c returnvalue::OK when a command is to be sent * - not @c NOTHING_TO_SEND when no command is to be sent */ virtual ReturnValue_t buildChildRawCommand(); @@ -1085,7 +1085,7 @@ class DeviceHandlerBase : public DeviceHandlerIF, /** * Checks if current handler state allows reception of external device commands. * Default implementation allows commands only in plain MODE_ON and MODE_NORMAL. - * @return RETURN_OK if commands are accepted, anything else otherwise. + * @return returnvalue::OK if commands are accepted, anything else otherwise. */ virtual ReturnValue_t acceptExternalDeviceCommands(); @@ -1273,9 +1273,9 @@ class DeviceHandlerBase : public DeviceHandlerIF, * @param[out] data * @param[out] len * @return - * - @c RETURN_OK @c data is valid + * - @c returnvalue::OK @c data is valid * - @c returnvalue::FAILED IPCStore is nullptr - * - the return value from the IPCStore if it was not @c RETURN_OK + * - the return value from the IPCStore if it was not @c returnvalue::OK */ ReturnValue_t getStorageData(store_address_t storageAddress, uint8_t **data, size_t *len); diff --git a/src/fsfw/events/eventmatching/EventMatchTree.h b/src/fsfw/events/eventmatching/EventMatchTree.h index 7561e27d..0d06f0c2 100644 --- a/src/fsfw/events/eventmatching/EventMatchTree.h +++ b/src/fsfw/events/eventmatching/EventMatchTree.h @@ -4,7 +4,7 @@ #include "../../container/PlacementFactory.h" #include "../../events/EventMessage.h" #include "../../globalfunctions/matching/MatchTree.h" -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" class StorageManagerIF; class EventMatchTree : public MatchTree { diff --git a/src/fsfw/fdir/ConfirmsFailuresIF.h b/src/fsfw/fdir/ConfirmsFailuresIF.h index e4d26907..4424747e 100644 --- a/src/fsfw/fdir/ConfirmsFailuresIF.h +++ b/src/fsfw/fdir/ConfirmsFailuresIF.h @@ -2,7 +2,7 @@ #define FRAMEWORK_FDIR_CONFIRMSFAILURESIF_H_ #include "../ipc/MessageQueueSenderIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" class ConfirmsFailuresIF { public: diff --git a/src/fsfw/fdir/FailureIsolationBase.h b/src/fsfw/fdir/FailureIsolationBase.h index f7e2df26..543ad6cc 100644 --- a/src/fsfw/fdir/FailureIsolationBase.h +++ b/src/fsfw/fdir/FailureIsolationBase.h @@ -5,7 +5,7 @@ #include "../health/HealthMessage.h" #include "../ipc/MessageQueueIF.h" #include "../parameters/HasParametersIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "ConfirmsFailuresIF.h" #include "FaultCounter.h" diff --git a/src/fsfw/globalfunctions/AsciiConverter.h b/src/fsfw/globalfunctions/AsciiConverter.h index 7eb28882..e6cd60a7 100644 --- a/src/fsfw/globalfunctions/AsciiConverter.h +++ b/src/fsfw/globalfunctions/AsciiConverter.h @@ -1,7 +1,7 @@ #ifndef ASCIICONVERTER_H_ #define ASCIICONVERTER_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" class AsciiConverter { public: diff --git a/src/fsfw/globalfunctions/DleEncoder.h b/src/fsfw/globalfunctions/DleEncoder.h index a18527fb..b7242ebe 100644 --- a/src/fsfw/globalfunctions/DleEncoder.h +++ b/src/fsfw/globalfunctions/DleEncoder.h @@ -3,7 +3,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief This DLE Encoder (Data Link Encoder) can be used to encode and @@ -72,7 +72,7 @@ class DleEncoder { * @param addStxEtx Adding STX start marker and ETX end marker can be omitted, * if they are added manually * @return - * - RETURN_OK for successful encoding operation + * - returnvalue::OK for successful encoding operation * - STREAM_TOO_SHORT if the destination stream is too short */ ReturnValue_t encode(const uint8_t *sourceStream, size_t sourceLen, uint8_t *destStream, @@ -87,7 +87,7 @@ class DleEncoder { * @param maxDestStreamlen * @param decodedLen * @return - * - RETURN_OK for successful decode operation + * - returnvalue::OK for successful decode operation * - DECODE_ERROR if the source stream is invalid * - STREAM_TOO_SHORT if the destination stream is too short */ diff --git a/src/fsfw/globalfunctions/Type.h b/src/fsfw/globalfunctions/Type.h index 385d7219..918ba4e8 100644 --- a/src/fsfw/globalfunctions/Type.h +++ b/src/fsfw/globalfunctions/Type.h @@ -3,7 +3,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serialize/SerializeIF.h" /** diff --git a/src/fsfw/health/HasHealthIF.h b/src/fsfw/health/HasHealthIF.h index 41abeef3..77a1c12f 100644 --- a/src/fsfw/health/HasHealthIF.h +++ b/src/fsfw/health/HasHealthIF.h @@ -3,7 +3,7 @@ #include "../events/Event.h" #include "../ipc/MessageQueueSenderIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" class HasHealthIF { public: diff --git a/src/fsfw/health/HealthHelper.h b/src/fsfw/health/HealthHelper.h index 0b9a9c78..6b550f90 100644 --- a/src/fsfw/health/HealthHelper.h +++ b/src/fsfw/health/HealthHelper.h @@ -5,7 +5,7 @@ #include "../events/EventReportingProxyIF.h" #include "../ipc/MessageQueueIF.h" #include "../objectmanager/ObjectManagerIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "HasHealthIF.h" #include "HealthMessage.h" #include "HealthTableIF.h" @@ -55,7 +55,7 @@ class HealthHelper { * * @param message * @return - * -@c RETURN_OK if the message was handled + * -@c returnvalue::OK if the message was handled * -@c returnvalue::FAILED if the message could not be handled * (ie it was not a @c HEALTH_SET or @c HEALTH_READ message) */ @@ -88,7 +88,7 @@ class HealthHelper { * @param parentQueue The queue ID of the parent object. * Set to 0 if no parent present * @return - * -@c RETURN_OK if the Health Table was found and the object + * -@c returnvalue::OK if the Health Table was found and the object * could be registered * -@c returnvalue::FAILED else */ diff --git a/src/fsfw/health/HealthTableIF.h b/src/fsfw/health/HealthTableIF.h index aab3f0eb..0b993691 100644 --- a/src/fsfw/health/HealthTableIF.h +++ b/src/fsfw/health/HealthTableIF.h @@ -4,7 +4,7 @@ #include #include "../objectmanager/ObjectManagerIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "ManagesHealthIF.h" class HealthTableIF : public ManagesHealthIF { diff --git a/src/fsfw/ipc/CommandMessageIF.h b/src/fsfw/ipc/CommandMessageIF.h index aea08203..dc8f7109 100644 --- a/src/fsfw/ipc/CommandMessageIF.h +++ b/src/fsfw/ipc/CommandMessageIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_IPC_COMMANDMESSAGEIF_H_ #define FSFW_IPC_COMMANDMESSAGEIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "FwMessageTypes.h" #include "MessageQueueMessageIF.h" diff --git a/src/fsfw/ipc/MessageQueueIF.h b/src/fsfw/ipc/MessageQueueIF.h index 4f69695a..fcd7c329 100644 --- a/src/fsfw/ipc/MessageQueueIF.h +++ b/src/fsfw/ipc/MessageQueueIF.h @@ -5,7 +5,7 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "MessageQueueMessageIF.h" #include "messageQueueDefinitions.h" @@ -40,7 +40,7 @@ class MessageQueueIF { * @param message * A pointer to a previously created message, which is sent. * @return - * -@c RETURN_OK if ok + * -@c returnvalue::OK if ok * -@c NO_REPLY_PARTNER Should return NO_REPLY_PARTNER if partner was found. */ virtual ReturnValue_t reply(MessageQueueMessageIF* message) = 0; @@ -69,14 +69,14 @@ class MessageQueueIF { * function returns immediately. * @param message * A pointer to a message in which the received data is stored. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c MessageQueueIF::EMPTY if queue is empty */ virtual ReturnValue_t receiveMessage(MessageQueueMessageIF* message) = 0; /** * Deletes all pending messages in the queue. * @param count The number of flushed messages. - * @return RETURN_OK on success. + * @return returnvalue::OK on success. */ virtual ReturnValue_t flush(uint32_t* count) = 0; /** @@ -104,7 +104,7 @@ class MessageQueueIF { * @param ignoreFault * If set to true, the internal software fault counter is not incremented * if queue is full (if implemented). - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c MessageQueueIF::FULL if queue is full */ virtual ReturnValue_t sendMessageFrom(MessageQueueId_t sendTo, MessageQueueMessageIF* message, @@ -136,7 +136,7 @@ class MessageQueueIF { * @param sentFrom * The sentFrom information can be set to inject the sender's queue id * into the message. This variable is set to zero by default. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c MessageQueueIF::FULL if queue is full */ virtual ReturnValue_t sendToDefaultFrom(MessageQueueMessageIF* message, MessageQueueId_t sentFrom, @@ -148,7 +148,7 @@ class MessageQueueIF { * call of the Implementation class and adds its queue id as * "sentFrom" information. * @param message A pointer to a previously created message, which is sent. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c MessageQueueIF::FULL if queue is full */ virtual ReturnValue_t sendToDefault(MessageQueueMessageIF* message) = 0; diff --git a/src/fsfw/ipc/MutexIF.h b/src/fsfw/ipc/MutexIF.h index 0bdfa1f4..30992f7b 100644 --- a/src/fsfw/ipc/MutexIF.h +++ b/src/fsfw/ipc/MutexIF.h @@ -1,7 +1,7 @@ #ifndef FRAMEWORK_IPC_MUTEXIF_H_ #define FRAMEWORK_IPC_MUTEXIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" /** * @brief Common interface for OS Mutex objects which provide MUTual EXclusion. diff --git a/src/fsfw/memory/HasFileSystemIF.h b/src/fsfw/memory/HasFileSystemIF.h index 88a7db83..4c081e26 100644 --- a/src/fsfw/memory/HasFileSystemIF.h +++ b/src/fsfw/memory/HasFileSystemIF.h @@ -6,7 +6,7 @@ #include "FileSystemArgsIF.h" #include "fsfw/ipc/messageQueueDefinitions.h" #include "fsfw/returnvalues/FwClassIds.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief Generic interface for objects which expose a file system to enable diff --git a/src/fsfw/memory/HasMemoryIF.h b/src/fsfw/memory/HasMemoryIF.h index 73edfe4b..fe5c1fc8 100644 --- a/src/fsfw/memory/HasMemoryIF.h +++ b/src/fsfw/memory/HasMemoryIF.h @@ -1,7 +1,7 @@ #ifndef HASMEMORYIF_H_ #define HASMEMORYIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" class HasMemoryIF { public: diff --git a/src/fsfw/memory/MemoryHelper.h b/src/fsfw/memory/MemoryHelper.h index 3a51f7dc..095b366f 100644 --- a/src/fsfw/memory/MemoryHelper.h +++ b/src/fsfw/memory/MemoryHelper.h @@ -3,7 +3,7 @@ #include "../ipc/CommandMessage.h" #include "../ipc/MessageQueueIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../storagemanager/StorageManagerIF.h" #include "AcceptsMemoryMessagesIF.h" diff --git a/src/fsfw/modes/HasModesIF.h b/src/fsfw/modes/HasModesIF.h index 03cc45bf..599975f8 100644 --- a/src/fsfw/modes/HasModesIF.h +++ b/src/fsfw/modes/HasModesIF.h @@ -4,7 +4,7 @@ #include #include "../events/Event.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "ModeHelper.h" #include "ModeMessage.h" diff --git a/src/fsfw/modes/ModeHelper.h b/src/fsfw/modes/ModeHelper.h index 4d0479db..a84408a2 100644 --- a/src/fsfw/modes/ModeHelper.h +++ b/src/fsfw/modes/ModeHelper.h @@ -3,7 +3,7 @@ #include "ModeMessage.h" #include "fsfw/ipc/MessageQueueIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/timemanager/Countdown.h" class HasModesIF; diff --git a/src/fsfw/monitoring/LimitViolationReporter.h b/src/fsfw/monitoring/LimitViolationReporter.h index 06b3ba74..12747725 100644 --- a/src/fsfw/monitoring/LimitViolationReporter.h +++ b/src/fsfw/monitoring/LimitViolationReporter.h @@ -8,7 +8,7 @@ #define LIMITVIOLATIONREPORTER_H_ #include "../ipc/MessageQueueSenderIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serialize/SerializeIF.h" #include "../storagemanager/StorageManagerIF.h" #include "monitoringConf.h" diff --git a/src/fsfw/objectmanager/ObjectManagerIF.h b/src/fsfw/objectmanager/ObjectManagerIF.h index 58ee9ab4..81ddd95a 100644 --- a/src/fsfw/objectmanager/ObjectManagerIF.h +++ b/src/fsfw/objectmanager/ObjectManagerIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_ #define FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_ -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serviceinterface/ServiceInterface.h" #include "SystemObjectIF.h" #include "frameworkObjects.h" @@ -48,14 +48,14 @@ class ObjectManagerIF { * @param id The new id to be added to the list. * @param object A pointer to the object to be added. * @return @li INSERTION_FAILED in case the object could not be inserted. - * @li RETURN_OK in case the object was successfully inserted + * @li returnvalue::OK in case the object was successfully inserted */ virtual ReturnValue_t insert(object_id_t id, SystemObjectIF* object) = 0; /** * @brief With this call, an object is removed from the list. * @param id The object id of the object to be removed. * @return @li NOT_FOUND in case the object was not found - * @li RETURN_OK in case the object was successfully removed + * @li returnvalue::OK in case the object was successfully removed */ virtual ReturnValue_t remove(object_id_t id) = 0; virtual void initialize() = 0; diff --git a/src/fsfw/objectmanager/SystemObjectIF.h b/src/fsfw/objectmanager/SystemObjectIF.h index 02f24837..b9243de2 100644 --- a/src/fsfw/objectmanager/SystemObjectIF.h +++ b/src/fsfw/objectmanager/SystemObjectIF.h @@ -4,7 +4,7 @@ #include #include "../events/EventReportingProxyIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" /** * @defgroup system_objects Software System Object Management * The classes to create System Objects and classes to manage these are @@ -45,8 +45,8 @@ class SystemObjectIF : public EventReportingProxyIF { * which might not have been built yet. * Therefore, a two-step initialization resolves this problem and prevents * circular dependencies of not-fully initialized objects on start up. - * @return - @c RETURN_OK in case the initialization was successful - * - @c returnvalue::FAILED otherwise + * @return - @c returnvalue::OK in case the initialization was successful + * - @c returnvalue::FAILED otherwise */ virtual ReturnValue_t initialize() = 0; /** @@ -54,7 +54,7 @@ class SystemObjectIF : public EventReportingProxyIF { * for operation. * Some objects need certain other objects (or a certain number), to be * registered as children. These checks can be done in this method. - * @return - @c RETURN_OK in case the check was successful + * @return - @c returnvalue::OK in case the check was successful * - @c any other code otherwise */ virtual ReturnValue_t checkObjectConnections() = 0; diff --git a/src/fsfw/osal/InternalErrorCodes.h b/src/fsfw/osal/InternalErrorCodes.h index 5924d4c9..abec460f 100644 --- a/src/fsfw/osal/InternalErrorCodes.h +++ b/src/fsfw/osal/InternalErrorCodes.h @@ -1,7 +1,7 @@ #ifndef INTERNALERRORCODES_H_ #define INTERNALERRORCODES_H_ -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class InternalErrorCodes { public: diff --git a/src/fsfw/osal/common/TcpIpBase.h b/src/fsfw/osal/common/TcpIpBase.h index ccbd12ca..6cc71fbf 100644 --- a/src/fsfw/osal/common/TcpIpBase.h +++ b/src/fsfw/osal/common/TcpIpBase.h @@ -2,7 +2,7 @@ #define FSFW_OSAL_COMMON_TCPIPIF_H_ #include "../../platform.h" -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" #ifdef PLATFORM_WIN #include diff --git a/src/fsfw/osal/freertos/BinSemaphUsingTask.h b/src/fsfw/osal/freertos/BinSemaphUsingTask.h index a88863c9..480296ee 100644 --- a/src/fsfw/osal/freertos/BinSemaphUsingTask.h +++ b/src/fsfw/osal/freertos/BinSemaphUsingTask.h @@ -2,7 +2,7 @@ #define FSFW_OSAL_FREERTOS_BINSEMAPHUSINGTASK_H_ #include "FreeRTOS.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/SemaphoreIF.h" #include "task.h" @@ -20,7 +20,7 @@ * (for example in the initializeAfterTaskCreation() function) or * by calling refreshTaskHandle() with the correct executing task. */ -class BinarySemaphoreUsingTask : public SemaphoreIF, public HasReturnvaluesIF { +class BinarySemaphoreUsingTask : public SemaphoreIF { public: static const uint8_t INTERFACE_ID = CLASS_ID::SEMAPHORE_IF; @@ -50,7 +50,7 @@ class BinarySemaphoreUsingTask : public SemaphoreIF, public HasReturnvaluesIF { /** * Same as acquire() with timeout in FreeRTOS ticks. * @param timeoutTicks - * @return - @c RETURN_OK on success + * @return - @c returnvalue::OK on success * - @c returnvalue::FAILED on failure */ ReturnValue_t acquireWithTickTimeout(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -65,7 +65,7 @@ class BinarySemaphoreUsingTask : public SemaphoreIF, public HasReturnvaluesIF { /** * Wrapper function to give back semaphore from handle * @param semaphore - * @return - @c RETURN_OK on success + * @return - @c returnvalue::OK on success * - @c returnvalue::FAILED on failure */ static ReturnValue_t release(TaskHandle_t taskToNotify); @@ -76,7 +76,7 @@ class BinarySemaphoreUsingTask : public SemaphoreIF, public HasReturnvaluesIF { * @param higherPriorityTaskWoken This will be set to pdPASS if a task with * a higher priority was unblocked. A context switch should be requested * from an ISR if this is the case (see TaskManagement functions) - * @return - @c RETURN_OK on success + * @return - @c returnvalue::OK on success * - @c returnvalue::FAILED on failure */ static ReturnValue_t releaseFromISR(TaskHandle_t taskToNotify, diff --git a/src/fsfw/osal/freertos/BinarySemaphore.h b/src/fsfw/osal/freertos/BinarySemaphore.h index e2ca3c9d..bd1148ec 100644 --- a/src/fsfw/osal/freertos/BinarySemaphore.h +++ b/src/fsfw/osal/freertos/BinarySemaphore.h @@ -2,7 +2,7 @@ #define FSFW_OSAL_FREERTOS_BINARYSEMPAHORE_H_ #include "FreeRTOS.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/SemaphoreIF.h" #include "semphr.h" @@ -22,7 +22,7 @@ * @author R. Mueller * @ingroup osal */ -class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { +class BinarySemaphore : public SemaphoreIF { public: static const uint8_t INTERFACE_ID = CLASS_ID::SEMAPHORE_IF; @@ -47,7 +47,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { * for a maximum of #timeoutMs or until the semaphore is given back, * for example by an ISR or another task. * @param timeoutMs - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_TIMEOUT on timeout */ ReturnValue_t acquire(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -56,7 +56,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { /** * Same as lockBinarySemaphore() with timeout in FreeRTOS ticks. * @param timeoutTicks - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_TIMEOUT on timeout */ ReturnValue_t acquireWithTickTimeout(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -64,7 +64,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { /** * Release the binary semaphore. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if the semaphores is * already available. */ @@ -79,7 +79,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { /** * Wrapper function to give back semaphore from handle * @param semaphore - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if the semaphores is * already available. */ @@ -91,7 +91,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { * @param higherPriorityTaskWoken This will be set to pdPASS if a task with * a higher priority was unblocked. A context switch from an ISR should * then be requested (see TaskManagement functions) - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if the semaphores is * already available. */ diff --git a/src/fsfw/osal/freertos/CountingSemaphUsingTask.h b/src/fsfw/osal/freertos/CountingSemaphUsingTask.h index 86b27267..4426f29b 100644 --- a/src/fsfw/osal/freertos/CountingSemaphUsingTask.h +++ b/src/fsfw/osal/freertos/CountingSemaphUsingTask.h @@ -30,7 +30,7 @@ class CountingSemaphoreUsingTask : public SemaphoreIF { * for a maximum of #timeoutMs or until one is given back, * for example by an ISR or another task. * @param timeoutMs - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_TIMEOUT on timeout */ ReturnValue_t acquire(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -39,7 +39,7 @@ class CountingSemaphoreUsingTask : public SemaphoreIF { /** * Release a semaphore, increasing the number of available counting * semaphores up to the #maxCount value. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if #maxCount semaphores are * already available. */ @@ -59,7 +59,7 @@ class CountingSemaphoreUsingTask : public SemaphoreIF { /** * Acquire with a timeout value in ticks * @param timeoutTicks - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_TIMEOUT on timeout */ ReturnValue_t acquireWithTickTimeout(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -74,7 +74,7 @@ class CountingSemaphoreUsingTask : public SemaphoreIF { /** * Release semaphore of task by supplying task handle * @param taskToNotify - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if #maxCount semaphores are * already available. */ @@ -85,7 +85,7 @@ class CountingSemaphoreUsingTask : public SemaphoreIF { * @param higherPriorityTaskWoken This will be set to pdPASS if a task with * a higher priority was unblocked. A context switch should be requested * from an ISR if this is the case (see TaskManagement functions) - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if #maxCount semaphores are * already available. */ diff --git a/src/fsfw/osal/freertos/TaskFactory.cpp b/src/fsfw/osal/freertos/TaskFactory.cpp index c79a6cf1..688069cf 100644 --- a/src/fsfw/osal/freertos/TaskFactory.cpp +++ b/src/fsfw/osal/freertos/TaskFactory.cpp @@ -2,7 +2,7 @@ #include "fsfw/osal/freertos/FixedTimeslotTask.h" #include "fsfw/osal/freertos/PeriodicTask.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" TaskFactory* TaskFactory::factoryInstance = new TaskFactory(); diff --git a/src/fsfw/osal/freertos/TaskManagement.h b/src/fsfw/osal/freertos/TaskManagement.h index 825d8865..6dec15cc 100644 --- a/src/fsfw/osal/freertos/TaskManagement.h +++ b/src/fsfw/osal/freertos/TaskManagement.h @@ -3,7 +3,7 @@ #include -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" #include "FreeRTOS.h" #include "task.h" diff --git a/src/fsfw/osal/host/TaskFactory.cpp b/src/fsfw/osal/host/TaskFactory.cpp index e9415f5a..0a27241b 100644 --- a/src/fsfw/osal/host/TaskFactory.cpp +++ b/src/fsfw/osal/host/TaskFactory.cpp @@ -5,7 +5,7 @@ #include "fsfw/osal/host/FixedTimeslotTask.h" #include "fsfw/osal/host/PeriodicTask.h" #include "fsfw/osal/host/taskHelpers.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/tasks/PeriodicTaskIF.h" diff --git a/src/fsfw/osal/host/taskHelpers.h b/src/fsfw/osal/host/taskHelpers.h index 13a71d16..7d9ff33c 100644 --- a/src/fsfw/osal/host/taskHelpers.h +++ b/src/fsfw/osal/host/taskHelpers.h @@ -1,7 +1,7 @@ #ifndef FSFW_OSAL_HOST_TASKHELPERS_H_ #define FSFW_OSAL_HOST_TASKHELPERS_H_ -#include +#include #include diff --git a/src/fsfw/osal/linux/BinarySemaphore.h b/src/fsfw/osal/linux/BinarySemaphore.h index f75618a6..fe2c0db0 100644 --- a/src/fsfw/osal/linux/BinarySemaphore.h +++ b/src/fsfw/osal/linux/BinarySemaphore.h @@ -1,7 +1,7 @@ #ifndef FRAMEWORK_OSAL_LINUX_BINARYSEMPAHORE_H_ #define FRAMEWORK_OSAL_LINUX_BINARYSEMPAHORE_H_ -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" #include "../../tasks/SemaphoreIF.h" extern "C" { @@ -17,7 +17,7 @@ extern "C" { * @author R. Mueller * @ingroup osal */ -class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { +class BinarySemaphore : public SemaphoreIF { public: static const uint8_t INTERFACE_ID = CLASS_ID::SEMAPHORE_IF; @@ -45,7 +45,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { * for a maximum of #timeoutMs or until the semaphore is given back, * for example by an ISR or another task. * @param timeoutMs - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_TIMEOUT on timeout */ ReturnValue_t acquire(TimeoutType timeoutType = TimeoutType::BLOCKING, @@ -53,7 +53,7 @@ class BinarySemaphore : public SemaphoreIF, public HasReturnvaluesIF { /** * Release the binary semaphore. - * @return -@c RETURN_OK on success + * @return -@c returnvalue::OK on success * -@c SemaphoreIF::SEMAPHORE_NOT_OWNED if the semaphores is * already available. */ diff --git a/src/fsfw/osal/linux/Clock.cpp b/src/fsfw/osal/linux/Clock.cpp index 5afecb59..bfdcf4e2 100644 --- a/src/fsfw/osal/linux/Clock.cpp +++ b/src/fsfw/osal/linux/Clock.cpp @@ -92,7 +92,7 @@ ReturnValue_t Clock::getUptime(timeval* uptime) { // struct sysinfo sysInfo; // int result = sysinfo(&sysInfo); // if(result != 0){ -// return HasReturnvaluesIF::returnvalue::FAILED; +// return returnvalue::FAILED; // } // return sysInfo.uptime; //} diff --git a/src/fsfw/osal/linux/PosixThread.h b/src/fsfw/osal/linux/PosixThread.h index 78fdfa2b..add41bf6 100644 --- a/src/fsfw/osal/linux/PosixThread.h +++ b/src/fsfw/osal/linux/PosixThread.h @@ -7,7 +7,7 @@ #include -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" class PosixThread { public: diff --git a/src/fsfw/osal/linux/TaskFactory.cpp b/src/fsfw/osal/linux/TaskFactory.cpp index 2cd4fd67..bacc4311 100644 --- a/src/fsfw/osal/linux/TaskFactory.cpp +++ b/src/fsfw/osal/linux/TaskFactory.cpp @@ -2,7 +2,7 @@ #include "fsfw/osal/linux/FixedTimeslotTask.h" #include "fsfw/osal/linux/PeriodicPosixTask.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serviceinterface/ServiceInterface.h" // TODO: Different variant than the lazy loading in QueueFactory. What's better and why? diff --git a/src/fsfw/osal/rtems/FixedTimeslotTask.cpp b/src/fsfw/osal/rtems/FixedTimeslotTask.cpp index 77582d75..c1cc4460 100644 --- a/src/fsfw/osal/rtems/FixedTimeslotTask.cpp +++ b/src/fsfw/osal/rtems/FixedTimeslotTask.cpp @@ -6,7 +6,7 @@ #include #include "fsfw/osal/rtems/RtemsBasic.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serviceinterface/ServiceInterface.h" #if FSFW_CPP_OSTREAM_ENABLED == 1 diff --git a/src/fsfw/osal/rtems/RtemsBasic.h b/src/fsfw/osal/rtems/RtemsBasic.h index 3525799c..ea97c3af 100644 --- a/src/fsfw/osal/rtems/RtemsBasic.h +++ b/src/fsfw/osal/rtems/RtemsBasic.h @@ -8,7 +8,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class RtemsBasic { public: diff --git a/src/fsfw/osal/rtems/TaskFactory.cpp b/src/fsfw/osal/rtems/TaskFactory.cpp index f10e5cf3..4dbd254e 100644 --- a/src/fsfw/osal/rtems/TaskFactory.cpp +++ b/src/fsfw/osal/rtems/TaskFactory.cpp @@ -3,7 +3,7 @@ #include "fsfw/osal/rtems/FixedTimeslotTask.h" #include "fsfw/osal/rtems/PeriodicTask.h" #include "fsfw/osal/rtems/RtemsBasic.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" // TODO: Different variant than the lazy loading in QueueFactory. What's better and why? TaskFactory* TaskFactory::factoryInstance = new TaskFactory(); diff --git a/src/fsfw/parameters/HasParametersIF.h b/src/fsfw/parameters/HasParametersIF.h index 48557b4a..d586ceba 100644 --- a/src/fsfw/parameters/HasParametersIF.h +++ b/src/fsfw/parameters/HasParametersIF.h @@ -3,7 +3,7 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "ParameterWrapper.h" /** diff --git a/src/fsfw/parameters/ParameterWrapper.h b/src/fsfw/parameters/ParameterWrapper.h index 3b04199a..7767255e 100644 --- a/src/fsfw/parameters/ParameterWrapper.h +++ b/src/fsfw/parameters/ParameterWrapper.h @@ -4,7 +4,7 @@ #include #include "../globalfunctions/Type.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../serialize/SerializeAdapter.h" #include "../serialize/SerializeIF.h" @@ -58,7 +58,7 @@ class ParameterWrapper : public SerializeIF { * @param row * @param column * @return - * -@c RETURN_OK if element was retrieved successfully + * -@c returnvalue::OK if element was retrieved successfully * -@c NOT_SET data has not been set yet * -@c DATATYPE_MISSMATCH Invalid supplied type * -@c OUT_OF_BOUNDS Invalid row and/or column. diff --git a/src/fsfw/power/Fuse.h b/src/fsfw/power/Fuse.h index 1f880f3a..e8b86cfd 100644 --- a/src/fsfw/power/Fuse.h +++ b/src/fsfw/power/Fuse.h @@ -7,7 +7,7 @@ #include "../devicehandlers/HealthDevice.h" #include "../monitoring/AbsLimitMonitor.h" #include "../parameters/ParameterHelper.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "PowerComponentIF.h" #include "PowerSwitchIF.h" namespace Factory { diff --git a/src/fsfw/power/PowerSwitchIF.h b/src/fsfw/power/PowerSwitchIF.h index 054923f4..e8c9aff4 100644 --- a/src/fsfw/power/PowerSwitchIF.h +++ b/src/fsfw/power/PowerSwitchIF.h @@ -2,7 +2,7 @@ #define FSFW_POWER_POWERSWITCHIF_H_ #include "../events/Event.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "definitions.h" /** * @@ -20,7 +20,7 @@ class PowerSwitchIF { */ virtual ~PowerSwitchIF() {} /** - * The Returnvalues id of this class, required by HasReturnvaluesIF + * The Returnvalues id of this class */ static const uint8_t INTERFACE_ID = CLASS_ID::POWER_SWITCH_IF; static const ReturnValue_t SWITCH_ON = MAKE_RETURN_CODE(1); diff --git a/src/fsfw/power/PowerSwitcher.h b/src/fsfw/power/PowerSwitcher.h index 7aa60494..7a38336c 100644 --- a/src/fsfw/power/PowerSwitcher.h +++ b/src/fsfw/power/PowerSwitcher.h @@ -2,7 +2,7 @@ #define FSFW_POWER_POWERSWITCHER_H_ #include "../objectmanager/SystemObjectIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../timemanager/Countdown.h" #include "PowerSwitchIF.h" diff --git a/src/fsfw/pus/CService200ModeCommanding.cpp b/src/fsfw/pus/CService200ModeCommanding.cpp index 3f37bec7..69c057ea 100644 --- a/src/fsfw/pus/CService200ModeCommanding.cpp +++ b/src/fsfw/pus/CService200ModeCommanding.cpp @@ -41,7 +41,7 @@ ReturnValue_t CService200ModeCommanding::getMessageQueueAndObject(uint8_t subser ReturnValue_t CService200ModeCommanding::checkInterfaceAndAcquireMessageQueue( MessageQueueId_t *messageQueueToSet, object_id_t *objectId) { - HasModesIF *destination = ObjectManager::instance()->get(*objectId); + auto *destination = ObjectManager::instance()->get(*objectId); if (destination == nullptr) { return CommandingServiceBase::INVALID_OBJECT; } diff --git a/src/fsfw/pus/Service11TelecommandScheduling.h b/src/fsfw/pus/Service11TelecommandScheduling.h index 2d855be1..85d615e3 100644 --- a/src/fsfw/pus/Service11TelecommandScheduling.h +++ b/src/fsfw/pus/Service11TelecommandScheduling.h @@ -37,12 +37,9 @@ class Service11TelecommandScheduling final : public PusServiceBase { public: static constexpr uint8_t CLASS_ID = CLASS_ID::PUS_SERVICE_11; - static constexpr ReturnValue_t INVALID_TYPE_TIME_WINDOW = - HasReturnvaluesIF::makeReturnCode(CLASS_ID, 1); - static constexpr ReturnValue_t TIMESHIFTING_NOT_POSSIBLE = - HasReturnvaluesIF::makeReturnCode(CLASS_ID, 2); - static constexpr ReturnValue_t INVALID_RELATIVE_TIME = - HasReturnvaluesIF::makeReturnCode(CLASS_ID, 3); + static constexpr ReturnValue_t INVALID_TYPE_TIME_WINDOW = returnvalue::makeCode(CLASS_ID, 1); + static constexpr ReturnValue_t TIMESHIFTING_NOT_POSSIBLE = returnvalue::makeCode(CLASS_ID, 2); + static constexpr ReturnValue_t INVALID_RELATIVE_TIME = returnvalue::makeCode(CLASS_ID, 3); static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PUS_SERVICE_11; @@ -122,31 +119,31 @@ class Service11TelecommandScheduling final : public PusServiceBase { ReturnValue_t handleResetCommand(); /** * @brief Logic to be performed on an incoming TC[11,4]. - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t doInsertActivity(const uint8_t* data, size_t size); /** * @brief Logic to be performed on an incoming TC[11,5]. - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t doDeleteActivity(const uint8_t* data, size_t size); /** * @brief Logic to be performed on an incoming TC[11,6]. - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t doFilterDeleteActivity(const uint8_t* data, size_t size); /** * @brief Logic to be performed on an incoming TC[11,7]. - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t doTimeshiftActivity(const uint8_t* data, size_t size); /** * @brief Logic to be performed on an incoming TC[11,8]. - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t doFilterTimeshiftActivity(const uint8_t* data, size_t size); @@ -166,7 +163,7 @@ class Service11TelecommandScheduling final : public PusServiceBase { * @param data Pointer to first byte described data * @param dataSize Remaining size of data NOTE: non-const, this is modified by the function * @param [out] requestId Request ID - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t getRequestIdFromData(const uint8_t*& data, size_t& dataSize, uint64_t& requestId); @@ -185,7 +182,7 @@ class Service11TelecommandScheduling final : public PusServiceBase { * @param dataSize TC data size * @param [out] itBegin Begin of filter range * @param [out] itEnd End of filter range - * @return RETURN_OK if successful + * @return returnvalue::OK if successful */ ReturnValue_t getMapFilterFromData(const uint8_t*& data, size_t& size, TcMapIter& itBegin, TcMapIter& itEnd); diff --git a/src/fsfw/pus/Service1TelecommandVerification.h b/src/fsfw/pus/Service1TelecommandVerification.h index 6d16c7a9..fa4aba7c 100644 --- a/src/fsfw/pus/Service1TelecommandVerification.h +++ b/src/fsfw/pus/Service1TelecommandVerification.h @@ -3,7 +3,7 @@ #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tmtcservices/AcceptsVerifyMessageIF.h" #include "fsfw/tmtcservices/PusVerificationReport.h" diff --git a/src/fsfw/returnvalues/HasReturnvaluesIF.h b/src/fsfw/returnvalues/HasReturnvaluesIF.h index 6e7fd7a8..325b07e9 100644 --- a/src/fsfw/returnvalues/HasReturnvaluesIF.h +++ b/src/fsfw/returnvalues/HasReturnvaluesIF.h @@ -1,32 +1,8 @@ -#ifndef FSFW_RETURNVALUES_RETURNVALUES_H_ -#define FSFW_RETURNVALUES_RETURNVALUES_H_ +#ifndef FSFW_RETURNVALUES_HASRETURNVALUES_IF_H_ +#define FSFW_RETURNVALUES_HASRETURNVALUES_IF_H_ -#include +#warning "This header is deprecated, please include returnvalue.h" -#include +#include "returnvalue.h" -#include "FwClassIds.h" - -#define MAKE_RETURN_CODE(number) ((INTERFACE_ID << 8) + (number)) - -typedef uint16_t ReturnValue_t; - -namespace returnvalue { - -static const ReturnValue_t OK = 0; -static const ReturnValue_t FAILED = 1; - -/** - * It is discouraged to use the input parameters 0,0 and 0,1 as this - * will generate the RETURN_OK and returnvalue::FAILED returnvalues. - * @param interfaceId - * @param number - * @return - */ -static constexpr ReturnValue_t makeCode(uint8_t classId, uint8_t number) { - return (static_cast(classId) << 8) + number; -} - -} // namespace returnvalue - -#endif /* FSFW_RETURNVALUES_RETURNVALUES_H_ */ +#endif /* FSFW_RETURNVALUES_HASRETURNVALUES_IF_H_ */ diff --git a/src/fsfw/returnvalues/returnvalue.h b/src/fsfw/returnvalues/returnvalue.h new file mode 100644 index 00000000..4f9fc092 --- /dev/null +++ b/src/fsfw/returnvalues/returnvalue.h @@ -0,0 +1,31 @@ +#ifndef FSFW_RETURNVALUES_RETURNVALUE_H_ +#define FSFW_RETURNVALUES_RETURNVALUE_H_ + +#include + +#include + +#include "FwClassIds.h" + +#define MAKE_RETURN_CODE(number) ((INTERFACE_ID << 8) + (number)) + +typedef uint16_t ReturnValue_t; + +namespace returnvalue { +static const ReturnValue_t OK = 0; +static const ReturnValue_t FAILED = 1; + +/** + * It is discouraged to use the input parameters 0,0 and 0,1 as this + * will generate the returnvalue::OK and returnvalue::FAILED returnvalues. + * @param interfaceId + * @param number + * @return + */ +static constexpr ReturnValue_t makeCode(uint8_t classId, uint8_t number) { + return (static_cast(classId) << 8) + number; +} + +} // namespace returnvalue + +#endif /* FSFW_RETURNVALUES_RETURNVALUE_H_ */ diff --git a/src/fsfw/retval.h b/src/fsfw/retval.h index 43c4e127..1ef15ab3 100644 --- a/src/fsfw/retval.h +++ b/src/fsfw/retval.h @@ -1,6 +1,6 @@ #ifndef FSFW_RETVAL_H #define FSFW_RETVAL_H -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #endif // FSFW_RETVAL_H diff --git a/src/fsfw/rmap/RMAP.h b/src/fsfw/rmap/RMAP.h index d274fb15..df6eaf5e 100644 --- a/src/fsfw/rmap/RMAP.h +++ b/src/fsfw/rmap/RMAP.h @@ -1,7 +1,7 @@ #ifndef FSFW_RMAP_RMAP_H_ #define FSFW_RMAP_RMAP_H_ -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/rmap/RMAPCookie.h" #include "rmapConf.h" @@ -36,7 +36,7 @@ * assignment can be changed at runtime to allow for example redundancy switching. This API is * static as the information which channel to use is contained within the cookie. */ -class RMAP : public HasReturnvaluesIF { +class RMAP { public: static const uint8_t INTERFACE_ID = CLASS_ID::RMAP_CHANNEL; diff --git a/src/fsfw/rmap/RMAPChannelIF.h b/src/fsfw/rmap/RMAPChannelIF.h index 9e666dfb..60d439d0 100644 --- a/src/fsfw/rmap/RMAPChannelIF.h +++ b/src/fsfw/rmap/RMAPChannelIF.h @@ -4,7 +4,7 @@ #include #include "RMAPCookie.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "rmapConf.h" class RMAPChannelIF { @@ -21,7 +21,7 @@ class RMAPChannelIF { * @return * - @c LINK_DOWN when the link is down and all replies were missed * - @c COMMAND_CHANNEL_DEACTIVATED if the channel's port is NULL - * - @c RETURN_OK else + * - @c returnvalue::OK else */ virtual ReturnValue_t reset() = 0; @@ -72,7 +72,7 @@ class RMAPChannelIF { * @param data data to be sent * @param datalen length of data * @return - * - @c RETURN_OK + * - @c returnvalue::OK * - @c COMMAND_NO_DESCRIPTORS_AVAILABLE no descriptors available for sending * command; command was not sent * - @c COMMAND_BUFFER_FULL no receiver buffer available for diff --git a/src/fsfw/rmap/RmapDeviceCommunicationIF.h b/src/fsfw/rmap/RmapDeviceCommunicationIF.h index abe94685..9bbf8466 100644 --- a/src/fsfw/rmap/RmapDeviceCommunicationIF.h +++ b/src/fsfw/rmap/RmapDeviceCommunicationIF.h @@ -25,7 +25,7 @@ class RmapDeviceCommunicationIF : public DeviceCommunicationIF { * this can be performed in this function, which is called on device handler * initialization. * @param cookie - * @return -@c RETURN_OK if initialization was successfull + * @return -@c returnvalue::OK if initialization was successfull * - Everything else triggers failure event with returnvalue as parameter 1 */ virtual ReturnValue_t initializeInterface(CookieIF *cookie) = 0; @@ -37,7 +37,7 @@ class RmapDeviceCommunicationIF : public DeviceCommunicationIF { * @param cookie * @param data * @param len - * @return -@c RETURN_OK for successfull send + * @return -@c returnvalue::OK for successfull send * - Everything else triggers failure event with returnvalue as parameter 1 */ virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData, size_t sendLen); @@ -46,7 +46,7 @@ class RmapDeviceCommunicationIF : public DeviceCommunicationIF { * Called by DHB in the GET_WRITE doGetWrite(). * Get send confirmation that the data in sendMessage() was sent successfully. * @param cookie - * @return -@c RETURN_OK if data was sent successfull + * @return -@c returnvalue::OK if data was sent successfull * - Everything else triggers falure event with returnvalue as parameter 1 */ virtual ReturnValue_t getSendSuccess(CookieIF *cookie); @@ -57,7 +57,7 @@ class RmapDeviceCommunicationIF : public DeviceCommunicationIF { * from a device. * * @param cookie - * @return -@c RETURN_OK to confirm the request for data has been sent. + * @return -@c returnvalue::OK to confirm the request for data has been sent. * -@c NO_READ_REQUEST if no request shall be made. readReceivedMessage() * will not be called in the respective communication cycle. * - Everything else triggers failure event with returnvalue as parameter 1 @@ -71,7 +71,7 @@ class RmapDeviceCommunicationIF : public DeviceCommunicationIF { * @param cookie * @param data * @param len - * @return @c RETURN_OK for successfull receive + * @return @c returnvalue::OK for successfull receive * - Everything else triggers failure event with returnvalue as parameter 1 */ virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size); diff --git a/src/fsfw/serialize/SerializeAdapter.h b/src/fsfw/serialize/SerializeAdapter.h index 5b51e747..3c478271 100644 --- a/src/fsfw/serialize/SerializeAdapter.h +++ b/src/fsfw/serialize/SerializeAdapter.h @@ -4,7 +4,7 @@ #include #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "EndianConverter.h" #include "SerializeIF.h" @@ -40,7 +40,7 @@ class SerializeAdapter { * @return * - @c BUFFER_TOO_SHORT The given buffer in is too short * - @c returnvalue::FAILED Generic Error - * - @c RETURN_OK Successful serialization + * - @c returnvalue::OK Successful serialization */ template static ReturnValue_t serialize(const T *object, uint8_t **buffer, size_t *size, size_t maxSize, @@ -65,7 +65,7 @@ class SerializeAdapter { * @return * - @c BUFFER_TOO_SHORT The given buffer in is too short * - @c returnvalue::FAILED Generic Error - * - @c RETURN_OK Successful serialization + * - @c returnvalue::OK Successful serialization */ template static ReturnValue_t serialize(const T *object, uint8_t *const buffer, size_t *serSize, @@ -114,7 +114,7 @@ class SerializeAdapter { * - @c STREAM_TOO_SHORT The input stream is too short to deSerialize the object * - @c TOO_MANY_ELEMENTS The buffer has more inputs than expected * - @c returnvalue::FAILED Generic Error - * - @c RETURN_OK Successful deserialization + * - @c returnvalue::OK Successful deserialization */ template static ReturnValue_t deSerialize(T *object, const uint8_t **buffer, size_t *size, @@ -137,7 +137,7 @@ class SerializeAdapter { * - @c STREAM_TOO_SHORT The input stream is too short to deSerialize the object * - @c TOO_MANY_ELEMENTS The buffer has more inputs than expected * - @c returnvalue::FAILED Generic Error - * - @c RETURN_OK Successful deserialization + * - @c returnvalue::OK Successful deserialization */ template static ReturnValue_t deSerialize(T *object, const uint8_t *buffer, size_t *deserSize, diff --git a/src/fsfw/serialize/SerializeIF.h b/src/fsfw/serialize/SerializeIF.h index a02b5f9e..85c29827 100644 --- a/src/fsfw/serialize/SerializeIF.h +++ b/src/fsfw/serialize/SerializeIF.h @@ -3,7 +3,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @defgroup serialize Serialization @@ -57,7 +57,7 @@ class SerializeIF { * @return * - @c BUFFER_TOO_SHORT The given buffer in is too short * - @c returnvalue::FAILED Generic error - * - @c RETURN_OK Successful serialization + * - @c returnvalue::OK Successful serialization */ [[nodiscard]] virtual ReturnValue_t serialize(uint8_t **buffer, size_t *size, size_t maxSize, Endianness streamEndianness) const = 0; @@ -93,7 +93,7 @@ class SerializeIF { * - @c STREAM_TOO_SHORT The input stream is too short to deSerialize the object * - @c TOO_MANY_ELEMENTS The buffer has more inputs than expected * - @c returnvalue::FAILED Generic Error - * - @c RETURN_OK Successful deserialization + * - @c returnvalue::OK Successful deserialization */ virtual ReturnValue_t deSerialize(const uint8_t **buffer, size_t *size, Endianness streamEndianness) = 0; diff --git a/src/fsfw/serviceinterface/ServiceInterfaceBuffer.h b/src/fsfw/serviceinterface/ServiceInterfaceBuffer.h index 9cda75c6..2ecf88d8 100644 --- a/src/fsfw/serviceinterface/ServiceInterfaceBuffer.h +++ b/src/fsfw/serviceinterface/ServiceInterfaceBuffer.h @@ -3,7 +3,7 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #if FSFW_CPP_OSTREAM_ENABLED == 1 diff --git a/src/fsfw/storagemanager/ConstStorageAccessor.h b/src/fsfw/storagemanager/ConstStorageAccessor.h index a2ddad6c..9cad346c 100644 --- a/src/fsfw/storagemanager/ConstStorageAccessor.h +++ b/src/fsfw/storagemanager/ConstStorageAccessor.h @@ -3,7 +3,7 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "storeAddress.h" class StorageManagerIF; diff --git a/src/fsfw/storagemanager/LocalPool.h b/src/fsfw/storagemanager/LocalPool.h index 1c1d4006..a82da971 100644 --- a/src/fsfw/storagemanager/LocalPool.h +++ b/src/fsfw/storagemanager/LocalPool.h @@ -139,7 +139,7 @@ class LocalPool : public SystemObject, public StorageManagerIF { * With this helper method, a free element of @c size is reserved. * @param size The minimum packet size that shall be reserved. * @param[out] address Storage ID of the reserved data. - * @return - #RETURN_OK on success, + * @return - returnvalue::OK on success, * - the return codes of #getPoolIndex or #findEmpty otherwise. */ virtual ReturnValue_t reserveSpace(const size_t size, store_address_t* address, bool ignoreFault); @@ -211,7 +211,7 @@ class LocalPool : public SystemObject, public StorageManagerIF { * fits is used. * @param packet_size The size of the data to be stored. * @param[out] poolIndex The fitting pool index found. - * @return - @c RETURN_OK on success, + * @return - @c returnvalue::OK on success, * - @c DATA_TOO_LARGE otherwise. */ ReturnValue_t getSubPoolIndex(size_t packetSize, uint16_t* subpoolIndex, @@ -231,7 +231,7 @@ class LocalPool : public SystemObject, public StorageManagerIF { * duration grows with the fill level of the pool. * @param pool_index The pool in which the search is performed. * @param[out] element The first found element in the pool. - * @return - #RETURN_OK on success, + * @return - returnvalue::OK on success, * - #DATA_STORAGE_FULL if the store is full */ ReturnValue_t findEmpty(n_pool_elem_t poolIndex, uint16_t* element); diff --git a/src/fsfw/storagemanager/StorageManagerIF.h b/src/fsfw/storagemanager/StorageManagerIF.h index 11bdacad..228d380b 100644 --- a/src/fsfw/storagemanager/StorageManagerIF.h +++ b/src/fsfw/storagemanager/StorageManagerIF.h @@ -5,7 +5,7 @@ #include #include "../events/Event.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "StorageAccessor.h" #include "storeAddress.h" @@ -63,9 +63,8 @@ class StorageManagerIF { * @param storageId A pointer to the storageId to retrieve. * @param data The data to be stored in the StorageManager. * @param size The amount of data to be stored. - * @return Returns @li RETURN_OK if data was added. - * @li returnvalue::FAILED if data could not be added. - * storageId is unchanged then. + * @return Returns @returnvalue::OK if data was added. + * @returnvalue::FAILED if data could not be added, storageId is unchanged then. */ virtual ReturnValue_t addData(store_address_t* storageId, const uint8_t* data, size_t size, bool ignoreFault = false) = 0; @@ -73,7 +72,7 @@ class StorageManagerIF { * @brief With deleteData, the storageManager frees the memory region * identified by packet_id. * @param packet_id The identifier of the memory region to be freed. - * @return @li RETURN_OK on success. + * @return @li returnvalue::OK on success. * @li returnvalue::FAILED if deletion did not work * (e.g. an illegal packet_id was passed). */ @@ -84,7 +83,7 @@ class StorageManagerIF { * @param buffer Pointer to the data. * @param size Size of data to be stored. * @param storeId Store id of the deleted element (optional) - * @return @li RETURN_OK on success. + * @return @li returnvalue::OK on success. * @li failure code if deletion did not work */ virtual ReturnValue_t deleteData(uint8_t* buffer, size_t size, @@ -116,8 +115,8 @@ class StorageManagerIF { * @param packet_ptr The passed pointer address is set to the the memory * position * @param size The exact size of the stored data is returned here. - * @return @li RETURN_OK on success. - * @li returnvalue::FAILED if fetching data did not work + * @return @returnvalue::OK on success. + * @returnvalue::FAILED if fetching data did not work * (e.g. an illegal packet_id was passed). */ virtual ReturnValue_t getData(store_address_t packet_id, const uint8_t** packet_ptr, @@ -156,9 +155,8 @@ class StorageManagerIF { * @param storageId A pointer to the storageId to retrieve. * @param size The size of the space to be reserved. * @param p_data A pointer to the element data is returned here. - * @return Returns @li RETURN_OK if data was added. - * @li returnvalue::FAILED if data could not be added. - * storageId is unchanged then. + * @return Returns @li returnvalue::OK if data was added. + * @returnvalue::FAILED if data could not be added, storageId is unchanged then. */ virtual ReturnValue_t getFreeElement(store_address_t* storageId, size_t size, uint8_t** p_data, bool ignoreFault = false) = 0; diff --git a/src/fsfw/subsystem/SubsystemBase.cpp b/src/fsfw/subsystem/SubsystemBase.cpp index 17bbdf46..86ee251a 100644 --- a/src/fsfw/subsystem/SubsystemBase.cpp +++ b/src/fsfw/subsystem/SubsystemBase.cpp @@ -223,14 +223,14 @@ ReturnValue_t SubsystemBase::handleModeReply(CommandMessage* message) { return returnvalue::OK; // case ModeMessage::CMD_MODE_COMMAND: // handleCommandedMode(message); - // return RETURN_OK; + // return returnvalue::OK; // case ModeMessage::CMD_MODE_ANNOUNCE: // triggerEvent(MODE_INFO, mode, submode); - // return RETURN_OK; + // return returnvalue::OK; // case ModeMessage::CMD_MODE_ANNOUNCE_RECURSIVELY: // triggerEvent(MODE_INFO, mode, submode); // commandAllChildren(message); - // return RETURN_OK; + // return returnvalue::OK; default: return returnvalue::FAILED; } diff --git a/src/fsfw/subsystem/SubsystemBase.h b/src/fsfw/subsystem/SubsystemBase.h index ad341b80..6db9efa5 100644 --- a/src/fsfw/subsystem/SubsystemBase.h +++ b/src/fsfw/subsystem/SubsystemBase.h @@ -9,7 +9,7 @@ #include "../ipc/MessageQueueIF.h" #include "../modes/HasModesIF.h" #include "../objectmanager/SystemObject.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../tasks/ExecutableObjectIF.h" #include "modes/HasModeSequenceIF.h" @@ -42,7 +42,7 @@ class SubsystemBase : public SystemObject, * Also adds them to the internal childrenMap. * * @param objectId - * @return RETURN_OK if successful + * @return returnvalue::OK if successful * CHILD_DOESNT_HAVE_MODES if Child is no HasHealthIF and no HasModesIF * COULD_NOT_INSERT_CHILD If the Child could not be added to the ChildrenMap */ diff --git a/src/fsfw/subsystem/modes/ModeStoreIF.h b/src/fsfw/subsystem/modes/ModeStoreIF.h index 79215971..3d56f992 100644 --- a/src/fsfw/subsystem/modes/ModeStoreIF.h +++ b/src/fsfw/subsystem/modes/ModeStoreIF.h @@ -7,7 +7,7 @@ #include "../../container/ArrayList.h" #include "../../container/SinglyLinkedList.h" -#include "../../returnvalues/HasReturnvaluesIF.h" +#include "../../returnvalues/returnvalue.h" #include "ModeDefinitions.h" class ModeStoreIF { diff --git a/src/fsfw/tasks/ExecutableObjectIF.h b/src/fsfw/tasks/ExecutableObjectIF.h index 60f38259..1e3f19e4 100644 --- a/src/fsfw/tasks/ExecutableObjectIF.h +++ b/src/fsfw/tasks/ExecutableObjectIF.h @@ -5,7 +5,7 @@ class PeriodicTaskIF; #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" /** * @brief The interface provides a method to execute objects within a task. * @details The performOperation method, that is required by the interface is diff --git a/src/fsfw/tasks/FixedSlotSequence.cpp b/src/fsfw/tasks/FixedSlotSequence.cpp index e538c9fc..cba7a87a 100644 --- a/src/fsfw/tasks/FixedSlotSequence.cpp +++ b/src/fsfw/tasks/FixedSlotSequence.cpp @@ -16,7 +16,7 @@ FixedSlotSequence::~FixedSlotSequence() { void FixedSlotSequence::executeAndAdvance() { current->executableObject->performOperation(current->opcode); - // if (returnValue != RETURN_OK) { + // if (returnValue != returnvalue::OK) { // this->sendErrorMessage( returnValue ); // } // Increment the polling Sequence iterator diff --git a/src/fsfw/tasks/PeriodicTaskIF.h b/src/fsfw/tasks/PeriodicTaskIF.h index 04415533..d1bbf456 100644 --- a/src/fsfw/tasks/PeriodicTaskIF.h +++ b/src/fsfw/tasks/PeriodicTaskIF.h @@ -29,7 +29,7 @@ class PeriodicTaskIF { * The objects are executed in the order added. The object needs to implement * ExecutableObjectIF * @param object Id of the object to add. - * @return RETURN_OK on success, returnvalue::FAILED if the object could not be added. + * @return returnvalue::OK on success, returnvalue::FAILED if the object could not be added. */ virtual ReturnValue_t addComponent(object_id_t object, uint8_t opCode) = 0; virtual ReturnValue_t addComponent(object_id_t object) { return addComponent(object, 0); }; @@ -38,7 +38,7 @@ class PeriodicTaskIF { * Adds an object to the list of objects to be executed. * The objects are executed in the order added. * @param object pointer to the object to add. - * @return RETURN_OK on success, returnvalue::FAILED if the object could not be added. + * @return returnvalue::OK on success, returnvalue::FAILED if the object could not be added. */ virtual ReturnValue_t addComponent(ExecutableObjectIF* object, uint8_t opCode) = 0; virtual ReturnValue_t addComponent(ExecutableObjectIF* object) { return addComponent(object, 0); } diff --git a/src/fsfw/tasks/SemaphoreIF.h b/src/fsfw/tasks/SemaphoreIF.h index 3f544de8..9a692e9b 100644 --- a/src/fsfw/tasks/SemaphoreIF.h +++ b/src/fsfw/tasks/SemaphoreIF.h @@ -3,7 +3,7 @@ #include #include "../returnvalues/FwClassIds.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" /** * @brief Generic interface for semaphores, which can be used to achieve @@ -46,14 +46,14 @@ class SemaphoreIF { * for a maximum of timeoutMs while trying to acquire the semaphore. * This can be used to achieve task synchrnization. * @param timeoutMs - * @return - c RETURN_OK for successfull acquisition + * @return - c returnvalue::OK for successfull acquisition */ virtual ReturnValue_t acquire(TimeoutType timeoutType = TimeoutType::BLOCKING, uint32_t timeoutMs = 0) = 0; /** * Corrensponding call to release a semaphore. - * @return -@c RETURN_OK for successfull release + * @return -@c returnvalue::OK for successfull release */ virtual ReturnValue_t release() = 0; diff --git a/src/fsfw/tcdistribution/CCSDSDistributorIF.h b/src/fsfw/tcdistribution/CCSDSDistributorIF.h index f4ca9505..2ad012a0 100644 --- a/src/fsfw/tcdistribution/CCSDSDistributorIF.h +++ b/src/fsfw/tcdistribution/CCSDSDistributorIF.h @@ -17,8 +17,8 @@ class CCSDSDistributorIF { * With this call, a class implementing the CCSDSApplicationIF can register * at the distributor. * @param application A pointer to the Application to register. - * @return - @c RETURN_OK on success, - * - @c returnvalue::FAILED on failure. + * @return - @c returnvalue::OK on success, + * - @c returnvalue::FAILED on failure. */ virtual ReturnValue_t registerApplication(AcceptsTelecommandsIF* application) = 0; /** @@ -27,8 +27,8 @@ class CCSDSDistributorIF { * @param apid The APID to register. * @param id The MessageQueueId of the message queue to send the * TC Packets to. - * @return - @c RETURN_OK on success, - * - @c returnvalue::FAILED on failure. + * @return - @c returnvalue::OK on success, + * - @c returnvalue::FAILED on failure. */ virtual ReturnValue_t registerApplication(uint16_t apid, MessageQueueId_t id) = 0; /** diff --git a/src/fsfw/tcdistribution/CFDPDistributor.cpp b/src/fsfw/tcdistribution/CFDPDistributor.cpp index 796e3cf2..1aa4adf9 100644 --- a/src/fsfw/tcdistribution/CFDPDistributor.cpp +++ b/src/fsfw/tcdistribution/CFDPDistributor.cpp @@ -101,10 +101,10 @@ ReturnValue_t CFDPDistributor::registerHandler(AcceptsTelecommandsIF* handler) { MessageQueueId_t CFDPDistributor::getRequestQueue() { return tcQueue->getId(); } // ReturnValue_t CFDPDistributor::callbackAfterSending(ReturnValue_t queueStatus) { -// if (queueStatus != RETURN_OK) { +// if (queueStatus != returnvalue::OK) { // tcStatus = queueStatus; // } -// if (tcStatus != RETURN_OK) { +// if (tcStatus != returnvalue::OK) { // this->verifyChannel.sendFailureReport(tc_verification::ACCEPTANCE_FAILURE, // currentPacket, tcStatus); // // A failed packet is deleted immediately after reporting, @@ -114,7 +114,7 @@ MessageQueueId_t CFDPDistributor::getRequestQueue() { return tcQueue->getId(); } // } else { // this->verifyChannel.sendSuccessReport(tc_verification::ACCEPTANCE_SUCCESS, // currentPacket); -// return RETURN_OK; +// return returnvalue::OK; // } // } diff --git a/src/fsfw/tcdistribution/CFDPDistributor.h b/src/fsfw/tcdistribution/CFDPDistributor.h index e7776f1b..1d0e4238 100644 --- a/src/fsfw/tcdistribution/CFDPDistributor.h +++ b/src/fsfw/tcdistribution/CFDPDistributor.h @@ -3,8 +3,9 @@ #include -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" #include "../tmtcpacket/cfdp/CfdpPacketStored.h" + #include "../tmtcservices/AcceptsTelecommandsIF.h" #include "../tmtcservices/VerificationReporter.h" #include "CFDPDistributorIF.h" diff --git a/src/fsfw/tcdistribution/CFDPDistributorIF.h b/src/fsfw/tcdistribution/CFDPDistributorIF.h index 4b7ec807..101ffa15 100644 --- a/src/fsfw/tcdistribution/CFDPDistributorIF.h +++ b/src/fsfw/tcdistribution/CFDPDistributorIF.h @@ -17,8 +17,8 @@ class CFDPDistributorIF { /** * With this method, Handlers can register themselves at the CFDP Distributor. * @param handler A pointer to the registering Handler. - * @return - @c RETURN_OK on success, - * - @c returnvalue::FAILED on failure. + * @return - @c returnvalue::OK on success, + * - @c returnvalue::FAILED on failure. */ virtual ReturnValue_t registerHandler(AcceptsTelecommandsIF* handler) = 0; }; diff --git a/src/fsfw/tcdistribution/CcsdsPacketCheckIF.h b/src/fsfw/tcdistribution/CcsdsPacketCheckIF.h index 6c83532e..1406bc36 100644 --- a/src/fsfw/tcdistribution/CcsdsPacketCheckIF.h +++ b/src/fsfw/tcdistribution/CcsdsPacketCheckIF.h @@ -1,7 +1,11 @@ #ifndef FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_ #define FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_ +<<<<<<< HEAD:src/fsfw/tcdistribution/CcsdsPacketCheckIF.h #include +======= +#include "../returnvalues/returnvalue.h" +>>>>>>> origin/development:src/fsfw/tcdistribution/TcPacketCheckIF.h #include "fsfw/returnvalues/HasReturnvaluesIF.h" @@ -22,8 +26,8 @@ class CcsdsPacketCheckIF { * This is the actual method to formally check a certain Packet. * The packet's Application Data can not be checked here. * @param current_packet The packet to check - * @return - @c RETURN_OK on success. - * - @c INCORRECT_CHECKSUM if checksum is invalid. + * @return - @c returnvalue::OK on success. + * - @c INCORRECT_CHECKSUM if checksum is invalid. * - @c ILLEGAL_APID if APID does not match. */ virtual ReturnValue_t checkPacket(const SpacePacketReader& currentPacket, size_t packetLen) = 0; diff --git a/src/fsfw/tcdistribution/PUSDistributorIF.h b/src/fsfw/tcdistribution/PUSDistributorIF.h index 85619fee..85a80b46 100644 --- a/src/fsfw/tcdistribution/PUSDistributorIF.h +++ b/src/fsfw/tcdistribution/PUSDistributorIF.h @@ -17,8 +17,8 @@ class PUSDistributorIF { /** * With this method, Services can register themselves at the PUS Distributor. * @param service A pointer to the registering Service. - * @return - @c RETURN_OK on success, - * - @c returnvalue::FAILED on failure. + * @return - @c returnvalue::OK on success, + * - @c returnvalue::FAILED on failure. */ virtual ReturnValue_t registerService(AcceptsTelecommandsIF* service) = 0; }; diff --git a/src/fsfw/tcdistribution/PusDistributor.h b/src/fsfw/tcdistribution/PusDistributor.h index 7daf5d83..d2265f95 100644 --- a/src/fsfw/tcdistribution/PusDistributor.h +++ b/src/fsfw/tcdistribution/PusDistributor.h @@ -4,7 +4,7 @@ #include "PUSDistributorIF.h" #include "PusPacketChecker.h" #include "TcDistributor.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tmtcpacket/pus/tc.h" #include "fsfw/tmtcservices/AcceptsTelecommandsIF.h" #include "fsfw/tmtcservices/VerificationReporter.h" diff --git a/src/fsfw/tcdistribution/TcDistributor.h b/src/fsfw/tcdistribution/TcDistributor.h index 7c7e539c..bc1534a6 100644 --- a/src/fsfw/tcdistribution/TcDistributor.h +++ b/src/fsfw/tcdistribution/TcDistributor.h @@ -6,7 +6,7 @@ #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/objectmanager/ObjectManagerIF.h" #include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/storagemanager/StorageManagerIF.h" #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tmtcservices/TmTcMessage.h" @@ -101,11 +101,11 @@ class TcDistributor : public SystemObject, public ExecutableObjectIF { * This method gives the child class a chance to perform some kind of * operation after the parent tried to forward the message. * A typically application would be sending success/failure messages. - * The default implementation just returns @c RETURN_OK. + * The default implementation just returns @c returnvalue::OK. * @param queueStatus The status of the message queue after an attempt * to send the TC. - * @return - @c RETURN_OK on success - * - @c returnvalue::FAILED on failure + * @return - @c returnvalue::OK on success + * - @c returnvalue::FAILED on failure */ virtual ReturnValue_t callbackAfterSending(ReturnValue_t queueStatus); diff --git a/src/fsfw/tcdistribution/TcPacketCheckCFDP.cpp b/src/fsfw/tcdistribution/TcPacketCheckCFDP.cpp index 8171a392..504306c6 100644 --- a/src/fsfw/tcdistribution/TcPacketCheckCFDP.cpp +++ b/src/fsfw/tcdistribution/TcPacketCheckCFDP.cpp @@ -9,3 +9,4 @@ ReturnValue_t CfdpPacketChecker::checkPacket(const SpacePacketReader& currentPac } uint16_t CfdpPacketChecker::getApid() const { return apid; } + diff --git a/src/fsfw/thermal/Heater.h b/src/fsfw/thermal/Heater.h index 61d3776f..d535f54a 100644 --- a/src/fsfw/thermal/Heater.h +++ b/src/fsfw/thermal/Heater.h @@ -6,7 +6,7 @@ #include "fsfw/devicehandlers/HealthDevice.h" #include "fsfw/parameters/ParameterHelper.h" #include "fsfw/power/PowerSwitchIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/timemanager/Countdown.h" class Heater : public HealthDevice, public ReceivesParameterMessagesIF { diff --git a/src/fsfw/thermal/ThermalComponentIF.h b/src/fsfw/thermal/ThermalComponentIF.h index 0c50fbad..0ab22d85 100644 --- a/src/fsfw/thermal/ThermalComponentIF.h +++ b/src/fsfw/thermal/ThermalComponentIF.h @@ -4,7 +4,7 @@ #include "../events/Event.h" #include "../objectmanager/SystemObjectIF.h" #include "../parameters/HasParametersIF.h" -#include "../returnvalues/HasReturnvaluesIF.h" +#include "../returnvalues/returnvalue.h" class ThermalComponentIF : public HasParametersIF { public: diff --git a/src/fsfw/timemanager/CCSDSTime.h b/src/fsfw/timemanager/CCSDSTime.h index 10836f9b..607026e3 100644 --- a/src/fsfw/timemanager/CCSDSTime.h +++ b/src/fsfw/timemanager/CCSDSTime.h @@ -8,7 +8,7 @@ #include "Clock.h" #include "clockDefinitions.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" bool operator<(const timeval &lhs, const timeval &rhs); bool operator<=(const timeval &lhs, const timeval &rhs); @@ -105,7 +105,7 @@ class CCSDSTime { * @param to pointer to a CCS struct * @param from pointer to a TimeOfDay Struct * @return - * - @c RETURN_OK if OK + * - @c returnvalue::OK if OK * - @c INVALID_TIMECODE if not OK */ static ReturnValue_t convertToCcsds(Ccs_seconds *to, Clock::TimeOfDay_t const *from); @@ -115,7 +115,7 @@ class CCSDSTime { * @param to pointer to the CDS struct to generate * @param from pointer to a timeval struct which comprises a time of day since UNIX epoch. * @return - * - @c RETURN_OK as it assumes a valid timeval. + * - @c returnvalue::OK as it assumes a valid timeval. */ static ReturnValue_t convertToCcsds(CDS_short *to, timeval const *from); @@ -129,7 +129,7 @@ class CCSDSTime { * @param to pointer to a CCS struct * @param from pointer to a TimeOfDay Struct * @return - * - @c RETURN_OK if OK + * - @c returnvalue::OK if OK * - @c INVALID_TIMECODE if not OK */ static ReturnValue_t convertToCcsds(Ccs_mseconds *to, Clock::TimeOfDay_t const *from); @@ -145,7 +145,7 @@ class CCSDSTime { * @param from pointer to an CCSDS Time code * @param length length of the Time code * @return - * - @c RETURN_OK if successful + * - @c returnvalue::OK if successful * - @c UNSUPPORTED_TIME_FORMAT if a (possibly valid) time code is not supported * - @c LENGTH_MISMATCH if the length does not match the P Field * - @c INVALID_TIME_FORMAT if the format or a value is invalid @@ -182,7 +182,7 @@ class CCSDSTime { * @param from Buffer to read from * @param foundLength Length found by this function (can be nullptr if unused) * @param maxLength Max length of the buffer to be read - * @return ReturnValue_t - RETURN_OK if successful + * @return ReturnValue_t - returnvalue::OK if successful * - LENGTH_MISMATCH if expected length is larger than maxLength */ static ReturnValue_t convertFromCUC(timeval *to, uint8_t const *from, size_t *foundLength, diff --git a/src/fsfw/timemanager/Clock.h b/src/fsfw/timemanager/Clock.h index 0544cab3..83bc3d9f 100644 --- a/src/fsfw/timemanager/Clock.h +++ b/src/fsfw/timemanager/Clock.h @@ -6,7 +6,7 @@ #include "clockDefinitions.h" #include "fsfw/globalfunctions/timevalOperations.h" #include "fsfw/ipc/MutexFactory.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #ifdef WIN32 #include @@ -38,7 +38,7 @@ class Clock { * This system call sets the system time. * To set the time, it uses a TimeOfDay_t struct. * @param time The struct with the time settings to set. - * @return -@c RETURN_OK on success. Otherwise, the OS failure code + * @return -@c returnvalue::OK on success. Otherwise, the OS failure code * is returned. */ static ReturnValue_t setClock(const TimeOfDay_t *time); @@ -46,7 +46,7 @@ class Clock { * This system call sets the system time. * To set the time, it uses a timeval struct. * @param time The struct with the time settings to set. - * @return -@c RETURN_OK on success. Otherwise, the OS failure code is returned. + * @return -@c returnvalue::OK on success. Otherwise, the OS failure code is returned. */ static ReturnValue_t setClock(const timeval *time); /** @@ -54,7 +54,7 @@ class Clock { * The timval format has the fields @c tv_sec with seconds and @c tv_usec with * microseconds since an OS-defined epoch. * @param time A pointer to a timeval struct where the current time is stored. - * @return @c RETURN_OK on success. Otherwise, the OS failure code is returned. + * @return @c returnvalue::OK on success. Otherwise, the OS failure code is returned. */ static ReturnValue_t getClock_timeval(timeval *time); @@ -62,7 +62,7 @@ class Clock { * Get the time since boot in a timeval struct * * @param[out] time A pointer to a timeval struct where the uptime is stored. - * @return @c RETURN_OK on success. Otherwise, the OS failure code is returned. + * @return @c returnvalue::OK on success. Otherwise, the OS failure code is returned. * * @deprecated, I do not think this should be able to fail, use timeval getUptime() */ @@ -77,7 +77,7 @@ class Clock { * between two calls up to 49 days by always using uint32_t in the calculation * * @param ms uptime in ms - * @return RETURN_OK on success. Otherwise, the OS failure code is returned. + * @return returnvalue::OK on success. Otherwise, the OS failure code is returned. */ static ReturnValue_t getUptime(uint32_t *uptimeMs); @@ -86,7 +86,7 @@ class Clock { * The time is returned in a 64 bit unsigned integer. * @param time A pointer to a 64 bit unisigned integer where the data is stored. * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. * - Otherwise, the OS failure code is returned. */ static ReturnValue_t getClock_usecs(uint64_t *time); @@ -94,7 +94,7 @@ class Clock { * Returns the time in a TimeOfDay_t struct. * @param time A pointer to a TimeOfDay_t struct. * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. * - Otherwise, the OS failure code is returned. */ static ReturnValue_t getDateAndTime(TimeOfDay_t *time); @@ -111,7 +111,7 @@ class Clock { * @param time The time of day as input * @param timeval The corresponding seconds since the epoch. * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. * - Otherwise, the OS failure code is returned. */ static ReturnValue_t convertTimeOfDayToTimeval(const TimeOfDay_t *from, timeval *to); @@ -122,7 +122,7 @@ class Clock { * * @param time seconds since unix epoch * @param[out] JD2000 days since J2000 - * @return @c RETURN_OK + * @return @c returnvalue::OK */ static ReturnValue_t convertTimevalToJD2000(timeval time, double *JD2000); @@ -136,7 +136,7 @@ class Clock { * @param utc timeval, corresponding to UTC time * @param[out] tt timeval, corresponding to Terrestial Time * @return - * - @c RETURN_OK on success + * - @c returnvalue::OK on success * - @c returnvalue::FAILED if leapSeconds are not set */ static ReturnValue_t convertUTCToTT(timeval utc, timeval *tt); @@ -146,7 +146,7 @@ class Clock { * * @param leapSeconds_ * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. */ static ReturnValue_t setLeapSeconds(uint16_t leapSeconds_); @@ -157,7 +157,7 @@ class Clock { * * @param[out] leapSeconds_ * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. * - @c returnvalue::FAILED on error */ static ReturnValue_t getLeapSeconds(uint16_t *leapSeconds_); @@ -166,7 +166,7 @@ class Clock { /** * Function to check and create the Mutex for the clock * @return - * - @c RETURN_OK on success. + * - @c returnvalue::OK on success. * - Otherwise @c returnvalue::FAILED if not able to create one */ static ReturnValue_t checkOrCreateClockMutex(); diff --git a/src/fsfw/timemanager/TimeStamperIF.h b/src/fsfw/timemanager/TimeStamperIF.h index 9f1ed940..9085c067 100644 --- a/src/fsfw/timemanager/TimeStamperIF.h +++ b/src/fsfw/timemanager/TimeStamperIF.h @@ -2,7 +2,7 @@ #define FSFW_TIMEMANAGER_TIMESTAMPERIF_H_ #include "TimeStampIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serialize/SerializeIF.h" /** diff --git a/src/fsfw/tmstorage/TmStoreBackendIF.h b/src/fsfw/tmstorage/TmStoreBackendIF.h index d9f1a17b..84c94f77 100644 --- a/src/fsfw/tmstorage/TmStoreBackendIF.h +++ b/src/fsfw/tmstorage/TmStoreBackendIF.h @@ -3,7 +3,7 @@ #include "fsfw/objectmanager/SystemObjectIF.h" #include "fsfw/parameters/HasParametersIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/storagemanager/StorageManagerIF.h" #include "fsfw/timemanager/Clock.h" #include "tmStorageConf.h" diff --git a/src/fsfw/tmstorage/TmStoreFrontendIF.h b/src/fsfw/tmstorage/TmStoreFrontendIF.h index 3ab93ba1..56bcd7fa 100644 --- a/src/fsfw/tmstorage/TmStoreFrontendIF.h +++ b/src/fsfw/tmstorage/TmStoreFrontendIF.h @@ -3,7 +3,7 @@ #include "TmStorePackets.h" #include "fsfw/ipc/MessageQueueSenderIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "tmStorageConf.h" class TmPacketMinimal; @@ -28,7 +28,7 @@ class TmStoreFrontendIF { * @param packet Pointer to the newly received Space Packet. * @param address Start address of the packet found * @param isLastPacket Indicates if no more packets can be fetched. - * @return If more packets shall be fetched, RETURN_OK must be returned. + * @return If more packets shall be fetched, returnvalue::OK must be returned. * Any other code stops fetching packets. */ virtual ReturnValue_t packetRetrieved(TmPacketMinimal* packet, uint32_t address) = 0; diff --git a/src/fsfw/tmtcpacket/RedirectableDataPointerIF.h b/src/fsfw/tmtcpacket/RedirectableDataPointerIF.h index e2da84a3..52b3df0a 100644 --- a/src/fsfw/tmtcpacket/RedirectableDataPointerIF.h +++ b/src/fsfw/tmtcpacket/RedirectableDataPointerIF.h @@ -3,7 +3,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief This interface can be used for classes which store a reference to data. It allows @@ -22,7 +22,7 @@ class RedirectableDataPointerIF { * large enough * @param args Any additional user arguments required to set the data pointer * @return - * - RETURN_OK if the pointer was set successfully + * - returnvalue::OK if the pointer was set successfully * - returnvalue::FAILED on general error of if the maximum size is too small */ virtual ReturnValue_t setData(uint8_t* dataPtr, size_t size, void* args) = 0; diff --git a/src/fsfw/tmtcpacket/cfdp/CFDPPacket.cpp b/src/fsfw/tmtcpacket/cfdp/CFDPPacket.cpp deleted file mode 100644 index b4a8534c..00000000 --- a/src/fsfw/tmtcpacket/cfdp/CFDPPacket.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "fsfw/tmtcpacket/cfdp/CfdpPacket.h" - -#include - -#include "fsfw/globalfunctions/CRC.h" -#include "fsfw/globalfunctions/arrayprinter.h" -#include "fsfw/serviceinterface/ServiceInterface.h" - -CfdpReader::CfdpReader(const uint8_t* setData, size_t maxSize) - : SpacePacketReader(setData, maxSize) {} - -CfdpReader::~CfdpReader() = default; - -void CfdpReader::print() { -#if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::info << "CFDPPacket::print:" << std::endl; -#else - sif::printInfo("CFDPPacket::print:\n"); -#endif - // arrayprinter::print(getWholeData(), getFullSize()); -} diff --git a/src/fsfw/tmtcpacket/cfdp/CFDPPacketStored.cpp b/src/fsfw/tmtcpacket/cfdp/CFDPPacketStored.cpp deleted file mode 100644 index 94430aeb..00000000 --- a/src/fsfw/tmtcpacket/cfdp/CFDPPacketStored.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include "fsfw/tmtcpacket/cfdp/CfdpPacketStored.h" - -#include "fsfw/objectmanager/ObjectManager.h" - -CfdpPacketStored::CfdpPacketStored() : CfdpReader(nullptr) {} - -CfdpPacketStored::CfdpPacketStored(store_address_t setAddress) : CfdpReader(nullptr) { - this->setStoreAddress(setAddress); -} - -CfdpPacketStored::CfdpPacketStored(const uint8_t* data, size_t size) : CfdpReader(data) { - if (this->getFullSize() != size) { - return; - } - if (this->checkAndSetStore()) { -<<<<<<< HEAD - ReturnValue_t status = STORE->addData(&storeAddress, data, size); - if (status != HasReturnvaluesIF::RETURN_OK) { - this->setData(nullptr, -1, nullptr); -======= - ReturnValue_t status = store->addData(&storeAddress, data, size); - if (status != returnvalue::OK) { - this->setData(nullptr, -1); ->>>>>>> mueller/expand-retval-if - } - const uint8_t* storePtr = nullptr; - // Repoint base data pointer to the data in the store. - STORE->getData(storeAddress, &storePtr, &size); - this->setData(const_cast(storePtr), size, nullptr); - } -} - -ReturnValue_t CfdpPacketStored::deletePacket() { - ReturnValue_t result = STORE->deleteData(this->storeAddress); - this->storeAddress.raw = StorageManagerIF::INVALID_ADDRESS; - // To circumvent size checks - this->setData(nullptr, -1, nullptr); - return result; -} - -// CFDPPacket* CFDPPacketStored::getPacketBase() { -// return this; -// } -void CfdpPacketStored::setStoreAddress(store_address_t setAddress) { - this->storeAddress = setAddress; - const uint8_t* tempData = nullptr; - size_t tempSize; - ReturnValue_t status = returnvalue::FAILED; - if (this->checkAndSetStore()) { - status = STORE->getData(this->storeAddress, &tempData, &tempSize); - } -<<<<<<< HEAD - if (status == StorageManagerIF::RETURN_OK) { - this->setData(const_cast(tempData), tempSize, nullptr); -======= - if (status == returnvalue::OK) { - this->setData(const_cast(tempData), tempSize); ->>>>>>> mueller/expand-retval-if - } else { - // To circumvent size checks - this->setData(nullptr, -1, nullptr); - this->storeAddress.raw = StorageManagerIF::INVALID_ADDRESS; - } -} - -store_address_t CfdpPacketStored::getStoreAddress() { return this->storeAddress; } - -CfdpPacketStored::~CfdpPacketStored() = default; - -<<<<<<< HEAD -ReturnValue_t CfdpPacketStored::getData(const uint8_t** dataPtr, size_t* dataSize) { - return HasReturnvaluesIF::RETURN_OK; -======= -ReturnValue_t CFDPPacketStored::getData(const uint8_t** dataPtr, size_t* dataSize) { - return returnvalue::OK; ->>>>>>> mueller/expand-retval-if -} - -// ReturnValue_t CFDPPacketStored::setData(const uint8_t *data) { -// return returnvalue::OK; -// } - -bool CfdpPacketStored::checkAndSetStore() { - if (STORE == nullptr) { - STORE = ObjectManager::instance()->get(objects::TC_STORE); - if (STORE == nullptr) { -#if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::error << "CFDPPacketStored::CFDPPacketStored: TC Store not found!" << std::endl; -#endif - return false; - } - } - return true; -} - -bool CfdpPacketStored::isSizeCorrect() { - const uint8_t* temp_data = nullptr; - size_t temp_size; -<<<<<<< HEAD - ReturnValue_t status = STORE->getData(this->storeAddress, &temp_data, &temp_size); - if (status == StorageManagerIF::RETURN_OK) { -======= - ReturnValue_t status = store->getData(this->storeAddress, &temp_data, &temp_size); - if (status == returnvalue::OK) { ->>>>>>> mueller/expand-retval-if - if (this->getFullSize() == temp_size) { - return true; - } - } - return false; -} diff --git a/src/fsfw/tmtcpacket/cfdp/CfdpPacketStored.h b/src/fsfw/tmtcpacket/cfdp/CfdpPacketStored.h index 60a9524f..8b0da723 100644 --- a/src/fsfw/tmtcpacket/cfdp/CfdpPacketStored.h +++ b/src/fsfw/tmtcpacket/cfdp/CfdpPacketStored.h @@ -25,7 +25,7 @@ class CfdpPacketStored : public CfdpReader { * Getter function for the raw data. * @param dataPtr [out] Pointer to the data pointer to set * @param dataSize [out] Address of size to set. - * @return -@c RETURN_OK if data was retrieved successfully. + * @return -@c returnvalue::OK if data was retrieved successfully. */ ReturnValue_t getData(const uint8_t** dataPtr, size_t* dataSize); diff --git a/src/fsfw/tmtcpacket/packetmatcher/PacketMatchTree.h b/src/fsfw/tmtcpacket/packetmatcher/PacketMatchTree.h index b9d03f1d..6accb66f 100644 --- a/src/fsfw/tmtcpacket/packetmatcher/PacketMatchTree.h +++ b/src/fsfw/tmtcpacket/packetmatcher/PacketMatchTree.h @@ -7,7 +7,11 @@ #include "fsfw/tmtcpacket/pus/tm/PusTmIF.h" #include "fsfw/tmtcpacket/pus/tm/PusTmMinimal.h" +<<<<<<< HEAD class PacketMatchTree : public MatchTree { +======= +class PacketMatchTree : public MatchTree { +>>>>>>> origin/development public: explicit PacketMatchTree(Node* root); explicit PacketMatchTree(iterator root); diff --git a/src/fsfw/tmtcpacket/pus/PacketTimestampInterpreterIF.h b/src/fsfw/tmtcpacket/pus/PacketTimestampInterpreterIF.h index d6e96438..36743fe8 100644 --- a/src/fsfw/tmtcpacket/pus/PacketTimestampInterpreterIF.h +++ b/src/fsfw/tmtcpacket/pus/PacketTimestampInterpreterIF.h @@ -1,7 +1,7 @@ #ifndef FSFW_TMTCPACKET_PUS_PACKETTIMESTAMPINTERPRETERIF_H_ #define FSFW_TMTCPACKET_PUS_PACKETTIMESTAMPINTERPRETERIF_H_ -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class PusTmMinimal; diff --git a/src/fsfw/tmtcpacket/pus/tc/TcPacketStoredIF.h b/src/fsfw/tmtcpacket/pus/tc/TcPacketStoredIF.h deleted file mode 100644 index 1fce33d2..00000000 --- a/src/fsfw/tmtcpacket/pus/tc/TcPacketStoredIF.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef FSFW_TMTCPACKET_PUS_TCPACKETSTOREDIF_H_ -#define FSFW_TMTCPACKET_PUS_TCPACKETSTOREDIF_H_ - -#include - -#include "PusTcReader.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" -#include "fsfw/storagemanager/storeAddress.h" - -class TcPacketStoredIF { - public: - virtual ~TcPacketStoredIF() = default; - ; - - /** - * With this call, the stored packet can be set to another packet in a store. This is useful - * if the packet is a class member and used for more than one packet. - * @param setAddress The new packet id to link to. - */ - virtual void setStoreAddress(store_address_t setAddress, RedirectableDataPointerIF* packet) = 0; - - virtual store_address_t getStoreAddress() = 0; - - /** - * Getter function for the raw data. - * @param dataPtr [out] Pointer to the data pointer to set - * @param dataSize [out] Address of size to set. - * @return -@c RETURN_OK if data was retrieved successfully. - */ - virtual ReturnValue_t getData(const uint8_t** dataPtr, size_t* dataSize) = 0; -}; - -#endif /* FSFW_TMTCPACKET_PUS_TCPACKETSTOREDIF_H_ */ diff --git a/src/fsfw/tmtcservices/CommandingServiceBase.h b/src/fsfw/tmtcservices/CommandingServiceBase.h index 02a8c127..9dfbd8bf 100644 --- a/src/fsfw/tmtcservices/CommandingServiceBase.h +++ b/src/fsfw/tmtcservices/CommandingServiceBase.h @@ -101,7 +101,7 @@ class CommandingServiceBase : public SystemObject, * Handle request queue for external commands. * Handle command Queue for internal commands. * @param opCode is unused here at the moment - * @return RETURN_OK + * @return returnvalue::OK */ ReturnValue_t performOperation(uint8_t opCode) override; @@ -139,7 +139,7 @@ class CommandingServiceBase : public SystemObject, * Check the target subservice * @param subservice[in] * @return - * -@c RETURN_OK Subservice valid, continue message handling + * -@c returnvalue::OK Subservice valid, continue message handling * -@c INVALID_SUBSERVICE if service is not known, rejects packet. */ virtual ReturnValue_t isValidSubservice(uint8_t subservice) = 0; @@ -154,7 +154,7 @@ class CommandingServiceBase : public SystemObject, * @param id MessageQueue ID is stored here * @param objectId Object ID is extracted and stored here * @return - * - @c RETURN_OK Cotinue message handling + * - @c returnvalue::OK Continue message handling * - @c returnvalue::FAILED Reject the packet and generates a start failure * verification */ @@ -175,7 +175,7 @@ class CommandingServiceBase : public SystemObject, * communication * @param objectId Target object ID * @return - * - @c RETURN_OK to generate a verification start message + * - @c returnvalue::OK to generate a verification start message * - @c EXECUTION_COMPLETE Fire-and-forget command. Generate a completion * verification message. * - @c Anything else rejects the packets and generates a start failure @@ -200,7 +200,7 @@ class CommandingServiceBase : public SystemObject, * @param objectId Source object ID * @param isStep Flag value to mark steps of command execution * @return - * - @c RETURN_OK, @c EXECUTION_COMPLETE or @c NO_STEP_MESSAGE to + * - @c returnvalue::OK, @c EXECUTION_COMPLETE or @c NO_STEP_MESSAGE to * generate TC verification success * - @c INVALID_REPLY Calls handleUnrequestedReply * - Anything else triggers a TC verification failure. If returnvalue::FAILED or diff --git a/src/fsfw/tmtcservices/PusServiceBase.h b/src/fsfw/tmtcservices/PusServiceBase.h index 934376fb..ce4b03f5 100644 --- a/src/fsfw/tmtcservices/PusServiceBase.h +++ b/src/fsfw/tmtcservices/PusServiceBase.h @@ -10,7 +10,7 @@ #include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/objectmanager/ObjectManagerIF.h" #include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/tcdistribution/PUSDistributorIF.h" @@ -166,14 +166,14 @@ class PusServiceBase : public ExecutableObjectIF, * * @return The returned status_code is directly taken as main error code * in the Verification Report. - * On success, RETURN_OK shall be returned. + * On success, returnvalue::OK shall be returned. */ virtual ReturnValue_t handleRequest(uint8_t subservice) = 0; /** * In performService, implementations can handle periodic, * non-TC-triggered activities. * The performService method is always called. - * @return Currently, everything other that RETURN_OK only triggers + * @return Currently, everything other that returnvalue::OK only triggers * diagnostic output. */ virtual ReturnValue_t performService() = 0; @@ -183,8 +183,8 @@ class PusServiceBase : public ExecutableObjectIF, * completion verification messages and deletes * the TC requests afterwards. * performService is always executed afterwards. - * @return @c RETURN_OK if the periodic performService was successful. - * @c returnvalue::FAILED else. + * @return @c returnvalue::OK if the periodic performService was successful. + * @c returnvalue::FAILED else. */ ReturnValue_t performOperation(uint8_t opCode) override; uint16_t getIdentifier() override; diff --git a/src/fsfw/tmtcservices/PusVerificationReport.h b/src/fsfw/tmtcservices/PusVerificationReport.h index d84f4df3..f0cad337 100644 --- a/src/fsfw/tmtcservices/PusVerificationReport.h +++ b/src/fsfw/tmtcservices/PusVerificationReport.h @@ -3,7 +3,7 @@ #include "VerificationCodes.h" #include "fsfw/ipc/MessageQueueMessage.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tmtcpacket/pus/tc/PusTcReader.h" class PusVerificationMessage : public MessageQueueMessage { diff --git a/src/fsfw/tmtcservices/SpacePacketParser.h b/src/fsfw/tmtcservices/SpacePacketParser.h index f0a9e8e2..93f90afe 100644 --- a/src/fsfw/tmtcservices/SpacePacketParser.h +++ b/src/fsfw/tmtcservices/SpacePacketParser.h @@ -51,7 +51,7 @@ class SpacePacketParser { * will be set to the detected packet size and startIndex will be set to the start of the * detected packet. buffer and read length will not be incremented but the found length * will be assigned. - * -@c RETURN_OK if a packet was found + * -@c returnvalue::OK if a packet was found */ ReturnValue_t parseSpacePackets(const uint8_t** buffer, const size_t maxSize, size_t& startIndex, size_t& foundSize, size_t& readLen); @@ -67,7 +67,7 @@ class SpacePacketParser { * -@c SPLIT_PACKET if a packet was found but the detected size exceeds maxSize. foundSize * will be set to the detected packet size and startIndex will be set to the start of the * detected packet - * -@c RETURN_OK if a packet was found + * -@c returnvalue::OK if a packet was found */ ReturnValue_t parseSpacePackets(const uint8_t* buffer, const size_t maxSize, size_t& startIndex, size_t& foundSize); diff --git a/src/fsfw/tmtcservices/TmTcBridge.h b/src/fsfw/tmtcservices/TmTcBridge.h index 3ebdac95..9d97ed17 100644 --- a/src/fsfw/tmtcservices/TmTcBridge.h +++ b/src/fsfw/tmtcservices/TmTcBridge.h @@ -30,8 +30,8 @@ class TmTcBridge : public AcceptsTelemetryIF, * Set number of packets sent per performOperation().Please note that this * value must be smaller than MAX_STORED_DATA_SENT_PER_CYCLE * @param sentPacketsPerCycle - * @return -@c RETURN_OK if value was set successfully - * -@c returnvalue::FAILED otherwise, stored value stays the same + * @return -@c returnvalue::OK if value was set successfully + * -@c returnvalue::FAILED otherwise, stored value stays the same */ ReturnValue_t setNumberOfSentPacketsPerCycle(uint8_t sentPacketsPerCycle); @@ -39,7 +39,7 @@ class TmTcBridge : public AcceptsTelemetryIF, * Set number of packets sent per performOperation().Please note that this * value must be smaller than MAX_DOWNLINK_PACKETS_STORED * @param sentPacketsPerCycle - * @return -@c RETURN_OK if value was set successfully + * @return -@c returnvalue::OK if value was set successfully * -@c returnvalue::FAILED otherwise, stored value stays the same */ ReturnValue_t setMaxNumberOfPacketsStored(uint8_t maxNumberOfPacketsStored); diff --git a/src/fsfw_hal/common/gpio/GpioCookie.h b/src/fsfw_hal/common/gpio/GpioCookie.h index cf836eae..709af9a5 100644 --- a/src/fsfw_hal/common/gpio/GpioCookie.h +++ b/src/fsfw_hal/common/gpio/GpioCookie.h @@ -2,7 +2,7 @@ #define COMMON_GPIO_GPIOCOOKIE_H_ #include -#include +#include #include "GpioIF.h" #include "gpioDefinitions.h" diff --git a/src/fsfw_hal/common/gpio/GpioIF.h b/src/fsfw_hal/common/gpio/GpioIF.h index feb356f4..a8abb126 100644 --- a/src/fsfw_hal/common/gpio/GpioIF.h +++ b/src/fsfw_hal/common/gpio/GpioIF.h @@ -2,7 +2,7 @@ #define COMMON_GPIO_GPIOIF_H_ #include -#include +#include #include "gpioDefinitions.h" @@ -29,7 +29,7 @@ class GpioIF { * functionality to pull a certain GPIO to high logic level. * * @param gpioId A unique number which specifies the GPIO to drive. - * @return Returns RETURN_OK for success. This should never return returnvalue::FAILED. + * @return Returns returnvalue::OK for success. This should never return returnvalue::FAILED. */ virtual ReturnValue_t pullHigh(gpioId_t gpioId) = 0; diff --git a/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp b/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp index 10fe66d0..9cb16c35 100644 --- a/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp +++ b/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp @@ -466,8 +466,7 @@ ReturnValue_t MgmLIS3MDLHandler::initializeLocalDataPool(localpool::DataPool &lo LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(MGMLIS3MDL::FIELD_STRENGTHS, &mgmXYZ); localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, &temperature); - poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(dataset.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket({dataset.getSid(), false, 10.0}); return returnvalue::OK; } diff --git a/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp b/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp index 8b4cb029..a32153eb 100644 --- a/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp +++ b/src/fsfw_hal/devicehandlers/MgmRM3100Handler.cpp @@ -4,7 +4,7 @@ #include "fsfw/devicehandlers/DeviceHandlerMessage.h" #include "fsfw/globalfunctions/bitutility.h" #include "fsfw/objectmanager/SystemObjectIF.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" MgmRM3100Handler::MgmRM3100Handler(object_id_t objectId, object_id_t deviceCommunication, CookieIF *comCookie, uint32_t transitionDelay) @@ -310,8 +310,7 @@ void MgmRM3100Handler::modeChanged() { internalState = InternalState::NONE; } ReturnValue_t MgmRM3100Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) { localDataPoolMap.emplace(RM3100::FIELD_STRENGTHS, &mgmXYZ); - poolManager.subscribeForRegularPeriodicPacket( - subdp::RegularHkPeriodicParams(primaryDataset.getSid(), false, 10.0)); + poolManager.subscribeForRegularPeriodicPacket({primaryDataset.getSid(), false, 10.0}); return returnvalue::OK; } diff --git a/src/fsfw_hal/linux/CommandExecutor.h b/src/fsfw_hal/linux/CommandExecutor.h index 64ebe13d..81f989e7 100644 --- a/src/fsfw_hal/linux/CommandExecutor.h +++ b/src/fsfw_hal/linux/CommandExecutor.h @@ -7,7 +7,7 @@ #include #include "fsfw/returnvalues/FwClassIds.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class SimpleRingBuffer; template @@ -66,7 +66,7 @@ class CommandExecutor { * the result of the system call was not 0. The error value can be accessed using * getLastError * - In non-blocking mode, this call will start - * the execution and then return RETURN_OK + * the execution and then return returnvalue::OK */ ReturnValue_t execute(); /** @@ -75,7 +75,7 @@ class CommandExecutor { * @return * - BYTES_READ if bytes have been read from the executing process. It is recommended to call * check again after this - * - RETURN_OK execution is pending, but no bytes have been read from the executing process + * - returnvalue::OK execution is pending, but no bytes have been read from the executing process * - returnvalue::FAILED if execution has failed, error value can be accessed using getLastError * - EXECUTION_FINISHED if the process was executed successfully * - NO_COMMAND_LOADED_OR_PENDING self-explanatory @@ -85,7 +85,7 @@ class CommandExecutor { /** * Abort the current command. Should normally not be necessary, check can be used to find * out whether command execution was successful - * @return RETURN_OK + * @return returnvalue::OK */ ReturnValue_t close(); diff --git a/src/fsfw_hal/linux/UnixFileGuard.h b/src/fsfw_hal/linux/UnixFileGuard.h index 1fe47116..3e4ddca8 100644 --- a/src/fsfw_hal/linux/UnixFileGuard.h +++ b/src/fsfw_hal/linux/UnixFileGuard.h @@ -2,7 +2,7 @@ #define LINUX_UTILITY_UNIXFILEGUARD_H_ #include -#include +#include #include #include diff --git a/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h b/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h index f9ba680b..bb8e890d 100644 --- a/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h +++ b/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h @@ -19,18 +19,12 @@ class LinuxLibgpioIF : public GpioIF, public SystemObject { public: static const uint8_t gpioRetvalId = CLASS_ID::HAL_GPIO; - static constexpr ReturnValue_t UNKNOWN_GPIO_ID = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 1); - static constexpr ReturnValue_t DRIVE_GPIO_FAILURE = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 2); - static constexpr ReturnValue_t GPIO_TYPE_FAILURE = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 3); - static constexpr ReturnValue_t GPIO_INVALID_INSTANCE = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 4); - static constexpr ReturnValue_t GPIO_DUPLICATE_DETECTED = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 5); - static constexpr ReturnValue_t GPIO_INIT_FAILED = - HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 6); + static constexpr ReturnValue_t UNKNOWN_GPIO_ID = returnvalue::makeCode(gpioRetvalId, 1); + static constexpr ReturnValue_t DRIVE_GPIO_FAILURE = returnvalue::makeCode(gpioRetvalId, 2); + static constexpr ReturnValue_t GPIO_TYPE_FAILURE = returnvalue::makeCode(gpioRetvalId, 3); + static constexpr ReturnValue_t GPIO_INVALID_INSTANCE = returnvalue::makeCode(gpioRetvalId, 4); + static constexpr ReturnValue_t GPIO_DUPLICATE_DETECTED = returnvalue::makeCode(gpioRetvalId, 5); + static constexpr ReturnValue_t GPIO_INIT_FAILED = returnvalue::makeCode(gpioRetvalId, 6); LinuxLibgpioIF(object_id_t objectId); virtual ~LinuxLibgpioIF(); @@ -71,7 +65,7 @@ class LinuxLibgpioIF : public GpioIF, public SystemObject { * * @param mapToAdd The GPIOs which shall be added to the gpioMap. * - * @return RETURN_OK if successful, otherwise returnvalue::FAILED + * @return returnvalue::OK if successful, otherwise returnvalue::FAILED */ ReturnValue_t checkForConflicts(GpioMap& mapToAdd); diff --git a/src/fsfw_hal/linux/i2c/I2cComIF.h b/src/fsfw_hal/linux/i2c/I2cComIF.h index 7101b9b6..0a15c3a4 100644 --- a/src/fsfw_hal/linux/i2c/I2cComIF.h +++ b/src/fsfw_hal/linux/i2c/I2cComIF.h @@ -49,7 +49,7 @@ class I2cComIF : public DeviceCommunicationIF, public SystemObject { * @param deviceFile The name of the device file. E.g. i2c-0 * @param i2cAddress The address of the i2c slave device. * @param fileDescriptor Pointer to device descriptor. - * @return RETURN_OK if successful, otherwise returnvalue::FAILED. + * @return returnvalue::OK if successful, otherwise returnvalue::FAILED. */ ReturnValue_t openDevice(std::string deviceFile, address_t i2cAddress, int *fileDescriptor); }; diff --git a/src/fsfw_hal/linux/rpi/GpioRPi.h b/src/fsfw_hal/linux/rpi/GpioRPi.h index 8ca7065a..bec4c33d 100644 --- a/src/fsfw_hal/linux/rpi/GpioRPi.h +++ b/src/fsfw_hal/linux/rpi/GpioRPi.h @@ -1,7 +1,7 @@ #ifndef BSP_RPI_GPIO_GPIORPI_H_ #define BSP_RPI_GPIO_GPIORPI_H_ -#include +#include #include "../../common/gpio/gpioDefinitions.h" diff --git a/src/fsfw_hal/linux/spi/SpiComIF.h b/src/fsfw_hal/linux/spi/SpiComIF.h index 357afa2f..11defdce 100644 --- a/src/fsfw_hal/linux/spi/SpiComIF.h +++ b/src/fsfw_hal/linux/spi/SpiComIF.h @@ -23,14 +23,13 @@ class SpiCookie; class SpiComIF : public DeviceCommunicationIF, public SystemObject { public: static constexpr uint8_t spiRetvalId = CLASS_ID::HAL_SPI; - static constexpr ReturnValue_t OPENING_FILE_FAILED = - HasReturnvaluesIF::makeReturnCode(spiRetvalId, 0); + static constexpr ReturnValue_t OPENING_FILE_FAILED = returnvalue::makeCode(spiRetvalId, 0); /* Full duplex (ioctl) transfer failure */ static constexpr ReturnValue_t FULL_DUPLEX_TRANSFER_FAILED = - HasReturnvaluesIF::makeReturnCode(spiRetvalId, 1); + returnvalue::makeCode(spiRetvalId, 1); /* Half duplex (read/write) transfer failure */ static constexpr ReturnValue_t HALF_DUPLEX_TRANSFER_FAILED = - HasReturnvaluesIF::makeReturnCode(spiRetvalId, 2); + returnvalue::makeCode(spiRetvalId, 2); SpiComIF(object_id_t objectId, GpioIF* gpioComIF); diff --git a/src/fsfw_hal/linux/spi/spiDefinitions.h b/src/fsfw_hal/linux/spi/spiDefinitions.h index b4bae3c2..113f6551 100644 --- a/src/fsfw_hal/linux/spi/spiDefinitions.h +++ b/src/fsfw_hal/linux/spi/spiDefinitions.h @@ -7,7 +7,7 @@ #include "../../common/gpio/gpioDefinitions.h" #include "../../common/spi/spiCommon.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" class SpiCookie; class SpiComIF; diff --git a/src/fsfw_hal/linux/uart/UartComIF.h b/src/fsfw_hal/linux/uart/UartComIF.h index 224f1e77..77318166 100644 --- a/src/fsfw_hal/linux/uart/UartComIF.h +++ b/src/fsfw_hal/linux/uart/UartComIF.h @@ -22,12 +22,9 @@ class UartComIF : public DeviceCommunicationIF, public SystemObject { public: static constexpr uint8_t uartRetvalId = CLASS_ID::HAL_UART; - static constexpr ReturnValue_t UART_READ_FAILURE = - HasReturnvaluesIF::makeReturnCode(uartRetvalId, 1); - static constexpr ReturnValue_t UART_READ_SIZE_MISSMATCH = - HasReturnvaluesIF::makeReturnCode(uartRetvalId, 2); - static constexpr ReturnValue_t UART_RX_BUFFER_TOO_SMALL = - HasReturnvaluesIF::makeReturnCode(uartRetvalId, 3); + static constexpr ReturnValue_t UART_READ_FAILURE = returnvalue::makeCode(uartRetvalId, 1); + static constexpr ReturnValue_t UART_READ_SIZE_MISSMATCH = returnvalue::makeCode(uartRetvalId, 2); + static constexpr ReturnValue_t UART_RX_BUFFER_TOO_SMALL = returnvalue::makeCode(uartRetvalId, 3); UartComIF(object_id_t objectId); diff --git a/src/fsfw_hal/linux/uio/UioMapper.h b/src/fsfw_hal/linux/uio/UioMapper.h index 20c90b4d..89c2c66a 100644 --- a/src/fsfw_hal/linux/uio/UioMapper.h +++ b/src/fsfw_hal/linux/uio/UioMapper.h @@ -5,7 +5,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief Class to help opening uio device files and mapping the physical addresses into the user diff --git a/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h b/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h index a0c3748a..f967c8d1 100644 --- a/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h +++ b/src/fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h @@ -6,7 +6,7 @@ #include "../spi/mspInit.h" #include "../spi/spiDefinitions.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "stm32h7xx_hal.h" #include "stm32h7xx_hal_spi.h" diff --git a/src/fsfw_hal/stm32h7/spi/spiDefinitions.h b/src/fsfw_hal/stm32h7/spi/spiDefinitions.h index 12c3bf4e..cf05d986 100644 --- a/src/fsfw_hal/stm32h7/spi/spiDefinitions.h +++ b/src/fsfw_hal/stm32h7/spi/spiDefinitions.h @@ -3,17 +3,16 @@ #include "../../common/spi/spiCommon.h" #include "fsfw/returnvalues/FwClassIds.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "stm32h7xx_hal.h" #include "stm32h7xx_hal_spi.h" namespace spi { static constexpr uint8_t HAL_SPI_ID = CLASS_ID::HAL_SPI; -static constexpr ReturnValue_t HAL_TIMEOUT_RETVAL = - HasReturnvaluesIF::makeReturnCode(HAL_SPI_ID, 0); -static constexpr ReturnValue_t HAL_BUSY_RETVAL = HasReturnvaluesIF::makeReturnCode(HAL_SPI_ID, 1); -static constexpr ReturnValue_t HAL_ERROR_RETVAL = HasReturnvaluesIF::makeReturnCode(HAL_SPI_ID, 2); +static constexpr ReturnValue_t HAL_TIMEOUT_RETVAL = returnvalue::makeCode(HAL_SPI_ID, 0); +static constexpr ReturnValue_t HAL_BUSY_RETVAL = returnvalue::makeCode(HAL_SPI_ID, 1); +static constexpr ReturnValue_t HAL_ERROR_RETVAL = returnvalue::makeCode(HAL_SPI_ID, 2); enum class TransferStates { IDLE, WAIT, SUCCESS, FAILURE }; diff --git a/src/fsfw_tests/integration/assemblies/TestAssembly.h b/src/fsfw_tests/integration/assemblies/TestAssembly.h index 6042f54e..91ffbf60 100644 --- a/src/fsfw_tests/integration/assemblies/TestAssembly.h +++ b/src/fsfw_tests/integration/assemblies/TestAssembly.h @@ -22,7 +22,7 @@ class TestAssembly : public AssemblyBase { * @param mode * @param submode * @return - * - @c RETURN_OK if ok + * - @c returnvalue::OK if ok * - @c NEED_SECOND_STEP if children need to be commanded again */ ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) override; diff --git a/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp b/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp index f4fb323a..01f0494b 100644 --- a/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp +++ b/src/fsfw_tests/integration/devices/TestDeviceHandler.cpp @@ -645,13 +645,8 @@ ReturnValue_t TestDevice::initializeLocalDataPool(localpool::DataPool& localData sid_t sid(this->getObjectId(), td::TEST_SET_ID); /* Subscribe for periodic HK packets but do not enable reporting for now. Non-diangostic with a period of one second */ -<<<<<<< HEAD - poolManager.subscribeForRegularPeriodicPacket(subdp::RegularHkPeriodicParams(sid, false, 1.0)); + poolManager.subscribeForRegularPeriodicPacket({sid, false, 1.0}); return HasReturnvaluesIF::RETURN_OK; -======= - poolManager.subscribeForPeriodicPacket(sid, false, 1.0, false); - return returnvalue::OK; ->>>>>>> mueller/expand-retval-if } ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId, diff --git a/src/fsfw_tests/integration/task/TestTask.h b/src/fsfw_tests/integration/task/TestTask.h index 038355c3..40eb4afd 100644 --- a/src/fsfw_tests/integration/task/TestTask.h +++ b/src/fsfw_tests/integration/task/TestTask.h @@ -11,7 +11,7 @@ * @details * Should not be used for board specific tests. Instead, a derived board test class should be used. */ -class TestTask : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF { +class TestTask : public SystemObject, public ExecutableObjectIF { public: explicit TestTask(object_id_t objectId); ~TestTask() override; diff --git a/src/fsfw_tests/internal/InternalUnitTester.h b/src/fsfw_tests/internal/InternalUnitTester.h index 07744825..89bac368 100644 --- a/src/fsfw_tests/internal/InternalUnitTester.h +++ b/src/fsfw_tests/internal/InternalUnitTester.h @@ -2,7 +2,7 @@ #define FRAMEWORK_TEST_UNITTESTCLASS_H_ #include "UnittDefinitions.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" /** * @brief Can be used for internal testing, for example for hardware specific diff --git a/src/fsfw_tests/internal/UnittDefinitions.h b/src/fsfw_tests/internal/UnittDefinitions.h index 11e83d22..4517d94e 100644 --- a/src/fsfw_tests/internal/UnittDefinitions.h +++ b/src/fsfw_tests/internal/UnittDefinitions.h @@ -5,7 +5,7 @@ #include #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/serviceinterface/ServiceInterface.h" namespace tv { diff --git a/src/fsfw_tests/internal/serialize/IntTestSerialization.h b/src/fsfw_tests/internal/serialize/IntTestSerialization.h index 2f1786d4..939b6614 100644 --- a/src/fsfw_tests/internal/serialize/IntTestSerialization.h +++ b/src/fsfw_tests/internal/serialize/IntTestSerialization.h @@ -3,7 +3,7 @@ #include -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" namespace testserialize { ReturnValue_t test_serialization(); diff --git a/unittests/CatchDefinitions.h b/unittests/CatchDefinitions.h index dbe3848b..64a72f57 100644 --- a/unittests/CatchDefinitions.h +++ b/unittests/CatchDefinitions.h @@ -2,7 +2,7 @@ #define FSFW_UNITTEST_CORE_CATCHDEFINITIONS_H_ #include -#include +#include #include namespace tconst { diff --git a/unittests/container/TestArrayList.cpp b/unittests/container/TestArrayList.cpp index 851c03cf..04560cef 100644 --- a/unittests/container/TestArrayList.cpp +++ b/unittests/container/TestArrayList.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/unittests/container/TestDynamicFifo.cpp b/unittests/container/TestDynamicFifo.cpp index 1475b0dc..1e3d4a62 100644 --- a/unittests/container/TestDynamicFifo.cpp +++ b/unittests/container/TestDynamicFifo.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include @@ -81,9 +81,6 @@ TEST_CASE("Dynamic Fifo Tests", "[TestDynamicFifo]") { REQUIRE(fifo.pop() == static_cast(returnvalue::OK)); REQUIRE(fifo.size() == 0); REQUIRE(fifo.empty()); - // struct Test* ptr = nullptr; - // REQUIRE(fifo.retrieve(ptr) == static_cast(HasReturnvaluesIF::returnvalue::FAILED)); - // REQUIRE(fifo.peek(ptr) == static_cast(HasReturnvaluesIF::returnvalue::FAILED)); }; SECTION("Copy Test") { REQUIRE(fifo.insert(structOne) == static_cast(returnvalue::OK)); diff --git a/unittests/container/TestFifo.cpp b/unittests/container/TestFifo.cpp index 1a3c9d8a..9fc9ee93 100644 --- a/unittests/container/TestFifo.cpp +++ b/unittests/container/TestFifo.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include diff --git a/unittests/container/TestFixedArrayList.cpp b/unittests/container/TestFixedArrayList.cpp index b28c3166..0a8de39f 100644 --- a/unittests/container/TestFixedArrayList.cpp +++ b/unittests/container/TestFixedArrayList.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/unittests/container/TestFixedMap.cpp b/unittests/container/TestFixedMap.cpp index b74b8751..f8479899 100644 --- a/unittests/container/TestFixedMap.cpp +++ b/unittests/container/TestFixedMap.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/unittests/container/TestFixedOrderedMultimap.cpp b/unittests/container/TestFixedOrderedMultimap.cpp index d70180b1..4d90a0cf 100644 --- a/unittests/container/TestFixedOrderedMultimap.cpp +++ b/unittests/container/TestFixedOrderedMultimap.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/unittests/container/TestPlacementFactory.cpp b/unittests/container/TestPlacementFactory.cpp index 142f03d7..a898f4c1 100644 --- a/unittests/container/TestPlacementFactory.cpp +++ b/unittests/container/TestPlacementFactory.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/unittests/devicehandler/DeviceHandlerCommander.h b/unittests/devicehandler/DeviceHandlerCommander.h index e90cbcee..62713d54 100644 --- a/unittests/devicehandler/DeviceHandlerCommander.h +++ b/unittests/devicehandler/DeviceHandlerCommander.h @@ -4,7 +4,7 @@ #include "fsfw/action/CommandActionHelper.h" #include "fsfw/action/CommandsActionsIF.h" #include "fsfw/objectmanager/SystemObject.h" -#include "fsfw/returnvalues/HasReturnvaluesIF.h" +#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/tasks/ExecutableObjectIF.h" class DeviceHandlerCommander : public ExecutableObjectIF, diff --git a/unittests/testcfg/pollingsequence/PollingSequenceFactory.h b/unittests/testcfg/pollingsequence/PollingSequenceFactory.h index fc9891b2..daba33a8 100644 --- a/unittests/testcfg/pollingsequence/PollingSequenceFactory.h +++ b/unittests/testcfg/pollingsequence/PollingSequenceFactory.h @@ -1,7 +1,7 @@ #ifndef POLLINGSEQUENCEFACTORY_H_ #define POLLINGSEQUENCEFACTORY_H_ -#include +#include class FixedTimeslotTaskIF;