Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / peripheralservice / communication / server / include / threads / CAN_Thread.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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 #ifndef COMMUNICATION_SERVER_INCLUDE_THREADS_CAN_THREAD_H_
18 #define COMMUNICATION_SERVER_INCLUDE_THREADS_CAN_THREAD_H_
19 #include <peripheral_service/Canif_API.h>
20 #include <stdlib.h>
21
22 #include "com_error_type.h"
23 #include "communication_communicationlog.h"
24
25 #if 0
26 #define CAN_TX_COMMAND_SIZE (CAN_TRX_HEADER_SIZE + CAN_TX_OPERAND_SIZE)
27
28 #define CAN_RX_CANDATA_SIZE CAN_DATA_SIZE /* Receive CANData(DATA#1 ~ #x)size */
29 /* Reserve the structure if it is not a multiple of 4. */
30 #define CAN_TX_CANDATA_SIZE CAN_DATA_SIZE /* Send CANData(DATA#1 ~ #x)size */
31 /* Reserve the structure if it is not a multiple of 4. */
32 #define CAN_RX_OPERAND_SIZE (CAN_TRX_CANID_SIZE + CAN_TRX_DLC_SIZE + CAN_RX_CANDATA_SIZE)
33 #define CAN_TX_OPERAND_SIZE (CAN_TRX_CANID_SIZE + CAN_TRX_DLC_SIZE + CAN_TX_CANDATA_SIZE)  // NOLINT(whitespace/line_length)
34 /* Send operand size */
35
36 #endif
37
38 #define CAN_CMDSND_DATA_SIZE 0 /* Command transmission data section size (CAN command control) */
39
40 #define CAN_TX_CMD_DELIVERY_SIZE 4     /* Transmitting CAN Command Delivery Data Size Common Block */
41 #define CAN_TX_CMD_FUELCALC_RST_SIZE 0 /* Transmit CAN Command Delivery Data Size CAN Section Burn Cost Reset Request Receive Data */
42 #define CAN_TX_CMD_STARTUP_FIN_SIZE 3  /* Transmit CAN Command Delivery Data Size CAN Startup Completion Notification Data */
43 #define CAN_TX_CMD_MRST_INFO_SIZE 33   /* Transmit CAN Command Delivery Data Size CAN Master Reset Information Notification Receive Data */
44 #define CAN_TX_CMD_VERSION_SIZE 4      /* Transmit CAN Command Delivery Data Size CAN Version Response Receive Data */
45
46 #define CAN_TRX_HEADER_SIZE 7     /* Size of send/receive header section (data length excluding operands) */
47 #define CAN_TRX_CANID_SIZE 4                                                     /* Transmit/Receive CAN ID Size */
48 #define CAN_TRX_DLC_SIZE 1                                                       /* Transmit/Receive DLC Data Size */
49 typedef CANIF_RET_API RET_CAN;
50 EFrameworkunifiedStatus CANCallbackForTimeOut(HANDLE);
51 #endif  // COMMUNICATION_SERVER_INCLUDE_THREADS_CAN_THREAD_H_