Yu-Han Yang | 6999a0f | 2019-03-14 11:08:43 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 The Android Open Source Project |
| 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 | package android.hardware.gnss@2.0; |
| 18 | |
| 19 | import @1.0::IGnssDebug; |
| 20 | |
| 21 | /** Extended interface for DEBUG support. */ |
| 22 | interface IGnssDebug extends @1.0::IGnssDebug { |
| 23 | |
| 24 | /** Extending SatelliteData, replacing the GnssConstellationType. */ |
| 25 | struct SatelliteData { |
| 26 | /** |
| 27 | * GNSS Satellite info. |
| 28 | * |
| 29 | * In this version of the HAL, the field 'constellation' in the v1_0 struct is deprecated, |
| 30 | * and is no longer used by the framework. The constellation type is instead reported in |
| 31 | * @2.0::IGnssDebug.SatelliteData.constellation. |
| 32 | */ |
| 33 | @1.0::IGnssDebug.SatelliteData v1_0; |
| 34 | |
| 35 | /** Defines the constellation type of the given SV. */ |
| 36 | GnssConstellationType constellation; |
| 37 | }; |
| 38 | |
| 39 | /** |
| 40 | * Provides a set of debug information that is filled by the GNSS chipset when the method |
| 41 | * getDebugData() is invoked. |
| 42 | */ |
| 43 | struct DebugData { |
| 44 | /** Current best known position. */ |
| 45 | @1.0::IGnssDebug.PositionDebug position; |
| 46 | |
| 47 | /** Current best know time estimate. */ |
| 48 | @1.0::IGnssDebug.TimeDebug time; |
| 49 | |
| 50 | /** |
| 51 | * Provides a list of the available satellite data, for all |
| 52 | * satellites and constellations the device can track, |
| 53 | * including GnssConstellationType UNKNOWN. |
| 54 | */ |
| 55 | vec<SatelliteData> satelliteDataArray; |
| 56 | }; |
| 57 | |
| 58 | /** |
| 59 | * This methods requests position, time and satellite ephemeris debug information from the HAL. |
| 60 | * |
| 61 | * @return ret debugData information from GNSS Hal that contains the current best known |
| 62 | * position, best known time estimate and a complete list of constellations that the device can |
| 63 | * track. |
| 64 | */ |
| 65 | getDebugData_2_0() generates (DebugData debugData); |
| 66 | }; |