Apollo 10.0
自动驾驶开放平台
fbs2_240.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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
17#pragma once
18
19#include "modules/canbus_vehicle/wey/proto/wey.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace wey {
25
27 ::apollo::canbus::Wey> {
28 public:
29 static const int32_t ID;
30 Fbs2240();
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Wey* chassis) const override;
33
34 private:
35 // config detail: {'description': 'Front left wheel Moving direction',
36 // 'enum': {0: 'FLWHEELDIRECTION_INVALID', 1: 'FLWHEELDIRECTION_FORWARD',
37 // 2: 'FLWHEELDIRECTION_BACKWARD', 3: 'FLWHEELDIRECTION_STOP'},
38 // 'precision': 1.0, 'len': 2, 'name': 'FLWheelDirection',
39 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]',
40 // 'bit': 57, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
41 Fbs2_240::FlwheeldirectionType flwheeldirection(const std::uint8_t* bytes,
42 const int32_t length) const;
43
44 // config detail: {'description': 'Front right wheel speed', 'offset': 0.0,
45 // 'precision': 0.05625, 'len': 13, 'name': 'FRWheelSpd',
46 // 'is_signed_var': False, 'physical_range': '[0|299.98125]',
47 // 'bit': 7, 'type': 'double', 'order': 'motorola', 'physical_unit': 'Km/h'}
48 double frwheelspd(const std::uint8_t* bytes, const int32_t length) const;
49
50 // config detail: {'description': 'Rear left wheel Moving direction',
51 // 'enum': {0: 'RLWHEELDRIVEDIRECTION_INVALID',
52 // 1: 'RLWHEELDRIVEDIRECTION_FORWARD', 2: 'RLWHEELDRIVEDIRECTION_BACKWARD',
53 // 3: 'RLWHEELDRIVEDIRECTION_STOP'}, 'precision': 1.0, 'len': 2, 'name':
54 // 'RLWheelDriveDirection', 'is_signed_var': False, 'offset': 0.0,
55 // 'physical_range': '[0|3]', 'bit': 9, 'type': 'enum', 'order': 'motorola',
56 // 'physical_unit': ''}
57 Fbs2_240::RlwheeldrivedirectionType rlwheeldrivedirection(
58 const std::uint8_t* bytes, const int32_t length) const;
59
60 // config detail: {'description': 'Rear left wheel speed', 'offset': 0.0,
61 // 'precision': 0.05625, 'len': 13, 'name': 'RLWheelSpd',
62 // 'is_signed_var': False, 'physical_range': '[0|299.98125]',
63 // 'bit': 23, 'type': 'double', 'order': 'motorola', 'physical_unit': 'Km/h'}
64 double rlwheelspd(const std::uint8_t* bytes, const int32_t length) const;
65
66 // config detail: {'description': 'Rear right wheel Moving direction',
67 // 'enum': {0: 'RRWHEELDIRECTION_INVALID', 1: 'RRWHEELDIRECTION_FORWARD',
68 // 2: 'RRWHEELDIRECTION_BACKWARD', 3: 'RRWHEELDIRECTION_STOP'},
69 // 'precision': 1.0, 'len': 2, 'name': 'RRWheelDirection',
70 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]'
71 // 'bit': 25, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
72 Fbs2_240::RrwheeldirectionType rrwheeldirection(const std::uint8_t* bytes,
73 const int32_t length) const;
74
75 // config detail: {'description': 'Rear right wheel speed', 'offset': 0.0,
76 // 'precision': 0.05625, 'len': 13, 'name': 'RRWheelSpd',
77 // 'is_signed_var': False, 'physical_range': '[0|299.98125]', 'bit': 39,
78 // 'type': 'double', 'order': 'motorola', 'physical_unit': 'Km/h'}
79 double rrwheelspd(const std::uint8_t* bytes, const int32_t length) const;
80
81 // config detail: {'description': 'Current Vehicle speed information',
82 // 'offset': 0.0, 'precision': 0.05625, 'len': 13, 'name': 'VehicleSpd',
83 // 'is_signed_var': False, 'physical_range': '[0|299.98125]', 'bit': 55,
84 // 'type': 'double', 'order': 'motorola', 'physical_unit': 'Km/h'}
85 double vehiclespd(const std::uint8_t* bytes, const int32_t length) const;
86};
87
88} // namespace wey
89} // namespace canbus
90} // namespace apollo
static const int32_t ID
Definition fbs2_240.h:29
void Parse(const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
Definition fbs2_240.cc:33
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData