summaryrefslogtreecommitdiffstats
path: root/positioning/client/include/vehicle_service/POS_gps_API.h
blob: 41e8e01e45792ec068705fc33fc960c204e921b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_GPS_API_H_
#define POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_GPS_API_H_
/**
 * @file POS_gps_API.h
 * @brief API definition file for GPS function
 */

/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup vehicle_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup positioning
 *  @ingroup vehicle_service
 *  @{
 */


/*---------------------------------------------------------------------------------*
 * Incluce                                                                         *
 *---------------------------------------------------------------------------------*/
#include <vehicle_service/POS_define.h>
#include <gps_hal.h>

/*---------------------------------------------------------------------------------*
 * Typedef declaration                                                             *
 *---------------------------------------------------------------------------------*/
typedef int32_t NAVIINFO_RET_API;
//!< \~english define return value of Get/Set GPS information API

/*---------------------------------------------------------------------------------*
 * Event declaration                                                             *
 *---------------------------------------------------------------------------------*/


/**
 * \~english @brief  GPS time setting result delivery command ID
 * \~english @brief  If you want to catch above envents, use NSFW like below.
 * \~english @code  
 * l_eStatus = FrameworkunifiedAttachCallbackToDispatcher(h_app,POS_NTFY_SEND_THREAD, CID_POSIF_REGISTER_LISTENER_GPS_TIME_SET_REQ, CBCallbackA);
 *            @endcode  
 */
#define CID_POSIF_REGISTER_LISTENER_GPS_TIME_SET_REQ  0x0780

/*---------------------------------------------------------------------------------*
 * Struct declaration                                                              *
 *---------------------------------------------------------------------------------*/
/**
 * @struct SENSOR_MSG_SEND_DAT
 * \~english message for setting vehicle sensor data(to vehicle sensor)
 */
typedef struct {
  DID         did;        //!< \~english data ID
  uint16_t    usSize;     //!< \~english data size
  uint8_t     data[502];  //!< \~english data body
} SENSOR_MSG_SEND_DAT;

/*---------------------------------------------------------------------------------*
 * Prototype Declaration                                                           *
 *---------------------------------------------------------------------------------*/
/* GPS_API public API */
#ifdef __cplusplus
extern "C" {
#endif

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - GPS setting request
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] p_data
///        - SENSOR_MSG_SEND_DAT * - pointer of GPS setting data
///
/// \~english @par
///        - SENSOR_MSG_SEND_DAT structure
/// \~english @code
///   typedef struct
///   {
///     DID       did;        /* Data ID */
///     uint16_t  usSize;     /* Data size */
///     uint8_t   data[502];  /* Data body */
///   } SENSOR_MSG_SEND_DAT;
/// @endcode
///
/// \~english @par
///        - Data ID(did)
///        - POS_DID_GPS__CWORD82__SETINITIAL - setting initial location and time data to GPS  \n
///          (reference to initial location, time setting(_CWORD82_))
///        - POS_DID_GPS__CWORD82__SETRMODEEX - setting GPS receiver mode(pull extension sentence) \n
///          (reference to GPS receiver mode setting(_CWORD82_))
///        - POS_DID_GPS__CWORD82__SELSENT    - setting command to GPS that output any sentence  \n
///          (reference to output any sentence setting(_CWORD82_))
///
///
/// \~english @retval SENSOR_RET_NORMAL normal finish
/// \~english @retval SENSOR_RET_ERROR_CREATE_EVENT event create error
/// \~english @retval SENSOR_RET_ERROR_PARAM parameter error
/// \~english @retval SENSOR_RET_ERROR_DID data ID not registered
/// \~english @retval SENSOR_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval SENSOR_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status by this API
///
/// \~english @par Failure condition
///        - The parameter hApp is NULL [SENSOR_RET_ERROR_PARAM]
///        - The parameter p_data is NULL [SENSOR_RET_ERROR_PARAM]
///        - Data ID(p_data->did) is not supported [SENSOR_RET_ERROR_DID]
///        - GPS setting data size(p_data->usSize) is not same with the data  \n
///          that related to data ID [SENSOR_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The message queue name has not been registered in control table when GPS \n
///          setting message transfer between processes. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Message transfer HANDLE create failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Message transfer HANDLE get failed from internal table. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - GPS setting message transfer failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///
/// \~english @par Detail
///        - Call this API to set GPS data. \n
///          The GPS data specified by the parameter p_data will be set in positioning.
///
/// \~english @par
///        - Please note the following points when use this API.
///        - This API is only called by Navigation proxy.
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Fire and Forget
///
/// \~english @see
///        - None
///
////////////////////////////////////////////////////////////////////////////////////////////
int32_t POS_ReqGPSSetting(HANDLE hApp, SENSOR_MSG_SEND_DAT *p_data);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Set GPS information
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] navilocinfo
///        - NAVIINFO_ALL * - pointer of GPS information
///
/// \~english @par
///        - NAVIINFO_ALL structure
/// \~english @code
///   typedef struct
///   {
///     uint8_t           ucSensorCnt;  /* sensor count */
///     uint8_t           reserve[3];   /* reserve */
///     NAVIINFO_DIAG_GPS stDiagGps;    /* position fix related information */
///     NAVIINFO_NAVI_GPS stNaviGps;    /* other GPS related information */
///   } NAVIINFO_ALL;
/// @endcode
///        - sensor count \n
///          sensor count value when GPS data received
///
/// \~english @par
///        - NAVIINFO_DIAG_GPS structure
/// \~english @code
///   typedef struct
///   {
///     NAVIINFO_DIAG_GPS_FIX  stFix;  /* position fix information */
///     NAVIINFO_DIAG_GPS_SAT  stSat;  /* all satellite information */
///   } NAVIINFO_DIAG_GPS;
/// @endcode
///        \n
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX structure
/// \~english @code
///   typedef struct
///   {
///     uint8_t                   ucFixSts;     /* position fix status */
///     uint8_t                   ucReserve[3]; /* reserve */
///     NAVIINFO_DIAG_GPS_FIX_CNT stCnt;        /* position fix count data */
///     NAVIINFO_DIAG_GPS_FIX_XYZ stWgs84;      /* lonlat data(WGS84 geodetic)  */
///   } NAVIINFO_DIAG_GPS_FIX;
/// @endcode
///        - position fix status(ucFixSts)
///        - NAVIINFO_DIAG_GPS_FIX_STS_NON:not fixed
///        - NAVIINFO_DIAG_GPS_FIX_STS_2D :2D fix
///        - NAVIINFO_DIAG_GPS_FIX_STS_3D :3D fix
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX_CNT structure
/// \~english @code
///   typedef struct
///   {
///     uint32_t  ulCnt3d;    /* position fix ratio:3D(unit:sec) */
///     uint32_t  ulCnt2d;    /* position fix ratio:2D(unit:sec) */
///     uint32_t  ulCntElse;  /* position fix ratio:not fix(unit:sec) */
///   } NAVIINFO_DIAG_GPS_FIX_CNT;
/// @endcode
///
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX_XYZ structure
/// \~english @code
///   typedef struct
///   {
///     int32_t   lLat;    /* GPS latitude(unit:1/256sec) (+: north latitude,-: south latitude) */
///     int32_t   lLon;    /* GPS longitude(unit:1/256sec) (+: east longitude, -: west longitude) */
///   } NAVIINFO_DIAG_GPS_FIX_XYZ;
/// @endcode
///
/// \~english @par
///        - NAVIINFO_DIAG_GPS_SAT structure
/// \~english @code
///   typedef struct
///   {
///     NAVIINFO_DIAG_GPS_PRN   stPrn[12];  /* all satellite information */
///   } NAVIINFO_DIAG_GPS_SAT;
/// @endcode
///
/// \~english @par
///        - NAVIINFO_DIAG_GPS_PRN structure
/// \~english @code
///   typedef struct
///   {
///     uint8_t   ucRcvSts;     /* reception status */
///     uint8_t   ucPrn;        /* satellite No. */
///     uint8_t   ucelv;        /* satellite angle(unit:1.0deg) */
///     uint8_t   ucLv;         /* satellite level */
///     uint16_t  usAzm;        /* satellite azimuth(unit:1.0deg) (clockwise from north) */
///     uint8_t   ucReserve[2]; /* reserve */
///   } NAVIINFO_DIAG_GPS_PRN;
/// @endcode
///        - reception status(ucRcvSts)
///        - NAVIINFO_DIAG_GPS_RCV_STS_NOTUSE :not used
///        - NAVIINFO_DIAG_GPS_RCV_STS_SEARCHING :searching
///        - NAVIINFO_DIAG_GPS_RCV_STS_TRACHING :tracking
///        - NAVIINFO_DIAG_GPS_RCV_STS_NOTUSEFIX :not used for position fix
///        - NAVIINFO_DIAG_GPS_RCV_STS_USEFIX :used for position fix
/// \~english @par
///        - NAVIINFO_NAVI_GPS structure
/// \~english @code
///   typedef struct
///   {
///     int32_t           altitude;   /* altitude(unit:1m) */
///     uint16_t          speed;      /* speed(unit:1.00km/h) */
///     uint16_t          heading;    /* heading(unit:0.1deg) (clockwise from north) */
///     NAVIINFO_UTCTIME  utc;        /* UTC time */
///     uint8_t           tdsts;      /* date and time status */
///     uint8_t           reserve[3]; /* reserve */
///   } NAVIINFO_NAVI_GPS;
/// @endcode
///        - altitude(altitude) \n
///          As the altitude is used as unit [0.01m] in internal, \n
///          the altitude data range is (-21,474,839~21,474,839).
///        - UTC(utc)
///        - The time set after rollover.
///        - date and time status(tdsts)
///        - 0= time has not been adjusted after GPS receiver reset(time input or master reset or CSF start)
///        - 1= time output from RTC Backup(have time adjustment result)
///        - 2= time adjustment completed
/// \~english @par
///        - NAVIINFO_UTCTIME structure
/// \~english @code
///   typedef struct {
///     uint16_t    year;     /* A.D. (1~) */
///     uint8_t     month;    /* month(1~12) */
///     uint8_t     date;     /* date(1~31) */
///     uint8_t     hour;     /* hour(0~23) */
///     uint8_t     minute;   /* minute(0~59) */
///     uint8_t     second;   /* second(0~59) */
///     uint8_t     reserved; /* not used */
///   } NAVIINFO_UTCTIME;
/// @endcode
///
/// \~english @retval NAVIINFO_RET_NORMAL normal finish
/// \~english @retval NAVIINFO_RET_ERROR_PARAM parameter error
/// \~english @retval NAVIINFO_RET_ERROR_INNER internal error
/// \~english @retval NAVIINFO_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval NAVIINFO_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter navilocinfo is NULL [NAVIINFO_RET_ERROR_PARAM]
///        - The parameter hApp is NULL [NAVIINFO_RET_ERROR_PARAM]
///        - GPS setting data size(p_data->usSize) is not same as the data that \n
///          related to data ID [NAVIINFO_RET_ERROR_RESOURCE]
///        - The count of message in message queue is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The message queue name has not been registered in control table. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table. [NAVIINFO_RET_ERROR_INNER]
///        - GPS setting message transfer failed between processes. [NAVIINFO_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to set GPS information to vehicle sensor.\n
///        - This API will finish when get the return value.
///
/// \~english @par
///        - Please note the following points when use this API.
///        - This API is only called by Navigation proxy.
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Fire and Forget and Method and Fire and Forget and Fire and Forget
///
/// \~english @see
///        - POS_GetGPSInfo
////////////////////////////////////////////////////////////////////////////////////////////
NAVIINFO_RET_API POS_SetGPSInfo(HANDLE hApp, NAVIINFO_ALL *navilocinfo);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Get GPS data
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [out] navidiaginfo
///        - NAVIINFO_DIAG_GPS* - pointer to get GPS data
///
/// \~english @par
///        - NAVIINFO_DIAG_GPS structure
/// \~english @code
///   typedef struct
///   {
///     NAVIINFO_DIAG_GPS_FIX stFix;  /* position fix information */
///     NAVIINFO_DIAG_GPS_SAT stSat;  /* all satellite information */
///   } NAVIINFO_DIAG_GPS;
/// @endcode
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX structure
/// \~english @code
///   typedef struct
///   {
///     uint8_t                   ucFixSts;     /* position fix status */
///     uint8_t                   ucReserve[3]; /* reserve */
///     NAVIINFO_DIAG_GPS_FIX_CNT stCnt;        /* position fix count data */
///     NAVIINFO_DIAG_GPS_FIX_XYZ stWgs84;      /* lonlat data(WGS84 geodetic)  */
///   } NAVIINFO_DIAG_GPS_FIX;
/// @endcode
///        - position fix status(ucFixSts)
///        - NAVIINFO_DIAG_GPS_FIX_STS_NON:not fixed
///        - NAVIINFO_DIAG_GPS_FIX_STS_2D :2D fix
///        - NAVIINFO_DIAG_GPS_FIX_STS_3D :3D fix
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX_CNT structure
/// \~english @code
///   typedef struct
///   {
///     uint32_t    ulCnt3d;    /* position fix count:3D(unit:sec) */
///     uint32_t    ulCnt2d;    /* position fix count:2D(unit:sec) */
///     uint32_t    ulCntElse;  /* position fix count:not fix(unit:sec) */
///   } NAVIINFO_DIAG_GPS_FIX_CNT;
/// @endcode
/// \~english @par
///        - NAVIINFO_DIAG_GPS_FIX_XYZ structure
/// \~english @code
///   typedef struct
///   {
///     int32_t      lLat;    /* GPS latitude(unit:1/256sec) (+: north latitude, -: south latitude) */
///     int32_t      lLon;    /* GPS longitude(unit:1/256sec) (+: east longitude, -: west longitude) */
///   } NAVIINFO_DIAG_GPS_FIX_XYZ;
/// @endcode
/// \~english @par
///        - NAVIINFO_DIAG_GPS_SAT structure
/// \~english @code
///   typedef struct
///   {
///     NAVIINFO_DIAG_GPS_PRN  stPrn[12];  /* all satellite information */
///   } NAVIINFO_DIAG_GPS_SAT;
/// @endcode
/// \~english @par
///        - NAVIINFO_DIAG_GPS_PRN structure
/// \~english @code
///   typedef struct
///   {
///     uint8_t   ucRcvSts;     /* reception status */
///     uint8_t   ucPrn;        /* satellite No. */
///     uint8_t   ucelv;        /* satellite angle(unit:1.0deg) */
///     uint8_t   ucLv;         /* satellite level */
///     uint16_t  usAzm;        /* satellite azimuth(unit:1.0deg) (clockwise from north) */
///     uint8_t   ucReserve[2]; /* reserve */
///   } NAVIINFO_DIAG_GPS_PRN;
/// @endcode
///        - reception status(ucRcvSts)
///        - NAVIINFO_DIAG_GPS_RCV_STS_NOTUSE : not used
///        - NAVIINFO_DIAG_GPS_RCV_STS_SEARCHING : searching
///        - NAVIINFO_DIAG_GPS_RCV_STS_TRACHING : tracking
///        - NAVIINFO_DIAG_GPS_RCV_STS_NOTUSEFIX : not used for position fix
///        - NAVIINFO_DIAG_GPS_RCV_STS_USEFIX : used for position fix
///
/// \~english @retval NAVIINFO_RET_NORMAL normal finish
/// \~english @retval NAVIINFO_RET_ERROR_PARAM parameter error
/// \~english @retval NAVIINFO_RET_ERROR_INNER internal error
/// \~english @retval NAVIINFO_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval NAVIINFO_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter navidiaginfo is NULL [NAVIINFO_RET_ERROR_PARAM]
///        - The parameter hApp is NULL [NAVIINFO_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [NAVIINFO_RET_ERROR_RESOURCE]
///        - The event is created in same process, but the count of reference is reach to max [NAVIINFO_RET_ERROR_INNER]
///        - The event is created in system, but the count of reference is reach to max  [NAVIINFO_RET_ERROR_INNER]
///        - Memory allocate falied during the event table creation for event  \n
///          registering. [NAVIINFO_RET_ERROR_INNER]
///        - The thread can not register in the event table. [NAVIINFO_RET_ERROR_INNER]
///        - Memory allocate failed in event table during the thread table creation. [NAVIINFO_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag has already \n
///          been registered. [NAVIINFO_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag register failed. [NAVIINFO_RET_ERROR_INNER]
///        - The event table is full during event creation. [NAVIINFO_RET_ERROR_INNER]
///        - The memory for event HANDLE allocate failed during event table creation. [NAVIINFO_RET_ERROR_INNER]
///        - The thread can not be registered in event table. [NAVIINFO_RET_ERROR_INNER]
///        - In event table, try to allocate the memory of the thread table creation, but \n
///          failed. [NAVIINFO_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag has already been \n
///          registered. [NAVIINFO_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag register failed. [NAVIINFO_RET_ERROR_INNER]
///        - Specified event ID has not been registered in table. [NAVIINFO_RET_ERROR_INNER]
///        - Initialize event object failed. [NAVIINFO_RET_ERROR_INNER]
///        - The memory for storing semaphore control data allocate failed. [NAVIINFO_RET_ERROR_INNER]
///        - Specified semaphore ID has not been registered when semaphore lock. [NAVIINFO_RET_ERROR_INNER]
///        - Internal mutex HANDLE is NULL when mutex lock. [NAVIINFO_RET_ERROR_INNER]
///        - Internal mutex HANDLE has not been registered in mutex table when mutex lock. [NAVIINFO_RET_ERROR_INNER]
///        - The owner of specified mutex is not itself when mutex lock. [NAVIINFO_RET_ERROR_INNER]
///        - Mutex has been multiple locked [NAVIINFO_RET_ERROR_INNER]
///        - The HANDLE is NULL when getting usable share memory address. [NAVIINFO_RET_ERROR_INNER]
///        - Can not get usable share memory address. [NAVIINFO_RET_ERROR_INNER]
///        - Memory allocate failed for share memory map. [NAVIINFO_RET_ERROR_INNER]
///        - Memory allocate failed for share memory management. [NAVIINFO_RET_ERROR_INNER]
///        - Can not open share memory. [NAVIINFO_RET_ERROR_INNER]
///        - Failed to mapping share memory. [NAVIINFO_RET_ERROR_INNER]
///        - No empty field in share memory. [NAVIINFO_RET_ERROR_INNER]
///        - Failed to guarantee share memory. [NAVIINFO_RET_ERROR_INNER]
///        - ProcessNo has not been registered in message control table when message \n
///          transfered between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed when message transfered between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer failed between processes. [NAVIINFO_RET_ERROR_INNER]
///        - The destination process name size is larger than 20 characters when message \n
///          transfer between processes. [NAVIINFO_RET_ERROR_INNER]
///        - The message queue name has not been registered in control table when message \n
///          transfer between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed when message transfered between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table when message transfered \n
///          between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Message transfer failed between processes. [NAVIINFO_RET_ERROR_INNER]
///        - Specified event HANDLE has not been registered in event HANDLE table during \n
///          event waiting. [NAVIINFO_RET_ERROR_INNER]
///        - The count of thread arrived max in event management table during event waiting. [NAVIINFO_RET_ERROR_INNER]
///        - The EV_FLAG_BIT is not set in flagID during event getting. [NAVIINFO_RET_ERROR_INNER]
///        - The ID of message event queue has not been created during event getting. [NAVIINFO_RET_ERROR_INNER]
///        - The flagID has not been registered during event getting. [NAVIINFO_RET_ERROR_INNER]
///        - The interruption happened during event getting [NAVIINFO_RET_ERROR_INNER]
///        - Whatever error happened during event getting. [NAVIINFO_RET_ERROR_INNER]
///        - The HANDLE is NULL when getting usable share memory address for accessing \n
///          received data. [NAVIINFO_RET_ERROR_INNER]
///        - Can not get usable share memory address for accessing received data. [NAVIINFO_RET_ERROR_INNER]
///        - Memory for share memory map allocate failed for accessing received data. [NAVIINFO_RET_ERROR_INNER]
///        - Memory for share memory management allocate failed for accessing received data. [NAVIINFO_RET_ERROR_INNER]
///        - Can not open share memory for accessing received data. [NAVIINFO_RET_ERROR_INNER]
///        - Failed to mapping share memory for accessing received data. [NAVIINFO_RET_ERROR_INNER]
///        - The size of data stored in share memory is larger than the size of \n
///          received data. [NAVIINFO_RET_ERROR_INNER]
///        - The result of sensor data get processing is POS_RET_ERROR_RESOURCE. [NAVIINFO_RET_ERROR_RESOURCE]
///        - The result of sensor data get processing is not POS_RET_ERROR_RESOURCE. [NAVIINFO_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to get GPS data for diag. \n
///          This API will finish when get the return value.
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Sync
///
/// \~english @see
///        - POS_SetGPSInfo
////////////////////////////////////////////////////////////////////////////////////////////
NAVIINFO_RET_API POS_GetGPSInfo(HANDLE hApp, NAVIINFO_DIAG_GPS *navidiaginfo);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - GPS reset request
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] ResName
///        - PCSTR - response thread name
/// \~english @param [in] mode
///        - uint8_t - reset mode
///
/// \~english @par
///        - reset mode(mode) \n
///          If the mode is not one of the following, return POS_RET_ERROR_PARAM
///        - GPS_RST_COLDSTART - GPS reset request(cold start) \n
///          Automatic search, track satellite and position fix after RAM initialized(all config \n
///          items be initialized to default value).\n
///          Initialize data objects:almanac/ ephemeris data, current position, GPS receiver mode and etc.\n
///
/// \~english @retval POS_RET_NORMAL normal finish
/// \~english @retval POS_RET_ERROR_PARAM parameter error
/// \~english @retval POS_RET_ERROR_BUSY GPS device is still in setting
/// \~english @retval POS_RET_ERROR_INNER internal error
/// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
///        - The parameter ResName is NULL [POS_RET_ERROR_PARAM]
///        - The parameter mode is not GPS_RST_COLDSTART [POS_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
///        - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
///        - The event is created in system, but the count of reference is reach to max  [POS_RET_ERROR_INNER]
///        - Memory allocate falied when the event table creation that for event registering. [POS_RET_ERROR_INNER]
///        - The thread can not register in the event table. [POS_RET_ERROR_INNER]
///        - Memory allocate failed in event table when the thread table creation. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag has already been \n
///          registered. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - The event table is full when event creation. [POS_RET_ERROR_INNER]
///        - The memory for event HANDLE allocate failed when event table creation. [POS_RET_ERROR_INNER]
///        - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
///        - In event table, to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
///        - Initialize event object failed. [POS_RET_ERROR_INNER]
///        - The message queue name has not been registered in control table when GPS reset \n
///          message transfer between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed when GPS reset message transfered \n
///          between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table when GPS reset message \n
///          transfered between processes. [POS_RET_ERROR_INNER]
///        - GPS reset message transfer failed between processes. [POS_RET_ERROR_INNER]
///        - Specified event HANDLE has not been registered in event HANDLE table during  \n
///          event waiting. [POS_RET_ERROR_INNER]
///        - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
///        - The EV_FLAG_BIT is not set in flagID during event waiting. [POS_RET_ERROR_INNER]
///        - The ID of message event queue has not been created during event waiting. [POS_RET_ERROR_INNER]
///        - The flagID has not been registered during event waiting. [POS_RET_ERROR_INNER]
///        - The interruption happened during event waiting [POS_RET_ERROR_INNER]
///        - Whatever error happened during event waiting. [POS_RET_ERROR_INNER]
///        - The result of sensor data get processing is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
///        - The result of sensor data get processing is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to reset GPS device.
///
/// \~english @par
///        - Please note the following points when use this API.
///        - This API is only called by Navigation proxy.
///
/// \~english @par
///          Notification of message
///        - The result of communication with GPS device will be sent by system API message with following format. \n
///          Command ID : CID_POSIF_REQ_GPS_RESET \n
///          message structure
/// \~english @code
///   typedef struct
///   {
///     TG_GPS_RET_RESET  data;      /* GPS reset status data */
///   } TG_GPS_RET_RESET_MSG;
/// @endcode
///        - message data body structure
/// \~english @code
///   typedef struct {
///     unsigned long    ret_rst_status;    /* response GPS reset status */
///   } TG_GPS_RET_RESET;
/// @endcode
///        - response GPS reset status(ret_rst_status)
///        - GPS_SENDOK:acknowledge
///        - GPS_SENDNG:connection error
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Fire and Forget
///
/// \~english @see
///        - None
////////////////////////////////////////////////////////////////////////////////////////////
POS_RET_API POS_ReqGPSReset(HANDLE hApp, PCSTR ResName, uint8_t mode);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Register GPS time setting request delivery
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] notifyName
///        - PCSTR - Destination thread name
/// \~english @param [in] ucCtrlFlg
///        - uint8_t - Delivery control flag(register)
///
/// \~english @par
///        - Delivery control flag(ucCtrlFlg)
///        - SENSOR_DELIVERY_REGIST - register
///
/// \~english @retval POS_RET_NORMAL normal finish
/// \~english @retval POS_RET_ERROR_PARAM parameter error
/// \~english @retval POS_RET_ERROR_BUFFULL the register count is full
/// \~english @retval POS_RET_ERROR_INNER internal error
/// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of \n
///          the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
///        - The parameter notifyName is NULL [POS_RET_ERROR_PARAM]
///        - The parameter ucCtrlFlg is not register(SENSOR_DELIVERY_REGIST) [POS_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
///        - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
///        - The event is created in system, but the count of reference is reach to max  [POS_RET_ERROR_INNER]
///        - Memory allocate falied during the event table creation for event registering. [POS_RET_ERROR_INNER]
///        - The thread can not register in the event table. [POS_RET_ERROR_INNER]
///        - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag has already been \n
///          registered. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - The event table is full during event creation. [POS_RET_ERROR_INNER]
///        - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
///        - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
///        - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
///        - Initialize event object failed. [POS_RET_ERROR_INNER]
///        - ProcessNo has not been registered in message control table when message \n
///          transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer failed in process. [POS_RET_ERROR_INNER]
///        - The destination process name size is larger than 20 characters when message transfer \n
///          between processes. [POS_RET_ERROR_INNER]
///        - The message queue name has not been registered in control table when message \n
///          transfer between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table when message transfered \n
///          between processes. [POS_RET_ERROR_INNER]
///        - Message transfer failed between processes. [POS_RET_ERROR_INNER]
///        - Specified event HANDLE has not been registered in event HANDLE table during  \n
///          event waiting. [POS_RET_ERROR_INNER]
///        - The count of thread arrived max in event management table during event waiting. [POS_RET_ERROR_INNER]
///        - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
///        - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
///        - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
///        - The interruption happened during event getting [POS_RET_ERROR_INNER]
///        - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
///        - The result from positioning service is SENSOR_RET_ERROR_PARAM. [POS_RET_ERROR_PARAM]
///        - The result from positioning service is SENSOR_RET_ERROR_BUFFULL. [POS_RET_ERROR_BUFFULL]
///        - The result from positioning service is SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
///        - The result from positioning service is not SENSOR_RET_ERROR_PARAM or  \n
///          SENSOR_RET_ERROR_BUFFULL or SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to register GPS time setting request delivery. \n
///          This API will finish when get the return value.
///
///
/// \~english @par
///          Please note the following points when use this API.
///        - Duplication registering
///        - The same destination thread name has already been registered
///        - The registered delivery data updated and normal return.(first delivery)
///        - To one delivery destination, the same data will not be duplication deliveried at same timing.
///        - After call this API, if the delivery destination thread name has been changed, please call this API again.
///
/// \~english @par
///          Notification of message
///        - After registered successfully, vehicle sensor information will be sent by system \n
///          API message with following format. \n
///          Command ID : @ref CID_POSIF_REGISTER_LISTENER_GPS_TIME_SET_REQ \n
///          time info structure \n
///          The year, month, date, hour, minute and second should be the format set to GPS
/// \~english @code
///   typedef struct {
///     uint16_t  year;     /* A.D.(1~) */
///     uint8_t   month;    /* month(1~12) */
///     uint8_t   date;     /* date(1~31) */
///     uint8_t   hour;     /* hour(0~23) */
///     uint8_t   minute;   /* minute(0~59) */
///     uint8_t   second;   /* second(0~59) */
///     uint8_t   reserved; /* not used */
///   } POS_DATETIME;
/// @endcode
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Method
///
/// \~english @see
///        - None
////////////////////////////////////////////////////////////////////////////////////////////
POS_RET_API POS_RegisterListenerGPSTimeSetReq(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Temporarily set GPS time from Diag function
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] pstDateTime
///        - POS_DATETIME * - pointer of GPS time
///
/// \~english @par
///        - POS_DATETIME structure
/// \~english @code
///   typedef struct {
///     uint16_t  year;     /* A.D.(1~) */
///     uint8_t   month;    /* month(1~12) */
///     uint8_t   date;     /* date(1~31) */
///     uint8_t   hour;     /* hour(0~23) */
///     uint8_t   minute;   /* minute(0~59) */
///     uint8_t   second;   /* second(0~59) */
///     uint8_t   reserved; /* not used */
///   } POS_DATETIME;
/// @endcode
///
/// \~english @retval NAVIINFO_RET_NORMAL normal finish
/// \~english @retval NAVIINFO_RET_ERROR_PARAM parameter error
/// \~english @retval NAVIINFO_RET_ERROR_INNER internal error
/// \~english @retval NAVIINFO_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval NAVIINFO_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par change of internal status
///        - There is no change of internal status
///
/// \~english @par Failure condition
///        - The parameter pstDateTime is NULL [POS_RET_ERROR_PARAM]
///        - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
///        - GPS time Data size is larger than 144 [POS_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
///        - The message queue name has not been registered in control table. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table. [POS_RET_ERROR_INNER]
///        - GPS time setting message transfer failed. [POS_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to set GPS time data to vehicle sensor. \n
///          This API will finish when get the return value.
///
///
/// \~english @par
///          Please note the following points when use this API.
///        - This API will not notify the result of setting time to GPS device. \n
///          Return normal only there is no error such as parameter error.
///        - If want to get the result of setting time to GPS device, use  \n
///          POS_RegisterListnerGpsTime to get GPS time and judge it.
///        - This API is only called by Diag service.
///        - While GPS data is receiving from GPS device, the GPS time set by this API is ignored \n
///          and it is set actual GPS time notified by positioning_hal.
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Fire and Forget
///
/// \~english @see
///        - POS_GetGPStime
////////////////////////////////////////////////////////////////////////////////////////////
POS_RET_API POS_SetGPStime(HANDLE hApp, POS_DATETIME* pstDateTime);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Register GPS time delivery
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [in] notifyName
///        - PCSTR - Destination thread name
/// \~english @param [in] ucCtrlFlg
///        - uint8_t - Delivery control flag(register)
/// \~english @param [in] ucDeliveryTiming
///        - uint8_t - Delivery timing(change/update)
///
/// \~english @par
///        - Delivery control flag(ucCtrlFlg)
///        - SENSOR_DELIVERY_REGIST - register
///        - Register specified data delivery
///        - Please note that if the same data delivery has been registered for multiple \n
///          times, the data will also be deliveried for registered multiple times.
///        - The specified GPS time information will be deliveried at registered time (first delivery).
///        - Delivery timing(ucDeliveryTiming)
///        - SENSOR_DELIVERY_TIMING_CHANGE - change  Specified data will be deliveried only when it changed.
///        - SENSOR_DELIVERY_TIMING_UPDATE - update  Specified data will be deliveried as \n
///          long as it updated by vehicle sensor.
///
/// \~english @retval SENSOR_RET_NORMAL normal finish
/// \~english @retval SENSOR_RET_ERROR_CREATE_EVENT event creation error
/// \~english @retval SENSOR_RET_ERROR_PARAM parameter error
/// \~english @retval SENSOR_RET_ERROR_INNER internal error
/// \~english @retval SENSOR_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval SENSOR_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of \n
///          the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter hApp is NULL [SENSOR_RET_ERROR_PARAM]
///        - The parameter notifyName is NULL [SENSOR_RET_ERROR_PARAM]
///        - The parameter ucCtrlFlg is not register(SENSOR_DELIVERY_REGIST) [SENSOR_RET_ERROR_PARAM]
///        - The parameter ucDeliveryTiming is neither update(SENSOR_DELIVERY_TIMING_UPDATE) \n
///          nor change(SENSOR_DELIVERY_TIMING_CHANGE) [SENSOR_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [SENSOR_RET_ERROR_RESOURCE]
///        - The event is created in same process, but the count of reference is reach to \n
///          max [SENSOR_RET_ERROR_CREATE_EVENT]
///        - The event is created in system, but the count of reference is reach to max  [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Memory allocate falied during the event table creation for event  \n
///          registering. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - The thread can not register in the event table. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Memory allocate failed in event table during the thread table creation. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - After register the thread table in event table, the event flag has already been \n
///          registered. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - After register the thread table in event table, the event flag register \n
///          failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - The event table is full during event creation. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - The memory for event HANDLE allocate failed during event table creation. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - The thread can not be registered in event table. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - In event table, try to allocate the memory of the thread table creation, but \n
///          failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - After register the thread in event table, the event flag has already been  \n
///          registered. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - After register the thread in event table, the event flag register failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Specified event ID has not been registered in table. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - Initialize event object failed. [SENSOR_RET_ERROR_CREATE_EVENT]
///        - ProcessNo has not been registered in message control table when message \n
///          transfered between processes. [SENSOR_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed when message transfered between processes. [SENSOR_RET_ERROR_INNER]
///        - Message transfer failed between processes. [SENSOR_RET_ERROR_INNER]
///        - The destination process name size is larger than 20 characters when message \n
///          transfer between processes. [SENSOR_RET_ERROR_INNER]
///        - The message queue name has not been registered in control table when message \n
///          transfer between processes. [SENSOR_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed when message transfered between processes. [SENSOR_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table when message transfered \n
///          between processes. [SENSOR_RET_ERROR_INNER]
///        - Message transfer failed between processes. [SENSOR_RET_ERROR_INNER]
///        - Specified event HANDLE has not been registered in event HANDLE table during \n
///          event waiting. [SENSOR_RET_ERROR_INNER]
///        - The count of thread arrived max in event management table during event waiting. [SENSOR_RET_ERROR_INNER]
///        - The EV_FLAG_BIT is not set in flagID during event get. [SENSOR_RET_ERROR_INNER]
///        - The ID of message event queue has not been created during event get. [SENSOR_RET_ERROR_INNER]
///        - The flagID has not been registered during event get. [SENSOR_RET_ERROR_INNER]
///        - The interruption happened during event get [SENSOR_RET_ERROR_INNER]
///        - Whatever error happened during event get. [SENSOR_RET_ERROR_INNER]
///        - Get event timeout. [SENSOR_RET_ERROR_INNER]
///        - Error happened during event get. [SENSOR_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to register GPS time delivery. \n
///          This API will finish when get the return value.
///
///
/// \~english @par
///          Please note the following points when use this API.
///        - Duplication registering
///        - The same destination thread name has already been registered
///        - The registered delivery data updated and normal return.(first delivery)
///        - To one delivery destination, the same data will not be duplication deliveried at same timing.
///        - After call this API, if the delivery destination thread name has changed, please call this API again.
///
/// \~english @par
///           Notification of message
///         - After registered successfully, vehicle sensor will send GPS time data \n
///           as system API message with following format.
///         - If the register successed, certainly delivery first data. And then \n
///           delivery data according to the delivery timing.
///         - Command ID : CID_VEHICLESENS_VEHICLE_INFO_GPS_TIME\n
///         - SENSOR_MSG_GPSTIME structure
/// \~english @code
///   typedef struct {
///     NAVIINFO_UTCTIME  utc;        /* UTC time */
///     uint8_t           tdsts;      /* time status */
///     uint8_t           reserve[3]; /* reserve */
///   } SENSOR_MSG_GPSTIME;
/// @endcode
///        - time status(tdsts)
///        - 0= time has not been adjusted after GPS receiver reset(time input or master reset or CSF start)
///        - 1= time output from RTC Backup(have time adjustment result)
///        - 2= time adjustment completed
///
/// \~english @par
///        - NAVIINFO_UTCTIME structure
/// \~english @code
///   typedef struct {
///     uint16_t  year;     /* A.D.(1~) */
///     uint8_t   month;    /* month(1~12) */
///     uint8_t   date;     /* date(1~31) */
///     uint8_t   hour;     /* hour(0~23) */
///     uint8_t   minute;   /* minute(0~59) */
///     uint8_t   second;   /* second(0~59) */
///     uint8_t   reserved; /* not used */
///   } POS_DATETIME;
/// @endcode
///
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Method
///
/// \~english @see
///        - None
////////////////////////////////////////////////////////////////////////////////////////////
SENSOR_RET_API POS_RegisterListenerGPStime(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg, uint8_t ucDeliveryTiming);

