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

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

#include <gear_66.h>

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

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
 
Gear66set_gear_none ()
 set gear to none
 
Gear66set_gear_park ()
 set gear to park
 
Gear66set_gear_reverse ()
 set gear to reverse
 
Gear66set_gear_neutral ()
 set gear to neutral
 
Gear66set_gear_drive ()
 set gear to drive
 
Gear66set_gear_low ()
 set gear to low
 
- 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 = 0x66
 

额外继承的成员函数

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

在文件 gear_66.h40 行定义.

成员函数说明

◆ GetPeriod()

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

get the data period

返回
the value of data period

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

在文件 gear_66.cc30 行定义.

30 {
31 // on event, so value nonsense
32 static const uint32_t PERIOD = 10 * 1000;
33 return PERIOD;
34}

◆ Reset()

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

reset the private variables

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

在文件 gear_66.cc41 行定义.

41{ gear_ = 0; }

◆ set_gear_drive()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_drive ( )

set gear to drive

返回
a this pointer to the instance itself

在文件 gear_66.cc63 行定义.

63 {
64 gear_ = 0x04;
65 return this;
66}

◆ set_gear_low()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_low ( )

set gear to low

返回
a this pointer to the instance itself

在文件 gear_66.cc68 行定义.

68 {
69 gear_ = 0x05;
70 return this;
71}

◆ set_gear_neutral()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_neutral ( )

set gear to neutral

返回
a this pointer to the instance itself

在文件 gear_66.cc58 行定义.

58 {
59 gear_ = 0x03;
60 return this;
61}

◆ set_gear_none()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_none ( )

set gear to none

返回
a this pointer to the instance itself

在文件 gear_66.cc43 行定义.

43 {
44 gear_ = 0x00;
45 return this;
46}

◆ set_gear_park()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_park ( )

set gear to park

返回
a this pointer to the instance itself

在文件 gear_66.cc48 行定义.

48 {
49 gear_ = 0x01;
50 return this;
51}

◆ set_gear_reverse()

Gear66 * apollo::canbus::lincoln::Gear66::set_gear_reverse ( )

set gear to reverse

返回
a this pointer to the instance itself

在文件 gear_66.cc53 行定义.

53 {
54 gear_ = 0x02;
55 return this;
56}

◆ UpdateData()

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

update the data

参数
dataa pointer to the data to be updated

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

在文件 gear_66.cc36 行定义.

36 {
37 set_gear_p(data, gear_);
38 set_clear_driver_override_flag_p(data);
39}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Gear66::ID = 0x66
static

在文件 gear_66.h43 行定义.


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