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

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

#include <throttle_62.h>

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

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
 
Throttle62set_pedal (double pcmd)
 set pedal based on pedal command
 
Throttle62set_enable ()
 set enable
 
Throttle62set_disable ()
 set disable
 
Throttle62set_enable_ignore_driver_override ()
 set enable ignore driver override
 
- 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 = 0x62
 

额外继承的成员函数

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

在文件 throttle_62.h40 行定义.

成员函数说明

◆ GetPeriod()

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

get the data period

返回
the value of data period

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

在文件 throttle_62.cc31 行定义.

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

◆ Reset()

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

reset the private variables

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

在文件 throttle_62.cc44 行定义.

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

◆ set_disable()

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

set disable

返回
a this pointer to the instance itself

在文件 throttle_62.cc62 行定义.

62 {
63 pedal_enable_ = false;
64 return this;
65}

◆ set_enable()

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

set enable

返回
a this pointer to the instance itself

在文件 throttle_62.cc57 行定义.

57 {
58 pedal_enable_ = true;
59 return this;
60}

◆ set_enable_ignore_driver_override()

Throttle62 * apollo::canbus::lincoln::Throttle62::set_enable_ignore_driver_override ( )

set enable ignore driver override

返回
a this pointer to the instance itself

◆ set_pedal()

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

set pedal based on pedal command

返回
a this pointer to the instance itself

在文件 throttle_62.cc52 行定义.

52 {
53 pedal_cmd_ = pedal;
54 return this;
55}

◆ UpdateData()

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

update the data

参数
dataa pointer to the data to be updated

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

在文件 throttle_62.cc36 行定义.

36 {
37 set_pedal_p(data, pedal_cmd_);
38 set_enable_p(data, pedal_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_watchdog_counter_p(data, watchdog_counter_);
42}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Throttle62::ID = 0x62
static

在文件 throttle_62.h43 行定义.


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