////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup tag_Positioning
/// \~english @par Brief
///        - Get GPS time
///
/// \~english @param [in] hApp
///        - HANDLE - App Handle
/// \~english @param [out] dat
///        - SENSOR_GPSTIME* - output buffer pointer to store GPS time
///
/// \~english @par
///        - SENSOR_GPSTIME structure
/// \~english @code
///   typedef struct {
///     NAVIINFO_UTCTIME  utc;        /* UTC time */
///     uint8_t           tdsts;      /* date amd time status */
///     uint8_t           reserve[3]; /* reserve */
///   } SENSOR_GPSTIME;
/// @endcode
///        - date amd time status(tdsts)
///        - 0= time has not been adjusted after GPS receiver reset(time input or master reset or CSF start)
///        - 1= time output from RTC Backup(have time adjustment result)
///        - 2= time adjustment completed
///
/// \~english @par
///        - NAVIINFO_UTCTIME structure
/// \~english @code
///   typedef struct {
///     uint16_t  year;     /* A.D.(1~) */
///     uint8_t   month;    /* month(1~12) */
///     uint8_t   date;     /* date(1~31) */
///     uint8_t   hour;     /* hour(0~23) */
///     uint8_t   minute;   /* minute(0~59) */
///     uint8_t   second;   /* second(0~59) */
///     uint8_t   reserved; /* not used */
///   } NAVIINFO_UTCTIME;
/// @endcode
///
/// \~english @retval POS_RET_NORMAL normal finish
/// \~english @retval POS_RET_ERROR_PARAM parameter error
/// \~english @retval POS_RET_ERROR_INNER internal error
/// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
/// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
///
/// \~english @par Precondition
///        - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
///          of the Dispatcher for App are completed.
///        - Availability of positioning service is TRUE.
///
/// \~english @par changes of internal status
///        - There is no changes of internal status
///
/// \~english @par Failure condition
///        - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
///        - The parameter dat is NULL [POS_RET_ERROR_PARAM]
///        - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
///        - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
///        - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
///        - The event is created in system, but the count of reference is reach to max  [POS_RET_ERROR_INNER]
///        - Memory allocate falied during the event table creation for event registering. [POS_RET_ERROR_INNER]
///        - The thread can not register in the event table. [POS_RET_ERROR_INNER]
///        - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag has already  \n
///          been registered. [POS_RET_ERROR_INNER]
///        - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - The event table is full during event creation. [POS_RET_ERROR_INNER]
///        - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
///        - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
///        - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
///        - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
///        - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
///        - Initialize event object failed. [POS_RET_ERROR_INNER]
///        - The memory for storing semaphore control data allocate failed. [POS_RET_ERROR_INNER]
///        - Specified semaphore ID has not been registered when semaphore lock. [POS_RET_ERROR_INNER]
///        - Internal mutex HANDLE is NULL when mutex lock. [POS_RET_ERROR_INNER]
///        - Internal mutex HANDLE has not been registered in mutex table when mutex lock. [POS_RET_ERROR_INNER]
///        - The owner of specified mutex is not itself when mutex lock. [POS_RET_ERROR_INNER]
///        - Mutex has been multiple locked [POS_RET_ERROR_INNER]
///        - The HANDLE is NULL when getting usable share memory address. [POS_RET_ERROR_INNER]
///        - Can not get usable share memory address. [POS_RET_ERROR_INNER]
///        - Memory allocate failed for share memory map. [POS_RET_ERROR_INNER]
///        - Memory allocate failed for share memory management. [POS_RET_ERROR_INNER]
///        - Can not open share memory. [POS_RET_ERROR_INNER]
///        - Failed to mapping share memory. [POS_RET_ERROR_INNER]
///        - No empty field in share memory. [POS_RET_ERROR_INNER]
///        - Failed to guarantee share memory. [POS_RET_ERROR_INNER]
///        - ProcessNo has not been registered in message control table when message \n
///          transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer failed between processes. [POS_RET_ERROR_INNER]
///        - The destination process name size is larger than 20 characters when message \n
///          transfer between processes. [POS_RET_ERROR_INNER]
///        - The message queue name has not been registered in control table when message \n
///          transfer between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
///        - Message transfer HANDLE get failed from internal table when message transfered \n
///          between processes. [POS_RET_ERROR_INNER]
///        - Message transfer failed between processes. [POS_RET_ERROR_INNER]
///        - Specified event HANDLE has not been registered in event HANDLE table during \n
///          event waiting. [POS_RET_ERROR_INNER]
///        - The count of thread arrived max in event management table during event waiting. [POS_RET_ERROR_INNER]
///        - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
///        - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
///        - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
///        - The interruption happened during event getting [POS_RET_ERROR_INNER]
///        - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
///        - The HANDLE is NULL when getting usable share memory address for accessing \n
///          received data. [POS_RET_ERROR_INNER]
///        - Can not get usable share memory address for accessing received data. [POS_RET_ERROR_INNER]
///        - Memory for share memory map allocate failed for accessing received data. [POS_RET_ERROR_INNER]
///        - Memory for share memory management allocate failed for accessing received data. [POS_RET_ERROR_INNER]
///        - Can not open share memory for accessing received data. [POS_RET_ERROR_INNER]
///        - Failed to mapping share memory for accessing received data. [POS_RET_ERROR_INNER]
///        - The size of data stored in share memory is larger than the size of received data. [POS_RET_ERROR_INNER]
///        - The result of sensor data getting process is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
///        - The result of sensor data getting process is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
///
/// \~english @par Detail
///        - Call this API to get GPS time from vehicle sensor.
///
/// \~english @par
///        - Please note the following points when use this API.
///
///
/// \~english @par Classification
///        - Public
///
/// \~english @par Type
///        - Sync
///
/// \~english @see
///        - POS_SetGPStime
////////////////////////////////////////////////////////////////////////////////////////////
POS_RET_API POS_GetGPStime(HANDLE hApp, SENSOR_GPSTIME* dat);

#ifdef __cplusplus
}
#endif
/** @}*/  // end of positioning
/** @}*/  // end of vehicle_service
/** @}*/  // end of BaseSystem
#endif  // POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_GPS_API_H_