19#include "glog/logging.h"
28using ::apollo::drivers::canbus::Byte;
34 Demo* chassis)
const {
35 chassis->mutable_bms_report_512()->set_battery_flt_overtemp(
36 battery_flt_overtemp(bytes, length));
37 chassis->mutable_bms_report_512()->set_battery_flt_lowtemp(
38 battery_flt_lowtemp(bytes, length));
39 chassis->mutable_bms_report_512()->set_battery_inside_temperature(
40 battery_inside_temperature(bytes, length));
41 chassis->mutable_bms_report_512()->set_battery_current(
42 battery_current(bytes, length));
43 chassis->mutable_bms_report_512()->set_battery_voltage(
44 battery_voltage(bytes, length));
45 chassis->mutable_bms_report_512()->set_battery_soc(
46 battery_soc(bytes, length));
54 const std::uint8_t* bytes, int32_t length)
const {
56 int32_t x = t0.get_byte(1, 1);
68 const std::uint8_t* bytes, int32_t length)
const {
70 int32_t x = t0.get_byte(0, 1);
81int Bmsreport512::battery_inside_temperature(
const std::uint8_t* bytes,
82 int32_t length)
const {
84 int32_t x = t0.get_byte(0, 8);
86 int ret = x + -40.000000;
94double Bmsreport512::battery_current(
const std::uint8_t* bytes,
95 int32_t length)
const {
97 int32_t x = t0.get_byte(0, 8);
100 int32_t t = t1.get_byte(0, 8);
104 double ret = x * 0.100000 + -3200.000000;
112double Bmsreport512::battery_voltage(
const std::uint8_t* bytes,
113 int32_t length)
const {
115 int32_t x = t0.get_byte(0, 8);
118 int32_t t = t1.get_byte(0, 8);
122 double ret = x * 0.010000;
130int Bmsreport512::battery_soc(
const std::uint8_t* bytes, int32_t length)
const {
132 int32_t x = t0.get_byte(0, 8);
void Parse(const std::uint8_t *bytes, int32_t length, Demo *chassis) const override