Apollo  6.0
Open source self driving car software
bcan_defs.h
Go to the documentation of this file.
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  */
28 typedef 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;
34 } bcan_msg_t;
35 
36 /*
37  * CAN error code
38  */
52  BCAN_OK, /* 0 */
54 };
unsigned char bcan_msg_rsv[3]
Definition: bcan_defs.h:31
Definition: bcan_defs.h:48
Definition: bcan_defs.h:43
Definition: bcan_defs.h:40
struct bcan_msg bcan_msg_t
unsigned char bcan_msg_datalen
Definition: bcan_defs.h:30
Definition: bcan_defs.h:53
unsigned int bcan_msg_id
Definition: bcan_defs.h:29
Definition: bcan_defs.h:50
Definition: bcan_defs.h:49
Definition: bcan_defs.h:42
Definition: bcan_defs.h:51
struct timeval bcan_msg_timestamp
Definition: bcan_defs.h:33
Definition: bcan_defs.h:41
bcan_err_code
Definition: bcan_defs.h:39
Definition: bcan_defs.h:46
Definition: bcan_defs.h:28
Definition: bcan_defs.h:44
Definition: bcan_defs.h:47
Definition: bcan_defs.h:52
Definition: bcan_defs.h:45
unsigned char bcan_msg_data[8]
Definition: bcan_defs.h:32