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

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

#include <brake_60.h>

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

Public 成员函数

uint32_t GetPeriod () const override
 get the data period
 
void UpdateData (uint8_t *data) override
 update the data
 
void Reset () override
 reset the private variables
 
Brake60set_pedal (double pcmd)
 set pedal based on pedal command
 
Brake60set_enable ()
 set pedal_enable_ to true
 
Brake60set_disable ()
 set pedal_enable_ to false
 
- 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 = 0x60
 

额外继承的成员函数

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

在文件 brake_60.h40 行定义.

成员函数说明

◆ GetPeriod()

uint32_t apollo::canbus::lincoln::Brake60::GetPeriod ( ) const
overridevirtual

get the data period

返回
the value of data period

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

在文件 brake_60.cc30 行定义.

30 {
31 static const uint32_t PERIOD = 10 * 1000;
32 return PERIOD;
33}

◆ Reset()

void apollo::canbus::lincoln::Brake60::Reset ( )
overridevirtual

reset the private variables

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

在文件 brake_60.cc43 行定义.

43 {
44 pedal_cmd_ = 0.0;
45 boo_cmd_ = false;
46 pedal_enable_ = false;
47 clear_driver_override_flag_ = false;
48 ignore_driver_override_ = false;
49 watchdog_counter_ = 0;
50}

◆ set_disable()

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

set pedal_enable_ to false

返回
a this pointer to the instance itself

在文件 brake_60.cc77 行定义.

77 {
78 pedal_enable_ = false;
79 return this;
80}

◆ set_enable()

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

set pedal_enable_ to true

返回
a this pointer to the instance itself

在文件 brake_60.cc72 行定义.

72 {
73 pedal_enable_ = true;
74 return this;
75}

◆ set_pedal()

Brake60 * apollo::canbus::lincoln::Brake60::set_pedal ( double  pcmd)

set pedal based on pedal command

返回
a this pointer to the instance itself

在文件 brake_60.cc52 行定义.

52 {
53 pedal_cmd_ = pedal;
54 if (pedal_cmd_ < 1e-3) {
55 disable_boo_cmd();
56 } else {
57 enable_boo_cmd();
58 }
59 return this;
60}

◆ UpdateData()

void apollo::canbus::lincoln::Brake60::UpdateData ( uint8_t *  data)
overridevirtual

update the data

参数
dataa pointer to the data to be updated

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

在文件 brake_60.cc35 行定义.

35 {
36 set_pedal_p(data, pedal_cmd_);
37 set_boo_cmd_p(data, boo_cmd_);
38 set_enable_p(data, pedal_enable_);
39 set_clear_driver_override_flag_p(data, clear_driver_override_flag_);
40 set_watchdog_counter_p(data, watchdog_counter_);
41}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Brake60::ID = 0x60
static

在文件 brake_60.h43 行定义.


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