common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / vehicleservice / positioning / server / include / Sensor / SensorLog.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
19  *  SensorLog.h
20  * @brief
21  *   Definition for Sensor Logging I/F Liblary
22  */
23 #ifndef POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_
24 #define POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_
25
26 #include <stdint.h>
27 #include <vehicle_service/positioning_base_library.h>
28 #include <vehicle_service/POS_define.h>
29
30 /*---------------------------------------------------------------------------------*
31  * Definition                                                                      *
32  *---------------------------------------------------------------------------------*/
33 /* NAV-SVINFO sizes(chnum=20) */
34 #define SENSLOG_GPS_SIZE_NAVSVINFO 248
35
36 /* Sensor log data type */
37 typedef enum {
38     SENSLOG_DATA_I_UNSPECIFIED = 0,             /* Input:Not specified          */
39
40     SENSLOG_DATA_I_SYS,                         /* Input:Sensor          */
41     SENSLOG_DATA_I_SYS_STS,                     /* Input:External terminal status    */
42     SENSLOG_DATA_I_GPS,                         /* Input:GPS(_CWORD82_/u-blox) */
43     SENSLOG_DATA_I_LOC,                         /* Input:Location information        */
44     SENSLOG_DATA_I_SPEED,                       /* Input:Vehicle speed            */
45     SENSLOG_DATA_I_TIME,                        /* Input:Request to set GPS time */
46     SENSLOG_DATA_I_GPSINF,                      /* Input:GPS information setting request */
47     SENSLOG_DATA_I_GPSRST,                      /* Input:GPS reset request */
48     SENSLOG_DATA_I_GPSSET,                      /* Input:GPS setting request     */
49     SENSLOG_DATA_I_NAVSVINFO,                   /* Input:NAV-SVINFO(u-blox)*/
50     SENSLOG_DATA_I_SYS_ABNORMAL,                /* Input:Sensor(When an error occurs)  */
51     SENSLOG_DATA_I_COUNT                        /* Classified number               */
52 } SENSLOG_DATA_I;
53
54 typedef enum {
55     SENSLOG_DATA_O_UNSPECIFIED = 0,             /* Output:Not specified          */
56
57     SENSLOG_DATA_O_SYS,                         /* Output:Sensor          */
58     SENSLOG_DATA_O_SYS_PKG,                     /* Output:Sensor(PKG)     */
59     SENSLOG_DATA_O_GPS,                         /* Output:GPS(_CWORD82_/u-blox) */
60     SENSLOG_DATA_O_LONLAT_N,                    /* Output:Latitude and longitude(NAVI)  */
61     SENSLOG_DATA_O_LONLAT_G,                    /* Output:Latitude and longitude(GPS)   */
62     SENSLOG_DATA_O_ALT,                         /* Output:Altitude            */
63     SENSLOG_DATA_O_SPEED_N,                     /* Output:Vehicle speed(NAVI)      */
64     SENSLOG_DATA_O_SPEED_P,                     /* Output:Vehicle speed(POS)       */
65     SENSLOG_DATA_O_HEAD_N,                      /* Output:Orientation(NAVI)      */
66     SENSLOG_DATA_O_HEAD_G,                      /* Output:Orientation(GPS)       */
67     SENSLOG_DATA_O_TIME_SETREQ,                 /* Output:GPS time delivery request */
68     SENSLOG_DATA_O_TIME,                        /* Output:GPS time         */
69     SENSLOG_DATA_O_GPSINF,                      /* Output:GPS information         */
70     SENSLOG_DATA_O_TIME_CS,                     /* Output:GPS time(For the ClockService) */
71     SENSLOG_DATA_O_GPSRST,                      /* Output:GPS reset response */
72
73     SENSLOG_DATA_O_COUNT                        /* Classified number               */
74 } SENSLOG_DATA_O;
75
76 /* Send/Receive result */
77 #define SENSLOG_RES_SUCCESS 0                  /* Send/Receive Success */
78 #define SENSLOG_RES_FAIL    1                  /* Send/Receive Abnormality */
79
80 /* Destination name(Internal use) */
81 #define SENSLOG_PNAME_CLOCK      "*Clock"      /* Clock Service */
82 #define SENSLOG_PNAME_COMMUSB    "*CommUSB"    /* CommUSB       */
83
84 #define SENSLOG_ON  1
85 #define SENSLOG_OFF 0
86
87 /*---------------------------------------------------------------------------------*
88  * Typedef declaration                                                             *
89  *---------------------------------------------------------------------------------*/
90
91 /*---------------------------------------------------------------------------------*
92  * Struct declaration                                                              *
93  *---------------------------------------------------------------------------------*/
94
95 /*---------------------------------------------------------------------------------*
96  * Prototype Declaration                                                           *
97  *---------------------------------------------------------------------------------*/
98 /* SensorLog public API */
99 #ifdef __cplusplus
100 extern "C" {
101 #endif
102     void SensLogInitialize(uint8_t *p_mount_path);
103     uint8_t SensLogGetNavSvinfoFlag(void);
104     void SensLogWriteInputData(uint16_t us_data_type, DID ul_did, PNO us_pno, uint8_t *p_data, \
105         uint16_t us_size, uint8_t uc_result, uint8_t u_write_flag, uint8_t u_write_abnormal_flag);
106     void SensLogWriteOutputData(uint16_t us_data_type, DID ul_did, PNO us_pno, uint8_t *p_data, \
107         uint16_t us_size, uint8_t uc_result);
108     void SensLogTerminate(void);
109     void SensLogStore(void);
110 #ifdef __cplusplus
111 }
112 #endif
113
114 #endif  // POSITIONING_SERVER_INCLUDE_SENSOR_SENSORLOG_H_