Apollo 10.0
自动驾驶开放平台
apollo::canbus::lincoln::License7e类 参考

#include <license_7e.h>

类 apollo::canbus::lincoln::License7e 继承关系图:
apollo::canbus::lincoln::License7e 的协作图:

Public 成员函数

 License7e ()
 
virtual void Parse (const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
 
int mux (const std::uint8_t *bytes, int length) const
 
bool is_ready (const std::uint8_t *bytes, int length) const
 
bool is_trial (const std::uint8_t *bytes, int length) const
 
bool is_expired (const std::uint8_t *bytes, int length) const
 
bool is_feat_base_enabled (const std::uint8_t *bytes, int length) const
 
int date0 (const std::uint8_t *bytes, int length) const
 
int date6 (const std::uint8_t *bytes, int length) const
 
int mac0 (const std::uint8_t *bytes, int length) const
 
std::string vin00 (const std::uint8_t *bytes, int length) const
 
std::string vin06 (const std::uint8_t *bytes, int length) const
 
std::string vin12 (const std::uint8_t *bytes, int length) const
 
bool is_feat_base_trial (const std::uint8_t *bytes, int length) const
 
int date1 (const std::uint8_t *bytes, int length) const
 
int date7 (const std::uint8_t *bytes, int length) const
 
int mac1 (const std::uint8_t *bytes, int length) const
 
std::string vin01 (const std::uint8_t *bytes, int length) const
 
std::string vin07 (const std::uint8_t *bytes, int length) const
 
std::string vin13 (const std::uint8_t *bytes, int length) const
 
int date2 (const std::uint8_t *bytes, int length) const
 
int date8 (const std::uint8_t *bytes, int length) const
 
int mac2 (const std::uint8_t *bytes, int length) const
 
std::string vin02 (const std::uint8_t *bytes, int length) const
 
std::string vin08 (const std::uint8_t *bytes, int length) const
 
std::string vin14 (const std::uint8_t *bytes, int length) const
 
int feat_base_trials_used (const std::uint8_t *bytes, int length) const
 
int date3 (const std::uint8_t *bytes, int length) const
 
int date9 (const std::uint8_t *bytes, int length) const
 
int mac3 (const std::uint8_t *bytes, int length) const
 
std::string vin03 (const std::uint8_t *bytes, int length) const
 
std::string vin09 (const std::uint8_t *bytes, int length) const
 
std::string vin15 (const std::uint8_t *bytes, int length) const
 
int date4 (const std::uint8_t *bytes, int length) const
 
int mac4 (const std::uint8_t *bytes, int length) const
 
std::string vin04 (const std::uint8_t *bytes, int length) const
 
std::string vin10 (const std::uint8_t *bytes, int length) const
 
std::string vin16 (const std::uint8_t *bytes, int length) const
 
int feat_base_trials_remaining (const std::uint8_t *bytes, int length) const
 
int date5 (const std::uint8_t *bytes, int length) const
 
int mac5 (const std::uint8_t *bytes, int length) const
 
std::string vin05 (const std::uint8_t *bytes, int length) const
 
std::string vin11 (const std::uint8_t *bytes, int length) const
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
 ProtocolData ()=default
 construct protocol data.
 
virtual ~ProtocolData ()=default
 destruct protocol data.
 
virtual uint32_t GetPeriod () const
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::Lincoln *sensor_data) const
 
virtual void UpdateData (uint8_t *data)
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 
virtual void Reset ()
 

静态 Public 属性

static const int32_t ID = 0x7E
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
static std::uint8_t CalculateCheckSum (const uint8_t *input, const uint32_t length)
 static function, used to calculate the checksum of input array.
 
static T BoundedValue (T lower, T upper, T val)
 

详细描述

在文件 license_7e.h31 行定义.

构造及析构函数说明

◆ License7e()

apollo::canbus::lincoln::License7e::License7e ( )

在文件 license_7e.cc39 行定义.

40 : vin_part0_(""),
41 vin_part1_(""),
42 vin_part2_(""),
43 vin_part0_flag_(false),
44 vin_part1_flag_(false),
45 vin_part2_flag_(false),
46 parse_success_(false) {}

成员函数说明

◆ date0()

int apollo::canbus::lincoln::License7e::date0 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc124 行定义.

124 {
125 Byte frame(bytes + 2);
126 return ByteTo<int>(frame);
127}

◆ date1()

int apollo::canbus::lincoln::License7e::date1 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc181 行定义.

181 {
182 Byte frame(bytes + 3);
183 return ByteTo<int>(frame);
184}

◆ date2()

int apollo::canbus::lincoln::License7e::date2 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc229 行定义.

229 {
230 Byte frame(bytes + 4);
231 return ByteTo<int>(frame);
232}

◆ date3()

int apollo::canbus::lincoln::License7e::date3 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc292 行定义.

292 {
293 Byte frame(bytes + 5);
294 return ByteTo<int>(frame);
295}

