Apollo 10.0
自动驾驶开放平台
license_7e.h
浏览该文件的文档.
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#pragma once
17
18#include <string>
19
20#include "modules/canbus_vehicle/lincoln/proto/lincoln.pb.h"
22
27namespace apollo {
28namespace canbus {
29namespace lincoln {
30
32 ::apollo::canbus::Lincoln> {
33 private:
34 mutable std::string vin_part0_;
35 mutable std::string vin_part1_;
36 mutable std::string vin_part2_;
37 mutable bool vin_part0_flag_;
38 mutable bool vin_part1_flag_;
39 mutable bool vin_part2_flag_;
40 mutable bool parse_success_;
41
42 public:
43 static const int32_t ID;
44 License7e();
45 virtual void Parse(const std::uint8_t* bytes, int32_t length,
46 Lincoln* chassis_detail) const;
47 // config detail: {'name': 'mux', 'offset': 0.0, 'precision': 1.0, 'len': 8,
48 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
49 // 'bit': 0, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
50 int mux(const std::uint8_t* bytes, int length) const;
51
52 bool is_ready(const std::uint8_t* bytes, int length) const;
53
54 bool is_trial(const std::uint8_t* bytes, int length) const;
55
56 bool is_expired(const std::uint8_t* bytes, int length) const;
57
58 bool is_feat_base_enabled(const std::uint8_t* bytes, int length) const;
59
60 // config detail: {'name': 'date0', 'offset': 0.0, 'precision': 1.0, 'len': 8,
61 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
62 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
63 int date0(const std::uint8_t* bytes, int length) const;
64
65 // config detail: {'name': 'date6', 'offset': 0.0, 'precision': 1.0, 'len': 8,
66 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
67 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
68 int date6(const std::uint8_t* bytes, int length) const;
69
70 // config detail: {'name': 'mac0', 'offset': 0.0, 'precision': 1.0, 'len': 8,
71 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
72 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
73 int mac0(const std::uint8_t* bytes, int length) const;
74
75 // config detail: {'name': 'vin00', 'offset': 0.0, 'precision': 1.0, 'len': 8,
76 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
77 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
78 std::string vin00(const std::uint8_t* bytes, int length) const;
79
80 // config detail: {'name': 'vin06', 'offset': 0.0, 'precision': 1.0, 'len': 8,
81 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
82 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
83 std::string vin06(const std::uint8_t* bytes, int length) const;
84
85 // config detail: {'name': 'vin12', 'offset': 0.0, 'precision': 1.0, 'len': 8,
86 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
87 // 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
88 std::string vin12(const std::uint8_t* bytes, int length) const;
89
90 bool is_feat_base_trial(const std::uint8_t* bytes, int length) const;
91
92 // config detail: {'name': 'date1', 'offset': 0.0, 'precision': 1.0, 'len': 8,
93 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
94 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
95 int date1(const std::uint8_t* bytes, int length) const;
96
97 // config detail: {'name': 'date7', 'offset': 0.0, 'precision': 1.0, 'len': 8,
98 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
99 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
100 int date7(const std::uint8_t* bytes, int length) const;
101
102 // config detail: {'name': 'mac1', 'offset': 0.0, 'precision': 1.0, 'len': 8,
103 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
104 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
105 int mac1(const std::uint8_t* bytes, int length) const;
106
107 // config detail: {'name': 'vin01', 'offset': 0.0, 'precision': 1.0, 'len': 8,
108 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
109 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
110 std::string vin01(const std::uint8_t* bytes, int length) const;
111
112 // config detail: {'name': 'vin07', 'offset': 0.0, 'precision': 1.0, 'len': 8,
113 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
114 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
115 std::string vin07(const std::uint8_t* bytes, int length) const;
116
117 // config detail: {'name': 'vin13', 'offset': 0.0, 'precision': 1.0, 'len': 8,
118 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
119 // 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
120 std::string vin13(const std::uint8_t* bytes, int length) const;
121
122 // config detail: {'name': 'date2', 'offset': 0.0, 'precision': 1.0, 'len': 8,
123 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
124 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
125 int date2(const std::uint8_t* bytes, int length) const;
126
127 // config detail: {'name': 'date8', 'offset': 0.0, 'precision': 1.0, 'len': 8,
128 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
129 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
130 int date8(const std::uint8_t* bytes, int length) const;
131
132 // config detail: {'name': 'mac2', 'offset': 0.0, 'precision': 1.0, 'len': 8,
133 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
134 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
135 int mac2(const std::uint8_t* bytes, int length) const;
136
137 // config detail: {'name': 'vin02', 'offset': 0.0, 'precision': 1.0, 'len': 8,
138 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
139 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
140 std::string vin02(const std::uint8_t* bytes, int length) const;
141
142 // config detail: {'name': 'vin08', 'offset': 0.0, 'precision': 1.0, 'len': 8,
143 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
144 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
145 std::string vin08(const std::uint8_t* bytes, int length) const;
146
147 // config detail: {'name': 'vin14', 'offset': 0.0, 'precision': 1.0, 'len': 8,
148 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
149 // 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
150 std::string vin14(const std::uint8_t* bytes, int length) const;
151
152 // config detail: {'name': 'feat_base_trials_used', 'offset': 0.0,
153 // 'precision': 1.0, 'len': 16, 'f_type': 'value', 'is_signed_var': False,
154 // 'physical_range': '[0|0]', 'bit': 32, 'type': 'int', 'order': 'intel',
155 // 'physical_unit': '""'}
156 int feat_base_trials_used(const std::uint8_t* bytes, int length) const;
157
158 // config detail: {'name': 'date3', 'offset': 0.0, 'precision': 1.0, 'len': 8,
159 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
160 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
161 int date3(const std::uint8_t* bytes, int length) const;
162
163 // config detail: {'name': 'date9', 'offset': 0.0, 'precision': 1.0, 'len': 8,
164 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
165 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
166 int date9(const std::uint8_t* bytes, int length) const;
167
168 // config detail: {'name': 'mac3', 'offset': 0.0, 'precision': 1.0, 'len': 8,
169 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
170 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
171 int mac3(const std::uint8_t* bytes, int length) const;
172
173 // config detail: {'name': 'vin03', 'offset': 0.0, 'precision': 1.0, 'len': 8,
174 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
175 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
176 std::string vin03(const std::uint8_t* bytes, int length) const;
177
178 // config detail: {'name': 'vin09', 'offset': 0.0, 'precision': 1.0, 'len': 8,
179 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
180 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
181 std::string vin09(const std::uint8_t* bytes, int length) const;
182
183 // config detail: {'name': 'vin15', 'offset': 0.0, 'precision': 1.0, 'len': 8,
184 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
185 // 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
186 std::string vin15(const std::uint8_t* bytes, int length) const;
187
188 // config detail: {'name': 'date4', 'offset': 0.0, 'precision': 1.0, 'len': 8,
189 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
190 // 'bit': 48, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
191 int date4(const std::uint8_t* bytes, int length) const;
192
193 // config detail: {'name': 'mac4', 'offset': 0.0, 'precision': 1.0, 'len': 8,
194 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
195 // 'bit': 48, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
196 int mac4(const std::uint8_t* bytes, int length) const;
197
198 // config detail: {'name': 'vin04', 'offset': 0.0, 'precision': 1.0, 'len': 8,
199 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
200 // 'bit': 48, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
201 std::string vin04(const std::uint8_t* bytes, int length) const;
202
203 // config detail: {'name': 'vin10', 'offset': 0.0, 'precision': 1.0, 'len': 8,
204 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
205 // 'bit': 48, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
206 std::string vin10(const std::uint8_t* bytes, int length) const;
207
208 // config detail: {'name': 'vin16', 'offset': 0.0, 'precision': 1.0, 'len': 8,
209 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
210 // 'bit': 48, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
211 std::string vin16(const std::uint8_t* bytes, int length) const;
212
213 // config detail: {'name': 'feat_base_trials_remaining', 'offset': 0.0,
214 // 'precision': 1.0, 'len': 16, 'f_type': 'value', 'is_signed_var': False,
215 // 'physical_range': '[0|0]', 'bit': 48, 'type': 'int', 'order': 'intel',
216 // 'physical_unit': '""'}
217 int feat_base_trials_remaining(const std::uint8_t* bytes, int length) const;
218
219 // config detail: {'name': 'date5', 'offset': 0.0, 'precision': 1.0, 'len': 8,
220 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
221 // 'bit': 56, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
222 int date5(const std::uint8_t* bytes, int length) const;
223
224 // config detail: {'name': 'mac5', 'offset': 0.0, 'precision': 1.0, 'len': 8,
225 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
226 // 'bit': 56, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
227 int mac5(const std::uint8_t* bytes, int length) const;
228
229 // config detail: {'name': 'vin05', 'offset': 0.0, 'precision': 1.0, 'len': 8,
230 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
231 // 'bit': 56, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
232 std::string vin05(const std::uint8_t* bytes, int length) const;
233
234 // config detail: {'name': 'vin11', 'offset': 0.0, 'precision': 1.0, 'len': 8,
235 // 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]',
236 // 'bit': 56, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}
237 std::string vin11(const std::uint8_t* bytes, int length) const;
238};
239
240} // namespace lincoln
241} // namespace canbus
242} // namespace apollo
int mac2(const std::uint8_t *bytes, int length) const
int date2(const std::uint8_t *bytes, int length) const
std::string vin01(const std::uint8_t *bytes, int length) const
bool is_feat_base_trial(const std::uint8_t *bytes, int length) const
bool is_trial(const std::uint8_t *bytes, int length) const
Definition license_7e.cc:99
std::string vin06(const std::uint8_t *bytes, int length) const
std::string vin05(const std::uint8_t *bytes, int length) const
int mac5(const std::uint8_t *bytes, int length) const
int date1(const std::uint8_t *bytes, int length) const
std::string vin04(const std::uint8_t *bytes, int length) const
std::string vin08(const std::uint8_t *bytes, int length) const
bool is_expired(const std::uint8_t *bytes, int length) const
std::string vin16(const std::uint8_t *bytes, int length) const
std::string vin00(const std::uint8_t *bytes, int length) const
std::string vin12(const std::uint8_t *bytes, int length) const
std::string vin15(const std::uint8_t *bytes, int length) const
int date8(const std::uint8_t *bytes, int length) const
std::string vin02(const std::uint8_t *bytes, int length) const
std::string vin14(const std::uint8_t *bytes, int length) const
int date5(const std::uint8_t *bytes, int length) const
bool is_ready(const std::uint8_t *bytes, int length) const
Definition license_7e.cc:91
std::string vin13(const std::uint8_t *bytes, int length) const
int date3(const std::uint8_t *bytes, int length) const
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
Definition license_7e.cc:48
std::string vin10(const std::uint8_t *bytes, int length) const
int date6(const std::uint8_t *bytes, int length) const
int feat_base_trials_remaining(const std::uint8_t *bytes, int length) const
int date9(const std::uint8_t *bytes, int length) const
int date4(const std::uint8_t *bytes, int length) const
int date0(const std::uint8_t *bytes, int length) const
std::string vin07(const std::uint8_t *bytes, int length) const
int mac4(const std::uint8_t *bytes, int length) const
std::string vin03(const std::uint8_t *bytes, int length) const
bool is_feat_base_enabled(const std::uint8_t *bytes, int length) const
int date7(const std::uint8_t *bytes, int length) const
int mac0(const std::uint8_t *bytes, int length) const
int feat_base_trials_used(const std::uint8_t *bytes, int length) const
int mac3(const std::uint8_t *bytes, int length) const
int mux(const std::uint8_t *bytes, int length) const
Definition license_7e.cc:83
std::string vin11(const std::uint8_t *bytes, int length) const
std::string vin09(const std::uint8_t *bytes, int length) const
int mac1(const std::uint8_t *bytes, int length) const
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData