CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/Replay/LR_MsgHandler.h
Views: 1798
1
#pragma once
2
3
#include "MsgHandler.h"
4
#include <AP_AHRS/AP_AHRS.h>
5
#include <AP_GPS/AP_GPS.h>
6
#include <AP_NavEKF2/AP_NavEKF2.h>
7
#include <AP_NavEKF3/AP_NavEKF3.h>
8
9
class LR_MsgHandler : public MsgHandler {
10
public:
11
LR_MsgHandler(struct log_Format &f);
12
virtual void process_message(uint8_t *msg) = 0;
13
virtual void process_message(uint8_t *msg, uint8_t &core) {
14
// base implementation just ignores the core parameter;
15
// subclasses can override to fill the core in if they feel
16
// like it.
17
process_message(msg);
18
}
19
};
20
21
class LR_MsgHandler_RFRH : public LR_MsgHandler
22
{
23
public:
24
using LR_MsgHandler::LR_MsgHandler;
25
void process_message(uint8_t *msg) override;
26
};
27
28
class LR_MsgHandler_EKF : public LR_MsgHandler
29
{
30
public:
31
LR_MsgHandler_EKF(struct log_Format &_f, NavEKF2 &_ekf2, NavEKF3 &_ekf3) :
32
LR_MsgHandler(_f),
33
ekf2(_ekf2),
34
ekf3(_ekf3) {}
35
using LR_MsgHandler::LR_MsgHandler;
36
virtual void process_message(uint8_t *msg) override = 0;
37
protected:
38
NavEKF2 &ekf2;
39
NavEKF3 &ekf3;
40
};
41
42
class LR_MsgHandler_RFRF : public LR_MsgHandler_EKF
43
{
44
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
45
void process_message(uint8_t *msg) override;
46
};
47
48
class LR_MsgHandler_ROFH : public LR_MsgHandler_EKF
49
{
50
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
51
void process_message(uint8_t *msg) override;
52
};
53
54
class LR_MsgHandler_REPH : public LR_MsgHandler_EKF
55
{
56
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
57
void process_message(uint8_t *msg) override;
58
};
59
60
class LR_MsgHandler_RSLL : public LR_MsgHandler_EKF
61
{
62
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
63
void process_message(uint8_t *msg) override;
64
};
65
66
class LR_MsgHandler_REVH : public LR_MsgHandler_EKF
67
{
68
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
69
void process_message(uint8_t *msg) override;
70
};
71
72
class LR_MsgHandler_RWOH : public LR_MsgHandler_EKF
73
{
74
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
75
void process_message(uint8_t *msg) override;
76
};
77
78
class LR_MsgHandler_RBOH : public LR_MsgHandler_EKF
79
{
80
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
81
void process_message(uint8_t *msg) override;
82
};
83
84
class LR_MsgHandler_RFRN : public LR_MsgHandler
85
{
86
public:
87
using LR_MsgHandler::LR_MsgHandler;
88
void process_message(uint8_t *msg) override;
89
};
90
91
class LR_MsgHandler_REV2 : public LR_MsgHandler_EKF
92
{
93
public:
94
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
95
void process_message(uint8_t *msg) override;
96
};
97
98
class LR_MsgHandler_RSO2 : public LR_MsgHandler_EKF
99
{
100
public:
101
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
102
void process_message(uint8_t *msg) override;
103
};
104
105
class LR_MsgHandler_RWA2 : public LR_MsgHandler_EKF
106
{
107
public:
108
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
109
void process_message(uint8_t *msg) override;
110
};
111
112
113
class LR_MsgHandler_REV3 : public LR_MsgHandler_EKF
114
{
115
public:
116
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
117
void process_message(uint8_t *msg) override;
118
};
119
120
class LR_MsgHandler_RSO3 : public LR_MsgHandler_EKF
121
{
122
public:
123
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
124
void process_message(uint8_t *msg) override;
125
};
126
127
class LR_MsgHandler_RWA3 : public LR_MsgHandler_EKF
128
{
129
public:
130
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
131
void process_message(uint8_t *msg) override;
132
};
133
134
class LR_MsgHandler_REY3 : public LR_MsgHandler_EKF
135
{
136
public:
137
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
138
void process_message(uint8_t *msg) override;
139
};
140
141
class LR_MsgHandler_RISH : public LR_MsgHandler
142
{
143
public:
144
using LR_MsgHandler::LR_MsgHandler;
145
void process_message(uint8_t *msg) override;
146
};
147
class LR_MsgHandler_RISI : public LR_MsgHandler
148
{
149
public:
150
using LR_MsgHandler::LR_MsgHandler;
151
void process_message(uint8_t *msg) override;
152
};
153
class LR_MsgHandler_RASH : public LR_MsgHandler
154
{
155
public:
156
using LR_MsgHandler::LR_MsgHandler;
157
void process_message(uint8_t *msg) override;
158
};
159
class LR_MsgHandler_RASI : public LR_MsgHandler
160
{
161
public:
162
using LR_MsgHandler::LR_MsgHandler;
163
void process_message(uint8_t *msg) override;
164
};
165
166
class LR_MsgHandler_RBRH : public LR_MsgHandler
167
{
168
public:
169
using LR_MsgHandler::LR_MsgHandler;
170
void process_message(uint8_t *msg) override;
171
};
172
class LR_MsgHandler_RBRI : public LR_MsgHandler
173
{
174
public:
175
using LR_MsgHandler::LR_MsgHandler;
176
void process_message(uint8_t *msg) override;
177
};
178
179
class LR_MsgHandler_RRNH : public LR_MsgHandler
180
{
181
public:
182
using LR_MsgHandler::LR_MsgHandler;
183
void process_message(uint8_t *msg) override;
184
};
185
class LR_MsgHandler_RRNI : public LR_MsgHandler
186
{
187
public:
188
using LR_MsgHandler::LR_MsgHandler;
189
void process_message(uint8_t *msg) override;
190
};
191
192
class LR_MsgHandler_RGPH : public LR_MsgHandler
193
{
194
public:
195
using LR_MsgHandler::LR_MsgHandler;
196
void process_message(uint8_t *msg) override;
197
};
198
class LR_MsgHandler_RGPI : public LR_MsgHandler
199
{
200
public:
201
using LR_MsgHandler::LR_MsgHandler;
202
void process_message(uint8_t *msg) override;
203
};
204
class LR_MsgHandler_RGPJ : public LR_MsgHandler
205
{
206
public:
207
using LR_MsgHandler::LR_MsgHandler;
208
void process_message(uint8_t *msg) override;
209
};
210
211
class LR_MsgHandler_RMGH : public LR_MsgHandler
212
{
213
public:
214
using LR_MsgHandler::LR_MsgHandler;
215
void process_message(uint8_t *msg) override;
216
};
217
class LR_MsgHandler_RMGI : public LR_MsgHandler
218
{
219
public:
220
using LR_MsgHandler::LR_MsgHandler;
221
void process_message(uint8_t *msg) override;
222
};
223
class LR_MsgHandler_RBCH : public LR_MsgHandler
224
{
225
public:
226
using LR_MsgHandler::LR_MsgHandler;
227
void process_message(uint8_t *msg) override;
228
};
229
class LR_MsgHandler_RBCI : public LR_MsgHandler
230
{
231
public:
232
using LR_MsgHandler::LR_MsgHandler;
233
void process_message(uint8_t *msg) override;
234
};
235
236
class LR_MsgHandler_RVOH : public LR_MsgHandler
237
{
238
public:
239
using LR_MsgHandler::LR_MsgHandler;
240
void process_message(uint8_t *msg) override;
241
};
242
243
class LR_MsgHandler_PARM : public LR_MsgHandler
244
{
245
public:
246
LR_MsgHandler_PARM(log_Format &_f) :
247
LR_MsgHandler(_f)
248
{};
249
250
void process_message(uint8_t *msg) override;
251
252
private:
253
bool set_parameter(const char *name, const float value);
254
};
255
256