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

#include <throttle_command_110.h>

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

Public 成员函数

 Throttlecommand110 ()
 
uint32_t GetPeriod () const override
 
void UpdateData (uint8_t *data) override
 
void Reset () override
 
Throttlecommand110set_throttle_pedal_en_ctrl (Throttle_command_110::Throttle_pedal_en_ctrlType throttle_pedal_en_ctrl)
 
Throttlecommand110set_throttle_pedal_cmd (int throttle_pedal_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 = 0x110
 

额外继承的成员函数

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

详细描述

在文件 throttle_command_110.h27 行定义.

构造及析构函数说明

◆ Throttlecommand110()

apollo::canbus::ch::Throttlecommand110::Throttlecommand110 ( )

在文件 throttle_command_110.cc29 行定义.

成员函数说明

◆ GetPeriod()

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

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

在文件 throttle_command_110.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::Throttlecommand110::Reset ( )
overridevirtual

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

在文件 throttle_command_110.cc42 行定义.

42 {
43 // TODO(All) : you should check this manually
44 throttle_pedal_en_ctrl_ =
46 throttle_pedal_cmd_ = 0;
47}

◆ set_throttle_pedal_cmd()

Throttlecommand110 * apollo::canbus::ch::Throttlecommand110::set_throttle_pedal_cmd ( int  throttle_pedal_cmd)

在文件 throttle_command_110.cc69 行定义.

70 {
71 throttle_pedal_cmd_ = throttle_pedal_cmd;
72 return this;
73}

◆ set_throttle_pedal_en_ctrl()

Throttlecommand110 * apollo::canbus::ch::Throttlecommand110::set_throttle_pedal_en_ctrl ( Throttle_command_110::Throttle_pedal_en_ctrlType  throttle_pedal_en_ctrl)

在文件 throttle_command_110.cc49 行定义.

50 {
51 throttle_pedal_en_ctrl_ = throttle_pedal_en_ctrl;
52 return this;
53}

◆ UpdateData()

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

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

在文件 throttle_command_110.cc37 行定义.

37 {
38 set_p_throttle_pedal_en_ctrl(data, throttle_pedal_en_ctrl_);
39 set_p_throttle_pedal_cmd(data, throttle_pedal_cmd_);
40}

类成员变量说明

◆ ID

const int32_t apollo::canbus::ch::Throttlecommand110::ID = 0x110
static

在文件 throttle_command_110.h30 行定义.


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