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

#include <steering_cmd_12c.h>

类 apollo::canbus::lexus::Steeringcmd12c 继承关系图:
apollo::canbus::lexus::Steeringcmd12c 的协作图:

Public 成员函数

 Steeringcmd12c ()
 
uint32_t GetPeriod () const override
 
void UpdateData (uint8_t *data) override
 
void Reset () override
 
Steeringcmd12cset_ignore_overrides (bool ignore_overrides)
 
Steeringcmd12cset_enable (bool enable)
 
Steeringcmd12cset_clear_override (bool clear_override)
 
Steeringcmd12cset_clear_faults (bool clear_faults)
 
Steeringcmd12cset_position (double position)
 
Steeringcmd12cset_rotation_rate (double rotation_rate)
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lexus >
 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::Lexus *sensor_data) const
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 

静态 Public 属性

static const int32_t ID = 0x12C
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lexus >
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)
 

详细描述

在文件 steering_cmd_12c.h26 行定义.

构造及析构函数说明

◆ Steeringcmd12c()

apollo::canbus::lexus::Steeringcmd12c::Steeringcmd12c ( )

在文件 steering_cmd_12c.cc30 行定义.

成员函数说明

◆ GetPeriod()

uint32_t apollo::canbus::lexus::Steeringcmd12c::GetPeriod ( ) const
overridevirtual

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

在文件 steering_cmd_12c.cc32 行定义.

32 {
33 // TODO(QiL) : modify every protocol's period manually
34 static const uint32_t PERIOD = 20 * 1000;
35 return PERIOD;
36}

◆ Reset()

void apollo::canbus::lexus::Steeringcmd12c::Reset ( )
overridevirtual

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

在文件 steering_cmd_12c.cc47 行定义.

47 {
48 // TODO(QiL) : you should check this manually
49 ignore_overrides_ = false;
50 enable_ = false;
51 clear_override_ = false;
52 clear_faults_ = false;
53 position_ = 0.0;
54 rotation_rate_ = 0.0;
55}

◆ set_clear_faults()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_clear_faults ( bool  clear_faults)

在文件 steering_cmd_12c.cc103 行定义.

103 {
104 clear_faults_ = clear_faults;
105 return this;
106}

◆ set_clear_override()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_clear_override ( bool  clear_override)

在文件 steering_cmd_12c.cc88 行定义.

88 {
89 clear_override_ = clear_override;
90 return this;
91}

◆ set_enable()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_enable ( bool  enable)

在文件 steering_cmd_12c.cc73 行定义.

73 {
74 enable_ = enable;
75 return this;
76}

◆ set_ignore_overrides()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_ignore_overrides ( bool  ignore_overrides)

在文件 steering_cmd_12c.cc57 行定义.

57 {
58 ignore_overrides_ = ignore_overrides;
59 return this;
60}

◆ set_position()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_position ( double  position)

在文件 steering_cmd_12c.cc118 行定义.

118 {
119 // TODO(AS): fix this direction and scaling.
120 position_ = position;
121 return this;
122}

◆ set_rotation_rate()

Steeringcmd12c * apollo::canbus::lexus::Steeringcmd12c::set_rotation_rate ( double  rotation_rate)

在文件 steering_cmd_12c.cc142 行定义.

142 {
143 rotation_rate_ = rotation_rate;
144 return this;
145}

◆ UpdateData()

void apollo::canbus::lexus::Steeringcmd12c::UpdateData ( uint8_t *  data)
overridevirtual

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

在文件 steering_cmd_12c.cc38 行定义.

38 {
39 set_p_ignore_overrides(data, ignore_overrides_);
40 set_p_enable(data, enable_);
41 set_p_clear_override(data, clear_override_);
42 set_p_clear_faults(data, clear_faults_);
43 set_p_position(data, position_);
44 set_p_rotation_rate(data, rotation_rate_);
45}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lexus::Steeringcmd12c::ID = 0x12C
static

在文件 steering_cmd_12c.h29 行定义.


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