Apollo 10.0
自动驾驶开放平台
vehicle_mode_command_116.cc
浏览该文件的文档.
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
18
20
21namespace apollo {
22namespace canbus {
23namespace ch {
24
25using ::apollo::drivers::canbus::Byte;
26
27const int32_t Vehiclemodecommand116::ID = 0x116;
28
29// public
31
33 // TODO(All) : modify every protocol's period manually
34 static const uint32_t PERIOD = 500 * 1000;
35 return PERIOD;
36}
37
39 set_p_vin_req_cmd(data, vin_req_cmd_);
40}
41
43 // TODO(All) : you should check this manually
45}
46
49 vin_req_cmd_ = vin_req_cmd;
50 return this;
51}
52
53// config detail: {'bit': 0, 'description': 'Request VIN(Command)', 'enum': {0:
54// 'VIN_REQ_CMD_VIN_REQ_DISABLE', 1: 'VIN_REQ_CMD_VIN_REQ_ENABLE'},
55// 'is_signed_var': False, 'len': 1, 'name': 'VIN_REQ_CMD', 'offset': 0.0,
56// 'order': 'intel', 'physical_range': '[0|1]', 'physical_unit': '',
57// 'precision': 1.0, 'type': 'enum'}
58void Vehiclemodecommand116::set_p_vin_req_cmd(
59 uint8_t* data, Vehicle_mode_command_116::Vin_req_cmdType vin_req_cmd) {
60 int x = vin_req_cmd;
61
62 Byte to_set(data + 0);
63 to_set.set_value(static_cast<uint8_t>(x), 0, 1);
64}
65
66} // namespace ch
67} // namespace canbus
68} // namespace apollo
Defines the Byte class.
Vehiclemodecommand116 * set_vin_req_cmd(Vehicle_mode_command_116::Vin_req_cmdType vin_req_cmd)
class register implement
Definition arena_queue.h:37