1 /* 2 * Copyright (C) 2021-2022 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 #ifndef OHOS_RIL_NETWORK_PARCEL_H 17 #define OHOS_RIL_NETWORK_PARCEL_H 18 19 #include "hril_base_parcel.h" 20 21 namespace OHOS { 22 namespace Telephony { 23 struct OperatorInfoResult { 24 std::string longName; 25 std::string shortName; 26 std::string numeric; 27 }; 28 29 struct AvailableNetworkInfo { 30 std::string longName; 31 std::string shortName; 32 std::string numeric; 33 int32_t status; 34 int32_t rat; 35 }; 36 37 struct AvailableNetworkList { 38 int32_t itemNum; 39 std::vector<AvailableNetworkInfo> availableNetworkInfo; 40 int64_t flag; 41 }; 42 43 struct SetNetworkModeInfo { 44 int32_t selectMode; 45 std::string oper; /* Operator information */ 46 int64_t flag; 47 }; 48 49 /* Voice registration status results */ 50 struct CsRegStatusInfo { 51 int32_t notifyType; /* The notifyType,Indicate the content of the notification */ 52 HRilRegStatus regStatus; /* The corresponding valid registration states are NOT_REG_MT_NOT_SEARCHING_OP, 53 * "REG_MT_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, UNKNOWN, REG_ROAMING". */ 54 int32_t lacCode; 55 int32_t cellId; 56 HRilRadioTech radioTechnology; /* Available voice radio technology, RMS defined by radio technology */ 57 int64_t flag; /* flag, Used by search network manager in response */ 58 }; 59 60 struct PsRegStatusResultInfo { 61 int32_t notifyType; /* The notifyType,Indicate the content of the notification */ 62 HRilRegStatus regStatus; /* valid when are is ITE UNKNOWN REG = REG, otherwise it defined in RegStatus */ 63 int32_t lacCode; 64 int32_t cellId; 65 HRilRadioTech radioTechnology; 66 bool isNrAvailable; 67 bool isEnDcAvailable; 68 bool isDcNrRestricted; 69 int64_t flag; /* flag, Used by search network manager in response */ 70 }; 71 72 struct PhysicalChannelConfig { 73 HRilCellConnectionStatus cellConnStatus; 74 HRilRadioTech ratType; 75 int32_t cellBandwidthDownlinkKhz; 76 int32_t cellBandwidthUplinkKhz; 77 int32_t freqRange; 78 int32_t downlinkChannelNum; 79 int32_t uplinkChannelNum; 80 int32_t physicalCellId; 81 int32_t contextIdNum; 82 std::vector<int32_t> contextIds; 83 }; 84 85 struct ChannelConfigInfoList { 86 int32_t itemNum; 87 std::vector<PhysicalChannelConfig> channelConfigInfos; 88 int64_t flag; /* flag, Used by search network manager in response */ 89 }; 90 91 typedef struct { 92 int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */ 93 int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */ 94 int32_t bsic; /* cell sit code 0~63 */ 95 int32_t cellId; 96 int32_t lac; /* Location area code 0~FFFF */ 97 int32_t rxlev; /* <RXLEV> dbm -120~37 */ 98 int32_t rxQuality; /* 0~7 */ 99 int32_t ta; /* 0~63 */ 100 } CellRatGsm; 101 102 typedef struct { 103 int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */ 104 int32_t cellId; 105 int32_t pci; 106 int32_t tac; /* Tracking Area Code 0~FFFF */ 107 int32_t rsrp; /* Reference Signal Received Power -140~-44, dBm */ 108 int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */ 109 int32_t rssi; /* Receiving signal strength in dbm 90~-25 */ 110 } CellRatLte; 111 112 typedef struct { 113 int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */ 114 int32_t psc; /* Primary Scrambling Code. 0~511 */ 115 int32_t cellId; 116 int32_t lac; /* Tracking Area Code 0~FFFF */ 117 int32_t rscp; /* Reference Signal Received Power -140~-44, dBm */ 118 int32_t rxlev; /* Reference Signal Received Quality -19.5~-3 */ 119 int32_t ecno; /* Receiving signal strength in dbm 90~-25 */ 120 int32_t drx; /* Discontinuous reception cycle length. 6~9 */ 121 int32_t ura; /* UTRAN Registration Area Identity. 0~65535 */ 122 } CellRatWcdma; 123 124 typedef struct { 125 int32_t systemId; /* integer type and range is 0-65535 */ 126 int32_t networkId; /* integer type and range is 0-65535 */ 127 int32_t baseId; /* integer type and range is 0-65535 */ 128 int32_t zoneId; /* integer type and range is 0-65535 */ 129 int32_t pilotPn; /* integer type and range is 0-65535 */ 130 int32_t pilotStrength; /* integer type and range is 0-65535 */ 131 int32_t channel; /* integer type and range is 0-65535 */ 132 int32_t longitude; /* integer type and range is -648000 -- 648000, unit: second */ 133 int32_t latitude; /* integer type and range is -648000 -- 648000, unit: second */ 134 } CellRatCdma; 135 136 typedef struct { 137 int32_t arfcn; 138 int32_t syncId; 139 int32_t sc; 140 int32_t cellId; 141 int32_t lac; 142 int32_t rscp; 143 int32_t drx; 144 int32_t rac; 145 int32_t cpid; 146 } CellRatTdscdma; 147 148 typedef struct { 149 int32_t nrArfcn; 150 int32_t pci; 151 int32_t tac; 152 int64_t nci; 153 } CellRatNr; 154 155 struct CurrentCellInfo { 156 int32_t ratType; 157 int32_t mcc; 158 int32_t mnc; 159 160 union { 161 CellRatGsm gsm; 162 CellRatLte lte; 163 CellRatWcdma wcdma; 164 CellRatCdma cdma; 165 CellRatTdscdma tdscdma; 166 CellRatNr nr; 167 } ServiceCellParas; 168 }; 169 170 struct CellListCurrentInfo { 171 int32_t itemNum; 172 std::vector<CurrentCellInfo> cellCurrentInfo; 173 }; 174 175 typedef struct { 176 int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */ 177 int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~1023 */ 178 int32_t bsic; /* cell sit code 0~63 */ 179 int32_t cellId; 180 int32_t lac; /* Location area code 0~FFFF */ 181 int32_t rxlev; /* <RXLEV> dbm -120~37 */ 182 } CellListRatGsm; 183 184 typedef struct { 185 int32_t arfcn; /* Absolute Radio FreListquency Channel Number of the BCCHcarrier 0~1023 */ 186 int32_t pci; 187 int32_t rsrp; /* Reference Signal Received Power -140~-44, dBm */ 188 int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */ 189 int32_t rxlev; /* <RXLEV> dbm -120~37 */ 190 } CellListRatLte; 191 192 typedef struct { 193 int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~16383 */ 194 int32_t psc; /* Primary Scrambling Code. 0~511 */ 195 int32_t rscp; /* Received Signal Code Power in dBm -120~25, dBm */ 196 int32_t ecno; /* The ratio of power per modulation bit to noise spectral density. -25~0 */ 197 } CellListRatWcdma; 198 199 typedef struct { 200 int32_t systemId; /* integer type and range is 0-65535 */ 201 int32_t networkId; /* integer type and range is 0-65535 */ 202 int32_t baseId; /* integer type and range is 0-65535 */ 203 int32_t zoneId; /* integer type and range is 0-65535 */ 204 int32_t pilotPn; /* integer type and range is 0-65535 */ 205 int32_t pilotStrength; /* integer type and range is 0-65535 */ 206 int32_t channel; /* integer type and range is 0-65535 */ 207 int32_t longitude; /* integer type and range is -648000 -- 648000, unit: second */ 208 int32_t latitude; /* integer type and range is -648000 -- 648000, unit: second */ 209 } CellListRatCdma; 210 211 typedef struct { 212 int32_t arfcn; 213 int32_t syncId; 214 int32_t sc; 215 int32_t cellId; 216 int32_t lac; 217 int32_t rscp; 218 int32_t drx; 219 int32_t rac; 220 int32_t cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 221 } CellListRatTdscdma; 222 223 typedef struct { 224 int32_t nrArfcn; 225 int32_t pci; 226 int32_t tac; 227 int64_t nci; 228 } CellListRatNr; 229 230 struct CellNearbyInfo { 231 int32_t ratType; 232 233 union { 234 CellListRatGsm gsm; 235 CellListRatLte lte; 236 CellListRatWcdma wcdma; 237 CellListRatCdma cdma; 238 CellListRatTdscdma tdscdma; 239 CellListRatNr nr; 240 } ServiceCellParas; 241 }; 242 243 struct CellListNearbyInfo { 244 int32_t itemNum; 245 std::vector<CellNearbyInfo> cellNearbyInfo; 246 }; 247 248 struct PreferredNetworkTypeInfo { 249 int32_t preferredNetworkType; 250 int64_t flag; 251 }; 252 } // namespace Telephony 253 } // namespace OHOS 254 #endif // OHOS_RIL_NETWORK_PARCEL_H 255