summaryrefslogtreecommitdiffstats
blob: f2f0b69b377565ee086b95ca8d4f0c48ba1f1894 (plain) (blame)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
/*
 * Copyright (C) 2017 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.radio@1.2;

import @1.0::CdmaSignalStrength;
import @1.0::CardState;
import @1.0::CardStatus;
import @1.0::CellIdentityCdma;
import @1.0::CellIdentityGsm;
import @1.0::CellIdentityLte;
import @1.0::CellIdentityWcdma;
import @1.0::CellInfoTdscdma;
import @1.0::CellInfoType;
import @1.0::EvdoSignalStrength;
import @1.0::GsmSignalStrength;
import @1.0::LteSignalStrength;
import @1.0::RadioConst;
import @1.0::TimeStampType;
import @1.0::WcdmaSignalStrength;
import @1.1::RadioAccessSpecifier;
import @1.0::RadioError;
import @1.1::ScanStatus;
import @1.1::ScanType;

enum RadioConst : @1.0::RadioConst {
    RADIO_ACCESS_SPECIFIER_MAX_SIZE = 8,
};

/**
 * values are in seconds
 */
enum ScanIntervalRange : int32_t {
    MIN = 5,
    MAX = 300,
};

/**
 * value are in seconds
 */
enum MaxSearchTimeRange : int32_t {
    MIN = 60,
    MAX = 3600,
};

/**
 * values are in seconds
 */
enum IncrementalResultsPeriodicityRange : int32_t {
    MIN = 1,
    MAX = 10,
};

enum CellConnectionStatus : int32_t {
    /**
     * Cell is not a serving cell.
     */
    NONE = 0,
    /**
     * UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
     */
    PRIMARY_SERVING,
    /**
     * UE has connection to cell for data (3GPP 36.331, 25.331).
     */
    SECONDARY_SERVING,
};

/**
 * Overwritten from @1.0::IndicationFilter in order to redefine ALL. In the future, this should
 * be extended instead of overwritten.
 */
enum IndicationFilter : int32_t {
    NONE = 0,
    ALL = ~0,
    /**
     * When this bit is set, modem must send the signal strength update through
     * IRadioIndication.currentSignalStrength() when all criteria specified by
     * IRadio.setSignalStrengthReportingCriteria() are met.
     */
    SIGNAL_STRENGTH = 1 << 0,
    /**
     * When this bit is set, modem must invoke IRadioIndication.networkStateChanged() when any field
     * in VoiceRegStateResult or DataRegStateResult changes. When this bit is not set, modem must
     * suppress IRadioIndication.networkStateChanged() when there are only changes from
     * insignificant fields. Modem must invoke IRadioIndication.networkStateChanged() when
     * significant fields are updated regardless of whether this bit is set.
     *
     * The following fields are considered significant: VoiceRegStateResult.regState,
     * VoiceRegStateResult.rat, DataRegStateResult.regState, DataRegStateResult.rat.
     */
    FULL_NETWORK_STATE = 1 << 1,
    /**
     * When this bit is set, modem must send IRadioIndication.dataCallListChanged() whenever any
     * field in ITypes.SetupDataCallResult changes. When this bit is not set, modem must suppress
     * the indication when the only changed field is 'active' (for data dormancy). For all other
     * field changes, the modem must send IRadioIndication.dataCallListChanged() regardless of
     * whether this bit is set.
     */
    DATA_CALL_DORMANCY_CHANGED = 1 << 2,
    /**
     * When this bit is set, modem must send the link capacity update through
     * IRadioIndication.currentLinkCapacityEstimate() when all criteria specified by
     * IRadio.setLinkCapacityReportingCriteria() are met.
     */
    LINK_CAPACITY_ESTIMATE = 1 << 3,
    /**
     * When this bit is set, the modem must send the physical channel configuration update through
     * IRadioIndication.currentPhysicalChannelConfigs() when the configuration has changed. It is
     * recommended that this be reported whenever link capacity or signal strength is reported.
     */
    PHYSICAL_CHANNEL_CONFIG = 1 << 4,
};

struct NetworkScanRequest {
    ScanType type;

    /**
     * Time interval in seconds between periodic scans, only valid when type = PERIODIC
     * Range: ScanIntervalRange:MIN to ScanIntervalRange:MAX
     */
    int32_t interval;

    /**
     * Networks with bands/channels to scan
     * Maximum length of the vector is
     * RadioConst:RADIO_ACCESS_SPECIFIER_MAX_SIZE
     */
    vec<RadioAccessSpecifier> specifiers;

    /**
     * Maximum duration of the periodic search (in seconds).
     * Expected range for the input is [MaxSearchTimeRange:MIN - MaxSearchTimeRange:MAX]
     * If the search lasts maxSearchTime, it must be terminated.
     */
    int32_t maxSearchTime;

    /**
     * Indicates whether the modem must report incremental results of the network scan
     * to the client.
     * FALSE – Incremental results must not be reported.
     * TRUE  – Incremental must be reported.
     */
    bool incrementalResults;

    /**
     * Indicates the periodicity with which the modem must report incremental results to
     * the client (in seconds).
     * Expected range for the input is
     * [IncrementalResultsPeriodicityRange:MIN - IncrementalResultsPeriodicityRange:MAX]
     * This value must be less than or equal to maxSearchTime.
     */
    int32_t incrementalResultsPeriodicity;

