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

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

#include <turnsignal_68.h>

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

Public 成员函数

virtual uint32_t GetPeriod () const
 get the data period
 
virtual int32_t turn_cmd () const
 get the turn command
 
virtual void UpdateData (uint8_t *data)
 update the data
 
virtual void Reset ()
 reset the private variables
 
Turnsignal68set_turn_none ()
 set no-turn based on pedal command
 
Turnsignal68set_turn_left ()
 set turn left based on pedal command
 
Turnsignal68set_turn_right ()
 set turn right based on pedal command
 
- 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 = 0x68
 

额外继承的成员函数

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

在文件 turnsignal_68.h40 行定义.

成员函数说明

◆ GetPeriod()

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

get the data period

返回
the value of data period

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

在文件 turnsignal_68.cc29 行定义.

29 {
30 static const uint32_t PERIOD = 50 * 1000;
31 return PERIOD;
32}

◆ Reset()

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

reset the private variables

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

在文件 turnsignal_68.cc40 行定义.

40{ turn_cmd_ = 0; }

◆ set_turn_left()

Turnsignal68 * apollo::canbus::lincoln::Turnsignal68::set_turn_left ( )

set turn left based on pedal command

返回
a this pointer to the instance itself

在文件 turnsignal_68.cc47 行定义.

47 {
48 turn_cmd_ = 0x01;
49 return this;
50}

◆ set_turn_none()

Turnsignal68 * apollo::canbus::lincoln::Turnsignal68::set_turn_none ( )

set no-turn based on pedal command

返回
a this pointer to the instance itself

在文件 turnsignal_68.cc42 行定义.

42 {
43 turn_cmd_ = 0x00;
44 return this;
45}

◆ set_turn_right()

Turnsignal68 * apollo::canbus::lincoln::Turnsignal68::set_turn_right ( )

set turn right based on pedal command

返回
a this pointer to the instance itself

在文件 turnsignal_68.cc52 行定义.

52 {
53 turn_cmd_ = 0x02;
54 return this;
55}

◆ turn_cmd()

int32_t apollo::canbus::lincoln::Turnsignal68::turn_cmd ( ) const
virtual

get the turn command

返回
the turn command

在文件 turnsignal_68.cc34 行定义.

34{ return turn_cmd_; }

◆ UpdateData()

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

update the data

参数
dataa pointer to the data to be updated

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

在文件 turnsignal_68.cc36 行定义.

36 {
37 set_turn_cmd_p(data, turn_cmd_);
38}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Turnsignal68::ID = 0x68
static

在文件 turnsignal_68.h43 行定义.


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