diff --git a/Os/Condition.hpp b/Os/Condition.hpp index ce7640f7cf..6e75afaf1e 100644 --- a/Os/Condition.hpp +++ b/Os/Condition.hpp @@ -24,6 +24,7 @@ class ConditionVariableInterface { ERROR_MUTEX_NOT_HELD, //!< When trying to wait but we don't hold the mutex ERROR_DIFFERENT_MUTEX, //!< When trying to use a different mutex than expected mutex ERROR_NOT_IMPLEMENTED, //!< When trying to use a feature that isn't implemented + NOT_SUPPORTED, //!< ConditionVariable does not support operation ERROR_OTHER //!< All other errors }; diff --git a/Os/Models/Mutex.fpp b/Os/Models/Mutex.fpp index 62b681f7b9..46cf56433b 100644 --- a/Os/Models/Mutex.fpp +++ b/Os/Models/Mutex.fpp @@ -9,6 +9,7 @@ module Os { OP_OK, @< Operation was successful ERROR_BUSY, @< Mutex is busy ERROR_DEADLOCK, @< Deadlock condition detected + NOT_SUPPORTED, @< Mutex feature is not supported ERROR_OTHER @< All other errors } } diff --git a/Os/Models/Queue.fpp b/Os/Models/Queue.fpp index d84fb9715b..94b727f50a 100644 --- a/Os/Models/Queue.fpp +++ b/Os/Models/Queue.fpp @@ -14,7 +14,8 @@ module Os { SEND_ERROR, @< message send error RECEIVE_ERROR, @< message receive error INVALID_PRIORITY, @< invalid priority requested - FULL, @< queue was full when attempting to send a message + FULL, @< Queue was full when attempting to send a message + NOT_SUPPORTED, @< Queue feature is not supported UNKNOWN_ERROR @< Unexpected error; can't match with returns } diff --git a/Os/Models/RawTime.fpp b/Os/Models/RawTime.fpp index 6fdf2ddc9a..dde476a830 100644 --- a/Os/Models/RawTime.fpp +++ b/Os/Models/RawTime.fpp @@ -7,9 +7,10 @@ module Os { @ FPP shadow-enum representing Os::RawTime::Status enum RawTimeStatus { - OP_OK, @< Operation was successful + OP_OK, @< Operation was successful OP_OVERFLOW, @< Operation result caused an overflow INVALID_PARAMS, @< Parameters invalid for current platform + NOT_SUPPORTED, @< RawTime feature is not supported OTHER_ERROR, @< All other errors } diff --git a/Os/Models/Task.fpp b/Os/Models/Task.fpp index 9ed0022482..c1c417fc5b 100644 --- a/Os/Models/Task.fpp +++ b/Os/Models/Task.fpp @@ -16,6 +16,7 @@ enum TaskStatus { JOIN_ERROR, @< error trying to join the task ERROR_RESOURCES, @< unable to allocate more tasks ERROR_PERMISSION, @< permissions error setting-up tasks + NOT_SUPPORTED, @< Task feature is not supported INVALID_STATE, @< Task is in an invalid state for the operation } } diff --git a/Os/Mutex.hpp b/Os/Mutex.hpp index 82310cb54c..a052f11f80 100644 --- a/Os/Mutex.hpp +++ b/Os/Mutex.hpp @@ -14,11 +14,12 @@ struct MutexHandle {}; class MutexInterface { public: - enum Status { - OP_OK, //!< Operation was successful - ERROR_BUSY, //!< Mutex is busy - ERROR_DEADLOCK, //!< Deadlock condition detected - ERROR_OTHER //!< All other errors + enum Status { + OP_OK, //!< Operation was successful + ERROR_BUSY, //!< Mutex is busy + ERROR_DEADLOCK, //!< Deadlock condition detected + NOT_SUPPORTED, //!< Mutex does not support operation + ERROR_OTHER //!< All other errors }; //! \brief default constructor @@ -97,7 +98,7 @@ class ScopeLock { ScopeLock& operator=(const ScopeLock& other) = delete; private: - Mutex& m_mutex; //!< Stores the mutex reference + Mutex& m_mutex; //!< Stores the mutex reference }; } // namespace Os diff --git a/Os/Queue.hpp b/Os/Queue.hpp index d2b72d3c70..763b677ce9 100644 --- a/Os/Queue.hpp +++ b/Os/Queue.hpp @@ -8,9 +8,9 @@ #include #include #include +#include #include #include -#include namespace Os { // Forward declaration for registry class QueueRegistry; @@ -36,7 +36,8 @@ class QueueInterface { SEND_ERROR, //!< message send error RECEIVE_ERROR, //!< message receive error INVALID_PRIORITY, //!< invalid priority requested - FULL, //!< queue was full when attempting to send a message + FULL, //!< Queue was full when attempting to send a message + NOT_SUPPORTED, //!< Queue feature is not supported UNKNOWN_ERROR //!< Unexpected error; can't match with returns }; @@ -277,11 +278,11 @@ class Queue final : public QueueInterface { static Os::Mutex& getStaticMutex(); private: - QueueString m_name; //!< queue name - FwSizeType m_depth; //!< Queue depth - FwSizeType m_size; //!< Maximum message size - static Os::Mutex s_countLock; //!< Lock the count - static FwSizeType s_queueCount; //!< Count of the number of queues + QueueString m_name; //!< queue name + FwSizeType m_depth; //!< Queue depth + FwSizeType m_size; //!< Maximum message size + static Os::Mutex s_countLock; //!< Lock the count + static FwSizeType s_queueCount; //!< Count of the number of queues #if FW_QUEUE_REGISTRATION public: diff --git a/Os/RawTime.hpp b/Os/RawTime.hpp index 569c5f1b47..167858a2db 100644 --- a/Os/RawTime.hpp +++ b/Os/RawTime.hpp @@ -6,29 +6,27 @@ #define OS_RAWTIME_HPP_ #include -#include #include +#include #include - namespace Os { struct RawTimeHandle {}; -class RawTime; // Forward declaration +class RawTime; // Forward declaration class RawTimeInterface : public Fw::Serializable { - public: - // Serialization size for RawTime objects, configured in config/FpConfig.h static const FwSizeType SERIALIZED_SIZE = FW_RAW_TIME_SERIALIZATION_MAX_SIZE; enum Status { - OP_OK, //!< Operation was successful - OP_OVERFLOW, //!< Operation result caused an overflow - INVALID_PARAMS, //!< Parameters invalid for current platform - OTHER_ERROR //!< All other errors + OP_OK, //!< Operation was successful + OP_OVERFLOW, //!< Operation result caused an overflow + INVALID_PARAMS, //!< Parameters invalid for current platform + NOT_SUPPORTED, //!< RawTime does not support operation + OTHER_ERROR //!< All other errors }; //! \brief default constructor @@ -42,7 +40,8 @@ class RawTimeInterface : public Fw::Serializable { virtual RawTimeHandle* getHandle() = 0; //! \brief provide a pointer to a RawTime delegate object - static RawTimeInterface* getDelegate(RawTimeHandleStorage& aligned_new_memory, const RawTimeInterface* to_copy=nullptr); + static RawTimeInterface* getDelegate(RawTimeHandleStorage& aligned_new_memory, + const RawTimeInterface* to_copy = nullptr); // ------------------------------------------------------------------ // RawTime operations to be implemented by an OSAL implementation diff --git a/Os/Task.hpp b/Os/Task.hpp index b18d79d4c1..eb9e4d90ef 100644 --- a/Os/Task.hpp +++ b/Os/Task.hpp @@ -37,6 +37,7 @@ namespace Os { JOIN_ERROR, //!< error trying to join the task ERROR_RESOURCES, //!< unable to allocate more tasks ERROR_PERMISSION, //!< permissions error setting-up tasks + NOT_SUPPORTED, //!< Task feature is not supported INVALID_STATE, //!< Task is in an invalid state for the operation };