1/* 2 * Copyright (C) 2022-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#include "ril_callback_test.h" 17 18#include "telephony_log_wrapper.h" 19 20namespace OHOS { 21namespace Telephony { 22using namespace OHOS::HDI::Ril::V1_3; 23using namespace std; 24 25enum class RatType { 26 NETWORK_TYPE_UNKNOWN = 0, 27 NETWORK_TYPE_GSM, 28 NETWORK_TYPE_CDMA, 29 NETWORK_TYPE_WCDMA, 30 NETWORK_TYPE_TDSCDMA, 31 NETWORK_TYPE_LTE, 32 NETWORK_TYPE_NR 33}; 34 35void RilCallbackTest::PrintResponseInfo(const std::string &method, const RilRadioResponseInfo &responseInfo) 36{ 37 cout << "-------------" << method << "-------------" << endl 38 << "[responseInfo] ----> [slotId]: " << responseInfo.slotId << " ----> [serial]: " << responseInfo.serial 39 << " ----> [error]: " << static_cast<int>(responseInfo.error) << endl; 40} 41 42// SIM 43int32_t RilCallbackTest::SimStateUpdated(const RilRadioResponseInfo &responseInfo) 44{ 45 PrintResponseInfo("SimStateUpdated", responseInfo); 46 return 0; 47} 48 49int32_t RilCallbackTest::SimStkSessionEndNotify(const RilRadioResponseInfo &responseInfo) 50{ 51 PrintResponseInfo("SimStkSessionEndNotify", responseInfo); 52 return 0; 53} 54 55int32_t RilCallbackTest::SimStkProactiveNotify(const RilRadioResponseInfo &responseInfo, const std::string &response) 56{ 57 PrintResponseInfo("SimStkProactiveNotify", responseInfo); 58 cout << "[response]: " << response; 59 cout << endl << endl; 60 return 0; 61} 62 63int32_t RilCallbackTest::SimStkAlphaNotify(const RilRadioResponseInfo &responseInfo, const std::string &response) 64{ 65 PrintResponseInfo("SimStkAlphaNotify", responseInfo); 66 cout << "[response]: " << response; 67 cout << endl << endl; 68 return 0; 69} 70 71int32_t RilCallbackTest::SimStkEventNotify(const RilRadioResponseInfo &responseInfo, const std::string &response) 72{ 73 PrintResponseInfo("SimStkEventNotify", responseInfo); 74 cout << "[response]: " << response; 75 cout << endl << endl; 76 return 0; 77} 78 79int32_t RilCallbackTest::SimStkCallSetupNotify(const RilRadioResponseInfo &responseInfo) 80{ 81 PrintResponseInfo("SimStkCallSetupNotify", responseInfo); 82 return 0; 83} 84 85int32_t RilCallbackTest::SimRefreshNotify(const RilRadioResponseInfo &responseInfo) 86{ 87 PrintResponseInfo("SimRefreshNotify", responseInfo); 88 return 0; 89} 90 91int32_t RilCallbackTest::GetSimStatusResponse(const RilRadioResponseInfo &responseInfo, const CardStatusInfo &result) 92{ 93 PrintResponseInfo("GetSimStatusResponse", responseInfo); 94 cout << "[CardStatusInfo] -->[index] : " << result.index << " -->[simType] : " << result.simType 95 << " -->[simState] : " << result.simState; 96 cout << endl << endl; 97 return 0; 98} 99 100int32_t RilCallbackTest::GetSimCardStatusResponse(const RilRadioResponseInfo &responseInfo, 101 const SimCardStatusInfo &result) 102{ 103 PrintResponseInfo("GetSimCardStatusResponse", responseInfo); 104 cout << "[SimCardStatusInfo] -->[index] : " << result.index << " -->[simType] : " << result.simType 105 << " -->[simState] : " << result.simState; 106 cout << endl << endl; 107 return 0; 108} 109 110int32_t RilCallbackTest::GetSimIOResponse(const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result) 111{ 112 PrintResponseInfo("GetSimIOResponse", responseInfo); 113 cout << "[IccIoResultInfo] -->[sw1] : " << result.sw1 << " -->[sw2] : " << result.sw2 114 << " -->[response] : " << result.response; 115 cout << endl << endl; 116 return 0; 117} 118 119int32_t RilCallbackTest::GetImsiResponse(const RilRadioResponseInfo &responseInfo, const std::string &response) 120{ 121 PrintResponseInfo("GetImsiResponse", responseInfo); 122 cout << "[response]: " << response; 123 cout << endl << endl; 124 return 0; 125} 126 127int32_t RilCallbackTest::GetSimLockStatusResponse(const RilRadioResponseInfo &responseInfo, int32_t simLockStatus) 128{ 129 PrintResponseInfo("GetSimLockStatusResponse", responseInfo); 130 cout << "[simLockStatus]: " << simLockStatus; 131 cout << endl << endl; 132 return 0; 133} 134 135int32_t RilCallbackTest::SetSimLockResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 136{ 137 PrintResponseInfo("SetSimLockResponse", responseInfo); 138 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 139 cout << endl << endl; 140 return 0; 141} 142 143int32_t RilCallbackTest::ChangeSimPasswordResponse( 144 const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 145{ 146 PrintResponseInfo("ChangeSimPasswordResponse", responseInfo); 147 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 148 cout << endl << endl; 149 return 0; 150} 151 152int32_t RilCallbackTest::UnlockPinResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 153{ 154 PrintResponseInfo("UnlockPinResponse", responseInfo); 155 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 156 cout << endl << endl; 157 return 0; 158} 159 160int32_t RilCallbackTest::UnlockPukResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 161{ 162 PrintResponseInfo("UnlockPukResponse", responseInfo); 163 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 164 cout << endl << endl; 165 return 0; 166} 167 168int32_t RilCallbackTest::UnlockPin2Response(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 169{ 170 PrintResponseInfo("UnlockPin2Response", responseInfo); 171 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 172 cout << endl << endl; 173 return 0; 174} 175 176int32_t RilCallbackTest::UnlockPuk2Response(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 177{ 178 PrintResponseInfo("UnlockPuk2Response", responseInfo); 179 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 180 cout << endl << endl; 181 return 0; 182} 183 184int32_t RilCallbackTest::SetActiveSimResponse(const RilRadioResponseInfo &responseInfo) 185{ 186 PrintResponseInfo("SetActiveSimResponse", responseInfo); 187 return 0; 188} 189 190int32_t RilCallbackTest::SimStkSendTerminalResponseResponse(const RilRadioResponseInfo &responseInfo) 191{ 192 PrintResponseInfo("SimStkSendTerminalResponseResponse", responseInfo); 193 return 0; 194} 195 196int32_t RilCallbackTest::SimStkSendEnvelopeResponse(const RilRadioResponseInfo &responseInfo) 197{ 198 PrintResponseInfo("SimStkSendEnvelopeResponse", responseInfo); 199 return 0; 200} 201 202int32_t RilCallbackTest::SimStkSendCallSetupRequestResultResponse(const RilRadioResponseInfo &responseInfo) 203{ 204 PrintResponseInfo("SimStkSendCallSetupRequestResultResponse", responseInfo); 205 return 0; 206} 207 208int32_t RilCallbackTest::SimStkIsReadyResponse(const RilRadioResponseInfo &responseInfo) 209{ 210 PrintResponseInfo("SimStkIsReadyResponse", responseInfo); 211 return 0; 212} 213 214int32_t RilCallbackTest::SetRadioProtocolResponse( 215 const RilRadioResponseInfo &responseInfo, const RadioProtocol &radioProtocol) 216{ 217 PrintResponseInfo("SetRadioProtocolResponse", responseInfo); 218 cout << "[RadioProtocol] -->[slotId] : " << radioProtocol.slotId << " -->[sessionId] : " << radioProtocol.sessionId 219 << " -->[phase] : " << radioProtocol.phase << " -->[technology] : " << radioProtocol.technology 220 << " -->[modemId] : " << radioProtocol.modemId << " -->[status] : " << radioProtocol.status; 221 cout << endl << endl; 222 return 0; 223} 224 225int32_t RilCallbackTest::SimOpenLogicalChannelResponse( 226 const RilRadioResponseInfo &responseInfo, const OpenLogicalChannelResponse &pOpenLogicalChannelResponse) 227{ 228 PrintResponseInfo("SimOpenLogicalChannelResponse", responseInfo); 229 cout << "[OpenLogicalChannelResponse] -->[sw1] : " << pOpenLogicalChannelResponse.sw1 230 << " -->[sw2] : " << pOpenLogicalChannelResponse.sw2 231 << " -->[channelId] : " << pOpenLogicalChannelResponse.channelId 232 << " -->[response] : " << pOpenLogicalChannelResponse.response; 233 cout << endl << endl; 234 return 0; 235} 236 237int32_t RilCallbackTest::SimCloseLogicalChannelResponse(const RilRadioResponseInfo &responseInfo) 238{ 239 PrintResponseInfo("SimCloseLogicalChannelResponse", responseInfo); 240 return 0; 241} 242 243int32_t RilCallbackTest::SimTransmitApduLogicalChannelResponse( 244 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result) 245{ 246 PrintResponseInfo("SimTransmitApduLogicalChannelResponse", responseInfo); 247 cout << "[IccIoResultInfo] -->[sw1] : " << result.sw1 << " -->[sw2] : " << result.sw2 248 << " -->[channelId] : " << result.response; 249 cout << endl << endl; 250 return 0; 251} 252 253int32_t RilCallbackTest::SimTransmitApduBasicChannelResponse( 254 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result) 255{ 256 PrintResponseInfo("SimTransmitApduBasicChannelResponse", responseInfo); 257 cout << "[IccIoResultInfo] -->[sw1] : " << result.sw1 << " -->[sw2] : " << result.sw2 258 << " -->[channelId] : " << result.response; 259 cout << endl << endl; 260 return 0; 261} 262 263int32_t RilCallbackTest::SimAuthenticationResponse( 264 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result) 265{ 266 PrintResponseInfo("SimAuthenticationResponse", responseInfo); 267 cout << "[IccIoResultInfo] -->[sw1] : " << result.sw1 << " -->[sw2] : " << result.sw2 268 << " -->[channelId] : " << result.response; 269 cout << endl << endl; 270 return 0; 271} 272 273int32_t RilCallbackTest::UnlockSimLockResponse( 274 const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus) 275{ 276 PrintResponseInfo("UnlockPuk2Response", responseInfo); 277 cout << "[LockStatusResp] -->[result] : " << lockStatus.result << " -->[remain] : " << lockStatus.remain; 278 cout << endl << endl; 279 return 0; 280} 281 282int32_t RilCallbackTest::SendSimMatchedOperatorInfoResponse(const RilRadioResponseInfo &responseInfo) 283{ 284 PrintResponseInfo("SendSimMatchedOperatorInfoResponse", responseInfo); 285 return 0; 286} 287 288// NetworkSearch 289int32_t RilCallbackTest::NetworkCsRegStatusUpdated( 290 const RilRadioResponseInfo &responseInfo, const CsRegStatusInfo &csRegStatusInfo) 291{ 292 PrintResponseInfo("NetworkCsRegStatusUpdated", responseInfo); 293 cout << "[csRegStatusInfo] -->[notifyType] : " << csRegStatusInfo.notifyType << endl; 294 cout << "[csRegStatusInfo] -->[regStatus] : " << csRegStatusInfo.regStatus << endl; 295 cout << "[csRegStatusInfo] -->[radioTechnology] : " << csRegStatusInfo.radioTechnology << endl; 296 cout << "[csRegStatusInfo] -->[flag] : " << csRegStatusInfo.flag << endl; 297 cout << "NetworkCsRegStatusUpdated finish." << endl; 298 299 return 0; 300} 301 302int32_t RilCallbackTest::NetworkPsRegStatusUpdated( 303 const RilRadioResponseInfo &responseInfo, const PsRegStatusInfo &psRegStatusInfo) 304{ 305 PrintResponseInfo("NetworkPsRegStatusUpdated", responseInfo); 306 cout << "[psRegStatusInfo] -->[notifyType] : " << psRegStatusInfo.notifyType << endl; 307 cout << "[psRegStatusInfo] -->[regStatus] : " << psRegStatusInfo.regStatus << endl; 308 cout << "[psRegStatusInfo] -->[radioTechnology] : " << psRegStatusInfo.radioTechnology << endl; 309 cout << "[psRegStatusInfo] -->[isDcNrRestricted] : " << psRegStatusInfo.isDcNrRestricted << endl; 310 cout << "[psRegStatusInfo] -->[isNrAvailable] : " << psRegStatusInfo.isNrAvailable << endl; 311 cout << "[psRegStatusInfo] -->[isEnDcAvailable] : " << psRegStatusInfo.isEnDcAvailable << endl; 312 cout << "NetworkPsRegStatusUpdated finish." << endl; 313 314 return 0; 315} 316 317int32_t RilCallbackTest::SignalStrengthUpdated(const RilRadioResponseInfo &responseInfo, const Rssi &rssi) 318{ 319 PrintResponseInfo("SignalStrengthUpdated", responseInfo); 320 cout << "[rssi] -->[lte] -->[rxlev] : " << rssi.lte.rxlev << endl; 321 cout << "[rssi] -->[lte] -->[rsrq] : " << rssi.lte.rsrq << endl; 322 cout << "[rssi] -->[lte] -->[rsrp] : " << rssi.lte.rsrp << endl; 323 cout << "[rssi] -->[lte] -->[snr] : " << rssi.lte.snr << endl; 324 cout << "SignalStrengthUpdated finish." << endl; 325 326 return 0; 327} 328 329int32_t RilCallbackTest::NetworkTimeZoneUpdated( 330 const RilRadioResponseInfo &responseInfo, const std::string &timeZoneStr) 331{ 332 PrintResponseInfo("NetworkTimeZoneUpdated", responseInfo); 333 cout << "NetworkTimeZoneUpdated timeZoneStr : " << timeZoneStr << endl; 334 cout << "NetworkTimeZoneUpdated finish." << endl; 335 336 return 0; 337} 338 339int32_t RilCallbackTest::NetworkTimeUpdated(const RilRadioResponseInfo &responseInfo, const std::string &timeStr) 340{ 341 PrintResponseInfo("NetworkTimeUpdated", responseInfo); 342 cout << "NetworkTimeUpdated timeStr : " << timeStr << endl; 343 cout << "NetworkTimeUpdated finish." << endl; 344 345 return 0; 346} 347 348int32_t RilCallbackTest::NetworkPhyChnlCfgUpdated( 349 const RilRadioResponseInfo &responseInfo, const ChannelConfigInfoList &channelConfigInfoList) 350{ 351 PrintResponseInfo("NetworkPhyChnlCfgUpdated", responseInfo); 352 353 cout << "[channelConfigInfoList] -->[itemNum] : " << channelConfigInfoList.itemNum << endl; 354 cout << "[channelConfigInfoList] -->[flag] : " << channelConfigInfoList.flag << endl; 355 356 for (auto phyChnlCfg : channelConfigInfoList.channelConfigInfos) { 357 cout << "[phyChnlCfg] -->[cellConnStatus] : " << phyChnlCfg.cellConnStatus << endl; 358 cout << "[phyChnlCfg] -->[ratType] : " << phyChnlCfg.ratType << endl; 359 cout << "[phyChnlCfg] -->[cellBandwidthDownlinkKhz] : " << phyChnlCfg.cellBandwidthDownlinkKhz << endl; 360 cout << "[phyChnlCfg] -->[cellBandwidthUplinkKhz] : " << phyChnlCfg.cellBandwidthUplinkKhz << endl; 361 cout << "[phyChnlCfg] -->[freqRange] : " << phyChnlCfg.freqRange << endl; 362 cout << "[phyChnlCfg] -->[downlinkChannelNum] : " << phyChnlCfg.downlinkChannelNum << endl; 363 cout << "[phyChnlCfg] -->[uplinkChannelNum] : " << phyChnlCfg.uplinkChannelNum << endl; 364 cout << "[phyChnlCfg] -->[contextIdNum] : " << phyChnlCfg.contextIdNum << endl; 365 366 for (int32_t j = 0; j < phyChnlCfg.contextIdNum; j++) { 367 cout << "[phyChnlCfg] -->[contextIds] : " << j << " " << phyChnlCfg.contextIds[j] << endl; 368 } 369 } 370 371 return 0; 372} 373 374int32_t RilCallbackTest::NetworkCurrentCellUpdated( 375 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo &cellListCurrentInfo) 376{ 377 PrintResponseInfo("NetworkCurrentCellUpdated", responseInfo); 378 379 cout << "[cellListCurrentInfo] -->[itemNum] : " << cellListCurrentInfo.itemNum << endl; 380 for (auto cellInfo : cellListCurrentInfo.cellCurrentInfo) { 381 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 382 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 383 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 384 switch (static_cast<RatType>(cellInfo.ratType)) { 385 case RatType::NETWORK_TYPE_LTE: 386 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 387 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 388 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 389 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 390 break; 391 case RatType::NETWORK_TYPE_GSM: 392 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 393 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 394 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 395 cout << "[cellInfo] -->[rxQuality] : " << cellInfo.serviceCells.gsm.rxQuality << endl; 396 break; 397 case RatType::NETWORK_TYPE_WCDMA: 398 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 399 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 400 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.wcdma.rxlev << endl; 401 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 402 break; 403 case RatType::NETWORK_TYPE_NR: 404 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 405 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 406 break; 407 default: 408 cout << "NetworkCurrentCellUpdated fail, invalid ratType" << endl; 409 break; 410 } 411 } 412 413 return 0; 414} 415 416int32_t RilCallbackTest::NetworkCurrentCellUpdated_1_1( 417 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_1 &cellListCurrentInfo) 418{ 419 PrintResponseInfo("NetworkCurrentCellUpdated_1_1", responseInfo); 420 421 cout << "[cellListCurrentInfo] -->[itemNum] : " << cellListCurrentInfo.itemNum << endl; 422 for (auto cellInfo : cellListCurrentInfo.cellCurrentInfo) { 423 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 424 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 425 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 426 switch (static_cast<RatType>(cellInfo.ratType)) { 427 case RatType::NETWORK_TYPE_LTE: 428 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 429 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 430 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 431 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 432 break; 433 case RatType::NETWORK_TYPE_GSM: 434 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 435 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 436 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 437 cout << "[cellInfo] -->[rxQuality] : " << cellInfo.serviceCells.gsm.rxQuality << endl; 438 break; 439 case RatType::NETWORK_TYPE_WCDMA: 440 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 441 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 442 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.wcdma.rxlev << endl; 443 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 444 break; 445 case RatType::NETWORK_TYPE_NR: 446 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 447 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 448 break; 449 default: 450 cout << "NetworkCurrentCellUpdated_1_1 fail, invalid ratType" << endl; 451 break; 452 } 453 } 454 455 return 0; 456} 457 458int32_t RilCallbackTest::NetworkCurrentCellUpdated_1_2( 459 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_2 &cellListCurrentInfo) 460{ 461 PrintResponseInfo("NetworkCurrentCellUpdated_1_2", responseInfo); 462 463 cout << "[cellListCurrentInfo] -->[itemNum] : " << cellListCurrentInfo.itemNum << endl; 464 for (auto cellInfo : cellListCurrentInfo.cellCurrentInfo) { 465 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 466 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 467 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 468 switch (static_cast<RatType>(cellInfo.ratType)) { 469 case RatType::NETWORK_TYPE_LTE: 470 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 471 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 472 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 473 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 474 break; 475 case RatType::NETWORK_TYPE_GSM: 476 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 477 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 478 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 479 cout << "[cellInfo] -->[rxQuality] : " << cellInfo.serviceCells.gsm.rxQuality << endl; 480 break; 481 case RatType::NETWORK_TYPE_WCDMA: 482 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 483 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 484 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.wcdma.rxlev << endl; 485 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 486 break; 487 case RatType::NETWORK_TYPE_NR: 488 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 489 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 490 break; 491 default: 492 cout << "NetworkCurrentCellUpdated_1_2 fail, invalid ratType" << endl; 493 break; 494 } 495 } 496 497 return 0; 498} 499 500int32_t RilCallbackTest::ResidentNetworkUpdated(const RilRadioResponseInfo &responseInfo, const std::string &plmn) 501{ 502 PrintResponseInfo("ResidentNetworkUpdated", responseInfo); 503 cout << "ResidentNetworkUpdated plmn : " << plmn << endl; 504 cout << "ResidentNetworkUpdated finish." << endl; 505 506 return 0; 507} 508 509int32_t RilCallbackTest::GetSignalStrengthResponse(const RilRadioResponseInfo &responseInfo, const Rssi &rssi) 510{ 511 PrintResponseInfo("GetSignalStrengthResponse", responseInfo); 512 cout << "[rssi] -->[lte] -->[rxlev] : " << rssi.lte.rxlev << endl; 513 cout << "[rssi] -->[lte] -->[rsrq] : " << rssi.lte.rsrq << endl; 514 cout << "[rssi] -->[lte] -->[rsrp] : " << rssi.lte.rsrp << endl; 515 cout << "[rssi] -->[lte] -->[snr] : " << rssi.lte.snr << endl; 516 517 return 0; 518} 519 520int32_t RilCallbackTest::GetCsRegStatusResponse( 521 const RilRadioResponseInfo &responseInfo, const CsRegStatusInfo &csRegStatusInfo) 522{ 523 PrintResponseInfo("GetCsRegStatusResponse", responseInfo); 524 cout << "[csRegStatusInfo] -->[notifyType] : " << csRegStatusInfo.notifyType << endl; 525 cout << "[csRegStatusInfo] -->[regStatus] : " << csRegStatusInfo.regStatus << endl; 526 cout << "[csRegStatusInfo] -->[radioTechnology] : " << csRegStatusInfo.radioTechnology << endl; 527 cout << "[csRegStatusInfo] -->[flag] : " << csRegStatusInfo.flag << endl; 528 529 return 0; 530} 531 532int32_t RilCallbackTest::GetPsRegStatusResponse( 533 const RilRadioResponseInfo &responseInfo, const PsRegStatusInfo &psRegStatusInfo) 534{ 535 PrintResponseInfo("GetPsRegStatusResponse", responseInfo); 536 cout << "[psRegStatusInfo] -->[notifyType] : " << psRegStatusInfo.notifyType << endl; 537 cout << "[psRegStatusInfo] -->[regStatus] : " << psRegStatusInfo.regStatus << endl; 538 cout << "[psRegStatusInfo] -->[radioTechnology] : " << psRegStatusInfo.radioTechnology << endl; 539 cout << "[psRegStatusInfo] -->[isDcNrRestricted] : " << psRegStatusInfo.isDcNrRestricted << endl; 540 cout << "[psRegStatusInfo] -->[isNrAvailable] : " << psRegStatusInfo.isNrAvailable << endl; 541 cout << "[psRegStatusInfo] -->[isEnDcAvailable] : " << psRegStatusInfo.isEnDcAvailable << endl; 542 543 return 0; 544} 545 546int32_t RilCallbackTest::GetOperatorInfoResponse( 547 const RilRadioResponseInfo &responseInfo, const OperatorInfo &operatorInfo) 548{ 549 PrintResponseInfo("GetOperatorInfoResponse", responseInfo); 550 cout << "[operatorInfo] -->[longName] : " << operatorInfo.longName << endl; 551 cout << "[operatorInfo] -->[shortName] : " << operatorInfo.shortName << endl; 552 cout << "[operatorInfo] -->[numeric] : " << operatorInfo.numeric << endl; 553 554 return 0; 555} 556 557int32_t RilCallbackTest::GetNetworkSearchInformationResponse( 558 const RilRadioResponseInfo &responseInfo, const AvailableNetworkList &availableNetworkList) 559{ 560 PrintResponseInfo("GetNetworkSearchInformationResponse", responseInfo); 561 562 cout << "[availableNetworkList] -->[itemNum] : " << availableNetworkList.itemNum << endl; 563 cout << "[availableNetworkList] -->[flag] : " << availableNetworkList.flag << endl; 564 for (auto availableInfo : availableNetworkList.availableNetworkInfo) { 565 cout << "[availableInfo] -->[status] : " << availableInfo.status << endl; 566 cout << "[availableInfo] -->[rat] : " << availableInfo.rat << endl; 567 cout << "[availableInfo] -->[longName] : " << availableInfo.longName << endl; 568 cout << "[availableInfo] -->[shortName] : " << availableInfo.shortName << endl; 569 cout << "[availableInfo] -->[numeric] : " << availableInfo.numeric << endl; 570 } 571 572 return 0; 573} 574 575int32_t RilCallbackTest::GetNetworkSelectionModeResponse( 576 const RilRadioResponseInfo &responseInfo, const SetNetworkModeInfo &setNetworkModeInfo) 577{ 578 PrintResponseInfo("GetNetworkSelectionModeResponse", responseInfo); 579 cout << "preferredNetworkType: " << setNetworkModeInfo.selectMode << endl; 580 cout << "operator: " << setNetworkModeInfo.oper << endl; 581 cout << "flag: " << setNetworkModeInfo.flag << endl; 582 return 0; 583} 584 585int32_t RilCallbackTest::SetNetworkSelectionModeResponse(const RilRadioResponseInfo &responseInfo) 586{ 587 PrintResponseInfo("SetNetworkSelectionModeResponse", responseInfo); 588 return 0; 589} 590 591int32_t RilCallbackTest::GetNeighboringCellInfoListResponse( 592 const RilRadioResponseInfo &responseInfo, const CellListNearbyInfo &cellInfoList) 593{ 594 PrintResponseInfo("GetNeighboringCellInfoListResponse", responseInfo); 595 596 cout << "[cellInfoList] -->[itemNum] : " << cellInfoList.itemNum << endl; 597 for (auto cellInfo : cellInfoList.cellNearbyInfo) { 598 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 599 switch (static_cast<RatType>(cellInfo.ratType)) { 600 case RatType::NETWORK_TYPE_LTE: 601 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 602 cout << "[cellInfo] -->[pci] : " << cellInfo.serviceCells.lte.pci << endl; 603 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 604 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 605 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.lte.rxlev << endl; 606 break; 607 case RatType::NETWORK_TYPE_GSM: 608 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 609 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 610 cout << "[cellInfo] -->[bsic] : " << cellInfo.serviceCells.gsm.bsic << endl; 611 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 612 break; 613 case RatType::NETWORK_TYPE_WCDMA: 614 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 615 cout << "[cellInfo] -->[psc] : " << cellInfo.serviceCells.wcdma.psc << endl; 616 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 617 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 618 break; 619 case RatType::NETWORK_TYPE_NR: 620 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 621 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 622 break; 623 default: 624 cout << "RilCallbackTest::GetNeighboringCellInfoListResponse invalid ratType" << endl; 625 break; 626 } 627 } 628 629 return 0; 630} 631 632int32_t RilCallbackTest::GetNeighboringCellInfoListResponse_1_2( 633 const RilRadioResponseInfo &responseInfo, const CellListNearbyInfo_1_2 &cellInfoList) 634{ 635 PrintResponseInfo("GetNeighboringCellInfoListResponse_1_2", responseInfo); 636 637 cout << "[cellInfoList] -->[itemNum] : " << cellInfoList.itemNum << endl; 638 for (auto cellInfo : cellInfoList.cellNearbyInfo) { 639 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 640 switch (static_cast<RatType>(cellInfo.ratType)) { 641 case RatType::NETWORK_TYPE_LTE: 642 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 643 cout << "[cellInfo] -->[pci] : " << cellInfo.serviceCells.lte.pci << endl; 644 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 645 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 646 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.lte.rxlev << endl; 647 break; 648 case RatType::NETWORK_TYPE_GSM: 649 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 650 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 651 cout << "[cellInfo] -->[bsic] : " << cellInfo.serviceCells.gsm.bsic << endl; 652 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 653 break; 654 case RatType::NETWORK_TYPE_WCDMA: 655 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 656 cout << "[cellInfo] -->[psc] : " << cellInfo.serviceCells.wcdma.psc << endl; 657 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 658 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 659 break; 660 case RatType::NETWORK_TYPE_NR: 661 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 662 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 663 break; 664 default: 665 cout << "GetNeighboringCellInfoListResponse_1_2 invalid ratType" << endl; 666 break; 667 } 668 } 669 670 return 0; 671} 672 673int32_t RilCallbackTest::GetCurrentCellInfoResponse( 674 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo &cellInfoList) 675{ 676 PrintResponseInfo("GetCurrentCellInfoResponse", responseInfo); 677 678 cout << "[cellInfoList] -->[itemNum] : " << cellInfoList.itemNum << endl; 679 for (auto cellInfo : cellInfoList.cellCurrentInfo) { 680 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 681 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 682 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 683 switch (static_cast<RatType>(cellInfo.ratType)) { 684 case RatType::NETWORK_TYPE_LTE: 685 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 686 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 687 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 688 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 689 break; 690 case RatType::NETWORK_TYPE_GSM: 691 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 692 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 693 cout << "[cellInfo] -->[bsic] : " << cellInfo.serviceCells.gsm.bsic << endl; 694 cout << "[cellInfo] -->[cellId] : " << cellInfo.serviceCells.gsm.cellId << endl; 695 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 696 break; 697 case RatType::NETWORK_TYPE_WCDMA: 698 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 699 cout << "[cellInfo] -->[psc] : " << cellInfo.serviceCells.wcdma.psc << endl; 700 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 701 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 702 break; 703 case RatType::NETWORK_TYPE_NR: 704 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 705 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 706 cout << "[cellInfo] -->[nci] : " << cellInfo.serviceCells.nr.nci << endl; 707 break; 708 default: 709 cout << "RilCallbackTest::GetCurrentCellInfoResponse invalid ratType" << endl; 710 break; 711 } 712 } 713 714 return 0; 715} 716 717int32_t RilCallbackTest::GetCurrentCellInfoResponse_1_1( 718 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_1 &cellListCurrentInfo) 719{ 720 PrintResponseInfo("GetCurrentCellInfoResponse_1_1", responseInfo); 721 722 cout << "[cellListCurrentInfo] -->[itemNum] : " << cellListCurrentInfo.itemNum << endl; 723 for (auto cellInfo : cellListCurrentInfo.cellCurrentInfo) { 724 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 725 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 726 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 727 switch (static_cast<RatType>(cellInfo.ratType)) { 728 case RatType::NETWORK_TYPE_LTE: 729 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 730 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 731 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 732 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 733 break; 734 case RatType::NETWORK_TYPE_GSM: 735 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 736 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 737 cout << "[cellInfo] -->[bsic] : " << cellInfo.serviceCells.gsm.bsic << endl; 738 cout << "[cellInfo] -->[cellId] : " << cellInfo.serviceCells.gsm.cellId << endl; 739 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 740 break; 741 case RatType::NETWORK_TYPE_WCDMA: 742 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 743 cout << "[cellInfo] -->[psc] : " << cellInfo.serviceCells.wcdma.psc << endl; 744 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 745 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 746 break; 747 case RatType::NETWORK_TYPE_NR: 748 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 749 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 750 cout << "[cellInfo] -->[nci] : " << cellInfo.serviceCells.nr.nci << endl; 751 break; 752 default: 753 cout << "RilCallbackTest::GetCurrentCellInfoResponse_1_1 invalid ratType" << endl; 754 break; 755 } 756 } 757 758 return 0; 759} 760 761int32_t RilCallbackTest::GetCurrentCellInfoResponse_1_2( 762 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_2 &cellListCurrentInfo) 763{ 764 PrintResponseInfo("GetCurrentCellInfoResponse_1_2", responseInfo); 765 766 cout << "[cellListCurrentInfo] -->[itemNum] : " << cellListCurrentInfo.itemNum << endl; 767 for (auto cellInfo : cellListCurrentInfo.cellCurrentInfo) { 768 cout << "[cellInfo] -->[ratType] : " << cellInfo.ratType << endl; 769 cout << "[cellInfo] -->[mcc] : " << cellInfo.mcc << endl; 770 cout << "[cellInfo] -->[mnc] : " << cellInfo.mnc << endl; 771 switch (static_cast<RatType>(cellInfo.ratType)) { 772 case RatType::NETWORK_TYPE_LTE: 773 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.lte.arfcn << endl; 774 cout << "[cellInfo] -->[rsrp] : " << cellInfo.serviceCells.lte.rsrp << endl; 775 cout << "[cellInfo] -->[rsrq] : " << cellInfo.serviceCells.lte.rsrq << endl; 776 cout << "[cellInfo] -->[rssi] : " << cellInfo.serviceCells.lte.rssi << endl; 777 break; 778 case RatType::NETWORK_TYPE_GSM: 779 cout << "[cellInfo] -->[band] : " << cellInfo.serviceCells.gsm.band << endl; 780 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.gsm.arfcn << endl; 781 cout << "[cellInfo] -->[bsic] : " << cellInfo.serviceCells.gsm.bsic << endl; 782 cout << "[cellInfo] -->[cellId] : " << cellInfo.serviceCells.gsm.cellId << endl; 783 cout << "[cellInfo] -->[rxlev] : " << cellInfo.serviceCells.gsm.rxlev << endl; 784 break; 785 case RatType::NETWORK_TYPE_WCDMA: 786 cout << "[cellInfo] -->[arfcn] : " << cellInfo.serviceCells.wcdma.arfcn << endl; 787 cout << "[cellInfo] -->[psc] : " << cellInfo.serviceCells.wcdma.psc << endl; 788 cout << "[cellInfo] -->[rscp] : " << cellInfo.serviceCells.wcdma.rscp << endl; 789 cout << "[cellInfo] -->[ecno] : " << cellInfo.serviceCells.wcdma.ecno << endl; 790 break; 791 case RatType::NETWORK_TYPE_NR: 792 cout << "[cellInfo] -->[nrArfcn] : " << cellInfo.serviceCells.nr.nrArfcn << endl; 793 cout << "[cellInfo] -->[tac] : " << cellInfo.serviceCells.nr.tac << endl; 794 cout << "[cellInfo] -->[nci] : " << cellInfo.serviceCells.nr.nci << endl; 795 break; 796 default: 797 cout << "RilCallbackTest::GetCurrentCellInfoResponse_1_2 invalid ratType" << endl; 798 break; 799 } 800 } 801 802 return 0; 803} 804 805int32_t RilCallbackTest::SetPreferredNetworkResponse(const RilRadioResponseInfo &responseInfo) 806{ 807 PrintResponseInfo("SetPreferredNetworkResponse", responseInfo); 808 return 0; 809} 810 811int32_t RilCallbackTest::GetPreferredNetworkResponse( 812 const RilRadioResponseInfo &responseInfo, const PreferredNetworkTypeInfo &preferredNetworkTypeInfo) 813{ 814 PrintResponseInfo("GetPreferredNetworkResponse", responseInfo); 815 cout << "preferredNetworkType: " << preferredNetworkTypeInfo.preferredNetworkType << endl; 816 cout << "flag: " << preferredNetworkTypeInfo.flag << endl; 817 return 0; 818} 819 820int32_t RilCallbackTest::GetPhysicalChannelConfigResponse( 821 const RilRadioResponseInfo &responseInfo, const ChannelConfigInfoList &channelConfigInfoList) 822{ 823 PrintResponseInfo("GetPhysicalChannelConfigResponse", responseInfo); 824 825 cout << "[channelConfigInfoList] -->[itemNum] : " << channelConfigInfoList.itemNum << endl; 826 cout << "[channelConfigInfoList] -->[flag] : " << channelConfigInfoList.flag << endl; 827 828 for (auto phyChnlCfg : channelConfigInfoList.channelConfigInfos) { 829 cout << "[phyChnlCfg] -->[cellConnStatus] : " << phyChnlCfg.cellConnStatus << endl; 830 cout << "[phyChnlCfg] -->[ratType] : " << phyChnlCfg.ratType << endl; 831 cout << "[phyChnlCfg] -->[cellBandwidthDownlinkKhz] : " << phyChnlCfg.cellBandwidthDownlinkKhz << endl; 832 cout << "[phyChnlCfg] -->[cellBandwidthUplinkKhz] : " << phyChnlCfg.cellBandwidthUplinkKhz << endl; 833 cout << "[phyChnlCfg] -->[freqRange] : " << phyChnlCfg.freqRange << endl; 834 cout << "[phyChnlCfg] -->[downlinkChannelNum] : " << phyChnlCfg.downlinkChannelNum << endl; 835 cout << "[phyChnlCfg] -->[uplinkChannelNum] : " << phyChnlCfg.uplinkChannelNum << endl; 836 cout << "[phyChnlCfg] -->[contextIdNum] : " << phyChnlCfg.contextIdNum << endl; 837 838 for (int32_t j = 0; j < phyChnlCfg.contextIdNum; j++) { 839 cout << "[phyChnlCfg] -->[contextIds] : " << j << " " << phyChnlCfg.contextIds[j] << endl; 840 } 841 } 842 843 return 0; 844} 845 846int32_t RilCallbackTest::SetLocateUpdatesResponse(const RilRadioResponseInfo &responseInfo) 847{ 848 PrintResponseInfo("SetLocateUpdatesResponse", responseInfo); 849 return 0; 850} 851 852int32_t RilCallbackTest::SetNotificationFilterResponse(const RilRadioResponseInfo &responseInfo) 853{ 854 PrintResponseInfo("SetNotificationFilterResponse", responseInfo); 855 return 0; 856} 857 858int32_t RilCallbackTest::SetDeviceStateResponse(const RilRadioResponseInfo &responseInfo) 859{ 860 PrintResponseInfo("SetDeviceStateResponse", responseInfo); 861 return 0; 862} 863 864int32_t RilCallbackTest::SetNrOptionModeResponse(const RilRadioResponseInfo &responseInfo) 865{ 866 PrintResponseInfo("SetNrOptionModeResponse", responseInfo); 867 return 0; 868} 869 870int32_t RilCallbackTest::GetNrOptionModeResponse(const RilRadioResponseInfo &responseInfo, int32_t mode) 871{ 872 PrintResponseInfo("GetNrOptionModeResponse", responseInfo); 873 cout << "[mode] : " << mode << endl; 874 cout << endl; 875 return 0; 876} 877 878int32_t RilCallbackTest::GetRrcConnectionStateResponse( 879 const RilRadioResponseInfo &responseInfo, int32_t rrcConnectionState) 880{ 881 PrintResponseInfo("GetRrcConnectionStateResponse", responseInfo); 882 cout << "rrcConnectionState : " << rrcConnectionState << endl; 883 return 0; 884} 885 886int32_t RilCallbackTest::GetNrSsbIdResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, 887 const HDI::Ril::V1_2::NrCellSsbIds &nrCellSsbIds) 888{ 889 PrintResponseInfo("GetNrSsbIdResponse", responseInfo); 890 cout << "nrCellSsbIds rsrp: " << nrCellSsbIds.rsrp << endl; 891 cout << "nrCellSsbIds sinr: " << nrCellSsbIds.sinr << endl; 892 cout << "nrCellSsbIds nbCellCount: " << nrCellSsbIds.nbCellCount << endl; 893 return 0; 894} 895 896// Call 897int32_t RilCallbackTest::CallEmergencyNotice( 898 const RilRadioResponseInfo &responseInfo, const EmergencyInfoList &emergencyInfoList) 899{ 900 PrintResponseInfo("CallEmergencyNotice", responseInfo); 901 cout << "[emergencyInfoList] -->[callSize] : " << emergencyInfoList.callSize << endl; 902 for (auto emergencyInfo : emergencyInfoList.calls) { 903 cout << "[emergencyInfo] -->[mcc] : " << emergencyInfo.mcc << " -->[ecc] : " << emergencyInfo.eccNum << endl; 904 } 905 cout << endl; 906 return 0; 907} 908 909int32_t RilCallbackTest::CallStateUpdated(const RilRadioResponseInfo &responseInfo) 910{ 911 PrintResponseInfo("CallStateUpdated", responseInfo); 912 return 0; 913} 914 915int32_t RilCallbackTest::CallRingbackVoiceNotice( 916 const RilRadioResponseInfo &responseInfo, const RingbackVoice &ringbackVoice) 917{ 918 PrintResponseInfo("CallRingbackVoiceNotice", responseInfo); 919 cout << "[ringbackVoice] -->[status] : " << ringbackVoice.status << endl; 920 return 0; 921} 922 923int32_t RilCallbackTest::CallSrvccStatusNotice(const RilRadioResponseInfo &responseInfo, const SrvccStatus &srvccStatus) 924{ 925 PrintResponseInfo("CallSrvccStatusNotice", responseInfo); 926 cout << "[srvccStatus] -->[status] : " << srvccStatus.status << endl; 927 return 0; 928} 929 930int32_t RilCallbackTest::CallRsrvccStatusNotify(const RilRadioResponseInfo &responseInfo) 931{ 932 PrintResponseInfo("CallRsrvccStatusNotify", responseInfo); 933 return 0; 934} 935 936int32_t RilCallbackTest::CallUssdNotice(const RilRadioResponseInfo &responseInfo, const UssdNoticeInfo &ussdNoticeInfo) 937{ 938 PrintResponseInfo("CallUssdNotice", responseInfo); 939 cout << "[ussdNoticeInfo] -->[type] : " << ussdNoticeInfo.type << endl; 940 cout << "[ussdNoticeInfo] -->[message] : " << ussdNoticeInfo.message << endl; 941 return 0; 942} 943 944int32_t RilCallbackTest::CallSsNotice(const RilRadioResponseInfo &responseInfo, const SsNoticeInfo &ssNoticeInfo) 945{ 946 PrintResponseInfo("CallSsNotice", responseInfo); 947 cout << "[ssNoticeInfo] -->[serviceType] : " << ssNoticeInfo.serviceType << endl; 948 cout << "[ssNoticeInfo] -->[requestType] : " << ssNoticeInfo.requestType << endl; 949 cout << "[ssNoticeInfo] -->[serviceClass] : " << ssNoticeInfo.serviceClass << endl; 950 return 0; 951} 952 953int32_t RilCallbackTest::GetEmergencyCallListResponse( 954 const RilRadioResponseInfo &responseInfo, const EmergencyInfoList &emergencyInfoList) 955{ 956 PrintResponseInfo("GetEmergencyCallListResponse", responseInfo); 957 cout << "[emergencyInfoList] -->[callSize] : " << emergencyInfoList.callSize << endl; 958 for (auto emergencyInfo : emergencyInfoList.calls) { 959 cout << "[emergencyInfo] -->[mcc] : " << emergencyInfo.mcc << " -->[ecc] : " << emergencyInfo.eccNum << endl; 960 } 961 cout << endl; 962 return 0; 963} 964 965int32_t RilCallbackTest::SetEmergencyCallListResponse(const RilRadioResponseInfo &responseInfo) 966{ 967 PrintResponseInfo("SetEmergencyCallListResponse", responseInfo); 968 return 0; 969} 970 971int32_t RilCallbackTest::GetCallListResponse(const RilRadioResponseInfo &responseInfo, const CallInfoList &callList) 972{ 973 PrintResponseInfo("GetCallListResponse", responseInfo); 974 cout << "[CallInfoList] -->[callSize] : " << callList.callSize << endl; 975 return 0; 976} 977 978int32_t RilCallbackTest::DialResponse(const RilRadioResponseInfo &responseInfo) 979{ 980 PrintResponseInfo("DialResponse", responseInfo); 981 return 0; 982} 983 984int32_t RilCallbackTest::HangupResponse(const RilRadioResponseInfo &responseInfo) 985{ 986 PrintResponseInfo("HangupResponse", responseInfo); 987 return 0; 988} 989 990int32_t RilCallbackTest::RejectResponse(const RilRadioResponseInfo &responseInfo) 991{ 992 PrintResponseInfo("RejectResponse", responseInfo); 993 return 0; 994} 995 996int32_t RilCallbackTest::AnswerResponse(const RilRadioResponseInfo &responseInfo) 997{ 998 PrintResponseInfo("AnswerResponse", responseInfo); 999 return 0; 1000} 1001 1002int32_t RilCallbackTest::HoldCallResponse(const RilRadioResponseInfo &responseInfo) 1003{ 1004 PrintResponseInfo("HoldCallResponse", responseInfo); 1005 return 0; 1006} 1007 1008int32_t RilCallbackTest::UnHoldCallResponse(const RilRadioResponseInfo &responseInfo) 1009{ 1010 PrintResponseInfo("UnHoldCallResponse", responseInfo); 1011 return 0; 1012} 1013 1014int32_t RilCallbackTest::SwitchCallResponse(const RilRadioResponseInfo &responseInfo) 1015{ 1016 PrintResponseInfo("SwitchCallResponse", responseInfo); 1017 return 0; 1018} 1019 1020int32_t RilCallbackTest::GetClipResponse(const RilRadioResponseInfo &responseInfo, const GetClipResult &getClipResult) 1021{ 1022 PrintResponseInfo("GetClipResponse", responseInfo); 1023 cout << "[getClipResult] -->[result] : " << getClipResult.result << endl; 1024 cout << "[getClipResult] -->[action] : " << getClipResult.action << endl; 1025 cout << "[getClipResult] -->[clipStat] : " << getClipResult.clipStat << endl; 1026 return 0; 1027} 1028 1029int32_t RilCallbackTest::SetClipResponse(const RilRadioResponseInfo &responseInfo) 1030{ 1031 PrintResponseInfo("GetClipResponse", responseInfo); 1032 return 0; 1033} 1034 1035int32_t RilCallbackTest::CombineConferenceResponse(const RilRadioResponseInfo &responseInfo) 1036{ 1037 PrintResponseInfo("CombineConferenceResponse", responseInfo); 1038 return 0; 1039} 1040 1041int32_t RilCallbackTest::SeparateConferenceResponse(const RilRadioResponseInfo &responseInfo) 1042{ 1043 PrintResponseInfo("SeparateConferenceResponse", responseInfo); 1044 return 0; 1045} 1046 1047int32_t RilCallbackTest::CallSupplementResponse(const RilRadioResponseInfo &responseInfo) 1048{ 1049 PrintResponseInfo("CallSupplementResponse", responseInfo); 1050 return 0; 1051} 1052 1053int32_t RilCallbackTest::GetCallWaitingResponse( 1054 const RilRadioResponseInfo &responseInfo, const CallWaitResult &callWaitResult) 1055{ 1056 PrintResponseInfo("GetCallWaitingResponse", responseInfo); 1057 cout << "[callWaitResult] -->[result] : " << callWaitResult.result << endl; 1058 cout << "[callWaitResult] -->[status] : " << callWaitResult.status << endl; 1059 cout << "[callWaitResult] -->[classCw] : " << callWaitResult.classCw << endl; 1060 return 0; 1061} 1062 1063int32_t RilCallbackTest::SetCallWaitingResponse(const RilRadioResponseInfo &responseInfo) 1064{ 1065 PrintResponseInfo("SetCallWaitingResponse", responseInfo); 1066 return 0; 1067} 1068 1069int32_t RilCallbackTest::GetCallTransferInfoResponse( 1070 const RilRadioResponseInfo &responseInfo, const CallForwardQueryInfoList &cFQueryList) 1071{ 1072 PrintResponseInfo("GetCallTransferInfoResponse", responseInfo); 1073 cout << "[cFQueryList] -->[callSize] : " << cFQueryList.callSize << endl; 1074 return 0; 1075} 1076 1077int32_t RilCallbackTest::SetCallTransferInfoResponse(const RilRadioResponseInfo &responseInfo) 1078{ 1079 PrintResponseInfo("SetCallTransferInfoResponse", responseInfo); 1080 return 0; 1081} 1082 1083int32_t RilCallbackTest::GetCallRestrictionResponse( 1084 const RilRadioResponseInfo &responseInfo, const CallRestrictionResult &result) 1085{ 1086 PrintResponseInfo("GetCallRestrictionResponse", responseInfo); 1087 cout << "[result] -->[result] : " << result.result << endl; 1088 cout << "[result] -->[status] : " << result.status << endl; 1089 cout << "[result] -->[classCw] : " << result.classCw << endl; 1090 return 0; 1091} 1092 1093int32_t RilCallbackTest::SetCallRestrictionResponse(const RilRadioResponseInfo &responseInfo) 1094{ 1095 PrintResponseInfo("SetCallRestrictionResponse", responseInfo); 1096 return 0; 1097} 1098 1099int32_t RilCallbackTest::GetClirResponse(const RilRadioResponseInfo &responseInfo, const GetClirResult &getClirResult) 1100{ 1101 PrintResponseInfo("GetClirResponse", responseInfo); 1102 cout << "[getClirResult] -->[result] : " << getClirResult.result << endl; 1103 cout << "[getClirResult] -->[action] : " << getClirResult.action << endl; 1104 cout << "[getClirResult] -->[clirStat] : " << getClirResult.clirStat << endl; 1105 return 0; 1106} 1107 1108int32_t RilCallbackTest::SetClirResponse(const RilRadioResponseInfo &responseInfo) 1109{ 1110 PrintResponseInfo("SetClirResponse", responseInfo); 1111 return 0; 1112} 1113 1114int32_t RilCallbackTest::StartDtmfResponse(const RilRadioResponseInfo &responseInfo) 1115{ 1116 PrintResponseInfo("StartDtmfResponse", responseInfo); 1117 return 0; 1118} 1119 1120int32_t RilCallbackTest::SendDtmfResponse(const RilRadioResponseInfo &responseInfo) 1121{ 1122 PrintResponseInfo("SendDtmfResponse", responseInfo); 1123 return 0; 1124} 1125 1126int32_t RilCallbackTest::StopDtmfResponse(const RilRadioResponseInfo &responseInfo) 1127{ 1128 PrintResponseInfo("StopDtmfResponse", responseInfo); 1129 return 0; 1130} 1131 1132int32_t RilCallbackTest::GetCallPreferenceModeResponse(const RilRadioResponseInfo &responseInfo, int32_t mode) 1133{ 1134 PrintResponseInfo("GetCallPreferenceModeResponse", responseInfo); 1135 cout << "mode : " << mode << endl; 1136 return 0; 1137} 1138 1139int32_t RilCallbackTest::SetCallPreferenceModeResponse(const RilRadioResponseInfo &responseInfo) 1140{ 1141 PrintResponseInfo("SetCallPreferenceModeResponse", responseInfo); 1142 return 0; 1143} 1144 1145int32_t RilCallbackTest::SetUssdResponse(const RilRadioResponseInfo &responseInfo) 1146{ 1147 PrintResponseInfo("SetUssdResponse", responseInfo); 1148 return 0; 1149} 1150 1151int32_t RilCallbackTest::GetUssdResponse(const RilRadioResponseInfo &responseInfo, int32_t cusd) 1152{ 1153 PrintResponseInfo("GetUssdResponse", responseInfo); 1154 cout << "cusd : " << cusd << endl; 1155 return 0; 1156} 1157 1158int32_t RilCallbackTest::SetMuteResponse(const RilRadioResponseInfo &responseInfo) 1159{ 1160 PrintResponseInfo("SetMuteResponse", responseInfo); 1161 return 0; 1162} 1163 1164int32_t RilCallbackTest::GetMuteResponse(const RilRadioResponseInfo &responseInfo, int32_t mute) 1165{ 1166 PrintResponseInfo("GetUssdResponse", responseInfo); 1167 cout << "mute : " << mute << endl; 1168 return 0; 1169} 1170 1171int32_t RilCallbackTest::GetCallFailReasonResponse(const RilRadioResponseInfo &responseInfo, int32_t callFail) 1172{ 1173 PrintResponseInfo("GetCallFailReasonResponse", responseInfo); 1174 cout << "callFail : " << callFail << endl; 1175 return 0; 1176} 1177 1178int32_t RilCallbackTest::SetBarringPasswordResponse(const RilRadioResponseInfo &responseInfo) 1179{ 1180 PrintResponseInfo("SetBarringPasswordResponse", responseInfo); 1181 return 0; 1182} 1183 1184int32_t RilCallbackTest::CloseUnFinishedUssdResponse(const RilRadioResponseInfo &responseInfo) 1185{ 1186 PrintResponseInfo("CloseUnFinishedUssdResponse", responseInfo); 1187 return 0; 1188} 1189 1190int32_t RilCallbackTest::SetVonrSwitchResponse(const RilRadioResponseInfo &responseInfo) 1191{ 1192 PrintResponseInfo("SetVonrSwitchResponse", responseInfo); 1193 return 0; 1194} 1195 1196/** 1197 * modem 1198 **/ 1199int32_t RilCallbackTest::RadioStateUpdated(const RilRadioResponseInfo &responseInfo, int32_t state) 1200{ 1201 PrintResponseInfo("RadioStateUpdated", responseInfo); 1202 cout << "[state] : " << state << endl; 1203 cout << endl; 1204 return 0; 1205} 1206 1207int32_t RilCallbackTest::VoiceRadioTechUpdated( 1208 const RilRadioResponseInfo &responseInfo, const VoiceRadioTechnology &voiceRadioTechnology) 1209{ 1210 PrintResponseInfo("VoiceRadioTechUpdated", responseInfo); 1211 cout << "[voiceRadioTechnology] -->[srvStatus] : " << voiceRadioTechnology.srvStatus 1212 << " -->[srvDomain] : " << voiceRadioTechnology.srvDomain 1213 << " -->[roamStatus] : " << voiceRadioTechnology.roamStatus 1214 << " -->[simStatus] : " << voiceRadioTechnology.simStatus 1215 << " -->[lockStatus] : " << voiceRadioTechnology.lockStatus 1216 << " -->[sysModeName] : " << voiceRadioTechnology.sysModeName 1217 << " -->[sysMode] : " << voiceRadioTechnology.sysMode 1218 << " -->[actName] : " << voiceRadioTechnology.actName 1219 << " -->[actType] : " << voiceRadioTechnology.actType; 1220 cout << endl << endl; 1221 return 0; 1222} 1223 1224int32_t RilCallbackTest::DsdsModeUpdated(const RilRadioResponseInfo &responseInfo, int32_t mode) 1225{ 1226 PrintResponseInfo("DsdsModeUpdated", responseInfo); 1227 cout << "[mode] : " << mode << endl; 1228 cout << endl; 1229 return 0; 1230} 1231 1232int32_t RilCallbackTest::NcfgFinishedResult(const RilRadioResponseInfo &responseInfo, int32_t state) 1233{ 1234 PrintResponseInfo("NcfgFinishedResult", responseInfo); 1235 cout << "[state] : " << state << endl; 1236 cout << endl; 1237 return 0; 1238} 1239 1240int32_t RilCallbackTest::RestartRildNvMatch(const RilRadioResponseInfo &responseInfo, int32_t state) 1241{ 1242 PrintResponseInfo("RestartRildNvMatch", responseInfo); 1243 cout << "[state] : " << state << endl; 1244 cout << endl; 1245 return 0; 1246} 1247 1248int32_t RilCallbackTest::ShutDownResponse(const RilRadioResponseInfo &responseInfo) 1249{ 1250 PrintResponseInfo("ShutDownResponse", responseInfo); 1251 return 0; 1252} 1253 1254int32_t RilCallbackTest::SetRadioStateResponse(const RilRadioResponseInfo &responseInfo) 1255{ 1256 PrintResponseInfo("SetRadioStateResponse", responseInfo); 1257 return 0; 1258} 1259 1260int32_t RilCallbackTest::GetRadioStateResponse(const RilRadioResponseInfo &responseInfo, int32_t state) 1261{ 1262 PrintResponseInfo("GetRadioStateResponse", responseInfo); 1263 cout << "[state] : " << state << endl; 1264 cout << endl; 1265 return 0; 1266} 1267 1268int32_t RilCallbackTest::GetRrcConnectionStateUpdated(const RilRadioResponseInfo &responseInfo, int32_t state) 1269{ 1270 PrintResponseInfo("GetRrcConnectionStateUpdated", responseInfo); 1271 cout << "[state] : " << state << endl; 1272 cout << endl; 1273 return 0; 1274} 1275 1276int32_t RilCallbackTest::GetImeiResponse(const RilRadioResponseInfo &responseInfo, const std::string &imei) 1277{ 1278 PrintResponseInfo("GetImeiResponse", responseInfo); 1279 cout << "[imei] : " << imei << endl; 1280 cout << endl; 1281 return 0; 1282} 1283 1284int32_t RilCallbackTest::GetImeiSvResponse(const RilRadioResponseInfo &responseInfo, const std::string &imeiSv) 1285{ 1286 PrintResponseInfo("GetImeiSvResponse", responseInfo); 1287 cout << "[imeiSv] : " << imeiSv << endl; 1288 cout << endl; 1289 return 0; 1290} 1291 1292int32_t RilCallbackTest::GetMeidResponse(const RilRadioResponseInfo &responseInfo, const std::string &meid) 1293{ 1294 PrintResponseInfo("GetMeidResponse", responseInfo); 1295 cout << "[meid] : " << meid << endl; 1296 cout << endl; 1297 return 0; 1298} 1299 1300int32_t RilCallbackTest::GetVoiceRadioTechnologyResponse( 1301 const RilRadioResponseInfo &responseInfo, const VoiceRadioTechnology &voiceRadioTechnology) 1302{ 1303 PrintResponseInfo("GetVoiceRadioTechnologyResponse", responseInfo); 1304 cout << "[voiceRadioTechnology] -->[srvStatus] : " << voiceRadioTechnology.srvStatus 1305 << " -->[srvDomain] : " << voiceRadioTechnology.srvDomain 1306 << " -->[roamStatus] : " << voiceRadioTechnology.roamStatus 1307 << " -->[simStatus] : " << voiceRadioTechnology.simStatus 1308 << " -->[lockStatus] : " << voiceRadioTechnology.lockStatus 1309 << " -->[sysModeName] : " << voiceRadioTechnology.sysModeName 1310 << " -->[sysMode] : " << voiceRadioTechnology.sysMode << " -->[actName] : " << voiceRadioTechnology.actName 1311 << " -->[actType] : " << voiceRadioTechnology.actType; 1312 cout << endl << endl; 1313 return 0; 1314} 1315 1316int32_t RilCallbackTest::GetBasebandVersionResponse( 1317 const RilRadioResponseInfo &responseInfo, const std::string &basebandVersion) 1318{ 1319 PrintResponseInfo("GetBasebandVersionResponse", responseInfo); 1320 cout << "[basebandVersion] : " << basebandVersion << endl; 1321 cout << endl; 1322 return 0; 1323} 1324 1325// Data 1326int32_t RilCallbackTest::PdpContextListUpdated( 1327 const RilRadioResponseInfo &responseInfo, const DataCallResultList &dataCallResultList) 1328{ 1329 PrintResponseInfo("PdpContextListUpdated", responseInfo); 1330 cout << "[dataCallResultList] -->[size] : " << dataCallResultList.size << endl; 1331 for (const auto &setupDataCallResultInfo : dataCallResultList.dcList) { 1332 cout << "[setupDataCallResultInfo] -->[flag] : " << setupDataCallResultInfo.flag << endl; 1333 cout << "[setupDataCallResultInfo] -->[reason] : " << setupDataCallResultInfo.reason << endl; 1334 cout << "[setupDataCallResultInfo] -->[retryTime] : " << setupDataCallResultInfo.retryTime << endl; 1335 cout << "[setupDataCallResultInfo] -->[cid] : " << setupDataCallResultInfo.cid << endl; 1336 cout << "[setupDataCallResultInfo] -->[active] : " << setupDataCallResultInfo.active << endl; 1337 cout << "[setupDataCallResultInfo] -->[type] : " << setupDataCallResultInfo.type << endl; 1338 cout << "[setupDataCallResultInfo] -->[netPortName] : " << setupDataCallResultInfo.netPortName << endl; 1339 cout << "[setupDataCallResultInfo] -->[address] : " << setupDataCallResultInfo.address << endl; 1340 cout << "[setupDataCallResultInfo] -->[dns] : " << setupDataCallResultInfo.dns << endl; 1341 cout << "[setupDataCallResultInfo] -->[dnsSec] : " << setupDataCallResultInfo.dnsSec << endl; 1342 cout << "[setupDataCallResultInfo] -->[gateway] : " << setupDataCallResultInfo.gateway << endl; 1343 cout << "[setupDataCallResultInfo] -->[maxTransferUnit] : " << setupDataCallResultInfo.maxTransferUnit << endl; 1344 cout << "[setupDataCallResultInfo] -->[pCscfPrimAddr] : " << setupDataCallResultInfo.pCscfPrimAddr << endl; 1345 cout << "[setupDataCallResultInfo] -->[pCscfSecAddr] : " << setupDataCallResultInfo.pCscfSecAddr << endl; 1346 cout << "[setupDataCallResultInfo] -->[pduSessionId] : " << setupDataCallResultInfo.pduSessionId << endl; 1347 } 1348 cout << endl; 1349 return 0; 1350} 1351 1352int32_t RilCallbackTest::DataLinkCapabilityUpdated( 1353 const RilRadioResponseInfo &responseInfo, const DataLinkCapability &dataLinkCapability) 1354{ 1355 PrintResponseInfo("DataLinkCapabilityUpdated", responseInfo); 1356 cout << "[dataLinkCapability] -->[primaryDownlinkKbps] : " << dataLinkCapability.primaryDownlinkKbps << endl; 1357 cout << "[dataLinkCapability] -->[primaryUplinkKbps] : " << dataLinkCapability.primaryUplinkKbps << endl; 1358 cout << "[dataLinkCapability] -->[secondaryDownlinkKbps] : " << dataLinkCapability.secondaryDownlinkKbps << endl; 1359 cout << "[dataLinkCapability] -->[secondaryUplinkKbps] : " << dataLinkCapability.secondaryUplinkKbps << endl; 1360 cout << endl; 1361 return 0; 1362} 1363 1364int32_t RilCallbackTest::ActivatePdpContextResponse( 1365 const RilRadioResponseInfo &responseInfo, const SetupDataCallResultInfo &setupDataCallResultInfo) 1366{ 1367 PrintResponseInfo("ActivatePdpContextResponse", responseInfo); 1368 cout << "[setupDataCallResultInfo] -->[flag] : " << setupDataCallResultInfo.flag << endl; 1369 cout << "[setupDataCallResultInfo] -->[reason] : " << setupDataCallResultInfo.reason << endl; 1370 cout << "[setupDataCallResultInfo] -->[retryTime] : " << setupDataCallResultInfo.retryTime << endl; 1371 cout << "[setupDataCallResultInfo] -->[cid] : " << setupDataCallResultInfo.cid << endl; 1372 cout << "[setupDataCallResultInfo] -->[active] : " << setupDataCallResultInfo.active << endl; 1373 cout << "[setupDataCallResultInfo] -->[type] : " << setupDataCallResultInfo.type << endl; 1374 cout << "[setupDataCallResultInfo] -->[netPortName] : " << setupDataCallResultInfo.netPortName << endl; 1375 cout << "[setupDataCallResultInfo] -->[address] : " << setupDataCallResultInfo.address << endl; 1376 cout << "[setupDataCallResultInfo] -->[dns] : " << setupDataCallResultInfo.dns << endl; 1377 cout << "[setupDataCallResultInfo] -->[dnsSec] : " << setupDataCallResultInfo.dnsSec << endl; 1378 cout << "[setupDataCallResultInfo] -->[gateway] : " << setupDataCallResultInfo.gateway << endl; 1379 cout << "[setupDataCallResultInfo] -->[maxTransferUnit] : " << setupDataCallResultInfo.maxTransferUnit << endl; 1380 cout << "[setupDataCallResultInfo] -->[pCscfPrimAddr] : " << setupDataCallResultInfo.pCscfPrimAddr << endl; 1381 cout << "[setupDataCallResultInfo] -->[pCscfSecAddr] : " << setupDataCallResultInfo.pCscfSecAddr << endl; 1382 cout << "[setupDataCallResultInfo] -->[pduSessionId] : " << setupDataCallResultInfo.pduSessionId << endl; 1383 cout << endl; 1384 return 0; 1385} 1386 1387int32_t RilCallbackTest::DeactivatePdpContextResponse(const RilRadioResponseInfo &responseInfo) 1388{ 1389 PrintResponseInfo("DeactivatePdpContextResponse", responseInfo); 1390 return 0; 1391} 1392 1393int32_t RilCallbackTest::GetPdpContextListResponse( 1394 const RilRadioResponseInfo &responseInfo, const DataCallResultList &dataCallResultList) 1395{ 1396 PrintResponseInfo("GetPdpContextListResponse", responseInfo); 1397 cout << "[dataCallResultList] -->[size] : " << dataCallResultList.size << endl; 1398 for (const auto &setupDataCallResultInfo : dataCallResultList.dcList) { 1399 cout << "[setupDataCallResultInfo] -->[flag] : " << setupDataCallResultInfo.flag << endl; 1400 cout << "[setupDataCallResultInfo] -->[reason] : " << setupDataCallResultInfo.reason << endl; 1401 cout << "[setupDataCallResultInfo] -->[retryTime] : " << setupDataCallResultInfo.retryTime << endl; 1402 cout << "[setupDataCallResultInfo] -->[cid] : " << setupDataCallResultInfo.cid << endl; 1403 cout << "[setupDataCallResultInfo] -->[active] : " << setupDataCallResultInfo.active << endl; 1404 cout << "[setupDataCallResultInfo] -->[type] : " << setupDataCallResultInfo.type << endl; 1405 cout << "[setupDataCallResultInfo] -->[netPortName] : " << setupDataCallResultInfo.netPortName << endl; 1406 cout << "[setupDataCallResultInfo] -->[address] : " << setupDataCallResultInfo.address << endl; 1407 cout << "[setupDataCallResultInfo] -->[dns] : " << setupDataCallResultInfo.dns << endl; 1408 cout << "[setupDataCallResultInfo] -->[dnsSec] : " << setupDataCallResultInfo.dnsSec << endl; 1409 cout << "[setupDataCallResultInfo] -->[gateway] : " << setupDataCallResultInfo.gateway << endl; 1410 cout << "[setupDataCallResultInfo] -->[maxTransferUnit] : " << setupDataCallResultInfo.maxTransferUnit << endl; 1411 cout << "[setupDataCallResultInfo] -->[pCscfPrimAddr] : " << setupDataCallResultInfo.pCscfPrimAddr << endl; 1412 cout << "[setupDataCallResultInfo] -->[pCscfSecAddr] : " << setupDataCallResultInfo.pCscfSecAddr << endl; 1413 cout << "[setupDataCallResultInfo] -->[pduSessionId] : " << setupDataCallResultInfo.pduSessionId << endl; 1414 } 1415 cout << endl; 1416 return 0; 1417} 1418 1419int32_t RilCallbackTest::SetInitApnInfoResponse(const RilRadioResponseInfo &responseInfo) 1420{ 1421 PrintResponseInfo("SetInitApnInfoResponse", responseInfo); 1422 return 0; 1423} 1424 1425int32_t RilCallbackTest::SetLinkBandwidthReportingRuleResponse(const RilRadioResponseInfo &responseInfo) 1426{ 1427 PrintResponseInfo("SetLinkBandwidthReportingRuleResponse", responseInfo); 1428 return 0; 1429} 1430 1431int32_t RilCallbackTest::GetLinkBandwidthInfoResponse( 1432 const RilRadioResponseInfo &responseInfo, const DataLinkBandwidthInfo &dataLinkBandwidthInfo) 1433{ 1434 PrintResponseInfo("GetLinkBandwidthInfoResponse", responseInfo); 1435 cout << "[dataLinkBandwidthInfo] -->[serial] : " << dataLinkBandwidthInfo.serial << endl; 1436 cout << "[dataLinkBandwidthInfo] -->[cid] : " << dataLinkBandwidthInfo.cid << endl; 1437 cout << "[dataLinkBandwidthInfo] -->[qi] : " << dataLinkBandwidthInfo.qi << endl; 1438 cout << "[dataLinkBandwidthInfo] -->[dlGfbr] : " << dataLinkBandwidthInfo.dlGfbr << endl; 1439 cout << "[dataLinkBandwidthInfo] -->[ulGfbr] : " << dataLinkBandwidthInfo.ulGfbr << endl; 1440 cout << "[dataLinkBandwidthInfo] -->[dlMfbr] : " << dataLinkBandwidthInfo.dlMfbr << endl; 1441 cout << "[dataLinkBandwidthInfo] -->[ulMfbr] : " << dataLinkBandwidthInfo.ulMfbr << endl; 1442 cout << "[dataLinkBandwidthInfo] -->[ulSambr] : " << dataLinkBandwidthInfo.ulSambr << endl; 1443 cout << "[dataLinkBandwidthInfo] -->[dlSambr] : " << dataLinkBandwidthInfo.dlSambr << endl; 1444 cout << "[dataLinkBandwidthInfo] -->[averagingWindow] : " << dataLinkBandwidthInfo.averagingWindow << endl; 1445 cout << endl; 1446 return 0; 1447} 1448 1449int32_t RilCallbackTest::GetLinkCapabilityResponse( 1450 const RilRadioResponseInfo &responseInfo, const DataLinkCapability &dataLinkCapability) 1451{ 1452 PrintResponseInfo("GetLinkCapabilityResponse", responseInfo); 1453 cout << "[dataLinkCapability] -->[primaryDownlinkKbps] : " << dataLinkCapability.primaryDownlinkKbps << endl; 1454 cout << "[dataLinkCapability] -->[primaryUplinkKbps] : " << dataLinkCapability.primaryUplinkKbps << endl; 1455 cout << "[dataLinkCapability] -->[secondaryDownlinkKbps] : " << dataLinkCapability.secondaryDownlinkKbps << endl; 1456 cout << "[dataLinkCapability] -->[secondaryUplinkKbps] : " << dataLinkCapability.secondaryUplinkKbps << endl; 1457 cout << endl; 1458 return 0; 1459} 1460 1461int32_t RilCallbackTest::SetDataPermittedResponse(const RilRadioResponseInfo &responseInfo) 1462{ 1463 PrintResponseInfo("SetDataPermittedResponse", responseInfo); 1464 return 0; 1465} 1466 1467int32_t RilCallbackTest::SetDataProfileInfoResponse(const RilRadioResponseInfo &responseInfo) 1468{ 1469 PrintResponseInfo("SetDataProfileInfoResponse", responseInfo); 1470 return 0; 1471} 1472 1473int32_t RilCallbackTest::CleanAllConnectionsResponse(const RilRadioResponseInfo &responseInfo) 1474{ 1475 PrintResponseInfo("CleanAllConnectionsResponse", responseInfo); 1476 return 0; 1477} 1478 1479// Sms 1480int32_t RilCallbackTest::NewSmsNotify( 1481 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo) 1482{ 1483 PrintResponseInfo("NewSmsNotify", responseInfo); 1484 cout << "[smsMessageInfo] -->[size] : " << smsMessageInfo.size << endl << endl; 1485 return 0; 1486} 1487 1488int32_t RilCallbackTest::NewCdmaSmsNotify( 1489 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo) 1490{ 1491 PrintResponseInfo("NewCdmaSmsNotify", responseInfo); 1492 cout << "[smsMessageInfo] -->[size] : " << smsMessageInfo.size << endl << endl; 1493 return 0; 1494} 1495 1496int32_t RilCallbackTest::SmsStatusReportNotify( 1497 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo) 1498{ 1499 PrintResponseInfo("SmsStatusReportNotify", responseInfo); 1500 cout << "[smsMessageInfo] -->[size] : " << smsMessageInfo.size << endl << endl; 1501 return 0; 1502} 1503 1504int32_t RilCallbackTest::NewSmsStoredOnSimNotify( 1505 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t recordNumber, int32_t indicationType) 1506{ 1507 PrintResponseInfo("NewSmsStoredOnSimNotify", responseInfo); 1508 cout << " [recordNumber] : " << recordNumber << endl; 1509 cout << " [indicationType] : " << indicationType << endl << endl; 1510 return 0; 1511} 1512 1513int32_t RilCallbackTest::CBConfigNotify( 1514 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const CBConfigReportInfo &cellBroadConfigReportInfo) 1515{ 1516 PrintResponseInfo("CBConfigNotify", responseInfo); 1517 cout << "[cellBroadConfigReportInfo] -->[dcs] : " << cellBroadConfigReportInfo.dcs.c_str() << endl << endl; 1518 return 0; 1519} 1520 1521int32_t RilCallbackTest::SendGsmSmsResponse( 1522 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo) 1523{ 1524 PrintResponseInfo("SendGsmSmsResponse", responseInfo); 1525 cout << "[sendSmsResultInfo] -->[pdu] : " << sendSmsResultInfo.pdu.c_str() << endl << endl; 1526 return 0; 1527} 1528 1529int32_t RilCallbackTest::SendCdmaSmsResponse( 1530 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo) 1531{ 1532 PrintResponseInfo("SendCdmaSmsResponse", responseInfo); 1533 cout << "[sendSmsResultInfo] -->[pdu] : " << sendSmsResultInfo.pdu.c_str() << endl << endl; 1534 return 0; 1535} 1536 1537int32_t RilCallbackTest::AddSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1538{ 1539 PrintResponseInfo("AddSimMessageResponse", responseInfo); 1540 return 0; 1541} 1542 1543int32_t RilCallbackTest::DelSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1544{ 1545 PrintResponseInfo("DelSimMessageResponse", responseInfo); 1546 return 0; 1547} 1548 1549int32_t RilCallbackTest::UpdateSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1550{ 1551 PrintResponseInfo("UpdateSimMessageResponse", responseInfo); 1552 return 0; 1553} 1554 1555int32_t RilCallbackTest::AddCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1556{ 1557 PrintResponseInfo("AddCdmaSimMessageResponse", responseInfo); 1558 return 0; 1559} 1560 1561int32_t RilCallbackTest::DelCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1562{ 1563 PrintResponseInfo("DelCdmaSimMessageResponse", responseInfo); 1564 return 0; 1565} 1566 1567int32_t RilCallbackTest::UpdateCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo) 1568{ 1569 PrintResponseInfo("UpdateCdmaSimMessageResponse", responseInfo); 1570 return 0; 1571} 1572 1573int32_t RilCallbackTest::SetSmscAddrResponse(const RilRadioResponseInfo &responseInfo) 1574{ 1575 PrintResponseInfo("SetSmscAddrResponse", responseInfo); 1576 return 0; 1577} 1578 1579int32_t RilCallbackTest::GetSmscAddrResponse( 1580 const RilRadioResponseInfo &responseInfo, const ServiceCenterAddress &serviceCenterAddress) 1581{ 1582 PrintResponseInfo("GetSmscAddrResponse", responseInfo); 1583 cout << " [serviceCenterAddress] -->[tosca] : " << serviceCenterAddress.tosca << endl; 1584 cout << " [serviceCenterAddress] -->[address] : " << serviceCenterAddress.address.c_str() << endl << endl; 1585 return 0; 1586} 1587 1588int32_t RilCallbackTest::SetCBConfigResponse(const RilRadioResponseInfo &responseInfo) 1589{ 1590 PrintResponseInfo("SetCBConfigResponse", responseInfo); 1591 return 0; 1592} 1593 1594int32_t RilCallbackTest::GetCBConfigResponse( 1595 const RilRadioResponseInfo &responseInfo, const CBConfigInfo &cellBroadcastInfo) 1596{ 1597 PrintResponseInfo("GetCBConfigResponse", responseInfo); 1598 cout << " [cellBroadcastInfo] --> [mids] : " << cellBroadcastInfo.mids.c_str() << endl; 1599 cout << " [cellBroadcastInfo] --> [dcss] : " << cellBroadcastInfo.dcss.c_str() << endl << endl; 1600 return 0; 1601} 1602 1603int32_t RilCallbackTest::SetCdmaCBConfigResponse(const RilRadioResponseInfo &responseInfo) 1604{ 1605 PrintResponseInfo("SetCdmaCBConfigResponse", responseInfo); 1606 return 0; 1607} 1608 1609int32_t RilCallbackTest::GetCdmaCBConfigResponse( 1610 const RilRadioResponseInfo &responseInfo, const CdmaCBConfigInfo &cdmaCBConfigInfo) 1611{ 1612 PrintResponseInfo("GetCdmaCBConfigResponse", responseInfo); 1613 cout << " [cdmaCBConfigInfo] --> [service] : " << cdmaCBConfigInfo.service << endl; 1614 cout << " [cdmaCBConfigInfo] --> [language] : " << cdmaCBConfigInfo.language << endl; 1615 cout << " [cdmaCBConfigInfo] --> [checked] : " << cdmaCBConfigInfo.checked << endl << endl; 1616 return 0; 1617} 1618 1619int32_t RilCallbackTest::SendSmsMoreModeResponse( 1620 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo) 1621{ 1622 PrintResponseInfo("SendSmsMoreModeResponse", responseInfo); 1623 cout << "[pdu] : " << sendSmsResultInfo.pdu.c_str() << endl << endl; 1624 return 0; 1625} 1626 1627int32_t RilCallbackTest::SendSmsAckResponse(const RilRadioResponseInfo &responseInfo) 1628{ 1629 PrintResponseInfo("SendSmsAckResponse", responseInfo); 1630 return 0; 1631} 1632 1633int32_t RilCallbackTest::CommonErrorResponse(const RilRadioResponseInfo &responseInfo) 1634{ 1635 PrintResponseInfo("SendSmsAckResponse", responseInfo); 1636 return 0; 1637} 1638} // namespace Telephony 1639} // namespace OHOS 1640