device.h
Go to the documentation of this file.
1 /**************************************************************************/ /**
2  * @brief Device status messages.
3  * @file
4  ******************************************************************************/
5 
6 #pragma once
7 
10 
11 namespace point_one {
12 namespace fusion_engine {
13 namespace messages {
14 
15 // Enforce 4-byte alignment and packing of all data structures and values.
16 // Floating point values are aligned on platforms that require it. This is done
17 // with a combination of setting struct attributes, and manual alignment
18 // within the definitions. See the "Message Packing" section of the README.
19 #pragma pack(push, 1)
20 
21 /**
22  * @defgroup device_status System Status Message Definitions
23  * @brief Output messages containing device-specific status information.
24  * @ingroup messages
25  *
26  * See also @ref messages.
27  */
28 
29 /**
30  * @brief System status information (@ref
31  * MessageType::SYSTEM_STATUS, version 1.0).
32  * @ingroup device_status
33  *
34  * @note
35  * All data is timestamped using the Point One Time, which is a monotonic
36  * timestamp referenced to the start of the device. Corresponding messages (@ref
37  * SystemStatusMessage) may be associated using their @ref p1_time values.
38  */
39 
41  static constexpr MessageType MESSAGE_TYPE = MessageType::SYSTEM_STATUS;
42  static constexpr uint8_t MESSAGE_VERSION = 0;
43 
44  static constexpr int16_t INVALID_TEMPERATURE = INT16_MAX;
45 
46  /** The time of the message, in P1 time (beginning at power-on). */
48 
49  /**
50  * The temperature of the GNSS receiver (in deg Celcius * 2^-7). Set to
51  * 0x7FFF if invalid.
52  */
53  int16_t gnss_temperature = INVALID_TEMPERATURE;
54 
55  uint8_t reserved[118] = {0};
56 };
57 
58 #pragma pack(pop)
59 
60 } // namespace messages
61 } // namespace fusion_engine
62 } // namespace point_one
Timestamp p1_time
The time of the message, in P1 time (beginning at power-on).
Definition: device.h:47
MessageType
Identifiers for the defined output message types.
Definition: defs.h:34
Library portability helper definitions.
#define P1_ALIGNAS(N)
Definition: portability.h:57
@ SYSTEM_STATUS
SystemStatusMessage
The base class for all message payloads.
Definition: defs.h:648
GNSS signal and frequency type definitions.
Definition: logging.h:38
System status information (MessageType::SYSTEM_STATUS, version 1.0).
Definition: device.h:40
Point One FusionEngine output message common definitions.
Generic timestamp representation.
Definition: defs.h:549