2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 /******************************************************************************
18 * File name : CanInput_API.h
19 * System name : PastModel002
20 * Sub System name : CanInput_API library
21 ******************************************************************************/
22 #ifndef POSITIONING_CLIENT_INCLUDE_CANINPUT_API_H_
23 #define POSITIONING_CLIENT_INCLUDE_CANINPUT_API_H_
25 /************************************************************************
27 ***********************************************************************/
28 #include <vehicle_service/positioning_base_library.h> /* for type definitions */
30 /************************************************************************
32 ************************************************************************/
33 /*----------------------------------------------------------------------*
34 * CAN_INPUT_RET_API Definition *
35 *----------------------------------------------------------------------*/
37 #define CAN_INPUT_RET_NORMAL 0 /* Successful completion */
40 #define CAN_INPUT_RET_ERROR (-1) /* An error has occurred */
41 #define CAN_INPUT_RET_ERROR_PARAM (-2) /* Parameter error */
43 /*----------------------------------------------------------------------*
44 * Message Definition *
45 *----------------------------------------------------------------------*/
47 #define CANINPUT_CID_LOCALTIME_NOTIFICATION 0x0220
49 /*----------------------------------------------------------------------*
50 * Localtime status Definition *
51 *----------------------------------------------------------------------*/
52 #define CANINPUT_LOCALTIME_STATUS_INVALID 0U
53 #define CANINPUT_LOCALTIME_STATUS_INIT 1U
54 #define CANINPUT_LOCALTIME_STATUS_PLAUSIBLE 2U
55 #define CANINPUT_LOCALTIME_STATUS_NEW 3U
56 #define CANINPUT_LOCALTIME_STATUS_DIAG 4U
57 #define CANINPUT_LOCALTIME_STATUS_INCOMPLETE 5U
59 /************************************************************************
61 ************************************************************************/
62 typedef RET_API CAN_INPUT_RET_API; /* API return value */
64 /************************************************************************
66 ************************************************************************/
67 /************************************************************************
68 * TAG : CANINPUT_MSG_LOCALTIMEINFO_DAT
69 * ABSTRACT : Localtime data structure
71 ************************************************************************/
73 u_int8 status; /* status : Refer to Localtime status Definition */
74 u_int8 year; /* year : 0..99 (FFh:invalid) */
75 u_int8 month; /* month : 1..12 (FFh:invalid) */
76 u_int8 date; /* date : 1..31 (FFh:invalid) */
77 u_int8 hour; /* hour : 0..23 (FFh:invalid) */
78 u_int8 minute; /* minute : 0..59 (FFh:invalid) */
79 u_int8 second; /* second : 0..59 (FFh:invalid) */
80 u_int8 reserve; /* reserve */
81 } CANINPUT_MSG_LOCALTIMEINFO_DAT;
83 /************************************************************************
84 * Function prototypes *
85 ************************************************************************/
90 /*[CanInput_API Public API]*/
91 CAN_INPUT_RET_API CanInputInitialize(void);
92 CAN_INPUT_RET_API CanInputSndMsg(PNO pno, CID cid, u_int16 msg_len, const void *msg_data);
98 #endif // POSITIONING_CLIENT_INCLUDE_CANINPUT_API_H_