Wyatt Riley | 4d3c8e2 | 2017-11-07 17:39:29 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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@1.1; |
| 18 | |
| 19 | import @1.0::IGnss; |
| 20 | |
| 21 | import IGnssCallback; |
Wyatt Riley | 50e3327 | 2017-11-07 14:17:20 -0800 | [diff] [blame^] | 22 | import IGnssConfiguration; |
| 23 | import IGnssMeasurement; |
Wyatt Riley | 4d3c8e2 | 2017-11-07 17:39:29 -0800 | [diff] [blame] | 24 | |
| 25 | /** Represents the standard GNSS (Global Navigation Satellite System) interface. */ |
| 26 | interface IGnss extends @1.0::IGnss { |
| 27 | /** |
gomo | f0b0707 | 2017-11-03 00:13:02 -0700 | [diff] [blame] | 28 | * Opens the interface and provides the callback routines to the implementation of this |
| 29 | * interface. |
Wyatt Riley | 4d3c8e2 | 2017-11-07 17:39:29 -0800 | [diff] [blame] | 30 | * |
| 31 | * @param callback Callback interface for IGnss. |
| 32 | * |
| 33 | * @return success Returns true on success. |
| 34 | */ |
| 35 | setCallback_1_1(IGnssCallback callback) generates (bool success); |
gomo | f0b0707 | 2017-11-03 00:13:02 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Sets the GnssPositionMode parameter, its associated recurrence value, |
| 39 | * the time between fixes, requested fix accuracy, time to first fix. |
| 40 | * |
| 41 | * @param mode Parameter must be one of MS_BASED or STANDALONE. It is allowed by the platform |
| 42 | * (and it is recommended) to fallback to MS_BASED if MS_ASSISTED is passed in, and MS_BASED |
| 43 | * is supported. |
| 44 | * @param recurrence GNSS postion recurrence value, either periodic or single. |
| 45 | * @param minIntervalMs Represents the time between fixes in milliseconds. |
| 46 | * @param preferredAccuracyMeters Represents the requested fix accuracy in meters. |
| 47 | * @param preferredTimeMs Represents the requested time to first fix in milliseconds. |
| 48 | * @param lowPowerMode When true, HAL must make strong tradeoffs to substantially restrict power |
| 49 | * use. Specifically, in the case of a several second long minIntervalMs, the GNSS chipset |
| 50 | * must not, on average, run power hungry operations like RF and signal searches for more |
| 51 | * than one second per interval, and must make exactly one call to gnssSvStatusCb(), and |
| 52 | * either zero or one call to GnssLocationCb() at each interval. When false, HAL must |
| 53 | * operate in the nominal mode (similar to V1.0 where this flag wasn't present) and is |
| 54 | * expected to make power and performance tradoffs such as duty-cycling when signal |
| 55 | * conditions are good and more active searches to reacquire GNSS signals when no signals |
| 56 | * are present. |
| 57 | * |
| 58 | * @return success Returns true if successful. |
| 59 | */ |
| 60 | setPositionMode_1_1(GnssPositionMode mode, |
| 61 | GnssPositionRecurrence recurrence, |
| 62 | uint32_t minIntervalMs, |
| 63 | uint32_t preferredAccuracyMeters, |
| 64 | uint32_t preferredTimeMs, |
| 65 | bool lowPowerMode) |
| 66 | generates (bool success); |
| 67 | |
| 68 | /** |
Wyatt Riley | 50e3327 | 2017-11-07 14:17:20 -0800 | [diff] [blame^] | 69 | * This method returns the IGnssConfiguration interface. |
| 70 | * |
| 71 | * @return gnssConfigurationIface Handle to the IGnssConfiguration interface. |
| 72 | */ |
| 73 | getExtensionGnssConfiguration_1_1() generates (IGnssConfiguration gnssConfigurationIface); |
| 74 | |
| 75 | /** |
gomo | f0b0707 | 2017-11-03 00:13:02 -0700 | [diff] [blame] | 76 | * This method returns the IGnssMeasurement interface. |
| 77 | * |
| 78 | * @return gnssMeasurementIface Handle to the IGnssMeasurement interface. |
| 79 | */ |
| 80 | getExtensionGnssMeasurement_1_1() generates (IGnssMeasurement gnssMeasurementIface); |
Wyatt Riley | 4d3c8e2 | 2017-11-07 17:39:29 -0800 | [diff] [blame] | 81 | }; |