F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RawTime.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/RawTime.hpp
3 // \brief public Os::RawTime interface and alias
4 //
5 // This header aggregates all definitions needed to use Os::RawTime:
6 // the interface, the configured alias, and the concrete delegate type.
7 //
8 // WARNING — include order is load-bearing. Do not reorder.
9 //
10 // The dependency constraints are:
11 //
12 // 1. config/OsSelection.hpp (CFG) defines the Os::RawTime type alias by
13 // forward-declaring a link-time delegate (e.g. DelegateRawTime) or directly
14 // aliasing a concrete implementation (e.g. Va416x0Os::TimerRawTime).
15 // Must not include Os OSAL headers (they aren't yet defined).
16 // Should only be included in Os/RawTimeInterface.hpp,
17 // Os/MutexInterface.hpp, and Os/ConditionVariableInterface.hpp.
18 //
19 // 2. Os/RawTimeInterface.hpp (IF) needs the Os::RawTime alias in its
20 // method signatures, so it includes CFG first. It then defines
21 // RawTimeHandle and RawTimeInterface.
22 //
23 // 3. OS_RAW_TIME_HEADER (IMPL) is defined by CFG and points to the concrete
24 // implementation header. If using delegation, this points to
25 // Os/DelegateRawTime.hpp. If using compile-time selection, it points
26 // directly to a platform-specific implementation (e.g. TimerRawTime.hpp).
27 //
28 // RawTimeInterface.hpp must precede OS_RAW_TIME_HEADER here,
29 // and CFG must never include either of them (that would form a cycle).
30 // ======================================================================
31 #ifndef OS_RAWTIME_HPP_
32 #define OS_RAWTIME_HPP_
33 
34 #include "Os/RawTimeInterface.hpp"
35 
36 // Validate that OS_RAW_TIME_HEADER was defined by config/OsSelection.hpp
37 #ifndef OS_RAW_TIME_HEADER
38 #error "OS_RAW_TIME_HEADER must be defined in config/OsSelection.hpp"
39 #endif
40 
41 #include OS_RAW_TIME_HEADER
42 
43 #endif // OS_RAWTIME_HPP_