distortos  v0.6.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 
46 template<size_t ElementSize, size_t QueueSize>
48 {
49 public:
50 
55  explicit StaticRawMessageQueue() :
56  RawMessageQueue{{entryStorage_.data(), internal::dummyDeleter<EntryStorage>},
57  {valueStorage_.data(), internal::dummyDeleter<uint8_t>}, ElementSize, QueueSize}
58  {
59 
60  }
61 
62 private:
63 
65  std::array<EntryStorage, QueueSize> entryStorage_;
66 
68  std::array<uint8_t, ElementSize * QueueSize> valueStorage_;
69 };
70 
82 template<size_t ElementSize, size_t QueueSize>
83 using StaticRawMessageQueue2 __attribute__ ((deprecated("Use StaticRawMessageQueue<ElementSize, QueueSize>"))) =
85 
86 } // namespace distortos
87 
88 #endif // INCLUDE_DISTORTOS_STATICRAWMESSAGEQUEUE_HPP_
std::array< uint8_t, ElementSize *QueueSize > valueStorage_
storage for queue&#39;s contents
Definition: StaticRawMessageQueue.hpp:68
RawMessageQueue class is very similar to MessageQueue, but optimized for binary serializable types (l...
Definition: RawMessageQueue.hpp:33
RawMessageQueue class header.
std::array< EntryStorage, QueueSize > entryStorage_
storage for queue&#39;s entries
Definition: StaticRawMessageQueue.hpp:65
StaticRawMessageQueue()
StaticRawMessageQueue&#39;s constructor.
Definition: StaticRawMessageQueue.hpp:55
StaticRawMessageQueue class is a variant of RawMessageQueue that has automatic storage for queue&#39;s co...
Definition: StaticRawMessageQueue.hpp:47
Top-level namespace of distortos project.
dummyDeleter() declaration