Remove unused directories and files in video_in_hal
[staging/basesystem.git] / vehicleservice / positioning / client / include / DR_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 /******************************************************************************
18 @file       DR_API.h
19 @detail     DR_API external header file<BR>
20             DR_API External public header
21 ******************************************************************************/
22 #ifndef POSITIONING_CLIENT_INCLUDE_DR_API_H_
23 #define POSITIONING_CLIENT_INCLUDE_DR_API_H_
24
25 /*****************************************************************************
26  *      Include                                                              *
27  *****************************************************************************/
28
29 /*****************************************************************************
30  *      Define                                                               *
31  *****************************************************************************/
32 /* Command ID */
33 #define CID_DR_MAP_MATCHING_DATA        (0x0209)
34 #define CID_DR_CLEAR_BACKUP_DATA        (0x020F)
35
36 /* DR_EXT_RET_API definition */
37 #define DR_EXT_RET_NORMAL               (0)        /* Successful completion    */
38 #define DR_EXT_RET_ERROR                (-1)       /* Setup failure        */
39
40 /*****************************************************************************
41  *      Typedef                                                              *
42  *****************************************************************************/
43 typedef int32 DR_EXT_RET_API;
44
45 /*****************************************************************************
46  *      Enumeration                                                          *
47  *****************************************************************************/
48 typedef enum {
49     NAVI_DATA_STATUS_2D_FIX = 0x00,
50     NAVI_DATA_STATUS_3D_FIX,
51     NAVI_DATA_STATUS_DR_COMBINED,
52     NAVI_DATA_STATUS_DR_ONLY,
53     NAVI_DATA_STATUS_MAP_2D_GPS_FIX,
54     NAVI_DATA_STATUS_MAP_3D_GPS_FIX,
55     NAVI_DATA_STATUS_MAP_DR_COMBINED,
56     NAVI_DATA_STATUS_MAP_DR_ONLY,
57     NAVI_DATA_STATUS_MAP_NO_FIX,
58     NAVI_DATA_STATUS_AWAITING_FIRST_FIX,
59     NAVI_DATA_STATUS_DATA_INVALID,
60     NAVI_DATA_STATUS_NO_FIX,
61     NAVI_DATA_STATUS_TIME_ONLY_FIX
62 } NAVI_DATA_STATUS;
63
64 typedef enum {
65     NAVI_DATA_INVALID = 0x00,
66     NAVI_DATA_VALID
67 } NAVI_DATA_AVAILABLE;
68
69 /*****************************************************************************
70  *      Struct                                                               *
71  *****************************************************************************/
72 /*****************************************************************************
73  * TAG     : POSITION_INFO
74  * ABSTRACT   : Position information structure
75  * NOTE     :
76  *****************************************************************************/
77 typedef struct {
78     int32                  latitude;               /* 10^-7deg    North : plus, South : minus */
79     int32                  longitude;              /* 10^-7deg    East  : plus, West  : minus */
80     NAVI_DATA_AVAILABLE    status;                 /* Status of data */
81 } POSITION_INFO;
82
83 /*****************************************************************************
84  * TAG     : RATE_INFO
85  * ABSTRACT   : Rate information  structure
86  * NOTE     :
87  *****************************************************************************/
88 typedef struct {
89     u_int16                rate;                   /* 10^-2m/sec */
90     u_int8                 reserve[2];             /* reserve */
91     NAVI_DATA_AVAILABLE    status;                 /* Status of data */
92 } RATE_INFO;
93
94 /*****************************************************************************
95  * TAG     : ORIENT_INFO
96  * ABSTRACT   : Orient information structure
97  * NOTE     :
98  *****************************************************************************/
99 typedef struct {
100     u_int16                orient;                 /* 10^-2deg    N : 0, E : 90, S : 180, W : 270 */
101     u_int8                 reserve[2];             /* reserve */
102     NAVI_DATA_AVAILABLE    status;                 /* Status of data */
103 } ORIENT_INFO;
104
105 /*****************************************************************************
106  * TAG     : MAP_MATCHING_DATA
107  * ABSTRACT   : Map-Matching information data structure
108  * NOTE     :
109  *****************************************************************************/
110 typedef struct {
111     POSITION_INFO          position_info;          /* Position information */
112     RATE_INFO              rate_info;              /* Rate information */
113     ORIENT_INFO            orient_info;            /* Orient information */
114     NAVI_DATA_STATUS       status;                 /* Status */
115 } MAP_MATCHING_DATA;
116
117 /*****************************************************************************
118  * TAG     : DR_MSG_MAP_MATCHING_DATA
119  * ABSTRACT   : Map-Matching information data message buffer structure
120  * NOTE     : Message structure(User -> VehicleSens)
121  *****************************************************************************/
122 typedef struct {
123     T_APIMSG_MSGBUF_HEADER    hdr;                 /* Message header */
124     MAP_MATCHING_DATA         data;                /* Message data (Map-Matching information) */
125 } DR_MSG_MAP_MATCHING_DATA;
126
127 /*****************************************************************************
128  * TAG     : DR_MSG_CLEAR_BACKUP_DATA
129  * ABSTRACT   : Clear backup data message buffer structure
130  * NOTE     : Message structure(User -> VehicleSens)
131  *****************************************************************************/
132 typedef struct {
133     T_APIMSG_MSGBUF_HEADER    hdr;                 /* Message header */
134 } DR_MSG_CLEAR_BACKUP_DATA;
135
136 /*****************************************************************************
137 *      Function prototypes                                                   *
138 *****************************************************************************/
139 #ifdef __cplusplus
140 extern "C" {
141 #endif
142 extern DR_EXT_RET_API DrSetMapMatchingData(PNO pno, MAP_MATCHING_DATA* map_matching_data);
143 extern DR_EXT_RET_API DrClearBackupData(PNO pno);
144 #ifdef __cplusplus
145 }
146 #endif
147
148 #endif  // POSITIONING_CLIENT_INCLUDE_DR_API_H_