1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.
*/
package android.hardware.gnss@1.0;
/**
* Interface for passing GNSS configuration info from platform to HAL.
*/
interface IGnssConfiguration {
/**
* Enum which holds the bit masks for SUPL_MODE configuration parameter.
*/
enum SuplMode : uint8_t {
/** Mobile Station Based */
MSB = 0x01,
/** Mobile Station Assisted */
MSA = 0x02
};
/**
* Enum which holds the bit masks for GPS_LOCK configuration parameter.
*/
enum GpsLock : uint8_t {
/** Lock Mobile Originated GPS functionalitues. */
MO = 0x01,
/** Lock Network initiated GPS functionalities. */
NI = 0x02
};
/**
* Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
* configuration parameter). If none of the bits in the enum are set, the default setting is
* Radio Resource Location Protocol(RRLP).
*/
enum LppProfile : uint8_t {
/** Enable LTE Positioning Protocol user plane */
USER_PLANE = 0x01,
/** Enable LTE Positioning Protocol Control plane */
CONTROL_PLANE = 0x02
};
/**
* Enum which holds the bit masks for A_GLONASS_POS_PROTOCOL_SELECT
* configuration parameter.
*/
enum GlonassPosProtocol : uint8_t {
/** Radio Resource Control(RRC) control-plane. */
RRC_CPLANE = 0x01,
/** Radio Resource Location user-plane. */
RRLP_CPLANE = 0x02,
/** LTE Positioning Protocol User plane */
LPP_UPLANE = 0x04
};
/**
* IMPORTANT: GNSS HAL must expect the below methods to be called multiple
* times. They can be called even when GnssLocationProvider is already
* constructed and enabled. GNSS HAL must maintain the existing requests
* for various callbacks regardless the change in configuration data.
*/
/**
* This method enables or disables NI emergency SUPL restrictions.
*
* @param enabled True if the device must only accept NI Emergency SUPL requests when the
* device is truly in emergency mode (e.g. the user has dialed 911, 112,
* etc...)
* False if the device must accept NI Emergency SUPL any time they are
* received
*
* @return success True if operation was successful.
*/
setSuplEs(bool enabled) generates (bool success);
/**
* This method sets the SUPL version requested by Carrier. The GNSS HAL
* must use this version of the SUPL protocol if supported.
*
* @param version SUPL version requested by carrier. This is a bit mask
* with bits 0:7 representing a service indicator field, bits 8:15
* representing the minor version and bits 16:23 representing the
* major version.
*
* @return success True if operation was successful.
*/
setSuplVersion(uint32_t version) generates (bool success);
/**
* This method sets the SUPL mode.
*
* @param mode Bit mask that specifies the SUPL mode which is set with the SuplMode enum.
*
* @return success True if operation was successful.
*/
setSuplMode(bitfield<SuplMode> mode) generates (bool success);
/**
* This setting configures how GPS functionalities should be locked when
* user turns off GPS On setting.
*
* @param lock Bitmask that specifies the GPS functionalities to be be
* locked as per the GpsLock enum.
*
* @return success True if operation was successful.
*/
setGpsLock(bitfield<GpsLock> lock) generates (bool success);
/**
* This method sets the LTE Positioning Profile configuration.
*
* @param lppProfile Bitmask that specifies the LTE Positioning Profile
* configuration to be set as per the LppProfile enum.
*
* @return success True if operation was successful.
*/
setLppProfile(bitfield<LppProfile> lppProfile) generates (bool success);
/**
* This method selects positioning protocol on A-Glonass system.
*
* @param protocol Bitmask that specifies the positioning protocol to be
* set as per GlonassPosProtocol enum.
*
* @return success True if operation was successful.
*/
setGlonassPositioningProtocol(bitfield<GlonassPosProtocol> protocol) generates (bool success);
/**
* This method configures which PDN to use.
*
* @param enable Use emergency PDN if true and regular PDN if false.
* @return success True if operation was successful.
*/
setEmergencySuplPdn(bool enable) generates (bool success);
};
|