◆ date4()

int apollo::canbus::lincoln::License7e::date4 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc340 行定义.

340 {
341 Byte frame(bytes + 6);
342 return ByteTo<int>(frame);
343}

◆ date5()

int apollo::canbus::lincoln::License7e::date5 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc395 行定义.

395 {
396 Byte frame(bytes + 7);
397 return ByteTo<int>(frame);
398}

◆ date6()

int apollo::canbus::lincoln::License7e::date6 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc132 行定义.

132 {
133 Byte frame(bytes + 2);
134 return ByteTo<int>(frame);
135}

◆ date7()

int apollo::canbus::lincoln::License7e::date7 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc189 行定义.

189 {
190 Byte frame(bytes + 3);
191 return ByteTo<int>(frame);
192}

◆ date8()

int apollo::canbus::lincoln::License7e::date8 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc237 行定义.

237 {
238 Byte frame(bytes + 4);
239 return ByteTo<int>(frame);
240}

◆ date9()

int apollo::canbus::lincoln::License7e::date9 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc300 行定义.

300 {
301 Byte frame(bytes + 5);
302 return ByteTo<int>(frame);
303}

◆ feat_base_trials_remaining()

int apollo::canbus::lincoln::License7e::feat_base_trials_remaining ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc381 行定义.

382 {
383 Byte t0(bytes + 7);
384 int x = t0.get_byte(0, 8);
385 Byte t1(bytes + 6);
386 int t = t1.get_byte(0, 8);
387 x <<= 8;
388 x |= t;
389 return x;
390}

◆ feat_base_trials_used()

int apollo::canbus::lincoln::License7e::feat_base_trials_used ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc278 行定义.

279 {
280 Byte t0(bytes + 5);
281 int x = t0.get_byte(0, 8);
282 Byte t1(bytes + 4);
283 int t = t1.get_byte(0, 8);
284 x <<= 8;
285 x |= t;
286 return x;
287}

◆ is_expired()

bool apollo::canbus::lincoln::License7e::is_expired ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc107 行定义.

107 {
108 Byte frame(bytes + 1);
109 return frame.is_bit_1(2);
110}

◆ is_feat_base_enabled()

bool apollo::canbus::lincoln::License7e::is_feat_base_enabled ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc115 行定义.

116 {
117 Byte frame(bytes + 2);
118 return frame.is_bit_1(0);
119}

◆ is_feat_base_trial()

bool apollo::canbus::lincoln::License7e::is_feat_base_trial ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc172 行定义.

173 {
174 Byte frame(bytes + 2);
175 return frame.is_bit_1(1);
176}

◆ is_ready()

bool apollo::canbus::lincoln::License7e::is_ready ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc91 行定义.

91 {
92 Byte frame(bytes + 1);
93 return frame.is_bit_1(0);
94}

◆ is_trial()

bool apollo::canbus::lincoln::License7e::is_trial ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc99 行定义.

99 {
100 Byte frame(bytes + 1);
101 return frame.is_bit_1(1);
102}

◆ mac0()

int apollo::canbus::lincoln::License7e::mac0 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc140 行定义.

140 {
141 Byte frame(bytes + 2);
142 return ByteTo<int>(frame);
143}

◆ mac1()

int apollo::canbus::lincoln::License7e::mac1 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc197 行定义.

197 {
198 Byte frame(bytes + 3);
199 return ByteTo<int>(frame);
200}

◆ mac2()

int apollo::canbus::lincoln::License7e::mac2 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc245 行定义.

245 {
246 Byte frame(bytes + 4);
247 return ByteTo<int>(frame);
248}

◆ mac3()

int apollo::canbus::lincoln::License7e::mac3 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc308 行定义.

308 {
309 Byte frame(bytes + 5);
310 return ByteTo<int>(frame);
311}

◆ mac4()

int apollo::canbus::lincoln::License7e::mac4 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc348 行定义.

348 {
349 Byte frame(bytes + 6);
350 return ByteTo<int>(frame);
351}

◆ mac5()

int apollo::canbus::lincoln::License7e::mac5 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc403 行定义.

403 {
404 Byte frame(bytes + 7);
405 return ByteTo<int>(frame);
406}

◆ mux()

int apollo::canbus::lincoln::License7e::mux ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc83 行定义.

83 {
84 Byte frame(bytes + 0);
85 return ByteTo<int>(frame);
86}

◆ Parse()

void apollo::canbus::lincoln::License7e::Parse ( const std::uint8_t *  bytes,
int32_t  length,
Lincoln chassis_detail 
) const
virtual

在文件 license_7e.cc48 行定义.

