blob: e0ad3575f02feb8ccc660fa7ec779daabb0525c0 [file] [log] [blame]
Yu-Han Yang1e1a6762020-09-30 17:01:53 -07001/*
2 * Copyright (C) 2020 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;
18
19import android.hardware.gnss.BlocklistedSource;
20
21/**
22 * Extended interface for GNSS Configuration support.
23 */
24@VintfStability
25interface IGnssConfiguration {
26
27 /** SUPL mode bitmask for Mobile Station Based. */
28 const int SUPL_MODE_MSB = 0x01;
29
30 /** SUPL mode bitmask for Mobile Station Assisted. */
31 const int SUPL_MODE_MSA = 0x02;
32
33 /** LPP profile settings bitmask for enabling LTE Positioning Protocol User Plane. */
34 const int LPP_PROFILE_USER_PLANE = 0x01;
35
36 /** LPP profile settings bitmask for enabling LTE Positioning Protocol Control Plane. */
37 const int LPP_PROFILE_CONTROL_PLANE = 0x02;
38
39 /** A-Glonass positioning protocol bitmask for Radio Resource Control (RRC) Control Plane. */
40 const int GLONASS_POS_PROTOCOL_RRC_CPLANE = 0x01;
41
42 /** A-Glonass positioning protocol bitmask for Radio Resource Location User Plane. */
43 const int GLONASS_POS_PROTOCOL_RRLP_UPLANE = 0x02;
44
45 /** A-Glonass positioning protocol bitmask for LTE Positioning Protocol User Plane. */
46 const int GLONASS_POS_PROTOCOL_LPP_UPLANE = 0x04;
47
48 /**
49 * This method sets the SUPL version requested by Carrier. The GNSS HAL must use this version
50 * of the SUPL protocol if supported.
51 *
52 * @param version SUPL version requested by carrier. This is a bit mask with bits 0:7
53 * representing a service indicator field, bits 8:15 representing the minor version and bits
54 * 16:23 representing the major version.
55 */
56 void setSuplVersion(in int version);
57
58 /**
59 * This method sets the SUPL mode.
60 *
61 * @param mode Bitmask that specifies the SUPL mode which is set with the SUPL_MODE_* constants.
62 */
63 void setSuplMode(in int mode);
64
65 /**
66 * This method sets the LTE Positioning Profile configuration.
67 *
68 * @param lppProfile Bitmask that specifies the LTE Positioning Profile configuration to be set
69 * as per the LPP_PROFILE_* constants. If none of the bits are set, the default setting is
70 * Radio Resource Location Protocol (RRLP).
71 */
72 void setLppProfile(in int lppProfile);
73
74 /**
75 * This method selects positioning protocol on A-Glonass system.
76 *
77 * @param protocol Bitmask that specifies the positioning protocol to be set as per
78 * GLONASS_POS_PROTOCOL_* constants.
79 */
80 void setGlonassPositioningProtocol(in int protocol);
81
82 /**
83 * This method configures which PDN to use.
84 *
85 * @param enable Use emergency PDN if true and regular PDN if false.
86 */
87 void setEmergencySuplPdn(in boolean enable);
88
89 /**
90 * This method sets the emergency session extension duration. The GNSS HAL
91 * implementation must serve emergency SUPL and Control Plane network initiated
92 * location requests for this extra duration after the user initiated emergency
93 * session ends.
94 *
95 * @param emergencyExtensionSeconds Number of seconds to extend the emergency
96 * session duration post emergency call.
97 */
98 void setEsExtensionSec(in int emergencyExtensionSeconds);
99
100 /**
101 * Injects a vector of BlocklistedSource(s) which the HAL must not use to calculate the
102 * GNSS location output.
103 *
104 * The superset of all satellite sources provided, including wildcards, in the latest call
105 * to this method, is the set of satellites sources that must not be used in calculating
106 * location.
107 *
108 * All measurements from the specified satellites, across frequency bands, are blocklisted
109 * together.
110 *
111 * If this method is never called after the IGnssConfiguration.hal connection is made on boot,
112 * or is called with an empty vector, then no satellites are to be blocklisted as a result of
113 * this API.
114 *
115 * This blocklist must be considered as an additional source of which satellites
116 * should not be trusted for location on top of existing sources of similar information
117 * such as satellite broadcast health being unhealthy and measurement outlier removal.
118 *
119 * @param blocklist The BlocklistedSource(s) of satellites the HAL must not use.
120 */
121 void setBlocklist(in BlocklistedSource[] blocklist);
122}