19#include "modules/canbus_vehicle/demo/proto/demo.pb.h"
30 static const int32_t
ID;
36 void Parse(
const std::uint8_t* bytes, int32_t length,
37 Demo* chassis)
const override;
43 void Reset()
override;
83 void set_p_heartbeat_100(uint8_t* data,
int heartbeat_100);
88 void set_p_speed_target(uint8_t* data,
double speed_target);
93 void set_p_throttle_acc(uint8_t* data,
double throttle_acc);
98 void set_p_checksum_100(uint8_t* data,
int checksum_100);
104 void set_p_throttle_pedal_target(uint8_t* data,
double throttle_pedal_target);
111 void set_p_throttle_en_ctrl(
115 int heartbeat_100(
const std::uint8_t* bytes,
const int32_t length)
const;
117 double speed_target(
const std::uint8_t* bytes,
const int32_t length)
const;
119 double throttle_acc(
const std::uint8_t* bytes,
const int32_t length)
const;
121 int checksum_100(
const std::uint8_t* bytes,
const int32_t length)
const;
123 double throttle_pedal_target(
const std::uint8_t* bytes,
124 const int32_t length)
const;
127 const std::uint8_t* bytes,
const int32_t length)
const;
131 double speed_target_;
132 double throttle_acc_;
134 double throttle_pedal_target_;
void UpdateData_Heartbeat(uint8_t *data) override
Throttlecommand100 * set_heartbeat_100(int heartbeat_100)
Throttlecommand100 * set_throttle_en_ctrl(Throttle_command_100::Throttle_en_ctrlType throttle_en_ctrl)
void Parse(const std::uint8_t *bytes, int32_t length, Demo *chassis) const override
void UpdateData(uint8_t *data) override
uint32_t GetPeriod() const override
Throttlecommand100 * set_throttle_pedal_target(double throttle_pedal_target)
Throttlecommand100 * set_checksum_100(int checksum_100)
Throttlecommand100 * set_speed_target(double speed_target)
Throttlecommand100 * set_throttle_acc(double throttle_acc)
This is the base class of protocol data.
The class of ProtocolData