distortos  v0.5.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 
16 
17 #if CONFIG_SIGNALS_ENABLE == 1
18 
22 
24 
25 namespace distortos
26 {
27 
37 template<size_t QueuedSignals, size_t SignalActions>
39 {
40 public:
41 
49  internal::dummyDeleter<SignalInformationQueueWrapper::Storage>},
51  signalsCatcher_{{signalsCatcherStorage_.data(), internal::dummyDeleter<SignalsCatcher::Storage>},
53  {
54 
55  }
56 
57 private:
58 
60  std::array<SignalInformationQueueWrapper::Storage, QueuedSignals> signalInformationQueueWrapperStorage_;
61 
64 
66  std::array<SignalsCatcher::Storage, SignalActions> signalsCatcherStorage_;
67 
70 };
71 
82 template<size_t QueuedSignals>
83 class StaticSignalsReceiver<QueuedSignals, 0> : public SignalsReceiver
84 {
85 public:
86 
94  internal::dummyDeleter<SignalInformationQueueWrapper::Storage>},
96  {
97 
98  }
99 
100 private:
101 
103  std::array<SignalInformationQueueWrapper::Storage, QueuedSignals> signalInformationQueueWrapperStorage_;
104 
107 };
108 
119 template<size_t SignalActions>
120 class StaticSignalsReceiver<0, SignalActions> : public SignalsReceiver
121 {
122 public:
123 
129  SignalsReceiver{nullptr, &signalsCatcher_},
130  signalsCatcher_{{signalsCatcherStorage_.data(), internal::dummyDeleter<SignalsCatcher::Storage>},
131  signalsCatcherStorage_.size()}
132  {
133 
134  }
135 
136 private:
137 
139  std::array<SignalsCatcher::Storage, SignalActions> signalsCatcherStorage_;
140 
143 };
144 
152 template<>
154 {
155 public:
156 
162  SignalsReceiver{nullptr, nullptr}
163  {
164 
165  }
166 };
167 
168 } // namespace distortos
169 
170 #endif // CONFIG_SIGNALS_ENABLE == 1
171 
172 #endif // INCLUDE_DISTORTOS_STATICSIGNALSRECEIVER_HPP_
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:91
SignalsReceiver class header.
SignalInformationQueueWrapper class header.
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:161
SignalsCatcher class header.
SignalInformationQueueWrapper signalInformationQueueWrapper_
internal SignalInformationQueueWrapper object
Definition: StaticSignalsReceiver.hpp:106
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:46
SignalsCatcher signalsCatcher_
internal SignalsCatcher object
Definition: StaticSignalsReceiver.hpp:69
SignalsCatcher signalsCatcher_
internal SignalsCatcher object
Definition: StaticSignalsReceiver.hpp:142
SignalsReceiver class is a container for internal::SignalsReceiverControlBlock.
Definition: SignalsReceiver.hpp:32
std::array< SignalsCatcher::Storage, SignalActions > signalsCatcherStorage_
storage for signalsCatcher_
Definition: StaticSignalsReceiver.hpp:139
std::array< SignalsCatcher::Storage, SignalActions > signalsCatcherStorage_
storage for signalsCatcher_
Definition: StaticSignalsReceiver.hpp:66
distortos configuration
SignalInformationQueueWrapper signalInformationQueueWrapper_
internal SignalInformationQueueWrapper object
Definition: StaticSignalsReceiver.hpp:63
Top-level namespace of distortos project.
std::array< SignalInformationQueueWrapper::Storage, QueuedSignals > signalInformationQueueWrapperStorage_
storage for signalInformationQueueWrapper_
Definition: StaticSignalsReceiver.hpp:60
StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage f...
Definition: StaticSignalsReceiver.hpp:38
SignalInformationQueueWrapper class is a container for internal::SignalInformationQueue.
Definition: SignalInformationQueueWrapper.hpp:32
std::array< SignalInformationQueueWrapper::Storage, QueuedSignals > signalInformationQueueWrapperStorage_
storage for signalInformationQueueWrapper_
Definition: StaticSignalsReceiver.hpp:103
SignalsCatcher class is a container for internal::SignalsCatcherControlBlock.
Definition: SignalsCatcher.hpp:32
dummyDeleter() declaration
StaticSignalsReceiver()
StaticSignalsReceiver&#39;s constructor.
Definition: StaticSignalsReceiver.hpp:128