F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Os::Generic::PriorityQueueHandle Struct Reference

critical data stored for priority queue More...

#include <Os/Generic/PriorityQueue.hpp>

Inheritance diagram for Os::Generic::PriorityQueueHandle:
Os::QueueHandle

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...
 
U8m_data = nullptr
 Pointer to data allocation. More...
 
FwSizeTypem_indices = nullptr
 List of indices into data. More...
 
FwSizeTypem_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...
 

Detailed Description

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.

Member Function Documentation

◆ find_index()

FwSizeType Os::Generic::PriorityQueueHandle::find_index ( )

find an available index to store data from the list

Definition at line 14 of file PriorityQueue.cpp.

◆ load_data()

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.

◆ return_index()

void Os::Generic::PriorityQueueHandle::return_index ( FwSizeType  index)

return index to the circular data structure

Parameters
indexindex to return to the list

Definition at line 20 of file PriorityQueue.cpp.

◆ store_data()

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.

Member Data Documentation

◆ m_data

U8* Os::Generic::PriorityQueueHandle::m_data = nullptr

Pointer to data allocation.

Definition at line 23 of file PriorityQueue.hpp.

◆ m_data_lock

Os::Mutex Os::Generic::PriorityQueueHandle::m_data_lock

Lock against data manipulation.

Definition at line 31 of file PriorityQueue.hpp.

◆ m_depth

FwSizeType Os::Generic::PriorityQueueHandle::m_depth = 0

Depth of the queue.

Definition at line 26 of file PriorityQueue.hpp.

◆ m_empty

Os::ConditionVariable Os::Generic::PriorityQueueHandle::m_empty

Queue empty condition variable to support blocking.

Definition at line 33 of file PriorityQueue.hpp.

◆ m_full

Os::ConditionVariable Os::Generic::PriorityQueueHandle::m_full

Queue full condition variable to support blocking.

Definition at line 32 of file PriorityQueue.hpp.

◆ m_heap

Types::MaxHeap Os::Generic::PriorityQueueHandle::m_heap

MaxHeap data store for tracking priority.

Definition at line 22 of file PriorityQueue.hpp.

◆ m_highMark

FwSizeType Os::Generic::PriorityQueueHandle::m_highMark = 0

Message count high water mark.

Definition at line 30 of file PriorityQueue.hpp.

◆ m_indices

FwSizeType* Os::Generic::PriorityQueueHandle::m_indices = nullptr

List of indices into data.

Definition at line 24 of file PriorityQueue.hpp.

◆ m_maxSize

FwSizeType Os::Generic::PriorityQueueHandle::m_maxSize = 0

Maximum size allowed of a message.

Definition at line 29 of file PriorityQueue.hpp.

◆ m_sizes

FwSizeType* Os::Generic::PriorityQueueHandle::m_sizes = nullptr

Size store for each method.

Definition at line 25 of file PriorityQueue.hpp.

◆ m_startIndex

FwSizeType Os::Generic::PriorityQueueHandle::m_startIndex = 0

Start index of the circular data structure.

Definition at line 27 of file PriorityQueue.hpp.

◆ m_stopIndex

FwSizeType Os::Generic::PriorityQueueHandle::m_stopIndex = 0

End index of the circular data structure.

Definition at line 28 of file PriorityQueue.hpp.


The documentation for this struct was generated from the following files: