distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
StaticSignalsReceiver.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_STATICSIGNALSRECEIVER_HPP_
13 #define INCLUDE_DISTORTOS_STATICSIGNALSRECEIVER_HPP_
14 
18 
20 
21 namespace distortos
22 {
23 
33 template<size_t QueuedSignals, size_t SignalActions>
35 {
36 public:
37 
45  internal::dummyDeleter<SignalInformationQueueWrapper::Storage>},
47  signalsCatcher_{{signalsCatcherStorage_.data(), internal::dummyDeleter<SignalsCatcher::Storage>},
49  {
50 
51  }
52 
53 private:
54 
56  std::array<SignalInformationQueueWrapper::Storage, QueuedSignals> signalInformationQueueWrapperStorage_;
57 
60 
62  std::array<SignalsCatcher::Storage, SignalActions> signalsCatcherStorage_;
63 
66 };
67 
78 template<size_t QueuedSignals>
79 class StaticSignalsReceiver<QueuedSignals, 0> : public SignalsReceiver
80 {
81 public:
82 
90  internal::dummyDeleter<SignalInformationQueueWrapper::Storage>},
92  {
93 
94  }
95 
96 private:
97 
99  std::array<SignalInformationQueueWrapper::Storage, QueuedSignals> signalInformationQueueWrapperStorage_;
100 
103 };
104 
115 template<size_t SignalActions>
116 class StaticSignalsReceiver<0, SignalActions> : public SignalsReceiver
117 {
118 public:
119 
125  SignalsReceiver{nullptr, &signalsCatcher_},
126  signalsCatcher_{{signalsCatcherStorage_.data(), internal::dummyDeleter<SignalsCatcher::Storage>},
127  signalsCatcherStorage_.size()}
128  {
129 
130  }
131 
132 private:
133 
135  std::array<SignalsCatcher::Storage, SignalActions> signalsCatcherStorage_;
136 
139 };
140 
148 template<>
150 {
151 public:
152 
158  SignalsReceiver{nullptr, nullptr}
159  {
160 
161  }
162 };
163 
164 } // namespace distortos
165 
166 #endif // INCLUDE_DISTORTOS_STATICSIGNALSRECEIVER_HPP_
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:87
SignalsReceiver class header.
SignalInformationQueueWrapper class header.
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:157
SignalsCatcher class header.
SignalInformationQueueWrapper signalInformationQueueWrapper_
internal SignalInformationQueueWrapper object
Definition: StaticSignalsReceiver.hpp:102
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:42
SignalsCatcher signalsCatcher_
internal SignalsCatcher object
Definition: StaticSignalsReceiver.hpp:65
SignalsCatcher signalsCatcher_
internal SignalsCatcher object
Definition: StaticSignalsReceiver.hpp:138
SignalsReceiver class is a container for internal::SignalsReceiverControlBlock.
Definition: SignalsReceiver.hpp:28
std::array< SignalsCatcher::Storage, SignalActions > signalsCatcherStorage_
storage for signalsCatcher_
Definition: StaticSignalsReceiver.hpp:135
std::array< SignalsCatcher::Storage, SignalActions > signalsCatcherStorage_
storage for signalsCatcher_
Definition: StaticSignalsReceiver.hpp:62
SignalInformationQueueWrapper signalInformationQueueWrapper_
internal SignalInformationQueueWrapper object
Definition: StaticSignalsReceiver.hpp:59
Top-level namespace of distortos project.
std::array< SignalInformationQueueWrapper::Storage, QueuedSignals > signalInformationQueueWrapperStorage_
storage for signalInformationQueueWrapper_
Definition: StaticSignalsReceiver.hpp:56
StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage f...
Definition: StaticSignalsReceiver.hpp:34
SignalInformationQueueWrapper class is a container for internal::SignalInformationQueue.
Definition: SignalInformationQueueWrapper.hpp:28
std::array< SignalInformationQueueWrapper::Storage, QueuedSignals > signalInformationQueueWrapperStorage_
storage for signalInformationQueueWrapper_
Definition: StaticSignalsReceiver.hpp:99
SignalsCatcher class is a container for internal::SignalsCatcherControlBlock.
Definition: SignalsCatcher.hpp:28
dummyDeleter() declaration
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:124