distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
priorityTestPhases.hpp
Go to the documentation of this file.
1 
12 #ifndef TEST_PRIORITYTESTPHASES_HPP_
13 #define TEST_PRIORITYTESTPHASES_HPP_
14 
15 #include <array>
16 
17 namespace distortos
18 {
19 
20 namespace test
21 {
22 
23 /*---------------------------------------------------------------------------------------------------------------------+
24 | global constants
25 +---------------------------------------------------------------------------------------------------------------------*/
26 
28 constexpr size_t totalThreads {8};
29 
31 constexpr size_t totalPhases {8};
32 
34 constexpr uint8_t maxPhasePriority {UINT8_MAX - 1};
35 
36 /*---------------------------------------------------------------------------------------------------------------------+
37 | global types
38 +---------------------------------------------------------------------------------------------------------------------*/
39 
41 using ThreadParameters = std::pair<uint8_t, uint8_t>;
42 
44 using TestPhase = std::pair<const std::array<ThreadParameters, totalThreads>&, std::array<uint8_t, totalThreads>>;
45 
46 /*---------------------------------------------------------------------------------------------------------------------+
47 | global objects
48 +---------------------------------------------------------------------------------------------------------------------*/
49 
51 extern const std::array<TestPhase, totalPhases> priorityTestPhases;
52 
53 } // namespace test
54 
55 } // namespace distortos
56 
57 #endif // TEST_PRIORITYTESTPHASES_HPP_
constexpr uint8_t maxPhasePriority
max priority used in test phases
Definition: priorityTestPhases.hpp:34
constexpr size_t totalThreads
number of test threads
Definition: priorityTestPhases.hpp:28
std::pair< const std::array< ThreadParameters, totalThreads > &, std::array< uint8_t, totalThreads > > TestPhase
description of test phase - reference to array with ThreadParameters, sequence of indexes for this ar...
Definition: priorityTestPhases.hpp:44
constexpr size_t totalPhases
number of test phases
Definition: priorityTestPhases.hpp:31
Top-level namespace of distortos project.
std::pair< uint8_t, uint8_t > ThreadParameters
parameters of test thread - priority, sequence point
Definition: priorityTestPhases.hpp:41
const std::array< TestPhase, totalPhases > priorityTestPhases
array with test phases
Definition: priorityTestPhases.cpp:60