distortos  v0.5.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 StaticRawFifoQueue2() :
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<typename T, size_t QueueSize>
78 using StaticRawFifoQueue __attribute__ ((deprecated("Use StaticRawFifoQueue2<sizeof(T), QueueSize>"))) =
80 
91 template<size_t ElementSize, size_t QueueSize>
92 using StaticRawFifoQueueFromSize __attribute__ ((deprecated("Use StaticRawFifoQueue2<ElementSize, QueueSize>"))) =
94 
95 } // namespace distortos
96 
97 #endif // INCLUDE_DISTORTOS_STATICRAWFIFOQUEUE_HPP_
RawFifoQueue class is very similar to FifoQueue, but optimized for binary serializable types (like PO...
Definition: RawFifoQueue.hpp:30
StaticRawFifoQueue2 class is a variant of RawFifoQueue that has automatic storage for queue&#39;s content...
Definition: StaticRawFifoQueue.hpp:46
RawFifoQueue class header.
Top-level namespace of distortos project.
std::array< uint8_t, ElementSize *QueueSize > storage_
storage for queue&#39;s contents
Definition: StaticRawFifoQueue.hpp:63
StaticRawFifoQueue2()
StaticRawFifoQueue2&#39;s constructor.
Definition: StaticRawFifoQueue.hpp:54
dummyDeleter() declaration