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

#include <steer_command_112.h>

类 apollo::canbus::ch::Steercommand112 继承关系图:
apollo::canbus::ch::Steercommand112 的协作图:

Public 成员函数

 Steercommand112 ()
 
uint32_t GetPeriod () const override
 
void UpdateData (uint8_t *data) override
 
void Reset () override
 
Steercommand112set_steer_angle_en_ctrl (Steer_command_112::Steer_angle_en_ctrlType steer_angle_en_ctrl)
 
Steercommand112set_steer_angle_cmd (double steer_angle_cmd)
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Ch >
 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::Ch *sensor_data) const
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 

静态 Public 属性

static const int32_t ID = 0x112
 

额外继承的成员函数

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

详细描述

在文件 steer_command_112.h26 行定义.

构造及析构函数说明

◆ Steercommand112()

apollo::canbus::ch::Steercommand112::Steercommand112 ( )

在文件 steer_command_112.cc29 行定义.

成员函数说明

◆ GetPeriod()

uint32_t apollo::canbus::ch::Steercommand112::GetPeriod ( ) const
overridevirtual

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

在文件 steer_command_112.cc31 行定义.

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

◆ Reset()

void apollo::canbus::ch::Steercommand112::Reset ( )
overridevirtual

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

在文件 steer_command_112.cc42 行定义.

42 {
43 // TODO(All) : you should check this manually
45 steer_angle_cmd_ = 0.0;
46}

◆ set_steer_angle_cmd()

Steercommand112 * apollo::canbus::ch::Steercommand112::set_steer_angle_cmd ( double  steer_angle_cmd)

在文件 steer_command_112.cc68 行定义.

68 {
69 steer_angle_cmd_ = steer_angle_cmd;
70 return this;
71}

◆ set_steer_angle_en_ctrl()

Steercommand112 * apollo::canbus::ch::Steercommand112::set_steer_angle_en_ctrl ( Steer_command_112::Steer_angle_en_ctrlType  steer_angle_en_ctrl)

在文件 steer_command_112.cc48 行定义.

49 {
50 steer_angle_en_ctrl_ = steer_angle_en_ctrl;
51 return this;
52}

◆ UpdateData()

void apollo::canbus::ch::Steercommand112::UpdateData ( uint8_t *  data)
overridevirtual

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

在文件 steer_command_112.cc37 行定义.

37 {
38 set_p_steer_angle_en_ctrl(data, steer_angle_en_ctrl_);
39 set_p_steer_angle_cmd(data, steer_angle_cmd_);
40}

类成员变量说明

◆ ID

const int32_t apollo::canbus::ch::Steercommand112::ID = 0x112
static

在文件 steer_command_112.h29 行定义.


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