9 #ifndef OS_GENERIC_PRIORITYQUEUE_HPP 10 #define OS_GENERIC_PRIORITYQUEUE_HPP 144 #endif // OS_GENERIC_PRIORITYQUEUE_HPP FwSizeType * m_sizes
Size store for each method.
PriorityQueue & operator=(const QueueInterface &other) override=delete
assignment operator is forbidden
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue
Status
status returned from the queue send function
FwSizeType * m_indices
List of indices into data.
QueueHandle parent class.
PlatformSizeType FwSizeType
U8 * m_data
Pointer to data allocation.
FwSizeType m_stopIndex
End index of the circular data structure.
FwSizeType m_startIndex
Start index of the circular data structure.
FwSizeType m_maxSize
Maximum size allowed of a message.
FwSizeType m_depth
Depth of the queue.
Status create(const Fw::StringBase &name, FwSizeType depth, FwSizeType messageSize) override
create queue storage
FwSizeType m_highMark
Message count high water mark.
QueueHandle * getHandle() override
return the underlying queue handle (implementation specific)
FwSizeType getMessageHighWaterMark() const override
get maximum messages stored at any given time
void store_data(FwSizeType index, const U8 *source, FwSizeType size)
store data into a set index in the data store
generic priority queue implementation
PriorityQueue()=default
default queue interface constructor
A stable max heap data structure.
Os::ConditionVariable m_empty
Queue empty condition variable to support blocking.
FwSizeType find_index()
find an available index to store data from the list
uint8_t U8
8-bit unsigned integer
Os::ConditionVariable m_full
Queue full condition variable to support blocking.
void load_data(FwSizeType index, U8 *destination, FwSizeType capacity)
load data from a set index in the data store
PlatformQueuePriorityType FwQueuePriorityType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue
critical data stored for priority queue
Os::Mutex m_data_lock
Lock against data manipulation.
void return_index(FwSizeType index)
return index to the circular data structure
condition variable implementation
virtual ~PriorityQueue()
default queue destructor
Types::MaxHeap m_heap
MaxHeap data store for tracking priority.
FwSizeType getMessagesAvailable() const override
get number of messages available
PriorityQueueHandle m_handle