distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
StaticRawMessageQueue.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_STATICRAWMESSAGEQUEUE_HPP_
13 #define INCLUDE_DISTORTOS_STATICRAWMESSAGEQUEUE_HPP_
14 
16 
18 
19 namespace distortos
20 {
21 
45 template<size_t ElementSize, size_t QueueSize>
47 {
48 public:
49 
55  RawMessageQueue{{entryStorage_.data(), internal::dummyDeleter<EntryStorage>},
56  {valueStorage_.data(), internal::dummyDeleter<uint8_t>}, ElementSize, QueueSize}
57  {
58 
59  }
60 
61 private:
62 
64  std::array<EntryStorage, QueueSize> entryStorage_;
65 
67  std::array<uint8_t, ElementSize * QueueSize> valueStorage_;
68 };
69 
81 template<typename T, size_t QueueSize>
82 using StaticRawMessageQueue __attribute__ ((deprecated("Use StaticRawMessageQueue2<sizeof(T), QueueSize>"))) =
84 
95 template<size_t ElementSize, size_t QueueSize>
96 using StaticRawMessageQueueFromSize __attribute__ ((deprecated("Use StaticRawMessageQueue2<ElementSize, QueueSize>"))) =
98 
99 } // namespace distortos
100 
101 #endif // INCLUDE_DISTORTOS_STATICRAWMESSAGEQUEUE_HPP_
RawMessageQueue class is very similar to MessageQueue, but optimized for binary serializable types (l...
Definition: RawMessageQueue.hpp:33
std::array< uint8_t, ElementSize *QueueSize > valueStorage_
storage for queue&#39;s contents
Definition: StaticRawMessageQueue.hpp:67
StaticRawMessageQueue2 class is a variant of RawMessageQueue that has automatic storage for queue&#39;s c...
Definition: StaticRawMessageQueue.hpp:46
StaticRawMessageQueue2()
StaticRawMessageQueue2&#39;s constructor.
Definition: StaticRawMessageQueue.hpp:54
RawMessageQueue class header.
Top-level namespace of distortos project.
std::array< EntryStorage, QueueSize > entryStorage_
storage for queue&#39;s entries
Definition: StaticRawMessageQueue.hpp:64
dummyDeleter() declaration