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

#include <ecu_status_2_516.h>

类 apollo::canbus::ch::Ecustatus2516 继承关系图:
apollo::canbus::ch::Ecustatus2516 的协作图:

Public 成员函数

 Ecustatus2516 ()
 
void Parse (const std::uint8_t *bytes, int32_t length, Ch *chassis) const override
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Ch >
 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::Ch *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 = 0x516
 

额外继承的成员函数

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

详细描述

在文件 ecu_status_2_516.h26 行定义.

构造及析构函数说明

◆ Ecustatus2516()

apollo::canbus::ch::Ecustatus2516::Ecustatus2516 ( )

在文件 ecu_status_2_516.cc28 行定义.

28{}

成员函数说明

◆ Parse()

void apollo::canbus::ch::Ecustatus2516::Parse ( const std::uint8_t *  bytes,
int32_t  length,
Ch chassis 
) const
override

在文件 ecu_status_2_516.cc31 行定义.

32 {
33 chassis->mutable_ecu_status_2_516()->set_battery_soc(
34 battery_soc(bytes, length));
35 chassis->mutable_ecu_status_2_516()->set_battery_capacity(
36 battery_capacity(bytes, length));
37 chassis->mutable_ecu_status_2_516()->set_battery_voltage(
38 battery_voltage(bytes, length));
39 chassis->mutable_ecu_status_2_516()->set_battery_current(
40 battery_current(bytes, length));
41 chassis->mutable_ecu_status_2_516()->set_battery_temperature(
42 battery_temperature(bytes, length));
43 chassis->mutable_ecu_status_2_516()->set_is_battery_soc_low(
44 battery_soc(bytes, length) <= 15);
45}

类成员变量说明

◆ ID

const int32_t apollo::canbus::ch::Ecustatus2516::ID = 0x516
static

在文件 ecu_status_2_516.h29 行定义.


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