memory_blocs_parsers/external_data/lbl.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace ixblue_stdbin_decoder
7 {
8 namespace Parser
9 {
10 class Lbl : public MemoryBlockParser
11 {
12 public:
13  Lbl(int bit_pose) : MemoryBlockParser(bit_pose, 41) {}
14  void parse(boost::asio::const_buffer& buffer,
15  Data::BinaryNav& outBinaryNav) override
16  {
17  Data::Lbl res;
18  buffer >> res.validityTime_100us >> res.rfu >> res.beacon_id >>
20  res.beacon_altitude_m >> res.range_m >> res.range_stddev_m;
21  fillRes(res, outBinaryNav);
22  }
23  virtual void fillRes(const Data::Lbl& res, Data::BinaryNav& outBinaryNav) = 0;
24 };
25 
26 class Lbl1 : public Lbl
27 {
28 public:
29  Lbl1() : Lbl(14) {}
30 
31 protected:
32  void fillRes(const Data::Lbl& res, Data::BinaryNav& outBinaryNav)
33  {
34  outBinaryNav.lbl1 = res;
35  }
36 };
37 
38 class Lbl2 : public Lbl
39 {
40 public:
41  Lbl2() : Lbl(15) {}
42 
43 protected:
44  void fillRes(const Data::Lbl& res, Data::BinaryNav& outBinaryNav)
45  {
46  outBinaryNav.lbl2 = res;
47  }
48 };
49 
50 class Lbl3 : public Lbl
51 {
52 public:
53  Lbl3() : Lbl(16) {}
54 
55 protected:
56  void fillRes(const Data::Lbl& res, Data::BinaryNav& outBinaryNav)
57  {
58  outBinaryNav.lbl3 = res;
59  }
60 };
61 
62 class Lbl4 : public Lbl
63 {
64 public:
65  Lbl4() : Lbl(17) {}
66 
67 protected:
68  void fillRes(const Data::Lbl& res, Data::BinaryNav& outBinaryNav)
69  {
70  outBinaryNav.lbl4 = res;
71  }
72 };
73 
74 } // namespace Parser
75 } // namespace ixblue_stdbin_decoder
void fillRes(const Data::Lbl &res, Data::BinaryNav &outBinaryNav)
boost::optional< Lbl > lbl4
Definition: stdbin.h:130
boost::optional< Lbl > lbl2
Definition: stdbin.h:128
virtual void fillRes(const Data::Lbl &res, Data::BinaryNav &outBinaryNav)=0
void fillRes(const Data::Lbl &res, Data::BinaryNav &outBinaryNav)
void fillRes(const Data::Lbl &res, Data::BinaryNav &outBinaryNav)
void fillRes(const Data::Lbl &res, Data::BinaryNav &outBinaryNav)
boost::optional< Lbl > lbl1
Definition: stdbin.h:127
void parse(boost::asio::const_buffer &buffer, Data::BinaryNav &outBinaryNav) override
boost::optional< Lbl > lbl3
Definition: stdbin.h:129


ixblue_stdbin_decoder
Author(s): Adrien BARRAL , Laure LEBROTON
autogenerated on Sat Jan 9 2021 03:13:21