Apollo  6.0
Open source self driving car software
version_7f.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
22 #pragma once
23 
24 #include "modules/canbus/proto/chassis_detail.pb.h"
26 
31 namespace apollo {
32 namespace canbus {
33 namespace lincoln {
34 
41  ::apollo::canbus::ChassisDetail> {
42  public:
43  static const int32_t ID;
44 
45  /*
46  * @brief parse received data
47  * @param bytes a pointer to the input bytes
48  * @param length the length of the input bytes
49  * @param chassis_detail the parsed chassis_detail
50  */
51  virtual void Parse(const std::uint8_t *bytes, int32_t length,
52  ChassisDetail *chassis_detail) const;
53 
60  int32_t module_name(const std::uint8_t *bytes, int32_t length) const;
61 
68  int32_t major_version(const std::uint8_t *bytes, int32_t length) const;
69 
76  int32_t minor_version(const std::uint8_t *bytes, int32_t length) const;
77 
84  int32_t build_number(const std::uint8_t *bytes, int32_t length) const;
85 };
86 
87 } // namespace lincoln
88 } // namespace canbus
89 } // namespace apollo
int32_t minor_version(const std::uint8_t *bytes, int32_t length) const
get minor version based on byte array.
int32_t major_version(const std::uint8_t *bytes, int32_t length) const
get major version based on byte array.
one of the protocol data of lincoln vehicle
Definition: version_7f.h:40
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
virtual void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis_detail) const
static const int32_t ID
Definition: version_7f.h:43
int32_t build_number(const std::uint8_t *bytes, int32_t length) const
get build number based on byte array.
The class of ProtocolData.
int32_t module_name(const std::uint8_t *bytes, int32_t length) const
get module name based on byte array.