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 : TimerDrv_If.h
19 * System name : Integrated PF
20 * Process name : Timer registry driversI/F
21 * Overview : Timer registry drivers I/F Header file
22 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
23 #ifndef POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TIMERENTRYDRV_IF_H_
24 #define POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TIMERENTRYDRV_IF_H_
26 #include <vehicle_service/positioning_base_library.h>
27 #include "DEV_TimerEntryDrv_if.h"
31 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
33 #define TED_DRV_NAME "TED" /* Channel names of drivers registered in the Timer */
34 /* The channel name cannot be a leading slash. Location is under /dev/name/local */
36 /*-----------------------------------------------------------------------------
37 * CTRL CODE definitions
38 *----------------------------------------------------------------------------*/
39 /* IOCTRL internal-processing sort codes */
40 #define TED_IOCTRL_TIMREQ __DIOTF(_DCMD_MISC, 1, stTedApidt) /* Timer start */
41 #define TED_IOCTRL_STPREQ __DIOT(_DCMD_MISC, 2, stTedApidt) /* Timer stop */
43 #define TED_IF_SETTIME_MIN (int32)1 /* Minimum count time(1ms) */
45 #define TED_IF_SETPNO_NG (PNO)0 /* PNO invalid value for _CWORD64_ messages */
46 #define TED_IF_MMEVENT_INVALID_ID 0 /* Invalid _CWORD64_ EventID */
48 #define TED_IF_RET__CWORD64_MSG (u_int16)1 /* How Users Are Notified on Timeouts: _CWORD64_ Messages */
49 #define TED_IF_RET_WINEVT (u_int16)2 /* How Users Are Notified on Timeouts: Windows Events */
52 #define TED_IF_TIMERTYPE_CYCLE 1 /* Fixed period Timer Specified in [10ms] */
53 #define TED_IF_TIMERTYPE_SINGLE 2 /* Single occurrence Timer Specified in [10ms] */
55 /* API type(Distinguishing between API Functions Used at Timer Startup) */
56 #define TED_IF_APITYPE_SYS 1 /* Timer start by _pb_ReqTimerStart() */
57 #define TED_IF_APITYPE_DEV 2 /* Timer start by DEV_SetTimer_XXX() */
61 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
62 /* Timer registration data by user(Timer register driver IF -> timer register driver) */
64 int32 time_rem; /* User's remaining timer count time(count value in 10 [msec] units) */
65 u_int32 timer_id; /* User's timer ID */
66 u_int32 ret_data; /* User's extended information */
67 PNO ret_pno; /* User's _CWORD64_ message-destination process number */
68 u_int16 fin_mode; /* User Timeout Notification Method */
69 char wev_ob_name[DEV_TED_EVTNAME_MAX]; /* Event name(32 characters) */
70 u_int32 timer_seq; /* Timer Sequence Number */
71 u_int8 time_type; /* Timer type(Fixed period/single occurrence) */
72 u_int8 api_type; /* API type(_pb_ReqTimerStart/DEV_SetTimer) */
75 typedef stTedApidt *PTED_IFDT;
77 /* Timer Start/Stop Messages Structures, */
79 int32 time_rem; /* User's remaining timer count time(count value in 10 [msec] units) */
80 u_int32 timer_id; /* User's timer ID */
81 u_int32 ret_data; /* User's extended information */
82 PNO ret_pno; /* User's _CWORD64_ message-destination process number */
83 u_int16 fin_mode; /* User Timeout Notification Method */
84 char wev_ob_name[DEV_TED_EVTNAME_MAX]; /* Event name(32 characters) */
85 u_int32 timer_seq; /* Timer Sequence Number */
86 u_int8 time_type; /* Timer type(Fixed period/single occurrence) */
87 u_int8 api_type; /* API type(_pb_ReqTimerStart/DEV_SetTimer) */
91 /* Structures for sending _CWORD64_ message timer START */
93 T_APIMSG_MSGBUF_HEADER header; /* _CWORD64_ Message header */
94 /* Extended Info for _CWORD64_ Messages */
95 TIMERUSERDATA st_us_data;
96 } stTimerStart_CWORD64_msg;
98 /* Structures for sending _CWORD64_ message timer STOP */
100 T_APIMSG_MSGBUF_HEADER header; /* _CWORD64_ Message header */
101 /* Extended Info for _CWORD64_ Messages */
102 TIMERUSERDATA st_us_data;
103 } stTimerStop_CWORD64_msg;
105 #endif // POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TIMERENTRYDRV_IF_H_
107 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
108 End of File : TimerEntryDrv_If.h
109 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *