distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
SignalsTestCaseCommon.hpp
Go to the documentation of this file.
1 
12 #ifndef TEST_SIGNALS_SIGNALSTESTCASECOMMON_HPP_
13 #define TEST_SIGNALS_SIGNALSTESTCASECOMMON_HPP_
14 
15 #include "PrioritizedTestCase.hpp"
16 
18 
19 namespace distortos
20 {
21 
22 namespace test
23 {
24 
40 {
41 public:
42 
51  constexpr SignalsTestCaseCommon(const uint8_t priority, const SignalSet signalMask,
52  const SignalAction signalAction) :
53  PrioritizedTestCase{priority},
54  signalAction_{signalAction},
55  signalMask_{signalMask}
56  {
57 
58  }
59 
60 protected:
61 
71  bool finalize() const override;
72 
82  bool initialize() const override;
83 
84 private:
85 
88 
91 };
92 
93 } // namespace test
94 
95 } // namespace distortos
96 
97 #endif // TEST_SIGNALS_SIGNALSTESTCASECOMMON_HPP_
SignalAction signalAction_
SignalAction that will be associated with all signal numbers.
Definition: SignalsTestCaseCommon.hpp:87
constexpr SignalsTestCaseCommon(const uint8_t priority, const SignalSet signalMask, const SignalAction signalAction)
SignalsTestCaseCommon's constructor.
Definition: SignalsTestCaseCommon.hpp:51
PrioritizedTestCase class header.
SignalAction class header.
SignalsTestCaseCommon class is a TestCase with initialization and finalization steps required for sig...
Definition: SignalsTestCaseCommon.hpp:39
bool initialize() const override
Initializes the test case.
Definition: SignalsTestCaseCommon.cpp:58
SignalSet class is used as a set of signals.
Definition: SignalSet.hpp:28
Top-level namespace of distortos project.
SignalSet signalMask_
SignalSet with signal mask for test case.
Definition: SignalsTestCaseCommon.hpp:90
PrioritizedTestCase class is a TestCase which runs at specific priority, restoring original priority ...
Definition: PrioritizedTestCase.hpp:30
SignalAction class contains information needed to handle signal that was caught.
Definition: SignalAction.hpp:30
bool finalize() const override
Finalizes the test case.
Definition: SignalsTestCaseCommon.cpp:38