• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @addtogroup Ril
18 * @{
19 *
20 * @brief Defines Ril-related APIs.
21 *
22 * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services,
23 * including call, SMS, MMS, network search, and SIM card services.
24 *
25 * @since 4.1
26 * @version 1.2
27 */
28
29package ohos.hdi.ril.v1_2;
30
31import ohos.hdi.ril.v1_1.Types;
32
33/**
34 * @brief Sim matched operator info.
35 */
36struct NcfgOperatorInfo {
37    /**
38     * Operator Name Matched with SIM card
39     */
40    String operName;
41    /**
42     * Operator Key Matched with SIM card
43     */
44    String operKey;
45    /**
46     * Current SIM State
47     */
48    int state;
49    /**
50     * Reserved Field
51     */
52    String reserve;
53};
54
55/**
56 * @brief Defines NR cell's ssb id information.
57 */
58struct SsbIdInfo {
59    /** SSB index. */
60    int ssbId;
61
62    /** Reference Signal Received Power -140~-44, dBm */
63    int rsrp;
64};
65
66/**
67 * @brief Defines NR Neighboring cell's information.
68 */
69struct NeighboringCellSsbInfo {
70    /** Physical cell ID. */
71    int pci;
72
73    /** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
74    int arfcn;
75
76    /** Reference Signal Received Power -140~-44, dBm */
77    int rsrp;
78
79    /** Signal To Interference Plus Noise Ratio. */
80    int sinr;
81
82    /** Neighboring cell ssbId list, always size is 4 */
83    List<struct SsbIdInfo> ssbIdList;
84};
85
86/**
87 * @brief Defines NR cell's information.
88 */
89struct NrCellSsbIds {
90    /** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
91    int arfcn;
92
93    /** Context Identifier. */
94    long cid;
95
96    /** Physical cell ID. */
97    int pic;
98
99    /** Reference Signal Received Power -140~-44, dBm */
100    int rsrp;
101
102    /** Signal To Interference Plus Noise Ratio. */
103    int sinr;
104
105    /** Time advance. */
106    int timeAdvance;
107
108    /** Service cell ssbId list, always size is 8 */
109    List<struct SsbIdInfo> sCellSsbList;
110
111    /** Neighboring cell ssb list count, max size is 4 */
112    int nbCellCount;
113
114    /** Neighboring cell ssb info list, max size is 4 */
115    List<struct NeighboringCellSsbInfo> nbCellSsbList;
116};
117
118/**
119 * @brief Defines the NR cell information.
120 */
121struct CellListRatNr_1_2 {
122    /**
123     * Absolute RF channel number of the BCCH carrier
124     */
125    int nrArfcn;
126
127    /**
128     * Physical cell ID
129     */
130    int pci;
131
132    /**
133     * Type allocation code
134     */
135    int tac;
136
137    /**
138     * NR cell ID
139     */
140    long nci;
141
142    /**
143     * Signal received power, which ranges from -140 to -44
144     */
145    int rsrp;
146
147    /**
148     * Signal received quality, which ranges from -19 to -3
149     */
150    int rsrq;
151};
152
153/**
154 * @brief Defines cell information for different network modes.
155 */
156union ServiceCellParas_1_2 {
157    /**
158     * GSM cell information. For details, see {@link CellListRatGsm}.
159     */
160    struct CellListRatGsm gsm;
161
162    /**
163     * LTE cell information. For details, see {@link CellListRatLte}.
164     */
165    struct CellListRatLte lte;
166
167    /**
168     * WCDMA cell information. For details, see {@link CellListRatWcdma}.
169     */
170    struct CellListRatWcdma wcdma;
171
172    /**
173     * CDMA cell information. For details, see {@link CellListRatCdma}.
174     */
175    struct CellListRatCdma cdma;
176
177    /**
178     * TD-SCDMA cell information. For details, see {@link CellListRatTdscdma}.
179     */
180    struct CellListRatTdscdma tdscdma;
181
182    /**
183     * NR cell information. For details, see {@link CellListRatNr_1_2}.
184     */
185    struct CellListRatNr_1_2 nr;
186};
187
188/**
189 * @brief Defines the neighboring cell information.
190 */
191struct CellNearbyInfo_1_2 {
192    /**
193     * Access technology type:
194     *- 0: unknown
195     *- 1: GSM
196     *- 2: CDMA
197     *- 3: WCDMA
198     *- 4: TD-SCDMA
199     *- 5: LTE
200     *- 6: NR
201     */
202    int ratType;
203
204    /**
205     * Cell information for different network modes
206     */
207    union ServiceCellParas_1_2 serviceCells;
208};
209
210/**
211 * @brief Defines the neighboring cell list.
212 */
213struct CellListNearbyInfo_1_2 {
214    /**
215     * Number
216     */
217    int itemNum;
218
219    /**
220     * Neighboring cell list
221     */
222    List<struct CellNearbyInfo_1_2> cellNearbyInfo;
223};
224
225/**
226 * @brief Defines the NR cellular information.
227 */
228struct CellRatNr_1_2 {
229    /**
230     * Absolute RF channel number of the BCCH carrier
231     */
232    int nrArfcn;
233
234    /**
235     * Physical cell ID
236     */
237    int pci;
238
239    /**
240     * Type allocation code
241     */
242    int tac;
243
244    /**
245     * NR cell ID
246     */
247    long nci;
248
249    /**
250     * Signal received power, which ranges from -140 to -44
251     */
252    int rsrp;
253
254    /**
255     * Signal received quality, which ranges from -19 to -3
256     */
257    int rsrq;
258};
259
260/**
261 * @brief Defines the current cellular data information.
262 */
263union CurrentServiceCellParas_1_2 {
264    /**
265     * GSM cellular information
266     */
267    struct CellRatGsm gsm;
268
269    /**
270     * LTE cellular information
271     */
272    struct CellRatLte lte;
273
274    /**
275     * WCDMA cellular information
276     */
277    struct CellRatWcdma wcdma;
278
279    /**
280     * CDMA cellular information
281     */
282    struct CellRatCdma cdma;
283
284    /**
285     * TD-SCDMA cellular information
286     */
287    struct CellRatTdscdma tdscdma;
288
289    /**
290     * NR cellular information
291     */
292    struct CellRatNr_1_2 nr;
293};
294
295/**
296 * @brief Defines the current cell information.
297 */
298struct CurrentCellInfo_1_2 {
299    /**
300     * Radio access technology type. For details, see {@link RilRadioTech}.
301     */
302    int ratType;
303
304    /**
305     * Mobile country code (MCC)
306     */
307    int mcc;
308
309    /**
310     * Mobile network code (MNC)
311     */
312    int mnc;
313
314    /**
315     * Cell information parameters. For details, see {@link CurrentServiceCellParas_1_2}.
316     */
317    union CurrentServiceCellParas_1_2 serviceCells;
318};
319
320/**
321 * @brief Defines the current cell information list.
322 */
323struct CellListCurrentInfo_1_2 {
324    /**
325     * Number of cells
326     */
327    int itemNum;
328
329    /**
330     * Current cell information
331     */
332    List<struct CurrentCellInfo_1_2> cellCurrentInfo;
333};
334