distortos  v0.6.0
object-oriented C++ RTOS for microcontrollers
StaticRawFifoQueue.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_STATICRAWFIFOQUEUE_HPP_
13 #define INCLUDE_DISTORTOS_STATICRAWFIFOQUEUE_HPP_
14 
15 #include "RawFifoQueue.hpp"
16 
18 
19 namespace distortos
20 {
21 
45 template<size_t ElementSize, size_t QueueSize>
47 {
48 public:
49 
54  explicit StaticRawFifoQueue() :
55  RawFifoQueue{{storage_.data(), internal::dummyDeleter<uint8_t>}, ElementSize, QueueSize}
56  {
57 
58  }
59 
60 private:
61 
63  std::array<uint8_t, ElementSize * QueueSize> storage_;
64 };
65 
77 template<size_t ElementSize, size_t QueueSize>
78 using StaticRawFifoQueue2 __attribute__ ((deprecated("Use StaticRawFifoQueue<ElementSize, QueueSize>"))) =
80 
81 } // namespace distortos
82 
83 #endif // INCLUDE_DISTORTOS_STATICRAWFIFOQUEUE_HPP_
RawFifoQueue class is very similar to FifoQueue, but optimized for binary serializable types (like PO...
Definition: RawFifoQueue.hpp:30
RawFifoQueue class header.
Top-level namespace of distortos project.
StaticRawFifoQueue class is a variant of RawFifoQueue that has automatic storage for queue&#39;s contents...
Definition: StaticRawFifoQueue.hpp:46
std::array< uint8_t, ElementSize *QueueSize > storage_
storage for queue&#39;s contents
Definition: StaticRawFifoQueue.hpp:63
StaticRawFifoQueue()
StaticRawFifoQueue&#39;s constructor.
Definition: StaticRawFifoQueue.hpp:54
dummyDeleter() declaration