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

#include <fbs2_240.h>

类 apollo::canbus::wey::Fbs2240 继承关系图:
apollo::canbus::wey::Fbs2240 的协作图:

Public 成员函数

 Fbs2240 ()
 
void Parse (const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Wey >
 ProtocolData ()=default
 construct protocol data.
 
virtual ~ProtocolData ()=default
 destruct protocol data.
 
virtual uint32_t GetPeriod () const
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::Wey *sensor_data) const
 
virtual void UpdateData (uint8_t *data)
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 
virtual void Reset ()
 

静态 Public 属性

static const int32_t ID = 0x240
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Wey >
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)
 

详细描述

在文件 fbs2_240.h26 行定义.

构造及析构函数说明

◆ Fbs2240()

apollo::canbus::wey::Fbs2240::Fbs2240 ( )

在文件 fbs2_240.cc30 行定义.

30{}

成员函数说明

◆ Parse()

void apollo::canbus::wey::Fbs2240::Parse ( const std::uint8_t *  bytes,
int32_t  length,
Wey chassis 
) const
override

在文件 fbs2_240.cc33 行定义.

34 {
35 chassis->mutable_fbs2_240()->set_flwheeldirection(
36 flwheeldirection(bytes, length));
37 chassis->mutable_fbs2_240()->set_frwheelspd(
38 frwheelspd(bytes, length));
39 chassis->mutable_fbs2_240()->set_rlwheeldrivedirection(
40 rlwheeldrivedirection(bytes, length));
41 chassis->mutable_fbs2_240()->set_rlwheelspd(
42 rlwheelspd(bytes, length));
43 chassis->mutable_fbs2_240()->set_rrwheeldirection(
44 rrwheeldirection(bytes, length));
45 chassis->mutable_fbs2_240()->set_rrwheelspd(
46 rrwheelspd(bytes, length));
47 // change km/h to m/s
48 chassis->mutable_fbs2_240()->set_vehiclespd(
49 vehiclespd(bytes, length) / 3.6);
50}

类成员变量说明

◆ ID

const int32_t apollo::canbus::wey::Fbs2240::ID = 0x240
static

在文件 fbs2_240.h29 行定义.


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