Init basesystem source codes.
[staging/basesystem.git] / stub / clock / client_display_time / include / stub / DTime_Api.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  * @file DTime_Api.h
18  * @brief display time middle API header file.
19  */
20 #ifndef CLOCK_CLIENT_DISPLAY_TIME_INCLUDE_VEHICLE_SERVICE_DTIME_API_H_
21 #define CLOCK_CLIENT_DISPLAY_TIME_INCLUDE_VEHICLE_SERVICE_DTIME_API_H_
22
23 /****************************************************************************
24  * File name       : DTime_Api.h
25  * System name     : 
26  * Sub system name : Display time middle API header
27  * Title           : Data Header Files Required for Using Display Time Middle
28  ****************************************************************************/
29 #include <native_service/frameworkunified_types.h>
30 #include <stub/clock_notifications.h>
31
32 /** @addtogroup BaseSystem
33  *  @{
34  */
35 /** @addtogroup vehicle_service
36  *  @ingroup BaseSystem
37  *  @{
38  */
39 /** @addtogroup clock
40  *  @ingroup vehicle_service
41  *  @{
42  */
43
44 /**
45  * \~english commod ID (from display time middle)
46  */
47 typedef enum _ClockServiceProtocol {
48     CID_DTIME_NOTIFY    = 0x00000712,   //!< \~english Display time notice
49 } ClockServiceProtocol;
50
51 /******************************************************************************
52 * Structure : T_TimeData
53 * Function  : Time structure
54 * Note      : Stores the system/user time obtained from the Clock
55  *******************************************************************************/
56 /**
57  * \~english Time structure T_TimeData, store system time/user time acquired from clock.
58  */
59 typedef struct _tag_T_TimeData {
60     uint16_t       Year;        //!< \~english Year
61     uint8_t        Month;       //!< \~english Month
62     uint8_t        Day;         //!< \~english Day
63     uint8_t        Hour;        //!< \~english Hour
64     uint8_t        Minute;      //!< \~english Minute
65     uint8_t        Second;      //!< \~english Second
66     uint8_t        rsv;         //!< \~english Reserve
67 } T_TimeData;
68
69 /**
70  * \~english +(plus)
71  */
72 #define DTIME_TIMEDIFF_SIGN_PLUSE        FALSE
73 /**
74  * \~english -(minus)
75  */
76 #define DTIME_TIMEDIFF_SIGN_MINUS        TRUE
77
78 /**
79  * \~english Time zone structure.
80  */
81 typedef struct _tag_T_TimeDiff {
82     BOOL       Sign;             //!< \~english Sign
83     uint8_t    Hour_Diff;        //!< \~english Time difference (hour)
84     uint8_t    Minute_Diff;      //!< \~english Time difference (minutes)
85     uint8_t    rsv[2];           //!< \~english Reserve
86 } T_TimeDiff;
87
88 /**
89  * \~english Time offset setting structure.
90  */
91 typedef struct _tag_T_TimeOffset {
92     int8_t    Hour_Offset;    //!< \~english Time difference (hour)
93     int8_t    Minute_Offset;  //!< \~english Time difference (minutes)
94     int8_t    rsv[2];         //!< \~english Reserve
95 } T_TimeOffset;
96
97 /**
98  * \~english GPS automatic adjustment OFF (use system time).
99  */
100 #define DTIME_SETTING_GPS_MANUAL        FALSE
101
102 /**
103  * \~english GPS automatic adjustment Auto (use display time when GPS correction OFF).
104  */
105 #define DTIME_SETTING_GPS_AUTO            TRUE
106
107 /**
108  * \~english Notation in 12H.
109  */
110 #define DTIME_SETTING_FORMAT_12H        FALSE
111
112 /**
113  * \~english Notation in 24H.
114  */
115 #define DTIME_SETTING_FORMAT_24H        TRUE
116
117 /**
118  * \~english DST manual setting.
119  */
120 #define DTIME_SETTING_DST_MANUAL        FALSE
121
122 /**
123  * \~english DST automatic setting.
124  */
125 #define DTIME_SETTING_DST_AUTO            TRUE
126
127 /**
128  * \~english DST OFF
129  */
130 #define DTIME_SETTING_DST_OFF            FALSE
131
132 /**
133  * \~english DST ON
134  */
135 #define DTIME_SETTING_DST_ON            TRUE
136
137 /**
138  * \~english Time zone manual setting.
139  */
140 #define DTIME_SETTING_TIMEZONE_MANUAL    FALSE
141
142 /**
143  * \~english Time zone automatic setting.
144  */
145 #define DTIME_SETTING_TIMEZONE_AUTO        TRUE
146
147 /**
148  * \~english Display setting structure.
149  */
150 typedef struct _tag_T_DisplaySetting {
151     BOOL            GPS_Auto;          //!< \~english GPS automatic setting
152     BOOL            Format;            //!< \~english  12H/24H display setting
153     BOOL            DST_Auto;          //!< \~english DST automatic settting
154     BOOL            DST_Setting;       //!< \~english DST_ON/OFF setting
155     BOOL            TimeZone_Auto;     //!< \~english Time zone automatic setting
156     T_TimeDiff      TimeZone_Setting;  //!< \~english Time zone time difference setting
157     T_TimeOffset    TimeOffset;        //!< \~english Time offset
158 } T_DisplaySetting;
159
160 /**
161  * \~english Display time invalid.
162  */
163 #define DTIME_DISP_TIME_INVALID            FALSE
164
165 /**
166  * \~english Display time valid.
167  */
168 #define DTIME_DISP_TIME_VALID            TRUE
169
170 /**
171  * \~english Invalid AM/PM.
172  */
173 #define DTIME_DISP_MERIDIEM_INVALID        0
174
175 /**
176  * \~english AM
177  */
178 #define DTIME_DISP_MERIDIEM_AM            1
179
180 /**
181  * \~english PM
182  */
183 #define DTIME_DISP_MERIDIEM_PM            2
184
185 /**
186  * \~english AM/PM unidentified in 12H display.
187  */
188 #define DTIME_DISP_MERIDIEM_12H_INVALID    3
189
190 /**
191  * \~english Display time structure.
192  */
193 typedef struct _tag_T_DTimeData {
194     BOOL    TimeValidity;    //!< \~english Validity of time display
195     uint8_t    Meridiem;     //!< \~english AM/PM
196     uint16_t   DYear;        //!< \~english Display date(year)
197     uint8_t    DMonth;       //!< \~english Display date(month)
198     uint8_t    DDay;         //!< \~english Display date(day)
199     uint8_t    DHour;        //!< \~english Display time(hour)
200     uint8_t    DMinute;      //!< \~english Display time(minute)
201     uint8_t    rsv;          //!< \~english Reserve
202 } T_DTimeData;
203
204 /******************************************************************************
205 * Structure : T_DTIME_MSG_NOTIFY_DTIME
206 * Function  : Display time notification transmission data structure
207 * Note      :
208  ******************************************************************************/
209 /**
210  * \~english Display time notification transmission data structure T_DTIME_MSG_NOTIFY_DTIME.
211  */
212 typedef struct _tag_T_DTIME_MSG_NOTIFY_DTIME {
213     T_DTimeData            disp_time;        //!< \~english Display time
214     T_DisplaySetting       disp_setting;     //!< \~english Display setting
215     T_TimeData             org_time;         //!< \~english Time(origin data)
216 } T_DTIME_MSG_NOTIFY_DTIME;
217
218 /******************************************************************************
219 * Structure : T_DTIME_MSG_GPSTIME
220 * Function  : GPS time setting data structure
221 * Note      :
222  ******************************************************************************/
223 /**
224  * \~english GPS UTC time setting structure.
225  */
226 typedef struct _tag_T_DTIME_GPSTIME {
227     uint16_t           year;            //!< \~english Year
228     uint8_t            month;           //!< \~english Month
229     uint8_t            date;            //!< \~english Day
230     uint8_t            hour;            //!< \~english Hour
231     uint8_t            minute;          //!< \~english Minute
232     uint8_t            second;          //!< \~english Second
233     uint8_t            reserved;        //!< \~english Reserve
234 } T_DTIME_GPSTIME;
235
236 /**
237  * \~english Time uncalibrated after receiver reset.
238  */
239 #define DTIME_GPS_STATUS_INVALID    0x00
240
241 /**
242  * \~english Time output by RTC backup (with time calibration results).
243  */
244 #define DTIME_GPS_STATUS_RTC        0x01
245
246 /**
247  * \~english Time calibration completed.
248  */
249 #define DTIME_GPS_STATUS_CORRECT    0x02
250
251 /**
252  * \~english GPS time setting data structure.
253  */
254 typedef struct _tag_T_DTIME_MSG_GPSTIME {
255     T_DTIME_GPSTIME      utc;          //!< \~english GPS UTC time
256     uint8_t              tdsts;        //!< \~english Date and time status
257     uint8_t              reserve[3];   //!< \~english Reserve
258 } T_DTIME_MSG_GPSTIME;
259
260 /** Other definitions *********************************/
261 /**
262  * \~english AM
263  */
264 #define DTIME_SET_MERIDIEM_AM        TRUE
265
266 /**
267  * \~english PM
268  */
269 #define DTIME_SET_MERIDIEM_PM        FALSE
270
271 /* Displayed Time Middle API Prototypes *************/
272 /**
273  * \ingroup DTime_loadDisplaySetting
274  * \~english @par Brief
275  *      - Load display settings.
276  * \~english @param [in]  hApp        Application handle
277  * \~english @param [in]  Setting     Display setting
278  * \~english @retval  eFrameworkunifiedStatusOK    success
279  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
280  * \~english @par Prerequisite
281  *      - The availability of Clock service is TRUE.
282  *      - Display time is available after this API is called by SettingService.\n
283  *        (It is assumed to call it only once at startup)
284  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
285  * \~english @par Change of internal state
286  *      - Change of internal state according to the API does not occur.
287  * \~english @par Conditions of processing failure
288  *      - When storage area of the display setting is NULL [eFrameworkunifiedStatusFail]
289  *      - When the time difference(hour)specified by the argument Setting->TimeZone_Setting.Hour_Diff\n
290  *        is greater than the time difference(hour)upper limit(13)[eFrameworkunifiedStatusFail]
291  *      - Incorrect time difference(minutes)specified by argument Setting->TimeZone_Setting.Minute_Diff\n
292  *        (when the value is not 0, 15, 30, 45). [eFrameworkunifiedStatusFail]
293  *      - When the generation of the message queue handle for transmission with\n
294  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
295  *      - When messsage synchronization communication fails. [eFrameworkunifiedStatusFail]
296  *      - When processing of loading display setting fails in clock service. [eFrameworkunifiedStatusFail]
297  * \~english @par Classification
298  *      - Public
299  * \~english @par Type
300  *      - Sync
301  * \~english @par Detail
302  *      - Since this API is synchronous processing(completion recovery),\n
303  *        it should be used in consideration of this.
304  *      - When display time is used before this API is called by SettingService,\n
305  *        even if DTime_registListener_DisplayTime() is used, display time notification can not be received.
306  *      - (Since clock service does not publish display time notification.)
307  *      - With this API, the following is information necessary for calculation of\n
308  *        display time can be collectively set to Clock service.
309  *      - GPS automatic setting, 12H/24H display setting, DST setting, time zone setting, time offset.
310  *      - Set the time offset to 0 when GPS correction is OFF.
311  *      - If the display time distribution has already been regitered,\n
312  *        the Clock service will publish the display time notification immediately when this API is called.
313  * \~english @see DTime_getDisplaySetting, DTime_regist_Listener_DisplayTime, FrameworkunifiedMcOpenSender, FrameworkunifiedInvokeSync
314  */
315 EFrameworkunifiedStatus DTime_loadDisplaySetting(HANDLE h_app, T_DisplaySetting *setting);  /* Load display setting */
316
317 /**
318  * \ingroup DTime_getDisplaySetting
319  * \~english @par Brief
320  *      - Load display settings.
321  * \~english @param [in]  hApp        Application handle
322  * \~english @param [in]  Setting     Display setting
323  * \~english @retval  eFrameworkunifiedStatusOK    success
324  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
325  * \~english @par Prerequisite
326  *      - The availability of Clock service is TRUE.
327  *      - This API should be called after DTime_loadDisplaySetting() is called.
328  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
329  * \~english @par Change of internal state
330  *      - Change of internal state according to the API does not occur.
331  * \~english @par Conditions of processing failure
332  *      - When storage area of the display setting is NULL [eFrameworkunifiedStatusFail]
333  *      - When the generation of the message queue handle for transmission with\n
334  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
335  *      - When messsage synchronization communication fails. [eFrameworkunifiedStatusFail]
336  *      - When message length received by synchronous communication\n
337  *        and length of storage buffer are different. [eFrameworkunifiedStatusFail]
338  *      - When display setting on Clock service side is not loaded. [eFrameworkunifiedStatusFail]
339  * \~english @par Classification
340  *      - Public
341  * \~english @par Type
342  *      - Sync
343  * \~english @par Detail
344  *      - Since this API is synchronous processing(completion recovery),\n
345  *        it should be used in consideration of this.
346  *      - This API assumes that the Diag service will use it to acquire time difference information etc.
347  *      - With this API, you can acquire the information on the right set at display time.\n
348  *        GPS automatic setiting, 12H/24H display setting, DST setting, time zone setting, time offse.
349  * \~english @see DTime_loadDisplaySetting, FrameworkunifiedMcOpenSender, FrameworkunifiedInvokeSync
350  */
351 EFrameworkunifiedStatus DTime_getDisplaySetting(HANDLE h_app, T_DisplaySetting *setting);  /* Get display setting */
352
353 /**
354  * \ingroup DTime_setGpsTime
355  * \~english @par Brief
356  *      - Set the GPS time on the clock.
357  * \~english @param [in]  hApp        Application handle
358  * \~english @param [in]  gps_time     GPS data setting
359  * \~english @retval  eFrameworkunifiedStatusOK    success
360  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
361  * \~english @par Prerequisite
362  *      - The availability of Clock service is TRUE.
363  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
364  * \~english @par Change of internal state
365  *      - Change of internal state according to the API does not occur.
366  * \~english @par Conditions of processing failure
367  *      - When the setting of storage area set by the GPS data/time setting is NULL. [eFrameworkunifiedStatusFail]
368  *      - When the generation of the message queue handle for transmission with\n
369  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
370  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
371  * \~english @par Classification
372  *      - Public
373  * \~english @par Type
374  *      - Fire and Forget
375  * \~english @par Detail
376  *      - This API is assumed to be called when the positioning service acquires/updates the GPS time.
377  *      - Note : Do not use POS_RegisterListenerGPStime() from Clock service.
378  *      - The GPS time notification command to the external clock is transmitted\n
379  *        when this API is called.
380  *      - With this API, GPS time can be set to clock function.
381  *        GPS date and time (year, month, day, hour, minute, second)\n
382  *        GPS date and time status\n
383  *        0 = Time not correct after receiver reset(time input or manager reset or CSF startup),\n
384  *        1 = RTC backup according to time output(actual result of time correction),\n
385  *        2 = Time correct done.
386  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
387  */
388 EFrameworkunifiedStatus DTime_setGpsTime(HANDLE h_app, T_DTIME_MSG_GPSTIME *gps_time);  /* GPS time setting */
389
390 /**
391  * \ingroup DTime_registerListener_DTime
392  * \~english @par Brief
393  *      - Register delivery of display time notification.
394  * \~english @param [in]  hApp        Application handle
395  * \~english @param [in]  notifyName     Delivery destination thread name. Note : Set it to 15 characters or less.
396  * \~english @retval  eFrameworkunifiedStatusOK    success
397  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
398  * \~english @par Prerequisite
399  *      - The availability of Clock service is TRUE.
400  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
401  * \~english @par Change of internal state
402  *      - Change of internal state according to the API does not occur.
403  * \~english @par Conditions of processing failure
404  *      - When the storage area specified by the destination thread name is NULL. [eFrameworkunifiedStatusFail]
405  *      - When the generation of the message queue handle for transmission with\n
406  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
407  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
408  * \~english @par Classification
409  *      - Public
410  * \~english @par Type
411  *      - Fire and Forget
412  * \~english @par Detail
413  *      - The maximum number of registered listeners is 20.
414  *      - If listeners are registered more than once from the same thread, count as one listener.\n
415  *        however, in this case, the display time notification is immediately issued.
416  *      - With this API, delivery of this display time notification to the thread\n
417  *        designated as the argument is started.
418  *      - When this API call is called, if the display setting is not loaded,\n
419  *        you can not calculate the display time, so do not deliver the display time notification.
420  *      - When this API is called, if the display setting has already been loaded,\n
421  *        the Clock service immediately issues a display time notification.
422  *      - A message is notified with a command "CID_DTIME_NOTIFY" when display time is deliveried.
423  *      - The client receives the data of the T_DTIME_MSG_NOTIFY_DTIME structure in the above delivery message.
424  *      - Message communication uses interprocess communication by NSFW.
425  *      - Specify ClockMng thread (TN_CLOCK_MNG) as the sender when registering callback for receiving display time.
426  *      - Display time is not delivered until SettingService calls DTime_loadDisplaySetting.
427  * \~english @see DTime_UnregisterListener_DTime, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
428  */
429 EFrameworkunifiedStatus DTime_registerListener_DTime(HANDLE h_app, PCSTR notify_name);  /* Display time delivery registration */
430
431 /**
432  * \ingroup DTime_UnregisterListener_DTime
433  * \~english @par Brief
434  *      - Release delivery of display time notification.
435  * \~english @param [in]  hApp        Application handle
436  * \~english @param [in]  notifyName     Delivery destination thread name. Note : Set it to 15 characters or less.
437  * \~english @retval  eFrameworkunifiedStatusOK    success
438  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
439  * \~english @par Prerequisite
440  *      - The availability of Clock service is TRUE.
441  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
442  * \~english @par Change of internal state
443  *      - Change of internal state according to the API does not occur.
444  * \~english @par Conditions of processing failure
445  *      - When the storage area specified by the destination thread name is NULL. [eFrameworkunifiedStatusFail]
446  *      - When the generation of the message queue handle for transmission with\n
447  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
448  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
449  * \~english @par Classification
450  *      - Public
451  * \~english @par Type
452  *      - Fire and Forget
453  * \~english @par Detail
454  *      - With this API, releasing delivery registration of display time notification\n
455  *        to the thread specified as argument is canceled.
456  *      - Especially when the nonresident service is registering for delivery,\n
457  *        be sure to cancel registration with this API in termination processing.
458  * \~english @see DTime_registerListener_DTime, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
459  */
460 EFrameworkunifiedStatus DTime_UnregisterListener_DTime(HANDLE h_app, PCSTR notify_name);  /* Release display time delivery registration */
461
462 /**
463  * \ingroup DTime_setAutoAdjust
464  * \~english @par Brief
465  *      - Set GPS automatic adjustment.
466  * \~english @param [in]  hApp        Application handle
467  * \~english @param [in]  Setting     Display setting.\n
468  *                       DTIME_SETTING_GPS_AUTO: GPS automatic adjust AUTO(use display time when GPS correction OFF)\n
469  *                       DTIME_SETTING_GPS_MANUAL: GPS automatic adjust OFF(use of system time)
470  * \~english @param [in]  Offset      Time offset.\n
471  *                                    GPS correction is ON: User set hour offset, minute offset.\n
472  *                                    GPS correction is OFF: set zero
473  * \~english @retval  eFrameworkunifiedStatusOK    success
474  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
475  * \~english @par Prerequisite
476  *      - The availability of Clock service is TRUE.
477  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
478  * \~english @par Change of internal state
479  *      - Change of internal state according to the API does not occur.
480  * \~english @par Conditions of processing failure
481  *      - When the storage area of the time offset is NULL. [eFrameworkunifiedStatusFail]
482  *      - When the generation of the message queue handle for transmission with\n
483  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
484  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
485  * \~english @par Classification
486  *      - Public
487  * \~english @par Type
488  *      - Fire and Forget
489  * \~english @par Detail
490  *      - This API is assumed to be called by SettingService.
491  *      - With this API, it is possible to switch the absolute time\n
492  *        (GPS time or display time in the case of GPS correction off) which is the source of display time.
493  *      - When GPS correction is OFF, count from the default time (2017/1/1 1:00).
494  *      - When GPS correction OFF, set the time offset to zero and set the time\n
495  *        offset with this API when GPS correction is ON.
496  *      - When this API is called, if the display time distribution has already been refistered,\n
497  *        the Clock service immediately issues a display time notification.
498  *      - However, when an external clock is connected, the display time is not issued immediately\n
499  *        and the display time is delivered at the timing of receiving the "Time notification".
500  *      - When an external clock is connected, since the data master at the offset time\n
501  *        becomes an external clock, the following processing is performed.
502  *      - If the received time offset is
503  *      - 1) When it is more than 1 hour ahead of the offset of the external clock \n
504  *        -> Set to add 1 hour offsets to external clock.
505  *      - 2) If it is less than 1 hour, 1 minute or more after the offset of the external clock \n
506  *        -> Set to add 1 minute offsets to external clock.
507  *      - 3) When it is more than -1 hour earlier of the offset of the external clock \n
508  *        -> Set the external clock to subtract 1 hour offsets.
509  *      - 4) When it is less than 1 hour or more than -1 minute from the offset of the external clock \n
510  *        -> Set the external clock to subtract 1 minute offsets.
511  *      - 5) When both hours and minutes are zero\n
512  *        -> Set the external clock to clear zero.
513  *      - Do not reflect changes in offset when GPS correction OFF<-->ON is switched.
514  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
515  */
516 EFrameworkunifiedStatus DTime_setAutoAdjust(HANDLE h_app, BOOL setting, T_TimeOffset *off_set);  /* GPS automatic adjustment */
517
518 /**
519  * \ingroup DTime_increaseHour
520  * \~english @par Brief
521  *      - Adjust the time.
522  * \~english @param [in]  hApp        Application handle
523  * \~english @retval  eFrameworkunifiedStatusOK    success
524  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
525  * \~english @par Prerequisite
526  *      - The availability of Clock service is TRUE.
527  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
528  * \~english @par Change of internal state
529  *      - Change of internal state according to the API does not occur.
530  * \~english @par Conditions of processing failure
531  *      - When the generation of the message queue handle for transmission with\n
532  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
533  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
534  * \~english @par Classification
535  *      - Public
536  * \~english @par Type
537  *      - Fire and Forget
538  * \~english @par Detail
539  *      - This API is assumed to be called by SettingService.
540  *      - With this API, display time can be increased by one hour. Set the display\n
541  *        time in the case of GPS correction off used when GPS correction OFF is set.
542  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
543  *      - When this API is called, if the display time distribution has already been registered,\n
544  *        the Clock service immediately issues a display time notification.
545  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
546  *        the display time notification is not issued immediately, and the display time is delivered at\n
547  *        the timing of receiving the "time notification".
548  *      - When an external clock is connected, set the absolute time hour (+) instruction to\n
549  *        the external clock with the "setting SW information notification" command.
550  * \~english @see DTime_decreaseHour, DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
551  */
552 EFrameworkunifiedStatus DTime_increaseHour(HANDLE h_app);  /* Adjust the time (hour increaase) */
553
554 /**
555  * \ingroup DTime_decreaseHour
556  * \~english @par Brief
557  *      - Adjust time (decrease hour by 1 hour).
558  * \~english @param [in]  hApp        Application handle
559  * \~english @retval  eFrameworkunifiedStatusOK    success
560  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
561  * \~english @par Prerequisite
562  *      - The availability of Clock service is TRUE.
563  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
564  * \~english @par Change of internal state
565  *      - Change of internal state according to the API does not occur.
566  * \~english @par Conditions of processing failure
567  *      - When the generation of the message queue handle for transmission with\n
568  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
569  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
570  * \~english @par Classification
571  *      - Public
572  * \~english @par Type
573  *      - Fire and Forget
574  * \~english @par Detail
575  *      - This API is assumed to be called by SettingService.
576  *      - With this API, display time can be reduced by 1 hour. Set the display time\n
577  *        in the case of GPS correction off used when GPS correction OFF is set.
578  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
579  *      - When this API is called, if the display time distribution has already been registered,\n
580  *        the Clock service immediately issues a display time notification.
581  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
582  *        the display time notification is not issued immediately, and the display time is delivered\n
583  *        at the timing of receiving the "time notification".
584  *      - When an external clock is connected, set the absolute time hour (-) instruction\n
585  *        with the "setting SW information notification" command to the external clock.
586  * \~english @see DTime_increaseHour, DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
587  */
588 EFrameworkunifiedStatus DTime_decreaseHour(HANDLE h_app);  /* Adjust the time (hour decrease) */
589
590 /**
591  * \ingroup DTime_increaseMinute
592  * \~english @par Brief
593  *      - Adjust the time (increase time by 1 minute).
594  * \~english @param [in]  hApp        Application handle
595  * \~english @retval  eFrameworkunifiedStatusOK    success
596  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
597  * \~english @par Prerequisite
598  *      - The availability of Clock service is TRUE.
599  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
600  * \~english @par Change of internal state
601  *      - Change of internal state according to the API does not occur.
602  * \~english @par Conditions of processing failure
603  *      - When the generation of the message queue handle for transmission with\n
604  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
605  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
606  * \~english @par Classification
607  *      - Public
608  * \~english @par Type
609  *      - Fire and Forget
610  * \~english @par Detail
611  *      - This API is assumed to be called by SettingService.
612  *      - With this API, display time can be increased by one minute. Set the display time\n
613  *        in the case of GPS correction off used when GPS correction OFF is set.
614  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
615  *      - When this API is called, if the display time distribution has already been registered,\n
616  *        the Clock service immediately issues a display time notification.
617  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
618  *        the display time notification is not issued immediately, and the display time is delivered\n
619  *        at the timing of receiving the "time notification".
620  *      - When an external clock is connected, set the absolute time minute (+) instruction\n
621  *        to the external clock with the "setting SW information notification" command.
622  * \~english @see DTime_decreaseMinute, DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
623  */
624 EFrameworkunifiedStatus DTime_increaseMinute(HANDLE h_app);  /* Adjust the time (minute increaase) */
625
626 /**
627  * \ingroup DTime_decreaseMinute
628  * \~english @par Brief
629  *      - Adjust the time (decrease time by 1 minute).
630  * \~english @param [in]  hApp        Application handle
631  * \~english @retval  eFrameworkunifiedStatusOK    success
632  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
633  * \~english @par Prerequisite
634  *      - The availability of Clock service is TRUE.
635  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
636  * \~english @par Change of internal state
637  *      - Change of internal state according to the API does not occur.
638  * \~english @par Conditions of processing failure
639  *      - When the generation of the message queue handle for transmission with\n
640  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
641  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
642  * \~english @par Classification
643  *      - Public
644  * \~english @par Type
645  *      - Fire and Forget
646  * \~english @par Detail
647  *      - This API is assumed to be called by SettingService.
648  *      - With this API, display time can be reduced by 1 minute. Set the display time\n
649  *        in the case of GPS correction off used when GPS correction OFF is set.
650  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
651  *      - When this API is called, if the display time distribution has already been registered,\n
652  *        the Clock service immediately issues a display time notification.
653  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
654  *        the display time notification is not issued immediately, and the display time is delivered\n
655  *        at the timing of receiving the "time notification".
656  *      - When an external clock is connected, set the absolute time minute (-) instruction\n
657  *        with the "setting SW information notification" command to the external clock.
658  * \~english @see DTime_increaseMinute, DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
659  */
660 EFrameworkunifiedStatus DTime_decreaseMinute(HANDLE h_app);  /* Adjust the time (minute decrease) */
661
662 /**
663  * \ingroup DTime_clearMinute
664  * \~english @par Brief
665  *      - Adjust the time (set the time to 0 minute).
666  * \~english @param [in]  hApp        Application handle
667  * \~english @retval  eFrameworkunifiedStatusOK    success
668  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
669  * \~english @par Prerequisite
670  *      - The availability of Clock service is TRUE.
671  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
672  * \~english @par Change of internal state
673  *      - Change of internal state according to the API does not occur.
674  * \~english @par Conditions of processing failure
675  *      - When the generation of the message queue handle for transmission with\n
676  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
677  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
678  * \~english @par Classification
679  *      - Public
680  * \~english @par Type
681  *      - Fire and Forget
682  * \~english @par Detail
683  *      - This API is assumed to be called by SettingService.
684  *      - With this API, the display time can be set to 0 minutes.
685  *      - When the display time is 30 to 59 minutes, increase the display time by one hour\n
686  *        and then set the display time to 0 minutes.
687  *      - If the display time is 0 to 29 minutes, set the dispaly time to 0 minutes only.
688  *      - Set the internal offset to be used when GPS correction OFF.
689  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
690  *      - When this API is called, if the display time distribution has already been registered,\n
691  *        the Clock service immediately issues a display time notification.
692  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
693  *        the display time notification is not issued immediately, and the display time is delivered\n
694  *        at the timing of receiving the "time notification".
695  *      - When an external clock is connected, set the absolute time minute (-) instruction\n
696  *        with the "setting SW information notification" command to the external clock.
697  * \~english @see DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
698  */
699 EFrameworkunifiedStatus DTime_clearMinute(HANDLE h_app);  /* Adjust the time (minute clear) */
700
701 /**
702  * \ingroup DTime_setAMPM
703  * \~english @par Brief
704  *      - Set AM/PM.
705  * \~english @param [in]  hApp        Application handle
706  * \~english @param [in]  Meridiem        AM/PM setting\n
707  *                                        AM : DTIME_SET_MERIDIEM_AM(TRUE)\n
708  *                                        PM : DTIME_SET_MERIDIEM_PM(FALSE)
709  * \~english @retval  eFrameworkunifiedStatusOK    success
710  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
711  * \~english @par Prerequisite
712  *      - The availability of Clock service is TRUE.
713  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
714  * \~english @par Change of internal state
715  *      - Change of internal state according to the API does not occur.
716  * \~english @par Conditions of processing failure
717  *      - When the generation of the message queue handle for transmission with\n
718  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
719  *      - When message asynchronous communication fails. [eFrameworkunifiedStatusFail]
720  * \~english @par Classification
721  *      - Public
722  * \~english @par Type
723  *      - Fire and Forget
724  * \~english @par Detail
725  *      - This API is assumed to be called by SettingService.
726  *      - With this API, AM/PM of display time can be switched.
727  *      - When PM is selected with the display time (Hour of T_DTimeData) set to\n
728  *        AM (0 to 11 o'clock), the display time is +12h.
729  *      - When AM is selected at the display time (Hour of T_DTimeData) at PM (12 to 23 o'clock),\n
730  *        it makes -12h at display time.
731  *      - Set the internal offset to be used when GPS correction OFF.
732  *      - Note : The time offset when GPS correction ON is set by DTime_setAutoAdjust.
733  *      - When this API is called, if the display time distribution has already been registered,\n
734  *        the Clock service immediately issues a display time notification.
735  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
736  *        the display time notification is not issued immediately, and the display time is delivered\n
737  *        at the timing of receiving the "time notification".
738  * \~english @see DTime_setAutoAdjust, FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
739  */
740 EFrameworkunifiedStatus DTime_setAMPM(HANDLE h_app, BOOL meridiem);  /* AM/PM setting */
741
742 /**
743  * \ingroup DTime_setFormat
744  * \~english @par Brief
745  *      - 12h/24h sets the display format.
746  * \~english @param [in]  hApp        Application handle
747  * \~english @param [in]  Setting        Display setting\n
748  *                                       DTIME_SETTING_FORMAT_12H(FALSE): Notation in 12H\n
749  *                                       DTIME_SETTING_FORMAT_24H(TRUE): Notation in 24H
750  * \~english @retval  eFrameworkunifiedStatusOK    success
751  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
752  * \~english @par Prerequisite
753  *      - The availability of Clock service is TRUE.
754  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
755  * \~english @par Change of internal state
756  *      - Change of internal state according to the API does not occur.
757  * \~english @par Conditions of processing failure
758  *      - When the generation of the message queue handle for transmission with\n
759  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
760  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
761  * \~english @par Classification
762  *      - Public
763  * \~english @par Type
764  *      - Fire and Forget
765  * \~english @par Detail
766  *      - This API is assumed to be called by SettingService.
767  *      - With this API, it is possible to switch the display time 12H notation/24H notation.
768  *      - When this API is called, if the display time distribution has already been registered,\n
769  *        the Clock service immediately issues a display time notification.
770  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
771  */
772 EFrameworkunifiedStatus DTime_setFormat(HANDLE h_app, BOOL setting);  /* format setting */
773
774 /**
775  * \ingroup DTime_setTimeZone
776  * \~english @par Brief
777  *      - Set the time zone.
778  * \~english @param [in]  hApp        Application handle
779  * \~english @param [in]  Auto        Time zone automatic setting\n
780  *                                    DTIME_SETTING_TIMEZONE_AUTO (TRUE): Time zone automatic setting\n
781  *                                    DTIME_SETTING_TIMEZONE_MANUAL (FALSE): Time zone manual setting
782  * \~english @param [in]  Diff        Time zone time difference setting
783  * \~english @retval  eFrameworkunifiedStatusOK    success
784  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
785  * \~english @par Prerequisite
786  *      - The availability of Clock service is TRUE.
787  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
788  * \~english @par Change of internal state
789  *      - Change of internal state according to the API does not occur.
790  * \~english @par Conditions of processing failure
791  *      - When the time zone time time difference setting storage area is NULL. [eFrameworkunifiedStatusFail]
792  *      - When the time difference(hour)specified by the argument Diff->Hour_Diff\n
793  *        is greater than the time difference(hour)upper limit value(13)[eFrameworkunifiedStatusFail]
794  *      - When the time difference(minutes)specified by the argument Diff->Minute_Diff\n
795  *        is incorrect (When the time difference (minutes) specified by the argument\n
796  *        Diff->Minute_Diff is not 0, 15, 30, 45). [eFrameworkunifiedStatusFail]
797  *      - When the generation of the message queue handle for transmission with\n
798  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
799  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
800  * \~english @par Classification
801  *      - Public
802  * \~english @par Type
803  *      - Fire and Forget
804  * \~english @par Detail
805  *      - This API is assumed to be called by SettingService.
806  *      - With this API, you can set time zone automatic switching and time zone setting.
807  *      - When this API is called, if the display time distribution has already been registered,\n
808  *        the Clock service immediately issues a display time notification.
809  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
810  *        the display time notification is not issued immediately, and the display time is delivered\n
811  *        at the timing of receiving the "time notification".
812  *      - Depending on the time zone automatic setting of the second argument, set the third argument as follows.
813  *      - MANUAL: User's setting value.
814  *      - MANUAL/AUTO Time zones update each time the time zone setting changes.
815  *      - Note : When MANUAL, it is not necessary to call this API each time "TZ status notification" is received.
816  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
817  */
818 EFrameworkunifiedStatus DTime_setTimeZone(HANDLE h_app, BOOL b_auto, T_TimeDiff *diff);  /* time zone setting */
819
820 /**
821  * \ingroup DTime_setDST
822  * \~english @par Brief
823  *      - Set DST.
824  * \~english @param [in]  hApp        Application handle
825  * \~english @param [in]  Auto        Time zone automatic setting\n
826  *                                    DTIME_SETTING_DST_AUTO (TRUE): DST automatic setting\n
827  *                                    DTIME_SETTING_DST_MANUAL (FALSE): DST manual setting
828  * \~english @param [in]  Setting     Time zone time difference setting
829  *                                    DTIME_SETTING_DST_ON (TRUE)\n
830  *                                    DTIME_SETTING_DST_OFF (FALSE)
831  * \~english @retval  eFrameworkunifiedStatusOK    success
832  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
833  * \~english @par Prerequisite
834  *      - The availability of Clock service is TRUE.
835  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
836  * \~english @par Change of internal state
837  *      - Change of internal state according to the API does not occur.
838  * \~english @par Conditions of processing failure
839  *      - When the generation of the message queue handle for transmission with\n
840  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
841  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
842  * \~english @par Classification
843  *      - Public
844  * \~english @par Type
845  *      - Fire and Forget
846  * \~english @par Detail
847  *      - This API is assumed to be called by SettingService.
848  *      - With this API, you can compete for automatic switching of DST, and can set ON/OFF.
849  *      - When this API is called, the Clock service immediately issues a display time notification.
850  *      - Note : However, when there is an external clock, and after receiving the time notification command,\n
851  *        the display time notification is not issued immediately, and the display time is delivered\n
852  *        at the timing of receiving the "time notification".
853  *      - Depending on the DST automatic setting of the second argument, set the third argument as follows.
854  *      - MANUAL: User's setting value.
855  *      - MANUAL/AUTO update each DST ON/OFF setting if there is a change.
856  *      - Note : When MANUAL, it is not necessary to call this API each time "DST status notification" is received.
857  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
858  */
859 EFrameworkunifiedStatus DTime_setDST(HANDLE h_app, BOOL b_auto, BOOL setting);  /* DST setting */
860
861 /**
862  * \ingroup DTime_notifySwOff
863  * \~english @par Brief
864  *      - Notify SW OFF information.
865  * \~english @param [in]  h_app        Application handle
866  * \~english @retval  eFrameworkunifiedStatusOK    success
867  * \~english @retval  eFrameworkunifiedStatusFail  fail(including parameter error)
868  * \~english @par Prerequisite
869  *      - The availability of Clock service is TRUE.
870  *      - Dispatcher for application is genereted/initialized(FrameworkunifiedCreateDispatcherWithoutLoop etc.).
871  * \~english @par Change of internal state
872  *      - Change of internal state according to the API does not occur.
873  * \~english @par Conditions of processing failure
874  *      - When the generation of the message queue handle for transmission with\n
875  *        the Clock service has failed. [eFrameworkunifiedStatusFail]
876  *      - When messsage asynchronous communication fails. [eFrameworkunifiedStatusFail]
877  * \~english @par Classification
878  *      - Public
879  * \~english @par Type
880  *      - Fire and Forget
881  * \~english @par Detail
882  *      - This API is assumed to be called by SettingService.
883  *      - With this API, you can notify SW OFF informations of image operations to Extern clock(Meter Device).
884  *      - Note : Do nothing while Extern clock doesn't exist.
885  *      - After calling this API,the SW OFF will not be notified immediately,it will be notified while Meter exists.
886  *      - while error occurs(API return eFrameworkunifiedStatusFail),need to recall this API.\n
887  *   \n
888  *      - Switch ON notification should be executed among the corresponding API of operations as followed.
889  *        <table>
890  *        <tr><th>API name(Switch ON notification)          </th><th>OFF notification neccessary/unneccessary         </th><th>note(reason of unneccessary)</th></tr>
891  *        <tr><td>DTime_loadDisplaySetting        </td><td>unneccessary              </td><td>apart from button operation</td></tr>
892  *        <tr><td>DTime_getDisplaySetting         </td><td>unneccessary              </td><td>apart from button operation</td></tr>
893  *        <tr><td>DTime_setGpsTime                </td><td>unneccessary              </td><td>apart from button operation</td></tr>
894  *        <tr><td>DTime_registerListener_DTime    </td><td>unneccessary              </td><td>apart from button operation</td></tr>
895  *        <tr><td>DTime_UnregisterListener_DTime  </td><td>unneccessary              </td><td>apart from button operation</td></tr>
896  *        <tr><td>DTime_setAutoAdjust             </td><td>neccessary                </td><td></td></tr>
897  *        <tr><td>DTime_increaseHour              </td><td>neccessary                </td><td></td></tr>
898  *        <tr><td>DTime_decreaseHour              </td><td>neccessary                </td><td></td></tr>
899  *        <tr><td>DTime_increaseMinute            </td><td>neccessary                </td><td></td></tr>
900  *        <tr><td>DTime_decreaseMinute            </td><td>neccessary                </td><td></td></tr>
901  *        <tr><td>DTime_clearMinute               </td><td>neccessary                </td><td></td></tr>
902  *        <tr><td>DTime_setAMPM                   </td><td>unneccessary              </td><td>extern clock is unneccessary</td></tr>
903  *        <tr><td>DTime_setFormat                 </td><td>neccessary                </td><td></td></tr>
904  *        <tr><td>DTime_setTimeZone               </td><td>unneccessary              </td><td>there is no extern clock SW ON/OFF notification</td></tr>
905  *        <tr><td>DTime_setDST                    </td><td>unneccessary              </td><td>there is no extern clock SW ON/OFF notification</td></tr>
906  *        </table>
907  *   \n
908  * \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg
909  */
910 EFrameworkunifiedStatus DTime_notifySwOff(HANDLE h_app);  /* SW OFF notification */
911
912 /** @}*/  // end of clock
913 /** @}*/  // end of vehicle_service
914 /** @}*/  // end of BaseSystem
915
916 #endif  // CLOCK_CLIENT_DISPLAY_TIME_INCLUDE_VEHICLE_SERVICE_DTIME_API_H_