Remove unused directories and files in video_in_hal
[staging/basesystem.git] / service / vehicle / positioning / client / include / Dead_Reckoning_Local_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 #ifndef POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_
18 #define POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_
19 /****************************************************************************
20  * File name        :Dead_Reckoning_Local_Api.h
21  * System name        :PastModel002
22  * Subsystem name    :
23  ******************************************************************************/
24
25 #include <vehicle_service/positioning_base_library.h>
26 #include "Sensor_Common_API.h"
27 #include "SensorLocation_API.h"
28 #include "SensorMotion_API.h"
29 #include "DR_API.h"
30
31 /************************************************************************
32 *            Macro definitions                                                 *
33 ************************************************************************/
34
35 /*----------------------------------------------------------------------*
36  *    DEADRECKONING_RET_API define                                         *
37  *----------------------------------------------------------------------*/
38 /* Normal system */
39 #define DEAD_RECKONING_RET_NORMAL               0       /* Normal completion */
40 /* Abnormal system */
41 #define DEADRECKONING_RET_ERROR_PID             (-1)    /* Thread ID error */
42 #define DEADRECKONING_RET_ERROR_DID             (-2)    /* Unregistered DID */
43 #define DEADRECKONING_RET_ERROR_PARAM           (-4)    /* Parameter error */
44 #define DEADRECKONING_RET_ERROR_BUFFULL         (-5)    /* FULL of registered numbers */
45 #define DEADRECKONING_RET_ERROR_CREATE_EVENT    (-6)    /* Event generation failure */
46 #define DEADRECKONING_RET_ERROR_OUTOF_MEMORY    (-8)    /* Shared memory allocation failed */
47 #define DEADRECKONING_RET_ERROR_SIZE            (-9)    /* Storage destination size error */
48 #define DEADRECKONING_RET_ERROR_MIN             (-10)
49
50 /*----------------------------------------------------------------------*
51  *    DEADRECKONING delivery registry APIs                                       *
52  *----------------------------------------------------------------------*/
53 /* Delivery control */
54 #define DEADRECKONING_DELIVERY_REGIST           0x01    /* Delivery registration */
55
56 /* Delivery timing */
57 #define DEADRECKONING_DELIVERY_TIMING_UPDATE    0x01    /* Updating */
58
59 /*----------------------------------------------------------------------*
60  *    Command ID                                                         *
61  *----------------------------------------------------------------------*/
62 /* Vehicle Sensor -> Vehicle Sensor(DR) */
63 #define CID_DEAD_RECKONING_DELIVERY_ENTRY       0x0310  /* DR Transmission Registration Signal Notification */
64
65 /* Vehicle Sensor -> Vehicle Sensor(DR) */
66 #define CID_DEAD_RECKONING_SENS_DATA            0x0311  /* DR data signal notification */
67 #define CID_DEAD_RECKONING_GPS_DATA             0x0312  /* DR data signal notification */
68 #define CID_DEAD_RECKONING_SENS_FST_DATA        0x0313  /* DR data signal notification */
69
70 /* Message Data Size(byte) */
71 #define DEADRECKONING_MSGBUF_DSIZE              512     /* Message body MAX */
72
73 /*----------------------------------------------------------------------*
74  *    Shared Memory Related Extensions                                                     *
75  *----------------------------------------------------------------------*/
76 /* Semaphore name(MAX 32Byte) Synchronize with VehicleDebug_API_private.h */
77 #define SENSOR_LOG_SETTING_SEMAPHO_NAME         ("SEBSIR_GET_LOG_SETTING_SEMAPHO")
78
79 /* Shared memory name(MAX 32Byte) Synchronize with VehicleDebug_API_private */
80 #define LOG_SETTING_SHARE_MEMORY_NAME           ("LOG_SETTING_SHARE_MEMORY")
81
82 /************************************************************************
83 *            typedef Definition                                         *
84 ************************************************************************/
85 typedef RET_API DEAD_RECKONING_RET_API;                 /* API return value */
86
87 /************************************************************************
88 *            Struct definitions                                                 *
89 ************************************************************************/
90
91 /************************************************************************
92 * TAG       : DEADRECKONING_MSG_BUF
93 * ABSTRACT  : message buffer
94 ************************************************************************/
95
96 typedef struct {
97     T_APIMSG_MSGBUF_HEADER    hdr;                                 /* Message header */
98     u_int8                    data[DEADRECKONING_MSGBUF_DSIZE];    /* Message data */
99 } DEADRECKONING_MSG_BUF;
100
101 /************************************************************************
102 * TAG       : DEADRECKONING_MSG_DELIVERY_ENTRY
103 * ABSTRACT  : Registration message delivery vehicle sensor information(->Vehicle sensor)
104 ************************************************************************/
105 typedef struct {
106     DID                       did;                /* ID data corresponding to the vehicle sensor information */
107     PNO                       pno;                /* Shipping addressPNO */
108     u_int8                    delivery_timing;    /* Delivery opportunity */
109     u_int8                    ctrl_flg;           /* Delivery control */
110     EventID                   event_id;           /* Event ID */
111 } DEADRECKONING_MSG_DELIVERY_ENTRY_DAT;
112
113 typedef struct {
114     T_APIMSG_MSGBUF_HEADER                  hdr;  /* Message header */
115     DEADRECKONING_MSG_DELIVERY_ENTRY_DAT    data; /* Message data */
116 } DEADRECKONING_MSG_DELIVERY_ENTRY;
117
118 /************************************************************************
119 * TAG       : DEADRECKONING_MSG_GET_DR_DATA
120 * ABSTRACT  : Vehicle sensor information acquisition message(->Vehicle sensor)
121 ************************************************************************/
122 typedef struct {
123     DID                       did;                /* Data ID corresponding to vehicle sensor information    */
124     PNO                       pno;                /* Destination PNO                        */
125     u_int16                   offset;             /* Offset to shared memory storage area    */
126     u_int16                   size;               /* Size of shared memory storage area            */
127     u_int8                    reserve[2];
128     EventID                   event_id;           /* Event ID                        */
129 } DEADRECKONING_MSG_GET_DR_DATA_DAT;
130
131 typedef struct {
132     T_APIMSG_MSGBUF_HEADER                  hdr;  /* Message header    */
133     DEADRECKONING_MSG_GET_DR_DATA_DAT       data; /* Message data    */
134 } DEADRECKONING_MSG_GET_DR_DATA;
135
136 /************************************************************************
137 *            Function prototype                                              *
138 ************************************************************************/
139 #ifdef __cplusplus
140 extern "C" {
141 #endif
142
143 #ifdef __cplusplus
144 }
145 #endif
146
147 #endif  // POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_