F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
QueueInterface.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Interfaces/QueueInterface.hpp
3 // \brief pure-virtual interface implemented by Os::Queue implementations
4 // ======================================================================
5 #ifndef OS_INTERFACES_QUEUEINTERFACE_HPP_
6 #define OS_INTERFACES_QUEUEINTERFACE_HPP_
7 
9 
10 namespace Os {
11 
19  public:
21  QueueInterface() = default;
22 
24  virtual ~QueueInterface() = default;
25 
27  QueueInterface(const QueueInterface& other) = delete;
28 
30  QueueInterface(const QueueInterface* other) = delete;
31 
33  virtual QueueInterface& operator=(const QueueInterface& other) = delete; // NO_CODESONAR (cpp:S3657)
34 
46  virtual Status create(FwEnumStoreType id,
47  const Fw::ConstStringBase& name,
48  FwSizeType depth,
49  FwSizeType messageSize) = 0;
50 
55  virtual void teardown() = 0;
56 
71  virtual Status send(const U8* buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) = 0;
72 
88  virtual Status receive(U8* destination,
89  FwSizeType capacity,
90  BlockingType blockType,
91  FwSizeType& actualSize,
92  FwQueuePriorityType& priority) = 0;
93 
99  virtual FwSizeType getMessagesAvailable() const = 0;
100 
106  virtual FwSizeType getMessageHighWaterMark() const = 0;
107 
110  virtual QueueHandle* getHandle() = 0;
111 };
112 
113 } // namespace Os
114 
115 #endif // OS_INTERFACES_QUEUEINTERFACE_HPP_
PlatformSizeType FwSizeType
I32 FwEnumStoreType
virtual QueueInterface & operator=(const QueueInterface &other)=delete
assignment operator is forbidden
QueueHandle parent class.
base queue interface
virtual Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority)=0
receive a message from the queue
virtual ~QueueInterface()=default
default queue destructor
virtual FwSizeType getMessagesAvailable() const =0
get number of messages available
types and constants shared by users of Os::Queue and by its implementations
virtual Status create(FwEnumStoreType id, const Fw::ConstStringBase &name, FwSizeType depth, FwSizeType messageSize)=0
create queue storage
virtual QueueHandle * getHandle()=0
return the underlying queue handle (implementation specific)
Status
status returned from the queue send function
virtual void teardown()=0
teardown the queue
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
QueueInterface()=default
default queue interface constructor
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
A read-only abstract superclass for StringBase.
virtual FwSizeType getMessageHighWaterMark() const =0
get maximum messages stored at any given time
virtual Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType)=0
send a message into the queue