1 /*
2 * Copyright (C) 2016 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 */
17 package android.hardware.radio@1.1;
19 import @1.0::CellInfo;
20 import @1.0::RadioError;
22 enum CardPowerState : int32_t {
23 POWER_DOWN,
24 POWER_UP,
25 POWER_UP_PASS_THROUGH,
26 };
28 enum RadioAccessNetworks : int32_t {
29 GERAN = 1, // GSM EDGE Radio Access Network
30 UTRAN = 2, // Universal Terrestrial Radio Access Network
31 EUTRAN = 3, // Evolved Universal Terrestrial Radio Access Network
32 };
34 enum GeranBands : int32_t {
35 BAND_T380 = 1,
36 BAND_T410 = 2,
37 BAND_450 = 3,
38 BAND_480 = 4,
39 BAND_710 = 5,
40 BAND_750 = 6,
41 BAND_T810 = 7,
42 BAND_850 = 8,
43 BAND_P900 = 9,
44 BAND_E900 = 10,
45 BAND_R900 = 11,
46 BAND_DCS1800 = 12,
47 BAND_PCS1900 = 13,
48 BAND_ER900 = 14,
49 };
51 enum UtranBands : int32_t {
52 BAND_1 = 1,
53 BAND_2 = 2,
54 BAND_3 = 3,
55 BAND_4 = 4,
56 BAND_5 = 5,
57 BAND_6 = 6,
58 BAND_7 = 7,
59 BAND_8 = 8,
60 BAND_9 = 9,
61 BAND_10 = 10,
62 BAND_11 = 11,
63 BAND_12 = 12,
64 BAND_13 = 13,
65 BAND_14 = 14,
66 BAND_19 = 19,
67 BAND_20 = 20,
68 BAND_21 = 21,
69 BAND_22 = 22,
70 BAND_25 = 25,
71 BAND_26 = 26,
72 };
74 enum EutranBands : int32_t {
75 BAND_1 = 1,
76 BAND_2 = 2,
77 BAND_3 = 3,
78 BAND_4 = 4,
79 BAND_5 = 5,
80 BAND_6 = 6,
81 BAND_7 = 7,
82 BAND_8 = 8,
83 BAND_9 = 9,
84 BAND_10 = 10,
85 BAND_11 = 11,
86 BAND_12 = 12,
87 BAND_13 = 13,
88 BAND_14 = 14,
89 BAND_17 = 17,
90 BAND_18 = 18,
91 BAND_19 = 19,
92 BAND_20 = 20,
93 BAND_21 = 21,
94 BAND_22 = 22,
95 BAND_23 = 23,
96 BAND_24 = 24,
97 BAND_25 = 25,
98 BAND_26 = 26,
99 BAND_27 = 27,
100 BAND_28 = 28,
101 BAND_30 = 30,
102 BAND_31 = 31,
103 BAND_33 = 33,
104 BAND_34 = 34,
105 BAND_35 = 35,
106 BAND_36 = 36,
107 BAND_37 = 37,
108 BAND_38 = 38,
109 BAND_39 = 39,
110 BAND_40 = 40,
111 BAND_41 = 41,
112 BAND_42 = 42,
113 BAND_43 = 43,
114 BAND_44 = 44,
115 BAND_45 = 45,
116 BAND_46 = 46,
117 BAND_47 = 47,
118 BAND_48 = 48,
119 BAND_65 = 65,
120 BAND_66 = 66,
121 BAND_68 = 68,
122 BAND_70 = 70,
123 };
125 enum ScanType : int32_t {
126 ONE_SHOT = 0, // Performs the scan only once
127 PERIODIC = 1, // Performs the scan periodically until cancelled
128 };
130 enum ScanStatus : int32_t {
131 PARTIAL = 1, // The result contains a part of the scan results
132 COMPLETE = 2, // The result contains the last part of the scan results
133 };
135 struct RadioAccessSpecifier {
136 RadioAccessNetworks radioAccessNetwork; // The type of network to scan
137 vec<GeranBands> geranBands; // Valid only if radioAccessNetwork = GERAN
138 // otherwise must be empty
139 // Maximum length of the vector is 8
140 vec<UtranBands> utranBands; // Valid only if radioAccessNetwork = UTRAN
141 // otherwise must be empty
142 // Maximum length of the vector is 8
143 vec<EutranBands> eutranBands; // Valid only if radioAccessNetwork = EUTRAN
144 // otherwise must be empty
145 // Maximum length of the vector is 8
146 vec<int32_t> channels; // The radio channels to scan as defined in
147 // 3GPP TS 25.101 and 36.101
148 // Maximum length of the vector is 32
149 };
151 struct NetworkScanRequest {
152 ScanType type; // One shot scan or periodic
153 int32_t interval; // Time interval in seconds between periodic scans, only
154 // valid when type = PERIODIC
155 // Range: 5 to 600
156 vec<RadioAccessSpecifier> specifiers; // networks with bands/channels to scan
157 // Maximum length of the vector is 8
158 };
160 struct NetworkScanResult {
161 ScanStatus status; // The status of the scan
162 RadioError error; // The error code of the incremental result
163 vec<CellInfo> networkInfos; // List of network information as CellInfo
164 };