    /**
     * Describes the List of PLMN ids (MCC-MNC)
     * If any PLMN of this list is found, search must end at that point and results with all
     * PLMN found until that point should be sent as response.
     * If the list is not sent, search to be completed until end and all PLMNs found to be
     * reported.
     */
    vec<string> mccMncs;
};

struct NetworkScanResult {
    /**
     * The status of the scan.
     */
    ScanStatus status;

    /**
     * The error code of the incremental result.
     */
    RadioError error;

    /**
     * List of network information as CellInfo.
     */
    vec<CellInfo> networkInfos;
};

struct CellIdentityOperatorNames {
    /**
     * Long alpha Operator Name String or Enhanced Operator Name String.
     */
    string alphaLong;

    /**
     * Short alpha Operator Name String or Enhanced Operator Name String
     */
    string alphaShort;
};

struct CellIdentityCdma {
    @1.0::CellIdentityCdma base;
    CellIdentityOperatorNames operatorNames;
};

struct CellIdentityGsm {
    @1.0::CellIdentityGsm base;
    CellIdentityOperatorNames operatorNames;
};

struct CellIdentityLte {
    @1.0::CellIdentityLte base;
    CellIdentityOperatorNames operatorNames;
    /**
     * Cell bandwidth, in kHz.
     */
    int32_t bandwidth;
};

struct CellIdentityWcdma {
    @1.0::CellIdentityWcdma base;
    CellIdentityOperatorNames operatorNames;
};

struct CellInfoGsm {
    CellIdentityGsm cellIdentityGsm;
    GsmSignalStrength signalStrengthGsm;
};

struct CellInfoWcdma {
    CellIdentityWcdma cellIdentityWcdma;
    WcdmaSignalStrength signalStrengthWcdma;
};

struct CellInfoCdma {
    CellIdentityCdma cellIdentityCdma;
    CdmaSignalStrength signalStrengthCdma;
    EvdoSignalStrength signalStrengthEvdo;
};

struct CellInfoLte {
    CellIdentityLte cellIdentityLte;
    LteSignalStrength signalStrengthLte;
};

struct CellInfo {
    /**
     * Cell type for selecting from union CellInfo.
     */
    CellInfoType cellInfoType;
    /**
     * True if this cell is registered false if not registered.
     */
    bool registered;
    /**
     * Type of time stamp represented by timeStamp.
     */
    TimeStampType timeStampType;
    /**
     * Time in nanos as returned by ril_nano_time.
     */
    uint64_t timeStamp;
    /**
     * Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
     * of size 0.
     */
    vec<CellInfoGsm> gsm;
    /**
     * Valid only if type = cdma and size = 1 else must be empty.
     */
    vec<CellInfoCdma> cdma;
    /**
     * Valid only if type = lte and size = 1 else must be empty.
     */
    vec<CellInfoLte> lte;
    /**
     * Valid only if type = wcdma and size = 1 else must be empty.
     */
    vec<CellInfoWcdma> wcdma;
    /**
     * Valid only if type = tdscdma and size = 1 else must be empty.
     */
    vec<CellInfoTdscdma> tdscdma;
    /**
     * Connection status for the cell.
     */
    CellConnectionStatus connectionStatus;
};

struct CardStatus {
    @1.0::CardStatus base;
    uint32_t physicalSlotId;
    /**
     * An Answer To Reset (ATR) is a message output by a Smart Card conforming to ISO/IEC 7816
     * standards, following electrical reset of the card's chip. The ATR conveys information about
     * the communication parameters proposed by the card, and the card's nature and state.
     *
     * This data is applicable only when cardState is CardState:PRESENT.
     */
    string atr;
    /**
     * Integrated Circuit Card IDentifier (ICCID) is Unique Identifier of the SIM CARD. File is
     * located in the SIM card at EFiccid (0x2FE2) as per ETSI 102.221. The ICCID is defined by
     * the ITU-T recommendation E.118 ISO/IEC 7816.
     *
     * This data is applicable only when cardState is CardState:PRESENT.
     */
    string iccid;
};

struct LinkCapacityEstimate {
    /**
     * Estimated downlink capacity in kbps.
     */
    uint32_t downlinkCapacityKbps;
    /**
     * Estimated uplink capacity in kbps.
     */
    uint32_t uplinkCapacityKbps;
};

struct PhysicalChannelConfig {
    /**
     * Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING.
     */
    CellConnectionStatus status;
    /**
     * Cell bandwidth, in kHz.
     */
    int32_t cellBandwidthDownlink;
};

enum AccessNetwork : int32_t {
    /** GSM EDGE Radio Access Network */
    GERAN       = 1,
    /** Universal Terrestrial Radio Access Network */
    UTRAN       = 2,
    /** Evolved Universal Terrestrial Radio Access Network */
    EUTRAN      = 3,
    /** CDMA 2000 network */
    CDMA2000    = 4,
    /** Interworking Wireless LAN */
    IWLAN       = 5
};

enum DataRequestReason : int32_t {
    /**
     * The reason of the data request is normal
     */
    NORMAL    = 0x01,
    /**
     * The reason of the data request is device shutdown
     */
    SHUTDOWN  = 0x02,
    /**
     * The reason of the data request is IWLAN data handover to another transport
     * (e.g. from cellular to wifi or vise versa)
     */
    HANDOVER  = 0x03,
};