![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
critical data stored for priority queue More...
#include <Os/Generic/PriorityQueue.hpp>
Public Member Functions | |
FwSizeType | find_index () |
find an available index to store data from the list More... | |
void | return_index (FwSizeType index) |
return index to the circular data structure More... | |
void | store_data (FwSizeType index, const U8 *source, FwSizeType size) |
store data into a set index in the data store More... | |
void | load_data (FwSizeType index, U8 *destination, FwSizeType capacity) |
load data from a set index in the data store More... | |
Public Attributes | |
Types::MaxHeap | m_heap |
MaxHeap data store for tracking priority. More... | |
U8 * | m_data = nullptr |
Pointer to data allocation. More... | |
FwSizeType * | m_indices = nullptr |
List of indices into data. More... | |
FwSizeType * | m_sizes = nullptr |
Size store for each method. More... | |
FwSizeType | m_depth = 0 |
Depth of the queue. More... | |
FwSizeType | m_startIndex = 0 |
Start index of the circular data structure. More... | |
FwSizeType | m_stopIndex = 0 |
End index of the circular data structure. More... | |
FwSizeType | m_maxSize = 0 |
Maximum size allowed of a message. More... | |
FwSizeType | m_highMark = 0 |
Message count high water mark. More... | |
Os::Mutex | m_data_lock |
Lock against data manipulation. More... | |
Os::ConditionVariable | m_full |
Queue full condition variable to support blocking. More... | |
Os::ConditionVariable | m_empty |
Queue empty condition variable to support blocking. More... | |
critical data stored for priority queue
The priority queue has two essential data structures: a block of unordered memory storing message data and size. The queue also stores a circular list of indices into that memory tracking which slots are free and which are taken. These indices are ordered by a max heap data structure projecting priority on to the otherwise unordered data. Both the data region and index list have queue depth number of entries.
Definition at line 21 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::find_index | ( | ) |
find an available index to store data from the list
Definition at line 14 of file PriorityQueue.cpp.
void Os::Generic::PriorityQueueHandle::load_data | ( | FwSizeType | index, |
U8 * | destination, | ||
FwSizeType | capacity | ||
) |
load data from a set index in the data store
Definition at line 34 of file PriorityQueue.cpp.
void Os::Generic::PriorityQueueHandle::return_index | ( | FwSizeType | index | ) |
return index to the circular data structure
index | index to return to the list |
Definition at line 20 of file PriorityQueue.cpp.
void Os::Generic::PriorityQueueHandle::store_data | ( | FwSizeType | index, |
const U8 * | source, | ||
FwSizeType | size | ||
) |
store data into a set index in the data store
Definition at line 25 of file PriorityQueue.cpp.
U8* Os::Generic::PriorityQueueHandle::m_data = nullptr |
Pointer to data allocation.
Definition at line 23 of file PriorityQueue.hpp.
Os::Mutex Os::Generic::PriorityQueueHandle::m_data_lock |
Lock against data manipulation.
Definition at line 31 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::m_depth = 0 |
Depth of the queue.
Definition at line 26 of file PriorityQueue.hpp.
Os::ConditionVariable Os::Generic::PriorityQueueHandle::m_empty |
Queue empty condition variable to support blocking.
Definition at line 33 of file PriorityQueue.hpp.
Os::ConditionVariable Os::Generic::PriorityQueueHandle::m_full |
Queue full condition variable to support blocking.
Definition at line 32 of file PriorityQueue.hpp.
Types::MaxHeap Os::Generic::PriorityQueueHandle::m_heap |
MaxHeap data store for tracking priority.
Definition at line 22 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::m_highMark = 0 |
Message count high water mark.
Definition at line 30 of file PriorityQueue.hpp.
FwSizeType* Os::Generic::PriorityQueueHandle::m_indices = nullptr |
List of indices into data.
Definition at line 24 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::m_maxSize = 0 |
Maximum size allowed of a message.
Definition at line 29 of file PriorityQueue.hpp.
FwSizeType* Os::Generic::PriorityQueueHandle::m_sizes = nullptr |
Size store for each method.
Definition at line 25 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::m_startIndex = 0 |
Start index of the circular data structure.
Definition at line 27 of file PriorityQueue.hpp.
FwSizeType Os::Generic::PriorityQueueHandle::m_stopIndex = 0 |
End index of the circular data structure.
Definition at line 28 of file PriorityQueue.hpp.