19#include "glog/logging.h"
26namespace conti_radar {
35 auto state = conti_radar->mutable_radar_state();
36 state->set_max_distance(max_dist(bytes, length));
37 state->set_output_type(output_type(bytes, length));
38 state->set_rcs_threshold(rcs_threshold(bytes, length));
39 state->set_radar_power(radar_power(bytes, length));
40 state->set_send_quality(send_quality(bytes, length));
41 state->set_send_ext_info(send_ext_info(bytes, length));
44int RadarState201::max_dist(
const std::uint8_t* bytes, int32_t length)
const {
46 uint32_t x = t0.get_byte(0, 8);
49 uint32_t t = t1.get_byte(6, 2);
57int RadarState201::radar_power(
const std::uint8_t* bytes,
58 int32_t length)
const {
60 uint32_t x = t0.get_byte(0, 2);
63 uint32_t t = t1.get_byte(7, 1);
72 int32_t length)
const {
74 uint32_t x = t0.get_byte(2, 2);
89 const std::uint8_t* bytes, int32_t length)
const {
91 uint32_t x = t0.get_byte(2, 3);
103bool RadarState201::send_quality(
const std::uint8_t* bytes,
104 int32_t length)
const {
106 uint32_t x = t0.get_byte(4, 1);
108 bool ret = (x == 0x1);
112bool RadarState201::send_ext_info(
const std::uint8_t* bytes,
113 int32_t length)
const {
115 uint32_t x = t0.get_byte(5, 1);
117 bool ret = (x == 0x1);
The class of one byte, which is 8 bits.
void Parse(const std::uint8_t *bytes, int32_t length, ContiRadar *conti_radar) const override
@ RCS_THRESHOLD_HIGH_SENSITIVITY