2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 /******************************************************************************
18 @file SensorLocation_API.h
19 @detail SensorLocation_API external header file<BR>
20 SensorLocation_API External public header
21 ******************************************************************************/
22 #ifndef POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_
23 #define POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_
25 /*****************************************************************************
27 *****************************************************************************/
29 /*****************************************************************************
31 *****************************************************************************/
33 #define CID_VEHICLE_SENSORLOCATION_LONLAT (0x0201)
34 /* Vehicle sensor information notification CID (Latitude and longitude information)*/
35 #define CID_VEHICLE_SENSORLOCATION_ALTITUDE (0x0202)
36 /* Vehicle sensor information notification CID (Altitude Information) */
38 /* SENSORLOCATION_RET_API definition */
39 #define SENSORLOCATION_RET_NORMAL (0) /* Successful completion */
40 #define SENSORLOCATION_RET_ERROR_PARAM (-1) /* Parameter error */
41 #define SENSORLOCATION_RET_ERROR_BUFFULL (-2) /* Number of registered FULL */
42 #define SENSORLOCATION_RET_ERROR_INNER (-3) /* Internal error */
44 /* Delivery opportunity definition */
45 #define SENSORLOCATION_DELIVERY_TIMING_CHANGE (0) /* Change */
46 #define SENSORLOCATION_DELIVERY_TIMING_UPDATE (1) /* UpDate */
48 /* Presence information definitions DR */
49 #define SENSORLOCATION_EXISTDR_NODR (0) /* Without DR */
50 #define SENSORLOCATION_EXISTDR_DR (1) /* There DR */
52 /* DR state definition */
53 #define SENSORLOCATION_DRSTATUS_INVALID (0) /* Invalid */
54 #define SENSORLOCATION_DRSTATUS_GPS_NODR (1) /* Information use GPS, not yet implemented DR */
55 #define SENSORLOCATION_DRSTATUS_NOGPS_DR (2) /* No information available GPS, DR implementation */
56 #define SENSORLOCATION_DRSTATUS_GPS_DR (3) /* Information use GPS, DR implementation */
58 /* LONLAT initial value definition */
59 #define SENSORLOCATION_LATITUDE_INIT_VALUE 0x7FFFFFFFL /* initial value */
60 #define SENSORLOCATION_LONGITUDE_INIT_VALUE 0x7FFFFFFFL /* initial value */
62 /*****************************************************************************
64 *****************************************************************************/
65 typedef int32 SENSORLOCATION_RET_API;
67 /*****************************************************************************
69 *****************************************************************************/
70 /*****************************************************************************
71 * TAG : SENSORLOCATION_LONLATINFO_DAT
72 * ABSTRACT : Latitude and longitude information data structure
74 *****************************************************************************/
76 u_int16 size; /* Size */
77 u_int8 sensor_cnt; /* Sensor counter value */
78 u_int8 is_exist_dr; /* Presence or absence information DR */
79 u_int8 dr_status; /* DR state */
80 u_int8 reserve[3]; /* Reserve */
81 int32 longitude; /* Longitude */
82 int32 latitude; /* Latitude */
83 } SENSORLOCATION_MSG_LONLATINFO_DAT;
85 /*****************************************************************************
86 * TAG : SENSORLOCATION_ALTITUDEINFO_DAT
87 * ABSTRACT : Altitude information data structure
89 *****************************************************************************/
91 u_int16 size; /* Size */
92 u_int8 sensor_cnt; /* Sensor counter value */
93 u_int8 is_exist_dr; /* Presence or absence information DR */
94 u_int8 dr_status; /* DR state */
95 u_int8 reserve[3]; /* Reserve */
96 int32 altitude; /* Altitude(0.01m) */
97 } SENSORLOCATION_MSG_ALTITUDEINFO_DAT;
99 /*****************************************************************************
101 * ABSTRACT : Latitude and Longitude data structure
103 *****************************************************************************/
105 int32 latitude; /* Latitude */
106 int32 longitude; /* Longitude */
109 /*****************************************************************************
110 * Function prototypes *
111 *****************************************************************************/
115 extern SENSORLOCATION_RET_API SensorLocationRegisterListenerLonLat(PNO pno, u_int8 delivery_timing);
116 extern SENSORLOCATION_RET_API SensorLocationRegisterListenerAltitude(PNO pno, u_int8 delivery_timing);
117 extern SENSORLOCATION_RET_API SensorLocationGetLonLat(SENSORLOCATION_MSG_LONLATINFO_DAT *dat);
118 extern SENSORLOCATION_RET_API SensorLocationGetAltitude(SENSORLOCATION_MSG_ALTITUDEINFO_DAT *dat);
119 extern SENSORLOCATION_RET_API SensorLocationGetLonLatOnShutdown(LONLAT *lonlat);
124 #endif // POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_