49 {
50 if (!parse_success_) {
51 switch (mux(bytes, length)) {
52 case 0x83:
53 vin_part0_ = vin00(bytes, length) + vin01(bytes, length) +
54 vin02(bytes, length) + vin03(bytes, length) +
55 vin04(bytes, length) + vin05(bytes, length);
56 vin_part0_flag_ = true;
57 break;
58 case 0x84:
59 vin_part1_ = vin06(bytes, length) + vin07(bytes, length) +
60 vin08(bytes, length) + vin09(bytes, length) +
61 vin10(bytes, length) + vin11(bytes, length);
62 vin_part1_flag_ = true;
63 break;
64 case 0x85:
65 vin_part2_ = vin12(bytes, length) + vin13(bytes, length) +
66 vin14(bytes, length) + vin15(bytes, length) +
67 vin16(bytes, length);
68 vin_part2_flag_ = true;
69 break;
70 }
71
72 if (vin_part0_flag_ && vin_part1_flag_ && vin_part2_flag_) {
73 parse_success_ = true;
74 chassis_detail->mutable_vehicle_id()->set_vin(
75 (vin_part0_ + vin_part1_ + vin_part2_));
76 }
77 }
78}
std::string vin01(const std::uint8_t *bytes, int length) const
std::string vin06(const std::uint8_t *bytes, int length) const
std::string vin05(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
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
std::string vin02(const std::uint8_t *bytes, int length) const
std::string vin14(const std::uint8_t *bytes, int length) const
std::string vin13(const std::uint8_t *bytes, int length) const
std::string vin10(const std::uint8_t *bytes, int length) const
std::string vin07(const std::uint8_t *bytes, int length) const
std::string vin03(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

◆ vin00()

std::string apollo::canbus::lincoln::License7e::vin00 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc148 行定义.

148 {
149 Byte frame(bytes + 2);
150 return ByteToString(frame);
151}

◆ vin01()

std::string apollo::canbus::lincoln::License7e::vin01 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc205 行定义.

205 {
206 Byte frame(bytes + 3);
207 return ByteToString(frame);
208}

◆ vin02()

std::string apollo::canbus::lincoln::License7e::vin02 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc253 行定义.

253 {
254 Byte frame(bytes + 4);
255 return ByteToString(frame);
256}

◆ vin03()

std::string apollo::canbus::lincoln::License7e::vin03 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc316 行定义.

316 {
317 Byte frame(bytes + 5);
318 return ByteToString(frame);
319}

◆ vin04()

std::string apollo::canbus::lincoln::License7e::vin04 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc356 行定义.

356 {
357 Byte frame(bytes + 6);
358 return ByteToString(frame);
359}

◆ vin05()

std::string apollo::canbus::lincoln::License7e::vin05 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc411 行定义.

411 {
412 Byte frame(bytes + 7);
413 return ByteToString(frame);
414}

◆ vin06()

std::string apollo::canbus::lincoln::License7e::vin06 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc156 行定义.

156 {
157 Byte frame(bytes + 2);
158 return ByteToString(frame);
159}

◆ vin07()

std::string apollo::canbus::lincoln::License7e::vin07 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc213 行定义.

213 {
214 Byte frame(bytes + 3);
215 return ByteToString(frame);
216}

◆ vin08()

std::string apollo::canbus::lincoln::License7e::vin08 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc261 行定义.

261 {
262 Byte frame(bytes + 4);
263 return ByteToString(frame);
264}

◆ vin09()

std::string apollo::canbus::lincoln::License7e::vin09 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc324 行定义.

324 {
325 Byte frame(bytes + 5);
326 return ByteToString(frame);
327}

◆ vin10()

std::string apollo::canbus::lincoln::License7e::vin10 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc364 行定义.

364 {
365 Byte frame(bytes + 6);
366 return ByteToString(frame);
367}

◆ vin11()

std::string apollo::canbus::lincoln::License7e::vin11 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc419 行定义.

419 {
420 Byte frame(bytes + 7);
421 return ByteToString(frame);
422}

◆ vin12()

std::string apollo::canbus::lincoln::License7e::vin12 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc164 行定义.

164 {
165 Byte frame(bytes + 2);
166 return ByteToString(frame);
167}

◆ vin13()

std::string apollo::canbus::lincoln::License7e::vin13 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc221 行定义.

221 {
222 Byte frame(bytes + 3);
223 return ByteToString(frame);
224}

◆ vin14()

std::string apollo::canbus::lincoln::License7e::vin14 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc269 行定义.

269 {
270 Byte frame(bytes + 4);
271 return ByteToString(frame);
272}

◆ vin15()

std::string apollo::canbus::lincoln::License7e::vin15 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc332 行定义.

332 {
333 Byte frame(bytes + 5);
334 return ByteToString(frame);
335}

◆ vin16()

std::string apollo::canbus::lincoln::License7e::vin16 ( const std::uint8_t *  bytes,
int  length 
) const

在文件 license_7e.cc372 行定义.

372 {
373 Byte frame(bytes + 6);
374 return ByteToString(frame);
375}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::License7e::ID = 0x7E
static

在文件 license_7e.h43 行定义.


该类的文档由以下文件生成: