43 template <
typename SensorType>
53 const uint32_t length);
82 virtual void Parse(
const uint8_t *bytes, int32_t length,
105 template <
typename SensorType>
106 template <
typename T>
121 template <
typename SensorType>
123 const uint32_t length) {
124 return static_cast<uint8_t
>(std::accumulate(input, input + length, 0) ^ 0xFF);
127 template <
typename SensorType>
129 const uint32_t CONST_PERIOD = 100 * 1000;
133 template <
typename SensorType>
138 template <
typename SensorType>
142 template <
typename SensorType>
145 template <
typename SensorType>
virtual ~ProtocolData()=default
destruct protocol data.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
static std::uint8_t CalculateCheckSum(const uint8_t *input, const uint32_t length)
static function, used to calculate the checksum of input array.
Definition: protocol_data.h:122
ProtocolData()=default
construct protocol data.
virtual int32_t GetLength() const
Definition: protocol_data.h:134
virtual void Parse(const uint8_t *bytes, int32_t length, SensorType *sensor_data) const
Definition: protocol_data.h:139
const int32_t CANBUS_MESSAGE_LENGTH
Definition: canbus_consts.h:37
virtual uint32_t GetPeriod() const
Definition: protocol_data.h:128
virtual void Reset()
Definition: protocol_data.h:146
SensorType
Sensor types are set in the order of lidar, radar, camera, ultrasonic Please make sure SensorType has...
Definition: sensor_meta.h:29
static T BoundedValue(T lower, T upper, T val)
Definition: protocol_data.h:107
virtual void UpdateData(uint8_t *data)
Definition: protocol_data.h:143