Apollo 10.0
自动驾驶开放平台
apollo::canbus::lincoln::Surround73类 参考

one of the protocol data of lincoln vehicle 更多...

#include <surround_73.h>

类 apollo::canbus::lincoln::Surround73 继承关系图:
apollo::canbus::lincoln::Surround73 的协作图:

Public 成员函数

virtual void Parse (const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
 ProtocolData ()=default
 construct protocol data.
 
virtual ~ProtocolData ()=default
 destruct protocol data.
 
virtual uint32_t GetPeriod () const
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::Lincoln *sensor_data) const
 
virtual void UpdateData (uint8_t *data)
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 
virtual void Reset ()
 

静态 Public 属性

static const int32_t ID = 0x73
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
static std::uint8_t CalculateCheckSum (const uint8_t *input, const uint32_t length)
 static function, used to calculate the checksum of input array.
 
static T BoundedValue (T lower, T upper, T val)
 

详细描述

one of the protocol data of lincoln vehicle

在文件 surround_73.h40 行定义.

成员函数说明

◆ Parse()

void apollo::canbus::lincoln::Surround73::Parse ( const std::uint8_t *  bytes,
int32_t  length,
Lincoln chassis_detail 
) const
virtual

在文件 surround_73.cc29 行定义.

30 {
31 // sonar left
32 chassis_detail->mutable_surround()->set_cross_traffic_alert_left(
33 is_cross_traffic_alert_left(bytes, length));
34 chassis_detail->mutable_surround()->set_cross_traffic_alert_left_enabled(
35 is_cross_traffic_alert_left_enabled(bytes, length));
36
37 // blind spot left
38 chassis_detail->mutable_surround()->set_blind_spot_left_alert(
39 is_blind_spot_left_alert(bytes, length));
40 chassis_detail->mutable_surround()->set_blind_spot_left_alert_enabled(
41 is_blind_spot_left_alert_enabled(bytes, length));
42
43 // sonar right
44 chassis_detail->mutable_surround()->set_cross_traffic_alert_right(
45 is_cross_traffic_alert_right(bytes, length));
46 chassis_detail->mutable_surround()->set_cross_traffic_alert_left_enabled(
47 is_cross_traffic_alert_left_enabled(bytes, length));
48
49 // blind spot right
50 chassis_detail->mutable_surround()->set_blind_spot_right_alert(
51 is_blind_spot_right_alert(bytes, length));
52 chassis_detail->mutable_surround()->set_blind_spot_right_alert_enabled(
53 is_blind_spot_right_alert_enabled(bytes, length));
54
55 // sonar00 ~ sonar11, output in meters
56 chassis_detail->mutable_surround()->set_sonar00(sonar00(bytes, length));
57 chassis_detail->mutable_surround()->set_sonar01(sonar01(bytes, length));
58 chassis_detail->mutable_surround()->set_sonar02(sonar02(bytes, length));
59 chassis_detail->mutable_surround()->set_sonar03(sonar03(bytes, length));
60 chassis_detail->mutable_surround()->set_sonar04(sonar04(bytes, length));
61 chassis_detail->mutable_surround()->set_sonar05(sonar05(bytes, length));
62 chassis_detail->mutable_surround()->set_sonar06(sonar06(bytes, length));
63 chassis_detail->mutable_surround()->set_sonar07(sonar07(bytes, length));
64 chassis_detail->mutable_surround()->set_sonar08(sonar08(bytes, length));
65 chassis_detail->mutable_surround()->set_sonar09(sonar09(bytes, length));
66 chassis_detail->mutable_surround()->set_sonar10(sonar10(bytes, length));
67 chassis_detail->mutable_surround()->set_sonar11(sonar11(bytes, length));
68
69 // alternative representations.
70 const int8_t kSonarNumbers = 12;
71 chassis_detail->mutable_surround()->clear_sonar_range();
72 for (std::int8_t i = 0; i < kSonarNumbers; ++i) {
73 chassis_detail->mutable_surround()->add_sonar_range(
74 sonars(bytes, i, length / 2));
75 }
76}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Surround73::ID = 0x73
static

在文件 surround_73.h43 行定义.


该类的文档由以下文件生成: