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

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

#include <wheelspeed_6a.h>

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

Public 成员函数

virtual void Parse (const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
 
virtual void Parse (const std::uint8_t *bytes, int32_t length, const struct timeval &timestamp, 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 = 0x6A
 

额外继承的成员函数

- 静态 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

在文件 wheelspeed_6a.h43 行定义.

成员函数说明

◆ Parse() [1/2]

void apollo::canbus::lincoln::Wheelspeed6a::Parse ( const std::uint8_t *  bytes,
int32_t  length,
const struct timeval &  timestamp,
Lincoln chassis_detail 
) const
virtual

在文件 wheelspeed_6a.cc66 行定义.

68 {
69 chassis_detail->mutable_vehicle_spd()->set_timestamp_sec(
70 static_cast<double>(timestamp.tv_sec) +
71 static_cast<double>(timestamp.tv_usec) / 1000000.0);
72 Parse(bytes, length, chassis_detail);
73}
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const

◆ Parse() [2/2]

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

在文件 wheelspeed_6a.cc31 行定义.

32 {
33 // how to set direction
34 // what is "valid"
35 // front left
36 chassis_detail->mutable_vehicle_spd()->set_wheel_spd_fl(
37 front_left_wheel_speed(bytes, length));
38 chassis_detail->mutable_vehicle_spd()->set_is_wheel_spd_fl_valid(true);
39 chassis_detail->mutable_vehicle_spd()->set_wheel_direction_fl(
40 wheel_direction_convert(front_left_wheel_speed(bytes, length)));
41 // front right
42 chassis_detail->mutable_vehicle_spd()->set_wheel_spd_fr(
43 front_right_wheel_speed(bytes, length));
44 chassis_detail->mutable_vehicle_spd()->set_is_wheel_spd_fr_valid(true);
45 chassis_detail->mutable_vehicle_spd()->set_wheel_direction_fr(
46 wheel_direction_convert(front_right_wheel_speed(bytes, length)));
47 // rear left
48 chassis_detail->mutable_vehicle_spd()->set_wheel_spd_rl(
49 rear_left_wheel_speed(bytes, length));
50 chassis_detail->mutable_vehicle_spd()->set_is_wheel_spd_rl_valid(true);
51 chassis_detail->mutable_vehicle_spd()->set_wheel_direction_rl(
52 wheel_direction_convert(rear_left_wheel_speed(bytes, length)));
53 // rear right
54 chassis_detail->mutable_vehicle_spd()->set_wheel_spd_rr(
55 rear_right_wheel_speed(bytes, length));
56 chassis_detail->mutable_vehicle_spd()->set_is_wheel_spd_rr_valid(true);
57 chassis_detail->mutable_vehicle_spd()->set_wheel_direction_rr(
58 wheel_direction_convert(rear_right_wheel_speed(bytes, length)));
59 /*
60 -?(rr(bytes, length));
61 -?(rl(bytes, length));
62 -?(fr(bytes, length));
63 -?(fl(bytes, length));*/
64}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Wheelspeed6a::ID = 0x6A
static

在文件 wheelspeed_6a.h46 行定义.


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