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