Apollo 10.0
自动驾驶开放平台
bcan_defs.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
17#pragma once
18
19#ifndef __KERNEL__
20#include <sys/time.h>
21#else
22#include <linux/time.h>
23#endif
24
25/*
26 * Baidu CAN message definition
27 */
28typedef struct bcan_msg {
29 unsigned int bcan_msg_id; /* source CAN node id */
30 unsigned char bcan_msg_datalen; /* message data len */
31 unsigned char bcan_msg_rsv[3];
32 unsigned char bcan_msg_data[8]; /* message data */
33 struct timeval bcan_msg_timestamp;
35
36/*
37 * CAN error code
38 */
struct bcan_msg bcan_msg_t
bcan_err_code
Definition bcan_defs.h:39
@ BCAN_HDL_INVALID
Definition bcan_defs.h:41
@ BCAN_NOT_SUPPORTED
Definition bcan_defs.h:47
@ BCAN_PARAM_INVALID
Definition bcan_defs.h:40
@ BCAN_NO_BUFFERS
Definition bcan_defs.h:50
@ BCAN_DEV_ERR
Definition bcan_defs.h:43
@ BCAN_DEV_INVALID
Definition bcan_defs.h:42
@ BCAN_INVALID
Definition bcan_defs.h:49
@ BCAN_PARTIAL_OK
Definition bcan_defs.h:53
@ BCAN_OK
Definition bcan_defs.h:52
@ BCAN_TIMEOUT
Definition bcan_defs.h:45
@ BCAN_FAIL
Definition bcan_defs.h:46
@ BCAN_DEV_BUSY
Definition bcan_defs.h:44
@ BCAN_ERR
Definition bcan_defs.h:51
@ BCAN_NOT_IMPLEMENTED
Definition bcan_defs.h:48
unsigned char bcan_msg_rsv[3]
Definition bcan_defs.h:31
unsigned int bcan_msg_id
Definition bcan_defs.h:29
struct timeval bcan_msg_timestamp
Definition bcan_defs.h:33
unsigned char bcan_msg_data[8]
Definition bcan_defs.h:32
unsigned char bcan_msg_datalen
Definition bcan_defs.h:30