286 #if FW_QUEUE_REGISTRATION
uint8_t U8
8-bit unsigned integer
#define FW_HANDLE_ALIGNMENT
Alignment of handle storage.
PlatformSizeType FwSizeType
PlatformQueuePriorityType FwQueuePriorityType
C++-compatible configuration header for fprime configuration.
Declarations for Fw::ObjBase and Fw::ObjRegistry.
U8 QueueHandleStorage[FW_QUEUE_HANDLE_MAX_SIZE]
Storage type for OSAL handles.
QueueHandle parent class.
Queue(const Queue &other)=delete
copy constructor is forbidden
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
FwSizeType getMessagesAvailable() const override
get number of messages available
FwSizeType getDepth() const
get the queue's depth in messages
QueueHandle * getHandle() override
return the underlying queue handle (implementation specific). Delegates to implementation.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
const QueueString & getName() const
get the queue's name
Status create(const Fw::StringBase &name, FwSizeType depth, FwSizeType messageSize) override
create queue storage through delegate
virtual ~Queue()
default queue destructor
Status send(const Fw::SerializeBufferBase &message, FwQueuePriorityType priority, BlockingType blockType)
send a message to a queue
Queue(const Queue *other)=delete
copy constructor is forbidden
static Os::Mutex & getStaticMutex()
get static mutex
Status receive(Fw::SerializeBufferBase &destination, BlockingType blockType, FwQueuePriorityType &priority)
receive a message from a queue
QueueInterface & operator=(const QueueInterface &other) override=delete
assignment operator is forbidden
static FwSizeType getNumQueues()
get number of queues system-wide
FwSizeType getMessageHighWaterMark() const override
get maximum messages stored at any given time through delegate
FwSizeType getMessageSize() const
get the queue's message maximum size
QueueInterface(const QueueInterface &other)=delete
copy constructor is forbidden
virtual QueueHandle * getHandle()=0
return the underlying queue handle (implementation specific)
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
static QueueInterface * getDelegate(QueueHandleStorage &aligned_placement_new_memory)
provide a pointer to a queue delegate object
virtual ~QueueInterface()=default
default queue destructor
virtual Status create(const Fw::StringBase &name, FwSizeType depth, FwSizeType messageSize)=0
create queue storage
virtual FwSizeType getMessageHighWaterMark() const =0
get maximum messages stored at any given time
virtual Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority)=0
receive a message from the queue
Status
status returned from the queue send function
@ EMPTY
If non-blocking, all the messages have been drained.
@ RECEIVE_ERROR
message receive error
@ INVALID_PRIORITY
invalid priority requested
@ ALREADY_CREATED
creating an already created queue
@ UNINITIALIZED
Queue wasn't initialized successfully.
@ FULL
queue was full when attempting to send a message
@ OP_OK
message sent/received okay
@ SEND_ERROR
message send error
@ SIZE_MISMATCH
attempted to send or receive with buffer too large, too small
@ UNKNOWN_ERROR
Unexpected error; can't match with returns.
virtual Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType)=0
send a message into the queue
virtual FwSizeType getMessagesAvailable() const =0
get number of messages available
QueueInterface(const QueueInterface *other)=delete
copy constructor is forbidden
virtual QueueInterface & operator=(const QueueInterface &other)=delete
assignment operator is forbidden
QueueInterface()=default
default queue interface constructor
virtual ~QueueRegistry()=default
Default ~QueueRegistry.
QueueRegistry()=default
Default QueueRegistry.
virtual void registerQueue(Queue *queue)=0
queue registry callback