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

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

#include <steering_64.h>

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

Public 成员函数

virtual uint32_t GetPeriod () const
 get the data period
 
virtual void UpdateData (uint8_t *data)
 update the data
 
virtual void Reset ()
 reset the private variables
 
Steering64set_enable ()
 set steering request enable to true
 
Steering64set_disable ()
 set steering request disable to true
 
Steering64set_steering_angle (double angle)
 set steering angle
 
Steering64set_steering_angle_speed (double angle_speed)
 set steering angle speed
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
 ProtocolData ()=default
 construct protocol data.
 
virtual ~ProtocolData ()=default
 destruct protocol data.
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::Lincoln *sensor_data) const
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 

静态 Public 属性

static const int32_t ID = 0x64
 

额外继承的成员函数

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

在文件 steering_64.h40 行定义.

成员函数说明

◆ GetPeriod()

uint32_t apollo::canbus::lincoln::Steering64::GetPeriod ( ) const
virtual

get the data period

返回
the value of data period

重载 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln > .

在文件 steering_64.cc29 行定义.

29 {
30 // receive rate??
31 // receive timeout would trigger fault, letting en=0 and etc.
32 static const uint32_t PERIOD = 10 * 1000;
33 return PERIOD;
34}

◆ Reset()

void apollo::canbus::lincoln::Steering64::Reset ( )
virtual

reset the private variables

重载 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln > .

在文件 steering_64.cc46 行定义.

46 {
47 steering_angle_ = 0.0;
48 steering_enable_ = false;
49 clear_driver_override_flag_ = false;
50 ignore_driver_override_ = false;
51 steering_angle_speed_ = 0.0;
52 watchdog_counter_ = 0;
53 disable_audible_warning_ = false;
54}

◆ set_disable()

Steering64 * apollo::canbus::lincoln::Steering64::set_disable ( )

set steering request disable to true

返回
a this pointer to the instance itself

在文件 steering_64.cc66 行定义.

66 {
67 steering_enable_ = false;
68 return this;
69}

◆ set_enable()

Steering64 * apollo::canbus::lincoln::Steering64::set_enable ( )

set steering request enable to true

返回
a this pointer to the instance itself

在文件 steering_64.cc61 行定义.

61 {
62 steering_enable_ = true;
63 return this;
64}

◆ set_steering_angle()

Steering64 * apollo::canbus::lincoln::Steering64::set_steering_angle ( double  angle)

set steering angle

返回
a this pointer to the instance itself

在文件 steering_64.cc56 行定义.

56 {
57 steering_angle_ = angle;
58 return this;
59}

◆ set_steering_angle_speed()

Steering64 * apollo::canbus::lincoln::Steering64::set_steering_angle_speed ( double  angle_speed)

set steering angle speed

返回
a this pointer to the instance itself

在文件 steering_64.cc71 行定义.

71 {
72 steering_angle_speed_ = angle_speed;
73 return this;
74}

◆ UpdateData()

void apollo::canbus::lincoln::Steering64::UpdateData ( uint8_t *  data)
virtual

update the data

参数
dataa pointer to the data to be updated

重载 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln > .

在文件 steering_64.cc36 行定义.

36 {
37 set_steering_angle_p(data, steering_angle_);
38 set_enable_p(data, steering_enable_);
39 set_clear_driver_override_flag_p(data, clear_driver_override_flag_);
40 set_ignore_driver_override_p(data, ignore_driver_override_);
41 set_steering_angle_speed_p(data, steering_angle_speed_);
42 set_watchdog_counter_p(data, watchdog_counter_);
43 set_disable_audible_warning_p(data, disable_audible_warning_);
44}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Steering64::ID = 0x64
static

在文件 steering_64.h43 行定义.


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