diff options
author | Riku Nomoto <riku_nomoto@mail.toyota.co.jp> | 2020-11-19 12:45:32 +0900 |
---|---|---|
committer | Riku Nomoto <riku_nomoto@mail.toyota.co.jp> | 2020-11-19 12:45:32 +0900 |
commit | 8e0e00d21146a84c18f9cf9409e187b4fb0248aa (patch) | |
tree | ef791689dad216ac61091a1d1bd3b928d563aba6 /vehicleservice/positioning/client/include/SensorLocation_API.h | |
parent | 18df6e21c6743a137e2760c52ca89d0789e90417 (diff) |
Init basesystem source codes.
Signed-off-by: Riku Nomoto <riku_nomoto@mail.toyota.co.jp>
Change-Id: I55aa2f1406ce7f751ae14140b613b53b68995528
Diffstat (limited to 'vehicleservice/positioning/client/include/SensorLocation_API.h')
-rwxr-xr-x | vehicleservice/positioning/client/include/SensorLocation_API.h | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/vehicleservice/positioning/client/include/SensorLocation_API.h b/vehicleservice/positioning/client/include/SensorLocation_API.h new file mode 100755 index 0000000..ae7f20a --- /dev/null +++ b/vehicleservice/positioning/client/include/SensorLocation_API.h @@ -0,0 +1,124 @@ +/* + * @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. + */ + +/****************************************************************************** +@file SensorLocation_API.h +@detail SensorLocation_API external header file<BR> + SensorLocation_API External public header +******************************************************************************/ +#ifndef POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_ +#define POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_ + +/***************************************************************************** + * Include * + *****************************************************************************/ + +/***************************************************************************** + * Define * + *****************************************************************************/ +/* Command ID */ +#define CID_VEHICLE_SENSORLOCATION_LONLAT (0x0201) +/* Vehicle sensor information notification CID (Latitude and longitude information)*/ +#define CID_VEHICLE_SENSORLOCATION_ALTITUDE (0x0202) +/* Vehicle sensor information notification CID (Altitude Information) */ + +/* SENSORLOCATION_RET_API definition */ +#define SENSORLOCATION_RET_NORMAL (0) /* Successful completion */ +#define SENSORLOCATION_RET_ERROR_PARAM (-1) /* Parameter error */ +#define SENSORLOCATION_RET_ERROR_BUFFULL (-2) /* Number of registered FULL */ +#define SENSORLOCATION_RET_ERROR_INNER (-3) /* Internal error */ + +/* Delivery opportunity definition */ +#define SENSORLOCATION_DELIVERY_TIMING_CHANGE (0) /* Change */ +#define SENSORLOCATION_DELIVERY_TIMING_UPDATE (1) /* UpDate */ + +/* Presence information definitions DR */ +#define SENSORLOCATION_EXISTDR_NODR (0) /* Without DR */ +#define SENSORLOCATION_EXISTDR_DR (1) /* There DR */ + +/* DR state definition */ +#define SENSORLOCATION_DRSTATUS_INVALID (0) /* Invalid */ +#define SENSORLOCATION_DRSTATUS_GPS_NODR (1) /* Information use GPS, not yet implemented DR */ +#define SENSORLOCATION_DRSTATUS_NOGPS_DR (2) /* No information available GPS, DR implementation */ +#define SENSORLOCATION_DRSTATUS_GPS_DR (3) /* Information use GPS, DR implementation */ + +/* LONLAT initial value definition */ +#define SENSORLOCATION_LATITUDE_INIT_VALUE 0x7FFFFFFFL /* initial value */ +#define SENSORLOCATION_LONGITUDE_INIT_VALUE 0x7FFFFFFFL /* initial value */ + +/***************************************************************************** + * Typedef * + *****************************************************************************/ +typedef int32 SENSORLOCATION_RET_API; + +/***************************************************************************** + * Struct * + *****************************************************************************/ +/***************************************************************************** + * TAG : SENSORLOCATION_LONLATINFO_DAT + * ABSTRACT : Latitude and longitude information data structure + * NOTE : + *****************************************************************************/ +typedef struct { + u_int16 size; /* Size */ + u_int8 sensor_cnt; /* Sensor counter value */ + u_int8 is_exist_dr; /* Presence or absence information DR */ + u_int8 dr_status; /* DR state */ + u_int8 reserve[3]; /* Reserve */ + int32 longitude; /* Longitude */ + int32 latitude; /* Latitude */ +} SENSORLOCATION_MSG_LONLATINFO_DAT; + +/***************************************************************************** + * TAG : SENSORLOCATION_ALTITUDEINFO_DAT + * ABSTRACT : Altitude information data structure + * NOTE : + *****************************************************************************/ +typedef struct { + u_int16 size; /* Size */ + u_int8 sensor_cnt; /* Sensor counter value */ + u_int8 is_exist_dr; /* Presence or absence information DR */ + u_int8 dr_status; /* DR state */ + u_int8 reserve[3]; /* Reserve */ + int32 altitude; /* Altitude(0.01m) */ +} SENSORLOCATION_MSG_ALTITUDEINFO_DAT; + +/***************************************************************************** + * TAG : LONLAT + * ABSTRACT : Latitude and Longitude data structure + * NOTE : + *****************************************************************************/ +typedef struct { + int32 latitude; /* Latitude */ + int32 longitude; /* Longitude */ +} LONLAT; + +/***************************************************************************** +* Function prototypes * +*****************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif +extern SENSORLOCATION_RET_API SensorLocationRegisterListenerLonLat(PNO pno, u_int8 delivery_timing); +extern SENSORLOCATION_RET_API SensorLocationRegisterListenerAltitude(PNO pno, u_int8 delivery_timing); +extern SENSORLOCATION_RET_API SensorLocationGetLonLat(SENSORLOCATION_MSG_LONLATINFO_DAT *dat); +extern SENSORLOCATION_RET_API SensorLocationGetAltitude(SENSORLOCATION_MSG_ALTITUDEINFO_DAT *dat); +extern SENSORLOCATION_RET_API SensorLocationGetLonLatOnShutdown(LONLAT *lonlat); +#ifdef __cplusplus +} +#endif + +#endif // POSITIONING_CLIENT_INCLUDE_SENSORLOCATION_API_H_ |