Add NOT_SUPPORTED to OS' statues (#3281)

* adding not-supported status because sometimes it's useful to report not supported

* updating shadow enums to match actual enum
This commit is contained in:
kevin-f-ortega 2025-02-26 15:42:40 -08:00 committed by GitHub
parent d25775f7b2
commit a7f9bc7460
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 32 additions and 25 deletions

View File

@ -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
};

View File

@ -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
}
}

View File

@ -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
}

View File

@ -10,6 +10,7 @@ module Os {
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
}

View File

@ -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
}
}

View File

@ -18,6 +18,7 @@ class MutexInterface {
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
};

View File

@ -8,9 +8,9 @@
#include <FpConfig.hpp>
#include <Fw/Obj/ObjBase.hpp>
#include <Fw/Types/Serializable.hpp>
#include <Os/Mutex.hpp>
#include <Os/Os.hpp>
#include <Os/QueueString.hpp>
#include <Os/Mutex.hpp>
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
};

View File

@ -6,11 +6,10 @@
#define OS_RAWTIME_HPP_
#include <FpConfig.hpp>
#include <Fw/Types/Serializable.hpp>
#include <Fw/Time/TimeInterval.hpp>
#include <Fw/Types/Serializable.hpp>
#include <Os/Os.hpp>
namespace Os {
struct RawTimeHandle {};
@ -18,9 +17,7 @@ struct RawTimeHandle {};
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;
@ -28,6 +25,7 @@ class RawTimeInterface : public Fw::Serializable {
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
};
@ -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

View File

@ -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
};