 |
F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
38 m_handle(static_cast<POINTER_CAST>(
NULL))
50 if (
NULL == handle || !handle->
create(depth, msgSize)) {
54 this->
m_handle =
reinterpret_cast<POINTER_CAST
>(handle);
56 #if FW_QUEUE_REGISTRATION
57 if (this->s_queueRegistry) {
58 this->s_queueRegistry->regQueue(
this);
78 bool success = queue.
push(buffer, size, priority);
94 bool success = queue.
push(buffer, size, priority);
112 if (
NULL == buffer) {
134 bool success = queue.
pop(buffer, size, pri);
146 else if( size == 0 ) {
170 bool success = queue.
pop(buffer, size, pri);
NATIVE_UINT_TYPE getDepth()
Get the queue depths.
@ QUEUE_FULL
queue was full when attempting to send a message
uint8_t U8
8-bit unsigned integer
NATIVE_UINT_TYPE getCount()
Get the current number of items on the queue.
NATIVE_INT_TYPE getQueueSize(void) const
get the queue depth (maximum number of messages queue can hold)
POINTER_CAST m_handle
handle for implementation specific queue
bool push(const U8 *buffer, NATIVE_UINT_TYPE size, NATIVE_INT_TYPE priority)
push an item onto the queue
A generic buffer queue data structure.
@ QUEUE_EMPTY_BUFFER
supplied buffer is empty
bool m_init
Actual queue used to store.
QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block)
send a message
@ QUEUE_SIZE_MISMATCH
attempted to send or receive with buffer too large, too small
Queue::QueueStatus bareReceiveNonBlock(BareQueueHandle &handle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority)
NATIVE_UINT_TYPE getMaxCount()
Get the maximum number of items seen on the queue.
QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block)
receive a message
@ QUEUE_UNINITIALIZED
Queue wasn't initialized successfully.
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Queue::QueueStatus bareReceiveBlock(BareQueueHandle &handle, U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &actualSize, NATIVE_INT_TYPE &priority)
bool create(NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
bool isEmpty()
check if the queue is empty
@ QUEUE_NO_MORE_MSGS
If non-blocking, all the messages have been drained.
bool isFull()
check if the queue is full
NATIVE_INT_TYPE getMsgSize(void) const
get the message size (maximum message size queue can hold)
NATIVE_INT_TYPE getNumMsgs(void) const
get the number of messages in the queue
@ QUEUE_OK
message sent/received okay
NATIVE_UINT_TYPE getMsgSize()
Get the maximum message size.
bool create(NATIVE_UINT_TYPE depth, NATIVE_UINT_TYPE msgSize)
BufferQueue creation.
Queue::QueueStatus bareSendBlock(BareQueueHandle &handle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority)
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Queue::QueueStatus bareSendNonBlock(BareQueueHandle &handle, const U8 *buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority)
bool pop(U8 *buffer, NATIVE_UINT_TYPE &size, NATIVE_INT_TYPE &priority)
pop an item off the queue
NATIVE_INT_TYPE getMaxMsgs(void) const
get the maximum number of messages (high watermark)
QueueStatus createInternal(const Fw::StringBase &name, NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
create a message queue
Declares ISF basic types.
int NATIVE_INT_TYPE
native integer type declaration