forked from cjchanx/CubePlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDataBrokerMessageTypes.hpp
More file actions
78 lines (69 loc) · 1.95 KB
/
DataBrokerMessageTypes.hpp
File metadata and controls
78 lines (69 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
********************************************************************************
* @file DataBrokerMessageTypes.hpp
* @author Shivam Desai
* @date Nov 23, 2024
* @brief
********************************************************************************
*/
#ifndef DATA_BROKER_MESSAGE_TYPES_HPP_
#define DATA_BROKER_MESSAGE_TYPES_HPP_
/************************************
* INCLUDES
************************************/
#include <stdint.h>
#include <string>
/************************************
* MACROS AND DEFINES
************************************/
/************************************
* TYPEDEFS
************************************/
enum class DataBrokerMessageTypes : uint8_t {
INVALID = 0,
IMU_DATA,
GPS_DATA,
BARO_DATA,
FILTER_DATA,
MAG_DATA,
};
namespace DataBrokerMessageType {
/************************************
* CLASS DEFINITIONS
************************************/
/************************************
* FUNCTION DECLARATIONS
************************************/
std::string ToString(DataBrokerMessageTypes messageType);
inline std::string ToString(DataBrokerMessageTypes messageType) {
switch (messageType) {
case DataBrokerMessageTypes::IMU_DATA: {
std::string type{"IMU32G_DATA"};
return type;
}
case DataBrokerMessageTypes::GPS_DATA: {
std::string type{"GPS_DATA"};
return type;
}
case DataBrokerMessageTypes::BARO_DATA: {
std::string type{"BARO_DATA"};
return type;
}
case DataBrokerMessageTypes::FILTER_DATA: {
std::string type{"FILTER_DATA"};
return type;
}
case DataBrokerMessageTypes::MAG_DATA: {
std::string type{"MAG_DATA"};
return type;
}
case DataBrokerMessageTypes::INVALID:
[[fallthrough]];
default: {
std::string type{"INVALID"};
return type;
}
}
}
} // namespace DataBrokerMessageType
#endif /* DATA_BROKER_MESSAGE_TYPES_HPP_ */