2016-02-17 21:26:01 -04:00
|
|
|
#pragma once
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2015-06-29 02:59:53 -03:00
|
|
|
#include "MsgHandler.h"
|
2019-08-27 17:26:26 -03:00
|
|
|
#include <AP_AHRS/AP_AHRS.h>
|
2019-06-14 17:49:12 -03:00
|
|
|
#include <AP_GPS/AP_GPS.h>
|
2020-11-05 19:25:17 -04:00
|
|
|
#include <AP_NavEKF2/AP_NavEKF2.h>
|
|
|
|
#include <AP_NavEKF3/AP_NavEKF3.h>
|
2015-06-14 04:17:42 -03:00
|
|
|
|
|
|
|
class LR_MsgHandler : public MsgHandler {
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
LR_MsgHandler(struct log_Format &f);
|
2015-06-14 04:17:42 -03:00
|
|
|
virtual void process_message(uint8_t *msg) = 0;
|
2020-03-09 00:28:23 -03:00
|
|
|
virtual void process_message(uint8_t *msg, uint8_t &core) {
|
|
|
|
// base implementation just ignores the core parameter;
|
|
|
|
// subclasses can override to fill the core in if they feel
|
|
|
|
// like it.
|
|
|
|
process_message(msg);
|
|
|
|
}
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RFRH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_EKF : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-06 19:57:07 -04:00
|
|
|
LR_MsgHandler_EKF(struct log_Format &_f, NavEKF2 &_ekf2, NavEKF3 &_ekf3) :
|
2020-11-05 19:25:17 -04:00
|
|
|
LR_MsgHandler(_f),
|
|
|
|
ekf2(_ekf2),
|
|
|
|
ekf3(_ekf3) {}
|
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2020-11-06 19:57:07 -04:00
|
|
|
virtual void process_message(uint8_t *msg) override = 0;
|
|
|
|
protected:
|
2020-11-05 19:25:17 -04:00
|
|
|
NavEKF2 &ekf2;
|
|
|
|
NavEKF3 &ekf3;
|
2020-11-06 18:29:30 -04:00
|
|
|
};
|
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_RFRF : public LR_MsgHandler_EKF
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
2020-11-06 19:57:07 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-06 19:57:07 -04:00
|
|
|
};
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_ROFH : public LR_MsgHandler_EKF
|
|
|
|
{
|
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_REPH : public LR_MsgHandler_EKF
|
2015-06-26 02:12:17 -03:00
|
|
|
{
|
2020-11-06 19:57:07 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-06 19:57:07 -04:00
|
|
|
};
|
2015-06-26 02:12:17 -03:00
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_REVH : public LR_MsgHandler_EKF
|
|
|
|
{
|
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-26 02:12:17 -03:00
|
|
|
};
|
|
|
|
|
2020-11-06 20:33:40 -04:00
|
|
|
class LR_MsgHandler_RWOH : public LR_MsgHandler_EKF
|
|
|
|
{
|
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
|
|
|
void process_message(uint8_t *msg) override;
|
|
|
|
};
|
|
|
|
|
2020-11-07 01:57:11 -04:00
|
|
|
class LR_MsgHandler_RBOH : public LR_MsgHandler_EKF
|
|
|
|
{
|
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
|
|
|
void process_message(uint8_t *msg) override;
|
|
|
|
};
|
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
class LR_MsgHandler_RFRN : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-06 19:57:07 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_REV2 : public LR_MsgHandler_EKF
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-06 19:57:07 -04:00
|
|
|
};
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_RSO2 : public LR_MsgHandler_EKF
|
2020-11-06 19:57:07 -04:00
|
|
|
{
|
2020-11-15 23:34:44 -04:00
|
|
|
public:
|
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2020-11-06 19:57:07 -04:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-05 19:25:17 -04:00
|
|
|
};
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_RWA2 : public LR_MsgHandler_EKF
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2020-11-05 19:25:17 -04:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-06 19:57:07 -04:00
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_REV3 : public LR_MsgHandler_EKF
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-06 19:57:07 -04:00
|
|
|
};
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_RSO3 : public LR_MsgHandler_EKF
|
2020-11-06 19:57:07 -04:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2020-11-06 19:57:07 -04:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_RWA3 : public LR_MsgHandler_EKF
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2020-11-06 19:57:07 -04:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
|
2020-11-15 23:34:44 -04:00
|
|
|
class LR_MsgHandler_REY3 : public LR_MsgHandler_EKF
|
2020-11-06 19:57:07 -04:00
|
|
|
{
|
|
|
|
public:
|
2020-11-15 23:34:44 -04:00
|
|
|
using LR_MsgHandler_EKF::LR_MsgHandler_EKF;
|
2020-11-06 19:57:07 -04:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RISH : public LR_MsgHandler
|
2016-05-04 05:16:25 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2016-05-04 05:16:25 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RISI : public LR_MsgHandler
|
2016-05-04 05:16:25 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2016-05-04 05:16:25 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RASH : public LR_MsgHandler
|
2016-05-04 05:16:25 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2016-05-04 05:16:25 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RASI : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RBRH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RBRI : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RRNH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RRNI : public LR_MsgHandler
|
2015-06-15 05:13:23 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-15 05:13:23 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RGPH : public LR_MsgHandler
|
2015-06-15 05:13:23 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-15 05:13:23 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RGPI : public LR_MsgHandler
|
2015-06-15 05:13:23 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-15 05:13:23 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RGPJ : public LR_MsgHandler
|
2015-06-15 05:13:23 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-15 05:13:23 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RMGH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RMGI : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RBCH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RBCI : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
2020-11-05 19:25:17 -04:00
|
|
|
class LR_MsgHandler_RVOH : public LR_MsgHandler
|
2015-06-14 04:17:42 -03:00
|
|
|
{
|
|
|
|
public:
|
2020-11-05 19:25:17 -04:00
|
|
|
using LR_MsgHandler::LR_MsgHandler;
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
class LR_MsgHandler_PARM : public LR_MsgHandler
|
|
|
|
{
|
|
|
|
public:
|
2020-11-08 22:06:04 -04:00
|
|
|
LR_MsgHandler_PARM(log_Format &_f) :
|
|
|
|
LR_MsgHandler(_f)
|
2015-10-26 03:37:16 -03:00
|
|
|
{};
|
2015-06-14 04:17:42 -03:00
|
|
|
|
2019-09-03 07:03:59 -03:00
|
|
|
void process_message(uint8_t *msg) override;
|
2015-10-26 03:37:16 -03:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool set_parameter(const char *name, const float value);
|
2015-06-14 04:17:42 -03:00
|
|
|
};
|