From ff1e8275479b0cca54d90a2eaa6cc9cf3a5e38e1 Mon Sep 17 00:00:00 2001 From: qq_40317179 <15201119555@139.com> Date: Thu, 19 Dec 2024 14:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=AB=99=E6=8E=A5=E5=8F=A3=E6=95=B4?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Attribute/CommandAttribute.cs | 22 + .../ConnectBase/ConnectInstBase.cs | 543 + .../ConnectBase/SSH/SshInfo.cs | 29 + .../ConnectBase/SSH/SshInstBase.cs | 355 + .../ConnectBase/Socket/Encrypt.cs | 118 + .../Socket/SocketClientInstBase.cs | 445 + .../Socket/SocketServerInstBase.cs | 346 + .../ConnectBase/Socket/Sockets.cs | 98 + .../ConnectBase/Visa32/Visa32.cs | 779 + .../ConnectBase/Visa32/Visa32InstBase.cs | 813 + .../Ericsson/EricssonBaseStationTester.cs | 5276 +++++ .../BaseStation/Ericsson/MoShellResult.cs | 299 + .../Huawei/HuaweiBaseStationTester.cs | 12786 ++++++++++++ .../BaseStation/Nokia/Model/AlarmsInfoRoot.cs | 60 + .../BaseStation/Nokia/Model/NokiaBaseRoot.cs | 912 + .../Nokia/NokiaBaseStationTester.cs | 3056 +++ .../Virtual/VirtualBaseStationTester.cs | 168 + .../Manage/Converters/NumberEnumConverter.cs | 62 + .../ZTE/Manage/DistinctItemComparer.cs | 26 + .../Manage/EasyApi/EasyApiENodesBExtension.cs | 2461 +++ .../Manage/EasyApi/EasyApiQuickExtension.cs | 16964 ++++++++++++++++ .../EasyApi/EasyApiRelationExtension.cs | 91 + .../BaseStation/ZTE/Manage/Logger.cs | 63 + .../ZTE/Manage/Management/CellExtension.cs | 25 + .../Manage/Management/CmtaskmngExtension.cs | 41 + .../Manage/Management/CurrentAreaExtension.cs | 221 + .../Manage/Management/MoHandleExtension.cs | 167 + .../ZTE/Manage/Management/NEExtension.cs | 58 + .../Manage/Management/PlannedAreaExtension.cs | 337 + .../Management/ReportConfigNRExtension.cs | 82 + .../BaseStation/ZTE/Manage/MoConfigTask.cs | 70 + .../ZTE/Manage/Models/AttrFilter.cs | 12 + .../ZTE/Manage/Models/Carrier/CarrierUL.cs | 719 + .../Manage/Models/Cell/CellMobileStandard.cs | 46 + .../ZTE/Manage/Models/Cell/CellModel.cs | 26 + .../MoConfigArgExternalEUtranCellFDDLTE.cs | 32 + .../Models/Cell/MoQueryResultCarrierUL.cs | 24 + .../Cell/MoQueryResultExternalNrCellLTE.cs | 101 + .../Models/Cell/MoQueryResultNRCarrier.cs | 27 + .../Models/Cell/MoQueryResultNRCellCU.cs | 62 + .../Models/Cell/MoQueryResultNRCellDU.cs | 77 + .../Models/Cmtaskmng/TaskStatusResult.cs | 24 + .../Models/CurrentArea/DataExportArg.cs | 34 + .../Models/CurrentArea/DataExportResult.cs | 12 + .../Manage/Models/CurrentArea/FileFormat.cs | 11 + .../Manage/Models/CurrentArea/LicenseModel.cs | 138 + .../Models/CurrentArea/ModataQueryArg.cs | 31 + .../MoQueryResultENBCUCPFunction.cs | 23 + .../Manage/Models/EasyApi/CellDefiningSSB.cs | 33 + .../Manage/Models/EasyApi/CellParameter.cs | 80 + .../ZTE/Manage/Models/EasyApi/InterFHoA1A2.cs | 122 + .../Manage/Models/EasyApi/MoConfigArgCell.cs | 29 + .../Models/EasyApi/MoConfigArgLockCell.cs | 22 + .../Models/EasyApi/MoDataQueryResult.cs | 624 + .../Models/EasyApi/MoGetQueryCellsResult.cs | 26 + .../Models/EasyApi/ModataQueryCellsResult.cs | 58 + .../EasyApi/ModataQueryCellsResultCell.cs | 190 + .../EasyApi/ModataQueryCellsResultCellCU.cs | 63 + .../EasyApi/QueryNEsUseMoQueryResult.cs | 44 + .../Models/EasyApi/SetCellAdminStatus.cs | 33 + .../Manage/Models/EasyApi/SetCellThresho.cs | 105 + .../Manage/Models/EasyApi/ThreshoValues.cs | 21 + .../ZTE/Manage/Models/ErrorMessage.cs | 16 + .../ZTE/Manage/Models/General/CellObject.cs | 13 + .../ZTE/Manage/Models/General/NEObject.cs | 18 + .../ZTE/Manage/Models/MoConfigArgBaseT.cs | 16 + .../ZTE/Manage/Models/MoConfigArgObject.cs | 16 + .../BaseStation/ZTE/Manage/Models/MoFilter.cs | 12 + .../Manage/Models/MoHandle/MocQueryResult.cs | 98 + .../BaseStation/ZTE/Manage/Models/MoOp.cs | 13 + .../ZTE/Manage/Models/MoQueryResultBaseT.cs | 25 + .../Models/MoQueryResultMsRATPriFDDLTE.cs | 22 + .../Models/MoQueryResultNRPhysicalCellDU.cs | 177 + .../NetworkElement/MesResultNEObject.cs | 150 + .../NetworkElement/MoQueryResultSctp.cs | 39 + .../NetworkElement/SubnetworksResultObject.cs | 31 + .../NetworkElement/TreeResultNEObject.cs | 44 + .../Manage/Models/PlannedArea/Authority.cs | 12 + .../Models/PlannedArea/GetResultTask.cs | 19 + .../PlannedArea/PlannedareaActivateArg.cs | 11 + .../Models/PlannedArea/ValidationArg.cs | 13 + .../MoConfigArgEUtranRelationFDDLTE.cs | 32 + .../MoConfigArgEutranCellRelation.cs | 37 + .../MoConfigArgExternalEutranCellFDD.cs | 24 + .../Relations/MoConfigArgExternalNRCellCU.cs | 16 + .../Relations/MoConfigArgExternalNrCellLTE.cs | 87 + .../Relations/MoConfigArgNRCellRelation.cs | 33 + .../MoConfigArgNRExternalCellRelation.cs | 13 + .../Relations/MoConfigArgNrNiborRelaFDDLTE.cs | 39 + .../Relations/MoConfigArgSsbMeasInfo.cs | 13 + .../MoQueryResultEUtranRelationFDDLTE.cs | 52 + .../MoQueryResultEutranCellRelation.cs | 30 + .../MoQueryResultExternalEUtranCellFDDLTE.cs | 82 + .../MoQueryResultExternalEutranCellFDD.cs | 52 + .../MoQueryResultExternalNRCellCU.cs | 3334 +++ .../Relations/MoQueryResultNRCellRelation.cs | 552 + .../Models/Relations/MoQueryResultNbrCell.cs | 14 + .../MoQueryResultNeighbouringRelationFDD.cs | 14 + .../MoQueryResultNrNiborRelaFDDLTE.cs | 28 + .../MoConfigArgA2_A3_A5eventOffset.cs | 44 + .../MoConfigArgA2rsrpThreshold.cs | 12 + .../ReportConfigNR/MoConfigArgCarrier.cs | 1419 ++ .../ReportConfigNR/MoConfigArgEutranFreq.cs | 12 + .../MoConfigArgEutranFreqRelation.cs | 13 + .../MoConfigArgFrequencyBandList.cs | 13 + .../MoConfigArgGlobalSwitchInformation.cs | 12 + .../ReportConfigNR/MoConfigArgHysteresis.cs | 14 + .../MoConfigArgLteA1_A2_A3_A4.cs | 12 + .../Models/ReportConfigNR/MoConfigArgLteA5.cs | 13 + .../ReportConfigNR/MoConfigArgLteToNrB1.cs | 13 + .../ReportConfigNR/MoConfigArgLteToNrB2.cs | 13 + .../ReportConfigNR/MoConfigArgMeasConfig.cs | 12 + .../ReportConfigNR/MoConfigArgMeasObjEUTRA.cs | 14 + .../ReportConfigNR/MoConfigArgMobilityCtrl.cs | 15 + .../Models/ReportConfigNR/MoConfigArgNRA1.cs | 168 + .../ReportConfigNR/MoConfigArgNRFreq.cs | 15 + .../MoConfigArgNRFreqParaFDDLTE.cs | 11 + .../MoConfigArgNRInterFCovHo.cs | 34 + .../MoConfigArgNRInterFMeasConfig.cs | 18 + .../MoConfigArgNROpenInterFHo.cs | 27 + .../MoConfigArgNrRatMeasCfgLTE.cs | 14 + .../MoConfigArgReportConfigNR.cs | 12 + .../MoConfigArgSwitchA3_A4_A5.cs | 15 + .../MoConfigArgSwitchLTEB1_B2.cs | 15 + .../MoConfigArgSwitchNRB1_B2.cs | 15 + .../MoConfigArgUeEUtranMeasurementLTE.cs | 15 + .../MoConfigArgblindA2Strategy.cs | 12 + .../MoConfigArgmethodLTEtoNR.cs | 12 + .../ReportConfigNR/MoConfigArgnLPsHoSwch.cs | 12 + .../ReportConfigNR/MoConfigArgratPriority8.cs | 12 + .../MoConfigArgsADirectMigSwch.cs | 12 + .../MoConfigArgsSBToMeasBitmap.cs | 15 + .../MoConfigArgsrd4ForCoverage.cs | 12 + .../MoConfigResultNRFreqRelation.cs | 13 + .../MoQueryResultCUEUtranCellFDDLTE.cs | 1134 ++ .../MoQueryResultCellMeasGroupLTE.cs | 150 + .../MoQueryResultEUtranCellMeasFDDLTE.cs | 253 + .../ReportConfigNR/MoQueryResultEutranFreq.cs | 16 + .../MoQueryResultEutranFreqRelation.cs | 15 + .../MoQueryResultFrequencyBandList.cs | 15 + .../MoQueryResultGNBCUCPFunction.cs | 32 + .../MoQueryResultGlobalSwitch.cs | 218 + .../MoQueryResultGlobalSwitchInformation.cs | 29 + .../MoQueryResultInterRATCovHo.cs | 70 + .../ReportConfigNR/MoQueryResultMeasConfig.cs | 14 + .../MoQueryResultMeasObjEUTRA.cs | 19 + .../MoQueryResultMobilityCtrl.cs | 41 + .../MoQueryResultNRCloseInterFRATHo.cs | 24 + .../ReportConfigNR/MoQueryResultNRFreq.cs | 15 + .../MoQueryResultNRFreqParaFDDLTE.cs | 42 + .../MoQueryResultNRFreqRelation.cs | 15 + .../MoQueryResultNRInterFCovHo.cs | 84 + .../MoQueryResultNRInterFMeasConfig.cs | 20 + .../MoQueryResultNRIntraFCovHo.cs | 75 + .../MoQueryResultNROpenInterFHo.cs | 23 + .../MoQueryResultNROpenInterFRATHo.cs | 24 + .../MoQueryResultNrRatMeasCfgLTE.cs | 88 + .../MoQueryResultUeEUtranMeasurementLTE.cs | 40 + .../MoQueryResultUeRATMeasurementLTE.cs | 37 + .../ZTE/Manage/Models/ReturnMessage.cs | 12 + .../ZTE/Manage/Models/TreeFilter.cs | 12 + .../BaseStation/ZTE/Manage/Models/eventId.cs | 63 + .../ZTE/Manage/Models/neListObject.cs | 19 + .../BaseStation/ZTE/Manage/Models/netype.cs | 15 + .../ZTE/Manage/Models/rptAmount.cs | 18 + .../ZTE/Manage/Models/rptInterval.cs | 24 + .../ZTE/Manage/Models/rptQuantity.cs | 18 + .../ZTE/Manage/Models/timeToTrigger.cs | 26 + .../ZTE/Manage/Models/triggerQuantity.cs | 13 + .../BaseStation/ZTE/Manage/ZTEClient.cs | 199 + .../BaseStation/ZTE/Manage/ZTETask.cs | 59 + .../BaseStation/ZTE/ZTEBaseStationTester.cs | 2836 +++ .../BaseStation/ZTEBaseStationTester.cs | 36 - Admin.NET/MTNet.Application/Entity/Cell.cs | 134 +- .../MTNet.Application/Enum/DeviceTypeEnum.cs | 5 +- .../IEricssonBaseStationTester.cs | 11 + .../IBaseStation/IHuaweiBaseStationTester.cs | 11 + .../IBaseStation/INokiaBaseStationTester.cs | 39 + .../IBaseStation/IVirtualBaseStationTester.cs | 11 + .../IBaseStation/IZTEBaseStationTester.cs | 83 + .../IDAL/IBaseStationTester.cs | 190 +- .../IDAL/Utils/Algorithms.cs | 64 + .../IDAL/Utils/EnumHelper.cs | 177 + .../IDAL/Utils/ErrorCodeHelper.cs | 84 + .../IDAL/Utils/IEnumerableHelper.cs | 101 + .../IDAL/Utils/TaskHelper.cs | 48 + Admin.NET/MTNet.Application/Job/CellJob.cs | 109 +- .../SeedData/DeviceSeedData.cs | 2 +- .../Service/Device/BaseStationService.cs | 2 +- .../Service/Device/Dto/CellInput.cs | 88 +- 190 files changed, 63838 insertions(+), 73 deletions(-) create mode 100644 Admin.NET/MTNet.Application/Attribute/CommandAttribute.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/SSH/SshInfo.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/SSH/SshInstBase.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Socket/Encrypt.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Socket/SocketClientInstBase.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Socket/SocketServerInstBase.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Socket/Sockets.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32.cs create mode 100644 Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32InstBase.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/MoShellResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Huawei/HuaweiBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/AlarmsInfoRoot.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/NokiaBaseRoot.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/NokiaBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Virtual/VirtualBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Converters/NumberEnumConverter.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/DistinctItemComparer.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiENodesBExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiQuickExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiRelationExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Logger.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CellExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CmtaskmngExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CurrentAreaExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/MoHandleExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/NEExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/PlannedAreaExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/ReportConfigNRExtension.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/MoConfigTask.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/AttrFilter.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Carrier/CarrierUL.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellMobileStandard.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellModel.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoConfigArgExternalEUtranCellFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultCarrierUL.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultExternalNrCellLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCarrier.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellCU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellDU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cmtaskmng/TaskStatusResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportArg.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/FileFormat.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/LicenseModel.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/ModataQueryArg.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ENBCUCPFunction/MoQueryResultENBCUCPFunction.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellDefiningSSB.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellParameter.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/InterFHoA1A2.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgCell.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgLockCell.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoDataQueryResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoGetQueryCellsResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCell.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCellCU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/QueryNEsUseMoQueryResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellAdminStatus.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellThresho.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ThreshoValues.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ErrorMessage.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/CellObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/NEObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgBaseT.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoFilter.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoHandle/MocQueryResult.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoOp.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultBaseT.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultMsRATPriFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultNRPhysicalCellDU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MesResultNEObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MoQueryResultSctp.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/SubnetworksResultObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/TreeResultNEObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/Authority.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/GetResultTask.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/PlannedareaActivateArg.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/ValidationArg.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEUtranRelationFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEutranCellRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalEutranCellFDD.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNRCellCU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNrCellLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRCellRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRExternalCellRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNrNiborRelaFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgSsbMeasInfo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEUtranRelationFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEutranCellRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEUtranCellFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEutranCellFDD.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalNRCellCU.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNRCellRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNbrCell.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNeighbouringRelationFDD.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNrNiborRelaFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2_A3_A5eventOffset.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2rsrpThreshold.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgCarrier.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreq.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreqRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgFrequencyBandList.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgGlobalSwitchInformation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgHysteresis.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA1_A2_A3_A4.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA5.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB1.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB2.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasConfig.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasObjEUTRA.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMobilityCtrl.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRA1.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreq.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreqParaFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFCovHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFMeasConfig.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNROpenInterFHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNrRatMeasCfgLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgReportConfigNR.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchA3_A4_A5.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchLTEB1_B2.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchNRB1_B2.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgUeEUtranMeasurementLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgblindA2Strategy.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgmethodLTEtoNR.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgnLPsHoSwch.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgratPriority8.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsADirectMigSwch.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsSBToMeasBitmap.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsrd4ForCoverage.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigResultNRFreqRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCUEUtranCellFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCellMeasGroupLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEUtranCellMeasFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreq.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreqRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultFrequencyBandList.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGNBCUCPFunction.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitch.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitchInformation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultInterRATCovHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasConfig.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasObjEUTRA.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMobilityCtrl.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRCloseInterFRATHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreq.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqParaFDDLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqRelation.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFCovHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFMeasConfig.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRIntraFCovHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFRATHo.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNrRatMeasCfgLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeEUtranMeasurementLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeRATMeasurementLTE.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReturnMessage.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/TreeFilter.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/eventId.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/neListObject.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/netype.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptAmount.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptInterval.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptQuantity.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/timeToTrigger.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/triggerQuantity.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTEClient.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTETask.cs create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/ZTEBaseStationTester.cs delete mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStation/IEricssonBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStation/IHuaweiBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStation/INokiaBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStation/IVirtualBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStation/IZTEBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/Utils/Algorithms.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/Utils/EnumHelper.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/Utils/ErrorCodeHelper.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/Utils/IEnumerableHelper.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/Utils/TaskHelper.cs diff --git a/Admin.NET/MTNet.Application/Attribute/CommandAttribute.cs b/Admin.NET/MTNet.Application/Attribute/CommandAttribute.cs new file mode 100644 index 00000000..1ba85bf3 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/CommandAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application +{ + /// + /// 指定属性对应的的指令 + /// + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]//通过 AttributeUsageAttribute 限定定义特性可以应用在哪种类型上。 + public class CommandAttribute : Attribute + { + public string Command { get; set; } + + public CommandAttribute(string command) + { + Command = command; + } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs new file mode 100644 index 00000000..ef8416d3 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs @@ -0,0 +1,543 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + public class ConnectInstBase + { + DeviceAddrConfig _addrConfig = new DeviceAddrConfig(); + SocketClientInstBase _socketClient; + Visa32InstBase _visa32; + protected SshInstBase _sshInstBase; + + /// + /// 是否异步读取信息 + /// + public bool IsAsynchronous { get; set; } = false; + + public DeviceAddrConfig AddrConfig { get => _addrConfig; set => _addrConfig = value; } + + public int Timeout { get; set; } = 5000; + + /// + /// 构造函数 + /// + /// 设备地址信息配置 + public ConnectInstBase(DeviceAddrConfig addrConfig) + { + _addrConfig = addrConfig; + if (_addrConfig.UseVisaProgrammerConfig) + { + if (_addrConfig.CommunicationTypeConfig == CommunicationTypeEnum.Socket) + { + _visa32 = new Visa32InstBase(_addrConfig.RealAddrConfig); + _visa32.SetTimeOut(300000); + } + else + { + _visa32 = new Visa32InstBase(_addrConfig.AddrConfig); + _visa32.SetTimeOut(300000); + } + _visa32.DeviceName = _addrConfig.DeviceTypeConfig.GetDescription(); + } + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + _socketClient = new SocketClientInstBase(_addrConfig.AddrConfig, _addrConfig.PortConfig); + _socketClient.DeviceName = _addrConfig.DeviceTypeConfig.GetDescription(); + break; + case CommunicationTypeEnum.SSH: + _sshInstBase = new SshInstBase(_addrConfig.AddrConfig, _addrConfig.PortConfig, _addrConfig.UserName, _addrConfig.Password); + _sshInstBase.DeviceName = _addrConfig.DeviceTypeConfig.GetDescription(); + break; + default: + break; + } + } + } + + /// + /// 针对使用脉冲查询的轴,进行单独的设备连接 + /// + /// + /// + /// + public int Connect(string ipAddress, int port) + { + _socketClient = new SocketClientInstBase(ipAddress, port); + _socketClient.DeviceName = _addrConfig.DeviceTypeConfig.GetDescription(); + _socketClient.IsAsynchronous = IsAsynchronous; + return _socketClient.Connect(); + } + + /// + /// 设备连接 + /// + /// + public virtual int Connect() + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + { + rtn += _visa32.Connect(); + _visa32.SetTimeOut(300000); + } + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + _socketClient.IsAsynchronous = IsAsynchronous; + rtn += _socketClient.Connect(); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.Connect(); + break; + default: + break; + } + } + + return rtn; + } + + public virtual int SetTimeout(int timeInMS) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn = _visa32.SetTimeOut(timeInMS); + return rtn; + } + + /// + /// 关闭连接 + /// + /// + public virtual int Close() + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Close(); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.Close(); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.Close(); + break; + default: + break; + } + } + return rtn; + } + + public int CheckOpc() + { + int rtn = 0; + + return rtn; + } + + /// + /// 查询上条指令是否执行完成 + /// + public void CheckOPC() + { + DateTime dateOld = DateTime.Now; + TimeSpan timespan = new TimeSpan(0); + bool connect = false; + while (timespan.TotalMilliseconds < 1000) + { + timespan = DateTime.Now - dateOld; + connect = CheckStatus(); + if (connect == true) + { + break; + } + } + } + + /// + /// 查询状态 + /// + /// + private bool CheckStatus() + { + string Value = ""; + int rtn = Read("*OPC?", out Value); + if (rtn == Visa32.VI_SUCCESS || rtn == 1) + { + return true; + } + return false; + } + + /// + /// 发送指令 + /// + /// 字符串指令 + /// + public virtual int Write(string cmdStr) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Write(cmdStr); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdStr); + break; + case CommunicationTypeEnum.SSH: + //rtn += _sshInstBase.SendCommand(cmdStr, out var _); + //rtn += _sshInstBase.RunCommand(cmdStr, out var _); + rtn += _sshInstBase.SendCommandAsync(cmdStr, out var _); + break; + default: + break; + } + } + Thread.Sleep(10); + return rtn; + } + + public virtual int Write(string cmdStr, string endStr) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Write(cmdStr, endStr); + else + { + cmdStr += endStr; + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdStr); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommandAsync(cmdStr, out var _); + break; + default: + break; + } + } + Thread.Sleep(10); + return rtn; + } + + /// + /// 发送指令 + /// + /// 字节数组指令 + /// + public virtual int Write(byte[] cmdbyte) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Write(Encoding.Default.GetString(cmdbyte)); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + break; + case CommunicationTypeEnum.Socket: + //rtn += _socketClient.SendData(Encoding.UTF8.GetString(cmdbyte)); + rtn += _socketClient.SendData(cmdbyte); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommand(cmdbyte, out var _); + break; + default: + break; + } + } + return rtn; + } + + public virtual int WirteFromFile(string strFilename, int iDatalen) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.WirteFromFile(strFilename, iDatalen); + return rtn; + } + private object _objLock = new object(); + /// + /// 查询指令,先发送,再查询 + /// + /// 发送的指令 + /// 接收到的信息 + /// + public virtual int Read(string cmdStr, out string rtnStr, int waitTime = 2) + { + lock (_objLock) + { + int rtn = 0; + byte[] cmdbyte; + byte[] rtnbyte = new byte[10000]; + int byteCount = 0; + var timeOut = TimeSpan.FromSeconds(30); + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Read(cmdStr, out rtnStr, waitTime); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnStr = ""; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdStr); + Thread.Sleep(waitTime); + try + { + var taskReceive = Task.Run(() => + { + string content = string.Empty; + _socketClient.ReceiveData(out content); + return content; + }).TimeoutAfter(timeOut); + taskReceive.Wait(); + rtnStr = taskReceive.Result; + } + catch (TimeoutException ex) + { + //SystemLogger.Logger.Error($"Read Command {cmdStr} Timeout!", ex); + throw ex; + } + + //rtn += _socketClient.ReceiveData(out rtnStr); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommand(cmdStr, out rtnStr); + break; + default: + rtnStr = ""; + break; + } + } + return rtn; + } + } + + public virtual int Read(string cmdStr, out double rtnDb, int waitTime = 2) + { + int rtn = 0; + string rtnStr = ""; + rtn += Read(cmdStr, out rtnStr, waitTime); + if (!double.TryParse(rtnStr, out rtnDb)) + { + // DeviceControlLogger.Logger.Error("Read Command " + cmdStr + " Error !", new Exception("Value Convert Faild !")); + // throw new DeviceException("Read Command " + cmdStr + " Error !"); + } + return rtn; + } + + public virtual int Read(string cmdStr, out int rtnInt, int waitTime = 2) + { + int rtn = 0; + double rtnDb = 0; + rtn += Read(cmdStr, out rtnDb, waitTime); + rtnInt = Convert.ToInt32(rtnDb); + return rtn; + } + + /// + /// 查询指令,先发送,再接收 + /// + /// 发送指令 + /// 接受到的信息 + /// + public virtual int Read(string cmdStr, out byte[] rtnbyte, int waitTime = 2) + { + int rtn = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Read(cmdStr, out rtnbyte, waitTime); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnbyte = new byte[1] { 0 }; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdStr); + Thread.Sleep(waitTime); + rtn += _socketClient.ReceiveData(out rtnbyte); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommand(cmdStr, out var result); + rtnbyte = Encoding.ASCII.GetBytes(result); + break; + default: + rtnbyte = new byte[1] { 0 }; + break; + } + } + return rtn; + } + + /// + /// 查询指令,先发送,再接收 + /// + /// 发送指令 + /// 接受到的信息 + /// + public virtual int Read(byte[] cmdbyte, out byte[] rtnbyte, int waitTime = 2) + { + int rtn = 0; + int byteCount = 0; + + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Read(Encoding.Default.GetString(cmdbyte), out rtnbyte, waitTime); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnbyte = new byte[1] { 0 }; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdbyte); + Thread.Sleep(waitTime); + rtn += _socketClient.ReceiveData(out rtnbyte); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommand(cmdbyte, out var result); + rtnbyte = Encoding.ASCII.GetBytes(result); + break; + default: + rtnbyte = new byte[1] { 0 }; + break; + } + } + return rtn; + } + + public virtual int Read(byte[] cmdbyte, int rtnbyteLength, out byte[] rtnbyte, int waitTime = 2) + { + int rtn = 0; + int byteCount = 0; + + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.Read(Encoding.Default.GetString(cmdbyte), out rtnbyte, waitTime); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnbyte = new byte[1] { 0 }; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.SendData(cmdbyte); + Thread.Sleep(waitTime); + rtn += _socketClient.ReceiveData(rtnbyteLength, out rtnbyte); + break; + case CommunicationTypeEnum.SSH: + rtn += _sshInstBase.SendCommand(cmdbyte, out var result); + rtnbyte = Encoding.ASCII.GetBytes(result); + break; + default: + rtnbyte = new byte[1] { 0 }; + break; + } + } + return rtn; + } + /// + /// 只接收指令 + /// + /// 接收到的信息 + /// + public virtual int ReadOnly(out string rtnStr) + { + int rtn = 0; + byte[] rtnbyte = new byte[1000]; + int byteCount = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.ReadOnly(out rtnStr); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnStr = ""; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.ReceiveData(out rtnStr); + break; + default: + rtnStr = ""; + break; + } + } + return rtn; + } + + public virtual int ReadOnly(out double rtnDb) + { + int rtn = 0; + string rtnStr = ""; + rtn += ReadOnly(out rtnStr); + if (!double.TryParse(rtnStr, out rtnDb)) + { + // DeviceControlLogger.Logger.Error("ReadOnly Command Error !", new Exception("Value Convert Faild !")); + // throw new DeviceException("Check Command Error !"); + } + return rtn; + } + + /// + /// 只接收信息 + /// + /// 接收到的信息 + /// + public virtual int ReadOnly(out byte[] rtnbyte) + { + int rtn = 0; + int byteCount = 0; + if (_addrConfig.UseVisaProgrammerConfig) + rtn += _visa32.ReadOnly(out rtnbyte); + else + { + switch (_addrConfig.CommunicationTypeConfig) + { + case CommunicationTypeEnum.GPIB: + rtnbyte = new byte[1] { 0 }; + break; + case CommunicationTypeEnum.Socket: + rtn += _socketClient.ReceiveData(out rtnbyte); + break; + default: + rtnbyte = new byte[1] { 0 }; + break; + } + } + return rtn; + } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInfo.cs b/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInfo.cs new file mode 100644 index 00000000..c757b265 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInfo.cs @@ -0,0 +1,29 @@ +using MTNet.Application; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + public class SshInfo + { + string _host = ""; + [Description("Set SSH Host."), Category("SSH Parameters"), PropertyOrder(1), DisplayName("Host"), Browsable(true), ReadOnly(false)] + public string Host { get => _host; set => _host = value; } + + int _port = 22; + [Description("Set SSH Port."), Category("SSH Parameters"), PropertyOrder(2), DisplayName("Port"), Browsable(true), ReadOnly(false)] + public int Port { get => _port; set => _port = value; } + + string _userName = ""; + [Description("Set SSH UserName."), Category("SSH Parameters"), PropertyOrder(3), DisplayName("UserName"), Browsable(true), ReadOnly(false)] + public string UserName { get => _userName; set => _userName = value; } + + string _password = ""; + [Description("Set SSH Password."), Category("SSH Parameters"), PropertyOrder(4), DisplayName("Password"), Browsable(true), ReadOnly(false)] + public string Password { get => _password; set => _password = value; } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInstBase.cs new file mode 100644 index 00000000..9cfb7807 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/SSH/SshInstBase.cs @@ -0,0 +1,355 @@ +using Renci.SshNet; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + + +namespace MTNet.Application.ConnectBase +{ + public class SshInstBase + { + public SshInstBase() + { + + } + + public SshInstBase(string ipAddress, int port, string userName, string password) + { + IpAddress = ipAddress; + Port = port; + UserName = userName; + Password = password; + } + + public string IpAddress { get; } + public int Port { get; } + public string UserName { get; } + public string Password { get; } + + private SshInfo _sshInfo; + public SshClient SshClient; + public SftpClient SftpClient; + + /// + /// 设备名称 + /// + public string DeviceName { get; set; } = "Deivce1"; + + /// + /// 设备信息,主要是包括设备名称,通信地址,端口号等 + /// + public string Info { get; set; } = ""; + + /// + /// 连接状态 + /// + public bool ConnectStatus { get; set; } = false; + + /// + /// 初始化 + /// + private void InitSSH() + { + if (!IPAddress.TryParse(IpAddress, out _)) + { + //DeviceControlLogger.Logger.Error("Error", new Exception($"IP Address {IpAddress} Error"));//错误; + //throw new DeviceException($"IP Address {IpAddress} Error"); + } + + _sshInfo = new SshInfo(); + _sshInfo.Host = IpAddress; + _sshInfo.Port = Port; + _sshInfo.UserName = UserName; + _sshInfo.Password = Password; + } + + /// + /// 连接服务端 + /// + public virtual int Connect() + { + int rtn = 0; + try + { + if (!ConnectStatus) + { + InitSSH(); + Info = $"{DeviceName}\t{IpAddress}\t"; + + SshClient = new SshClient(_sshInfo.Host, _sshInfo.Port, _sshInfo.UserName, _sshInfo.Password); + SshClient.Connect(); + + rtn = 0; + ConnectStatus = true; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Connect Successed"); + } + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Error($"{Info} Connect Failed", ex); + //throw new DeviceException($"{Info} Connect Failed"); + } + return rtn; + } + + /// + /// 停止 + /// + public virtual int Close() + { + int rtn = 0; + + if (SshClient != null && ConnectStatus) + { + try + { + SshClient.Disconnect(); + SshClient.Dispose(); + SshClient = null; + + rtn = 0; + ConnectStatus = false; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} DisConnect Successed"); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Error($"{Info} DisConnect Failed", ex); + //throw new DeviceException($"{Info} DisConnect Failed"); + } + } + return rtn; + } + + public virtual int SendCommand(byte[] sendData, out string result) + { + string cmdText = Encoding.Default.GetString(sendData); + return SendCommand(cmdText, out result); + } + + /// + /// 同步执行命令,每次只能执行单次命令操作,发送指令方式与RunCommand()一致,无法实现连续操作 + /// + public virtual int SendCommand(string cmdText, out string result) + { + if (cmdText == null || cmdText.Length == 0) + throw new Exception("Command text is null."); + + if (!SshClient.IsConnected) + throw new Exception("Client not connect."); + + int rtn = 0; + try + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Write:" + cmdText); + + var sshCommand = SshClient.CreateCommand(cmdText); + if (sshCommand == null) + throw new Exception("SSHCommand is null."); + + sshCommand.Execute(); + + if (!string.IsNullOrWhiteSpace(sshCommand.Error)) + throw new Exception(sshCommand.Error); + + result = sshCommand.Result; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Read:" + result); + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH SendCommand Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + + /// + /// 对服务器发送指令,并接收实时回馈,但是无法进行连续指令输入 + /// 如果是有两条指令执行,需要通过“;”符号分隔,比方说:cd/home; ls + /// + public int RunCommand(string cmdText, out string result) + { + if (cmdText == null || cmdText.Length == 0) + throw new Exception("Command text is null."); + + if (!SshClient.IsConnected) + throw new Exception("Client not connect."); + + int rtn = 0; + try + { + var sshCommand = SshClient.RunCommand(cmdText); + if (sshCommand == null) + throw new Exception("SSHCommand is null."); + + if (!string.IsNullOrWhiteSpace(sshCommand.Error)) + throw new Exception(sshCommand.Error); + + result = sshCommand.Result; + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH RunCommand Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + + /// + /// 异步执行命令,每次只能执行单次命令操作,发送指令方式与RunCommand()一致,无法实现连续操作 + /// + public int SendCommandAsync(string cmdText, out string result) + { + if (cmdText == null || cmdText.Length == 0) + throw new Exception("Command text is null."); + + if (!SshClient.IsConnected) + throw new Exception("Client not connect."); + + int rtn = 0; + try + { + var sshCommand = SshClient.CreateCommand(cmdText); + if (sshCommand == null) + throw new Exception("SSHCommand is null."); + + if (!string.IsNullOrWhiteSpace(sshCommand.Error)) + throw new Exception(sshCommand.Error); + + var asyncExecute = sshCommand.BeginExecute(); + //var reader = new System.IO.StreamReader(sshCommand.OutputStream); + //string outStr; + //while ((outStr = reader.ReadLine()) != null) + //{ + // //RecvMessage(outStr); + //} + + //result = sshCommand.EndExecute(asyncExecute); + + result = sshCommand.Result; + //RecvMessage(result); + //DeviceControlLogger.Logger.Info($"SendCommandAsync run command:{cmdText},result:{result}"); + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH SendCommandAsync Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + + /// + /// 通过流 发送即时命令 + /// + public int SendCommandToShellStream(string cmdText, ShellStream shellStream, out string result) + { + //if (cmdText == null || cmdText.Length == 0) + // throw new Exception("Command text is null."); + + if (!SshClient.IsConnected) + throw new Exception("Client not connect."); + + int rtn = 0; + StreamReader reader = null; + try + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} ShellStream Write:" + cmdText); + + reader = new StreamReader(shellStream); + StreamWriter sw = new StreamWriter(shellStream); + sw.AutoFlush = true; + sw.WriteLine(cmdText); + Thread.Sleep(500);//此延时为等待执行结果返回,未加可能会导致读取结果为空 + while (shellStream.Length == 0) + { + Thread.Sleep(500); + } + result = reader.ReadToEnd(); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} ShellStream Read:" + result); + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH SendCommandToShellStream Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + + /// + /// 上传单个文件到服务器,返回上传结果,成功返回空字符串,失败返回失败原因字符串 + /// + public int UploadFile(string localFileName, string serverFileName, out string result) + { + int rtn = 0; + try + { + using (var sftp = new SftpClient(_sshInfo.Host, _sshInfo.Port, _sshInfo.UserName, _sshInfo.Password)) + { + sftp.Connect(); + using (var fileStream = File.OpenRead(localFileName)) + { + sftp.UploadFile(fileStream, serverFileName, true, null); + } + sftp.Disconnect(); + sftp.Dispose(); + result = string.Empty; + } + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH UploadFile Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + + /// + /// 从服务器下载文件,返回下载结果,成功返回空字符串,失败返回失败原因字符串 + /// + public int DownloadFile(string serverFileName, string localSavePath, out string result) + { + int rtn = 0; + try + { + using (var sftp = new SftpClient(_sshInfo.Host, _sshInfo.Port, _sshInfo.UserName, _sshInfo.Password)) + { + sftp.Connect(); + using (var fileStream = File.OpenWrite(localSavePath)) + { + sftp.DownloadFile(serverFileName, fileStream); + } + sftp.Disconnect(); + sftp.Dispose(); + result = string.Empty; + } + } + catch (Exception ex) + { + rtn = -1; + result = $"SSH DownloadFile Error,{ex.Message}"; + //SystemLogger.Logger.Error(result, ex); + } + return rtn; + } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Socket/Encrypt.cs b/Admin.NET/MTNet.Application/ConnectBase/Socket/Encrypt.cs new file mode 100644 index 00000000..ad534d40 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/Encrypt.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + + /// + /// 数据DES加密 + /// + public class Encrypt + { + private byte[] iba_mIV = new byte[8]; //向量 + private byte[] iba_mKey = new byte[8]; //密钥 + private DESCryptoServiceProvider io_DES = new DESCryptoServiceProvider(); + + public Encrypt() + { + this.iba_mKey[0] = 0x95; + this.iba_mKey[1] = 0xc4; + this.iba_mKey[2] = 0xf6; + this.iba_mKey[3] = 0x49; + this.iba_mKey[4] = 0xac; + this.iba_mKey[5] = 0x61; + this.iba_mKey[6] = 0xa3; + this.iba_mKey[7] = 0xe2; + this.iba_mIV[0] = 0xf9; + this.iba_mIV[1] = 0x6a; + this.iba_mIV[2] = 0x65; + this.iba_mIV[3] = 0xb8; + this.iba_mIV[4] = 0x4a; + this.iba_mIV[5] = 0x23; + this.iba_mIV[6] = 0xfe; + this.iba_mIV[7] = 0xc6; + this.io_DES.Key = this.iba_mKey; + this.io_DES.IV = this.iba_mIV; + } + /// + /// 初始化加密向量与密钥 长度为8 + /// + /// 向量 + /// 密钥 + public Encrypt(byte[] iba_mIV, byte[] iba_mKey) + { + this.io_DES.IV = iba_mIV; + this.io_DES.Key = iba_mKey; + } + /// + /// 解密 + /// + /// + /// + public string doDecrypt(string as_Data) + { + ICryptoTransform lo_ICT = this.io_DES.CreateDecryptor(this.io_DES.Key, this.io_DES.IV); + try + { + byte[] lba_bufIn = this.FromHexString(as_Data);//Encoding.UTF8.GetString(Convert.FromBase64String( + byte[] lba_bufOut = lo_ICT.TransformFinalBlock(lba_bufIn, 0, lba_bufIn.Length); + return Encoding.UTF8.GetString(lba_bufOut); + } + catch + { + return as_Data; + } + } + /// + /// 加密 + /// + /// + /// + public string doEncrypt(string as_Data) + { + ICryptoTransform lo_ICT = this.io_DES.CreateEncryptor(this.io_DES.Key, this.io_DES.IV); + try + { + byte[] lba_bufIn = Encoding.UTF8.GetBytes(as_Data); + byte[] lba_bufOut = lo_ICT.TransformFinalBlock(lba_bufIn, 0, lba_bufIn.Length); + return GetHexString(lba_bufOut);//Convert.ToBase64String(Encoding.UTF8.GetBytes(); + } + catch + { + return ""; + } + } + /// + /// 转换2进制 + /// + /// + /// + private byte[] FromHexString(string as_value) + { + byte[] lba_buf = new byte[Convert.ToInt32((int)(as_value.Length / 2))]; + for (int li_i = 0; li_i < lba_buf.Length; li_i++) + { + lba_buf[li_i] = Convert.ToByte(as_value.Substring(li_i * 2, 2), 0x10); + } + return lba_buf; + } + /// + /// 字节转字符串 + /// + /// + /// + private string GetHexString(byte[] aba_buf) + { + StringBuilder lsb_value = new StringBuilder(); + foreach (byte lb_byte in aba_buf) + { + lsb_value.Append(Convert.ToString(lb_byte, 0x10).PadLeft(2, '0')); + } + return lsb_value.ToString(); + } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketClientInstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketClientInstBase.cs new file mode 100644 index 00000000..1502d669 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketClientInstBase.cs @@ -0,0 +1,445 @@ +using MTNet.Application.IDAL.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + /********* + * Socket通信客户端类,使用方法如下: + * 1)实例化 SocketClientInstBase(IPAddress ipaddress, int port)/SocketClientInstBase(IPAddress ipaddress, int port, string deviceName)/SocketClientInstBase(IPAddress ipaddress, int port, string deviceName,bool IsCatchDeviceControlLog); + * 2)建立连接 Connect(); + * 3)发送或结收数据 SendData(string SendData)/EndReader(IAsyncResult ir) + * 4)断开连接 Close() + *********/ + public class SocketClientInstBase + { + + /// + /// 设备名称 + /// + public string DeviceName { get; set; } = "Deivce1"; + /// + /// 设备信息,主要是包括设备名称,通信地址,端口号等 + /// + public string Info { get; set; } = ""; + /// + /// 连接状态 + /// + public bool ConnectStatus { get; set; } = false; + /// + /// 是否打印Log,即正常信息 + /// + //public bool IsCatchDeviceControlLog { get; set; } = false; + /// + /// 是否异步读取信息 + /// + public bool IsAsynchronous { get; set; } = false; + /// + /// 当前管理对象 + /// + Sockets _sockets; + /// + /// 客户端 + /// + TcpClient _client; + /// + /// 当前连接服务端地址 + /// + public string IPaddress { get; set; } + /// + /// 当前连接服务端端口号 + /// + public int Port { get; set; } + /// + /// 服务端IP+端口 + /// + IPEndPoint _ip; + /// + /// 发送与接收使用的流 + /// + NetworkStream _nStream; + + + public SocketClientInstBase() + { + + } + + + /// + /// 构造函数 + /// + /// IP地址 + /// 端口号 + public SocketClientInstBase(string ipaddress, int port) + { + this.IPaddress = ipaddress; + this.Port = port; + } + + /// + /// 构造函数 + /// + /// IP地址 + /// 端口号 + /// 设备名称 + public SocketClientInstBase(string ipaddress, int port, string deviceName) + { + this.IPaddress = ipaddress; + this.Port = port; + this.DeviceName = deviceName; + } + + + /// + /// 初始化Socket + /// + /// + /// + private void InitSocket(string ipaddress, int port) + { + IPaddress = ipaddress; + Port = port; + if (!IPAddress.TryParse(IPaddress, out var addr)) + { + //DeviceControlLogger.Logger.Error("Error", new Exception($"IP Address {IPaddress} Error"));//错误; + //throw new DeviceException($"IP Address {IPaddress} Error"); + } + _ip = new IPEndPoint(addr, Port); + _client = new TcpClient(); + } + + /// + /// 初始化Socket + /// + /// + /// + private void InitSocket() + { + if (!IPAddress.TryParse(IPaddress, out var addr)) + { + //DeviceControlLogger.Logger.Error("Error", new Exception($"IP Address {IPaddress} Error"));//错误; + //throw new DeviceException($"IP Address {IPaddress} Error"); + } + _ip = new IPEndPoint(addr, Port); + _client = new TcpClient(); + } + + /// + /// 连接服务端 + /// + public virtual int Connect() + { + int rtn = 0; + try + { + if (!ConnectStatus) + { + InitSocket(); + Info = DeviceName + "\t" + _ip.ToString() + "\t"; + _client.Connect(_ip); + _nStream = new NetworkStream(_client.Client, true); + _sockets = new Sockets(_ip, _client, _nStream); + rtn = 0; + ConnectStatus = true; + if (IsAsynchronous) + _sockets.nStream.BeginRead(_sockets.RecBuffer, 0, _sockets.RecBuffer.Length, new AsyncCallback(EndReader), _sockets); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Connect Successed"); + } + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Error($"{Info} Connect Failed", ex); + //throw new DeviceException($"{Info} Connect Failed"); + } + return rtn; + } + + /// + /// 异步读取 + /// + public virtual void EndReader(IAsyncResult ir) + { + Sockets s = ir.AsyncState as Sockets; + try + { + if (s != null) + { + if (!ConnectStatus && _client == null) + { + _sockets.nStream.Close(); + _sockets.nStream.Dispose(); + return; + } + s.Offset = s.nStream.EndRead(ir); + _sockets.nStream.BeginRead(_sockets.RecBuffer, 0, _sockets.RecBuffer.Length, new AsyncCallback(EndReader), _sockets); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Read:" + Encoding.Default.GetString(_sockets.RecBuffer)); + } + } + catch (Exception skex) + { + Sockets sks = s; + sks.ex = skex; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", skex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + + } + /// + /// 停止 + /// + public virtual int Close() + { + Sockets sks = new Sockets(); + int rtn = 0; + + if (_client != null && ConnectStatus) + { + try + { + _client.Client.Shutdown(SocketShutdown.Both); + Thread.Sleep(10); + _client.Close(); + ConnectStatus = false; + _client = null; + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} DisConnect Successed"); + } + catch (Exception ex) + { + rtn = -1; + sks.ex = ex; + //DeviceControlLogger.Logger.Error($"{Info} DisConnect Failed", sks.ex); + //throw new DeviceException($"{Info} DisConnect Failed"); + } + } + return rtn; + } + /// + /// 发送消息 + /// + public int SendData(string SendData) + { + int rtn = 0; + try + { + if (_client == null || !ConnectStatus) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = new Exception($"{Info} The Client Is Not Connet"); + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Send Data Failed", sks.ex); + //throw new DeviceException($"{Info} Send Data Failed"); + } + if (ConnectStatus) //如果连接则发送 + { + if (_nStream == null) + { + _nStream = _client.GetStream(); + } + byte[] buffer = Encoding.UTF8.GetBytes(SendData); + _nStream.Write(buffer, 0, buffer.Length); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Write:" + SendData); + } + } + catch (Exception skex) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = skex; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Send Data Failed", sks.ex); + //throw new DeviceException($"{Info} Send Data Failed"); + } + return rtn; + } + + public int SendData(byte[] SendData) + { + int rtn = 0; + try + { + if (_client == null || !ConnectStatus) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = new Exception($"{Info} The Client Is Not Connect"); + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Send Data Failed", sks.ex); + //throw new DeviceException($"{Info} Send Data Failed"); + } + if (ConnectStatus) //如果连接则发送 + { + if (_nStream == null) + { + _nStream = _client.GetStream(); + } + _nStream.Write(SendData, 0, SendData.Length); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Write:" + Algorithms.ConvertByteArrayToString(SendData)); + } + } + catch (Exception skex) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = skex; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Send Data Failed", sks.ex); + //throw new DeviceException($"{Info} Send Data Failed"); + } + return rtn; + } + + /// + /// 接收消息,同步操作 + /// + public virtual int ReceiveData(out byte[] byteData) + { + int rtn = 0; + byteData = new byte[1024 * 1024]; + try + { + if (_client == null || !ConnectStatus) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = new Exception($"{Info} The Client Is Not Connect"); + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + if (ConnectStatus) //如果连接则读取 + { + if (_nStream == null) + { + _nStream = _client.GetStream(); + } + _nStream.Read(byteData, 0, byteData.Length); + byte[] finalData = Algorithms.Decode(byteData); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Read:" + Encoding.Default.GetString(finalData)); + } + } + catch (Exception skex) + { + Sockets sks = new Sockets(); + sks.ex = skex; + rtn = -1; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + return rtn; + } + + public virtual int ReceiveData(int length, out byte[] byteData) + { + int rtn = 0; + byteData = new byte[length]; + try + { + if (_client == null || !ConnectStatus) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = new Exception($"{Info} The Client Is Not Connect"); + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + if (ConnectStatus) //如果连接则读取 + { + if (_nStream == null) + { + _nStream = _client.GetStream(); + } + _nStream.Read(byteData, 0, byteData.Length); + if (byteData.Length != length) + { + //SystemLogger.Logger.Error($"{Info} Read: package length = {byteData.Length},content = {Algorithms.ConvertByteArrayToString(byteData)} "); + return rtn; + } + byte[] finalData = Algorithms.Decode(byteData); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Read:" + Encoding.Default.GetString(finalData)); + } + } + catch (Exception skex) + { + Sockets sks = new Sockets(); + sks.ex = skex; + rtn = -1; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + return rtn; + } + + public virtual int ReceiveData(out string strData) + { + byte[] byteData = new byte[1024 * 1024]; + strData = string.Empty; + int rtn = 0; + try + { + if (_client == null || !ConnectStatus) + { + rtn = -1; + Sockets sks = new Sockets(); + sks.ex = new Exception($"{Info} The Client Is Not Connet"); + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + //throw new DeviceException($"{Info} Read Data Failed"); + } + if (ConnectStatus) //如果连接则发送 + { + if (_nStream == null) + { + _nStream = _client.GetStream(); + } + _nStream.Read(byteData, 0, byteData.Length); + if (byteData != null && byteData.Length > 0) + { + byte[] finalData = Algorithms.Decode(byteData); + strData = Encoding.Default.GetString(finalData); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{Info} Read:" + strData); + } + + } + } + catch (Exception skex) + { + Sockets sks = new Sockets(); + sks.ex = skex; + rtn = -1; + sks.ClientDispose = true; + //DeviceControlLogger.Logger.Error($"{Info} Read Data Failed", sks.ex); + ////throw new DeviceException($"{Info} Read Data Failed"); + } + return rtn; + } + + + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketServerInstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketServerInstBase.cs new file mode 100644 index 00000000..aa79e8d0 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketServerInstBase.cs @@ -0,0 +1,346 @@ +using MTNet.Application.IDAL.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + /// + /// Tcp同步服务端,SocketObject继承抽象类 + /// 服务端采用TcpListener封装. + /// 使用Semaphore 来控制并发,每次处理5个.最大处理5000 + /// + public class SocketServerInstBase + { + //委托传消息 + //public delegate void PushSockets(Sockets sockets); + //public PushSockets pushSockets; + + bool _isStop = false; + object _obj = new object(); + /// + /// 是否打印Log,即正常信息 + /// + bool _IsCatchDeviceControlLog = false; + public bool IsCatchDeviceControlLog { get => _IsCatchDeviceControlLog; set => _IsCatchDeviceControlLog = value; } + /// + /// 信号量 + /// + private Semaphore _semap = new Semaphore(5, 5000); + /// + /// 客户端队列集合 + /// + public List _clientList = new List(); + /// + /// 服务端 + /// + private TcpListener _listener; + /// + /// 当前IP地址 + /// + private string _ipaddress; + /// + /// 欢迎消息 + /// + public string _boundary = ""; + /// + /// 当前监听端口 + /// + private int _port; + /// + /// 当前IP,端口对象 + /// + private IPEndPoint _ip; + + public SocketServerInstBase() + { + } + + public SocketServerInstBase(string ipAddress, int port) + { + this._ipaddress = ipAddress; + this._port = port; + } + + public SocketServerInstBase(string ipAddress, int port, bool IsCatchDeviceControlLog) + { + this._ipaddress = ipAddress; + this._port = port; + this._IsCatchDeviceControlLog = IsCatchDeviceControlLog; + } + + /// + /// 初始化服务端对象 + /// + /// IP地址 + /// 监听端口 + public void InitSocket() + { + IPAddress addr; + if (!IPAddress.TryParse(_ipaddress, out addr)) + { + //DeviceControlLogger.Logger.Error("错误", new Exception("配置的IP地址" + _ipaddress + "错误!"));//错误; + //throw new DeviceException("IP地址" + _ipaddress + "错误!"); + } + _listener = new TcpListener(addr, _port); + } + /// + /// 启动监听,并处理连接 + /// + public int Connect() + { + int rtn = 0; + try + { + _listener.Start(); + Thread AccTh = new Thread(new ThreadStart(delegate + { + while (true) + { + if (_isStop != false) + { + break; + } + GetAcceptTcpClient(); + Thread.Sleep(1); + } + })); + AccTh.Start(); + rtn = 0; + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(_ipaddress.ToString() + " " + _port.ToString() + " 启动监听成功!"); + } + catch (SocketException skex) + { + Sockets sks = new Sockets(); + sks.ex = skex; + rtn = -1; + //DeviceControlLogger.Logger.Error(_ipaddress.ToString() + " " + _port.ToString() + " 连接失败!", skex); + //throw new DeviceException(_ipaddress.ToString() + " " + _port.ToString() + " 连接失败!"); + } + return rtn; + } + /// + /// 停止 + /// + public int Close() + { + int rtn = 0; + if (_listener != null) + { + _listener.Stop(); + _listener = null; + _isStop = true; + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(_ipaddress.ToString() + " " + _port.ToString() + " 停止监听!"); + } + return rtn; + } + /// + /// 等待处理新的连接 + /// + private void GetAcceptTcpClient() + { + try + { + if (_listener != null && _listener.Pending()) + { + _semap.WaitOne(); + TcpClient tclient = _listener.AcceptTcpClient(); + //维护客户端队列 + Socket socket = tclient.Client; + NetworkStream stream = new NetworkStream(socket, true); //承载这个Socket + Sockets sks = new Sockets(tclient.Client.RemoteEndPoint as IPEndPoint, tclient, stream); + sks.NewClientFlag = true; + + //加入客户端集合. + AddClientList(sks); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(sks.Ip.ToString() + " " + " 连接成功!"); + + //推送新客户端 + //客户端异步接收 + sks.nStream.BeginRead(sks.RecBuffer, 0, sks.RecBuffer.Length, new AsyncCallback(EndReader), sks); + + //主动向客户端发送一条连接成功信息 + if (stream.CanWrite) + { + if (!string.IsNullOrEmpty(_boundary)) + { + byte[] buffer = Encoding.UTF8.GetBytes(_boundary); + stream.Write(buffer, 0, buffer.Length); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(sks.Ip.ToString() + " " + " Send:" + Encoding.Default.GetString(buffer)); + } + } + _semap.Release(); + } + } + catch + { + return; + } + } + + public event EventHandler ReceivHandler; + + /// + /// 异步接收发送的信息. + /// + /// + private void EndReader(IAsyncResult ir) + { + Sockets sks = ir.AsyncState as Sockets; + if (sks != null && _listener != null) + { + try + { + if (sks.NewClientFlag || sks.Offset != 0) + { + sks.NewClientFlag = false; + sks.Offset = sks.nStream.EndRead(ir); + sks.nStream.BeginRead(sks.RecBuffer, 0, sks.RecBuffer.Length, new AsyncCallback(EndReader), sks); + ReceivHandler?.Invoke(sks, null); + + byte[] reveiveBuffer = sks.RecBuffer; + Array.Resize(ref reveiveBuffer, sks.Offset); + var str = Algorithms.ConvertByteArrayToString(reveiveBuffer); + string receiveData = Encoding.Default.GetString(reveiveBuffer); + + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(sks.Ip.ToString() + " Read:" + receiveData); + } + } + catch (Exception skex) + { + lock (_obj) + { + //移除异常类 + _clientList.Remove(sks); + Sockets sk = sks; + sk.ClientDispose = true;//客户端退出 + sk.ex = skex; + //DeviceControlLogger.Logger.Error($"{sks.Ip} Read:{Encoding.Default.GetString(sks.RecBuffer)} error.", skex); + //DeviceControlLogger.Logger.Error($"{sks.Ip} 客户端已经关闭!", skex); + ////throw new DeviceException(sks.Ip.ToString() + "客户端已经关闭!"); + } + } + } + } + /// + /// 加入队列. + /// + /// + private void AddClientList(Sockets sk) + { + //虽然有信号量,还是用lock增加系数 + lock (_obj) + { + Sockets sockets = _clientList.Find(o => { return o.Ip == sk.Ip; }); + //如果不存在则添加,否则更新 + if (sockets == null) + { + _clientList.Add(sk); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(sk.Ip.ToString() + " 客户端加入列表成功!"); + } + else + { + _clientList.Remove(sockets); + _clientList.Add(sk); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Error(sk.Ip.ToString() + " 客户端加入列表失败!"); + //throw new DeviceException(sk.Ip.ToString() + "客户端加入失败!"); + } + } + } + /// + /// 向所有在线的客户端发送信息. + /// + /// 发送的文本 + public void SendToAll(string SendData) + { + try + { + Parallel.ForEach(_clientList, new ParallelOptions() { MaxDegreeOfParallelism = 5 }, item => + { + if (item != null) + SendToClient(item.Ip, SendData); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(item.Ip.ToString() + " Send Data:" + SendData + " Successed!"); + }); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error("向所有客户端发送数据失败!", ex); + //throw new DeviceException("向所有客户端发送数据失败"); + } + } + /// + /// 向某一位客户端发送信息 + /// + /// 客户端IP+端口地址 + /// 发送的数据包 + public void SendToClient(IPEndPoint ip, string SendData) + { + try + { + Sockets sks = _clientList.Find(o => { return o.Ip == ip; }); + if (sks == null || !sks.Client.Connected || sks.ClientDispose) + { + //没有连接时,标识退出 + Sockets ks = new Sockets(); + sks.ClientDispose = true;//标识客户端下线 + sks.ex = new Exception("客户端无连接"); + _clientList.Remove(sks); + + //DeviceControlLogger.Logger.Error(sks.Ip.ToString() + "客户端无连接!", sks.ex); + } + if (sks.Client.Connected) + { + //获取当前流进行写入. + NetworkStream nStream = sks.nStream; + if (nStream.CanWrite) + { + byte[] buffer = Encoding.UTF8.GetBytes(SendData); + nStream.Write(buffer, 0, buffer.Length); + } + else + { + //避免流被关闭,重新从对象中获取流 + nStream = sks.Client.GetStream(); + if (nStream.CanWrite) + { + byte[] buffer = Encoding.UTF8.GetBytes(SendData); + nStream.Write(buffer, 0, buffer.Length); + //if (_IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info(sks.Ip.ToString() + "Send Data:" + SendData + "Successed!"); + } + else + { + //如果还是无法写入,那么认为客户端中断连接. + _clientList.Remove(sks); + Sockets ks = new Sockets(); + sks.ClientDispose = true;//如果出现异常,标识客户端下线 + sks.ex = new Exception("客户端无连接"); + //DeviceControlLogger.Logger.Error(sks.Ip.ToString() + "客户端无连接!", sks.ex); + } + } + } + } + catch (Exception skex) + { + Sockets sks = new Sockets(); + sks.ClientDispose = true;//如果出现异常,标识客户端退出 + sks.ex = skex; + //DeviceControlLogger.Logger.Error(ip.ToString() + "Send Data Fail!", skex); + //throw new DeviceException("给客户端" + ip.ToString() + "发送数据失败"); + } + } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Socket/Sockets.cs b/Admin.NET/MTNet.Application/ConnectBase/Socket/Sockets.cs new file mode 100644 index 00000000..525cd380 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/Sockets.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + // + /// 自定义Socket对象 + /// + public class Sockets + { + /// + /// 空构造 + /// + public Sockets() + { + } + /// + /// 创建Sockets对象 + /// + /// Ip地址 + /// TcpClient + /// 承载客户端Socket的网络流 + public Sockets(IPEndPoint ip, TcpClient client, NetworkStream ns) + { + Ip = ip; + Client = client; + nStream = ns; + } + /// + /// 创建Sockets对象 + /// + /// 用户名 + /// 密码 + /// Ip地址 + /// TcpClient + /// 承载客户端Socket的网络流 + public Sockets(string name, string pass, IPEndPoint ip, TcpClient client, NetworkStream ns) + { + UserName = name; + Password = pass; + Ip = ip; + Client = client; + nStream = ns; + } + + /// + /// 接收缓冲区 + /// + public byte[] RecBuffer { get; set; } = new byte[8 * 1024]; + /// + /// 发送缓冲区 + /// + public byte[] SendBuffer { get; set; } = new byte[8 * 1024]; + /// + /// 异步接收后包的大小 + /// + public int Offset { get; set; } + /// + /// 用户名 + /// + public string UserName { get; } + /// + /// 密码 + /// + public string Password { get; } + /// + /// 当前IP地址,端口号 + /// + public IPEndPoint Ip { get; } + /// + /// 客户端主通信程序 + /// + public TcpClient Client { get; } + /// + /// 承载客户端Socket的网络流 + /// + public NetworkStream nStream { get; } + /// + /// 发生异常时不为null. + /// + public Exception ex { get; set; } + /// + /// 新客户端标识.如果推送器发现此标识为true,那么认为是客户端上线 + /// 仅服务端有效 + /// + public bool NewClientFlag { get; set; } + /// + /// 客户端退出标识.如果服务端发现此标识为true,那么认为客户端下线 + /// 客户端接收此标识时,认为客户端异常. + /// + public bool ClientDispose { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32.cs b/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32.cs new file mode 100644 index 00000000..3a8fab7c --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32.cs @@ -0,0 +1,779 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace MTNet.Application.ConnectBase +{ + public sealed class Visa32 + { + // -------------------------------------------------------------------------------- + // Adapted from visa32.bas which was distributed by VXIplug&play Systems Alliance + // Distributed By Agilent Technologies, Inc. + // -------------------------------------------------------------------------------- + // Title : visa32.cs + // Date : 03-06-2009 + // Purpose : VISA definitions for C# + // ------------------------------------------------------------------------- + public const int VI_SPEC_VERSION = 4194304; + + + #region - Resource Template Functions and Operations ---------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#141", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOpenDefaultRM(out int sesn); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#128", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGetDefaultRM(out int sesn); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#129", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viFindRsrc(int sesn, string expr, out int vi, out int retCount, StringBuilder desc); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#130", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viFindNext(int vi, StringBuilder desc); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#146", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viParseRsrc(int sesn, string desc, ref short intfType, ref short intfNum); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#147", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viParseRsrcEx(int sesn, string desc, ref short intfType, ref short intfNum, StringBuilder rsrcClass, StringBuilder expandedUnaliasedName, StringBuilder aliasIfExists); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#131", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOpen(int sesn, string viDesc, int mode, int timeout, out int vi); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#132", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viClose(int vi); + + #region viGetAttribute Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#133", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGetAttribute(int vi, int attrName, out byte attrValue); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#133", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGetAttribute(int vi, int attrName, out short attrValue); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#133", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGetAttribute(int vi, int attrName, out int attrValue); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#133", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGetAttribute(int vi, int attrName, StringBuilder attrValue); + #endregion + + #region viSetAttribute Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#134", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viSetAttribute(int vi, int attrName, byte attrValue); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#134", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viSetAttribute(int vi, int attrName, short attrValue); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#134", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viSetAttribute(int vi, int attrName, int attrValue); + #endregion + + [DllImportAttribute("VISA32.DLL", EntryPoint = "#142", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viStatusDesc(int vi, int status, StringBuilder desc); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#143", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viTerminate(int vi, short degree, int jobId); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#144", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viLock(int vi, int lockType, int timeout, string requestedKey, StringBuilder accessKey); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#145", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUnlock(int vi); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#135", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viEnableEvent(int vi, int eventType, short mechanism, int context); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#136", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viDisableEvent(int vi, int eventType, short mechanism); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#137", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viDiscardEvents(int vi, int eventType, short mechanism); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#138", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viWaitOnEvent(int vi, int inEventType, int timeout, ref int outEventType, ref int outEventContext); + + public delegate int viEventHandler(int vi, int eventType, int context, int userHandle); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#139", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viInstallHandler(int vi, int eventType, viEventHandler handler, int UserHandle); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#140", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUninstallHandler(int vi, int eventType, viEventHandler handler, int userHandle); + #endregion + + #region - Basic I/O Operations -------------------------------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#256", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viRead(int vi, byte[] buffer, int count, out int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#277", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viReadAsync(int vi, byte[] buffer, int count, out int jobId); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#219", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viReadToFile(int vi, string filename, int count, ref int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#257", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viWrite(int vi, byte[] buffer, int count, out int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#278", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viWriteAsync(int vi, byte[] buffer, int count, out int jobId); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#218", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viWriteFromFile(int vi, string filename, int count, ref int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#258", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viAssertTrigger(int vi, short protocol); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#259", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viReadSTB(int vi, ref short status); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#260", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viClear(int vi); + #endregion + + #region - Formatted and Buffered I/O Operations --------------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#267", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viSetBuf(int vi, short mask, int bufSize); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#268", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viFlush(int vi, short mask); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#202", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viBufWrite(int vi, byte[] buffer, int count, out int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#203", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viBufRead(int vi, byte[] buffer, int count, out int retCount); + + #region viPrintf Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, string arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, int arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, short arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, double arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#269", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viPrintf(int vi, string writeFmt, byte arg); + #endregion + + #region viSPrintf Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, string arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, int arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, short arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, double arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#204", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSPrintf(int vi, StringBuilder buffer, string writeFmt, byte arg); + #endregion + + #region viScanf Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int count, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int count, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int count, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int count, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int count, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, StringBuilder arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, ref int stringSize, StringBuilder arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, out int arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, out short arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, out float arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, out double arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#271", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viScanf(int vi, string readFmt, out byte arg); + #endregion + + #region viSScanf Overloads + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int count, int[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int count, short[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int count, float[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int count, double[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int count, byte[] arr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, StringBuilder arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, ref int stringSize, StringBuilder arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, out int arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, out short arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, out float arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, out double arg); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#206", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true, CallingConvention = CallingConvention.Cdecl)] + public static extern int viSScanf(int vi, string buffer, string readFmt, out byte arg); + #endregion + + #endregion + + #region - Memory I/O Operations ------------------------------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#273", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn8(int vi, short accSpace, int offset, out byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#274", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut8(int vi, short accSpace, int offset, byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#261", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn16(int vi, short accSpace, int offset, out short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#262", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut16(int vi, short accSpace, int offset, short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#281", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn32(int vi, short accSpace, int offset, out int val32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#282", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut32(int vi, short accSpace, int offset, int val32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#283", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn8(int vi, short accSpace, int offset, int length, byte[] buf8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#284", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut8(int vi, short accSpace, int offset, int length, byte[] buf8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#285", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn16(int vi, short accSpace, int offset, int length, short[] buf16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#286", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut16(int vi, short accSpace, int offset, int length, short[] buf16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#287", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn32(int vi, short accSpace, int offset, int length, int[] buf32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#288", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut32(int vi, short accSpace, int offset, int length, int[] buf32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#200", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMove(int vi, short srcSpace, int srcOffset, short srcWidth, short destSpace, int destOffset, short destWidth, int srcLength); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#201", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveAsync(int vi, short srcSpace, int srcOffset, short srcWidth, short destSpace, int destOffset, short destWidth, int srcLength, out int jobId); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#263", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMapAddress(int vi, short mapSpace, int mapOffset, int mapSize, short accMode, int suggested, out int address); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#264", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUnmapAddress(int vi); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#275", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPeek8(int vi, int address, out byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#276", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPoke8(int vi, int address, byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#265", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPeek16(int vi, int address, out short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#266", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPoke16(int vi, int address, short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#289", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPeek32(int vi, int address, out int val32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#290", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPoke32(int vi, int address, int val32); + + #region 64-bit Extension Functions + [DllImportAttribute("VISA32.DLL", EntryPoint = "#220", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn64(int vi, short accSpace, int offset, out long val64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#221", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut64(int vi, short accSpace, int offset, long val64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#222", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn8Ex(int vi, short accSpace, long offset, out byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#223", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut8Ex(int vi, short accSpace, long offset, byte val8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#224", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn16Ex(int vi, short accSpace, long offset, out short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#225", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut16Ex(int vi, short accSpace, long offset, short val16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#226", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn32Ex(int vi, short accSpace, long offset, out int val32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#227", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut32Ex(int vi, short accSpace, long offset, int val32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#228", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viIn64Ex(int vi, short accSpace, long offset, out long val64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#229", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viOut64Ex(int vi, short accSpace, long offset, long val64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#230", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn64(int vi, short accSpace, int offset, int length, long[] buf64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#231", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut64(int vi, short accSpace, int offset, int length, long[] buf64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#232", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn8Ex(int vi, short accSpace, long offset, int length, byte[] buf8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#233", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut8Ex(int vi, short accSpace, long offset, int length, byte[] buf8); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#234", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn16Ex(int vi, short accSpace, long offset, int length, short[] buf16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#235", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut16Ex(int vi, short accSpace, long offset, int length, short[] buf16); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#236", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn32Ex(int vi, short accSpace, long offset, int length, int[] buf32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#237", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut32Ex(int vi, short accSpace, long offset, int length, int[] buf32); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#238", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveIn64Ex(int vi, short accSpace, long offset, int length, long[] buf64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#239", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveOut64Ex(int vi, short accSpace, long offset, int length, long[] buf64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#240", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveEx(int vi, short srcSpace, long srcOffset, short srcWidth, short destSpace, long destOffset, short destWidth, int srcLength); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#241", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMoveAsyncEx(int vi, short srcSpace, long srcOffset, short srcWidth, short destSpace, long destOffset, short destWidth, int srcLength, out int jobId); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#242", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMapAddressEx(int vi, short mapSpace, long mapOffset, int mapSize, short accMode, int suggested, out int address); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#243", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMemAllocEx(int vi, int memSize, out long offset); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#244", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMemFreeEx(int vi, long offset); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#245", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPeek64(int vi, int address, out long val64); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#246", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern void viPoke64(int vi, int address, long val64); + #endregion + #endregion + + #region - Shared Memory Operations ---------------------------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#291", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMemAlloc(int vi, int memSize, out int offset); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#292", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMemFree(int vi, int offset); + #endregion + + #region - Interface Specific Operations ----------------------------------------- + [DllImportAttribute("VISA32.DLL", EntryPoint = "#208", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGpibControlREN(int vi, short mode); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#210", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGpibControlATN(int vi, short mode); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#211", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGpibSendIFC(int vi); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#212", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGpibCommand(int vi, string buffer, int count, out int retCount); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#213", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viGpibPassControl(int vi, short primAddr, short secAddr); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#209", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viVxiCommandQuery(int vi, short mode, int devCmd, out int devResponse); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#214", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viAssertUtilSignal(int vi, short line); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#215", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viAssertIntrSignal(int vi, short mode, int statusID); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#216", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viMapTrigger(int vi, short trigSrc, short trigDest, short mode); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#217", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUnmapTrigger(int vi, short trigSrc, short trigDest); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#293", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUsbControlOut(int vi, short bmRequestType, short bRequest, short wValue, short wIndex, short wLength, byte[] buf); + [DllImportAttribute("VISA32.DLL", EntryPoint = "#294", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] + public static extern int viUsbControlIn(int vi, short bmRequestType, short bRequest, short wValue, short wIndex, short wLength, byte[] buf, out short retCnt); + #endregion + + #region - Constants ------------------------------------------------------------- + + #region - Attributes ------------------------------------------------------------ + public const int VI_ATTR_RSRC_CLASS = -1073807359; + public const int VI_ATTR_RSRC_NAME = -1073807358; + public const int VI_ATTR_RSRC_IMPL_VERSION = 1073676291; + public const int VI_ATTR_RSRC_LOCK_STATE = 1073676292; + public const int VI_ATTR_MAX_QUEUE_LENGTH = 1073676293; + public const int VI_ATTR_USER_DATA = 1073676295; + public const int VI_ATTR_FDC_CHNL = 1073676301; + public const int VI_ATTR_FDC_MODE = 1073676303; + public const int VI_ATTR_FDC_GEN_SIGNAL_EN = 1073676305; + public const int VI_ATTR_FDC_USE_PAIR = 1073676307; + public const int VI_ATTR_SEND_END_EN = 1073676310; + public const int VI_ATTR_TERMCHAR = 1073676312; + public const int VI_ATTR_TMO_VALUE = 1073676314; + public const int VI_ATTR_GPIB_READDR_EN = 1073676315; + public const int VI_ATTR_IO_PROT = 1073676316; + public const int VI_ATTR_DMA_ALLOW_EN = 1073676318; + public const int VI_ATTR_ASRL_BAUD = 1073676321; + public const int VI_ATTR_ASRL_DATA_BITS = 1073676322; + public const int VI_ATTR_ASRL_PARITY = 1073676323; + public const int VI_ATTR_ASRL_STOP_BITS = 1073676324; + public const int VI_ATTR_ASRL_FLOW_CNTRL = 1073676325; + public const int VI_ATTR_RD_BUF_OPER_MODE = 1073676330; + public const int VI_ATTR_RD_BUF_SIZE = 1073676331; + public const int VI_ATTR_WR_BUF_OPER_MODE = 1073676333; + public const int VI_ATTR_WR_BUF_SIZE = 1073676334; + public const int VI_ATTR_SUPPRESS_END_EN = 1073676342; + public const int VI_ATTR_TERMCHAR_EN = 1073676344; + public const int VI_ATTR_DEST_ACCESS_PRIV = 1073676345; + public const int VI_ATTR_DEST_BYTE_ORDER = 1073676346; + public const int VI_ATTR_SRC_ACCESS_PRIV = 1073676348; + public const int VI_ATTR_SRC_BYTE_ORDER = 1073676349; + public const int VI_ATTR_SRC_INCREMENT = 1073676352; + public const int VI_ATTR_DEST_INCREMENT = 1073676353; + public const int VI_ATTR_WIN_ACCESS_PRIV = 1073676357; + public const int VI_ATTR_WIN_BYTE_ORDER = 1073676359; + public const int VI_ATTR_GPIB_ATN_STATE = 1073676375; + public const int VI_ATTR_GPIB_ADDR_STATE = 1073676380; + public const int VI_ATTR_GPIB_CIC_STATE = 1073676382; + public const int VI_ATTR_GPIB_NDAC_STATE = 1073676386; + public const int VI_ATTR_GPIB_SRQ_STATE = 1073676391; + public const int VI_ATTR_GPIB_SYS_CNTRL_STATE = 1073676392; + public const int VI_ATTR_GPIB_HS488_CBL_LEN = 1073676393; + public const int VI_ATTR_CMDR_LA = 1073676395; + public const int VI_ATTR_VXI_DEV_CLASS = 1073676396; + public const int VI_ATTR_MAINFRAME_LA = 1073676400; + public const int VI_ATTR_MANF_NAME = -1073807246; + public const int VI_ATTR_MODEL_NAME = -1073807241; + public const int VI_ATTR_VXI_VME_INTR_STATUS = 1073676427; + public const int VI_ATTR_VXI_TRIG_STATUS = 1073676429; + public const int VI_ATTR_VXI_VME_SYSFAIL_STATE = 1073676436; + public const int VI_ATTR_WIN_BASE_ADDR = 1073676440; + public const int VI_ATTR_WIN_SIZE = 1073676442; + public const int VI_ATTR_ASRL_AVAIL_NUM = 1073676460; + public const int VI_ATTR_MEM_BASE = 1073676461; + public const int VI_ATTR_ASRL_CTS_STATE = 1073676462; + public const int VI_ATTR_ASRL_DCD_STATE = 1073676463; + public const int VI_ATTR_ASRL_DSR_STATE = 1073676465; + public const int VI_ATTR_ASRL_DTR_STATE = 1073676466; + public const int VI_ATTR_ASRL_END_IN = 1073676467; + public const int VI_ATTR_ASRL_END_OUT = 1073676468; + public const int VI_ATTR_ASRL_REPLACE_CHAR = 1073676478; + public const int VI_ATTR_ASRL_RI_STATE = 1073676479; + public const int VI_ATTR_ASRL_RTS_STATE = 1073676480; + public const int VI_ATTR_ASRL_XON_CHAR = 1073676481; + public const int VI_ATTR_ASRL_XOFF_CHAR = 1073676482; + public const int VI_ATTR_WIN_ACCESS = 1073676483; + public const int VI_ATTR_RM_SESSION = 1073676484; + public const int VI_ATTR_VXI_LA = 1073676501; + public const int VI_ATTR_MANF_ID = 1073676505; + public const int VI_ATTR_MEM_SIZE = 1073676509; + public const int VI_ATTR_MEM_SPACE = 1073676510; + public const int VI_ATTR_MODEL_CODE = 1073676511; + public const int VI_ATTR_SLOT = 1073676520; + public const int VI_ATTR_INTF_INST_NAME = -1073807127; + public const int VI_ATTR_IMMEDIATE_SERV = 1073676544; + public const int VI_ATTR_INTF_PARENT_NUM = 1073676545; + public const int VI_ATTR_RSRC_SPEC_VERSION = 1073676656; + public const int VI_ATTR_INTF_TYPE = 1073676657; + public const int VI_ATTR_GPIB_PRIMARY_ADDR = 1073676658; + public const int VI_ATTR_GPIB_SECONDARY_ADDR = 1073676659; + public const int VI_ATTR_RSRC_MANF_NAME = -1073806988; + public const int VI_ATTR_RSRC_MANF_ID = 1073676661; + public const int VI_ATTR_INTF_NUM = 1073676662; + public const int VI_ATTR_TRIG_ID = 1073676663; + public const int VI_ATTR_GPIB_REN_STATE = 1073676673; + public const int VI_ATTR_GPIB_UNADDR_EN = 1073676676; + public const int VI_ATTR_DEV_STATUS_BYTE = 1073676681; + public const int VI_ATTR_FILE_APPEND_EN = 1073676690; + public const int VI_ATTR_VXI_TRIG_SUPPORT = 1073676692; + public const int VI_ATTR_TCPIP_ADDR = -1073806955; + public const int VI_ATTR_TCPIP_HOSTNAME = -1073806954; + public const int VI_ATTR_TCPIP_PORT = 1073676695; + public const int VI_ATTR_TCPIP_DEVICE_NAME = -1073806951; + public const int VI_ATTR_TCPIP_NODELAY = 1073676698; + public const int VI_ATTR_TCPIP_KEEPALIVE = 1073676699; + public const int VI_ATTR_4882_COMPLIANT = 1073676703; + public const int VI_ATTR_USB_SERIAL_NUM = -1073806944; + public const int VI_ATTR_USB_INTFC_NUM = 1073676705; + public const int VI_ATTR_USB_PROTOCOL = 1073676711; + public const int VI_ATTR_USB_MAX_INTR_SIZE = 1073676719; + public const int VI_ATTR_JOB_ID = 1073692678; + public const int VI_ATTR_EVENT_TYPE = 1073692688; + public const int VI_ATTR_SIGP_STATUS_ID = 1073692689; + public const int VI_ATTR_RECV_TRIG_ID = 1073692690; + public const int VI_ATTR_INTR_STATUS_ID = 1073692707; + public const int VI_ATTR_STATUS = 1073692709; + public const int VI_ATTR_RET_COUNT = 1073692710; + public const int VI_ATTR_BUFFER = 1073692711; + public const int VI_ATTR_RECV_INTR_LEVEL = 1073692737; + public const int VI_ATTR_OPER_NAME = -1073790910; + public const int VI_ATTR_GPIB_RECV_CIC_STATE = 1073693075; + public const int VI_ATTR_RECV_TCPIP_ADDR = -1073790568; + public const int VI_ATTR_USB_RECV_INTR_SIZE = 1073693104; + public const int VI_ATTR_USB_RECV_INTR_DATA = -1073790543; + #endregion + + #region - Event Types ----------------------------------------------------------- + public const int VI_EVENT_IO_COMPLETION = 1073684489; + public const int VI_EVENT_TRIG = -1073799158; + public const int VI_EVENT_SERVICE_REQ = 1073684491; + public const int VI_EVENT_CLEAR = 1073684493; + public const int VI_EVENT_EXCEPTION = -1073799154; + public const int VI_EVENT_GPIB_CIC = 1073684498; + public const int VI_EVENT_GPIB_TALK = 1073684499; + public const int VI_EVENT_GPIB_LISTEN = 1073684500; + public const int VI_EVENT_VXI_VME_SYSFAIL = 1073684509; + public const int VI_EVENT_VXI_VME_SYSRESET = 1073684510; + public const int VI_EVENT_VXI_SIGP = 1073684512; + public const int VI_EVENT_VXI_VME_INTR = -1073799135; + public const int VI_EVENT_TCPIP_CONNECT = 1073684534; + public const int VI_EVENT_USB_INTR = 1073684535; + public const int VI_ALL_ENABLED_EVENTS = 1073709055; + #endregion + + #region - Completion and Error Codes -------------------------------------------- + public const int VI_SUCCESS = 0; + public const int VI_SUCCESS_EVENT_EN = 1073676290; + public const int VI_SUCCESS_EVENT_DIS = 1073676291; + public const int VI_SUCCESS_QUEUE_EMPTY = 1073676292; + public const int VI_SUCCESS_TERM_CHAR = 1073676293; + public const int VI_SUCCESS_MAX_CNT = 1073676294; + public const int VI_SUCCESS_DEV_NPRESENT = 1073676413; + public const int VI_SUCCESS_TRIG_MAPPED = 1073676414; + public const int VI_SUCCESS_QUEUE_NEMPTY = 1073676416; + public const int VI_SUCCESS_NCHAIN = 1073676440; + public const int VI_SUCCESS_NESTED_SHARED = 1073676441; + public const int VI_SUCCESS_NESTED_EXCLUSIVE = 1073676442; + public const int VI_SUCCESS_SYNC = 1073676443; + public const int VI_WARN_QUEUE_OVERFLOW = 1073676300; + public const int VI_WARN_CONFIG_NLOADED = 1073676407; + public const int VI_WARN_NULL_OBJECT = 1073676418; + public const int VI_WARN_NSUP_ATTR_STATE = 1073676420; + public const int VI_WARN_UNKNOWN_STATUS = 1073676421; + public const int VI_WARN_NSUP_BUF = 1073676424; + public const int VI_WARN_EXT_FUNC_NIMPL = 1073676457; + public const int VI_ERROR_SYSTEM_ERROR = -1073807360; + public const int VI_ERROR_INV_OBJECT = -1073807346; + public const int VI_ERROR_RSRC_LOCKED = -1073807345; + public const int VI_ERROR_INV_EXPR = -1073807344; + public const int VI_ERROR_RSRC_NFOUND = -1073807343; + public const int VI_ERROR_INV_RSRC_NAME = -1073807342; + public const int VI_ERROR_INV_ACC_MODE = -1073807341; + public const int VI_ERROR_TMO = -1073807339; + public const int VI_ERROR_CLOSING_FAILED = -1073807338; + public const int VI_ERROR_INV_DEGREE = -1073807333; + public const int VI_ERROR_INV_JOB_ID = -1073807332; + public const int VI_ERROR_NSUP_ATTR = -1073807331; + public const int VI_ERROR_NSUP_ATTR_STATE = -1073807330; + public const int VI_ERROR_ATTR_READONLY = -1073807329; + public const int VI_ERROR_INV_LOCK_TYPE = -1073807328; + public const int VI_ERROR_INV_ACCESS_KEY = -1073807327; + public const int VI_ERROR_INV_EVENT = -1073807322; + public const int VI_ERROR_INV_MECH = -1073807321; + public const int VI_ERROR_HNDLR_NINSTALLED = -1073807320; + public const int VI_ERROR_INV_HNDLR_REF = -1073807319; + public const int VI_ERROR_INV_CONTEXT = -1073807318; + public const int VI_ERROR_QUEUE_OVERFLOW = -1073807315; + public const int VI_ERROR_NENABLED = -1073807313; + public const int VI_ERROR_ABORT = -1073807312; + public const int VI_ERROR_RAW_WR_PROT_VIOL = -1073807308; + public const int VI_ERROR_RAW_RD_PROT_VIOL = -1073807307; + public const int VI_ERROR_OUTP_PROT_VIOL = -1073807306; + public const int VI_ERROR_INP_PROT_VIOL = -1073807305; + public const int VI_ERROR_BERR = -1073807304; + public const int VI_ERROR_IN_PROGRESS = -1073807303; + public const int VI_ERROR_INV_SETUP = -1073807302; + public const int VI_ERROR_QUEUE_ERROR = -1073807301; + public const int VI_ERROR_ALLOC = -1073807300; + public const int VI_ERROR_INV_MASK = -1073807299; + public const int VI_ERROR_IO = -1073807298; + public const int VI_ERROR_INV_FMT = -1073807297; + public const int VI_ERROR_NSUP_FMT = -1073807295; + public const int VI_ERROR_LINE_IN_USE = -1073807294; + public const int VI_ERROR_NSUP_MODE = -1073807290; + public const int VI_ERROR_SRQ_NOCCURRED = -1073807286; + public const int VI_ERROR_INV_SPACE = -1073807282; + public const int VI_ERROR_INV_OFFSET = -1073807279; + public const int VI_ERROR_INV_WIDTH = -1073807278; + public const int VI_ERROR_NSUP_OFFSET = -1073807276; + public const int VI_ERROR_NSUP_VAR_WIDTH = -1073807275; + public const int VI_ERROR_WINDOW_NMAPPED = -1073807273; + public const int VI_ERROR_RESP_PENDING = -1073807271; + public const int VI_ERROR_NLISTENERS = -1073807265; + public const int VI_ERROR_NCIC = -1073807264; + public const int VI_ERROR_NSYS_CNTLR = -1073807263; + public const int VI_ERROR_NSUP_OPER = -1073807257; + public const int VI_ERROR_INTR_PENDING = -1073807256; + public const int VI_ERROR_ASRL_PARITY = -1073807254; + public const int VI_ERROR_ASRL_FRAMING = -1073807253; + public const int VI_ERROR_ASRL_OVERRUN = -1073807252; + public const int VI_ERROR_TRIG_NMAPPED = -1073807250; + public const int VI_ERROR_NSUP_ALIGN_OFFSET = -1073807248; + public const int VI_ERROR_USER_BUF = -1073807247; + public const int VI_ERROR_RSRC_BUSY = -1073807246; + public const int VI_ERROR_NSUP_WIDTH = -1073807242; + public const int VI_ERROR_INV_PARAMETER = -1073807240; + public const int VI_ERROR_INV_PROT = -1073807239; + public const int VI_ERROR_INV_SIZE = -1073807237; + public const int VI_ERROR_WINDOW_MAPPED = -1073807232; + public const int VI_ERROR_NIMPL_OPER = -1073807231; + public const int VI_ERROR_INV_LENGTH = -1073807229; + public const int VI_ERROR_INV_MODE = -1073807215; + public const int VI_ERROR_SESN_NLOCKED = -1073807204; + public const int VI_ERROR_MEM_NSHARED = -1073807203; + public const int VI_ERROR_LIBRARY_NFOUND = -1073807202; + public const int VI_ERROR_NSUP_INTR = -1073807201; + public const int VI_ERROR_INV_LINE = -1073807200; + public const int VI_ERROR_FILE_ACCESS = -1073807199; + public const int VI_ERROR_FILE_IO = -1073807198; + public const int VI_ERROR_NSUP_LINE = -1073807197; + public const int VI_ERROR_NSUP_MECH = -1073807196; + public const int VI_ERROR_INTF_NUM_NCONFIG = -1073807195; + public const int VI_ERROR_CONN_LOST = -1073807194; + public const int VI_ERROR_NPERMISSION = -1073807192; + #endregion + + #region - Other VISA Definitions ------------------------------------------------ + public const short VI_FIND_BUFLEN = 256; + public const short VI_NULL = 0; + public const short VI_TRUE = 1; + public const short VI_FALSE = 0; + public const short VI_INTF_GPIB = 1; + public const short VI_INTF_VXI = 2; + public const short VI_INTF_GPIB_VXI = 3; + public const short VI_INTF_ASRL = 4; + public const short VI_INTF_TCPIP = 6; + public const short VI_INTF_USB = 7; + public const short VI_PROT_NORMAL = 1; + public const short VI_PROT_FDC = 2; + public const short VI_PROT_HS488 = 3; + public const short VI_PROT_4882_STRS = 4; + public const short VI_PROT_USBTMC_VENDOR = 5; + public const short VI_FDC_NORMAL = 1; + public const short VI_FDC_STREAM = 2; + public const short VI_LOCAL_SPACE = 0; + public const short VI_A16_SPACE = 1; + public const short VI_A24_SPACE = 2; + public const short VI_A32_SPACE = 3; + public const short VI_OPAQUE_SPACE = -1; + public const short VI_UNKNOWN_LA = -1; + public const short VI_UNKNOWN_SLOT = -1; + public const short VI_UNKNOWN_LEVEL = -1; + public const short VI_QUEUE = 1; + public const short VI_HNDLR = 2; + public const short VI_SUSPEND_HNDLR = 4; + public const short VI_ALL_MECH = -1; + public const short VI_ANY_HNDLR = 0; + public const short VI_TRIG_ALL = -2; + public const short VI_TRIG_SW = -1; + public const short VI_TRIG_TTL0 = 0; + public const short VI_TRIG_TTL1 = 1; + public const short VI_TRIG_TTL2 = 2; + public const short VI_TRIG_TTL3 = 3; + public const short VI_TRIG_TTL4 = 4; + public const short VI_TRIG_TTL5 = 5; + public const short VI_TRIG_TTL6 = 6; + public const short VI_TRIG_TTL7 = 7; + public const short VI_TRIG_ECL0 = 8; + public const short VI_TRIG_ECL1 = 9; + public const short VI_TRIG_PANEL_IN = 27; + public const short VI_TRIG_PANEL_OUT = 28; + public const short VI_TRIG_PROT_DEFAULT = 0; + public const short VI_TRIG_PROT_ON = 1; + public const short VI_TRIG_PROT_OFF = 2; + public const short VI_TRIG_PROT_SYNC = 5; + public const short VI_READ_BUF = 1; + public const short VI_WRITE_BUF = 2; + public const short VI_READ_BUF_DISCARD = 4; + public const short VI_WRITE_BUF_DISCARD = 8; + public const short VI_IO_IN_BUF = 16; + public const short VI_IO_OUT_BUF = 32; + public const short VI_IO_IN_BUF_DISCARD = 64; + public const short VI_IO_OUT_BUF_DISCARD = 128; + public const short VI_FLUSH_ON_ACCESS = 1; + public const short VI_FLUSH_WHEN_FULL = 2; + public const short VI_FLUSH_DISABLE = 3; + public const short VI_NMAPPED = 1; + public const short VI_USE_OPERS = 2; + public const short VI_DEREF_ADDR = 3; + public const int VI_TMO_IMMEDIATE = 0; + public const int VI_TMO_INFINITE = -1; + public const short VI_NO_LOCK = 0; + public const short VI_EXCLUSIVE_LOCK = 1; + public const short VI_SHARED_LOCK = 2; + public const short VI_LOAD_CONFIG = 4; + public const short VI_NO_SEC_ADDR = -1; + public const short VI_ASRL_PAR_NONE = 0; + public const short VI_ASRL_PAR_ODD = 1; + public const short VI_ASRL_PAR_EVEN = 2; + public const short VI_ASRL_PAR_MARK = 3; + public const short VI_ASRL_PAR_SPACE = 4; + public const short VI_ASRL_STOP_ONE = 10; + public const short VI_ASRL_STOP_ONE5 = 15; + public const short VI_ASRL_STOP_TWO = 20; + public const short VI_ASRL_FLOW_NONE = 0; + public const short VI_ASRL_FLOW_XON_XOFF = 1; + public const short VI_ASRL_FLOW_RTS_CTS = 2; + public const short VI_ASRL_FLOW_DTR_DSR = 4; + public const short VI_ASRL_END_NONE = 0; + public const short VI_ASRL_END_LAST_BIT = 1; + public const short VI_ASRL_END_TERMCHAR = 2; + public const short VI_ASRL_END_BREAK = 3; + public const short VI_STATE_ASSERTED = 1; + public const short VI_STATE_UNASSERTED = 0; + public const short VI_STATE_UNKNOWN = -1; + public const short VI_BIG_ENDIAN = 0; + public const short VI_LITTLE_ENDIAN = 1; + public const short VI_DATA_PRIV = 0; + public const short VI_DATA_NPRIV = 1; + public const short VI_PROG_PRIV = 2; + public const short VI_PROG_NPRIV = 3; + public const short VI_BLCK_PRIV = 4; + public const short VI_BLCK_NPRIV = 5; + public const short VI_D64_PRIV = 6; + public const short VI_D64_NPRIV = 7; + public const short VI_WIDTH_8 = 1; + public const short VI_WIDTH_16 = 2; + public const short VI_WIDTH_32 = 4; + public const short VI_GPIB_REN_DEASSERT = 0; + public const short VI_GPIB_REN_ASSERT = 1; + public const short VI_GPIB_REN_DEASSERT_GTL = 2; + public const short VI_GPIB_REN_ASSERT_ADDRESS = 3; + public const short VI_GPIB_REN_ASSERT_LLO = 4; + public const short VI_GPIB_REN_ASSERT_ADDRESS_LLO = 5; + public const short VI_GPIB_REN_ADDRESS_GTL = 6; + public const short VI_GPIB_ATN_DEASSERT = 0; + public const short VI_GPIB_ATN_ASSERT = 1; + public const short VI_GPIB_ATN_DEASSERT_HANDSHAKE = 2; + public const short VI_GPIB_ATN_ASSERT_IMMEDIATE = 3; + public const short VI_GPIB_HS488_DISABLED = 0; + public const short VI_GPIB_HS488_NIMPL = -1; + public const short VI_GPIB_UNADDRESSED = 0; + public const short VI_GPIB_TALKER = 1; + public const short VI_GPIB_LISTENER = 2; + public const short VI_VXI_CMD16 = 512; + public const short VI_VXI_CMD16_RESP16 = 514; + public const short VI_VXI_RESP16 = 2; + public const short VI_VXI_CMD32 = 1024; + public const short VI_VXI_CMD32_RESP16 = 1026; + public const short VI_VXI_CMD32_RESP32 = 1028; + public const short VI_VXI_RESP32 = 4; + public const short VI_ASSERT_SIGNAL = -1; + public const short VI_ASSERT_USE_ASSIGNED = 0; + public const short VI_ASSERT_IRQ1 = 1; + public const short VI_ASSERT_IRQ2 = 2; + public const short VI_ASSERT_IRQ3 = 3; + public const short VI_ASSERT_IRQ4 = 4; + public const short VI_ASSERT_IRQ5 = 5; + public const short VI_ASSERT_IRQ6 = 6; + public const short VI_ASSERT_IRQ7 = 7; + public const short VI_UTIL_ASSERT_SYSRESET = 1; + public const short VI_UTIL_ASSERT_SYSFAIL = 2; + public const short VI_UTIL_DEASSERT_SYSFAIL = 3; + public const short VI_VXI_CLASS_MEMORY = 0; + public const short VI_VXI_CLASS_EXTENDED = 1; + public const short VI_VXI_CLASS_MESSAGE = 2; + public const short VI_VXI_CLASS_REGISTER = 3; + public const short VI_VXI_CLASS_OTHER = 4; + #endregion + + #region - Backward Compatibility Macros ----------------------------------------- + public const int VI_ERROR_INV_SESSION = -1073807346; + public const int VI_INFINITE = -1; + public const short VI_NORMAL = 1; + public const short VI_FDC = 2; + public const short VI_HS488 = 3; + public const short VI_ASRL488 = 4; + public const short VI_ASRL_IN_BUF = 16; + public const short VI_ASRL_OUT_BUF = 32; + public const short VI_ASRL_IN_BUF_DISCARD = 64; + public const short VI_ASRL_OUT_BUF_DISCARD = 128; + #endregion + + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32InstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32InstBase.cs new file mode 100644 index 00000000..272a8fc8 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Visa32/Visa32InstBase.cs @@ -0,0 +1,813 @@ +using Microsoft.VisualBasic; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.ConnectBase +{ + public class Visa32InstBase + { + #region 参数配定义 + const int BUFFER_MAX = 1000000; + static int m_iRm = -1; + private int m_session; + private string m_EndCode = "\n"; + List m_infoNameList; + List m_infoValueList; + protected INST m_inst; + /// + /// 连接状态 + /// + bool _connectStatus = false; + public bool ConnectStatus { get => _connectStatus; set => _connectStatus = value; } + + /// + /// 设备名称 + /// + string _deviceName = "Deivce1"; + public string DeviceName { get => _deviceName; set => _deviceName = value; } + + /// + /// 设备信息,主要是包括设备名称,串口号等 + /// + string _info = ""; + public string Info { get => _info; set => _info = value; } + + /// + /// 是否抓去Log + /// + //private bool _IsCatchDeviceControlLog = false; + //public bool IsCatchDeviceControlLog + //{ + // get { return _IsCatchDeviceControlLog; } + // set { _IsCatchDeviceControlLog = value; } + //} + public EM_STATUS Status + { + get + { + return m_inst.Status; + } + } + public EM_TYPE Type + { + get + { + return m_inst.Type; + } + } + #endregion + + #region 构造函数 + public Visa32InstBase(string strAddress) + { + //set default value + m_inst.address = strAddress; + m_inst.timeout = 5000; + m_inst.Status = EM_STATUS.UNKNOW; + m_inst.Type = EM_TYPE.UNKNOW; + m_infoNameList = new List(); + m_infoValueList = new List(); + //bool.TryParse(AppConfig.GetConfig("IsCatchDeviceControlLog"), out _IsCatchDeviceControlLog); + } + + public Visa32InstBase(string strAddress, string deviceName) + { + //set default value + m_inst.address = strAddress; + m_inst.timeout = 5000; + m_inst.Status = EM_STATUS.UNKNOW; + m_inst.Type = EM_TYPE.UNKNOW; + m_infoNameList = new List(); + m_infoValueList = new List(); + _deviceName = deviceName; + // bool.TryParse(AppConfig.GetConfig("IsCatchDeviceControlLog"), out _IsCatchDeviceControlLog); + } + + public Visa32InstBase() + { + //set default value + m_inst.address = ""; + m_inst.timeout = 1000; + m_inst.Status = EM_STATUS.UNKNOW; + m_inst.Type = EM_TYPE.UNKNOW; + m_infoNameList = new List(); + m_infoValueList = new List(); + // bool.TryParse(AppConfig.GetConfig("IsCatchDeviceControlLog"), out _IsCatchDeviceControlLog); + } + + ~Visa32InstBase() + { + if (_connectStatus) + { + //close session(instrument handler) + Visa32.viClose(m_session); + } + } + #endregion + + #region Public functions + /// + /// 建立连接 + /// + /// + public virtual int Connect() + { + int rtn = 0; + + try + { + //bool.TryParse(AppConfig.GetConfig("IsCatchDeviceControlLog"), out _IsCatchDeviceControlLog); + _info = _deviceName + "\t" + m_inst.address + "\t"; + //connect instrument and get instrument handler + if (m_iRm == -1) + { + rtn = OpenRm(); + } + if (m_iRm < 0) + { + _connectStatus = false; + return rtn; + } + + rtn = Visa32.viOpen(m_iRm, m_inst.address, Visa32.VI_NULL, m_inst.timeout, out m_session); + //Visa32.viSetAttribute(m_session, Visa32.VI_ATTR_TMO_VALUE, 30000); + + if (m_inst.address.Contains("SOCKET")) + { Visa32.viSetAttribute(m_session, Visa32.VI_ATTR_TERMCHAR_EN, 1); } + if (rtn == Visa32.VI_SUCCESS) + { + //set status of instrument + m_inst.Status = EM_STATUS.CONNECT; + //set IDN of instrument + Thread.Sleep(500); + GetIDN(out m_inst.IDN); + _connectStatus = true; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Connet Successed"); + } + else + { + //set status of instrument + m_inst.Status = EM_STATUS.DISCONNECT; + //set IDN of instrument + m_inst.IDN = ""; + _connectStatus = false; + //DeviceControlLogger.Logger.Info($"{_info} Connect Failed"); + //throw new DeviceException($"{_info} Connect Failed"); + } + //Visa32.viSetAttribute(m_inst.m_session, Visa32.VI_ATTR_TMO_VALUE, 5000); + } + catch (Exception e) + { + _connectStatus = true; + rtn = Visa32.VI_ERROR_ABORT; + //DeviceControlLogger.Logger.Error($"{_info} Connect Failed", e); + //throw new DeviceException($"{_info} Connect Failed"); + } + return rtn; + } + + /// + /// 关闭连接 + /// + /// + public virtual int Close() + { + int rtn = 0; + try + { + if (_connectStatus) + { + //close session(instrument handler) + rtn = Visa32.viClose(m_session); + _connectStatus = false; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} DisConnect Successed"); + } + } + catch (Exception e) + { + //MessageBox.Show("Instrument closing fail!!!"); + _connectStatus = false; + rtn = Visa32.VI_ERROR_CLOSING_FAILED; + //DeviceControlLogger.Logger.Error($"{_info} DisConnect Failed", e); + //throw new DeviceException($"{_info} DisConnect Failed"); + } + return rtn; + } + + /// + /// 发送指令 + /// + /// 命令 + /// + public virtual int Write(string strGPIB) + { + int rtn = 0; + int iCount = 0; + strGPIB = strGPIB + m_EndCode; + //transfer the GPIB command from string 2 byte[] + byte[] bGPIB = System.Text.Encoding.Default.GetBytes(strGPIB); + try + { + if (_connectStatus) + { + //write SCPI command to the instrument + rtn = Visa32.viWrite(m_session, bGPIB, strGPIB.Length, out iCount); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Write:{strGPIB}" + "\t" + "Successed"); + } + else + { + //DeviceControlLogger.Logger.Info($"{_info} No Connect"); + } + } + catch (Exception ex) + { + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Write:{strGPIB }" + "\t" + "Failed" + ",Error Code" + rtn, ex); + //throw new DeviceException($"{_info} Write:{strGPIB} Failed"); + } + return rtn; + } + + /// + /// 发送指令 + /// + /// 命令 + /// 终结符 默认“\n” + /// + public virtual int Write(string strGPIB, string end) + { + int rtn = 0; + int iCount = 0; + strGPIB = strGPIB + end; + //transfer the GPIB command from string 2 byte[] + byte[] bGPIB = System.Text.Encoding.Default.GetBytes(strGPIB); + try + { + if (_connectStatus) + { + rtn = Visa32.viWrite(m_session, bGPIB, strGPIB.Length, out iCount); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Write:{strGPIB }" + "\t" + "Successed"); + } + else + { + //DeviceControlLogger.Logger.Info($"{_info} No Connect"); + } + //write SCPI command to the instrument + } + catch (Exception ex) + { + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Write:{strGPIB}" + "\t" + "Failed" + ",Error Code" + rtn, ex); + //throw new DeviceException($"{_info} Write:{strGPIB}" + "\t" + "Failed"); + } + return rtn; + } + + /// + /// 按照文件发送指令 + /// + /// 文件地址 + /// 命令长度 + /// + public virtual int WirteFromFile(string strFilename, int iDatalen) + { + int rtn = 0; + int iCount = 0; + + try + { + if (_connectStatus) + { + //write the specific file to the instrument + rtn = Visa32.viWriteFromFile(m_session, strFilename, iDatalen, ref iCount); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Write From File:{strFilename}" + "\t" + "Successed"); + } + else + { + //DeviceControlLogger.Logger.Info($"{_info} No Connect"); + } + } + catch (Exception ex) + { + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Write From File:{strFilename}" + "\t" + "Failed" + ",Error Code:" + rtn, ex); + //throw new DeviceException($"{_info} Write From File:{strFilename}" + "\t" + "Failed"); + } + return rtn; + } + + /// + /// 读取返回信息 + /// + /// + /// + public virtual int ReadOnly(out byte[] byteData) + { + int rtn = 0; + byte[] bData = new byte[BUFFER_MAX]; + int iCount; + try + { + if (_connectStatus) + { + rtn = Visa32.viRead(m_session, bData, BUFFER_MAX, out iCount); + Array.Resize(ref bData, iCount); + byteData = bData; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Read Only Successed" + "\t" + "Return:" + Encoding.Default.GetString(bData)); + } + else + { + byteData = new byte[1]; + //DeviceControlLogger.Logger.Info($"{_info} No Connect"); + } + } + catch (Exception ex) + { + byteData = new byte[1]; + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Read Only Failed" + "\t" + "Error Code:" + rtn, ex); + //throw new DeviceException($"{_info} Read Data Failed"); + } + return rtn; + } + + /// + /// 读取返回信息 + /// + /// + /// + public virtual int ReadOnly(out string strData) + { + int rtn = 0; + byte[] bData = new byte[BUFFER_MAX]; + int iCount; + strData = ""; + try + { + if (_connectStatus) + { + rtn = Visa32.viRead(m_session, bData, BUFFER_MAX, out iCount); + Array.Resize(ref bData, iCount); + strData = System.Text.Encoding.Default.GetString(bData); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Read Only Successed" + "\t" + "Return:" + Encoding.Default.GetString(bData)); + } + else + { + //DeviceControlLogger.Logger.Info($"{_info} No Connect"); + } + } + catch (Exception ex) + { + strData = "0"; + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Read Only Failed" + "\t" + "Error Code" + rtn, ex); + //throw new DeviceException($"{_info} Read Data Failed"); + } + return rtn; + } + + /// + /// 读取返回信息 + /// + /// + /// + public virtual int ReadOnly(out double data) + { + int rtn = 0; + string dataStr = ""; + rtn += ReadOnly(out dataStr); + data = Convert.ToDouble(Conversion.Val(dataStr)); + return rtn; + } + + /// + /// 读取返回信息 + /// + /// + /// + public virtual int ReadOnly(out int idata) + { + int rtn = 0; + string dataStr = ""; + rtn += ReadOnly(out dataStr); + idata = Convert.ToInt32(Conversion.Val(dataStr)); + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, out byte[] bData, int waitTime = 50) + { + int rtn = 0; + byte[] buffer = new byte[BUFFER_MAX]; + List dataList = new List(); + int count; + try + { + if (_connectStatus) + { + rtn = this.Write(strGPIB); + Thread.Sleep(waitTime); + if (rtn >= 0) + { + rtn = Visa32.viRead(m_session, buffer, BUFFER_MAX, out count); + while (rtn == 1073676294) + { + dataList.AddRange(buffer); + rtn = Visa32.viRead(m_session, buffer, BUFFER_MAX, out count); + } + Array.Resize(ref buffer, count); + dataList.AddRange(buffer); + } + bData = dataList.ToArray(); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Read Successed" + "\t" + "Return:" + Encoding.Default.GetString(bData)); + } + else + { + bData = new byte[1]; + //DeviceControlLogger.Logger.Info($"{_info} No Conncect"); + } + + } + catch (Exception ex) + { + bData = new byte[1]; + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Read Failed" + "\t" + strGPIB + "\t" + "Error Code:" + rtn, ex); + //throw new DeviceException($"{_info} Read Failed"); + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, out string strData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + + rtn = this.Read(strGPIB, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + strData = System.Text.Encoding.Default.GetString(bBuffer); + } + else + { + strData = ""; + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, out int iData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + this.Read(strGPIB, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + iData = Convert.ToInt32(Conversion.Val(System.Text.Encoding.Default.GetString(bBuffer))); + } + else + { + iData = 0; + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, out double dblData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + this.Read(strGPIB, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + dblData = Convert.ToDouble(Conversion.Val((System.Text.Encoding.Default.GetString(bBuffer)))); + } + else + { + dblData = 0; + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, string endStr, out byte[] bData, int waitTime = 50) + { + int rtn = 0; + byte[] buffer = new byte[BUFFER_MAX]; + List dataList = new List(); + int count; + try + { + if (_connectStatus) + { + rtn = this.Write(strGPIB, endStr); + Thread.Sleep(waitTime); + if (rtn >= 0) + { + rtn = Visa32.viRead(m_session, buffer, BUFFER_MAX, out count); + while (rtn == 1073676294) + { + dataList.AddRange(buffer); + rtn = Visa32.viRead(m_session, buffer, BUFFER_MAX, out count); + } + Array.Resize(ref buffer, count); + dataList.AddRange(buffer); + } + bData = dataList.ToArray(); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Read Successed" + "\t" + "Return:" + Encoding.Default.GetString(bData)); + } + else + { + bData = new byte[1]; + //DeviceControlLogger.Logger.Info($"{_info} No Conncect"); + } + + } + catch (Exception ex) + { + bData = new byte[1]; + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{_info} Read Failed" + "\t" + strGPIB + "\t" + "Error Code:" + rtn, ex); + //throw new DeviceException($"{_info} Read Failed"); + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, string endStr, out string strData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + + rtn = this.Read(strGPIB, endStr, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + strData = System.Text.Encoding.Default.GetString(bBuffer); + } + else + { + strData = ""; + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, string endStr, out int iData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + this.Read(strGPIB, endStr, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + iData = Convert.ToInt32(Conversion.Val(System.Text.Encoding.Default.GetString(bBuffer))); + } + else + { + iData = 0; + } + return rtn; + } + + /// + /// 先发送,后查询指令 + /// + /// + /// + /// + public virtual int Read(string strGPIB, string endStr, out double dblData, int waitTime = 50) + { + int rtn = 0; + byte[] bBuffer; + this.Read(strGPIB, endStr, out bBuffer, waitTime); + if (rtn == Visa32.VI_SUCCESS || rtn > 0) + { + dblData = Convert.ToDouble(Conversion.Val((System.Text.Encoding.Default.GetString(bBuffer)))); + } + else + { + dblData = 0; + } + return rtn; + } + #endregion + + #region Private functions + /// + /// 设置延迟时间 + /// + /// 延迟时间 + /// + public int SetTimeOut(int timeout) + { + int rtn = Visa32.viSetAttribute(m_session, Visa32.VI_ATTR_TMO_VALUE, timeout); + return rtn; + } + + /// + /// 查询*IDN + /// + /// + /// + public int GetIDN(out string strIDN) + { + int rtn = 0; + this.Read("*IDN?", out strIDN); + return rtn; + } + + private delegate int OpenRmDelegate(); + + /// + /// 打开资源 + /// + /// + private static int OpenRmThread() + { + int rtn = -1; + + if (m_iRm == -1) + try + { rtn = Visa32.viOpenDefaultRM(out m_iRm); } + catch + { rtn = -1; } + + return rtn; + } + + /// + /// 打开资源 + /// + /// + private static int OpenRm() + { + OpenRmDelegate rm = OpenRmThread; + IAsyncResult ar = rm.BeginInvoke(null, null); + int timeOut = 1000; + while (!ar.IsCompleted) + { + System.Threading.Thread.Sleep(50); + timeOut -= 50; + if (timeOut <= 0) + { + return -1; + } + } + int rtn = rm.EndInvoke(ar); + return rtn; + } + + /// + /// 关闭资源 + /// + /// + private static int CloseRm() + { + int rtn = -1; + if (m_iRm != -1) + try + { + rtn = Visa32.viClose(m_iRm); + } + catch + { + return -1; + } + return rtn; + } + + /// + /// 查询状态 + /// + /// 状态 + /// + public int ReadStatus(ref short status) + { + int rtn = 0; + try + { + if (_connectStatus) + { + //write SCPI command to the instrument + rtn = Visa32.viReadSTB(m_session, ref status); + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{_info} Read Status Successed!" + "\t" + "return:" + status.ToString()); + } + else + { + status = 0; + //DeviceControlLogger.Logger.Info($"{_info} 未连接!"); + } + } + catch (Exception ex) + { + rtn = Visa32.VI_ERROR_IO; + //DeviceControlLogger.Logger.Error($"{m_inst.address} Read Status Failed" + ",Error Code:" + rtn, ex); + //throw new DeviceException($"{m_inst.address} Read Status Failed"); + } + return rtn; + } + + /// + /// 刷新状态信息 + /// + /// + public virtual int RefreshInst() + { + int rtn = 0; + //rtn = Connect(); + rtn = GetIDN(out m_inst.IDN); + if (m_inst.IDN == "") + { + m_inst.Status = EM_STATUS.DISCONNECT; + } + else + { + m_inst.Status = EM_STATUS.CONNECT; + } + return rtn; + } + + #endregion + + #region 枚举结构定义 + public enum EM_STATUS + { + UNKNOW = 0, + CONNECT = 1, + DISCONNECT + }; + public enum EM_TYPE + { + UNKNOW = 0, + SG, + SA, + PM, + NA, + EMU, + FADER, + SWITCH, + SOFTWARE, + OTHER + }; + public struct INST + { + public string address; + public string IDN; + public int timeout; + public EM_STATUS Status; + public EM_TYPE Type; + public string Model; + }; + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs new file mode 100644 index 00000000..84e4aa50 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs @@ -0,0 +1,5276 @@ +using System; +using System.Threading.Tasks; +using System.Collections.Generic; + +using System.ComponentModel; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Linq; +using MTNet.Application.IDAL; +using MTNet.Application.Entity; +using MTNet.Application.ConnectBase; +using MTNet.Application.IDAL.Utils; +namespace MTNet.Application.DriverLibrary.BaseStation.Ericsson +{ + public class EricssonBaseStationTester : ConnectInstBase, IBaseStationTester + { + + + /// + /// 连接状态 + /// + public bool ConnectStatus { get; set; } = false; + + bool _disposed { get; set; } = false; + string _cmd = ""; + + /// + /// 站点标识,可以使用基站IP + /// + //string _stationId = "/home/ruili/moshell_logfiles/CAICTNRPFCM8TR2_modump.zip"; + //string _stationId = "181.18.3.3"; + string _stationId =""; + private MoShellResult _result = new MoShellResult(); + public MoShellResult Result + { + get { return _result; } + set + { + _result = value; + if (_result?.Status != true) + { + //var ex = new DeviceException($"{_result?.Message}"); + ////DeviceControlLogger.Logger.Error($"Send command to ericsson base station failed.", ex); + //throw ex; + } + } + } + + private List _cells = new List(); + + int _rtn = 0; + + /// + /// 构造函数 + /// + /// + /// + public EricssonBaseStationTester(DeviceAddrConfig addrConfig) : base(addrConfig) + { + _stationId = addrConfig.UserName; + } + + public EricssonBaseStationTester(BaseStationTesterAddrConfig addrConfig) : base(addrConfig) + { + + } + + #region 基站函数 + + public override int Connect() + { + int rtn = 0; + try + { + if (!ConnectStatus) + { + rtn = base.Connect(); + ConnectStatus = true; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(1); + throw new Exception($"Ericsson basestation connect error.[{rtn}]", ex); + } + return rtn; + } + + public override int Close() + { + int rtn = 0; + try + { + rtn = base.Close(); + ConnectStatus = false; + } + catch (Exception ex) + { + rtn = GetErrorCode(4); + throw new Exception($"Ericsson basestation close error.[{rtn}]", ex); + } + return rtn; + } + + public int Initial() + { + //GetCmdEnumInfo(); + + int rtn = 0; + MoShellResult result; + List moInfos; + + result = ExecuteCheckCmd(_stationId); + if (!result?.Status == true) + Result = ExecuteInitCmd(_stationId); + + //Result = ExecuteExtraCmd(_stationId, "parsemom /home/ruili/jarxml/MSRBS_NODE_MODEL_23.Q4_643.28133.126_a3d2.xml.gz"); + Result = ExecuteExtraCmd(_stationId, "lt all"); + + //moInfos = ExtractNci(_stationId); + //moInfos = ExtractCellIds(_stationId); + //ExtractCellIdDetail(moInfos); + + //Result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_OffsetFreq, false, ("NRCellCU", "5292034"), ("NRFreqRelation", "152650"), ("qOffsetFreq", "0")); + //Result = ExecuteSetCmd(_stationId, EricssonCmdType.TAC, true, ("nrtac", "1")); + //Result = ExecuteSetCmd(_stationId, EricssonCmdType.B2_Threshold2EUTRA, false, ("GNBCUCPFunction", "1"), ("Mcpc", "1"), ("McpcPCellProfile", "Default"), ("McpcPCellProfileUeCfg", "Base"), ("rsrpCandidateB2", null), ("threshold2EUtra", "-95")); + + if (result?.Status == true) + rtn = 0; + + Console.WriteLine($"Ericsson basestation initial successful."); + + return rtn; + } + public string TestGet(string getdata) + { + return ExecuteExtraCmd(_stationId, getdata).ToString(); + } + /// + /// 提取指定基站的gNBId + /// + /// + /// + public string ExtractGNBId(string stationId) + { + string gNBId = string.Empty; + + MoShellResult result = ExecuteExtraCmd(stationId, "get . gNBId"); + + string pattern = @"GNBCUCPFunction=1\s+gNBId\s+(\S+)"; + Match match = Regex.Match(result?.Message, pattern); + if (match.Success) + gNBId = match.Groups[1].Value; + + return gNBId; + } + /// + /// 提取指定基站的eNBId + /// + /// + /// + public string ExtracteNBId(string stationId) + { + string gNBId = string.Empty; + + MoShellResult result = ExecuteExtraCmd(stationId, "get . enbid"); + + string pattern = @"ENodeBFunction=1\s+eNBId\s+(\S+)"; + Match match = Regex.Match(result?.Message, pattern); + if (match.Success) + gNBId = match.Groups[1].Value; + + return gNBId; + } + /// + /// 提取cellid信息 + /// + /// + public List ExtractCellIds(string stationId) + { + MoShellResult result = ExecuteExtraCmd(stationId, "get . cellid"); + + var pattern = @"^(GNBCUCPFunction[^,]+,EUtraNetwork[^,]+,ExternalENodeBFunction[^,]+,ExternalEUtranCell[^ ]+) (\w+) (\S+)"; + var matches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline);//匹配整个MO + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success && match.Groups.Count >= 4) + { + var info = new MoInfo + { + Mo = match.Groups[1].Value, + Attribute = match.Groups[2].Value, + Value = match.Groups[3].Value + }; + results.Add(info); + } + } + + results.ForEach(x => Console.WriteLine(x)); + return results; + } + + /// + /// 提取cellid详细信息,包含解析Mo数据属性 + /// + /// + public List ExtractCellIdDetail(string stationId) + { + MoShellResult result = ExecuteExtraCmd(stationId, "get . cellid"); + var pattern = @"^(GNBCUCPFunction[^,]+,EUtraNetwork[^,]+,ExternalENodeBFunction[^,]+,ExternalEUtranCell[^ ]+) (\w+) (\S+)"; + var allMatches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline);//匹配整个MO + + var mos = new List(); + + foreach (Match allMatch in allMatches) + { + pattern = @"^GNBCUCPFunction=(\d+),EUtraNetwork=(\d+),ExternalENodeBFunction=([\w_]+),ExternalEUtranCell=(\d+)"; + var moMatches = Regex.Matches(allMatch.Groups[1].Value, pattern);//精确匹配MO的属性值 + foreach (Match moMatch in moMatches) + { + int moIndex = mos.FindIndex(x => x.MoIdentifier == moMatch.Groups[0].Value); + if (moIndex >= 0)//当前mo已存在 + { + mos[moIndex].Attributes[allMatch.Groups[2].Value] = allMatch.Groups[3].Value; + } + else//不存在 添加新mo + { + var mo = new ManagedObject + { + MoIdentifier = moMatch.Groups[0].Value, + MoProperties = new Dictionary(), + Attributes = new Dictionary() + }; + + mo.MoProperties["GNBCUCPFunction"] = moMatch.Groups[1].Value; + mo.MoProperties["EUtraNetwork"] = moMatch.Groups[2].Value; + mo.MoProperties["ExternalENodeBFunction"] = moMatch.Groups[3].Value; + mo.MoProperties["ExternalEUtranCell"] = moMatch.Groups[4].Value; + + mo.Attributes[allMatch.Groups[2].Value] = allMatch.Groups[3].Value; + mos.Add(mo); + } + } + } + + mos.ForEach(x => Console.WriteLine(x)); + return mos; + } + public List ExtractCellIdDetail(List moInfos) + { + var mos = new List(); + + foreach (var info in moInfos) + { + var pattern = @"^GNBCUCPFunction=(\d+),EUtraNetwork=(\d+),ExternalENodeBFunction=([\w_]+),ExternalEUtranCell=(\d+)"; + var moMatches = Regex.Matches(info.Mo, pattern);//精确匹配MO的属性值 + foreach (Match moMatch in moMatches) + { + int moIndex = mos.FindIndex(x => x.MoIdentifier == moMatch.Groups[0].Value); + if (moIndex >= 0)//当前mo已存在 + { + mos[moIndex].Attributes[info.Attribute] = info.Value; + } + else//不存在 添加新mo + { + var mo = new ManagedObject + { + MoIdentifier = moMatch.Groups[0].Value, + MoProperties = new Dictionary(), + Attributes = new Dictionary() + }; + + mo.MoProperties["GNBCUCPFunction"] = moMatch.Groups[1].Value; + mo.MoProperties["EUtraNetwork"] = moMatch.Groups[2].Value; + mo.MoProperties["ExternalENodeBFunction"] = moMatch.Groups[3].Value; + mo.MoProperties["ExternalEUtranCell"] = moMatch.Groups[4].Value; + + mo.Attributes[info.Attribute] = info.Value; + mos.Add(mo); + } + } + } + + mos.ForEach(x => Console.WriteLine(x)); + return mos; + } + + /// + /// 提取nci信息 + /// + /// + public List ExtractNci(string stationId) + { + MoShellResult result = ExecuteExtraCmd(stationId, "get . nci"); + + string pattern = @"^([A-Za-z]+[\w]*)=(\d+)\s+(\w+)\s+(\d+)"; + var matches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline); + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success && match.Groups.Count == 5) + { + if (match.Groups[3].Value != "nCI") + continue; + + var info = new MoInfo + { + Mo = $"{match.Groups[1].Value}={match.Groups[2].Value}", + Attribute = match.Groups[3].Value, + Value = match.Groups[4].Value + }; + results.Add(info); + } + } + + results.ForEach(x => Console.WriteLine(x)); + return results; + } + + /// + /// 提取NRFreqRelation信息 + /// + /// + public List ExtractNRFreqRelation(string stationId, List cells) + { + MoShellResult result = ExecuteExtraCmd(stationId, "get . nRFreqRelationId"); + + string pattern = @"NRCellCU=(\d+),NRFreqRelation=(\d+)\s*nRFreqRelationId\s*(\d+)"; + var matches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline); + var results = new Dictionary>(); + + foreach (Match match in matches) + { + if (match.Success) + { + var nrCellCU = match.Groups[1].Value; + var nrFreqRelation = match.Groups[2].Value; + + if (!results.ContainsKey(nrCellCU)) + { + results[nrCellCU] = new List(); + } + results[nrCellCU].Add(nrFreqRelation); + } + } + + foreach (var item in results) + { + var cell = cells.FirstOrDefault(x => x.NRCellCUId == item.Key); + if (cell != null) + { + cell.FreqRelationInfo =JsonConvert.SerializeObject(item.Value); + } + } + + return cells; + } + + /// + /// 执行MoShell初始化命令 + /// + /// + /// + public MoShellResult ExecuteInitCmd(string stationId, string cmdText = "/home/zte/moshell/in/moshell/moshell", bool addHost = false) + { + object cmdObj; + + if (!addHost) + cmdObj = new { command = MoShellCmdType.InitCmd.GetDescription(), data = new { station_id = stationId, cmd = cmdText } }; + else + cmdObj = new { command = MoShellCmdType.InitCmd.GetDescription(), data = new { station_id = stationId, cmd = cmdText, rhost = new { ipaddr = AddrConfig.AddrConfig, user_id = AddrConfig.UserName, passwd = AddrConfig.Password } } }; + + string jsonText = JsonConvert.SerializeObject(cmdObj); + var result = ExecuteCommand(jsonText); + return result; + } + + /// + /// 执行MoShell额外命令 + /// + /// + /// + public MoShellResult ExecuteExtraCmd(string stationId, string cmdText) + { + var cmdObj = new { command = MoShellCmdType.ExtraCmd.GetDescription(), data = new { station_id = stationId, cmd = cmdText } }; + + string jsonText = JsonConvert.SerializeObject(cmdObj); + var result = ExecuteCommand(jsonText); + return result; + } + + /// + /// 执行MoShell设置命令 + /// + /// + /// + /// + public MoShellResult ExecuteSetCmd(string stationId, EricssonCmdType cmdType, bool addPoint, params (string name, string value)[] paras) + { + var cmdObj = new { command = MoShellCmdType.SetCmd.GetDescription(), data = new { station_id = stationId, cmd_name = cmdType.GetCommand(), cmd_desc = cmdType.GetDescription() } }; + + string jsonText = JsonConvert.SerializeObject(cmdObj); + JObject jsonObject = JObject.Parse(jsonText); + JObject dataObject = (JObject)jsonObject["data"]; + + if (addPoint) + dataObject.Add(".", null); + + for (int i = 0; i < paras?.Length; i++) + { + dataObject.Add(paras[i].name, paras[i].value); + } + + var result = ExecuteCommand(jsonObject.ToString(Formatting.None)); + return result; + } + + /// + /// 执行MoShell检查命令 + /// + /// + /// + public MoShellResult ExecuteCheckCmd(string stationId) + { + var cmdObj = new { command = MoShellCmdType.CheckCmd.GetDescription(), data = new { station_id = stationId, cmd = "Station_Status" } }; + + string jsonText = JsonConvert.SerializeObject(cmdObj); + var result = ExecuteCommand(jsonText); + return result; + } + + /// + /// 执行MoShell退出命令 + /// + /// + /// + public int ExecuteQuitCmd(string stationId) + { + var cmdObj = new { command = MoShellCmdType.QuitCmd.GetDescription(), data = new { station_id = stationId, cmd = "quit" } }; + + string jsonText = JsonConvert.SerializeObject(cmdObj); + int rtn = this.Write(jsonText); + return rtn; + } + + /// + /// 执行指令 + /// + /// + /// + public MoShellResult ExecuteCommand(string cmdText) + { + Output(); + Console.WriteLine($"{DateTime.Now:yyyy:MM:dd HH:mm:ss.fff} => Send:{cmdText}"); + MoShellResult result = new MoShellResult(); + StringBuilder finalResult = new StringBuilder(); + try + { + int rtn = this.Read(cmdText, out string tempResult); + finalResult.Append(tempResult); + + int index = 0; + while (!IsValidJson(finalResult.ToString()) && index < 100)//解决因一次读不全导致解析出错的问题 + { + this.ReadOnly(out tempResult); + finalResult.Append(tempResult); + index++; + } + + string finalStr = finalResult.ToString(); + result = JsonConvert.DeserializeObject(finalStr); + string message = Regex.Replace(result.Message, @"(? Read:{message}"); + } + catch (Exception ex) + { + //SystemLogger.Logger.Error($"Read not parameter command error.", ex); + throw; + } + finally + { + Output(); + } + return result; + } + /// + /// 校验字符串是否为Json格式 + /// + /// + /// + public static bool IsValidJson(string input) + { + try + { + JToken.Parse(input); + return true; + } + catch + { + return false; + } + } + private void Output(string str = "=", int outputNum = 1, int length = 200) + { + for (int i = 0; i < outputNum; i++) + { + for (int j = 0; j < length; j++) + Console.Write(str); + //if (!(i == outputNum - 1)) + Console.WriteLine(); + } + } + + + public Task> QueryFDDLteCells() + { + return null; + } + + public Task> QueryNrCells() + { + return null; + } + + public async Task> GetCells() + { + var list = new List(); + var cells = GetCells(_stationId); + list.AddRange(cells); + return list; + } + + public List GetCells(string stationId) + { + //确定基站是4g还是5g + List cells=new List(); + MoShellResult moShellResult = ExecuteExtraCmd(stationId, "st cell"); + if (moShellResult.Message.Contains("NRCell"))//5g + { + string gNBId = ExtractGNBId(stationId); + cells = GetDUCells(stationId, gNBId); + cells = GetCUCells(stationId, cells); + cells = ExtractNRFreqRelation(stationId, cells); + _cells = cells; + } + else { + string eNBId = ExtracteNBId(stationId); + cells = GetLteCells(stationId, eNBId); + _cells = cells; + } + return cells; + } + /// + /// 获取lte小区 + /// + /// + /// + /// + private List GetLteCells(string stationId, string gNBId) + { + var cells = new List(); + + MoShellResult result = ExecuteExtraCmd(stationId, "st cell"); + + var pattern = @"(\d+)\s+(\d+)\s*\(\s*(.*?)\s*\)\s+(\d+)\s*\(\s*(.*?)\s*\)\s+(ENodeBFunction=1,EUtranCell\w*=\S*)"; + var matches = Regex.Matches(result?.Message, pattern);//匹配整个MO + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success && match.Groups.Count >= 7) + { + var info = new MoInfo + { + Mo = match.Groups[6].Value.Trim(), + Attribute = match.Groups[3].Value.Trim(), + Value = match.Groups[1].Value + }; + results.Add(info); + } + } + + foreach (var item in results) + { + string cmdText = $"get {item.Mo}"; + var itemResult = ExecuteExtraCmd(stationId, cmdText); + GetMccMnc(itemResult?.Message, out string mcc, out string mnc); + //var plmnInfos = ExtractPLMNInfos(itemResult?.Message); + var sectors = ExtractNRSectorCarrierRef(itemResult?.Message); + + var properties = new Dictionary(); + string[] lines = itemResult?.Message.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); // 分割文本为行 + foreach (string line in lines) + { + // 基础匹配属性名和值的结构,忽略注释行和空行 + if (!string.IsNullOrWhiteSpace(line) && !line.StartsWith(" >>>")) + { + string[] parts = line.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); + if (parts.Length == 2) + { + string key = parts[0].Trim(); + string rawValue = parts[1].Trim(); + + // 处理值中可能存在的数组和特殊结构 + string value = ProcessComplexValue(rawValue); + properties[key] = value; + } + } + } + + if (!properties.Safe().Any()) + continue; + + var cell = new Cell + { + FactoryType = BaseStationTesterTypeEnum.Ericsson, + NodeBId = int.Parse(gNBId), + MoId = item.Mo, + mcc = mcc, + mnc = mnc, + PCI = int.Parse(GetDicValue(properties, "physicalLayerCellId")), + // Id = GetDicValue(properties, "nRCellDUId"), + //NCI = GetDicValue(properties, "nCI"), + //NRCellDUId = GetDicValue(properties, "nRCellDUId"), + //NRCellCUId = GetDicValue(properties, "nRCellCUId"), + CellId = int.Parse(GetDicValue(properties, "cellId")), + //ssbFrequency = GetDicValue(properties, "ssbFrequency"), + Freqband=GetDicValue(properties, "freqBand"), + Status = (int)(lines.FirstOrDefault(x => x.Contains("administrativeState")).Contains("UNLOCKED") ? CellStatusEnum.Unlocked : CellStatusEnum.Locked) + }; + cell.Name = $"{cell.NodeBId}-{cell.CellId}"; + cells.Add(cell); + } + + return cells; + } + /// + /// 获取DU小区 + /// + /// + /// + /// + private List GetDUCells(string stationId, string gNBId) + { + var list = new List(); + + MoShellResult result = ExecuteExtraCmd(stationId, "st cell"); + + var pattern = @"(\d+)\s+(\d+)\s*\(\s*(.*?)\s*\)\s+(\d+)\s*\(\s*(.*?)\s*\)\s+(GNBDUFunction=1,NRCellDU=\d+)"; + var matches = Regex.Matches(result?.Message, pattern);//匹配整个MO + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success && match.Groups.Count >= 7) + { + var info = new MoInfo + { + Mo = match.Groups[6].Value.Trim(), + Attribute = match.Groups[3].Value.Trim(), + Value = match.Groups[1].Value + }; + results.Add(info); + } + } + + foreach (var item in results) + { + string cmdText = $"get {item.Mo}"; + var itemResult = ExecuteExtraCmd(stationId, cmdText); + GetMccMnc(itemResult?.Message,out string mcc,out string mnc); + //var plmnInfos = ExtractPLMNInfos(itemResult?.Message); + var sectors = ExtractNRSectorCarrierRef(itemResult?.Message); + + var properties = new Dictionary(); + string[] lines = itemResult?.Message.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); // 分割文本为行 + foreach (string line in lines) + { + // 基础匹配属性名和值的结构,忽略注释行和空行 + if (!string.IsNullOrWhiteSpace(line) && !line.StartsWith(" >>>")) + { + string[] parts = line.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); + if (parts.Length == 2) + { + string key = parts[0].Trim(); + string rawValue = parts[1].Trim(); + + // 处理值中可能存在的数组和特殊结构 + string value = ProcessComplexValue(rawValue); + properties[key] = value; + } + } + } + + if (!properties.Safe().Any()) + continue; + + var cell = new Cell + { + FactoryType = BaseStationTesterTypeEnum.Ericsson, + NodeBId =int.Parse(gNBId), + MoId = item.Mo, + mcc=mcc, + mnc=mnc, + PCI =int.Parse(GetDicValue(properties, "nRPCI")), + // Id = GetDicValue(properties, "nRCellDUId"), + NCI = GetDicValue(properties, "nCI"), + NRCellDUId = GetDicValue(properties, "nRCellDUId"), + //NRCellCUId = GetDicValue(properties, "nRCellCUId"), + CellId =int.Parse(GetDicValue(properties, "cellLocalId")), + ssbFrequency = GetDicValue(properties, "ssbFrequency"), + Status =(int)(lines.FirstOrDefault(x => x.Contains("administrativeState")).Contains("UNLOCKED") ? CellStatusEnum.Unlocked : CellStatusEnum.Locked) + }; + cell.Name = $"{cell.NodeBId}-{cell.CellId}"; + + if (cell.ssbFrequency == "0") + cell.ssbFrequency = GetDicValue(properties, "ssbFrequencyAutoSelected"); + + if (sectors.Safe().Any()) + { + cell.GNBDUFunction = sectors.FirstOrDefault().GNBDUFunction; + cell.NRSectorCarrier = sectors.FirstOrDefault().NRSectorCarrier; + } + + list.Add(cell); + } + + return list; + } + + /// + /// 获取CU小区 + /// + /// + /// + /// + private List GetCUCells(string stationId, string gNBId) + { + var list = new List(); + + MoShellResult result = ExecuteExtraCmd(stationId, "get . nRCellCUId"); + + var pattern = @"^(\w+=\w+).*?(\w+)\s+(\d+)"; + var matches = Regex.Matches(result?.Message, pattern, RegexOptions.Multiline);//匹配整个MO + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success) + { + var info = new MoInfo + { + Mo = match.Groups[1].Value, + Attribute = match.Groups[2].Value, + Value = match.Groups[3].Value + }; + results.Add(info); + } + } + + foreach (var item in results) + { + string cmdText = $"get {item.Mo}"; + var itemResult = ExecuteExtraCmd(stationId, cmdText); + GetMccMnc(itemResult?.Message, out string mcc, out string mnc); + //var plmnInfos = ExtractPLMNInfos(itemResult?.Message); + + var properties = new Dictionary(); + string[] lines = itemResult?.Message.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); // 分割文本为行 + foreach (string line in lines) + { + // 基础匹配属性名和值的结构,忽略注释行和空行 + if (!string.IsNullOrWhiteSpace(line) && !line.StartsWith(" >>>")) + { + string[] parts = line.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); + if (parts.Length == 2) + { + string key = parts[0].Trim(); + string rawValue = parts[1].Trim(); + + // 处理值中可能存在的数组和特殊结构 + string value = ProcessComplexValue(rawValue); + properties[key] = value; + } + } + } + + if (!properties.Safe().Any()) + continue; + + var cell = new Cell + { + FactoryType = BaseStationTesterTypeEnum.Ericsson, + NodeBId =int.Parse(gNBId), + MoId = item.Mo, + mcc=mcc, + mnc=mnc, + //ZTEpLMNId = plmnInfos?.FirstOrDefault().ToString(), + PCI =int.Parse(GetDicValue(properties, "nRPCI")), + //Id = GetDicValue(properties, "nRCellCUId"), + CellId =int.Parse(GetDicValue(properties, "cellLocalId")) , + ssbFrequency = GetDicValue(properties, "ssbFrequency"), + Status = (int)(lines.FirstOrDefault(x => x.Contains("cellState")).Contains("ACTIVE") ? CellStatusEnum.Unlocked : CellStatusEnum.Locked) + }; + cell.Name = $"{cell.NodeBId}-{cell.CellId}"; + + list.Add(cell); + } + + return list; + } + private List GetCUCells(string stationId, List cells) + { + //var list = new List(); + + MoShellResult result = ExecuteExtraCmd(stationId, "get . nRCellCUId"); + + var pattern = @"^(\w+=\w+).*?(\w+)\s+(\d+)"; + var matches = Regex.Matches(result?.Message, pattern, RegexOptions.Multiline);//匹配整个MO + var results = new List(); + + foreach (Match match in matches) + { + if (match.Success) + { + var info = new MoInfo + { + Mo = match.Groups[1].Value, + Attribute = match.Groups[2].Value, + Value = match.Groups[3].Value + }; + results.Add(info); + } + } + + foreach (var item in results) + { + string cmdText = $"get {item.Mo}"; + var itemResult = ExecuteExtraCmd(stationId, cmdText); + + var plmnInfos = ExtractPLMNInfos(itemResult?.Message); + + var properties = new Dictionary(); + string[] lines = itemResult?.Message.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); // 分割文本为行 + foreach (string line in lines) + { + // 基础匹配属性名和值的结构,忽略注释行和空行 + if (!string.IsNullOrWhiteSpace(line) && !line.StartsWith(" >>>")) + { + string[] parts = line.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); + if (parts.Length == 2) + { + string key = parts[0].Trim(); + string rawValue = parts[1].Trim(); + + // 处理值中可能存在的数组和特殊结构 + string value = ProcessComplexValue(rawValue); + properties[key] = value; + } + } + } + + if (!properties.Safe().Any()) + continue; + + string localId = GetDicValue(properties, "cellLocalId"); + string nCI = GetDicValue(properties, "nCI"); + if (!string.IsNullOrEmpty(localId)&&!string.IsNullOrEmpty(nCI)) + { + var cell = cells.FirstOrDefault(x => x.CellId == int.Parse(localId) && x.NCI == nCI); + if (cell != null) + { + cell.NRCellCUId = GetDicValue(properties, "nRCellCUId"); + } + } + //var cell = new Cell + //{ + // FactoryType = AutoTest.Core.Domain.FactoryType.Ericsson, + // gNBId = gNBId, + // MoId = item.Mo, + // ZTEpLMNId = plmnInfos?.FirstOrDefault().ToString(), + // PCI = GetDicValue(properties, "nRPCI"), + // Id = GetDicValue(properties, "nRCellCUId"), + // LocalId = GetDicValue(properties, "cellLocalId"), + // ssbFrequency = GetDicValue(properties, "ssbFrequency"), + // Status = lines.FirstOrDefault(x => x.Contains("cellState")).Contains("ACTIVE") ? (int)AutoTest.Core.Domain.BSModel.CellStatus.Unlocked : (int)AutoTest.Core.Domain.BSModel.CellStatus.Locked, + //}; + //cell.Name = $"{cell.gNBId}-{cell.LocalId}"; + + //list.Add(cell); + } + + return cells; + } + + private static string ProcessComplexValue(string rawValue) + { + if (rawValue.StartsWith("[") && rawValue.EndsWith("]")) + { + // 去除数组的方括号 + return rawValue[1..^1].Trim(); + } + else if (rawValue.Contains("(") && rawValue.Contains(")")) + { + return rawValue; + } + else + { + return rawValue; + } + } + + private static void GetMccMnc(string input,out string mcc,out string mnc) { + mcc = ""; + mnc = ""; + string pattern = @"\>\>\> Struct\[\d+\] has \d+ members:\s*>>>\s*1\.mcc = (\d+)\s*>>>\s*2\.mnc = (\d+)"; + var matches = Regex.Matches(input, pattern, RegexOptions.Multiline); + + foreach (Match match in matches) + { + if (match.Success) + { + mcc = match.Groups[1].Value; + mnc = match.Groups[2].Value; + } + } + } + /// + /// 获取小区PLMN信息 + /// + /// + /// + private static List ExtractPLMNInfos(string input) + { + List plmnInfos = new List(); + string pattern = @"\>\>\> Struct\[\d+\] has 2 members:\s*>>>\s*1\.mcc = (\d+)\s*>>>\s*2\.mnc = (\d+)"; + var matches = Regex.Matches(input, pattern, RegexOptions.Multiline); + + foreach (Match match in matches) + { + if (match.Success) + { + int mcc = int.Parse(match.Groups[1].Value); + int mnc = int.Parse(match.Groups[2].Value); + plmnInfos.Add(new PLMNInfo { MCC = mcc, MNC = mnc }); + } + } + + return plmnInfos; + } + + /// + /// 获取小区NRSectorCarrierRef信息 + /// + /// + /// + private static List<(string GNBDUFunction, string NRSectorCarrier)> ExtractNRSectorCarrierRef(string message) + { + // >>> nRSectorCarrierRef = GNBDUFunction = 1,NRSectorCarrier = 1 + List<(string, string)> values = new List<(string, string)>(); + string pattern = @"nRSectorCarrierRef\s*=\s*GNBDUFunction\s*=\s*(\d+),NRSectorCarrier\s*=\s*(\d+)"; + var matches = Regex.Matches(message, pattern, RegexOptions.Multiline); + + foreach (Match match in matches) + { + if (match.Success) + { + values.Add((match.Groups[1].Value, match.Groups[2].Value)); + } + } + + return values; + } + + private string GetDicValue(Dictionary dic, string key) + { + string value = string.Empty; + if (dic.ContainsKey(key)) + value = dic[key]; + return value; + } + + public Task SetCellState(Cell cell, bool state) + { + int rtn = 0; + try + { + string cmdText = $"{(!state ? "bl" : "deb")} {cell.MoId}"; + MoShellResult result = ExecuteExtraCmd(_stationId, cmdText); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set cell status {state}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set cell status error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// 上行带宽 + ///下行带宽 + /// + /// + /// + /// + /// + /// + public Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool wait) + { + int rtn = 0; + try + { + if (!double.IsNaN(BandWidth))//修改下行 + { + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={cell.NRSectorCarrier} bSChannelBwDL {BandWidth}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Dl_Bandwidth, false, ("NRSectorCarrier", cell.NRSectorCarrier), ("bSChannelBwDL", $"{BandWidth}")); + rtn += result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set dl bandwidth {BandWidth}, result:{rtn}."); + } + if (!double.IsNaN(BandWidthUl))//修改上行 + { + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={cell.NRSectorCarrier} bSChannelBwUL {BandWidthUl}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Ul_Bandwidth, false, ("NRSectorCarrier", cell.NRSectorCarrier), ("bSChannelBwUL", $"{BandWidthUl}")); + rtn += result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set ul bandwidth {BandWidthUl}, result:{rtn}."); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set bandwidth error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 物理小区标识 + /// + /// + /// + /// + /// + public Task SetCarrierPCI(Cell cell, string CarrierPCI, bool await) + { + int rtn = 0; + try + { + //var mo = cell.MoId.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)[1]; + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} nRPCI {CarrierPCI}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.PhyCellId, false, ("NRCellDU", cell.NRCellDUId), ("nRPCI", CarrierPCI)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set pci {CarrierPCI}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set pci error.", ex); + } + return Task.FromResult(rtn); + } + public async Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + int rtn = 0; + + if (!cellPcis.Safe().Any()) + return rtn; + + foreach (var item in cellPcis) + { + rtn += await SetCarrierPCI(item.Item1, item.Item2, wait); + } + + return rtn; + } + /// + /// ssb中心频点 + /// + /// + /// + /// + /// + public Task SetCarrierFrequency(Cell cell, string Frequency, bool await) + { + int rtn = 0; + try + { + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} ssbFrequency {Frequency}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.SsbFrequency, false, ("NRCellDU", cell.NRCellDUId), ("ssbFrequency", Frequency)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set ssbFrequency {Frequency}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set ssbFrequency error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行小区中心频点//上行小区中心频点 + /// + /// + /// + /// + /// + /// + public Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + int rtn = 0; + try + { + if (!string.IsNullOrWhiteSpace(earfcnDL))//修改下行 + { + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={cell.NRSectorCarrier} arfcnDL {earfcnDL}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.DLcenterARFCNDL, false, ("NRSectorCarrier", cell.NRSectorCarrier), ("arfcnDL", $"{earfcnDL}")); + rtn += result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set dl arfcn {earfcnDL}, result:{rtn}."); + } + if (!string.IsNullOrWhiteSpace(earfcnUL))//修改上行 + { + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={cell.NRSectorCarrier} arfcnUL {earfcnUL}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ULcenterARFCNDL, false, ("NRSectorCarrier", cell.NRSectorCarrier), ("arfcnUL", $"{earfcnUL}")); + rtn += result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set ul arfcn {earfcnUL}, result:{rtn}."); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set arfcn error.", ex); + } + return Task.FromResult(rtn); + } + + public Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + return Task.FromResult(0); + } + /// + /// 最低接收电平 + /// + /// + /// + /// + public Task SetCellSelection(Cell cell, double LevelValue) + { + int rtn = 0; + try + { + //set NRCellDU=1 qRxLevMin -128 + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} qRxLevMin {LevelValue}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.MinimumRxLevel, false, ("NRCellDU", cell.NRCellDUId), ("qRxLevMin", $"{LevelValue}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set minimum rx level {LevelValue}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set minimum rx level error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR小区重选优先级 + /// + /// + /// + /// + public Task ModifyCellResel(Cell cell, int cellReselectionPriority) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 cellReselectionPriority 7 + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellCU={cell.NRCellCUId},NRFreqRelation={cell.NRFreqRelationList.FirstOrDefault()} cellReselectionPriority {cellReselectionPriority}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.CellReselectionPriority, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("cellReselectionPriority", $"{cellReselectionPriority}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set cell reselection pryority {cellReselectionPriority}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set cell reselection pryority error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// 提取修改tInactivityTimer所需参数信息 + /// + /// + public (string GNBCUCPFunction, string UeCC, string InactivityProfile, string InactivityProfileUeCfg) ExtractTInactivityTimerPara(string stationId) + { + MoShellResult result = ExecuteExtraCmd(stationId, "pr InactivityProfile"); + + string pattern = @"GNBCUCPFunction=(\d+)\s*[^\w]\s*UeCC=(\d+)\s*[^\w]\s*InactivityProfile=(\w+)\s*[^\w]\s*InactivityProfileUeCfg=(\w+)"; + var matches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline); + var results = (GNBCUCPFunction: string.Empty, UeCC: string.Empty, InactivityProfile: string.Empty, InactivityProfileUeCfg: string.Empty); + + foreach (Match match in matches) + { + if (match.Success) + { + results.GNBCUCPFunction = match.Groups[1].Value; + results.UeCC = match.Groups[2].Value; + results.InactivityProfile = match.Groups[3].Value; + results.InactivityProfileUeCfg = match.Groups[4].Value; + } + } + + return results; + } + + public Task ModifyInactiveParameter(Cell cell, int inactiveTimer) + { + int rtn = 0; + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + + //set GNBCUCPFunction=1,UeCC=1,InactivityProfile=Default,InactivityProfileUeCfg=Base tInactivityTimer 100 + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Uecc={UeCC},InactivityProfile={InactivityProfile},InactivityProfileUeCfg={InactivityProfileUeCfg} tInactivityTimer {inactiveTimer}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.UeInactivityTimer, false, ("GNBCUCPFunction", GNBCUCPFunction), ("InactivityProfile", InactivityProfile), ("InactivityProfileUeCfg", InactivityProfileUeCfg), ("tInactivityTimer", $"{inactiveTimer}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set UeInactivityTimer {inactiveTimer}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set UeInactivityTimer error.", ex); + } + return Task.FromResult(rtn); + } + + + public Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 sNonIntraSearchP 0 + //MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellCU={cell.NRCellCUId} sNonIntraSearchP {sIntraSearchP}"); + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.S_NonIntraSearchP, false, ("NRCellCU", cell.NRCellCUId), ("sNonIntraSearchP", $"{sIntraSearchP}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set sIntraSearchP {sIntraSearchP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set sIntraSearchP error.", ex); + } + return Task.FromResult(rtn); + } + + public Task CreateRelations(Cell FirstCell, Cell SecondCell) + { + return null; + } + + public Task DeleteRelations(Cell FirstCell, Cell SecondCell) + { + return Task.FromResult(0); + } + + public Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1) + { + return Task.FromResult(0); + } + + public Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2) + { + return Task.FromResult(0); + } + + public Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3) + { + return Task.FromResult(0); + } + + public Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + return Task.FromResult(0); + } + + public Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + return Task.FromResult(0); + } + + public Task SetB1Threshold(Cell cell, int value1) + { + int rtn = 0; + try + { + //var list = ExtractThresholdPara(_stationId); + //if (list.Safe().Any()) + //{ + // var (GNBCUCPFunction, Mcpc, McpcPCellProfile, McpcPCellProfileUeCfg) = list.FirstOrDefault(); + + // //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 threshold2EUtra = -95 + // MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateB2 threshold2EUtra={value1}"); + // //MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.B2_Threshold2EUTRA, false, ("GNBCUCPFunction", GNBCUCPFunction), ("Mcpc", Mcpc), ("McpcPCellProfile", McpcPCellProfile), ("McpcPCellProfileUeCfg", McpcPCellProfileUeCfg), ("threshold2EUtra", $"{value1}")); + // rtn += result?.Status == true ? 0 : -1; + //} + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set B1-Threshold {value1}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set B1-Threshold error.", ex); + } + return Task.FromResult(rtn); + } + + public Task SetB2Threshold(Cell cell, int value1, int value2) + { + int rtn = 0; + try + { + var list = ExtractThresholdPara(_stationId); + if (list.Safe().Any()) + { + var item = list.FirstOrDefault(); + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 threshold2EUtra = -95 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={item.GNBCUCPFunction},Mcpc={item.Mcpc},McpcPCellProfile={item.McpcPCellProfile},McpcPCellProfileUeCfg={item.McpcPCellProfileUeCfg} rsrpCandidateB2 threshold2EUtra={value1}"); + //MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.B2_Threshold2EUTRA, false, ("GNBCUCPFunction", item.GNBCUCPFunction), ("Mcpc", item.Mcpc), ("McpcPCellProfile", item.McpcPCellProfile), ("McpcPCellProfileUeCfg", item.McpcPCellProfileUeCfg), ("threshold2EUtra", $"{value1}")); + rtn += result?.Status == true ? 0 : -1; + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 hysteresis = 0 + MoShellResult result2 = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={item.GNBCUCPFunction},Mcpc={item.Mcpc},McpcPCellProfile={item.McpcPCellProfile},McpcPCellProfileUeCfg={item.McpcPCellProfileUeCfg} rsrpCandidateB2 hysteresis={value2}"); + //MoShellResult result2 = ExecuteSetCmd(_stationId, EricssonCmdType.B2_Threshold2EUTRA, false, ("GNBCUCPFunction", item.GNBCUCPFunction), ("Mcpc", item.Mcpc), ("McpcPCellProfile", item.McpcPCellProfile), ("McpcPCellProfileUeCfg", item.McpcPCellProfileUeCfg), ("hysteresis", $"{value2}")); + rtn += result2?.Status == true ? 0 : -1; + } + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} set B2-Threshold {value1},{value2}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set B2-Threshold error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// 提取修改门限所需参数信息 + /// + /// + public List<(string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg)> ExtractThresholdPara(string stationId) + { + MoShellResult result = ExecuteExtraCmd(stationId, "pr Mcpc"); + + string pattern = @"GNBCUCPFunction=(\d+)\s*[^\w]\s*Mcpc=(\d+)\s*[^\w]\s*McpcPCellProfile=(\w+)\s*[^\w]\s*McpcPCellProfileUeCfg=(\w+)"; + var matches = Regex.Matches(result.Message, pattern, RegexOptions.Multiline); + var results = new List<(string, string, string, string)>(); + + foreach (Match match in matches) + { + if (match.Success) + { + results.Add((match.Groups[1].Value, match.Groups[2].Value, match.Groups[3].Value, match.Groups[4].Value)); + } + } + + return results; + } + + #region ExcelCommand + /// + /// 移动国家码 + /// + /// + /// + /// + public Task ModifyMcc(Cell cell, string mcc) + { + int rtn = 0; + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + // set GNBCUCPFunction=1 mcc=460 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Mcc, false, ("GNBCUCPFunction", GNBCUCPFunction), ("mcc", mcc)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} GNBCUCPFunction {GNBCUCPFunction} set mcc {mcc}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set mcc error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 移动网络码 + /// + /// + /// + /// + public Task ModifyMnc(Cell cell, string mnc) + { + int rtn = 0; + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + // set GNBCUCPFunction=1 mcc=00 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Mnc, false, ("GNBCUCPFunction", GNBCUCPFunction), ("mnc", mnc)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} GNBCUCPFunction {GNBCUCPFunction} set mcc {mnc}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} set mnc error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 跟踪区域码 + /// + /// + /// + public Task ModifyTac(Cell cell, string nrtac) + { + int rtn = 0; + try + { + // set . nrtac 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Mnc, true, ("nrtac", nrtac)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyTac nrtac {nrtac}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyTac nrtac {nrtac} error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基站ID + /// + /// + /// + /// + public Task ModifygNodeBId(Cell cell, string gNBId) + { + int rtn = 0; + + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + + // set GNBCUCPFunction=1 gNBId 323 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.GNodeBId, false, ("GNBCUCPFunction", GNBCUCPFunction), ("gNBId", gNBId)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygNodeBId {GNBCUCPFunction} set gNBId {gNBId}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygNodeBId set gNBId error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// gNBID长度 + /// + /// + /// + /// + /// + public Task ModifygNBIdLength(Cell cell, string gNBIdLength) + { + int rtn = 0; + + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + // set GNBCUCPFunction=1 gNBIdLength 22 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.GNBIdLength, false, ("GNBCUCPFunction", GNBCUCPFunction), ("gNBIdLength", gNBIdLength)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygNBIdLength {GNBCUCPFunction} set gNBIdLength {gNBIdLength}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygNBIdLength set gNBIdLength error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 小区标识 + /// + /// + /// + /// + public Task ModifyCellId(Cell cell) + { + int rtn = 0; + try + { + //set NRCellDU = 1 cellLocalId 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.CellId, false, ("NRCellDU", cell.NRCellDUId), ("cellLocalId", cell.CellId.ToString())); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellId set cellLocalId {cell.LocalId}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellId set cellLocalId error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基站ID + /// + /// + /// + /// + public Task ModifyeNodeBId(Cell cell, string eNBId) + { + int rtn = 0; + + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + // set GNBCUCPFunction=1 eNBId 1890 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.GNodeBId, false, ("GNBCUCPFunction", GNBCUCPFunction), ("eNBId", eNBId)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyeNodeBId {GNBCUCPFunction} set eNBId {eNBId}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyeNodeBId set eNBId error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上下行时隙配置 + /// + /// + /// + /// + /// + public Task ModifysubframeAssignment(Cell cell, string EUtranCellTDD, string subframeAssignment) + { + int rtn = 0; + try + { + // set EUtranCellTDD=MIIT-TDD-5 subframeAssignment 2 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.SubframeAssignment, false, ("EUtranCellTDD", EUtranCellTDD), ("subframeAssignment", subframeAssignment)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifysubframeAssignment subframeAssignment {subframeAssignment}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifysubframeAssignment subframeAssignment error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 特殊时隙配置 + /// + /// + /// + /// + /// + public Task ModifyspecialSubframePattern(Cell cell, string EUtranCellTDD, string specialSubframePattern) + { + int rtn = 0; + try + { + // set EUtranCellTDD=MIIT-TDD-1 specialSubframePattern 7 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.SpecialSubframePattern, false, ("EUtranCellTDD", EUtranCellTDD), ("specialSubframePattern", specialSubframePattern)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyspecialSubframePattern specialSubframePattern {specialSubframePattern}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyspecialSubframePattern specialSubframePattern error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// LTE频段 + /// + /// + /// + /// + /// + public Task ModifyfreqBand(Cell cell, string EUtranCellFDD, string freqBand) + { + int rtn = 0; + try + { + // set EUtranCellFDD=2 freqBand 3 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.FreqBandIndicator, false, ("EUtranCellFDD", EUtranCellFDD), ("freqBand", freqBand)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfreqBand freqBand {freqBand}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfreqBand freqBand error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SSB子载波间隔 + /// + /// + /// + /// + public Task ModifyssbSubcarrierSpacing(Cell cell, string ssbSubCarrierSpacing) + { + int rtn = 0; + try + { + // set NRCellDU=1 ssbSubCarrierSpacing 15 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.SsbSubcarrierSpacing, false, ("NRCellDU", cell.NRCellDUId), ("ssbSubCarrierSpacing", ssbSubCarrierSpacing)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbSubcarrierSpacing ssbSubCarrierSpacing {ssbSubCarrierSpacing}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbSubcarrierSpacing ssbSubCarrierSpacing error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR异频重选邻区SCS + /// + /// + /// + /// + /// + /// + public Task ModifysmtcScs(Cell cell, string NRNetwork, string NRFrequency, string smtcScs) + { + int rtn = 0; + try + { + //set NRNetwork = 1, NRFrequency = 152650 - 15 smtcScs 15 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRNetwork = {NRNetwork}, NRFrequency = {NRFrequency} smtcScs {smtcScs}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifysmtcScs smtcScs {smtcScs}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifysmtcScs smtcScs error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR小区重选偏置 + /// + /// + /// + /// + public Task ModifyQ_OffsetFreq(Cell cell, string qOffsetFreq) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 qOffsetFreq 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_OffsetFreq, false, ("NRCellDU", cell.NRCellDUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("qOffsetFreq", qOffsetFreq)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_OffsetFreq qOffsetFreq {qOffsetFreq}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_OffsetFreq qOffsetFreq error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR-LTE切换邻区允许测量带宽 + /// + /// + /// + /// + /// + public Task ModifyallowedMeasBandwidth(Cell cell, string EUtranFreqRelation, string allowedMeasBandwidth) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,EUtranFreqRelation=1700 allowedMeasBandwidth 6 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.AllowedMeasBandwidth, false, ("NRCellCU", cell.NRCellCUId), ("EUtranFreqRelation", EUtranFreqRelation), ("allowedMeasBandwidth", allowedMeasBandwidth)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyallowedMeasBandwidth allowedMeasBandwidth {allowedMeasBandwidth}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyallowedMeasBandwidth allowedMeasBandwidth error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异频异系统重选起测门限RSRP + /// + /// + /// + /// + public Task ModifyS_NonIntraSearchP(Cell cell, string sNonIntraSearchP) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 sNonIntraSearchP 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.S_NonIntraSearchP, false, ("NRCellCU", cell.NRCellCUId), ("sNonIntraSearchP", sNonIntraSearchP)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_NonIntraSearchP sNonIntraSearchP {sNonIntraSearchP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_NonIntraSearchP sNonIntraSearchP error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异频异系统重选起测门限RSRQ + /// + /// + /// + /// + public Task ModifyS_NonIntraSearchQ(Cell cell, string sNonIntraSearchQ) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 sNonIntraSearchQ 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.S_NonIntraSearchQ, false, ("NRCellCU", cell.NRCellCUId), ("sNonIntraSearchQ", sNonIntraSearchQ)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_NonIntraSearchQ sNonIntraSearchQ {sNonIntraSearchQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_NonIntraSearchQ sNonIntraSearchQ error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异频异系统低优先级重选门限RSRP + /// + /// + /// + /// + public Task ModifythreshServingLowP(Cell cell, string threshServingLowP) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 threshServingLowP 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshServingLowP, false, ("NRCellCU", cell.NRCellCUId), ("threshServingLowP", threshServingLowP)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifythreshServingLowP threshServingLowP {threshServingLowP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifythreshServingLowP threshServingLowP error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异频异系统低优先级重选门限RSRQ + /// + /// + /// + /// + public Task ModifythreshServingLowQ(Cell cell, string threshServingLowQ) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 threshServingLowQ 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshServingLowQ, false, ("NRCellCU", cell.NRCellCUId), ("threshServingLowQ", threshServingLowQ)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifythreshServingLowQ threshServingLowQ {threshServingLowQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifythreshServingLowQ threshServingLowQ error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 小区重选迟滞 + /// + /// + /// + /// + public Task ModifyqHyst(Cell cell, string qHyst) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 qHyst 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_Hyst, false, ("NRCellCU", cell.NRCellCUId), ("qHyst", qHyst)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyqHyst qHyst {qHyst}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyqHyst qHyst error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN小区重选定时器时长 + /// + /// + /// + /// + /// + /// + public Task ModifyTreselectionEUTRA(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string tReselectionEutra) + { + int rtn = 0; + try + { + //set EUtranCellFDD=MIIT-FDD-1,EUtranFreqRelation=1650 tReselectionEutra 2 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.TreselectionEUTRA, false, ("EUtranCellFDD", EUtranCellFDD), ("EUtranFreqRelation", EUtranFreqRelation), ("tReselectionEutra", tReselectionEutra)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyTreselectionEUTRA tReselectionEutra {tReselectionEutra}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyTreselectionEUTRA tReselectionEutra error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN小区重选定时器时长 + /// + /// + /// + /// + /// + /// + public Task ModifytReselectionEutra(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string tReselectionEutra) + { + int rtn = 0; + try + { + //set EUtranCellFDD=MIIT-FDD-1,EUtranFreqRelation=1650 tReselectionEutra 2 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set EUtranCellFDD={EUtranCellFDD},EUtranFreqRelation={EUtranFreqRelation} tReselectionEutra {tReselectionEutra}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytReselectionEutra tReselectionEutra {tReselectionEutra}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytReselectionEutra tReselectionEutra error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// EUTRA邻区重选优先级 + /// + /// + /// + /// + /// + /// + public Task ModifycellReselectionPriority(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string cellReselectionPriority) + { + int rtn = 0; + try + { + //set EUtranCellFDD=MIIT-FDD-1,EUtranFreqRelation=1650 cellReselectionPriority 7 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set EUtranCellFDD={EUtranCellFDD},EUtranFreqRelation={EUtranFreqRelation} cellReselectionPriority {cellReselectionPriority}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionPriority cellReselectionPriority {cellReselectionPriority}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionPriority cellReselectionPriority error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// EUTRA邻区重选子优先级 + /// + /// + /// + /// + /// + /// + public Task ModifycellReselectionSubPriority(Cell cell, string EUtranCellFDD, string GUtranFreqRelation, string cellReselectionSubPriority) + { + int rtn = 0; + try + { + //set EUtranCellFDD=MIIT-FDD-1,GUtranFreqRelation=423850 cellReselectionSubPriority 0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set EUtranCellFDD={EUtranCellFDD},GUtranFreqRelation={GUtranFreqRelation} cellReselectionSubPriority {cellReselectionSubPriority}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionSubPriority cellReselectionSubPriority {cellReselectionSubPriority}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionSubPriority cellReselectionSubPriority error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN频点高优先级重选RSRP门限 + /// + /// + /// + /// + /// + /// + public Task ModifyThreshX_High(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string threshXHigh) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,EUtranFreqRelation=1700 threshXHigh 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_High, false, ("EUtranCellFDD", EUtranCellFDD), ("EUtranFreqRelation", EUtranFreqRelation), ("threshXHigh", threshXHigh)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_High threshXHigh {threshXHigh}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_High threshXHigh error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN频点高优先级目标小区重选门限RSRQ + /// + /// + /// + /// + /// + /// + public Task ModifyThreshX_HighQ(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string threshXHighQ) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,EUtranFreqRelation=1700 threshXHighQ 2 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_HighQ, false, ("EUtranCellFDD", EUtranCellFDD), ("EUtranFreqRelation", EUtranFreqRelation), ("threshXHighQ", threshXHighQ)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_HighQ threshXHighQ {threshXHighQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_HighQ threshXHighQ error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN频点低优先级目标小区重选门限RSRP + /// + /// + /// + /// + /// + /// + public Task ModifyThreshX_Low(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string threshXLow) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,EUtranFreqRelation=1700 threshXLow 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_Low, false, ("EUtranCellFDD", EUtranCellFDD), ("EUtranFreqRelation", EUtranFreqRelation), ("threshXLow", threshXLow)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_Low threshXLow {threshXLow}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_Low threshXLow error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///E-UTRAN频点低优先级目标小区重选门限RSRQ + /// + /// + /// + /// + /// + /// + public Task ModifyThreshX_LowQ(Cell cell, string EUtranCellFDD, string EUtranFreqRelation, string threshXLowQ) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,EUtranFreqRelation=1700 threshXLowQ 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_LowQ, false, ("EUtranCellFDD", EUtranCellFDD), ("EUtranFreqRelation", EUtranFreqRelation), ("threshXLowQ", threshXLowQ)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_LowQ threshXLowQ {threshXLowQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_LowQ threshXLowQ error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// EUTRA邻区最小接入电平 + /// + /// + /// + /// + /// + /// + public Task ModifyQ_RxLevMin(Cell cell, string EUtranCellTDD, string EUtranFreqRelation, string qRxLevMin) + { + int rtn = 0; + try + { + //set EUtranCellTDD=MIIT-TDD-5,EUtranFreqRelation=40540 qRxLevMin -140 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_RxLevMin, false, ("EUtranCellTDD", EUtranCellTDD), ("EUtranFreqRelation", EUtranFreqRelation), ("qRxLevMin", qRxLevMin)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_RxLevMin qRxLevMin {qRxLevMin}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_RxLevMin qRxLevMin error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// EUTRA邻区最小接入质量 + /// + /// + /// + /// + /// + /// + public Task ModifyQ_QualMin(Cell cell, string EUtranCellTDD, string EUtranFreqRelation, string qQualMin) + { + int rtn = 0; + try + { + // // set EUtranCellTDD=MIIT-TDD-5,EUtranFreqRelation=40540 qQualMin 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_QualMin, false, ("EUtranCellTDD", EUtranCellTDD), ("EUtranFreqRelation", EUtranFreqRelation), ("qQualMin", qQualMin)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Q_QualMin qQualMin {qQualMin}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Q_QualMin qQualMin error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 重选NR小区定时器时长 + /// + /// + /// + /// + public Task ModifyT_ReselectionNR_r15(Cell cell, string tReselectionNR) + { + int rtn = 0; + try + { + // set NRCellCU=5292034,NRFreqRelation=152650 tReselectionNR 2 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T_ReselectionNR_r15, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("tReselectionNR", tReselectionNR)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT_ReselectionNR_r15 tReselectionNR {tReselectionNR}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT_ReselectionNR_r15 tReselectionNR error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SSB测量时间窗 + /// + /// + /// + /// + public Task ModifySsb_Duration_r15(Cell cell, string ssbDuration) + { + int rtn = 0; + try + { + // set NRCellDU=1 ssbDuration 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Ssb_Duration_r15, false, ("NRCellCU", cell.NRCellCUId), ("ssbDuration", ssbDuration)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Ssb_Duration_r15 ssbDuration {ssbDuration}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Ssb_Duration_r15 ssbDuration error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR频点重选子优先级 + /// + /// + /// + /// + public Task ModifyCellReselectionSubPriority_r13(Cell cell, string cellReselectionSubPriority) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 cellReselectionSubPriority 6 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.CellReselectionSubPriority_r13, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("cellReselectionSubPriority", $"{cellReselectionSubPriority}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellReselectionSubPriority_r13 {cellReselectionSubPriority}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellReselectionSubPriority_r13 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR频点高优先级重选RSRP门限 + /// + /// + /// + /// + public Task ModifyThreshX_High_r15(Cell cell, string threshXHighP) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 threshXHighP 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_High_r15, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("threshXHighP", $"{threshXHighP}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ThreshX_High_r15 {threshXHighP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ThreshX_High_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR频点低优先级重选RSRP门限 + /// + /// + /// + /// + public Task ModifyThreshX_Low_r15(Cell cell, string threshXLowP) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 threshXLowP 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_Low_r15, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("threshXLowP", $"{threshXLowP}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_Low_r15 {threshXLowP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_Low_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR频点高优先级重选RSRQ门限 + /// + /// + /// + /// + public Task ModifyThreshX_HighQ_r15(Cell cell, string threshXHighQ) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 threshXHighQ 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_HighQ_r15, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("threshXHighQ", $"{threshXHighQ}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_HighQ_r15 {threshXHighQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_HighQ_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR频点低优先级重选RSRQ门限 + /// + /// + /// + /// + public Task ModifyThreshX_LowQ_r15(Cell cell, string threshXLowQ) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 threshXLowQ 4 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ThreshX_LowQ_r15, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", $"{cell.NRFreqRelationList.FirstOrDefault()}"), ("threshXLowQ", $"{threshXLowQ}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_LowQ_r15 {threshXLowQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyThreshX_LowQ_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 最低接收RSRQ + /// + /// + /// + /// + public Task ModifyQ_QualMin_r15(Cell cell, string qQualMin) + { + int rtn = 0; + try + { + //set NRCellDU=1 qQualMin -34 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Q_QualMin_r15, false, ("NRCellDU", cell.NRCellDUId), ("qQualMin", $"{qQualMin}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_QualMin_r15 {qQualMin}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyQ_QualMin_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// UE在NR SCG最大发射功率 + /// + /// + /// + /// + /// + /// + public Task ModifyP_MaxNR_r15(Cell cell, string EUtranCellFDD, string GUtranFreqRelation, string pMaxNR) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,GUtranFreqRelation=505230 pMaxNR 33 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.P_MaxNR_r15, false, ("NRCellDU", cell.NRCellDUId), ("EUtranCellFDD", $"{EUtranCellFDD}"), ("GUtranFreqRelation", $"{GUtranFreqRelation}"), ("pMaxNR", $"{pMaxNR}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP_MaxNR_r15 {pMaxNR}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP_MaxNR_r15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异系统切换A1 RSRP门限 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyA1_Threshold(Cell cell, string EUtranCellTDD, string UeMeasControl, string ReportConfigA1Prim, string a1ThresholdRsrpPrim) + { + int rtn = 0; + try + { + //set EUtranCellTDD=MIIT-TDD-1,UeMeasControl=1,ReportConfigA1Prim=1 a1ThresholdRsrpPrim -65 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.A1_Threshold, false, ("EUtranCellTDD", EUtranCellTDD), ("UeMeasControl", $"{UeMeasControl}"), ("ReportConfigA1Prim", $"{ReportConfigA1Prim}"), ("a1ThresholdRsrpPrim", $"{a1ThresholdRsrpPrim}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA1_Threshold {a1ThresholdRsrpPrim}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA1_Threshold error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异系统切换A2 RSRP门限 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyA2_Threshold(Cell cell, string EUtranCellTDD, string UeMeasControl, string ReportConfigEUtraBadCovPrim, string a2ThresholdRsrpPrim) + { + int rtn = 0; + try + { + //set EUtranCellTDD=MIIT-TDD-1,UeMeasControl=1,ReportConfigEUtraBadCovPrim=1 a2ThresholdRsrpPrim -88 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.A2_Threshold, false, ("EUtranCellTDD", EUtranCellTDD), ("UeMeasControl", $"{UeMeasControl}"), ("ReportConfigEUtraBadCovPrim", $"{ReportConfigEUtraBadCovPrim}"), ("a2ThresholdRsrpPrim", $"{a2ThresholdRsrpPrim}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA2_Threshold {a2ThresholdRsrpPrim}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA2_Threshold error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异系统切换A1A2幅度迟滞 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyhysteresisA1A2SearchRsrp(Cell cell, string EUtranCellFDD, string UeMeasControl, string ReportConfigSearch, string hysteresisA1A2SearchRsrp) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,UeMeasControl=1,ReportConfigSearch=1 hysteresisA1A2SearchRsrp 20 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set EUtranCellFDD={EUtranCellFDD},UeMeasControl={UeMeasControl},ReportConfigSearch={ReportConfigSearch} hysteresisA1A2SearchRsrp {hysteresisA1A2SearchRsrp}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyhysteresisA1A2SearchRsrp {hysteresisA1A2SearchRsrp}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyhysteresisA1A2SearchRsrp error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异系统切换A1A2时间迟滞 + /// + /// + /// + /// + /// + /// + /// + public Task ModifytimeToTriggerA2Search(Cell cell, string EUtranCellFDD, string UeMeasControl, string ReportConfigSearch, string timeToTriggerA2Search) + { + int rtn = 0; + try + { + //set EUtranCellFDD=2,UeMeasControl=1,ReportConfigSearch=1 timeToTriggerA2Search 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set EUtranCellFDD={EUtranCellFDD},UeMeasControl={UeMeasControl},ReportConfigSearch={ReportConfigSearch} timeToTriggerA2Search {timeToTriggerA2Search}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytimeToTriggerA2Search {timeToTriggerA2Search}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytimeToTriggerA2Search error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基于覆盖的切换至E-UTRAN B2 RSRP门限1 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyB2_Threshold1(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold1) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 threshold1 = -85 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateB2 threshold1 ={threshold1}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyB2_Threshold1 {threshold1}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyB2_Threshold1 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基于覆盖的切换B2 RSRP门限2 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyB2_Threshold2EUTRA(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold2EUtra) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 threshold2EUtra = -95 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateB2 threshold2EUtra ={threshold2EUtra}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyB2_Threshold2EUTRA {threshold2EUtra}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyB2_Threshold2EUTRA error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基于覆盖的切换B1B2幅度迟滞 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyRsrpCandidateB2hysteresis(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string hysteresis) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 hysteresis = 0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateB2 hysteresis ={hysteresis}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRsrpCandidateB2hysteresis {hysteresis}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRsrpCandidateB2hysteresis error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基于覆盖的切换B1B2时间迟滞 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyRsrpCandidateB2timeToTrigger(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string timeToTrigger) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateB2 timeToTrigger = 640 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateB2 timeToTrigger ={timeToTrigger}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRsrpCandidateB2timeToTrigger {timeToTrigger}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRsrpCandidateB2timeToTrigger error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// E-UTRAN小区偏移量 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyCellIndividualOffset(Cell cell, string EUtranCellTDD, string EUtranFreqRelation, string EUtranCellRelation, string cellIndividualOffsetEUtran) + { + int rtn = 0; + try + { + //set EUtranCellTDD=MIIT-TDD-5,EUtranFreqRelation=40540,EUtranCellRelation=TDD5-4 cellIndividualOffsetEUtran 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.CellIndividualOffset, false, ("EUtranCellTDD", EUtranCellTDD), ("EUtranFreqRelation", $"{EUtranFreqRelation}"), ("EUtranCellRelation", $"{EUtranCellRelation}"), ("cellIndividualOffsetEUtran", $"{cellIndividualOffsetEUtran}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellIndividualOffset {cellIndividualOffsetEUtran}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellIndividualOffset error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 服务小区UE允许的最大功率 + /// + /// + /// + /// + public Task ModifyP_Max(Cell cell, string pMax) + { + int rtn = 0; + try + { + //set NRCellDU=1 pMax 23 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.P_Max, false, ("NRCellDU", cell.NRCellDUId), ("pMax", $"{pMax}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP_Max {pMax}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP_Max error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 同频切换的A3偏置 + /// + /// + /// + /// + public Task ModifyA3_offset(Cell cell, string NRCellRelation, string cellIndividualOffsetNR) + { + int rtn = 0; + try + { + //set NRCellCU=CAICTNRPFCM700M1_1,NRCellRelation=318-1 cellIndividualOffsetNR 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.A3_offset, false, ("NRCellCU", cell.NRCellCUId), ("NRCellRelation", $"{NRCellRelation}"), ("cellIndividualOffsetNR", $"{cellIndividualOffsetNR}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA3_offset {cellIndividualOffsetNR}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA3_offset error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异频A2事件报告门限 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyA2EventThreshold(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold) + { + int rtn = 0; + try + { + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpSearchZone threshold = -70 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpSearchZone threshold= {threshold}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA2EventThreshold {threshold}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA2EventThreshold error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// A5事件报告的服务小区信号质量门限 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyA5_Threshold1(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold1) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateA5 threshold1 = -85 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateA5 threshold1= {threshold1}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA5_Threshold1 {threshold1}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA5_Threshold1 error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///A5事件报告的相邻小区信号质量门限 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyA5_Threshold2(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold2) + { + int rtn = 0; + try + { + + //set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCandidateA5 threshold2 = -110 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCandidateA5 threshold2= {threshold2}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA5_Threshold2 {threshold2}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyA5_Threshold2 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 最大上报小区数 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyMaxReportCells(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1MaxReportCells) + { + int rtn = 0; + try + { + //set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1MaxReportCells 8 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.MaxReportCells, false, ("Mdt", Mdt), ("MdtCellProfile", MdtCellProfile), ("MdtCellProfileUeCfg", $"{MdtCellProfileUeCfg}"), ("m1MaxReportCells", $"{m1MaxReportCells}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyMaxReportCells {m1MaxReportCells}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyMaxReportCells error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上报参考信号index + /// + /// + /// + /// + /// + /// + /// + public Task ModifyReportQuantityRS_Indexes(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1ReportQuantityRsIndex) + { + int rtn = 0; + try + { + //set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1ReportQuantityRsIndex 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ReportQuantityRS_Indexes, false, ("Mdt", Mdt), ("MdtCellProfile", MdtCellProfile), ("MdtCellProfileUeCfg", $"{MdtCellProfileUeCfg}"), ("m1MaxReportCells", $"{m1ReportQuantityRsIndex}")); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportQuantityRS_Indexes {m1ReportQuantityRsIndex}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportQuantityRS_Indexes error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 同频小区测量Srxlev门限 + /// + /// + /// + /// + public Task ModifyS_IntraSearchP(Cell cell, string sIntraSearchP) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 sIntraSearchP 62 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.S_IntraSearchP, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", cell.NRFreqRelationList.FirstOrDefault()), ("sIntraSearchP", sIntraSearchP)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_IntraSearchP {sIntraSearchP}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_IntraSearchP error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 同频小区测量Squal门限 + /// + /// + /// + /// + public Task ModifyS_IntraSearchQ(Cell cell, string sIntraSearchQ) + { + int rtn = 0; + try + { + //set NRCellCU=5292034,NRFreqRelation=152650 sIntraSearchQ 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.S_IntraSearchQ, false, ("NRCellCU", cell.NRCellCUId), ("NRFreqRelation", cell.NRFreqRelationList.FirstOrDefault()), ("sIntraSearchQ", sIntraSearchQ)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_IntraSearchQ {sIntraSearchQ}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyS_IntraSearchQ error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SMTC周期 + /// + /// + /// + /// + public Task ModifySmtc_periodicityAndOffset(Cell cell, string smtcPeriodicity) + { + int rtn = 0; + try + { + //set NRCellCU=5292034 smtcPeriodicity 20 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Smtc_periodicityAndOffset, false, ("NRCellCU", cell.NRCellCUId), ("smtcPeriodicity", smtcPeriodicity)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySmtc_periodicityAndOffset {smtcPeriodicity}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySmtc_periodicityAndOffset error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SMTC持续时间 + /// + /// + /// + /// + public Task ModifySmtc_duration(Cell cell, string smtcDuration) + { + int rtn = 0; + try + { + // set NRCellCU = 5292035 smtcDuration 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Smtc_duration, false, ("NRCellCU", cell.NRCellCUId), ("smtcDuration", smtcDuration)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySmtc_duration {smtcDuration}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySmtc_duration error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///DRX算法开关 + /// + /// + /// + /// + public Task ModifyDrxAlgoSwitch(Cell cell, bool drxProfileEnabled) + { + int rtn = 0; + try + { + // set NRCellDU=1 drxProfileEnabled false + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.DrxAlgoSwitch, false, ("NRCellDU", cell.NRCellDUId), ("drxProfileEnabled", drxProfileEnabled.ToString())); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrxAlgoSwitch {drxProfileEnabled}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrxAlgoSwitch error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 持续时间定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyDrx_onDurationTimer(Cell cell, string GNBDUFunction, string UeCC, string DrxProfile, string DrxProfileUeCfg, string drxOnDurationTimer) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,UeCC=1,DrxProfile=Default,DrxProfileUeCfg=Base drxOnDurationTimer 38 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Drx_onDurationTimer, false, ("GNBDUFunction", GNBDUFunction), ("UeCC", UeCC), ("DrxProfile", DrxProfile), ("DrxProfileUeCfg", DrxProfileUeCfg), ("drxOnDurationTimer", drxOnDurationTimer)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_onDurationTimer {drxOnDurationTimer}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_onDurationTimer error.", ex); + } + return Task.FromResult(rtn); + } + + + /// + /// 长周期 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyLongCycle(Cell cell, string GNBDUFunction, string UeCC, string DrxProfile, string DrxProfileUeCfg, string drxLongCycle) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, DrxProfile = Default, DrxProfileUeCfg = Base drxLongCycle 8 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.LongCycle, false, ("GNBDUFunction", GNBDUFunction), ("UeCC", UeCC), ("DrxProfile", DrxProfile), ("DrxProfileUeCfg", DrxProfileUeCfg), ("drxLongCycle", drxLongCycle)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyLongCycle {drxLongCycle}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyLongCycle error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// 上行行重传定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyDrx_RetransmissionTimerUL(Cell cell, string GNBDUFunction, string UeCC, string DrxProfile, string DrxProfileUeCfg, string drxRetransmissionTimerUl) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, DrxProfile = Default, DrxProfileUeCfg = Base drxRetransmissionTimerUl 8 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Drx_RetransmissionTimerUL, false, ("GNBDUFunction", GNBDUFunction), ("UeCC", UeCC), ("DrxProfile", DrxProfile), ("DrxProfileUeCfg", DrxProfileUeCfg), ("drxRetransmissionTimerUl", drxRetransmissionTimerUl)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_RetransmissionTimerUL {drxRetransmissionTimerUl}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_RetransmissionTimerUL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行重传定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyDrx_RetransmissionTimerDL(Cell cell, string GNBDUFunction, string UeCC, string DrxProfile, string DrxProfileUeCfg, string drxRetransmissionTimerDl) + { + int rtn = 0; + try + { + //set GNBDUFunction = 1, UeCC = 1, DrxProfile = Default, DrxProfileUeCfg = Base drxRetransmissionTimerDl 8 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Drx_RetransmissionTimerDL, false, ("GNBDUFunction", GNBDUFunction), ("UeCC", UeCC), ("DrxProfile", DrxProfile), ("DrxProfileUeCfg", DrxProfileUeCfg), ("drxRetransmissionTimerDl", drxRetransmissionTimerDl)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_RetransmissionTimerDL {drxRetransmissionTimerDl}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDrx_RetransmissionTimerDL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 短周期 + /// + /// + /// + /// + public Task ModifyShortCycle(Cell cell, string shortDrxCycle) + { + int rtn = 0; + try + { + + //ShortCycle 短周期 set . shortDrxCycle 8 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set . shortDrxCycle {shortDrxCycle}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyShortCycle {shortDrxCycle}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyShortCycle error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 短周期定时器 + /// + /// + /// + /// + public Task ModifyShortCycleTimer(Cell cell, string shortDrxCycleTimer) + { + int rtn = 0; + try + { + + //ShortCycleTimer 短周期定时器 set.shortDrxCycleTimer 4 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set . shortDrxCycleTimer {shortDrxCycleTimer}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyShortCycleTimer {shortDrxCycleTimer}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyShortCycleTimer error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RRC连接响应定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyT300(Cell cell, string GNBDUFunction, string Rrc, string t300) + { + int rtn = 0; + try + { + //set GNBDUFunction = 1, Rrc = 1 t300 1000 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T300, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t300", t300)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT300 {t300}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT300 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RRC重建响应定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyT301(Cell cell, string GNBDUFunction, string Rrc, string t301) + { + int rtn = 0; + try + { + //set GNBDUFunction = 1, Rrc = 1 t301 400 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T301, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t301", t301)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT301 {t301}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT301 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 常量 N310 + /// + /// + /// + /// + /// + /// + public Task ModifyT310(Cell cell, string GNBDUFunction, string Rrc, string t310) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,Rrc=1 t310 2000 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T310, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t310", t310)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT310 {t310}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT310 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 常量 N310 + /// + /// + /// + /// + /// + /// + public Task ModifyN310(Cell cell, string GNBDUFunction, string Rrc, string n310) + { + int rtn = 0; + try + { + //set GNBDUFunction=1,Rrc=1 n310 20 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.N310, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("n310", n310)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyN310 {n310}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyN310 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RLF失步转idle定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyT311(Cell cell, string GNBDUFunction, string Rrc, string t311) + { + int rtn = 0; + try + { + //set GNBDUFunction = 1, Rrc = 1 t311 3000 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T311, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t311", t311)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT311 {t311}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT311 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 常量 N311 + /// + /// + /// + /// + /// + /// + public Task ModifyN311(Cell cell, string GNBDUFunction, string Rrc, string n311) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,Rrc=1 n311 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.N311, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("n311", n311)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyN311 {n311}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyN311 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RRC连接恢复响应定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyT319(Cell cell, string GNBDUFunction, string Rrc, string t319) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, Rrc = 1 t319 400 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T319, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t319", t319)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT319 {t319}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT319 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RRC连接恢复响应定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyT304(Cell cell, string GNBDUFunction, string Rrc, string t304) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, Rrc = 1 t304 400 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.T304, false, ("GNBDUFunction", GNBDUFunction), ("Rrc", Rrc), ("t304", t304)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT304 {t304}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyT304 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// UE不活动定时器 + /// + /// + /// + /// + /// + /// + public Task ModifyUeInactivityTimer(Cell cell, string tInactivityTimer) + { + int rtn = 0; + try + { + var (GNBCUCPFunction, UeCC, InactivityProfile, InactivityProfileUeCfg) = ExtractTInactivityTimerPara(_stationId); + // set GNBCUCPFunction=1,UeCC=1,InactivityProfile=Default,InactivityProfileUeCfg=Base tInactivityTimer 100 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.UeInactivityTimer, false, ("GNBCUCPFunction", GNBCUCPFunction), ("UeCC", UeCC), ("InactivityProfile", InactivityProfile), ("InactivityProfileUeCfg", InactivityProfileUeCfg), ("tInactivityTimer", tInactivityTimer)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUeInactivityTimer {tInactivityTimer}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUeInactivityTimer error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 测量上报量类型 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyReportQuantity(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1ReportQuantityCell) + { + int rtn = 0; + try + { + // set Mdt = 1, MdtCellProfile = Default, MdtCellProfileUeCfg = Base m1ReportQuantityCell 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.ReportQuantity, false, ("Mdt", Mdt), ("MdtCellProfile", MdtCellProfile), ("MdtCellProfileUeCfg", MdtCellProfileUeCfg), ("m1ReportQuantityCell", m1ReportQuantityCell)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportQuantity {m1ReportQuantityCell}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportQuantity error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 帧偏置 + /// + /// + /// + /// + /// + /// + public Task ModifyFrameOffset(Cell cell, string Synchronization, string RadioEquipmentClock, string bfnOffset) + { + int rtn = 0; + try + { + // set Synchronization=1,RadioEquipmentClock=1 bfnOffset 0 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.FrameOffset, false, ("Synchronization", Synchronization), ("RadioEquipmentClock", RadioEquipmentClock), ("bfnOffset", bfnOffset)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyFrameOffset {bfnOffset}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyFrameOffset error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SSB周期 + /// + /// + /// + /// + public Task ModifySsb_periodicityServingCell(Cell cell, string ssbPeriodicity) + { + int rtn = 0; + try + { + // set NRCellDU=1 ssbPeriodicity 20 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Ssb_periodicityServingCell, false, ("NRCellDU", cell.NRCellDUId), ("ssbPeriodicity", ssbPeriodicity)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySsb_periodicityServingCell {ssbPeriodicity}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySsb_periodicityServingCell error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行PDCP序列号长度 + /// + /// + /// + /// + /// + /// + public Task ModifyPdcp_SN_SizeDL(Cell cell, string CUCP5qiTable, string CUCP5qi, string pdcpSnSize) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 pdcpSnSize 12 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Pdcp_SN_SizeDL, false, ("CUCP5qiTable", CUCP5qiTable), ("CUCP5qi", CUCP5qi), ("pdcpSnSize", pdcpSnSize)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyPdcp_SN_SizeDL {pdcpSnSize}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyPdcp_SN_SizeDL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上行PDCP序列号长度 + /// + /// + /// + /// + /// + /// + public Task ModifyPdcp_SN_SizeUL(Cell cell, string CUCP5qiTable, string CUCP5qi, string pdcpSnSize) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 pdcpSnSize 12 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.Pdcp_SN_SizeDL, false, ("CUCP5qiTable", CUCP5qiTable), ("CUCP5qi", CUCP5qi), ("pdcpSnSize", pdcpSnSize)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyPdcp_SN_SizeUL {pdcpSnSize}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyPdcp_SN_SizeUL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RLC模式 + /// + /// + /// + /// + /// + /// + public Task ModifyRlcMode(Cell cell, string CUCP5qiTable, string CUCP5qi, string rlcMode) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 rlcMode 1 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.RlcMode, false, ("CUCP5qiTable", CUCP5qiTable), ("CUCP5qi", CUCP5qi), ("rlcMode", rlcMode)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRlcMode {rlcMode}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRlcMode error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// UE触发Polling的PDU个数门限 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyulPollPdu(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string ulPollPdu) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1,UeCC = 1,RadioLinkControl = 1,DrbRlc = Default,DrbRlcUeCfg = Base ulPollPdu 16 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction},UeCC = {UeCC},RadioLinkControl = {RadioLinkControl},DrbRlc ={DrbRlc},DrbRlcUeCfg = {DrbRlcUeCfg} ulPollPdu {ulPollPdu}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyulPollPdu {ulPollPdu}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyulPollPdu error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// gNodeB触发Polling的PDU个数门限 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifydlPollPdu(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string dlPollPdu) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,UeCC=1,RadioLinkControl=1,DrbRlc=Default,DrbRlcUeCfg=Base dlPollPdu 32 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction},UeCC = {UeCC},RadioLinkControl = {RadioLinkControl},DrbRlc ={DrbRlc},DrbRlcUeCfg = {DrbRlcUeCfg} dlPollPdu {dlPollPdu}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydlPollPdu {dlPollPdu}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydlPollPdu error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// gNodeB RLC重组定时器 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifytPollRetransmitDl(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string tPollRetransmitDl) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base tPollRetransmitDl 40 + + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction},UeCC = {UeCC},RadioLinkControl = {RadioLinkControl},DrbRlc ={DrbRlc},DrbRlcUeCfg = {DrbRlcUeCfg} tPollRetransmitDl {tPollRetransmitDl}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPollRetransmitDl {tPollRetransmitDl}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPollRetransmitDl error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///UE RLC重组定时器 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifytPollRetransmitUl(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string tPollRetransmitUl) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base tPollRetransmitUl 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction},UeCC = {UeCC},RadioLinkControl = {RadioLinkControl},DrbRlc ={DrbRlc},DrbRlcUeCfg = {DrbRlcUeCfg} tPollRetransmitUl {tPollRetransmitUl}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPollRetransmitUl {tPollRetransmitUl}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPollRetransmitUl error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// BSR重传定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyRetxBSR_Timer(Cell cell, string GNBDUFunction, string UeCC, string Bsr, string BsrUeCfg, string reTxBsrTimer) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,UeCC=1,Bsr=1,BsrUeCfg=Base reTxBsrTimer 1280 + MoShellResult result = ExecuteSetCmd(_stationId, EricssonCmdType.RetxBSR_Timer, false, ("GNBDUFunction", GNBDUFunction), ("UeCC", UeCC), ("Bsr", Bsr), ("BsrUeCfg", BsrUeCfg), ("reTxBsrTimer", reTxBsrTimer)); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRetxBSR_Timer {reTxBsrTimer}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyRetxBSR_Timer error.", ex); + } + return Task.FromResult(rtn); + } + //---------Second-------------- + /// + /// 地点 + /// + /// + /// + /// + /// + /// + public Task ModifytPosition(Cell cell, string NRSectorCarrier, string longitude, string latitude) + { + int rtn = 0; + try + { + // set NRSectorCarrier=1 longitude 119840391,set NRSectorCarrier=1 latitude 31397321 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={NRSectorCarrier} longitude {longitude},set NRSectorCarrier={NRSectorCarrier} latitude {latitude}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPosition longitude {longitude},latitude {latitude}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPosition error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR小区全局标识 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyNCGI(Cell cell, string GNBCUCPFunction, string mcc, string mnc, string nCI) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1 pLMNId mcc=460,mnc=11, set GNBCUUPFunction=1 pLMNIdList mcc=460,mnc=11 , set NRCellDU=1 nCI 5242881 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={cell.GNBDUFunction} pLMNId mcc={mcc},mnc={mnc}, set GNBCUUPFunction={cell.GNBDUFunction} pLMNIdList mcc={mcc},mnc={mnc} , set NRCellDU={cell.NRCellDUId} nCI {nCI}"); + rtn = result?.Status == true ? 0 : -1; + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNCGI nCI {nCI}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNCGI error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// pointA中心频点 + /// + /// + /// + /// + /// + /// + public Task ModifypointAARFCN(Cell cell, string pointAArfcnTdd, string pointAArfcnDlFdd, string pointAArfcnUlFdd) + { + int rtn = 0; + try + { + // set NRCellDU=1 pointAArfcnTdd xxxx /set NRCellDU=1 pointAArfcnDlFdd 422112/set NRCellDU=1 pointAArfcnUlFdd 384112 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 pointAArfcnTdd {pointAArfcnTdd}"); + rtn = result?.Status == true ? 0 : -1; + MoShellResult result1 = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 pointAArfcnDlFdd {pointAArfcnDlFdd}"); + int rtn1 = result1?.Status == true ? 0 : -1; + MoShellResult result2 = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 pointAArfcnUlFdd {pointAArfcnUlFdd}"); + int rtn2 = result2?.Status == true ? 0 : -1; + rtn += rtn1 + rtn2; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypointAARFCN pointAArfcnTdd {pointAArfcnTdd},pointAArfcnDlFdd {pointAArfcnDlFdd},pointAArfcnUlFdd {pointAArfcnUlFdd}, result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypointAARFCN error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 5G频段 + /// + /// + /// + /// + public Task ModifyfreqBandIndicatorNR(Cell cell, string bandList) + { + int rtn = 0; + try + { + //set NRCellDU=1 bandList 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 bandList {bandList}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfreqBandIndicatorNR bandList {bandList}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfreqBandIndicatorNR error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 子载波间隔 + /// + /// + /// + /// + public Task ModifySubcarrierSpacing(Cell cell, string subCarrierSpacing) + { + int rtn = 0; + try + { + // set NRCellDU=1 subCarrierSpacing 15 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 subCarrierSpacing {subCarrierSpacing}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySubcarrierSpacing subCarrierSpacing {subCarrierSpacing}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifySubcarrierSpacing error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 载波带宽 + /// + /// + /// + /// + /// + public Task ModifycarrierBandwidth(Cell cell, string NRSectorCarrier, string bSChannelBwUL, string bSChannelBwDL) + { + int rtn = 0; + try + { + // set NRSectorCarrier=1 bSChannelBwUL 30,set NRSectorCarrier=1 bSChannelBwDL 30 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRSectorCarrier={NRSectorCarrier} bSChannelBwUL {bSChannelBwUL},set NRSectorCarrier={NRSectorCarrier} bSChannelBwDL {bSChannelBwDL}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycarrierBandwidth bSChannelBwUL {bSChannelBwUL}, bSChannelBwDL {bSChannelBwDL}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycarrierBandwidth error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR异频重选邻区下行频点 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyInterFreqCarrierFreqInfo(Cell cell, string GNBCUCPFunction, string NRNetwork, string NRFrequency, string arfcnValueNRDl) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,NRNetwork=1,NRFrequency=505230-30 arfcnValueNRDl 505230 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},NRNetwork={NRNetwork},NRFrequency={NRFrequency} arfcnValueNRDl {arfcnValueNRDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyInterFreqCarrierFreqInfo NRNetwork={NRNetwork},NRFrequency={NRFrequency} arfcnValueNRDl {arfcnValueNRDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyInterFreqCarrierFreqInfo error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR异系统重选邻区下行频点 + /// + /// + /// + /// + /// + /// + /// + public Task ModifycarrierFreq(Cell cell, string GNBCUCPFunction, string EUtraNetwork, string EUtranFrequency, string arfcnValueEUtranDl) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,EUtraNetwork=1,EUtranFrequency=1550 arfcnValueEUtranDl 1550 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycarrierFreq EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycarrierFreq error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR异系统重选邻区优先级 + /// + /// + /// + /// + /// + public Task ModifycellReselectionPriority(Cell cell, string EUtranFreqRelation, string cellReselectionPriority) + { + int rtn = 0; + try + { + // set NRCellCU=BJ_HYBL52_RC66_D11,EUtranFreqRelation=1550 cellReselectionPriority 6 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellCU={cell.NRCellCUId},EUtranFreqRelation={EUtranFreqRelation} cellReselectionPriority {cellReselectionPriority}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionPriority ,EUtranFreqRelation={EUtranFreqRelation} cellReselectionPriority {cellReselectionPriority}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionPriority error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR网内切换邻区ssb频点 + /// + /// + /// + /// + public Task ModifyssbFrequency(Cell cell, string ssbFrequency) + { + int rtn = 0; + try + { + //ssbFrequency set NRCellDU=1 ssbFrequency 423150 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU=1 ssbFrequency {ssbFrequency}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbFrequency ssbFrequency {ssbFrequency}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbFrequency error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR网内切换邻区SCS + /// + /// + /// + /// + /// + /// + public Task ModifyssbSubcarrierSpacing(Cell cell, string NRNetwork, string NRFrequency, string smtcScs) + { + int rtn = 0; + try + { + // set NRNetwork=1,NRFrequency=504990-30 smtcScs 30 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRNetwork = {NRNetwork}, NRFrequency = {NRFrequency} smtcScs {smtcScs}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbSubcarrierSpacing NRNetwork = {NRNetwork}, NRFrequency = {NRFrequency} smtcScs {smtcScs}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyssbSubcarrierSpacing error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR-LTE切换邻区频点 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyNRLTEcarrierFreq(Cell cell, string GNBCUCPFunction, string EUtraNetwork, string EUtranFrequency, string arfcnValueEUtranDl) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,EUtraNetwork=1,EUtranFrequency=1550 arfcnValueEUtranDl 1550 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNRLTEcarrierFreq GNBCUCPFunction={GNBCUCPFunction},EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNRLTEcarrierFreq error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR服务小区重选优先级 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyNRServercellReselectionPriority(Cell cell, string cellReselectionPriority) + { + int rtn = 0; + try + { + //set NRCellCU=CAICTNRPFCM4_1,NRFreqRelation=511230 cellReselectionPriority 7 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellCU={cell.NRCellCUId},NRFreqRelation={cell.NRFreqRelationList.FirstOrDefault()} cellReselectionPriority {cellReselectionPriority}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNRServercellReselectionPriority NRFreqRelation={cell.NRFreqRelationList.FirstOrDefault()} cellReselectionPriority {cellReselectionPriority}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyNRServercellReselectionPriority error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// EUTRA邻频点 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyCarrierFreqEUTRA(Cell cell, string GNBCUCPFunction, string EUtraNetwork, string EUtranFrequency, string arfcnValueEUtranDl) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,EUtraNetwork=1,EUtranFrequency=1550 arfcnValueEUtranDl 1550 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCarrierFreqEUTRA EUtraNetwork={EUtraNetwork},EUtranFrequency={EUtranFrequency} arfcnValueEUtranDl {arfcnValueEUtranDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCarrierFreqEUTRA error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR邻频点 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyCarrierFreqNRr15(Cell cell, string GNBCUCPFunction, string NRNetwork, string NRFrequency, string arfcnValueNRDl) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,NRNetwork=1,NRFrequency=505230-30 arfcnValueNRDl 505230 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},NRNetwork={NRNetwork},NRFrequency={NRFrequency} arfcnValueNRDl {arfcnValueNRDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCarrierFreqNRr15 NRNetwork={NRNetwork},NRFrequency={NRFrequency} arfcnValueNRDl {arfcnValueNRDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCarrierFreqNRr15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SSB测量周期 + /// + /// + /// + /// + /// + public Task ModifyperiodicityAndOffsetr15(Cell cell, string ssbPeriodicity, string ssbOffset) + { + int rtn = 0; + try + { + // set NRCellDU=1 ssbPeriodicity 20,set NRCellDU=1 ssbOffset 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} ssbPeriodicity {ssbPeriodicity},set NRCellDU={cell.NRCellDUId} ssbOffset {ssbOffset}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffsetr15 ssbPeriodicity {ssbPeriodicity}, ssbOffset {ssbOffset}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffsetr15 error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 基于覆盖的切换至E-UTRAN盲A2 RSRP门限 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyCoverA2Threshold(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold) + { + int rtn = 0; + try + { + // a2-Threshold set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpCritical threshold=-156 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpCritical threshold={threshold}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCoverA2Threshold threshold={threshold}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCoverA2Threshold error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 异系统切换NR A2 RSRP门限 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyDiffSysA2Threshold(Cell cell, string GNBCUCPFunction, string Mcpc, string McpcPCellProfile, string McpcPCellProfileUeCfg, string threshold) + { + int rtn = 0; + try + { + // set GNBCUCPFunction=1,Mcpc=1,McpcPCellProfile=Default,McpcPCellProfileUeCfg=Base rsrpSearchZone threshold=-70 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBCUCPFunction={GNBCUCPFunction},Mcpc={Mcpc},McpcPCellProfile={McpcPCellProfile},McpcPCellProfileUeCfg={McpcPCellProfileUeCfg} rsrpSearchZone threshold={threshold}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDiffSysA2Threshold threshold={threshold}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDiffSysA2Threshold error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 前导初始接收目标功率 + /// + /// + /// + /// + public Task ModifypreambleReceivedTargetPower(Cell cell, string rachPreambleRecTargetPower) + { + int rtn = 0; + try + { + //set NRCellDU=1 rachPreambleRecTargetPower -110 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} rachPreambleRecTargetPower {rachPreambleRecTargetPower}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypreambleReceivedTargetPower rachPreambleRecTargetPower {rachPreambleRecTargetPower}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypreambleReceivedTargetPower error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// preamble最大发送次数 + /// + /// + /// + /// + public Task ModifypreambleTransMax(Cell cell, string rachPreambleTransMax) + { + int rtn = 0; + try + { + // set NRCellDU=1 rachPreambleTransMax 10 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} rachPreambleTransMax {rachPreambleTransMax}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypreambleTransMax rachPreambleTransMax {rachPreambleTransMax}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypreambleTransMax error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 路径损耗因子 + /// + /// + /// + /// + /// + public Task Modifyalpha(Cell cell, string SctpProfile, string alphaIndex) + { + int rtn = 0; + try + { + // set SctpProfile=1 alphaIndex 3 ? + MoShellResult result = ExecuteExtraCmd(_stationId, $"set SctpProfile={SctpProfile} alphaIndex {alphaIndex}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyalpha alphaIndex {alphaIndex}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyalpha error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// PUCCH标称PO值 + /// + /// + /// + /// + public Task ModifyP0nominal(Cell cell, string pZeroNomPucch) + { + int rtn = 0; + try + { + //P0-nominal set NRCellDU=1 pZeroNomPucch -114 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} pZeroNomPucch {pZeroNomPucch}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP0nominal pZeroNomPucch {pZeroNomPucch}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyP0nominal error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 测量报告间隔 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyReportInterval(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1ReportInterval) + { + int rtn = 0; + try + { + // set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1ReportInterval 7 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set Mdt={Mdt},MdtCellProfile={MdtCellProfile},MdtCellProfileUeCfg={MdtCellProfileUeCfg} m1ReportInterval {m1ReportInterval}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportInterval m1ReportInterval {m1ReportInterval}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyReportInterval error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 测量结果报告次数 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyreportAmount(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1ReportAmount) + { + int rtn = 0; + try + { + //set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1ReportAmount 4 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set Mdt={Mdt},MdtCellProfile={MdtCellProfile},MdtCellProfileUeCfg={MdtCellProfileUeCfg} m1ReportAmount {m1ReportAmount}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyreportAmount m1ReportAmount {m1ReportAmount}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyreportAmount error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// RS测量上报资源最大个数 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyMaxNrofRSIndexesToReport(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1MaxNoOfRsIndexToReport) + { + int rtn = 0; + try + { + // set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1MaxNoOfRsIndexToReport 8 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set Mdt={Mdt},MdtCellProfile={MdtCellProfile},MdtCellProfileUeCfg={MdtCellProfileUeCfg} m1MaxNoOfRsIndexToReport {m1MaxNoOfRsIndexToReport}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyMaxNrofRSIndexesToReport m1MaxNoOfRsIndexToReport {m1MaxNoOfRsIndexToReport}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyMaxNrofRSIndexesToReport error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 包含beam测量指示 + /// + /// + /// + /// + /// + /// + /// + public Task ModifyincludeBeamMeasurements(Cell cell, string Mdt, string MdtCellProfile, string MdtCellProfileUeCfg, string m1IncludeBeamMeasurement) + { + int rtn = 0; + try + { + //set Mdt=1,MdtCellProfile=Default,MdtCellProfileUeCfg=Base m1IncludeBeamMeasurement true + MoShellResult result = ExecuteExtraCmd(_stationId, $"set Mdt={Mdt},MdtCellProfile={MdtCellProfile},MdtCellProfileUeCfg={MdtCellProfileUeCfg} m1IncludeBeamMeasurement {m1IncludeBeamMeasurement}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyincludeBeamMeasurements m1IncludeBeamMeasurement {m1IncludeBeamMeasurement}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyincludeBeamMeasurements error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// 小区级RSRP滤波系数 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyfilterCoefficient(Cell cell, string UeMC, string UeMCCellProfile, string filterCoefficientNrRsrpHigh, string filterCoefficientNrRsrpLow, string filterCoefficientNrRsrqHigh, string filterCoefficientNrRsrqLow) + { + int rtn = 0; + try + { + //filterCoefficientRSRP/filterCoefficientRSRQ/filterCoefficientRS-SINR 小区级RSRP滤波系数 set UeMC=1,UeMCCellProfile=Default filterCoefficientNrRsrpHigh 4,set UeMC=1,UeMCCellProfile=Default filterCoefficientNrRsrpLow 4,set UeMC=1,UeMCCellProfile=Default filterCoefficientNrRsrqHigh 11,set UeMC=1,UeMCCellProfile=Default filterCoefficientNrRsrqLow 11 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set UeMC={UeMC},UeMCCellProfile={UeMCCellProfile} filterCoefficientNrRsrpHigh {filterCoefficientNrRsrpHigh},set UeMC={UeMC},UeMCCellProfile={UeMCCellProfile} filterCoefficientNrRsrpLow {filterCoefficientNrRsrpLow},set UeMC={UeMC},UeMCCellProfile={UeMCCellProfile} filterCoefficientNrRsrqHigh {filterCoefficientNrRsrqHigh},set UeMC={UeMC},UeMCCellProfile={UeMCCellProfile} filterCoefficientNrRsrqLow {filterCoefficientNrRsrqLow}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfilterCoefficient {filterCoefficientNrRsrpHigh},{filterCoefficientNrRsrpLow},{filterCoefficientNrRsrqHigh},{filterCoefficientNrRsrqLow} "); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyfilterCoefficient error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// NR服务小区重选子优先级 + /// + /// + /// + /// + public Task ModifycellReselectionSubPriority(Cell cell, string cellReselectionSubPriority) + { + int rtn = 0; + try + { + // NR服务小区重选子优先级 set NRCellCU=CAICTNRPFCM4_1,NRFreqRelation=511230 cellReselectionSubPriority 7 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellCU={cell.NRCellCUId},NRFreqRelation={cell.NRFreqRelationList.FirstOrDefault()} cellReselectionSubPriority {cellReselectionSubPriority}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionSubPriority cellReselectionSubPriority {cellReselectionSubPriority}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifycellReselectionSubPriority error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// MAC实体预期用于HARQ重传的UL分配之前的最小持续时间 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifydrxHARQRTTTimerUL(Cell cell, string GNBDUFunction, string UeCC, string Harq, string HarqUeCfg, string ulHarqMode) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,UeCC=1,Harq=1,HarqUeCfg=Base ulHarqMode 0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction={GNBDUFunction},UeCC={UeCC},Harq={Harq},HarqUeCfg={HarqUeCfg} ulHarqMode {ulHarqMode}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydrxHARQRTTTimerUL ulHarqMode {ulHarqMode}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydrxHARQRTTTimerUL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// MAC实体预期预期DL HARQ重传授权之前的最小持续时间 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifydrxHARQRTTTimerDL(Cell cell, string GNBDUFunction, string UeCC, string Harq, string HarqUeCfg, string dlHarqMode) + { + int rtn = 0; + try + { + //drx-HARQ-RTT-TimerDL set GNBDUFunction=1,UeCC=1,Harq=1,HarqUeCfg=Base dlHarqMode 0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction={GNBDUFunction},UeCC={UeCC},Harq={Harq},HarqUeCfg={HarqUeCfg} dlHarqMode {dlHarqMode}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydrxHARQRTTTimerUL dlHarqMode {dlHarqMode}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydrxHARQRTTTimerUL error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 支持频段 + /// + /// + /// + /// + /// + public Task ModifyFrequencyBand(Cell cell, string bandListManual, string NRFrequency) + { + int rtn = 0; + try + { + //set NRCellDU=1 bandListManual 41, set NRFrequency=5 bandListManual 41 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} bandListManual {bandListManual}, set NRFrequency={NRFrequency} bandListManual {bandListManual}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyFrequencyBand NRFrequency={NRFrequency}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyFrequencyBand error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 时隙配比 + /// + /// + /// + /// + public Task ModifydlULTransmissionPeriodicity(Cell cell, string tddUlDlPattern) + { + int rtn = 0; + try + { + // NRCellDU = 1 tddUlDlPattern 3 (TDD_ULDL_PATTERN_03) + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU = 1 tddUlDlPattern {tddUlDlPattern} (TDD_ULDL_PATTERN_03)"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydlULTransmissionPeriodicity tddUlDlPattern={tddUlDlPattern}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydlULTransmissionPeriodicity error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 时隙结构 + /// + /// + /// + /// + public Task ModifynrofDownlinkSymbols(Cell cell, string tddSpecialSlotPattern) + { + int rtn = 0; + try + { + // NRCellDU = 1 tddSpecialSlotPattern 2 (TDD_SPECIAL_SLOT_PATTERN_02) + MoShellResult result = ExecuteExtraCmd(_stationId, $" set NRCellDU = 1 tddSpecialSlotPattern {tddSpecialSlotPattern} (TDD_SPECIAL_SLOT_PATTERN_02)"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifynrofDownlinkSymbols tddSpecialSlotPattern={tddSpecialSlotPattern}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifynrofDownlinkSymbols error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SSB发送图样 + /// + /// + /// + /// + public Task ModifymediumBitmap(Cell cell, string ssbOffset) + { + int rtn = 0; + try + { + // set NRCellDU=1 ssbOffset 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $" set NRCellDU={cell.NRCellDUId} ssbOffset {ssbOffset}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifymediumBitmap ssbOffset={ssbOffset}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifymediumBitmap error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行调制方式 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifydmcsTable(Cell cell, string GNBDUFunction, string UeCC, string LinkAdaptation, string LinkAdaptationUeCfg, string dlMcsTable) + { + int rtn = 0; + try + { + // mcs-Table 下行调制方式 set GNBDUFunction=1,UeCC=1,LinkAdaptation=1,LinkAdaptationUeCfg=Base dlMcsTable 1/0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction={GNBDUFunction},UeCC={UeCC},LinkAdaptation={LinkAdaptation},LinkAdaptationUeCfg={LinkAdaptationUeCfg} dlMcsTable {dlMcsTable}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydmcsTable dlMcsTable {dlMcsTable}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifydmcsTable error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行MU-MIMO功能开关 + /// + /// + /// + /// + public Task ModifyDlMuMimoSwitch(Cell cell, string featureState) + { + int rtn = 0; + try + { + // set CXC4012590 featureState 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set FeatureState=CXC4012590 featureState {featureState}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDlMuMimoSwitch featureState {featureState}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDlMuMimoSwitch error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// DL 256QAM开关 + /// + /// + /// + /// + public Task ModifyDl256QAMSwitch(Cell cell, string dl256QamEnabled) + { + int rtn = 0; + try + { + // set NRCellDU=1 dl256QamEnabled true + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} dl256QamEnabled {dl256QamEnabled}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDl256QAMSwitch dl256QamEnabled {dl256QamEnabled}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyDl256QAMSwitch error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上行调制方式 + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifyumcsTable(Cell cell, string GNBDUFunction, string UeCC, string LinkAdaptation, string LinkAdaptationUeCfg, string ulMcsTable) + { + int rtn = 0; + try + { + // mcs-Table 下行调制方式 set GNBDUFunction=1,UeCC=1,LinkAdaptation=1,LinkAdaptationUeCfg=Base ulMcsTable 1/0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction={GNBDUFunction},UeCC={UeCC},LinkAdaptation={LinkAdaptation},LinkAdaptationUeCfg={LinkAdaptationUeCfg} ulMcsTable {ulMcsTable}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyumcsTable ulMcsTable {ulMcsTable}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyumcsTable error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上行MU-MIMO功能开关 + /// + /// + /// + /// + public Task ModifyUlMuMimoSwitch(Cell cell, string featureState) + { + int rtn = 0; + try + { + // set FeatureState=CXC4012330 featureState 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set FeatureState=CXC4012330 featureState {featureState}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUlMuMimoSwitch featureState {featureState}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUlMuMimoSwitch error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// UL 256QAM开关 + /// + /// + /// + /// + public Task ModifyUl256QAMSwitch(Cell cell, string ul256QamEnabled) + { + int rtn = 0; + try + { + // set NRCellDU=1 ul256QamEnabled true + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} ul256QamEnabled {ul256QamEnabled}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUl256QAMSwitch ul256QamEnabled {ul256QamEnabled}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyUl256QAMSwitch error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 信道测量CSI端口数量 + /// + /// + /// + /// + public Task ModifyCsinrofPorts(Cell cell, string csiRsControl16Ports) + { + int rtn = 0; + try + { + // nrofPorts set NRCellDU=1 csiRsConfig16P csiRsControl16Ports=1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} csiRsConfig16P csiRsControl16Ports {csiRsControl16Ports}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCsinrofPorts csiRsControl16Ports {csiRsControl16Ports}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCsinrofPorts error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 信道测量CSI周期 + /// + /// + /// + /// + public Task ModifyperiodicityAndOffset(Cell cell, string csiRsPeriodicity) + { + int rtn = 0; + try + { + // set NRCellDU=1 csiRsPeriodicity 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} csiRsPeriodicity {csiRsPeriodicity}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffset csiRsPeriodicity {csiRsPeriodicity}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffset error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 时频跟踪TRS周期 + /// + /// + /// + /// + public Task ModifytrsPeriodicity(Cell cell, string trsPeriodicity) + { + int rtn = 0; + try + { + // set NRCellDU = 1 trsPeriodicity 20 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} trsPeriodicity {trsPeriodicity}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytrsPeriodicity trsPeriodicity {trsPeriodicity}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytrsPeriodicity error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 梳齿频分倍数 + /// + /// + /// + /// + public Task ModifytransmissionComb(Cell cell, string srsSymbolCombSelectionMode) + { + int rtn = 0; + try + { + // set NRCellDU=1 srsSymbolCombSelectionMode 0 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} srsSymbolCombSelectionMode {srsSymbolCombSelectionMode}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytransmissionComb srsSymbolCombSelectionMode {srsSymbolCombSelectionMode}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytransmissionComb error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 组或序列跳频配置 + /// + /// + /// + /// + public Task ModifygroupOrSequenceHopping(Cell cell, string srsHoppingBandwidth) + { + int rtn = 0; + try + { + // set NRCellDU=1 srsHoppingBandwidth 0 + + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} srsHoppingBandwidth {srsHoppingBandwidth}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygroupOrSequenceHopping srsHoppingBandwidth {srsHoppingBandwidth}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifygroupOrSequenceHopping error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// SRS周期和偏移 + /// + /// + /// + /// + public Task ModifyperiodicityAndOffset_P(Cell cell, string srsPeriodicity) + { + int rtn = 0; + try + { + // set NRCellDU = 1 srsPeriodicity 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set NRCellDU={cell.NRCellDUId} srsPeriodicity {srsPeriodicity}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffset_P srsPeriodicity {srsPeriodicity}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyperiodicityAndOffset_P error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 上行PDCP丢弃定时器 + /// + /// + /// + /// + /// + /// + public Task ModifytPdcpDiscard(Cell cell, string CUCP5qiTable, string CUCP5qi, string tPdcpDiscard) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 tPdcpDiscard 250 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set CUCP5qiTable={CUCP5qiTable},CUCP5qi={CUCP5qi} tPdcpDiscard {tPdcpDiscard}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard tPdcpDiscard {tPdcpDiscard}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// gNodeB PDCP重排序定时器 + /// + /// + /// + /// + /// + /// + public Task ModifytReorderingUl(Cell cell, string CUCP5qiTable, string CUCP5qi, string tReorderingUl) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 tReorderingUl 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set CUCP5qiTable={CUCP5qiTable},CUCP5qi={CUCP5qi} tReorderingUl {tReorderingUl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard tReorderingUl {tReorderingUl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard error.", ex); + } + return Task.FromResult(rtn); + } + + /// + /// UE PDCP重排序定时器 + /// + /// + /// + /// + /// + /// + public Task ModifytReorderingDl(Cell cell, string CUCP5qiTable, string CUCP5qi, string tReorderingDl) + { + int rtn = 0; + try + { + // set CUCP5qiTable=1,CUCP5qi=1 tReorderingDl 200 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set CUCP5qiTable={CUCP5qiTable},CUCP5qi={CUCP5qi} tReorderingDl {tReorderingDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard tReorderingDl {tReorderingDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifytPdcpDiscard error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// PDCP头压缩 + /// + /// + /// + /// + public Task ModifyheaderCompression(Cell cell, string featureState) + { + int rtn = 0; + try + { + // set CXC4012592 featureState 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set CXC4012592 featureState {featureState}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyheaderCompression featureState {featureState}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyheaderCompression error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// pollByte UE AM模式触发Polling 的字节数门限 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifypollByteUEAM(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string ulMaxRetxThreshold) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base ulMaxRetxThreshold 32 ? + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} ulMaxRetxThreshold {ulMaxRetxThreshold}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypollByteUEAM ulMaxRetxThreshold {ulMaxRetxThreshold}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypollByteUEAM error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///gNodeB AM模式触发Polling的字节数门限 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task ModifypollBytegNodeBAM(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string dlMaxRetxThreshold) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base dlMaxRetxThreshold 16 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} dlMaxRetxThreshold {dlMaxRetxThreshold}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypollByteUEAM dlMaxRetxThreshold {dlMaxRetxThreshold}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifypollByteUEAM error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///UE Polling PDU重传定时器 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task Modifyt_PollRetransmitUEPolling(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string tPollRetransmitUl) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base tPollRetransmitUl 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} tPollRetransmitUl {tPollRetransmitUl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_PollRetransmitUEPolling tPollRetransmitUl {tPollRetransmitUl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_PollRetransmitUEPolling error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// gNodeB Polling PDU重传定时器 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task Modifyt_PollRetransmitgNodeBPolling(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string tPollRetransmitDl) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,UeCC=1,RadioLinkControl=1,DrbRlc=Default,DrbRlcUeCfg=Base tPollRetransmitDl 40 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} tPollRetransmitDl {tPollRetransmitDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_PollRetransmitgNodeBPolling tPollRetransmitDl {tPollRetransmitDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_PollRetransmitgNodeBPolling error.", ex); + } + return Task.FromResult(rtn); + } + /// + ///UE禁止发送状态报告定时器//gNodeB AM模式禁止发送状态报告定时器 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task Modifyt_StatusProhibit(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string tStatusProhibitDl) + { + int rtn = 0; + try + { + // set GNBDUFunction = 1, UeCC = 1, RadioLinkControl = 1, DrbRlc = Default, DrbRlcUeCfg = Base tStatusProhibitDl 10 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} tStatusProhibitDl {tStatusProhibitDl}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_StatusProhibit tStatusProhibitDl {tStatusProhibitDl}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyt_StatusProhibit error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 下行RLC序列号长度 上行RLC序列号长度 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task Modifytsn_FieldLength(Cell cell, string GNBDUFunction, string UeCC, string RadioLinkControl, string DrbRlc, string DrbRlcUeCfg, string rlcSNLength) + { + int rtn = 0; + try + { + //set GNBDUFunction=1,UeCC=1,RadioLinkControl=1,DrbRlc=Default,DrbRlcUeCfg=Base rlcSNLength 6 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction = {GNBDUFunction}, UeCC = {UeCC}, RadioLinkControl = {RadioLinkControl}, DrbRlc = {DrbRlc}, DrbRlcUeCfg = {DrbRlcUeCfg} rlcSNLength {rlcSNLength}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifytsn_FieldLength rlcSNLength {rlcSNLength}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifytsn_FieldLength error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// PF中PO个数 + /// + /// + /// + /// + /// + /// + public Task Modifyns(Cell cell, string GNBDUFunction, string Paging, string nS) + { + int rtn = 0; + try + { + // set GNBDUFunction=1,Paging=1 nS 1 + MoShellResult result = ExecuteExtraCmd(_stationId, $"set GNBDUFunction={GNBDUFunction},Paging={Paging} nS {nS}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyns nS {nS}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} Modifyns error.", ex); + } + return Task.FromResult(rtn); + } + /// + /// 初始BWP + /// + /// + /// + public Task ModifyBWP(Cell cell, string startRB) + { + int rtn = 0; + try + { + // get NRCellDU=1 bWPRef ,set BWP=DL$ startRB 48,set BWP=UL$ startRB 48 + + MoShellResult result = ExecuteExtraCmd(_stationId, $"get NRCellDU={cell.NRCellDUId} bWPRef ,set BWP=DL$ startRB {startRB},set BWP=UL$ startRB {startRB}"); + rtn = result?.Status == true ? 0 : -1; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyBWP startRB {startRB}"); + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyBWP error.", ex); + } + return Task.FromResult(rtn); + } + + + + + + + + #endregion + + + /// + /// 获取基站异常代码 + /// + /// + /// + public int GetErrorCode(int errorCode) + { + int.TryParse(ErrorCodeHelper.GetDeviceErrorCode(DeviceTypeEnum.BaseStationTester, errorCode), out int code); + return code; + } + + #endregion + + #region 接口实现 + + + + + + public int QuerySiteState() + { + return _rtn; + } + + public void Dispose() + { + if (_disposed) + return; + + _disposed = true; + base.Close(); + } + + + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait) + { + throw new NotImplementedException(); + } + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait) + { + throw new NotImplementedException(); + } + + public int BeforTest() + { + throw new NotImplementedException(); + } + + public int AfterTest() + { + return 0; + } + + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/MoShellResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/MoShellResult.cs new file mode 100644 index 00000000..d76a0082 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/MoShellResult.cs @@ -0,0 +1,299 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary.BaseStation +{ + + /// + /// 爱立信接口返回的结果对象 + /// + public class MoShellResult + { + [JsonProperty("msg")] + public string Message { get; set; } = string.Empty; + + [JsonProperty("status")] + public bool Status { get; set; } = false; + + public override string ToString() + { + return $"status:{Status}, msg:{Message}"; + } + } + + public class MoInfo + { + public string Mo { get; set; } + public string Attribute { get; set; } + public string Value { get; set; } + + public override string ToString() + { + return $"Mo:{Mo}, Attribute:{Attribute}, Value:{Value}"; + } + } + + public class ManagedObject + { + public string MoIdentifier { get; set; } + public Dictionary MoProperties { get; set; } // 存储MO的属性及其值 + public Dictionary Attributes { get; set; } + + public override string ToString() + { + return $"{MoIdentifier},{string.Join(",", Attributes.Select(kvp => $"{kvp.Key}:{kvp.Value}"))?[0..^1]}"; + } + } + + public class PLMNInfo + { + public int MCC { get; set; } + public int MNC { get; set; } + + public override string ToString() + { + return $"{MCC}/{MNC}"; + } + } + + /// + /// MoShell指令类型 + /// + public enum MoShellCmdType + { + [Description("InitCmd")] + InitCmd, + [Description("ExtraCmd")] + ExtraCmd, + [Description("SetCmd")] + SetCmd, + [Description("CheckCmd")] + CheckCmd, + [Description("QuitCmd")] + QuitCmd + } + + /// + /// MoShell爱立信操作指令 + /// + public enum EricssonCmdType + { + [Description("移动国家码"), Command("Mcc")] + Mcc, + [Description("移动网络码"), Command("Mnc")] + Mnc, + [Description("跟踪区域码"), Command("TAC")] + TAC, + [Description("基站ID"), Command("gNodeBId")] + GNodeBId, + [Description("gNBID长度"), Command("gNBIdLength")] + GNBIdLength, + [Description("小区标识"), Command("CellId")] + CellId, + [Description("物理小区标识"), Command("PhyCellId")] + PhyCellId, + [Description("本地小区ID"), Command("LocalCellId")] + LocalCellId, + [Description("基站ID"), Command("eNodeBId")] + ENodeBId, + [Description("ssb中心频点"), Command("ssbFrequency")] + SsbFrequency, + [Description("下行小区中心频点"), Command("DLcenterARFCNDL")] + DLcenterARFCNDL, + [Description("上行小区中心频点"), Command("ULcenterARFCNDL")] + ULcenterARFCNDL, + [Description("上下行时隙配置"), Command("subframeAssignment")] + SubframeAssignment, + [Description("特殊时隙配置"), Command("specialSubframePattern")] + SpecialSubframePattern, + [Description("LTE频段"), Command("freqBandIndicator")] + FreqBandIndicator, + [Description("SSB子载波间隔"), Command("ssbSubcarrierSpacing")] + SsbSubcarrierSpacing, + [Description("上行带宽"), Command("ul-Bandwidth")] + Ul_Bandwidth, + [Description("下行带宽"), Command("dl-Bandwidth")] + Dl_Bandwidth, + [Description("最低接收电平"), Command("MinimumRxLevel")] + MinimumRxLevel, + //[Description("NR异频重选邻区SCS"), Command("ssbSubcarrierSpacing")] + //SsbSubcarrierSpacing, + [Description("NR小区重选偏置"), Command("q-OffsetFreq")] + Q_OffsetFreq, + [Description("NR小区重选优先级"), Command("cellReselectionPriority")] + CellReselectionPriority, + [Description("NR-LTE切换邻区允许测量带宽"), Command("allowedMeasBandwidth")] + AllowedMeasBandwidth, + [Description("异频异系统重选起测门限RSRP"), Command("s-NonIntraSearchP")] + S_NonIntraSearchP, + [Description("异频异系统重选起测门限RSRQ"), Command("s-NonIntraSearchQ")] + S_NonIntraSearchQ, + [Description("异频异系统低优先级重选门限RSRP"), Command("threshServingLowP")] + ThreshServingLowP, + [Description("异频异系统低优先级重选门限RSRQ"), Command("threshServingLowQ")] + ThreshServingLowQ, + [Description("小区重选迟滞"), Command("q-Hyst")] + Q_Hyst, + [Description("E-UTRAN小区重选定时器时长"), Command("TreselectionEUTRA")] + TreselectionEUTRA, + //[Description("EUTRA邻区重选优先级"), Command("cellReselectionPriority")] + //CellReselectionPriority, + [Description("EUTRA邻区重选子优先级"), Command("cellReselectionSubPriority")] + CellReselectionSubPriority, + [Description("E-UTRAN频点高优先级重选RSRP门限"), Command("threshX-High")] + ThreshX_High, + [Description("E-UTRAN频点高优先级目标小区重选门限RSRQ"), Command("threshX-HighQ")] + ThreshX_HighQ, + [Description("E-UTRAN频点低优先级目标小区重选门限RSRP"), Command("threshX-Low")] + ThreshX_Low, + [Description("E-UTRAN频点低优先级目标小区重选门限RSRQ"), Command("threshX-LowQ")] + ThreshX_LowQ, + [Description("EUTRA邻区最小接入电平"), Command("q-RxLevMin")] + Q_RxLevMin, + [Description("EUTRA邻区最小接入质量"), Command("q-QualMin")] + Q_QualMin, + [Description("重选NR小区定时器时长"), Command("t-ReselectionNR-r15")] + T_ReselectionNR_r15, + [Description("SSB测量时间窗"), Command("ssb-Duration-r15")] + Ssb_Duration_r15, + [Description("SSB子载波间隔"), Command("subcarrierSpacingSSB")] + SubcarrierSpacingSSB, + //[Description("NR频点重选优先级"), Command("cellReselectionPriority")] + //CellReselectionPriority, + [Description("NR频点重选子优先级"), Command("cellReselectionSubPriority-r13")] + CellReselectionSubPriority_r13, + [Description("NR频点高优先级重选RSRP门限"), Command("threshX-High-r15")] + ThreshX_High_r15, + [Description("NR频点低优先级重选RSRP门限"), Command("threshX-Low-r15")] + ThreshX_Low_r15, + [Description("NR频点低优先级重选RSRQ门限"), Command("threshX-HighQ-r15")] + ThreshX_HighQ_r15, + [Description("NR频点低优先级重选RSRQ门限"), Command("threshX-LowQ-r15")] + ThreshX_LowQ_r15, + [Description("最低接收电平"), Command("q-RxLevMin-r15")] + Q_RxLevMin_r15, + [Description("最低接收RSRQ"), Command("q-QualMin-r15")] + Q_QualMin_r15, + [Description("UE在NR SCG最大发射功率"), Command("p-MaxNR-r15")] + P_MaxNR_r15, + [Description("异系统切换A1 RSRP门限"), Command("a1-Threshold")] + A1_Threshold, + [Description("异系统切换A2 RSRP门限"), Command("a2-Threshold")] + A2_Threshold, + [Description("异系统切换A1A2幅度迟滞"), Command("hysteresis")] + Hysteresis, + [Description("异系统切换A1A2时间迟滞"), Command("timeToTrigger")] + TimeToTrigger, + [Description("基于覆盖的切换至E-UTRAN B2 RSRP门限1"), Command("b2-Threshold1")] + B2_Threshold1, + [Description("基于覆盖的切换B2 RSRP门限2"), Command("b2-Threshold2EUTRA")] + B2_Threshold2EUTRA, + //[Description("基于覆盖的切换B1B2幅度迟滞"), Command("hysteresis")] + //Hysteresis, + //[Description("基于覆盖的切换B1B2时间迟滞"), Command("timeToTrigger")] + //TimeToTrigger, + [Description("E-UTRAN小区偏移量"), Command("cellIndividualOffset")] + CellIndividualOffset, + [Description("服务小区UE允许的最大功率"), Command("p-Max")] + P_Max, + [Description("同频切换的A3偏置"), Command("a3-offset")] + A3_offset, + //[Description("异频A1事件报告门限"), Command("a1-Threshold")] + //A1_Threshold, + //[Description("异频A2事件报告门限"), Command("a2-Threshold")] + //A2_Threshold, + [Description("A5事件报告的服务小区信号质量门限"), Command("a5-Threshold1")] + A5_Threshold1, + [Description("A5事件报告的相邻小区信号质量门限"), Command("a5-Threshold2")] + A5_Threshold2, + [Description("最大上报小区数"), Command("maxReportCells")] + MaxReportCells, + [Description("上报参考信号index"), Command("reportQuantityRS-Indexes")] + ReportQuantityRS_Indexes, + //[Description("小区重选迟滞"), Command("q-Hyst")] + //Q_Hyst, + //[Description("NR服务小区重选优先级"), Command("cellReselectionPriority")] + //CellReselectionPriority, + //[Description("异频异系统重选起测门限RSRP"), Command("s-NonIntraSearchP")] + //S_NonIntraSearchP, + //[Description("异频异系统重选起测门限RSRQ"), Command("s-NonIntraSearchQ")] + //S_NonIntraSearchQ, + //[Description("异频异系统低优先级重选门限RSRP"), Command("threshServingLowP")] + //ThreshServingLowP, + //[Description("异频异系统低优先级重选门限RSRQ"), Command("threshServingLowQ")] + //ThreshServingLowQ, + //[Description("最低接收电平门限"), Command("q-RxLevMin")] + //Q_RxLevMin, + //[Description("最低信号质量门限"), Command("q-QualMin")] + //Q_QualMin, + [Description("同频小区测量Srxlev门限"), Command("s-IntraSearchP")] + S_IntraSearchP, + [Description("同频小区测量Squal门限"), Command("s-IntraSearchQ")] + S_IntraSearchQ, + [Description("NR小区重选定时器"), Command("t-ReselectionNR")] + T_ReselectionNR, + [Description("SMTC周期"), Command("smtc: periodicityAndOffset")] + Smtc_periodicityAndOffset, + [Description("SMTC持续时间"), Command("smtc: duration")] + Smtc_duration, + [Description("高优先级载频或异系统小区Srxlev门限"), Command("threshX-HighP")] + ThreshX_HighP, + [Description("低优先级载频或异系统小区Srxlev门限"), Command("threshX-LowP")] + ThreshX_LowP, + [Description("DRX算法开关"), Command("DrxAlgoSwitch")] + DrxAlgoSwitch, + [Description("持续时间定时器"), Command("drx-onDurationTimer")] + Drx_onDurationTimer, + [Description("长周期"), Command("LongCycle")] + LongCycle, + [Description("上行行重传定时器"), Command("drx-RetransmissionTimerUL")] + Drx_RetransmissionTimerUL, + [Description("下行重传定时器"), Command("drx-RetransmissionTimerDL")] + Drx_RetransmissionTimerDL, + [Description("短周期"), Command("ShortCycle")] + ShortCycle, + [Description("短周期定时器"), Command("ShortCycleTimer")] + ShortCycleTimer, + [Description("RRC连接响应定时器"), Command("t300")] + T300, + [Description("RRC重建响应定时器"), Command("t301")] + T301, + [Description("定时器 T310"), Command("T310")] + T310, + [Description("常量 N310"), Command("N310")] + N310, + [Description("RLF失步转idle定时器"), Command("t311")] + T311, + [Description("常量 N311"), Command("N311")] + N311, + [Description("RRC连接恢复响应定时器"), Command("t319")] + T319, + [Description("定时器 T304"), Command("T304")] + T304, + [Description("UE不活动定时器"), Command("UeInactivityTimer")] + UeInactivityTimer, + [Description("测量上报量类型"), Command("reportQuantity")] + ReportQuantity, + [Description("帧偏置"), Command("FrameOffset")] + FrameOffset, + [Description("SSB周期"), Command("ssb-periodicityServingCell")] + Ssb_periodicityServingCell, + [Description("下行PDCP序列号长度"), Command("pdcp-SN-SizeDL")] + Pdcp_SN_SizeDL, + [Description("上行PDCP序列号长度"), Command("pdcp-SN-SizeUL")] + Pdcp_SN_SizeUL, + [Description("RLC模式"), Command("RlcMode")] + RlcMode, + [Description("UE触发Polling的PDU个数门限"), Command("pollPDU")] + PollPDU, + [Description("gNodeB RLC重组定时器"), Command("t-Reassembly")] + T_Reassembly, + [Description("BSR重传定时器"), Command("retxBSR-Timer")] + RetxBSR_Timer, + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Huawei/HuaweiBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Huawei/HuaweiBaseStationTester.cs new file mode 100644 index 00000000..6f0932c8 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Huawei/HuaweiBaseStationTester.cs @@ -0,0 +1,12786 @@ + +using MTNet.Application.ConnectBase; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using MTNet.Application.IDAL.Utils; +using Newtonsoft.Json; +using Org.BouncyCastle.Asn1.X500; +using Org.BouncyCastle.Bcpg; +using Org.BouncyCastle.Ocsp; +using Org.BouncyCastle.Utilities; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; + + +namespace MTNet.Application.DriverLibrary.BaseStation.Huawei +{ + public class HuaweiBaseStationTester : ConnectInstBase, IHuaweiBaseStationTester + { + + int _rtn = 0; + string _cmd = ""; + private List CellList = new List(); + DeviceAddrConfig _addrConfig = new DeviceAddrConfig(); + /// + /// 构造函数 + /// + /// + /// + public HuaweiBaseStationTester(DeviceAddrConfig addrConfig) : base(addrConfig) + { + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); + _addrConfig = addrConfig; + } + public int RTN + { + get { return _rtn; } + private set + { + _rtn = value; + if (_rtn < 0) + { + //DeviceControlLogger.Logger.Error("Send command error.", new Exception($"Send command to Huawei base station failed!Error Command:{_cmd}")); + } + } + } + + #region 实现接口 + /// + /// 连接状态 + /// + public bool ConnectStatus { get; set; } = false; + public override int Connect() + { + int rtn = 0; + try + { + if (!ConnectStatus) + { + rtn = base.Connect(); + ConnectStatus = true; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(1); + throw new Exception($"Huawei basestation connect error.[{rtn}]", ex); + } + return rtn; + } + + public override int Close() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"Huawei BaseStation DisConnect Success!"); + return _rtn; + } + public int Initial() + { + int rtn = 0; + + try + { + string response = SendRead("LGI:OP=" + AddrConfig.UserName + ",PWD=" + AddrConfig.Password + ";\r\n"); + } + catch (Exception ex) + { + //SystemLogger.Logger.Error($"Read not parameter command error.", ex); + throw; + } + + return rtn; + } + //public int Initial(TestSettings settings) + //{ + // _testSettings = settings; + + // //if (Common.IsCatchDeviceControlLog) + // //DeviceControlLogger.Logger.Info($"Huawei BaseStation Initial Success!"); + + // return _rtn; + //} + + //public int Initial(BaseStationTesterSettings bsSettings) + //{ + // _bsParameters = bsSettings as BSParameters; + // return _rtn; + //} + + + public void Dispose() + { + Close(); + } + + public int QuerySiteState() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"Huawei BaseStation AfterTest Success!"); + return _rtn; + } + + // NR-NR + // 同站同频:邻区 + // 同站异频:频点,邻区 + // 异站异频:频点,外部邻区,邻区 + // 异站同频:外部邻区,邻区 + + //NR-LTE + //异站异频:频点,外部邻区,邻区 + + //LTE-NR + //异站异频:频点,外部邻区,邻区 + + //LTE-LTE + //同站同频:邻区 + //同站异频:频点,邻区 + //异站异频:频点,外部邻区,邻区 + //异站同频:外部邻区,邻区 + /// + /// 添加邻区 + /// + /// + /// + /// + public Task CreateRelations(Cell FirstCell, Cell SecondCell) + { + FirstCell = CellList.FirstOrDefault(x => x.Name == FirstCell.Name); + SecondCell = CellList.FirstOrDefault(x => x.Name == SecondCell.Name); + if (FirstCell == null || SecondCell == null) + return Task.CompletedTask; + try + { + //登录 + //var _client = ConnectAndLogin(); + //NR-NR + if (FirstCell.NetworkType == SecondCell.NetworkType && FirstCell.NetworkType == NetworkTypeEnum.NR) + { + //NR-NR同站 + if (FirstCell.NodeBId == SecondCell.NodeBId) + { + //网元一样 直接注册一个就可以 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + + string mcc = "";// + string mnc = "";// + ////查询 运营商信息 + var operatordata = SendRead("LST GNBOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[9][2].ToString(); + mnc = mat[10][2].ToString(); + + } + else + { + mcc = mat[9][2].ToString(); + mnc = mat[9][3].ToString(); + } + } + var ssbfreqpos = ""; + if (FirstCell.ssbFrequency == SecondCell.ssbFrequency)//NR-NR同站同频 + { + //不需要添加频点 + } + else + { //NR-NR同站异频 + //查询频域位置和跟踪区域标识 + var ssbfreqposdata = SendRead("LST GNBOPERATOR:;\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ssbfreqposdata, pattern); + if (match.Success) + { + ssbfreqpos = match.Groups[1].Value; + } + //添加频点关系 + _ = SendRead("ADD NRCELLFREQRELATION:NRCELLID=" + FirstCell.CellId + ",SSBFREQPOS=" + ssbfreqpos + ",FREQUENCYBAND=" + SecondCell.Freqband + ";\r\n"); + } + + var commond = $"ADD NRCELLRELATION:NRCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",GNBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"; + var relation = SendRead(commond); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + //NR-NR异站 + else + { + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + + if (FirstCell.ssbFrequency == SecondCell.ssbFrequency)//NR-NR异站同频 + { + string mcc = "";//460 + string mnc = "";//07 + string track = "";//1 + string ssbfreqpos = "";//1916 + ////查询 运营商信息 + var operatordata = SendRead("LST GNBOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[9][2].ToString(); + mnc = mat[10][2].ToString(); + + } + else + { + mcc = mat[9][2].ToString(); + mnc = mat[9][3].ToString(); + } + } + //查询频域位置和跟踪区域标识 + var ssbfreqposdata = SendRead("LST GNBOPERATOR:;\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ssbfreqposdata, pattern); + if (match.Success) + { + ssbfreqpos = match.Groups[1].Value; + } + var tacflag = ""; + string patterntac = @"跟踪区域标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match1 = Regex.Match(ssbfreqposdata, patterntac); + if (match1.Success) + { + tacflag = match1.Groups[1].Value; + } + //根据跟踪区域标识查询跟踪区域码 + var tarckdata = SendRead($"LST GNBTRACKINGAREA:TRACKINGAREAID={tacflag};\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + track = tarckinfo[8][2].ToString(); + } + else + { + track = tarckinfo[9][1].ToString(); + } + } + + var CGPOMU1 = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUT1 = GetMatchCollections(CGPOMU1); + if (CGPOMUT1[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT1[3][3]}."); + return Task.FromResult(-1); + } + //添加外部邻区 + _ = SendRead("ADD NREXTERNALNCELL:MCC=" + mcc + ",MNC=" + mnc + ",GNBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ",PHYSICALCELLID=" + SecondCell.PCI + ",TAC=" + track + ",SSBFREQPOS=" + ssbfreqpos + ";\r\n"); + //添加邻区关系 + var relation = SendRead("ADD NRCELLRELATION:NRCELLID=" + FirstCell.CellId + ",MCC=" + mcc + ",MNC=" + mnc + ",GNBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ";\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + else + { //NR-NR异站异频 + string mcc = "";//460 + string mnc = "";//07 + string track = "";//1 + string ssbfreqpos = "";//1916 + ////查询 运营商信息 + var operatordata = SendRead("LST GNBOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[9][2].ToString(); + mnc = mat[10][2].ToString(); + + } + else + { + mcc = mat[9][2].ToString(); + mnc = mat[9][3].ToString(); + } + } + //查询频域位置和跟踪区域标识 + var ssbfreqposdata = SendRead("LST GNBOPERATOR:;\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ssbfreqposdata, pattern); + if (match.Success) + { + ssbfreqpos = match.Groups[1].Value; + } + var tacflag = ""; + string patterntac = @"跟踪区域标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match1 = Regex.Match(ssbfreqposdata, patterntac); + if (match1.Success) + { + tacflag = match1.Groups[1].Value; + } + //根据跟踪区域标识查询跟踪区域码 + var tarckdata = SendRead($"LST GNBTRACKINGAREA:TRACKINGAREAID={tacflag};\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + track = tarckinfo[8][2].ToString(); + } + else + { + track = tarckinfo[9][1].ToString(); + } + } + + var CGPOMU1 = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUT1 = GetMatchCollections(CGPOMU1); + if (CGPOMUT1[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT1[3][3]}."); + return Task.FromResult(-1); + } + //添加频点关系 + _ = SendRead("ADD NRCELLFREQRELATION:NRCELLID=" + FirstCell.CellId + ",SSBFREQPOS=" + ssbfreqpos + ",FREQUENCYBAND=" + SecondCell.Freqband + ";\r\n"); + //添加外部邻区 + _ = SendRead("ADD NREXTERNALNCELL:MCC=" + mcc + ",MNC=" + mnc + ",GNBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ",PHYSICALCELLID=" + SecondCell.PCI + ",TAC=" + track + ",SSBFREQPOS=" + ssbfreqpos + ";\r\n"); + //添加邻区关系 + var relation = SendRead("ADD NRCELLRELATION:NRCELLID=" + FirstCell.CellId + ",MCC=" + mcc + ",MNC=" + mnc + ",GNBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ";\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + + } + + } + } + //LTE-LTE + else if (FirstCell.NetworkType == SecondCell.NetworkType && FirstCell.NetworkType == NetworkTypeEnum.LTE) + { + //LTE-LTE同站 + if (FirstCell.NodeBId == SecondCell.NodeBId) + { + //同站注册一个网元 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + //LTE-LTE同站同频 + if (FirstCell.ssbFrequency == SecondCell.ssbFrequency) + { + ////查询 运营商信息 + string mcc = "";//460 + string mnc = "";//01 + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + //添加邻区关系 + var relation = SendRead($"ADD EUTRANINTRAFREQNCELL:LOCALCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + //LTE-LTE同站异频 + else + { + ////查询 运营商信息 + string mcc = "";//460 + string mnc = "";//01 + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + //先添加频点关系 + int resdic = keyValueBandwidthPairs[SecondCell.DlBandwidth]; + string compd = $"ADD EUTRANINTERNFREQ:LOCALCELLID={FirstCell.CellId},DLEARFCN={SecondCell.ssbFrequency},ULEARFCNCFGIND=NOT_CFG,CELLRESELPRIORITYCFGIND=NOT_CFG,SPEEDDEPENDSPCFGIND=NOT_CFG,MEASBANDWIDTH=MBW{resdic},PMAXCFGIND=NOT_CFG,QQUALMINCFGIND=NOT_CFG,INTERFREQCIOADJLIMITCFGIND=NOT_CFG;\r\n"; + _ = SendRead(compd); + //添加邻区关系 + var relation = SendRead($"ADD EUTRANINTERFREQNCELL:LOCALCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + + } + //LTE-LTE异站 + else + { + //LTE-LTE异站异频 + if (FirstCell.ssbFrequency != SecondCell.ssbFrequency) + { + //异站先注册SecondCell 查询需要信息 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + ////查询 运营商信息 + string mcc = "460"; + string mnc = "07"; + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + var track = ""; + //查询跟踪区域码 + var tarckdata = SendRead("LST CNOPERATORTA:;\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + track = tarckinfo[9][2].ToString(); + } + else + { + track = tarckinfo[9][2].ToString(); + } + var CGPOMUser = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUTser = GetMatchCollections(CGPOMUser); + if (CGPOMUTser[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUTser[3][3]}."); + return Task.FromResult(-1); + } + //添加频点 + int resdic = keyValueBandwidthPairs[SecondCell.DlBandwidth]; + string compd = $"ADD EUTRANINTERNFREQ:LOCALCELLID={FirstCell.CellId},DLEARFCN={SecondCell.ssbFrequency},ULEARFCNCFGIND=NOT_CFG,CELLRESELPRIORITYCFGIND=NOT_CFG,SPEEDDEPENDSPCFGIND=NOT_CFG,MEASBANDWIDTH=MBW{resdic},PMAXCFGIND=NOT_CFG,QQUALMINCFGIND=NOT_CFG,INTERFREQCIOADJLIMITCFGIND=NOT_CFG;\r\n"; + _ = SendRead(compd); + //添加外部 + var comwb = $"ADD EUTRANEXTERNALCELL:MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId},DLEARFCN={SecondCell.ssbFrequency},ULEARFCNCFGIND=NOT_CFG,PHYCELLID={SecondCell.PCI},TAC={track};\r\n"; + _ = SendRead(comwb); + //添加邻区 + var com = $"ADD EUTRANINTERFREQNCELL:LOCALCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"; + var relation = SendRead(com); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + + + } + //LTE-LTE异站同频 + else + { + + //异站先注册SecondCell 查询需要信息 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + ////查询 运营商信息 + string mcc = ""; + string mnc = ""; + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + var track = ""; + //查询跟踪区域码 + var tarckdata = SendRead("LST CNOPERATORTA:;\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + track = tarckinfo[9][2].ToString(); + } + else + { + track = tarckinfo[9][2].ToString(); + } + var CGPOMUser = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUTser = GetMatchCollections(CGPOMUser); + if (CGPOMUTser[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUTser[3][3]}."); + return Task.FromResult(-1); + } + //添加外部 + var comwb = $"ADD EUTRANEXTERNALCELL:MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId},DLEARFCN={SecondCell.ssbFrequency},ULEARFCNCFGIND=NOT_CFG,PHYCELLID={SecondCell.PCI},TAC={track};\r\n"; + _ = SendRead(comwb); + + var relation = SendRead($"ADD EUTRANINTRAFREQNCELL:LOCALCELLID={FirstCell},MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + + } + } + + + } + + } + //LTE-NR + else if (FirstCell.NetworkType != SecondCell.NetworkType && FirstCell.NetworkType == NetworkTypeEnum.LTE) + { + //异站先注册SecondCell 查询需要信息 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + var mcc = ""; + var mnc = ""; + var tac = ""; + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + //查询跟踪区域码 + var tarckdata = SendRead("LST CNOPERATORTA:;\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + tac = tarckinfo[9][2].ToString(); + } + else + { + tac = tarckinfo[9][2].ToString(); + } + } + //切服务网元 + var CGPOMUser = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUTser = GetMatchCollections(CGPOMUser); + if (CGPOMUTser[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUTser[3][3]}."); + return Task.FromResult(-1); + } + //添加频点 + _ = SendRead($"ADD NRNFREQ:LOCALCELLID={FirstCell.CellId},DLARFCN={SecondCell.ssbFrequency},ULARFCNCONFIGIND=NOT_CFG;\r\n"); + //添加外部 + _ = SendRead($"ADD NREXTERNALCELL:MCC=\"{mcc}\",MNC=\"{mnc}\",GNODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId},DLARFCN={SecondCell.ssbFrequency},ULARFCNCONFIGIND=NOT_CFG,PHYCELLID={SecondCell.PCI},TAC={tac};\r\n"); + //添加邻区 + var relation = SendRead($"ADD NRNRELATIONSHIP:LOCALCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",GNODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + //NR-LTE + else if (FirstCell.NetworkType != SecondCell.NetworkType && FirstCell.NetworkType == NetworkTypeEnum.NR) + { + //异站先注册SecondCell 查询需要信息 + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return Task.FromResult(-1); + } + ////查询 运营商信息 + string mcc = ""; + string mnc = ""; + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + var track = ""; + //查询跟踪区域码 + var tarckdata = SendRead("LST CNOPERATORTA:;\r\n"); + var tarckinfo = GetMatchCollections(tarckdata); + if (tarckinfo[tarckinfo.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (tarckinfo[tarckinfo.Count - 6][2].ToString() == "1)") + { + track = tarckinfo[9][2].ToString(); + } + else + { + track = tarckinfo[9][2].ToString(); + } + } + //切服务网元 + var CGPOMUser = SendRead("REG NE:NAME=\"" + FirstCell.NetworkElementName + "\";\r\n"); + var CGPOMUTser = GetMatchCollections(CGPOMUser); + if (CGPOMUTser[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUTser[3][3]}."); + return Task.FromResult(-1); + } + //添加频点 + int resdic = keyValueBandwidthPairs[SecondCell.DlBandwidth]; + _ = SendRead($"ADD NRCELLEUTRANNFREQ:NRCELLID={FirstCell.CellId},DLEARFCN={SecondCell.ssbFrequency},MEASUREMENTBANDWIDTH=MBW{resdic};\r\n"); + //添加外部 + _ = SendRead($"ADD GNBEUTRAEXTERNALCELL:MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId},DLEARFCN={SecondCell.ssbFrequency},PHYSICALCELLID={SecondCell.PCI},TAC={track};\r\n"); + //添加邻区 + var relation = SendRead($"ADD NRCELLEUTRANRELATION:NRCELLID={FirstCell.CellId},MCC=\"{mcc}\",MNC=\"{mnc}\",ENODEBID={SecondCell.NodeBId},CELLID={SecondCell.CellId};\r\n"); + if (relation.Contains("执行成功")) + { + return Task.CompletedTask; + } + else + { + var res = GetMatchCollections(relation); + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:failed result:{res[3][3].ToString()}."); + } + } + + } + catch (Exception ex) + { + + //DeviceControlLogger.Logger.Error($"FirstCell:{FirstCell.Name},SecondCell:{SecondCell.Name} CreateRelations Exception:{ex.Message}."); + return Task.FromResult(-1); + } + return Task.CompletedTask; + } + public async Task DeleteRelations(Cell FirstCell, Cell SecondCell) + { + var rtn = 0; + FirstCell = CellList.FirstOrDefault(x => x.Name == FirstCell.Name); + SecondCell = CellList.FirstOrDefault(x => x.Name == SecondCell.Name); + try + { + if (FirstCell == null || SecondCell == null) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations FirstCell or SecondCell null."); + return 0; + } + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + SecondCell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"CreateRelations GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + string mcc = ""; + string mnc = ""; + var command = ""; + if (FirstCell.NetworkType == NetworkTypeEnum.NR) + { + var operatordata = SendRead("LST GNBOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[9][2].ToString(); + mnc = mat[10][2].ToString(); + } + else + { + mcc = mat[9][2].ToString(); + mnc = mat[9][3].ToString(); + } + } + command = "RMV NRCELLRELATION:NRCELLID=" + FirstCell.CellId + ",MCC=" + mcc + ",MNC=" + mnc + ",GNBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ";\r\n"; + } + if (FirstCell.NetworkType == NetworkTypeEnum.LTE) + { + var operatordata = SendRead("LST CNOPERATOR:;\r\n"); + var mat = GetMatchCollections(operatordata); + if (mat[mat.Count - 6][0].ToString() != "没有查到相应的结果") + { + if (mat[mat.Count - 6][2].ToString() == "1)") + { + mcc = mat[10][2].ToString(); + mnc = mat[11][2].ToString(); + + } + else + { + mcc = mat[9][3].ToString(); + mnc = mat[9][4].ToString(); + } + } + command = "RMV NRNRELATIONSHIP:LOCALCELLID=" + FirstCell.CellId + ",MCC=" + mcc + ",MNC=" + mnc + ",GNODEBID=" + SecondCell.NodeBId + ",CELLID=" + SecondCell.CellId + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"DeleteRelations failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations Exception:{ex.Message}."); + return -1; + } + } + + public async Task> GetCells() + { + List HuaweiCells = new List(); + try + { + //var _client = ConnectAndLogin(); + var list = SendRead("LST NEBYOMC:;\r\n");//查询网元信息//LST NE:; + var nelist = GetMatchCollections(list); + for (int i = 10; i < nelist.Count - 5; i++) + { + try + { + //使用 IP 地址注册网元 + //var CGPOMU=SendRead("REG NE:IP=\"" + nelist[i][2].ToString() + "\";\r\n"); + //使用名称注册网元 + var CGPOMU = SendRead("REG NE:NAME=\"" + nelist[i][1].ToString() + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"GetCells GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + continue; + } + //NRDU小区 + if (nelist[i][0].ToString() == "BTS59005GNE") + { + //查询GNB + var gnbdata = GetMatchCollections(SendRead("LST GNODEBFUNCTION:;\r\n"))[9][2].ToString(); + //查询NR DU小区静态参数 LST NRDUCELL:; + var datacell = SendRead("LST NRDUCELL:;\r\n"); + //var mat = GetMatchCollections(SendRead("LST NRDUCELL:;\r\n")); + var GNBOPERATOR = SendRead("LST GNBOPERATOR:OPERATORID=0;\r\n"); + string mccpattern = @"移动国家码\s*=\s*([^\s]+)"; + string mncpattern = @"移动网络码\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchmcc = Regex.Match(GNBOPERATOR, mccpattern); + Match matchmnc = Regex.Match(GNBOPERATOR, mncpattern); + var mcc = matchmcc.Groups[1].Value; + var mnc = matchmnc.Groups[1].Value; + if (!datacell.Contains("没有查到相应的结果")) + { + var spdatacell = datacell.Split("--- END\r\n\r\n"); + if (spdatacell.Length == 2 && spdatacell[0].Contains("(结果个数 = 1)")) + {//有且仅有一条数据 //一条数据返回数据格式跟多条数据格式不统一 单独处理 + var mat1 = GetMatchCollections(datacell); + var cell = new Cell(); + cell.NetworkType = NetworkTypeEnum.NR; + cell.NetworkElementName = nelist[i][1].ToString(); + cell.Name = gnbdata + "-" + mat1[7][3].ToString(); + //cell.Name = mat[8][3].ToString(); + //cell.Nokia_cellName = mat1[8][3].ToString(); + if (mat1[9][2].ToString().Contains("TDD")) + { + cell.MobileStandard = CellMobileStandardEnum.TDDLTE; + } + else if (mat1[9][2].ToString().Contains("FDD")) + { + cell.MobileStandard = CellMobileStandardEnum.FDDLTE; + } + else if (mat1[9][2].ToString().Contains("SUL")) + { + cell.MobileStandard = CellMobileStandardEnum.SUL; + } + else if (mat1[9][2].ToString().Contains("SDL")) + { + cell.MobileStandard = CellMobileStandardEnum.SDL; + } + else + { + cell.MobileStandard = CellMobileStandardEnum.NR; + } + cell.PCI =int.Parse(mat1[11][2].ToString()); + cell.CellId =int.Parse(mat1[7][3].ToString()) ; + cell.MoId = mat1[10][2].ToString(); + cell.ssbFrequency =mat1[14][2].ToString(); + cell.NodeBId =int.Parse(gnbdata); + cell.Freqband = mat1[12][2].ToString(); + cell.Status = (int)(mat1[26][2].ToString() == "解闭塞" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked); + cell.FactoryType = BaseStationTesterTypeEnum.Huawei; + cell.mcc = mcc; + cell.mnc = mnc; + HuaweiCells.Add(cell); + } + else + { + //多条可能分页可能不分页 + for (int m = 0; m < spdatacell.Length - 1; m++) + { + var mat1 = GetMatchCollections(spdatacell[m]); + var matches = Regex.Matches(spdatacell[m], @"\(结果个数 = (\d+)\)"); + var items = 0; + foreach (Match match in matches) + { + items = int.Parse(match.Groups[1].Value); + Console.WriteLine($"第{m}页,{items}条数据\r\n\r\n"); + } + for (int n = 9; n < 9 + items; n++) + { + var cell = new Cell(); + cell.NetworkType = NetworkTypeEnum.NR; + cell.NetworkElementName = nelist[i][1].ToString(); + cell.Name = gnbdata + "-" + mat1[n][0].ToString(); + //cell.Name = mat[j][1].ToString(); + //cell.Nokia_cellName = mat1[n][1].ToString(); + if (mat1[n][2].ToString().Contains("TDD")) + { + cell.MobileStandard = CellMobileStandardEnum.TDDLTE; + } + else if (mat1[n][2].ToString().Contains("FDD")) + { + cell.MobileStandard = CellMobileStandardEnum.FDDLTE; + } + else if (mat1[n][2].ToString().Contains("SUL")) + { + cell.MobileStandard = CellMobileStandardEnum.SUL; + } + else if (mat1[n][2].ToString().Contains("SDL")) + { + cell.MobileStandard = CellMobileStandardEnum.SDL; + } + else + { + cell.MobileStandard = CellMobileStandardEnum.NR; + } + cell.PCI =int.Parse(mat1[n][4].ToString()) ; + cell.CellId =int.Parse(mat1[n][0].ToString()) ; + cell.MoId = mat1[n][3].ToString(); + cell.ssbFrequency =mat1[n][7].ToString(); + cell.NodeBId = int.Parse(gnbdata); + cell.Freqband = mat1[n][5].ToString(); + cell.Status = (int)(mat1[n][19].ToString() == "解闭塞" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked); + cell.FactoryType = BaseStationTesterTypeEnum.Huawei; + cell.mcc = mcc; + cell.mnc = mnc; + //cell.HBTEInitialValues + //cell.AttenuatorMapping + HuaweiCells.Add(cell); + } + } + } + + } + } + //LTE小区 + else if (nelist[i][0].ToString() == "eNodeBNE") + { + //查询eNB + var enbdata = GetMatchCollections(SendRead("LST ENODEBFUNCTION:;\r\n"))[9][2].ToString(); + //查询NR DU小区静态参数 LST NRDUCELL:; + var datacell = SendRead("LST CELL:;\r\n"); + var CNOPERATORID = SendRead("LST CNOPERATOR:CNOPERATORID = 0;\r\n"); + string mccpattern = @"移动国家码\s*=\s*([^\s]+)"; + string mncpattern = @"移动网络码\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchmcc = Regex.Match(CNOPERATORID, mccpattern); + Match matchmnc = Regex.Match(CNOPERATORID, mncpattern); + var mcc = matchmcc.Groups[1].Value; + var mnc = matchmnc.Groups[1].Value; + // var mat = GetMatchCollections(datacell); + if (!datacell.Contains("没有查到相应的结果")) + { + var spdatacell = datacell.Split("--- END\r\n\r\n"); + if (spdatacell.Length == 2 && spdatacell[0].Contains("(结果个数 = 1)")) + {//有且仅有一条数据 + var mat1 = GetMatchCollections(datacell); + var cell = new Cell(); + cell.NetworkType = NetworkTypeEnum.LTE; + //一条数据返回数据格式跟多条数据格式不统一 单独处理 + + //放网元名 + cell.NetworkElementName = nelist[i][1].ToString(); + cell.Name = enbdata + "-" + mat1[7][2].ToString(); + //cell.Name = mat[8][2].ToString(); + //cell.Nokia_cellName = mat1[8][2].ToString(); + if (mat1[26][2].ToString().Contains("TDD")) + { + cell.MobileStandard = CellMobileStandardEnum.TDDLTE; + } + else if (mat1[26][2].ToString().Contains("FDD")) + { + cell.MobileStandard = CellMobileStandardEnum.FDDLTE; + } + else + { + cell.MobileStandard = CellMobileStandardEnum.LTE; + + } + cell.PCI =int.Parse(mat1[21][2].ToString()); + cell.CellId =int.Parse(mat1[7][2].ToString()); + cell.MoId = mat1[20][2].ToString(); + cell.ssbFrequency =mat1[17][2].ToString(); + cell.NodeBId =int.Parse(enbdata); + cell.DlBandwidth = mat1[19][2].ToString(); + cell.Freqband = mat1[14][2].ToString();// + cell.Status = (int)(mat1[24][2].ToString() == "解闭塞" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked); + cell.FactoryType = BaseStationTesterTypeEnum.Huawei; + cell.mcc = mcc; + cell.mnc = mnc; + //cell.HBTEInitialValues + //cell.AttenuatorMapping + HuaweiCells.Add(cell); + } + else + {//多条可能分页可能不分页 + for (int m = 0; m < spdatacell.Length - 1; m++) + { + var mat1 = GetMatchCollections(spdatacell[m]); + var matches = Regex.Matches(spdatacell[m], @"\(结果个数 = (\d+)\)"); + var items = 0; + foreach (Match match in matches) + { + items = int.Parse(match.Groups[1].Value); + Console.WriteLine($"第{m}页,{items}条数据\r\n\r\n"); + } + for (int n = 9; n < 9 + items; n++) + { + var cell = new Cell(); + cell.NetworkType = NetworkTypeEnum.LTE; + //放网元名 修改时候需要注册连接 + cell.NetworkElementName = nelist[i][1].ToString(); + cell.Name = enbdata + "-" + mat1[n][0].ToString(); + //cell.Name = mat[j][1].ToString(); + //cell.Nokia_cellName = mat1[n][1].ToString(); + if (mat1[n][19].ToString().Contains("TDD")) + { + cell.MobileStandard = CellMobileStandardEnum.TDDLTE; + } + else if (mat1[n][19].ToString().Contains("FDD")) + { + cell.MobileStandard = CellMobileStandardEnum.FDDLTE; + } + else + { + cell.MobileStandard = CellMobileStandardEnum.LTE; + } + cell.PCI =int.Parse(mat1[n][14].ToString()); + cell.CellId =int.Parse(mat1[n][0].ToString()) ; + cell.MoId = mat1[n][13].ToString(); + cell.ssbFrequency =mat1[n][10].ToString() ; + cell.NodeBId =int.Parse(enbdata); + cell.DlBandwidth = mat1[n][12].ToString();//添加邻区频点测量带宽用 + cell.Freqband = mat1[n][7].ToString();//添加邻区频点测量带宽用 + cell.Status = (int)(mat1[n][17].ToString() == "解闭塞" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked); + cell.FactoryType = BaseStationTesterTypeEnum.Huawei; + cell.mcc = mcc; + cell.mnc = mnc; + //cell.HBTEInitialValues + //cell.AttenuatorMapping + HuaweiCells.Add(cell); + } + } + } + } + } + else + { + //2g/3g + } + } + catch (Exception e) + { + Console.WriteLine("异常网元:" + nelist[i][1].ToString() + e.Message); + } + } + CellList = HuaweiCells; + return HuaweiCells; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"GetCells getBtsInformation failed result:{ex.Message}."); + return null; + } + } + //ZTE + + public Task ModifyCellResel(Cell cell, int cellReselectionPriority) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"ModifyCellResel GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",CELLRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",CELLRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"ModifyCellResel failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return Task.FromResult(rtn); + } + catch (Exception ex) + { + rtn = GetErrorCode(10); + //DeviceControlLogger.Logger.Info($"ModifyCellResel Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + + } + //ZTE + public Task ModifyExternalNRCellCU(Cell cell, Cell relationCell, string nRPCI) + { + return Task.FromResult(0); + } + + public async Task ModifyInactiveParameter(Cell cell, int inactiveTimer) + { + string QCI = ""; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"ModifyInactiveParameter GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + } + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var qcilist = SendRead($"LST NRDUCELLQCIBEARER:NRDUCELLID={cell.CellId};\r\n"); + string pattern = @"\(结果个数 = (\d+)\)"; + MatchCollection matches = Regex.Matches(qcilist, pattern); + var info = GetMatchCollections(qcilist); + int num = 0; + for (int j = 0; j < matches.Count; j++) + { + if (j == 0) + { + num = num + 9; + } + else + { + num = num + 9 + 7; + } + string resultNumber = matches[j].Groups[1].Value; + for (int i = 0; i < int.Parse(resultNumber); i++) + { + var com = "MOD NRDUCELLQCIBEARER:NRDUCELLID=" + cell.CellId + ",QCI=" + info[num + i][1] + ",UEINACTIVITYTIMER=" + inactiveTimer + ";\r\n"; + SendRead(com); + } + num = num + int.Parse(resultNumber); + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var qcilist = SendRead($"LST QCIPARA:;\r\n"); + string pattern = @"\(结果个数 = (\d+)\)"; + // 执行匹配 + MatchCollection matches = Regex.Matches(qcilist, pattern); + var info = GetMatchCollections(qcilist); + int num = 0; + for (int j = 0; j < matches.Count; j++) + { + if (j == 0) + { + num = num + 9; + } + else + { + num = num + 9 + 7; + } + string resultNumber = matches[j].Groups[1].Value; + for (int i = 0; i < int.Parse(resultNumber); i++) + { + var com = "MOD QCIPARA:QCI=" + info[num + i][0] + ",UEINACTIVITYTIMERDYNDRXQCI=" + inactiveTimer + ";\r\n"; + SendRead(com); + } + num = num + int.Parse(resultNumber); + } + } + + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"ModifyInactiveParameter failed result:{ex.Message}."); + return rtn; + } + + return 0; + } + + public async Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"ModifyIntraFReselection GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",NONINTRAFREQMEASRSRPTHLD=" + sIntraSearchP + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SNONINTRASEARCHCFGIND=CFG,SNONINTRASEARCH=" + sIntraSearchP + ";\r\n"; + } + var res = SendRead(command); + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(12); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyIntraFReselection Exception:{ex.Message}."); + return rtn; + } + } + + public async Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1) + { + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetA1Threshold failed result:{CGPOMUT[3][3].ToString()}."); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + //INTERRATHOA1RSRPTHLD=-111(-156到-31),INTERRATHOA1A2HYST=2(0到30); + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERRATHOA1RSRPTHLD=" + rsrpThresholdA1 + ",INTERRATHOA1A2HYST=" + hysteresisA1 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + //INTERRATHOA1RSRPTHLD=-111(-156到-31),INTERRATHOA1A2HYST=2(0到30); + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERRATHOA1A2HYST=" + hysteresisA1 + ",INTERRATHOA1THDRSRP=" + rsrpThresholdA1 + ";\r\n"; + } + var res = SendRead(command); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA1Threshold {cell.Name} Exception:{ex.Message}."); + } + + + + + + } + + public async Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2) + { + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetA2Threshold failed result:{CGPOMUT[3][3].ToString()}."); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + //默认值INTERRATHOA2RSRPTHLD=-115(-156到-31),INTERRATHOA1A2HYST=2(0到30); + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERRATHOA2RSRPTHLD=" + rsrpThresholdA2 + ",INTERRATHOA1A2HYST=" + hysteresisA2 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + //INTERRATHOA1RSRPTHLD=-115(-140到-43),INTERRATHOA1A2HYST=2(0到30); + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERRATHOA1A2HYST=" + hysteresisA2 + ",INTERRATHOA2THDRSRP=" + rsrpThresholdA2 + ";"; + } + var res = SendRead(command); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA2Threshold {cell.Name} Exception:{ex.Message}."); + } + + } + + //同频切换的A3偏置 //同频切换的A3幅度迟滞 + public async Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3) + { + var rtn = 0; + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetA3Threshold failed result:{CGPOMUT[3][3].ToString()}."); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST NRCELLINTRAFHOMEAGRP:NRCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"同频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + command = "MOD NRCELLINTRAFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTRAFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTRAFREQHOA3OFFSET=" + eventOffset + ",INTRAFREQHOA3HYST=" + hysteresisA3 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST INTRAFREQHOGROUP:LOCALCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"同频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + command = "MOD INTRAFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTRAFREQHOGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTRAFREQHOA3HYST=" + hysteresisA3 + ",INTRAFREQHOA3OFFSET=" + eventOffset + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetA3Threshold failed result:{reslist[reslist.Count - 7][3]}."); + + } + + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA3Threshold {cell.Name} Exception:{ex.Message}."); + } + + } + + //华为不支持基于覆盖的A4事件,可使用A5替代,即将A5的门限1设置非常高的值也就等效变成了A4 + public Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + return Task.CompletedTask; + } + + public async Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetA5Threshold failed result:{CGPOMUT[3][3]}."); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERFREQA4A5HYST=" + hysteresisA5 + ",COVINTERFREQA5RSRPTHLD1=" + rsrpThreshold + ",COVINTERFREQA5RSRPTHLD2=" + A5Thrd1Rsrp + ";\r\n"; + + } + //COVINTERFREQA5RSRPTHLD1 -156~-31(-106) COVINTERFREQA5RSRPTHLD2 -156~-31(-110) INTERFREQA4A5HYST 2 + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTRAFREQHOMEASGROUPID + ",InterFreqHoA4ThdRsrp=" + rsrpThreshold + ",InterFreqHoA5Thd1Rsrp=" + A5Thrd1Rsrp + ";INTERFREQHOA4HYST=" + hysteresisA5 + "\r\n"; + + } + //INTERFREQHOA1THDRSRP -140~-43(-105) INTERFREQHOA2THDRSRP-140~-43( -109) INTERFREQHOA4HYST 2 + } + var res = SendRead(command); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA5Threshold {cell.Name} Exception:{ex.Message}."); + } + } + + public async Task SetB1Threshold(Cell cell, int value1) + { + // 测量参数组标识 + var NRHOPARAMGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetB1Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"E-UTRAN切换至NR的切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + NRHOPARAMGROUPID = match.Groups[1].Value; + } + //-105 + command = "MOD INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ",NRHOPARAMGROUPID=" + NRHOPARAMGROUPID + ",COVBASEDNRB1RSRPTHLD=" + value1 + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetB1Threshold failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($" SetB1Threshold Exception:{ex.Message}."); + return rtn; + } + return 0; + } + + public async Task SetB2Threshold(Cell cell, int value1, int value2) + { + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = "0"; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetB2Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + var command = ""; + var command2 = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + {//-115 + var ret = SendRead("LST NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ";\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + } + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",COVHOTOEUTRANB2RSRPTHLD1=" + value1 + ";\r\n"; + //-111 + command2 = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTRAFREQHOMEASGROUPID + ",COVBASEDHOB1RSRPTHLD=" + value2 + ";\r\n"; + } + var res = SendRead(command + command2); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetB2Threshold failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($" SetB2Threshold Exception:{ex.Message}."); + return rtn; + } + return 0; + } + + public async Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCarrierPCI GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改带宽时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M,DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M,DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M,DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M;\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",ULBANDWIDTH=CELL_BW_N" + (int)(BandWidth * 5) + ",DLBANDWIDTH=CELL_BW_N" + (int)(BandWidthUl * 5) + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetBandwidth failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($" SetBandwidth Exception:{ex.Message}."); + return rtn; + } + } + /// + /// + /// + /// + /// + /// + /// + public async Task SetCarrierFrequency(Cell cell, string Frequency, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCarrierFrequency GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + var command = ""; + + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + Frequency + ",ULNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + Frequency + ",ULNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + Frequency + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + Frequency + ",ULEARFCNCFGIND=CFG,ULEARFCN=" + Frequency + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCarrierPCI failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequency Exception:{ex.Message}."); + return rtn; + } + } + + public async Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return -1; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCarrierFrequency GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return -1; + } + var command = ""; + + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (earfcnUL == "-1") + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + earfcnDL + ";\r\n"; + } + else + { + + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + earfcnDL + ",ULEARFCNCFGIND=CFG,ULEARFCN=" + earfcnUL + ";\r\n"; + } + + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCarrierFrequency failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequency Exception:{ex.Message}."); + return rtn; + } + } + + public async Task SetCarrierPCI(Cell cell, string CarrierPCI, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + int rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCarrierPCI GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return 0; + } + var command = ""; + + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改pci时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改pci + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",PHYCELLID=" + CarrierPCI + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCarrierPCI failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierPCI Exception:{ex.Message}."); + return rtn; + } + } + public Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + int rtn = 0; + try + { + for (int i = 0; i < cellPcis.Count; i++) + { + SetCarrierPCI(cellPcis[i].Item1, cellPcis[i].Item2, true); + } + return Task.FromResult(rtn); + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI cellPcis Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + //ZTE + public Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + return Task.FromResult(0); + } + + public Task SetCellSelection(Cell cell, double LevelValue) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCellSelection GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",MINIMUMRXLEVEL=" + LevelValue + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",QRXLEVMIN=" + LevelValue + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCellSelection failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return Task.FromResult(rtn); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + + public async Task SetCellState(Cell cell, bool state) + { + var rtn = 0; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + try + { + if (cell.FactoryType == BaseStationTesterTypeEnum.Huawei) + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCellState GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + if (state) + { + command = "BLK NRDUCELL:NRDUCELLID=" + cell.CellId + ",CELLADMINSTATE=CELL_HIGH_BLOCK;\r\n"; + } + else + { + command = "UBL NRDUCELL:NRDUCELLID=" + cell.CellId + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (state) + { + command = "BLK CELL:LOCALCELLID=" + cell.CellId + ",CELLADMINSTATE=CELL_HIGH_BLOCK;\r\n"; + } + else + { + command = "UBL CELL:LOCALCELLID=" + cell.CellId + ";\r\n"; + } + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCellState failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(15); + //DeviceControlLogger.Logger.Info($"SetCellState {cell.Name} Exception:{ex.Message}."); + return rtn; + } + } + public int SetCoFrequencyMeasurementStartUpThreshold(string cellName, double value) + { + var cell = CellList.Where(x => x.Name == cellName).FirstOrDefault(); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCoFrequencyMeasurementStartUpThreshold GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",INTRAFREQMEASSTARTTHLD=" + value + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SINTRASEARCHQ=" + value + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetCoFrequencyMeasurementStartUpThreshold failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection Exception:{ex.Message}."); + return -1; + } + } + public int SetMinAccessLevel(string cellName, double level) + { + Cell cell = new Cell(); + cell = CellList.FirstOrDefault(x => x.Name == cellName); + var rtn = 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCellSelection GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}."); + + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",MINIMUMRXLEVEL=" + level + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",QRXLEVMIN=" + level + ";\r\n"; + } + var res = SendRead(command); + var reslist = GetMatchCollections(res); + if (!res.Contains("执行成功")) + { + //DeviceControlLogger.Logger.Error($"SetMinAccessLevel failed result:{reslist[reslist.Count - 7][3]}."); + rtn = -1; + } + return rtn; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection Exception:{ex.Message}."); + return -1; + } + } + public int SetNeighborhoodRelations(string cellName1, string cellName2) + { + return _rtn; + } + public int SetReselectPriority(string cellName, int priority) + { + return _rtn; + } + #endregion + #region other + + /// + /// 获取终端异常代码 + /// + /// + /// + public int GetErrorCode(int errorCode) + { + int.TryParse(ErrorCodeHelper.GetDeviceErrorCode(DeviceTypeEnum.BaseStationTester, errorCode), out int code); + return code; + } + + public HuaweiBaseStationTester ConnectAndLogin() + { + return this; + } + + public string SendRead(string command) + { + //Console.WriteLine(command); + StringBuilder finalResult = new StringBuilder(); + int rtn = Read(command, out byte[] tempResult); + byte[] finalData = Algorithms.Decode(tempResult); + Encoding encoding = Encoding.GetEncoding("GBK"); + string response = encoding.GetString(finalData, 0, finalData.Length); + finalResult.Append(response); + int index = 0; + while ((!finalResult.ToString().EndsWith("--- END\r\n\r\n")) && index < 100)//解决因一次读不全导致解析出错的问题 + { + this.ReadOnly(out tempResult); + finalResult.Append(encoding.GetString(Algorithms.Decode(tempResult), 0, Algorithms.Decode(tempResult).Length)); + index++; + } + return finalResult.ToString(); + } + + public List GetMatchCollections(string data) + { + List matchCollections = new List(); + var strdata = data.Split("\r\n"); + string pattern = @"\S+"; // 非空白字符匹配一次或多次 + for (int i = 0; i < strdata.Length; i++) + { + MatchCollection matchgnb = Regex.Matches(strdata[i], pattern); + if (matchgnb != null) + { + matchCollections.Add(matchgnb); + } + } + return matchCollections; + } + + + + public static Dictionary keyValuePairs = new Dictionary() { + { "630000,630000","7783" } , + { "630004,630004","7783"} , + { "636668,636668","7853" } , + { "643332,643332", "7950" } , + { "180000,189000", "2361"} , + { "636666,636666", "7853" } , + { "389000,427000", "5336" } , + { "2052499,2052499", "22377" } , + { "143600,151600", "1916" } , + { "723340,723340", "8768" } , + { "513000,513000", "6312" } , + { "520002,520002", "6399"} , + { "506004,506004", "6324" } + }; + public static Dictionary keyValueBandwidthPairs = new Dictionary() { + {"1.4M",6 },{"3M",15 },{"5M",25 },{"10M",50 },{"15M",75 },{"20M",100 } + + }; + public async Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + int respci = 0, resFreq = 0; + if (!string.IsNullOrEmpty(CarrierPCI)) + { + respci = SetCarrierPCIAndNeigh(cell, CarrierPCI, cells); + } + if (!string.IsNullOrEmpty(earfcnUL) && !string.IsNullOrEmpty(earfcnDL)) + { + resFreq = SetCarrierFreqAndNeigh(cell, earfcnDL, earfcnUL, cells); + } + return respci + resFreq; + } + public int SetCarrierPCIAndNeigh(Cell cell, string CarrierPCI, List cells) + { + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCarrierPCI GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改pci时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改pci + } + _ = SendRead(command); + foreach (var item in cells) + { + _ = SendRead("REG NE:NAME=\"" + item.NetworkElementName + "\";\r\n"); + if (item.NetworkType == NetworkTypeEnum.NR)//NR-NR + { + _ = SendRead($"MOD NREXTERNALNCELL:MCC=\"{cell.mnc}\",MNC=\"{cell.mnc}\",GNBID={cell.NodeBId},CELLID={cell.CellId},PHYSICALCELLID={CarrierPCI};\r\n"); + } + if (item.NetworkType == NetworkTypeEnum.LTE)//LTE-NR + { + _ = SendRead($"MOD NREXTERNALCELL:MCC=\"{cell.mnc}\",MNC=\"{cell.mnc}\",GNODEBID={cell.NodeBId},CELLID={cell.CellId},PHYCELLID={CarrierPCI};\r\n"); + } + } + return 0; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",PHYCELLID=" + CarrierPCI + ";\r\n"; + _ = SendRead(command); + foreach (var item in cells) + { + _ = SendRead("REG NE:NAME=\"" + item.NetworkElementName + "\";\r\n"); + if (item.NetworkType == NetworkTypeEnum.NR)//LTE-LTE + { + _ = SendRead($"MOD EUTRANEXTERNALCELL:MCC=\"{cell.mcc}\",MNC=\"{cell.mnc}\",ENODEBID={cell.NodeBId},CELLID={cell.CellId},PHYCELLID={CarrierPCI};\r\n"); + } + if (item.NetworkType == NetworkTypeEnum.LTE) //NR - LTE + { + _ = SendRead($"MOD GNBEUTRAEXTERNALCELL:MCC=\"1\",MNC=\"2\",ENODEBID=3,CELLID=4,PHYSICALCELLID=5;\r\n"); + } + } + return 0; + } + else + { + //其他2/3g + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyCarrierPCI Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public int SetCarrierFreqAndNeigh(Cell cell, string earfcnDL, string earfcnUL, List cells) + { + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + //DeviceControlLogger.Logger.Error($"SetCarrierFrequency GetCGPOMU failed result:{CGPOMUT[3][3]}."); + return -1; + } + var command = ""; + var ssbfreqpos = keyValuePairs[$"{earfcnUL},{earfcnDL}"]; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ",SSBFREQPOS=" + ssbfreqpos + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ",SSBFREQPOS=" + ssbfreqpos + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + _ = SendRead(command); + foreach (var item in cells) + { + _ = SendRead("REG NE:NAME=\"" + item.NetworkElementName + "\";\r\n"); + if (item.NetworkType == NetworkTypeEnum.NR)//NR-NR + { + _ = SendRead($"ADD NRCELLFREQRELATION:NRCELLID={item.CellId},SSBFREQPOS={ssbfreqpos},FREQUENCYBAND={cell.Freqband};\r\n"); + _ = SendRead($"MOD NREXTERNALNCELL:MCC=\"{cell.mcc}\",MNC=\"{cell.mnc}\",GNBID={cell.NodeBId},CELLID={cell.CellId},SSBFREQPOS={ssbfreqpos};\r\n"); + } + if (item.NetworkType == NetworkTypeEnum.LTE)//LTE-NR + { + _ = SendRead($"ADD NRNFREQ:LOCALCELLID={item.CellId},DLARFCN={earfcnDL},ULARFCNCONFIGIND=NOT_CFG;\r\n"); + _ = SendRead($"MOD NREXTERNALCELL:MCC=\"{cell.mcc}\",MNC=\"{cell.mnc}\",GNODEBID={cell.NodeBId},CELLID={cell.CellId},DLARFCN={earfcnDL};\r\n"); + } + } + return 0; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + earfcnDL + ";\r\n"; + _ = SendRead(command); + foreach (var item in cells) + { + _ = SendRead("REG NE:NAME=\"" + item.NetworkElementName + "\";\r\n"); + if (item.NetworkType == NetworkTypeEnum.NR)//NR-LTE + { + int res = keyValueBandwidthPairs[cell.DlBandwidth]; + _ = SendRead($"ADD NRCELLEUTRANNFREQ:NRCELLID={item.CellId},DLEARFCN={earfcnDL},MEASUREMENTBANDWIDTH=MBW{res};\r\n"); + _ = SendRead($"MOD GNBEUTRAEXTERNALCELL:MCC=\"{cell.mcc}\",MNC=\"{cell.mnc}\",ENODEBID={cell.NodeBId},CELLID={cell.CellId},DLEARFCN={earfcnDL};\r\n"); + } + if (item.NetworkType == NetworkTypeEnum.LTE)//LTE-LTE + { + int res = keyValueBandwidthPairs[cell.DlBandwidth]; + _ = SendRead($"ADD EUTRANINTERNFREQ:LOCALCELLID={item.CellId},DLEARFCN={earfcnDL},ULEARFCNCFGIND=NOT_CFG,CELLRESELPRIORITYCFGIND=NOT_CFG,SPEEDDEPENDSPCFGIND=NOT_CFG,MEASBANDWIDTH={res},PMAXCFGIND=NOT_CFG,QQUALMINCFGIND=NOT_CFG,INTERFREQCIOADJLIMITCFGIND=NOT_CFG;\r\n"); + _ = SendRead($"MOD EUTRANEXTERNALCELL:MCC=\"{cell.mcc}\",MNC=\"{cell.mnc}\",ENODEBID={cell.NodeBId},CELLID={cell.CellId},DLEARFCN={earfcnDL};\r\n"); + } + } + return 0; + } + else + { + //其他2 3g + return 0; + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequency Exception:{ex.Message}."); + return -1; + } + } + #endregion + + #region 其他方法 + /// + /// 双工方式 + /// + /// + /// + /// + /// + public async Task ModifyDuplexMode(Cell cell, string mode) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDuplexMode GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELL:NRCELLID=" + cell.CellId + ",DUPLEXMODE=" + mode + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",FDDTDDIND=" + mode + ";\r\n"; + }//tdd需要同时配置subframeAssignment和specialSubframePattern参数 + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDuplexMode execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDuplexMode failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 移动国家码 + /// + /// + /// + /// + /// + /// + public async Task ModifyMCC(Cell cell, string data) + { + var OperatorId = ""; + var appid = ""; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMCC GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST GNBOPERATOR:;\r\n"); + string pattern = @"运营商标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + OperatorId = match.Groups[1].Value; + command = "MOD GNBOPERATOR:OPERATORID=" + OperatorId + ",MCC=\"" + data + "\";\r\n"; + } + //查引用的appid + var gnbinfo = SendRead("LST GNODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(gnbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST CNOPERATOR:;\r\n"); + string pattern = @"运营商索引值\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + OperatorId = match.Groups[1].Value; + command = "MOD CNOPERATOR:CNOPERATORID=" + OperatorId + ",MCC=\"" + data + "\";\r\n"; + } + + //查引用的appid + var enbinfo = SendRead("LST ENODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(enbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMCC execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + // 根据appid复位 + var rst = SendRead($"RST APP:AID={appid};\r\n"); + var rstinfo = GetMatchCollections(rst); + if (rstinfo[3][2].ToString() != "0") + { + // Logger.WriteLog($" RST APP execute failed result:{res}.", IsRecordlog); + return -1; + } + while (true) + { + var appstate = SendRead("DSP APP:;\r\n"); + var appinfo = GetMatchCollections(appstate); + var status = ""; + for (int i = 9; i < appinfo.Count - 6; i++) + { + if (appinfo[i][0].ToString() == appid) + { + status = appinfo[i][2].ToString(); + } + } + if (status == "可用") + { + break; + } + Thread.Sleep(1000); + + } + Thread.Sleep(2000); + return 0; + } + + + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMCC failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 移动网络码 + /// + /// + /// + /// + /// + /// + public async Task ModifyMNC(Cell cell, string data) + { + var appid = ""; + if (data.Length == 1) + { + data = "0" + data; + } + var OperatorId = ""; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMNC GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST GNBOPERATOR:;\r\n"); + string pattern = @"运营商标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + OperatorId = match.Groups[1].Value; + command = "MOD GNBOPERATOR:OPERATORID=" + OperatorId + ",MNC=\"" + data + "\";\r\n"; + } + //查引用的appid + var gnbinfo = SendRead("LST GNODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(gnbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST CNOPERATOR:;\r\n"); + string pattern = @"运营商索引值\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + OperatorId = match.Groups[1].Value; + command = "MOD CNOPERATOR:CNOPERATORID=" + OperatorId + ",MNC=\"" + data + "\";\r\n"; + } + //查引用的appid + var enbinfo = SendRead("LST ENODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(enbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMNC execute failed result:{res}.", IsRecordlog); + return -1; + } + // 根据appid复位 + var rst = SendRead($"RST APP:AID={appid};\r\n"); + var rstinfo = GetMatchCollections(rst); + if (rstinfo[3][2].ToString() != "0") + { + // Logger.WriteLog($" RST APP execute failed result:{res}.", IsRecordlog); + return -1; + } + while (true) + { + var appstate = SendRead("DSP APP:;\r\n"); + var appinfo = GetMatchCollections(appstate); + var status = ""; + for (int i = 9; i < appinfo.Count - 6; i++) + { + if (appinfo[i][0].ToString() == appid) + { + status = appinfo[i][2].ToString(); + } + } + if (status == "可用") + { + break; + } + Thread.Sleep(1000); + + } + Thread.Sleep(2000); + return 0; + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMNC failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 修改SSB频域位置 (SSBFREQPOS) + /// + /// + /// + /// + /// + public async Task ModifyGSCN(Cell cell, string GSCN) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGSCN GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",SSBFREQPOS=" + GSCN + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",SSBFREQPOS=" + GSCN + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",SSBFREQPOS=" + GSCN + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGSCN execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyGSCN Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 跟踪区域码 + /// + /// + /// + /// + /// + /// + public async Task ModifyTac(Cell cell, string Tac) + { + var TacID = ""; + if (string.IsNullOrEmpty(cell.NetworkElementName)) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + } + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTac GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead("LST GNBTRACKINGAREA:;\r\n"); + string pattern = @"跟踪区域标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + TacID = match.Groups[1].Value; + command = "MOD GNBTRACKINGAREA:TRACKINGAREAID=" + TacID + ",TAC=" + Tac + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var ret = SendRead("LST CNOPERATORTA:;\r\n"); + string pattern = @"本地跟踪区域标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + TacID = match.Groups[1].Value; + command = "MOD CNOPERATORTA:TRACKINGAREAID=" + TacID + ",TAC=" + Tac + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTac execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTac failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 基站ID + /// + /// + /// + /// + /// + public async Task ModifygNodeBId(Cell cell, string gNodeBId) + { + var appid = ""; + if (string.IsNullOrEmpty(cell.NetworkElementName)) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + } + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifygNodeBId GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNODEBFUNCTION:GNBID=" + gNodeBId + ";\r\n"; + //查引用的appid + var gnbinfo = SendRead("LST GNODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(gnbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifygNodeBId execute failed result:{res}.", IsRecordlog); + return -1; + } + // 根据appid复位 + var rst = SendRead($"RST APP:AID={appid};\r\n"); + var rstinfo = GetMatchCollections(rst); + if (rstinfo[3][2].ToString() != "0") + { + // Logger.WriteLog($" RST APP execute failed result:{res}.", IsRecordlog); + return -1; + } + while (true) + { + var appstate = SendRead("DSP APP:;\r\n"); + var appinfo = GetMatchCollections(appstate); + var status = ""; + for (int i = 9; i < appinfo.Count - 6; i++) + { + if (appinfo[i][0].ToString() == appid) + { + status = appinfo[i][2].ToString(); + } + } + if (status == "可用") + { + break; + } + Thread.Sleep(1000); + + } + Thread.Sleep(2000); + return 0; + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifygNodeBId failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB功能名称 + /// + /// + /// + /// + /// + public async Task Modifygnodebname(Cell cell, string gnodebname) + { + if (string.IsNullOrEmpty(cell.NetworkElementName)) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + } + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"Modifygnodebname GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNODEBFUNCTION:GNODEBFUNCTIONNAME=\"" + gnodebname + "\";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"Modifygnodebname execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + + + } + catch (Exception ex) + { + // Logger.WriteLog($"Modifygnodebname failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// gNBID长度 + /// + /// + /// + /// + /// + public async Task ModifygNBIdLength(Cell cell, string gNBIdLength) + { + var appid = ""; + if (string.IsNullOrEmpty(cell.NetworkElementName)) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + } + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifygNBIdLength GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNODEBFUNCTION:GNBID=" + gNBIdLength + ";\r\n"; + //查引用的appid + var gnbinfo = SendRead("LST GNODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(gnbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifygNBIdLength execute failed result:{res}.", IsRecordlog); + return -1; + } + // 根据appid复位 + var rst = SendRead($"RST APP:AID={appid};\r\n"); + var rstinfo = GetMatchCollections(rst); + if (rstinfo[3][2].ToString() != "0") + { + // Logger.WriteLog($" RST APP execute failed result:{res}.", IsRecordlog); + return -1; + } + while (true) + { + var appstate = SendRead("DSP APP:;\r\n"); + var appinfo = GetMatchCollections(appstate); + var status = ""; + for (int i = 9; i < appinfo.Count - 6; i++) + { + if (appinfo[i][0].ToString() == appid) + { + status = appinfo[i][2].ToString(); + } + } + if (status == "可用") + { + break; + } + Thread.Sleep(1000); + + } + Thread.Sleep(2000); + return 0; + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifygNBIdLength failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 小区标识 + /// + /// + /// + /// + /// + public async Task ModifyCellId(Cell cell, string cellId) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellId GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",CELLID=" + cellId + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellId execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellId failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 小区名称 + /// + /// + /// + /// + /// + public async Task ModifyCellName(Cell cell, string cellName) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellName GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = $"MOD NRDUCELL:NRDUCELLID={cell.CellId},NRDUCELLNAME=\"{cellName}\";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = $"MOD CELL:LOCALCELLID={cell.CellId},CELLNAME=\"{cellName}\";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellName execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellId failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 基站ID + /// + /// + /// + /// + /// + public async Task ModifyeNodeBId(Cell cell, string eNodeBId) + { + var appid = ""; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyeNodeBId GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD ENODEBFUNCTION:ENODEBID=" + eNodeBId + ";\r\n"; + //查引用的appid + var enbinfo = SendRead("LST ENODEBFUNCTION:;\r\n"); + string appflag = @"引用的应用标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchapp = Regex.Match(enbinfo, appflag); + if (matchapp.Success) + { + appid = matchapp.Groups[1].Value; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyeNodeBId execute failed result:{res}.", IsRecordlog); + return -1; + } + // 根据appid复位 + var rst = SendRead($"RST APP:AID={appid};\r\n"); + var rstinfo = GetMatchCollections(rst); + if (rstinfo[3][2].ToString() != "0") + { + // Logger.WriteLog($" RST APP execute failed result:{res}.", IsRecordlog); + return -1; + } + while (true) + { + var appstate = SendRead("DSP APP:;\r\n"); + var appinfo = GetMatchCollections(appstate); + var status = ""; + for (int i = 9; i < appinfo.Count - 6; i++) + { + if (appinfo[i][0].ToString() == appid) + { + status = appinfo[i][2].ToString(); + } + } + if (status == "可用") + { + break; + } + Thread.Sleep(1000); + + } + Thread.Sleep(2000); + return 0; + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyeNodeBId failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 基站ID + /// + /// + /// + /// + /// + public async Task ModifyeNodeBname(Cell cell, string eNodeBname) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyeNodeBname GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = $"MOD ENODEBFUNCTION:ENODEBFUNCTIONNAME=\"{eNodeBname}\";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyeNodeBname execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyeNodeBname failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 下行小区中心频点 + /// + /// + /// + /// + /// + public async Task ModifyDLcenterARFCNDL(Cell cell, string earfcnDL) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDLcenterARFCNDL GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + earfcnDL + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDLcenterARFCNDL execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyDLcenterARFCNDL Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行小区中心频点 + /// + /// + /// + /// + /// + public async Task ModifyULcenterARFCNDL(Cell cell, string earfcnUL, string ULEARFCNCFGIND = "NOT_CFG") + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyULcenterARFCNDL GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (ULEARFCNCFGIND == "CFG") + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",ULEARFCNCFGIND=CFG,ULEARFCN=" + earfcnUL + ";\r\n"; + } + else + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",ULEARFCNCFGIND=NOT_CFG;\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyULcenterARFCNDL execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyULcenterARFCNDL Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + ///// + ///// + ///// + ///// + ///// + ///// + ///// + ///// + //public async Task ModifySubframeAssignmentSpecialSubframePattern( Cell cell, string subframeAssignment, string specialSubframePattern) + //{ + // cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + // try + // { + // //var _client = ConnectAndLogin(); + // var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + // var CGPOMUT = GetMatchCollections(CGPOMU); + // if (CGPOMUT[3][2].ToString()!= "0") + // { + // // Logger.WriteLog($"ModifySubframeAssignmentSpecialSubframePattern GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + // return -1; + // } + // string command = ""; + // if (cell.NetworkType == NetworkTypeEnum.NR) + // { + // } + // else if (cell.NetworkType== NetworkTypeEnum.LTE) + // { + // if (cell.MobileStandard==CellMobileStandardEnum.TDDLTE) + // { + + // command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",FDDTDDIND=CELL_TDD,SUBFRAMEASSIGNMENT=" + subframeAssignment + ",SPECIALSUBFRAMEPATTERNS=" + specialSubframePattern + ";\r\n"; + // } + + // } + // var res = SendRead(command); + // var resinfo = GetMatchCollections(res); + // if (!res.Contains("RETCODE = 0")) + // { + // // Logger.WriteLog($"ModifySubframeAssignmentSpecialSubframePattern execute failed result:{res}.", IsRecordlog); + // return -1; + // } + // else + // { + // return 0; + // } + // } + // catch (Exception ex) + // { + // // Logger.WriteLog($"ModifySubframeAssignmentSpecialSubframePattern failed result:{ex}.", IsRecordlog); + // return -1; + // } + //} + /// + /// 特殊时隙配置 + /// + /// + /// + /// + /// + public async Task ModifySubframePattern(Cell cell, string specialSubframePattern) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySubframePattern GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + var subframeAssignment = "NULL"; + var ret = SendRead($"LST CELL:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"上下行子帧配比\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + specialSubframePattern = match.Groups[1].Value; + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",FDDTDDIND=CELL_TDD,SUBFRAMEASSIGNMENT=" + subframeAssignment + ",SPECIALSUBFRAMEPATTERNS=" + specialSubframePattern + ";\r\n"; + + } + } + else + { + // Logger.WriteLog($"This is TDD parameter,Not allowed to modify to FDD parameters", IsRecordlog); + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySubframePattern execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySubframePattern failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 上下行时隙配置 + /// + /// + /// + /// + /// + public async Task ModifySubframeAssignment(Cell cell, string subframeAssignment) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySubframeAssignment GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + var specialSubframePattern = "NULL"; + var ret = SendRead($"LST CELL:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"特殊子帧配比\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + specialSubframePattern = match.Groups[1].Value; + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",FDDTDDIND=CELL_TDD,SUBFRAMEASSIGNMENT=" + subframeAssignment + ",SPECIALSUBFRAMEPATTERNS=" + specialSubframePattern + ";\r\n"; + + } + } + else + { + // Logger.WriteLog($"This is TDD parameter,Not allowed to modify to FDD parameters", IsRecordlog); + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySubframeAssignment execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySubframeAssignment failed result:{ex}.", IsRecordlog); + return -1; + } + } + + /// + /// 5G频段 + /// + /// + /// + /// + /// + public async Task ModifyFreqBandIndicatorNR(Cell cell, string freqBandIndicatorNR) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyFreqBandIndicatorNR GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId + ",FREQUENCYBAND=N" + freqBandIndicatorNR + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyFreqBandIndicatorNR execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyFreqBandIndicatorNR failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// NR异频重选邻区band指示 + /// + /// + /// + /// + /// + public async Task ModifyNeighborFreqBandIndicatorNR(Cell cell, string freqBandIndicatorNR) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyAsyncFreqBandIndicatorNR GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var SSBFREQPOS = ""; + var ret = SendRead($"LST NRCELLFREQRELATION:NRCELLID={cell.CellId};\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + SSBFREQPOS = match.Groups[1].Value; + command = $"MOD NRCELLFREQRELATION:NRCELLID={cell.CellId},SSBFREQPOS={SSBFREQPOS},FREQUENCYBAND={freqBandIndicatorNR};\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyAsyncFreqBandIndicatorNR execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyAsyncFreqBandIndicatorNR failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// LTE频段 + /// + /// + /// + /// + /// + public async Task ModifyFreqBandIndicator(Cell cell, int freqBandIndicator) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyFreqBandIndicator GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",FREQBAND=" + freqBandIndicator + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyFreqBandIndicatorNR execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyFreqBandIndicatorNR failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 子载波间隔 + /// + /// + /// + /// + /// + public async Task ModifySubcarrierSpacing(Cell cell, string subcarrierSpacing) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySubcarrierSpacing GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // + var freqBandIndicatorNR = ""; + var ret = SendRead($"LST NRDUCELL:NRDUCELLID={cell.CellId};\r\n"); + string pattern = @"频带\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + freqBandIndicatorNR = match.Groups[1].Value; + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId + ",FREQUENCYBAND=" + freqBandIndicatorNR + ",SUBCARRIERSPACING=" + subcarrierSpacing + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySubcarrierSpacing execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySubcarrierSpacing failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// SSB子载波间隔 + /// + /// + /// + /// + /// + public async Task ModifySsbSubcarrierSpacing(Cell cell, string ssbSubcarrierSpacing) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacing GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // + var freqBandIndicatorNR = ""; + var ret = SendRead($"LST NRDUCELL:NRDUCELLID={cell.CellId};\r\n"); + string pattern = @"频带\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + freqBandIndicatorNR = match.Groups[1].Value; + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId + ",FREQUENCYBAND=" + freqBandIndicatorNR + ",SSBSUBCARRIERSPACING=" + ssbSubcarrierSpacing + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacing execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacing failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// PDSCH DMRS Type 1与Type 2自适应 + /// + /// + /// + /// + /// + public async Task ModifyDlDmrsConfigType(Cell cell, string dlDmrsConfigType) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifydlDmrsConfigType GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDSCH:NRDUCELLID=" + cell.CellId + ",DLDMRSCONFIGTYPE=" + dlDmrsConfigType + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifydlDmrsConfigType execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifydlDmrsConfigType failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// SRS时隙个数 + /// + /// + /// + /// + /// + public async Task ModifySrsSlotNum(Cell cell, string srsSlotNum) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySrsSlotNum GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLSRS:NRDUCELLID=" + cell.CellId + ",SRSSLOTNUM=" + srsSlotNum + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySrsSlotNum execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySrsSlotNum failed result:{ex}.", IsRecordlog); + return -1; + } + } + + /// + /// //NR异频重选邻区SCS + /// + /// + /// + /// + /// + /// + public async Task ModifySsbSubcarrierSpacingSCS(Cell cell, string ssbSubcarrierSpacing) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacingSCS GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var SSBFREQPOS = ""; + var ret = SendRead($"LST NRCELLFREQRELATION:NRCELLID={cell.CellId};\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + SSBFREQPOS = match.Groups[1].Value; + command = "MOD NRCELLFREQRELATION:NRCELLID=" + cell.CellId + ",SSBFREQPOS=" + SSBFREQPOS + ",SUBCARRIERSPACING=" + ssbSubcarrierSpacing + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacingSCS execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySsbSubcarrierSpacingSCS failed result:{ex}.", IsRecordlog); + return -1; + } + } /// + /// NR异频重选邻区下行频点 + /// + /// + /// + /// + /// + public async Task ModifyInterFreqCarrierFreqInfo(Cell cell, string DlArfcn) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInterFreqCarrierFreqInfo GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //无(基站侧配置为SSB频域位置,不直接配置SSB频点) + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "\r\n";// 跟localid绑定为唯一标识 不能修改 + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInterFreqCarrierFreqInfo execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInterFreqCarrierFreqInfo failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// NR小区重选偏置 + /// + /// + /// + /// + public async Task ModifyQOffsetFreq(Cell cell, string Qhyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyQOffsetFreq GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",CELLRESELHYSTERESIS=" + Qhyst + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",QHYST=" + Qhyst + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyQOffsetFreq execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyQOffsetFreq failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// NR-LTE切换邻区允许测量带宽 + /// + /// + /// + /// + public async Task ModifyAllowedMeasBandwidth(Cell cell, string allowedMeasBandwidth) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyAllowedMeasBandwidth GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",MEASUREMENTBANDWIDTH=" + allowedMeasBandwidth + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyAllowedMeasBandwidth execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyAllowedMeasBandwidth failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// NR-LTE切换邻区偏置 + /// + /// + /// + /// + public async Task ModifyEutraQOffsetRange(Cell cell, string eutraQOffsetRange) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyEutraQOffsetRange GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var ret = SendRead($"LST GNBEUTRAEXTERNALCELL:CELLID={cell.CellId};\r\n"); + string mccpattern = @"移动国家码\s*=\s*([^\s]+)"; + string mncpattern = @"移动网络码\s*=\s*([^\s]+)"; + string enbpattern = @"eNodeB标识\s*=\s*([^\s]+)"; + string cellidpattern = @"小区标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchmcc = Regex.Match(ret, mccpattern); + Match matchmnc = Regex.Match(ret, mncpattern); + Match matchenb = Regex.Match(ret, enbpattern); + Match matchcellid = Regex.Match(ret, cellidpattern); + if (matchmcc.Success && matchenb.Success && matchmnc.Success && matchcellid.Success) + { + + command = "MOD NRCELLEUTRANRELATION:NRCELLID=" + cell.CellId + ",MCC=\"" + matchmcc.Groups[1].Value + "\",MNC=\"" + matchmnc.Groups[1].Value + "\",ENODEBID=" + matchenb.Groups[1].Value + ",CELLID=" + matchcellid.Groups[1].Value + ",EUTRANCELLINDIVIDUALOFFSET=" + eutraQOffsetRange + ";\r\n"; + + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyEutraQOffsetRange execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyEutraQOffsetRange failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// E-UTRAN小区重选定时器时长 + /// + /// + /// + /// + /// + public async Task ModifyTreselectionEUTRA(Cell cell, string treselectionEUTRA) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTreselectionEUTRA GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",EUTRANCELLRESELTIMER=" + treselectionEUTRA + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESELTONR:LOCALCELLID=" + cell.CellId + ",NRCELLRESELECTIONTIMER=" + treselectionEUTRA + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTreselectionEUTRA execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTreselectionEUTRA failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 5_NR移动性管理 t-ReselectionNR NR小区重选定时器 + /// + /// + /// + /// + /// + public async Task ModifytReselectionNR(Cell cell, string tReselectionNR) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytReselectionNR GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",EUTRANCELLRESELTIMER=" + tReselectionNR + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytReselectionNR execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytReselectionNR failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// RRC连接响应定时器 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t300(Cell cell, string t300) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t300 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T300=" + t300 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",T300=" + t300 + "_T300;\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t300 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t300 failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// RRC重建响应定时器 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t301(Cell cell, string t301) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t301 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T301=" + t301 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",T301=" + t301 + "_T301;\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t301 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t301 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 定时器 T304 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t304(Cell cell, string t304) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t304 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T304=" + t304 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD RRCCONNSTATETIMER:T304FOREUTRAN=ms" + t304 + ",T304FORGERAN=" + t304 + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t304 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t304 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 定时器 T310 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t310(Cell cell, string t310) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t310 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T310=" + t310 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",T310=" + t310 + "_T310;\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t310 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t310 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 常量 N311 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t311(Cell cell, string t311) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t311 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T311=" + t311 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",T311=" + t311 + "_T311;\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t311 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t311 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// RRC连接恢复响应定时器 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_t319(Cell cell, string t319) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_t319 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",T319=" + t319 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + // + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_t319 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_t319 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 常量 N310 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_n310(Cell cell, string n310) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_n310 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",N310=" + n310 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",N310=" + n310 + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_n310 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_n310 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + /// + /// 常量 N311 + /// + /// + /// + /// + /// + public async Task ModifyUeTimer_n311(Cell cell, string n311) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeTimer_n311 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + string command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUETIMERCONST:NRDUCELLID=" + cell.CellId + ",n311=" + n311 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UETIMERCONST:LOCALCELLID=" + cell.CellId + ",n311=" + n311 + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeTimer_n311 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeTimer_n311 GetCGPOMU failed result:{ex}.", IsRecordlog); + return -1; + } + } + + + /// + /// NR服务小区重选优先级 + /// + /// + /// + /// + public async Task ModifyServerCellCellResel(Cell cell, int serverCellCellResel) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyServerCellCellResel GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",CELLRESELPRIORITY=" + serverCellCellResel + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQRESELPRIORITY=" + serverCellCellResel + ";\r\n"; + } + + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyServerCellCellResel execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyServerCellCellResel Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// NR异系统重选邻区PCI + /// + /// + /// + /// + /// + public async Task ModifyNeighborphysCellId(Cell cell, string physCellId) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyNeighborphysCellId GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // + var ret = SendRead($"LST GNBEUTRAEXTERNALCELL:CELLID={cell.CellId};\r\n"); + string mccpattern = @"移动国家码\s*=\s*([^\s]+)"; + string mncpattern = @"移动网络码\s*=\s*([^\s]+)"; + string enbpattern = @"基站标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchmcc = Regex.Match(ret, mccpattern); + Match matchmnc = Regex.Match(ret, mncpattern); + Match matchenb = Regex.Match(ret, enbpattern); + if (matchmcc.Success && matchenb.Success && matchmnc.Success) + { + command = @$"MOD GNBEUTRAEXTERNALCELL:MCC=""{matchmcc.Groups[1].Value}"",MNC=""{matchmnc.Groups[1].Value}"",ENODEBID={matchenb.Groups[1].Value},CELLID={cell.CellId},PHYSICALCELLID={physCellId};\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + // + var ret = SendRead($"LST NREXTERNALCELL:CELLID={cell.CellId};\r\n"); + string mccpattern = @"移动国家码\s*=\s*([^\s]+)"; + string mncpattern = @"移动网络码\s*=\s*([^\s]+)"; + string enbpattern = @"基站标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchmcc = Regex.Match(ret, mccpattern); + Match matchmnc = Regex.Match(ret, mncpattern); + Match matchenb = Regex.Match(ret, enbpattern); + if (matchmcc.Success && matchenb.Success && matchmnc.Success) + { + command = @$"MOD NREXTERNALCELL:MCC=""{matchmcc.Groups[1].Value}"",MNC=""{matchmnc.Groups[1].Value}"",GNODEBID={matchenb.Groups[1].Value},CELLID={cell.CellId},PHYCELLID={physCellId};\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyNeighborphysCellId execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyNeighborphysCellId Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + /// + /// NR异系统重选邻区优先级 + /// + /// + /// + /// + /// + /// + public async Task ModifyEutranFreqReselPriority(Cell cell, int cellReselectionPriority) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyEutranFreqReselPriority GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",CELLRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyEutranFreqReselPriority execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyEutranFreqReselPriority Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EUTRA邻区重选优先级 , 3_LTE to NR的重选 cellReselectionPriority NR频点重选优先级 + /// + /// + /// + /// + public async Task ModifyEUTRACellResel(Cell cell, int cellReselectionPriority) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyEUTRACellResel GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyEUTRACellResel execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyEUTRACellResel Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + ///// + ///// EUTRA邻区重选子优先级 , 3_LTE to NR的重选 NR频点重选子优先级 + ///// + ///// + ///// + ///// + //public async Task ModifyCellReselectionSubPriority( Cell cell, int cellReselectionSubPriority) + //{ + // cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + // + // try + // { + // //var _client = ConnectAndLogin(); + // var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + // var CGPOMUT = GetMatchCollections(CGPOMU); + // if (CGPOMUT[3][2].ToString()!= "0") + // { + // // Logger.WriteLog($"ModifyCellReselectionSubPriority GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + // return -1; + // } + // var command = ""; + // if (cell.NetworkType == NetworkTypeEnum.NR) + // { + // string DLEARFCN = ""; + // var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + // string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // // 使用Regex.Match来查找匹配项 + // Match match = Regex.Match(ret, pattern); + // if (match.Success) + // { + // DLEARFCN = match.Groups[1].Value; + // command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQRESELSUBPRIORITY=" + cellReselectionSubPriority + ";\r\n"; + // } + // } + + // else if (cell.NetworkType== NetworkTypeEnum.LTE) + // { + // string DLARFCN = ""; + // var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + // string pattern = @"下行频点\s*=\s*([^\s]+)"; + // // 使用Regex.Match来查找匹配项 + // Match match = Regex.Match(ret, pattern); + // if (match.Success) + // { + // DLARFCN = match.Groups[1].Value; + // command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQRESELSUBPRIORITY=" + cellReselectionSubPriority + ";\r\n"; + // } + + // } + // var res = SendRead(command); + // var resinfo = GetMatchCollections(res); + // if (!res.Contains("RETCODE = 0")) + // { + // // Logger.WriteLog($"ModifyCellReselectionSubPriority execute failed result:{res}.", IsRecordlog); + // return -1; + // } + // else + // { + // return 0; + // } + // } + // catch (Exception ex) + // { + // // Logger.WriteLog($"ModifyCellReselectionSubPriority Exception:{ex.Message}.", IsRecordlog); + // return -1; + // } + //} + /// + /// EUTRA邻区重选子优先级 , 3_LTE to NR的重选 NR频点重选子优先级 + /// + /// + /// + /// + public async Task ModifyCellReselectionSubPrioritystring(Cell cell, string cellReselectionSubPriority) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellReselectionSubPrioritystring GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + //因数据导出跟时间参数前缀不一样需要修改 + string cellReselectionSubPriorityreal = ""; + if (cellReselectionSubPriority[cellReselectionSubPriority.Length - 1].ToString() == "O") + { + cellReselectionSubPriorityreal = "ZERO"; + } + else + { + cellReselectionSubPriorityreal = "0DOT" + cellReselectionSubPriority[cellReselectionSubPriority.Length - 1].ToString(); + } + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQRESELSUBPRIORITY=" + cellReselectionSubPriorityreal + ";\r\n"; + } + } + + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + //因数据导出跟时间参数前缀不一样需要修改 + string cellReselectionSubPriorityreal = ""; + if (cellReselectionSubPriority[cellReselectionSubPriority.Length - 1].ToString() == "O") + { + cellReselectionSubPriorityreal = "ZERO"; + } + else + { + cellReselectionSubPriorityreal = "0DOT_" + cellReselectionSubPriority[cellReselectionSubPriority.Length - 1].ToString(); + } + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQRESELSUBPRIORITY=" + cellReselectionSubPriorityreal + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellReselectionSubPrioritystring execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellReselectionSubPrioritystring Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// E-UTRAN频点高优先级重选RSRP门限 + /// + /// + /// + /// + /// + public async Task ModifyThreshXHigh(Cell cell, int eutranFreqHighPriReselThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshXHigh GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQHIGHPRIRESELTHLD=" + eutranFreqHighPriReselThld + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQHIGHPRIRESELTHLD=" + eutranFreqHighPriReselThld + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshXHigh execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshXHigh Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// E-UTRAN频点高优先级目标小区重选门限RSRQ + /// + /// + /// + /// + /// + public async Task ModifyThreshXHighQ(Cell cell, int eutranHighPriReselRsrqThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshXHighQ GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANHIGHPRIRESELRSRQTHLD=" + eutranHighPriReselRsrqThld + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQHIGHPRIRESELTHLDRSRQ=" + eutranHighPriReselRsrqThld + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshXHighQ execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshXHighQ Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// E-UTRAN频点低优先级目标小区重选门限RSRP + /// + /// + /// + /// + /// + public async Task ModifyThreshXLow(Cell cell, int eutranFreqLowPriReselThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshXLow GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQLOWPRIRESELTHLD=" + eutranFreqLowPriReselThld + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQLOWPRIRESELTHLD=" + eutranFreqLowPriReselThld + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshXLow execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshXLow Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// E-UTRAN频点低优先级目标小区重选门限RSRQ + /// + /// + /// + /// + /// + public async Task ModifyThreshXLowQ(Cell cell, int eutranLowPriReselRsrqThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshXLowQ GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANLOWPRIRESELRSRQTHLD=" + eutranLowPriReselRsrqThld + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQLOWPRIRESELTHLDRSRQ=" + eutranLowPriReselRsrqThld + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshXLowQ execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshXLowQ Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EUTRA邻区最小接入电平 + /// + /// + /// + /// + /// + public async Task ModifyQRxLevMin(Cell cell, int minRxLevel) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyQRxLevMin GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",MINIMUMRXLEVEL=" + minRxLevel + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",MINRXLEVEL=" + minRxLevel + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyQRxLevMin execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyQRxLevMin Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EUTRA邻区最小接入质量, 3_LTE to NR的重选 q-QualMin-r15 最低接收RSRQ + /// + /// + /// + /// + /// + public async Task ModifyqQualMin(Cell cell, int MinimumRxQlty) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyqQualMin GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string DLEARFCN = ""; + var ret = SendRead($"LST NRCELLEUTRANNFREQ:NRCELLID={cell.CellId};\r\n"); + string pattern = @"下行E-UTRAN频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLEARFCN = match.Groups[1].Value; + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",MINIMUMRXQLTY=" + MinimumRxQlty + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLSEL:LOCALCELLID=" + cell.CellId + ",QQUALMIN=" + MinimumRxQlty + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyqQualMin execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyqQualMin Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 重选NR小区定时器时长 + /// + /// + /// + /// + public async Task ModifytReselectionNRr15(Cell cell, int nrCellReselectionTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytReselectionNRr15 GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESELTONR:LOCALCELLID=" + cell.CellId + ",NRCELLRESELECTIONTIMER=" + nrCellReselectionTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytReselectionNRr15 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytReselectionNRr15 Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB测量周期 SSB周期 + /// + /// + /// + /// + /// + public async Task ModifytPeriodicityAndOffsetr15(Cell cell, string ssbPeriod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytPeriodicityAndOffsetr15 GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId + ",SSBPERIOD=" + ssbPeriod + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",SSBPERIOD=" + ssbPeriod + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytPeriodicityAndOffsetr15 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytPeriodicityAndOffsetr15 Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB测量时间窗 + /// + /// + /// + /// + /// + public async Task ModifytSsbMeasurementDuration(Cell cell, string ssbMeasurementDuration) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytSsbMeasurementDuration GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",SSBMEASUREMENTDURATION=" + ssbMeasurementDuration + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytSsbMeasurementDuration execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytSsbMeasurementDuration Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + public async Task ModifyFreqSpecificOffset(Cell cell, string FreqSpecificOffset) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyFreqSpecificOffset GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",FREQSPECIFICOFFSET=" + FreqSpecificOffset + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyFreqSpecificOffset execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyFreqSpecificOffset Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB子载波间隔 + /// + /// + /// + /// + /// + public async Task ModifytSubcarrierSpacingSSB(Cell cell, string subcarrierSpacingSSB) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytSubcarrierSpacingSSB GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",SUBCARRIERSPACING=" + subcarrierSpacingSSB + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytSubcarrierSpacingSSB execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytSubcarrierSpacingSSB Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE在NR SCG最大发射功率 + /// + /// + /// + /// + /// + public async Task ModifytPMaxNRr15(Cell cell, string maxAllowedTxPower) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifytPMaxNRr15 GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",MAXALLOWEDTXPOWER=" + maxAllowedTxPower + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifytPMaxNRr15 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifytPMaxNRr15 Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统切换NR A1 RSRP门限 + /// + /// + /// + /// + public async Task ModifyA1Threshold(Cell cell, int rsrpThresholdA1) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA1Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA1RSRPTHLD=" + rsrpThresholdA1 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERRATHOCOMMGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHONRA1THLDRSRP=" + rsrpThresholdA1 + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA1Threshold execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA1Threshold {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统切换NR A2 RSRP门限 + /// + /// + /// + /// + public async Task ModifyA2Threshold(Cell cell, int rsrpThresholdA2) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA2Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA2RSRPTHLD=" + rsrpThresholdA2 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERRATHOCOMMGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHONRA2THLDRSRP=" + rsrpThresholdA2 + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA2Threshold execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA2Threshold {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统A1A2幅度迟滞 + /// + /// + /// + /// + public async Task ModifyHysteresis(Cell cell, int InterRatHoA1A2Hyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyHysteresis GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA1A2HYST=" + InterRatHoA1A2Hyst + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERRATHOCOMMGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA1A2HYST=" + InterRatHoA1A2Hyst + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyHysteresis execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyHysteresis {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统A1A2时间迟滞 + /// + /// + /// + /// + public async Task ModifyTimeToTrigger(Cell cell, string InterRatHoA1A2TimeToTrig) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTimeToTrigger GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA1A2TIMETOTRIG=" + InterRatHoA1A2TimeToTrig + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERRATHOCOMMGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRATHOMEASGROUPID + ",INTERRATHOA1A2TIMETOTRIG=" + InterRatHoA1A2TimeToTrig + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTimeToTrigger execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTimeToTrigger {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的切换至E-UTRAN盲A2 RSRP门限 + /// + /// + /// + /// + /// + public async Task ModifyCovHoToEutranBlindA2Thld(Cell cell, string covHoToEutranBlindA2Thld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovHoToEutranBlindA2Thld GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",COVHOTOEUTRANBLINDA2THLD=" + covHoToEutranBlindA2Thld + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLHOPARACFG:LOCALCELLID=" + cell.CellId + ",BLINDHOA1A2THDRSRP=" + covHoToEutranBlindA2Thld + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovHoToEutranBlindA2Thld execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovHoToEutranBlindA2Thld {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的切换至E-UTRAN B2 RSRP门限1 + /// + /// + /// + /// + /// + public async Task ModifyCovHoToEutranB2RsrpThld1(Cell cell, string covHoToEutranB2RsrpThld1) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovHoToEutranB2RsrpThld1 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERRHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERRHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERRATHOMEASGROUPID=" + INTERRATHOMEASGROUPID + ",COVHOTOEUTRANB2RSRPTHLD1=" + covHoToEutranB2RsrpThld1 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRATHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERRATHOCOMMGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换公共参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRATHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRATHOMEASGROUPID + ",NRB2THLD1RSRP=" + covHoToEutranB2RsrpThld1 + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovHoToEutranB2RsrpThld1 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovHoToEutranB2RsrpThld1 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统切换触发事件类型 + /// + /// + /// + /// + public async Task ModifyeventId(Cell cell, string interRatHoTriggerEventType) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyeventId GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRINTERRATHOPARAM:NRCELLID=" + cell.CellId + ",INTERRATHOTRIGGEREVENTTYPE=" + interRatHoTriggerEventType + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD INTERRATHOCOMM:INTERRATHONREVENTTYPE=" + interRatHoTriggerEventType + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyeventId execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyeventId {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的切换B2 RSRP门限2 + /// + /// + /// + /// + public async Task ModifyB2Threshold2EUTRA(Cell cell, int INTERRHOTOEUTRANMEASGRPID, string CovBasedHoB1RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyB2Threshold2EUTRA GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",COVBASEDHOB1RSRPTHLD=" + CovBasedHoB1RsrpThld + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD INTERRATHOCOMMGROUP:LOCALCELLID=" + cell.CellId + ",INTERRATHOCOMMGROUPID=" + INTERRHOTOEUTRANMEASGRPID + ",NRB2THLD1RSRP=" + CovBasedHoB1RsrpThld + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyB2Threshold2EUTRA execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyB2Threshold2EUTRA {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的切换B1B2幅度迟滞 NR切换B1/B2事件幅度迟滞 + /// + /// + /// + /// + public async Task ModifyCovBasedHoB1B2Hyst(Cell cell, int CovBasedHoB1B2Hyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2Hyst GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST NRCELLHOEUTRANMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换至E-UTRAN测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",COVBASEDHOB1RSRPTHLD=" + CovBasedHoB1B2Hyst + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST INTERRATHONRPARAMGRP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"E-UTRAN切换至NR的切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ",NRHOPARAMGROUPID=" + INTERRHOTOEUTRANMEASGRPID + ",NRB1B2HYSTERESIS=" + CovBasedHoB1B2Hyst + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2Hyst execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2Hyst {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的切换B1B2时间迟滞 NR切换B1/B2事件时间迟滞 + /// + /// + /// + /// + public async Task ModifyCovBasedHoB1B2TimeToTrig(Cell cell, string covBasedHoB1B2TimeToTrig) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2TimeToTrig GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST NRCELLHOEUTRANMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换至E-UTRAN测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",NRB1B2TIMETOTRIGGER=" + covBasedHoB1B2TimeToTrig + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST INTERRATHONRPARAMGRP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"E-UTRAN切换至NR的切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ",NRHOPARAMGROUPID=" + INTERRHOTOEUTRANMEASGRPID + ",NRB1B2TIMETOTRIGGER=" + covBasedHoB1B2TimeToTrig + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2TimeToTrig execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovBasedHoB1B2TimeToTrig {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异系统切换触发事件类型 + /// + /// + public async Task ModifyTriggerType(Cell cell, string triggerType) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTriggerType GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD INTERRATHOCOMM:INTERRATHOEVENTTYPE=" + triggerType + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTriggerType execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTriggerType {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于覆盖的E-UTRAN切换至NR B1事件RSRP触发门限 + /// + /// + /// + /// + /// + public async Task ModifyB1ThresholdNRr15(Cell cell, string covBasedNrB1RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string NRHOPARAMGROUPID = ""; + var ret = SendRead($"LST INTERRATHONRPARAMGRP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"E-UTRAN切换至NR的切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + NRHOPARAMGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ",NRHOPARAMGROUPID=" + NRHOPARAMGROUPID + ",COVBASEDNRB1RSRPTHLD=" + covBasedNrB1RsrpThld + ";\r\n"; + } + + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 基于业务的E-UTRAN切换至NR B1事件RSRP触发门限 + /// + /// + /// + /// + /// + public async Task ModifyB1ThresholdNRr15Serv(Cell cell, string ServBasedNrB1RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string NRHOPARAMGROUPID = ""; + var ret = SendRead($"LST INTERRATHONRPARAMGRP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"E-UTRAN切换至NR的切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + NRHOPARAMGROUPID = match.Groups[1].Value; + command = "MOD INTERRATHONRPARAMGRP:LOCALCELLID=" + cell.CellId + ",NRHOPARAMGROUPID=" + NRHOPARAMGROUPID + ",COVBASEDNRB1RSRPTHLD=" + ServBasedNrB1RsrpThld + ";\r\n"; + } + + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyB1ThresholdNRr15 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EPSFB B1 RSRP门限 + /// + /// + /// + /// + /// + public async Task ModifyB1ThresholdEUTRA(Cell cell, int epsFbB1RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyB1ThresholdEUTRA GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST NRCELLHOEUTRANMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换至E-UTRAN测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",EPSFBB1RSRPTHLD=" + epsFbB1RsrpThld + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyB1ThresholdEUTRA execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyB1ThresholdEUTRA {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EPSFB B1幅度迟滞 + /// + /// + /// + /// + /// + public async Task ModifyEpsFbB1Hyst(Cell cell, int epsFbB1Hyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyEpsFbB1Hyst GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST NRCELLHOEUTRANMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换至E-UTRAN测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",EpsFbB1Hyst=" + epsFbB1Hyst + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyEpsFbB1Hyst execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyEpsFbB1Hyst {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// EPSFB B1时间迟滞 + /// + /// + /// + /// + /// + public async Task ModifyEPSFBB1TIMETOTRIG(Cell cell, string EPSFBB1TIMETOTRIG) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyEPSFBB1TIMETOTRIG GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERRHOTOEUTRANMEASGRPID = ""; + var ret = SendRead($"LST NRCELLHOEUTRANMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异系统切换至E-UTRAN测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERRHOTOEUTRANMEASGRPID = match.Groups[1].Value; + command = "MOD NRCELLHOEUTRANMEAGRP:NRCELLID=" + cell.CellId + ",INTERRHOTOEUTRANMEASGRPID=" + INTERRHOTOEUTRANMEASGRPID + ",EPSFBB1TIMETOTRIG=" + EPSFBB1TIMETOTRIG + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyEPSFBB1TIMETOTRIG execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyEPSFBB1TIMETOTRIG {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 最大发射功率 + /// + /// + /// + /// + /// + public async Task ModifySSPBCHBlockPower(Cell cell, int maxTransmitPower) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySSPBCHBlockPower GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLTRP:NRDUCELLTRPID=" + cell.CellId + ",NRDUCELLID=" + cell.CellId + ",MAXTRANSMITPOWER=" + maxTransmitPower + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD PDSCHCFG:LOCALCELLID=" + cell.CellId + ",REFERENCESIGNALPWR=" + maxTransmitPower + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySSPBCHBlockPower execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySSPBCHBlockPower {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// TRS资源组中NZP CSI-RS相对于SSB EPRE的功率偏移 + /// + /// + /// + /// + public async Task ModifyTrsPwrOffset(Cell cell, int TrsPwrOffset) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTrsPwrOffset GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLCHNPWR:NRDUCELLID=" + cell.CellId + ",TRSPWROFFSET=" + TrsPwrOffset + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTrsPwrOffset execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTrsPwrOffset {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 服务小区UE允许的最大功率 + /// + /// + /// + /// + public async Task ModifyPMax(Cell cell, int MaxUeTransmitPower) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPMax GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLSELCONFIG:NRDUCELLID=" + cell.CellId + ",MAXUETRANSMITPOWER=" + MaxUeTransmitPower + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",UEPOWERMAXCFGIND=CFG,UEPOWERMAX=" + MaxUeTransmitPower + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPMax execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPMax {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 前导初始接收目标功率 + /// + /// + /// + /// + public async Task ModifyPreambleReceivedTargetPower(Cell cell, string preambleInitRxTargetPwr) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPreambleReceivedTargetPower GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PREAMBLEINITRXTARGETPWR=" + preambleInitRxTargetPwr + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD RACHCFG:LOCALCELLID=" + cell.CellId + ",PREAMBINITRCVTARGETPWRCE1=" + preambleInitRxTargetPwr + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPreambleReceivedTargetPower execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPreambleReceivedTargetPower {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 功率攀升步长 + /// + /// + /// + /// + public async Task ModifyPowerRampingStep(Cell cell, string powerRampingStep) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPowerRampingStep GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PWRRAMPINGSTEP=" + powerRampingStep + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPowerRampingStep execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPowerRampingStep {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// preamble最大发送次数 + /// + /// + /// + /// + public async Task ModifyPreambleTransMax(Cell cell, string preambleTransMax) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPreambleTransMax GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPRACH:NRDUCELLID=" + cell.CellId + ",MAXPREAMBLETRANSCNT=" + preambleTransMax + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPreambleTransMax execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPreambleTransMax {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// MSG3相对于PRACH的功率偏移 + /// + /// + /// + /// + public async Task ModifyDeltaPreambleMsg3(Cell cell, int deltaPreambleMsg3) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDeltaPreambleMsg3 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",DELTAPREAMBLEMSG3=" + deltaPreambleMsg3 + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDeltaPreambleMsg3 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDeltaPreambleMsg3 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// PUSCH Ue级别的功率增量 PUSCH动态调度时小区级期望接收功率 + /// + /// + /// + /// + public async Task ModifyP0PoNominalPusch(Cell cell, int poNominalPusch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyP0PoNominalPusch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PONOMINALPUSCH=" + poNominalPusch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLULPCCOMM:LOCALCELLID=" + cell.CellId + ",P0NOMINALPUSCH=" + poNominalPusch + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyP0PoNominalPusch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyP0PoNominalPusch {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 路径损耗因子 + /// + /// + /// + /// + public async Task ModifyPathLossCoeff(Cell cell, string pathLossCoeff) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPathLossCoeff GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PATHLOSSCOEFF=" + pathLossCoeff + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLULPCCOMM:LOCALCELLID=" + cell.CellId + ",PASSLOSSCOEFF=" + pathLossCoeff + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPathLossCoeff execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPathLossCoeff {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SRS的调度期望功率 + /// + /// + /// + /// + public async Task ModifyPoSrs(Cell cell, int PoSrs) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPoSrs GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",POSRS=" + PoSrs + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPoSrs execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPoSrs {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// PUCCH标称PO值 + /// + /// + /// + /// + public async Task ModifyPoNominalPucch(Cell cell, int poNominalPucch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPoNominalPucch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PONOMINALPUCCH=" + poNominalPucch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLULPCCOMM:LOCALCELLID=" + cell.CellId + ",P0NOMINALPUCCH=" + poNominalPucch + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPoNominalPucch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPoNominalPucch {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 同频切换的A3偏置 + /// + /// + /// + /// + public async Task ModifyA3EventOffset(Cell cell, double eventOffset) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA3EventOffset GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTRAFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTRAFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTRAFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTRAFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTRAFREQHOA3OFFSET=" + eventOffset + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTRAFREQHOGROUPID = ""; + var ret = SendRead($"LST INTRAFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOGROUPID = match.Groups[1].Value; + command = "MOD INTRAFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTRAFREQHOGROUPID=" + INTRAFREQHOGROUPID + ",INTRAFREQHOA3OFFSET=" + eventOffset + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA3EventOffset execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA3EventOffset {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 同频切换的A3幅度迟滞 + /// + /// + /// + /// + public async Task ModifyA3HysteresisA3(Cell cell, int hysteresisA3) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA3HysteresisA3 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTRAFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTRAFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTRAFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTRAFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTRAFREQHOA3HYST=" + hysteresisA3 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTRAFREQHOGROUPID = ""; + var ret = SendRead($"LST INTRAFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOGROUPID = match.Groups[1].Value; + command = "MOD INTRAFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTRAFREQHOGROUPID=" + INTRAFREQHOGROUPID + ",INTRAFREQHOA3HYST=" + hysteresisA3 + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA3HysteresisA3 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA3HysteresisA3 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 同频切换的A3时间迟滞 + /// + /// + /// + /// + public async Task ModifyA3TimeToTrigger(Cell cell, string IntraFreqHoA3TimeToTrig) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA3TimeToTrigger GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTRAFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTRAFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTRAFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTRAFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTRAFREQHOA3TIMETOTRIG=" + IntraFreqHoA3TimeToTrig + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTRAFREQHOGROUPID = ""; + var ret = SendRead($"LST INTRAFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"同频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTRAFREQHOGROUPID = match.Groups[1].Value; + command = "MOD INTRAFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTRAFREQHOGROUPID=" + INTRAFREQHOGROUPID + ",INTRAFREQHOA3TIMETOTRIG=" + IntraFreqHoA3TimeToTrig + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA3TimeToTrigger execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA3TimeToTrigger {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A2事件报告门限 + /// + /// + /// + /// + /// + public async Task ModifyInterFreA2Threshold(Cell cell, int covInterFreqA2RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA2Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",COVINTERFREQA2RSRPTHLD=" + covInterFreqA2RsrpThld + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA2THDRSRP=" + covInterFreqA2RsrpThld + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA2Threshold execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA2Threshold {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A1事件报告门限 + /// + /// + /// + /// + /// + public async Task ModifyInterFreA1Threshold(Cell cell, int covInterFreqA1RsrpThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA1Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",COVINTERFREQA1RSRPTHLD=" + covInterFreqA1RsrpThld + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA1THDRSRP=" + covInterFreqA1RsrpThld + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyA1Threshold execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA1Threshold {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A1A2幅度迟滞 + /// + /// + /// + /// + /// + public async Task ModifyInterFreqA1A2Hyst(Cell cell, int interFreqA1A2Hyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInterFreqA1A2Hyst GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQA1A2HYST=" + interFreqA1A2Hyst + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA1A2HYST=" + interFreqA1A2Hyst + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInterFreqA1A2Hyst execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInterFreqA1A2Hyst {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A1A2时间迟滞 + /// + /// + /// + /// + /// + public async Task ModifyInterFreqA1A2TimeToTrig(Cell cell, string interFreqA1A2TimeToTrig) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInterFreqA1A2TimeToTrig GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQA1A2TIMETOTRIG=" + interFreqA1A2TimeToTrig + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA1A2TIMETOTRIG=" + interFreqA1A2TimeToTrig + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInterFreqA1A2TimeToTrig execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInterFreqA1A2TimeToTrig {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// A5事件报告的服务小区信号质量门限 + /// + /// + /// + /// + /// + public async Task ModifyCovInterFreqA5RsrpThld1(Cell cell, int CovInterFreqA5RsrpThld1) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld1 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",COVINTERFREQA5RSRPTHLD1=" + CovInterFreqA5RsrpThld1 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA5THD1RSRP=" + CovInterFreqA5RsrpThld1 + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld1 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld1 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// A5事件报告的相邻小区信号质量门限 + /// + /// + /// + /// + /// + public async Task ModifyCovInterFreqA5RsrpThld2(Cell cell, int CovInterFreqA5RsrpThld2) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld2 GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST NRCELLINTERFHOMEAGRP:NRCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换测量参数组标识\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",COVINTERFREQA5RSRPTHLD2=" + CovInterFreqA5RsrpThld2 + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string INTERFREQHOMEASGROUPID = ""; + var ret = SendRead($"LST INTERFREQHOGROUP:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"异频切换参数组ID\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + INTERFREQHOMEASGROUPID = match.Groups[1].Value; + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",SRVREQHOA4THDRSRP=" + CovInterFreqA5RsrpThld2 + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld2 execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCovInterFreqA5RsrpThld2 {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A4A5时间迟滞 + /// + /// + /// + /// + /// + public async Task ModifyInterFreqA4A5TimeToTrig(Cell cell, int INTERFREQHOMEASGROUPID, string interFreqA4A5TimeToTrig) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInterFreqA4A5TimeToTrig GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQA4A5TIMETOTRIG=" + interFreqA4A5TimeToTrig + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA4TIMETOTRIG=" + interFreqA4A5TimeToTrig + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInterFreqA4A5TimeToTrig execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInterFreqA4A5TimeToTrig {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频A4A5幅度迟滞 + /// + /// + /// + /// + /// + public async Task ModifyInterFreqA4A5Hyst(Cell cell, int INTERFREQHOMEASGROUPID, int interFreqA4A5Hyst) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInterFreqA4A5Hyst GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQA4A5HYST=" + interFreqA4A5Hyst + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTERFREQHOMEASGROUPID + ",INTERFREQHOA4HYST=" + interFreqA4A5Hyst + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInterFreqA4A5Hyst execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInterFreqA4A5Hyst {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 测量报告间隔 + /// + /// + /// + /// + public async Task ModifyReportInterval(Cell cell, string reportInterval) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyReportInterval GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLMCPARA:LOCALCELLID=" + cell.CellId + ",TIMETOTRIGGER=" + reportInterval + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyReportInterval execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyReportInterval {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 测量结果报告次数 + /// + /// + /// + /// + public async Task ModifyReportAmount(Cell cell, string reportAmount) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyReportAmount GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLMCPARA:LOCALCELLID=" + cell.CellId + ",REPORTAMOUNT=" + reportAmount + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyReportAmount execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyReportAmount {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 最大上报小区数 + /// + /// + /// + /// + public async Task ModifyMaxReportCells(Cell cell, string maxReportCells) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMaxReportCells GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLMEASCONFIG:NRCELLID=" + cell.CellId + ",INTRAFPRDCMRMAXCELLNUMBER=" + maxReportCells + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLMCPARA:LOCALCELLID=" + cell.CellId + ",MAXREPORTCELLS=" + maxReportCells + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMaxReportCells execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMaxReportCells {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } /// + + /// + /// 小区上报质量类型 + /// + /// + /// + /// + /// + public async Task ModifyReportQuantity(Cell cell, string ReportQuantity) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyReportQuantity GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLMCPARA:LOCALCELLID=" + cell.CellId + ",ReportQuantity=" + ReportQuantity + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyReportQuantity execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyReportQuantity {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 小区级RSRP滤波系数 + /// + /// + /// + /// + public async Task ModifyCellRsrpFilterCoeff(Cell cell, string cellRsrpFilterCoeff) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellRsrpFilterCoeff GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLMOBILITYCONFIG:NRCELLID=" + cell.CellId + ",CELLRSRPFILTERCOEFF=" + cellRsrpFilterCoeff + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellRsrpFilterCoeff execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellRsrpFilterCoeff {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB合并门限 + /// + /// + /// + /// + public async Task ModifySsbConsolidationThld(Cell cell, int ssbConsolidationThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySsbConsolidationThld GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLMOBILITYCONFIG:NRCELLID=" + cell.CellId + ",SSBCONSOLIDATIONTHLD=" + ssbConsolidationThld + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySsbConsolidationThld execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySsbConsolidationThld {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 用于平均的SSB个数 + /// + /// + /// + /// + public async Task ModifySsbNumToAverage(Cell cell, int SsbNumToAverage) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySsbNumToAverage GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLMOBILITYCONFIG:NRCELLID=" + cell.CellId + ",SSBNUMTOAVERAGE=" + SsbNumToAverage + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySsbNumToAverage execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySsbNumToAverage {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// NR服务小区重选子优先级 + /// + /// + /// + /// + public async Task ModifyCellReselectionSubPriority(Cell cell, string cellReselectionSubPriority) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellReselectionSubPriority GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // Logger.WriteLog($"ModifyCellReselectionSubPriority:0DOT0, 0DOT2, 0DOT4, 0DOT6, 0DOT8", IsRecordlog); + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",CELLRESELSUBPRIORITY=" + "0DOT" + cellReselectionSubPriority + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQRESELSUBPRIORITY=" + cellReselectionSubPriority + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellReselectionSubPriority execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellReselectionSubPriority {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 最低接收电平门限 + /// + /// + /// + /// + /// + public async Task ModifyMinimumRxLevel(Cell cell, double LevelValue) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellSelection GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLSELCONFIG:NRDUCELLID=" + cell.CellId + ",MINIMUMRXLEVEL=" + LevelValue + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",MINRXLEVEL=" + LevelValue + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellSelection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellSelection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 最低信号质量门限 + /// + /// + /// + /// + /// + public async Task ModifyMinimumRxQlty(Cell cell, int DLARFCN, double minimumRxQlty) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMinimumRxQlty GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",MINIMUMRXQLTY=" + minimumRxQlty + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",MINRXSIGNALQUALITY=" + minimumRxQlty + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMinimumRxQlty execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMinimumRxQlty Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 同频小区测量Srxlev门限 + /// + /// + /// + /// + public async Task ModifyIntraFreqMeasStartThld(Cell cell, int intraFreqMeasStartThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyIntraFreqMeasStartThld GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",INTRAFREQMEASSTARTTHLD=" + intraFreqMeasStartThld + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SINTRASEARCHCFGIND=CFG,SINTRASEARCH=" + intraFreqMeasStartThld + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyIntraFreqMeasStartThld execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyIntraFreqMeasStartThld Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 同频小区测量Squal 门限5_NR移动性管理 s-IntraSearchQ 同频小区测量Squal门限 + /// + /// + /// + /// + public async Task ModifyMinimumRxQlty(Cell cell, int minimumRxQlty) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMinimumRxQlty GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLSELCONFIG:NRDUCELLID=" + cell.CellId + ",MINIMUMRXQLTY=" + minimumRxQlty + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SINTRASEARCHCFGIND=CFG,SINTRASEARCH=" + minimumRxQlty + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMinimumRxQlty execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMinimumRxQlty Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SMTC周期 + /// + /// + /// + /// + public async Task ModifySmtcPeriod(Cell cell, string SmtcPeriod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySmtcPeriod GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",SMTCPERIOD=" + "MS" + SmtcPeriod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",SMTCPERIOD=" + "MS" + SmtcPeriod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",SMTCPERIOD=" + "MS" + SmtcPeriod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改SmtcPeriod + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySmtcPeriod:MS5, MS10, MS20, MS40, MS80, MS160", IsRecordlog); + // Logger.WriteLog($"ModifySmtcPeriod execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifySmtcPeriod Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SMTC持续时间 + /// + /// + /// + /// + public async Task ModifySmtcDuration(Cell cell, string smtcDuration) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySmtcDuration GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",SMTCDURATION=" + smtcDuration + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",SMTCDURATION=" + smtcDuration + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",SMTCDURATION=" + smtcDuration + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改SmtcPeriod + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySmtcDuration execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifySmtcDuration Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 高优先级载频或异系统小区Srxlev门限,NR频点高优先级重选RSRP门限 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyHighPriReselThld(Cell cell, int highPriReselThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyHighPriReselThld GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var SSBFREQPOS = ""; + var ret = SendRead($"LST NRCELLFREQRELATION:NRCELLID={cell.CellId};\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + SSBFREQPOS = match.Groups[1].Value; + command = "MOD NRCELLFREQRELATION:NRCELLID=" + cell.CellId + ",SSBFREQPOS=" + SSBFREQPOS + ",HIGHPRIRESELTHLD=" + highPriReselThld + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQHIGHPRIRESELTHLD=" + highPriReselThld + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyHighPriReselThld execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyHighPriReselThld Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 低优先级载频或异系统小区Srxlev门限,NR频点低优先级重选RSRP门限 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyLowPriReselThld(Cell cell, int lowPriReselThld) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyLowPriReselThld GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var SSBFREQPOS = ""; + var ret = SendRead($"LST NRCELLFREQRELATION:NRCELLID={cell.CellId};\r\n"); + string pattern = @"SSB频域位置\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + SSBFREQPOS = match.Groups[1].Value; + command = "MOD NRCELLFREQRELATION:NRCELLID=" + cell.CellId + ",SSBFREQPOS=" + SSBFREQPOS + ",LOWPRIRESELTHLD=" + lowPriReselThld + ";\r\n"; + } + + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQLOWPRIRESELTHLD=" + lowPriReselThld + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyLowPriReselThld execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyLowPriReselThld Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// PRACH配置索引 + /// + /// + /// + /// + /// + public async Task ModifyPrachConfigurationIndex(Cell cell, string prachConfigurationIndex) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPrachConfigurationIndex GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + + command = "MOD NRDUCELLPRACH:NRDUCELLID=" + cell.CellId + ",PRACHCONFIGURATIONINDEX=" + prachConfigurationIndex + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPrachConfigurationIndex execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyPrachConfigurationIndex Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// DRX算法开关 + /// + /// + /// + /// + public async Task ModifyDrxAlgoSwitch(Cell cell, string drxAlgoSwitch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDrxAlgoSwitch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLUEPWRSAVING:NRDUCELLID=" + cell.CellId + ",NRDUCELLDRXALGOSWITCH=" + drxAlgoSwitch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLDRXPARA:LOCALCELLID=" + cell.CellId + ",DRXALGSWITCH=" + drxAlgoSwitch + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDrxAlgoSwitch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDrxAlgoSwitch Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 持续时间定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyOnDurationTimer(Cell cell, int DUDRXPARAMGROUPID, string CATTYPE, string onDurationTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyOnDurationTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + if (!onDurationTimer.Contains("ms") && !onDurationTimer.Contains("MS")) + { + onDurationTimer = "MS" + onDurationTimer; + } + //MOD GNBDUDRXPARAMGROUP:DUDRXPARAMGROUPID=3,ONDURATIONTIMER=MS2; + command = "MOD GNBDUDRXPARAMGROUP:DUDRXPARAMGROUPID=" + DUDRXPARAMGROUPID + ",ONDURATIONTIMER=" + onDurationTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD DRXPARAGROUP:LOCALCELLID=22,DRXPARAGROUPID=3,CATTYPE=LTE,ONDURATIONTIMER=PSF3; + command = "MOD DRXPARAGROUP:LOCALCELLID=" + cell.CellId + ",DRXPARAGROUPID=" + DUDRXPARAMGROUPID + ",CATTYPE=" + CATTYPE + ",ONDURATIONTIMER=" + onDurationTimer + "\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyOnDurationTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyOnDurationTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// DRX非激活定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyInactivityTimer(Cell cell, int DUDRXPARAMGROUPID, string CATTYPE, string InactivityTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyInactivityTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + + + command = "MOD GNBDUDRXPARAMGROUP:DUDRXPARAMGROUPID=" + DUDRXPARAMGROUPID + ",DrxInactivityTimer=" + InactivityTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + command = "MOD DRXPARAGROUP:LOCALCELLID=" + cell.CellId + ",DRXPARAGROUPID=" + DUDRXPARAMGROUPID + ",CATTYPE=" + CATTYPE + ",DrxInactivityTimer=" + InactivityTimer + "\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyInactivityTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyInactivityTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 长周期 + /// + /// + /// + /// + /// + public async Task ModifyLongCycle(Cell cell, int drxParamGroupId, string longCycle) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyLongCycle GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBDRXPARAMGROUP:DRXPARAMGROUPID=1,LONGCYCLE=MS20; + command = "MOD GNBDRXPARAMGROUP:DRXPARAMGROUPID=" + drxParamGroupId + ",LONGCYCLE=" + longCycle + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD UESPECDRXPARAGROUP:LOCALCELLID=1,DRXPARAGROUPINDEX=2,LONGDRXCYCLE=SF20; + command = "MOD UESPECDRXPARAGROUP:LOCALCELLID=" + cell.CellId + ",DRXPARAGROUPINDEX=" + drxParamGroupId + ",LONGDRXCYCLE=" + longCycle + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyLongCycle execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyLongCycle Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行行重传定时器/下行重传定时器 + /// + /// + /// + /// + /// + public async Task ModifyDrxRetransTimer(Cell cell, int duDrxParamGroupId, string drxRetransTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDrxRetransTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBDUDRXPARAMGROUP:DUDRXPARAMGROUPID=1,DRXRETRANSTIMER=SL24; + command = "MOD GNBDUDRXPARAMGROUP:DUDRXPARAMGROUPID=" + duDrxParamGroupId + ",DRXRETRANSTIMER=" + drxRetransTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDrxRetransTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDrxRetransTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 短周期 + /// + /// + /// + /// + /// + public async Task ModifyShortCycle(Cell cell, int drxParamGroupId, string shortCycle) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyShortCycle GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNBDRXPARAMGROUP:DRXPARAMGROUPID=" + drxParamGroupId + ",SHORTCYCLE=" + shortCycle + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD UESPECDRXPARAGROUP:LOCALCELLID=" + cell.CellId + ",DRXPARAGROUPINDEX=" + drxParamGroupId + ",SHORTDRXCYCLE=" + shortCycle + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyShortCycle execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyShortCycle Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 短周期定时器 + /// + /// + /// + /// + /// + public async Task ModifyShortCycleTimer(Cell cell, int drxParamGroupId, string shortCycleTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyShortCycleTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBDRXPARAMGROUP:DRXPARAMGROUPID=1,LONGCYCLE=MS20; + command = "MOD GNBDRXPARAMGROUP:DRXPARAMGROUPID=" + drxParamGroupId + ",SHORTCYCLETIMER=" + shortCycleTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD UESPECDRXPARAGROUP:LOCALCELLID=1,DRXPARAGROUPINDEX=2,LONGDRXCYCLE=SF20; + command = "MOD UESPECDRXPARAGROUP:LOCALCELLID=" + cell.CellId + ",DRXPARAGROUPINDEX=" + drxParamGroupId + ",DRXSHORTCYCLETIMER=" + shortCycleTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyShortCycleTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyShortCycleTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// NR网络架构 + /// + /// + /// + /// + /// + /// + public async Task ModifyNrNetworkingOption(Cell cell, int operatorId, string nrNetworkingOption) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyNrNetworkingOption GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNBOPERATOR:OPERATORID=" + operatorId + ",NRNETWORKINGOPTION=" + nrNetworkingOption + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyNrNetworkingOption execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyNrNetworkingOption Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + /// + /// 帧偏置 + /// + /// + /// + /// + /// + public async Task ModifyFrameOffset(Cell cell, int frameOffset) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyFrameOffset GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD GNODEBPARAM:FRAMEOFFSET=" + frameOffset + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLFRAMEOFFSET:LOCALCELLID=" + cell.CellId + ",FRAMEOFFSETMODE=CustomFrameOffset,FRAMEOFFSET=" + frameOffset + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyFrameOffset execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyFrameOffset Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 发送和接收模式 + /// + /// + /// + /// + /// + public async Task ModifyTxRxMode(Cell cell, string TxRxMode) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTxRxMode GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLTRP:NRDUCELLTRPID=" + cell.CellId + ",TXRXMODE=" + TxRxMode + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",TXRXMODE=" + TxRxMode + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTxRxMode execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTxRxMode Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SIB1周期 + /// + /// + /// + /// + /// + public async Task ModifySib1Period(Cell cell, string sib1Period) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySib1Period GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId + ",SIB1PERIOD=" + sib1Period + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySib1Period execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySib1Period Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB频域位置描述方式 + /// + /// + /// + /// + /// + public async Task ModifySsbDescMethod(Cell cell, string SsbDescMethod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySsbDescMethod GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",SSBDESCMETHOD=" + SsbDescMethod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",SSBDESCMETHOD=" + SsbDescMethod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",SSBDESCMETHOD=" + SsbDescMethod + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改 + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySsbDescMethod execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySsbDescMethod Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SSB发送图样 + /// + /// + /// + /// + /// + /// + public async Task ModifymediumBitmap(Cell cell, string COVERAGESCENARIO) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifymediumBitmap GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLTRPBEAM:NRDUCELLTRPID=" + cell.CellId + ",COVERAGESCENARIO=" + COVERAGESCENARIO + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifymediumBitmap execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifymediumBitmap Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + /// + /// CORESET#0的配置 + /// + /// + /// + /// + /// + public async Task ModifyControlResourceSetZero(Cell cell, string COMMONCTRLRESRBNUM) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyControlResourceSetZero GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLCORESET:NRDUCELLID=" + cell.CellId + ",COMMONCTRLRESRBNUM=" + COMMONCTRLRESRBNUM + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyControlResourceSetZero execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyControlResourceSetZero Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 搜索空间#0的配置 + /// + /// + /// + /// + /// + public async Task ModifysearchSpaceZero(Cell cell, string SearchSpaceZero) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifysearchSpaceZero GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDCCH:NRDUCELLID=" + cell.CellId + ",SEARCHSPACEZERO=" + SearchSpaceZero + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifysearchSpaceZero execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifysearchSpaceZero Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// PDCCH最大配对层数 + /// + /// + /// + /// + /// + public async Task ModifyMaxPairLayerNum(Cell cell, string maxPairLayerNum) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMaxPairLayerNum GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDCCH:NRDUCELLID=" + cell.CellId + ",MAXPAIRLAYERNUM=" + maxPairLayerNum + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMaxPairLayerNum execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMaxPairLayerNum Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行调制方式 + /// + /// + /// + /// + /// + public async Task ModifyDl256QamSwitch(Cell cell, string dl256QamSwitch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDl256QamSwitch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLALGOSWITCH:NRDUCELLID=" + cell.CellId + ",DL256QAMSWITCH=" + dl256QamSwitch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDl256QamSwitch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDl256QamSwitch Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行最大MIMO层数配额 + /// + /// + /// + /// + /// + public async Task ModifyMaxMimoLayerNum(Cell cell, string MaxMimoLayerNum) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMaxMimoLayerNum GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDSCH:NRDUCELLID=" + cell.CellId + ",MAXMIMOLAYERNUM=" + MaxMimoLayerNum + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMaxMimoLayerNum execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMaxMimoLayerNum Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行最大MIMO层数配额 + /// + /// + /// + /// + /// + public async Task ModifyMaxMimoLayerCnt(Cell cell, string MaxMimoLayerCnt) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMaxMimoLayerCnt GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",MAXMIMOLAYERCNT=" + MaxMimoLayerCnt + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMaxMimoLayerCnt execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMaxMimoLayerCnt Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SR_PERIOD_ADAPT_SWITCH(SR周期自适应开关)// SrperiodicityAndOffset + /// + /// + /// + /// + /// + public async Task ModifySrperiodicityAndOffset(Cell cell, string SrperiodicityAndOffset) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySrperiodicityAndOffset GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUCCH:NRDUCELLID=" + cell.CellId + ",SRPERIOD=" + SrperiodicityAndOffset + ",SRRESOUREALGOSWITCH=SR_PERIOD_ADAPT_SWITCH-1;\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySrperiodicityAndOffset execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySrperiodicityAndOffset Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行单用户多流开关 + /// + /// + /// + /// + /// + public async Task ModifySuMimoMultipleLayerSw(Cell cell, string SuMimoMultipleLayerSw) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySuMimoMultipleLayerSw GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLALGOSWITCH:NRDUCELLID=" + cell.CellId + ",SUMIMOMULTIPLELAYERSW=" + SuMimoMultipleLayerSw + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySuMimoMultipleLayerSw execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySuMimoMultipleLayerSw Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 前置DM-RS位置 + /// + /// + /// + /// + /// + public async Task ModifyDmrsTypeAPos(Cell cell, string DmrsTypeAPos) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDmrsTypeAPos GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLDMRS:NRDUCELLID=" + cell.CellId + ",DMRSTYPEAPOS=" + DmrsTypeAPos + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDmrsTypeAPos execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDmrsTypeAPos Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行DMRS最大符号长度 + /// + /// + /// + /// + /// + public async Task ModifyDlDmrsMaxLength(Cell cell, string DlDmrsMaxLength) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDlDmrsMaxLength GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDSCH:NRDUCELLID=" + cell.CellId + ",DLDMRSMAXLENGTH=" + DlDmrsMaxLength + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDlDmrsMaxLength execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDlDmrsMaxLength Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行附加DMRS位置 + /// + /// + /// + /// + /// + public async Task ModifyDlAdditionalDmrsPos(Cell cell, string dlAdditionalDmrsPos) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDlAdditionalDmrsPos GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDSCH:NRDUCELLID=" + cell.CellId + ",DLADDITIONALDMRSPOS=" + dlAdditionalDmrsPos + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDlAdditionalDmrsPos execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDlAdditionalDmrsPos Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行/下行 MU-MIMO功能开关 + /// + /// + /// + /// + /// + public async Task ModifyMuMimoSwitch(Cell cell, string muMimoSwitch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyMuMimoSwitch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD NRDUCELLALGOSWITCH:NRDUCELLID=1,MUMIMOSWITCH=DL_MU_MIMO_SW-0; 下行开关 + //MOD NRDUCELLALGOSWITCH:NRDUCELLID=1,MUMIMOSWITCH=UL_MU_MIMO_SW-0; 上行开关 + command = "MOD NRDUCELLALGOSWITCH:NRDUCELLID=" + cell.CellId + ",MUMIMOSWITCH=" + muMimoSwitch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyMuMimoSwitch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyMuMimoSwitch Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UL 256QAM开关//上行调制方式 + /// + /// + /// + /// + /// + public async Task ModifyUl256QamSwitch(Cell cell, string ul256QamSwitch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUl256QamSwitch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD NRDUCELLALGOSWITCH:NRDUCELLID = 1,UL256QAMSWITCH = UL_256QAM_OFF; + command = "MOD NRDUCELLALGOSWITCH:NRDUCELLID=" + cell.CellId + ",UL256QAMSWITCH=" + ul256QamSwitch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD PUSCHCFG:LOCALCELLID=1,UL256QAMALGOSWITCH=UL_256QAM_SWITCH-0; + command = "MOD PUSCHCFG:LOCALCELLID=" + cell.CellId + ",UL256QAMALGOSWITCH=" + ul256QamSwitch + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUl256QamSwitch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUl256QamSwitch Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 附加DM-RS的位置 + /// + /// + /// + /// + /// + public async Task ModifyUlAdditionalDmrsPos(Cell cell, string ulAdditionalDmrsPos) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlAdditionalDmrsPos GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",ULADDITIONALDMRSPOS=" + ulAdditionalDmrsPos + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlAdditionalDmrsPos execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUlAdditionalDmrsPos Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// DM-RS类型 + /// + /// + /// + /// + /// + public async Task ModifyUlDmrsType(Cell cell, string UlDmrsType) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlDmrsType GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",ULDMRSTYPE=" + UlDmrsType + ";\r\n\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlDmrsType execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUlDmrsType Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 信道测量CSI端口数量 + /// + /// + /// + /// + /// + public async Task ModifyCsiRsPortNum(Cell cell, string csiRsPortNum) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCsiRsPortNum GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD CELLCSIRSPARACFG:LOCALCELLID=1,CSIRSPORTNUM=CSI_RS_PORT_8; + command = "MOD CELLCSIRSPARACFG:LOCALCELLID=" + cell.CellId + ",CSIRSPORTNUM=" + csiRsPortNum + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCsiRsPortNum execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCsiRsPortNum Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 信道测量CSI周期 + /// + /// + /// + /// + /// + public async Task ModifyCsiPeriod(Cell cell, string csiPeriod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCsiPeriod GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD NRDUCELLCSIRS:NRDUCELLID=1,CSIPERIOD=SLOT20; + command = "MOD NRDUCELLCSIRS:NRDUCELLID=" + cell.CellId + ",CSIPERIOD=" + csiPeriod + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD CELLCSIRSPARACFG:LOCALCELLID=1,CSIRSPERIOD=ms10; + command = "MOD CELLCSIRSPARACFG:LOCALCELLID=" + cell.CellId + ",CSIRSPERIOD=" + csiPeriod + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCsiPeriod execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCsiPeriod Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 时频跟踪TRS周期 + /// + /// + /// + /// + /// + public async Task ModifyTrsPeriod(Cell cell, string trsPeriod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyTrsPeriod GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // + command = "MOD NRDUCELLCSIRS:NRDUCELLID=" + cell.CellId + ",TRSPERIOD=" + trsPeriod + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyTrsPeriod execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyTrsPeriod Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// SRS周期和偏移 + /// + /// + /// + /// + /// + public async Task ModifySrsPeriod(Cell cell, string srsPeriod) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySrsPeriod GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + // + command = "MOD NRDUCELLCSIRS:NRDUCELLID=" + cell.CellId + ",TRSPERIOD=" + srsPeriod + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySrsPeriod execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySrsPeriod Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行PDCP丢弃定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyDlPdcpDiscardTimer(Cell cell, int pdcpParamGroupId, string dlPdcpDiscardTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifydlPdcpDiscardTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,DLPDCPDISCARDTIMER=MS30; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",DLPDCPDISCARDTIMER=MS" + dlPdcpDiscardTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID = 1,ULDLDISCARDTIMERSWITCH = ON,DLPDCPDISCARDTIMER = DiscardTimer_300; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + pdcpParamGroupId + ",ULDLDISCARDTIMERSWITCH=ON,DLPDCPDISCARDTIMER=DiscardTimer_" + dlPdcpDiscardTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifydlPdcpDiscardTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifydlPdcpDiscardTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行PDCP丢弃定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyUlPdcpDiscardTimer(Cell cell, int pdcpParamGroupId, string UlPdcpDiscardTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlPdcpDiscardTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,ULPDCPDISCARDTIMER=MS50; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",ULPDCPDISCARDTIMER=MS" + UlPdcpDiscardTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlPdcpDiscardTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUlPdcpDiscardTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB PDCP重排序定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBPdcpReorderingTimer(Cell cell, int pdcpParamGroupId, string gNBPdcpReorderingTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifygNBPdcpReorderingTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,GNBPDCPREORDERINGTIMER=MS0; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",GNBPDCPREORDERINGTIMER=MS" + gNBPdcpReorderingTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=2,ENODEBPDCPREORDERINGTIMER=MS40; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + pdcpParamGroupId + ",ENODEBPDCPREORDERINGTIMER=MS" + gNBPdcpReorderingTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifygNBPdcpReorderingTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifygNBPdcpReorderingTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE PDCP重排序定时器 + /// + /// + /// + /// + /// + /// + public async Task ModifyUEPdcpReorderingTimer(Cell cell, int pdcpParamGroupId, string uEdcpReorderingTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUEPdcpReorderingTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,UEPDCPREORDERINGTIMER=MS0; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",UEPDCPREORDERINGTIMER=MS" + uEdcpReorderingTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUEPdcpReorderingTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUEPdcpReorderingTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行PDCP序列号长度 + /// + /// + /// + /// + /// + /// + public async Task ModifyDlPdcpSnSize(Cell cell, int pdcpParamGroupId, string dlPdcpSnSize) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDlPdcpSnSize GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,DLPDCPSNSIZE=BITS12; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",DLPDCPSNSIZE=BITS" + dlPdcpSnSize + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDlPdcpSnSize execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDlPdcpSnSize Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行PDCP序列号长度 + /// + /// + /// + /// + /// + /// + public async Task ModifyUlPdcpSnSize(Cell cell, int pdcpParamGroupId, string ulPdcpSnSize) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlPdcpSnSize GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=1,ULPDCPSNSIZE=BITS12; + command = "MOD GNBPDCPPARAMGROUP:PDCPPARAMGROUPID=" + pdcpParamGroupId + ",ULPDCPSNSIZE=BITS" + ulPdcpSnSize + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlPdcpSnSize execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUlPdcpSnSize Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// RLC模式 + /// + /// + /// + /// + /// + /// + public async Task ModifyRlcMode(Cell cell, int rlcParamGroupId, string rlcMode) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyRlcMode GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + if (rlcMode == "1") + { + rlcMode = "AM"; + } + else + { + rlcMode = "UM"; + } + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=0,RLCMODE=AM; + + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + rlcMode + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + if (rlcMode == "1") + { + rlcMode = "AM"; + } + else + { + rlcMode = "UM"; + } + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=22,RLCMODE=RlcMode_AM; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_" + rlcMode + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyRlcMode execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyRlcMode Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE AM模式触发Polling 的字节数门限 + /// + /// + /// + /// + /// + /// + public async Task ModifyUeAmByteThldForTrigPoll(Cell cell, int rlcParamGroupId, string ueAmByteThldForTrigPoll) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeAmByteThldForTrigPoll GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,UEAMBYTETHLDFORTRIGPOLL=MB13; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",UEAMBYTETHLDFORTRIGPOLL=KB" + ueAmByteThldForTrigPoll + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,UEPOLLBYTE=PollByte_kb25; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,UEPOLLBYTE=PollByte_kb" + ueAmByteThldForTrigPoll + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeAmByteThldForTrigPoll execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeAmByteThldForTrigPoll Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB AM模式触发Polling的字节数门限 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBAmByteThldForTrigPoll(Cell cell, int rlcParamGroupId, string gNBAmByteThldForTrigPoll) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGNBAmByteThldForTrigPoll GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,GNBAMBYTETHLDFORTRIGPOLL=KB1; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",GNBAMBYTETHLDFORTRIGPOLL=KB" + gNBAmByteThldForTrigPoll + ";\r\n"; + } + + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,ENODEBPOLLBYTE=PollByte_kb25; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,ENODEBPOLLBYTE=PollByte_kb" + gNBAmByteThldForTrigPoll + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGNBAmByteThldForTrigPoll execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyGNBAmByteThldForTrigPoll Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE触发Polling的PDU个数门限 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyUePduNumThldForTrigPoll(Cell cell, int rlcParamGroupId, string uePduNumThldForTrigPoll) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUePduNumThldForTrigPoll GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,UEPDUNUMTHLDFORTRIGPOLL=PDU4; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",UEPDUNUMTHLDFORTRIGPOLL=PDU" + uePduNumThldForTrigPoll + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,UEPOLLPDU=PollPdu_p4; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,UEPOLLPDU=PollPdu_p" + uePduNumThldForTrigPoll + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUePduNumThldForTrigPoll execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUePduNumThldForTrigPoll Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB触发Polling的PDU个数门限 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBPduNumThldForTrigPoll(Cell cell, int rlcParamGroupId, string gNBPduNumThldForTrigPoll) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGNBPduNumThldForTrigPoll GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",GNBPDUNUMTHLDFORTRIGPOLL=PDU" + gNBPduNumThldForTrigPoll + ";\r\n"; + } + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,GNBPDUNUMTHLDFORTRIGPOLL=PDU4; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,ENODEBPOLLPDU=PollPdu_p4; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,ENODEBPOLLPDU=PollPdu_p" + gNBPduNumThldForTrigPoll + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGNBPduNumThldForTrigPoll execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyGNBPduNumThldForTrigPoll Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE Polling PDU重传定时器 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyUePollingPduRetransTimer(Cell cell, int rlcParamGroupId, string uePollingPduRetransTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUePollingPduRetransTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,UEPOLLINGPDURETRANSTIMER=MS35; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",UEPOLLINGPDURETRANSTIMER=MS" + uePollingPduRetransTimer + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,UEPOLLRETRANSMITTIMER=Tpollretrans_m35; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,UEPOLLRETRANSMITTIMER=Tpollretrans_m" + uePollingPduRetransTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUePollingPduRetransTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUePollingPduRetransTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB Polling PDU重传定时器 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBPollingPduRetransTimer(Cell cell, int rlcParamGroupId, string gNBPollingPduRetransTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGNBPollingPduRetransTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,GNBPOLLINGPDURETRANSTIMER=MS35; + + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",GNBPOLLINGPDURETRANSTIMER=" + gNBPollingPduRetransTimer + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,ENODEBPOLLRETRANSMITTIMER=Tpollretrans_m35; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,ENODEBPOLLRETRANSMITTIMER=" + gNBPollingPduRetransTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGNBPollingPduRetransTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyGNBPollingPduRetransTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE禁止发送状态报告定时器 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyUeAmStatusRptProhibitTmr(Cell cell, int rlcParamGroupId, string ueAmStatusRptProhibitTmr) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeAmStatusRptProhibitTmr GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,UEAMSTATUSRPTPROHIBITTMR=MS35; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",UEAMSTATUSRPTPROHIBITTMR=MS" + ueAmStatusRptProhibitTmr + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,UEPOLLRETRANSMITTIMER=Tpollretrans_m35; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,UESTATUSPROHIBITTIMER=Tpollretrans_m" + ueAmStatusRptProhibitTmr + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeAmStatusRptProhibitTmr execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeAmStatusRptProhibitTmr Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB AM模式禁止发送状态报告定时器 + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBAmStatusRptProhibitTmr(Cell cell, int rlcParamGroupId, string gNBAmStatusRptProhibitTmr) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGNBAmStatusRptProhibitTmr GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",GNBAMSTATUSRPTPROHIBITTMR=MS" + gNBAmStatusRptProhibitTmr + ";\r\n"; + } + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,GNBAMSTATUSRPTPROHIBITTMR=MS35; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + //MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=1,RLCMODE=RlcMode_AM,ENODEBSTATUSPROHIBITTIMER=Tstatprohibit_m0; + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=RlcMode_AM,ENODEBSTATUSPROHIBITTIMER=Tstatprohibit_m" + gNBAmStatusRptProhibitTmr + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGNBAmStatusRptProhibitTmr execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyGNBAmStatusRptProhibitTmr Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// gNodeB RLC重组定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyGNBRlcReassemblyTimer(Cell cell, int rlcParamGroupId, string gNBRlcReassemblyTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyGNBRlcReassemblyTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",GNBRLCREASSEMBLYTIMER=MS" + gNBRlcReassemblyTimer + ";\r\n"; + } + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,GNBRLCREASSEMBLYTIMER=MS5,UERLCREASSEMBLYTIMER=MS5; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyGNBRlcReassemblyTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyGNBRlcReassemblyTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE RLC重组定时器 + /// + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyUeRlcReassemblyTimer(Cell cell, int rlcParamGroupId, string ueRlcReassemblyTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUeRlcReassemblyTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",UERLCREASSEMBLYTIMER=MS" + ueRlcReassemblyTimer + ";\r\n"; + } + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=2,RLCMODE=AM,RADIOBEARERTYPE=DRB,UERLCREASSEMBLYTIMER=MS5; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUeRlcReassemblyTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUeRlcReassemblyTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行RLC序列号长度 + /// + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyDlRlcSnSize(Cell cell, int rlcParamGroupId, string DlRlcSnSize) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDlRlcSnSize GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=1,RLCMODE=AM,RADIOBEARERTYPE=DRB,DLRLCSNSIZE=BITS12; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",DLRLCSNSIZE=BITS" + DlRlcSnSize + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string RLCMODE = ""; + var ret = SendRead($"LST RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + + if (match.Success) + { + if (match.Groups[1].Value.Contains("AM")) + { + RLCMODE = "RlcMode_AM"; + } + else + { + RLCMODE = "RlcMode_UM"; + } + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE + ",DLRLCSNSIZE=RlcSnSize_size" + DlRlcSnSize + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDlRlcSnSize execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyDlRlcSnSize Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行RLC序列号长度 + /// + /// + /// + /// + /// + /// + /// + /// + public async Task ModifyUlRlcSnSize(Cell cell, int rlcParamGroupId, string ulRlcSnSize) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlRlcSnSize GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=1,RLCMODE=AM,RADIOBEARERTYPE=DRB,ULRLCSNSIZE=BITS12; + string RLCMODE = ""; + string RADIOBEARERTYPE = ""; + var ret = SendRead($"LST GNBRLCPARAMGROUP:RLCPARAMGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"无线承载类型\s*=\s*([^\s]+)"; + string patternrlc = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match matchrlc = Regex.Match(ret, patternrlc); + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + RADIOBEARERTYPE = match.Groups[1].Value; + RLCMODE = matchrlc.Groups[1].Value; + command = "MOD GNBRLCPARAMGROUP:RLCPARAMGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE.Substring(0, 2) + ",RADIOBEARERTYPE=" + RADIOBEARERTYPE + ",ULRLCSNSIZE=BITS" + ulRlcSnSize + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string RLCMODE = ""; + var ret = SendRead($"LST RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID={rlcParamGroupId};\r\n"); + string pattern = @"RLC模式\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + + if (match.Success) + { + if (match.Groups[1].Value.Contains("AM")) + { + RLCMODE = "RlcMode_AM"; + } + else + { + RLCMODE = "RlcMode_UM"; + } + + command = "MOD RLCPDCPPARAGROUP:RLCPDCPPARAGROUPID=" + rlcParamGroupId + ",RLCMODE=" + RLCMODE + ",ULRLCSNSIZE=RlcSnSize_size" + ulRlcSnSize + ";\r\n"; + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlRlcSnSize execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyUlRlcSnSize Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + public async Task ModifydefaultPagingCycle(Cell cell, string defaultPagingCycle) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifydefaultPagingCycle GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPAGINGCONFIG:NRDUCELLID=" + cell.CellId + ",DEFAULTPAGINGCYCLE=RF" + defaultPagingCycle + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifydefaultPagingCycle execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifydefaultPagingCycle Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 周期bsr定时器 + /// + /// + /// NR:SF1, SF5, SF10, SF16, SF20, SF32, SF40, SF64, SF80, SF128, SF160, SF320, SF640, SF1280, SF2560, INFINITY LTE:TPeriodBSRTimer_sf5, TPeriodBSRTimer_sf10, TPeriodBSRTimer_sf16, TPeriodBSRTimer_sf20, TPeriodBSRTimer_sf32, TPeriodBSRTimer_sf40, TPeriodBSRTimer_sf64, TPeriodBSRTimer_sf80, TPeriodBSRTimer_sf128, TPeriodBSRTimer_sf160, TPeriodBSRTimer_sf320, TPeriodBSRTimer_sf640, TPeriodBSRTimer_sf1280, TPeriodBSRTimer_sf2560, TPeriodBSRTimer_infinity + /// /// LTE 时候用QCI_1, QCI_2, QCI_3, QCI_4, QCI_5, QCI_6, QCI_7, QCI_8, QCI_9, QCI_65, QCI_66, QCI_69, QCI_70, QCI_75, QCI_79 + /// + public async Task ModifyBSR_prdPhrTimer(Cell cell, string prdBsrTimer, string QCI) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyBSR_prdPhrTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",PERIODICBSRTIMER=" + prdBsrTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD TYPDRBBSR:QCI=" + QCI + ",TPERODICBSRTIMER=" + prdBsrTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyBSR_prdPhrTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyBSR_prdPhrTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 重传BSR定时器 + /// + /// + /// NR:SF10, SF20, SF40, SF80, SF160, SF320, SF640, SF1280, SF2560, SF5120 LTE:sf320, sf640, sf1280, sf2560, sf5120, sf10240 + /// LTE 时候用QCI_1, QCI_2, QCI_3, QCI_4, QCI_5, QCI_6, QCI_7, QCI_8, QCI_9, QCI_65, QCI_66, QCI_69, QCI_70, QCI_75, QCI_79 + /// + public async Task ModifyBSR_retxPhrTimer(Cell cell, string retxBsrTimer, string QCI) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyBSR_retxPhrTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",RETRANSBSRTIMER=" + retxBsrTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD TYPDRBBSR:QCI=" + QCI + ",RETXBSRTIMER=" + retxBsrTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyBSR_retxPhrTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyBSR_retxPhrTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 周期PHR定时器 + /// + /// + /// 取值范围SF10, SF20, SF50, SF100, SF200, SF500, SF1000, INFINITY + /// + public async Task ModifyPHR_prdPhrTimer(Cell cell, string phr_PeriodicTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyPHR_prdPhrTimer GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLULPCCONFIG:NRDUCELLID=" + cell.CellId + ",PHRPERIODICTIMER=" + phr_PeriodicTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = ""; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyPHR_prdPhrTimer execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyPHR_prdPhrTimer Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 上行初始BLER + /// + /// + /// + /// + /// + public async Task ModifyUlTargetIbler(Cell cell, string UlTargetIbler) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyUlTargetIbler GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPUSCH:NRDUCELLID=" + cell.CellId + ",ULTARGETIBLER=" + UlTargetIbler + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = ""; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyUlTargetIbler execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyUlTargetIbler Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 下行初始BLER + /// + /// + /// + /// + /// + public async Task ModifyDLTARGETIBLER(Cell cell, string DLTARGETIBLER) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDLTARGETIBLER GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLPDSCH:NRDUCELLID=" + cell.CellId + ",DLTARGETIBLER=" + DLTARGETIBLER + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = ""; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDLTARGETIBLER execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyDLTARGETIBLER Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + /// + /// 初始BWP + /// + /// + /// + /// + /// + public async Task ModifyBwpConfigPolicySwitch(Cell cell, string BwpConfigPolicySwitch) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyBwpConfigPolicySwitch GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //MOD NRDUCELLALGOSWITCH:NRDUCELLID=2,BWPCONFIGPOLICYSWITCH=INIT_BWP_FULL_BW_SW-1; + command = "MOD NRDUCELLALGOSWITCH:NRDUCELLID=" + cell.CellId + ",BWPCONFIGPOLICYSWITCH=" + BwpConfigPolicySwitch + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = ""; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyBwpConfigPolicySwitch execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyBwpConfigPolicySwitch Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + + + /// + /// NR异系统重选优先级 + /// + /// + /// + /// + public async Task ModifyHeterosystemCellResel(Cell cell, int cellReselectionPriority, string DLEARFCN) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyHeterosystemCellResel GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLEUTRANNFREQ:NRCELLID=" + cell.CellId + ",DLEARFCN=" + DLEARFCN + ",EUTRANFREQRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",CELLRESELPRIORITY=" + cellReselectionPriority + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyHeterosystemCellResel execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyHeterosystemCellResel Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE不活动定时器 + /// + /// + /// + /// + public async Task ModifyInactiveParameterSingle(Cell cell, int inactiveTimer, string QCI) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyIntraFReselection GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRDUCELLQCIBEARER:NRDUCELLID=" + cell.CellId + ",QCI=" + QCI + ",UEINACTIVITYTIMER=" + inactiveTimer + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD QCIPARA:QCI=" + QCI + ",UEINACTIVETIMERFORQCI=" + inactiveTimer + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyIntraFReselection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyIntraFReselection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// UE不活动定时器 + /// + /// + /// + /// + public async Task ModifyInactiveParameter(Cell cell, string inactiveTimer) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyIntraFReselection GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + var qcilist = SendRead($"LST NRDUCELLQCIBEARER:NRDUCELLID={cell.CellId};\r\n"); + string pattern = @"\(结果个数 = (\d+)\)"; + MatchCollection matches = Regex.Matches(qcilist, pattern); + var info = GetMatchCollections(qcilist); + int num = 0; + for (int j = 0; j < matches.Count; j++) + { + if (j == 0) + { + num = num + 9; + } + else + { + num = num + 9 + 7; + } + string resultNumber = matches[j].Groups[1].Value; + for (int i = 0; i < int.Parse(resultNumber); i++) + { + var com = "MOD NRDUCELLQCIBEARER:NRDUCELLID=" + cell.CellId + ",QCI=" + info[num + i][1] + ",UEINACTIVITYTIMER=" + inactiveTimer + ";\r\n"; + SendRead(com); + } + num = num + int.Parse(resultNumber); + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + var qcilist = SendRead($"LST QCIPARA:;\r\n"); + string pattern = @"\(结果个数 = (\d+)\)"; + // 执行匹配 + MatchCollection matches = Regex.Matches(qcilist, pattern); + var info = GetMatchCollections(qcilist); + int num = 0; + for (int j = 0; j < matches.Count; j++) + { + if (j == 0) + { + num = num + 9; + } + else + { + num = num + 9 + 7; + } + string resultNumber = matches[j].Groups[1].Value; + for (int i = 0; i < int.Parse(resultNumber); i++) + { + var com = "MOD QCIPARA:QCI=" + info[num + i][0] + ",UEINACTIVITYTIMERDYNDRXQCI=" + inactiveTimer + ";\r\n"; + SendRead(com); + } + num = num + int.Parse(resultNumber); + } + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyIntraFReselection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyIntraFReselection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频异系统重选起测门限RSRP + /// + /// + /// + /// + public async Task ModifySNonIntraSearchP(Cell cell, double sNonIntraSearchP) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifySNonIntraSearchP GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",NONINTRAFREQMEASRSRPTHLD=" + sNonIntraSearchP + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SNONINTRASEARCHCFGIND=CFG,SNONINTRASEARCH=" + sNonIntraSearchP + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifySNonIntraSearchP execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifySNonIntraSearchP Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频异系统重选起测门限RSRQ + /// + /// + /// + /// + public async Task ModifySNonIntraSearchQ(Cell cell, double sNonIntraSearchQ) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyIntraFReselection GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",NONINTRAFREQMEASRSRQTHLD=" + sNonIntraSearchQ + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SNONINTRASEARCHQ=" + sNonIntraSearchQ + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyIntraFReselection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyIntraFReselection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频异系统低优先级重选门限RSRP + /// + /// + /// + /// + public async Task ModifyThreshServingLowP(Cell cell, double threshServingLowP) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshServingLowP GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",SERVFREQLOWPRIRSRPRESELTHD=" + threshServingLowP + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQLOWPRIRESELTHLD=" + threshServingLowP + ";\r\n"; + } + + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshServingLowP execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshServingLowP Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 异频异系统低优先级重选门限RSRQ + /// + /// + /// + /// + public async Task ModifyThreshServingLowQ(Cell cell, double threshServingLowQ) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyThreshServingLowQ GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",SERVFREQLOWPRIRSRQRESELTHD=" + threshServingLowQ + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + string DLARFCN = ""; + var ret = SendRead($"LST NRNFREQ:LOCALCELLID={cell.CellId};\r\n"); + string pattern = @"下行频点\s*=\s*([^\s]+)"; + // 使用Regex.Match来查找匹配项 + Match match = Regex.Match(ret, pattern); + if (match.Success) + { + DLARFCN = match.Groups[1].Value; + command = "MOD NRNFREQ:LOCALCELLID=" + cell.CellId + ",DLARFCN=" + DLARFCN + ",NRFREQLOWPRIRESELTHLDRSRQ=" + threshServingLowQ + ";\r\n"; + } + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyThreshServingLowQ execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyThreshServingLowQ Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + //华为不支持基于覆盖的A4事件,可使用A5替代,即将A5的门限1设置非常高的值也就等效变成了A4 + public Task ModifyA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + return Task.CompletedTask; + } + public async Task ModifyA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + // 测量参数组标识 + var INTRAFREQHOMEASGROUPID = 0; + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyA5Threshold GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { //COVINTERFREQA5RSRPTHLD1 -156~-31(-106) COVINTERFREQA5RSRPTHLD2 -156~-31(-110) + command = "MOD NRCELLINTERFHOMEAGRP:NRCELLID=" + cell.CellId + ",INTERFREQHOMEASGROUPID=" + INTRAFREQHOMEASGROUPID + ",INTERFREQA4A5HYST=" + hysteresisA5 + ",COVINTERFREQA5RSRPTHLD1=" + rsrpThreshold + ",COVINTERFREQA5RSRPTHLD2=" + A5Thrd1Rsrp + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + {//INTERFREQHOA1THDRSRP -140~-43(-105) INTERFREQHOA2THDRSRP-140~-43( -109) + command = "MOD INTERFREQHOGROUP:LOCALCELLID=" + cell.CellId + ",INTERFREQHOGROUPID=" + INTRAFREQHOMEASGROUPID + ",InterFreqHoA4ThdRsrp=" + rsrpThreshold + ",InterFreqHoA5Thd1Rsrp=" + A5Thrd1Rsrp + ";INTERFREQHOA4HYST=" + hysteresisA5 + "\r\n"; + + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"SetA2Threshold execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyA5Threshold {cell.Name} Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public async Task ModifyULBANDWIDTH(Cell cell, double BandWidth, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyULBANDWIDTH GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改带宽时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULBANDWIDTH=CELL_BW_" + BandWidth + "M;\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",ULBANDWIDTH=CELL_BW_N" + (int)(BandWidth * 5) + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyULBANDWIDTH execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($" ModifyULBANDWIDTH Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public async Task ModifyDLBANDWIDTH(Cell cell, double BandWidthUl, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyDLBANDWIDTH GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改带宽时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLBANDWIDTH=CELL_BW_" + BandWidthUl + "M;\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLBANDWIDTH=CELL_BW_N" + (int)(BandWidthUl * 5) + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyDLBANDWIDTH execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($" ModifyDLBANDWIDTH Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public async Task ModifyCarrierFrequency(Cell cell, string Frequency, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCarrierFrequency GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + Frequency + ",ULNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + Frequency + ",ULNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + Frequency + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + Frequency + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + Frequency + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCarrierFrequency execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyCarrierFrequency Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public async Task ModifyCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCarrierFrequency GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改频点时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",DLNARFCN=" + earfcnDL + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + duplexmode = ",DUPLEXMODE=CELL_SUL"; + command += duplexmode + ",ULNARFCN=" + earfcnUL + ";\r\n"; + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",DLEARFCN=" + earfcnDL + ",ULEARFCNCFGIND=CFG,ULEARFCN=" + earfcnUL + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCarrierFrequency execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyCarrierFrequency Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + /// + /// 物理小区标识 + /// + /// + /// + /// + /// + /// + public async Task ModifyCarrierPCI(Cell cell, string CarrierPCI, bool wait) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + if (cell == null) + return 0; + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCarrierPCI GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return 0; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + //BTS59005GNE 类型修改pci时必须传入duplexmode + command = "MOD NRDUCELL:NRDUCELLID=" + cell.CellId; + var duplexmode = ""; + if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_FDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + duplexmode = ",DUPLEXMODE=CELL_TDD"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SDL) + { + duplexmode = ",DUPLEXMODE=CELL_SDL"; + command += duplexmode + ",PHYSICALCELLID=" + CarrierPCI + ";\r\n"; + } + if (cell.MobileStandard == CellMobileStandardEnum.SUL) + { + return 0;//SUL模式不能修改pci + } + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELL:LOCALCELLID=" + cell.CellId + ",PHYCELLID=" + CarrierPCI + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCarrierPCI execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"{cell.Name} ModifyCarrierPCI Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public async Task ModifyCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + + if (cellPcis.Count != null) + { + for (int i = 0; i < cellPcis.Count; i++) + { + ModifyCarrierPCI(cellPcis[i].Item1, cellPcis[i].Item2, true); + } + } + return -1; + } + /// + /// 最低接收电平 + /// + /// + /// + /// + /// + public async Task ModifyCellSelection(Cell cell, double LevelValue) + { + cell = CellList.FirstOrDefault(x => x.Name == cell.Name); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCellSelection GetCGPOMU failed result:{CGPOMUT[3][3]}.", IsRecordlog); + return -1; + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",MINIMUMRXLEVEL=" + LevelValue + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",QRXLEVMIN=" + LevelValue + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellSelection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellSelection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + public int ModifyCoFrequencyMeasurementStartUpThreshold(string cellName, double value) + { + var cell = CellList.Where(x => x.Name == cellName).FirstOrDefault(); + + try + { + //var _client = ConnectAndLogin(); + var CGPOMU = SendRead("REG NE:NAME=\"" + cell.NetworkElementName + "\";\r\n"); + var CGPOMUT = GetMatchCollections(CGPOMU); + if (CGPOMUT[3][2].ToString() != "0") + { + // Logger.WriteLog($"ModifyCoFrequencyMeasurementStartUpThreshold GetCGPOMU failed result:{CGPOMUT[3][3].ToString()}.", IsRecordlog); + } + var command = ""; + if (cell.NetworkType == NetworkTypeEnum.NR) + { + command = "MOD NRCELLRESELCONFIG:NRCELLID=" + cell.CellId + ",INTRAFREQMEASSTARTTHLD=" + value + ";\r\n"; + } + else if (cell.NetworkType == NetworkTypeEnum.LTE) + { + command = "MOD CELLRESEL:LOCALCELLID=" + cell.CellId + ",SINTRASEARCHQ=" + value + ";\r\n"; + } + var res = SendRead(command); + var resinfo = GetMatchCollections(res); + if (!res.Contains("RETCODE = 0")) + { + // Logger.WriteLog($"ModifyCellSelection execute failed result:{res}.", IsRecordlog); + return -1; + } + else + { + return 0; + } + } + catch (Exception ex) + { + // Logger.WriteLog($"ModifyCellSelection Exception:{ex.Message}.", IsRecordlog); + return -1; + } + } + + public async Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait) + { + throw new NotImplementedException(); + } + + public int BeforTest() + { + throw new NotImplementedException(); + } + + public int AfterTest() + { + throw new NotImplementedException(); + } + #endregion + + + } + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/AlarmsInfoRoot.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/AlarmsInfoRoot.cs new file mode 100644 index 00000000..abf70d95 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/AlarmsInfoRoot.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary.BaseStation.Nokia.Model +{ + public class AlarmAdditionalInfo + { + public string shared { get; set; } + public int additionalFaultID { get; set; } + public string destinationIPAddr { get; set; } + public string additionalFaultReason { get; set; } + public string supplAlarmInfo { get; set; } + } + + public class AlarmInformation + { + public string alarmDetail { get; set; } + public int alarmDetailNbr { get; set; } + public string faultDescription { get; set; } + public AlarmAdditionalInfo alarmAdditionalInfo { get; set; } + } + + public class AlarmingObjectId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class ImpactedCellsList + { + public object NR { get; set; } + } + + public class AlarmRequestMessage + { + public string id { get; set; } + public string severity { get; set; } + public string observationTime { get; set; } + public int alarmId { get; set; } + public int faultId { get; set; } + public List alarmingObjectIds { get; set; } + public string alarmName { get; set; } + public string faultSeverity { get; set; } + public AlarmInformation alarmInformation { get; set; } + public List impactedCellsList { get; set; } + public string eventType { get; set; } + } + public class AlarmsInfoRoot + { + public string time { get; set; } + public int requestId { get; set; } + public string requestStatus { get; set; } + public List requestMessage { get; set; } + public int errorCode { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/NokiaBaseRoot.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/NokiaBaseRoot.cs new file mode 100644 index 00000000..f62ee07e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/Model/NokiaBaseRoot.cs @@ -0,0 +1,912 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + +namespace MTNet.Application.DriverLibrary.BaseStation.Nokia.Model +{ + public class AlarmIdList + { + public List raisedBySource { get; set; } + public List impactingSource { get; set; } + } + + public class AntenaUsageInfo + { + public Id id { get; set; } + public string direction { get; set; } + } + + public class AntennaLineId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class BasebandModule + { + public List ports { get; set; } + public Id id { get; set; } + public CabinetId cabinetId { get; set; } + public string fullCapacityInUse { get; set; } + public string productName { get; set; } + public string productCode { get; set; } + public string serialNumber { get; set; } + public Status status { get; set; } + } + + public class Cabinet + { + public Id id { get; set; } + public int release { get; set; } + public FanStatus fanStatus { get; set; } + public string productCode { get; set; } + public string productName { get; set; } + } + + public class CabinetId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class Cable + { + public Id id { get; set; } + public FirstEndPointId firstEndPointId { get; set; } + public SecondEndPointId secondEndPointId { get; set; } + public LinkMode linkMode { get; set; } + public int linkMaxPhysicalCapacity { get; set; } + public double fiberLength { get; set; } + public string cablinkType { get; set; } + public string linkSpeed { get; set; } + public Status status { get; set; } + } + + public class CarrierList + { + public Id id { get; set; } + public AntennaLineId antennaLineId { get; set; } + public string direction { get; set; } + } + + + public class Cells + { + public List lte { get; set; } + public List wcdma { get; set; } + public List gsm { get; set; } + public List nr { get; set; } + } + + public class CellsGroup + { + public Id id { get; set; } + public List nrCellList { get; set; } + public string name { get; set; } + } + + public class Coordinates + { + } + + public class Fan + { + public string name { get; set; } + public string distName { get; set; } + public StateInfo stateInfo { get; set; } + } + + public class FanStatus + { + public List fans { get; set; } + } + + public class FirstEndPointId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class Gnsse + { + public AlarmIdList alarmIdList { get; set; } + public Id id { get; set; } + public string name { get; set; } + public Parameters parameters { get; set; } + public SndParameters sndParameters { get; set; } + public Position position { get; set; } + public StateInfo stateInfo { get; set; } + } + + public class Id + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class LinkMode + { + public bool configuration { get; set; } + public bool data { get; set; } + public bool synchronization { get; set; } + public bool dc { get; set; } + } + + public class Nr + { + public Id id { get; set; } + public int globalCellId { get; set; } + public string band { get; set; } + public List carrierList { get; set; } + public string cellName { get; set; } + public int physicalCellId { get; set; } + public string technology { get; set; } + public string nrCellType { get; set; } + public string cellDepType { get; set; } + public string expectedCellSize { get; set; } + public int maximumOutputPower { get; set; } + public string downlinkMimoMode { get; set; } + public string energySavingState { get; set; } + public string chBw { get; set; } + public int nrarfcn { get; set; } + public Status status { get; set; } + public string IPAddress { get; set; } + public int port { get; set; } + public string lcrId { get; set; } + } + + public class NrDU + { + public Id id { get; set; } + public Status status { get; set; } + public int gNbDuId { get; set; } + public List refNrCellGroup { get; set; } + } + + public class Parameters + { + public string selfSurveyStatus { get; set; } + public string ppsOutput { get; set; } + } + + public class Port + { + public Id id { get; set; } + public string label { get; set; } + } + + public class Position + { + public object latitude { get; set; } + public object longitude { get; set; } + public object altitude { get; set; } + } + + public class RadioModules + { + public List rmod { get; set; } + public List asirmod { get; set; } + } + + public class RatState + { + public string lte { get; set; } + public string wcdma { get; set; } + public string gsm { get; set; } + public string nr { get; set; } + } + + public class RequestMessage + { + public Id id { get; set; } + public string name { get; set; } + public int mrbtsID { get; set; } + public Coordinates coordinates { get; set; } + public SwInfo swInfo { get; set; } + public Status status { get; set; } + public RatState ratState { get; set; } + public string gNbCuType { get; set; } + public int nrBtsId { get; set; } + public List nrDU { get; set; } + public List cabinets { get; set; } + public List systemModules { get; set; } + public RadioModules radioModules { get; set; } + public List basebandModules { get; set; } + public List powerModules { get; set; } + public List transportModules { get; set; } + public List alds { get; set; } + public List cables { get; set; } + public List loglinks { get; set; } + public Cells cells { get; set; } + public List gnsse { get; set; } + public List gnssi { get; set; } + public List fhs { get; set; } + public List externalAlarmBoxes { get; set; } + public List cellsGroup { get; set; } + } + + public class Rmod + { + public List ports { get; set; } + public Id id { get; set; } + public Status status { get; set; } + public FanStatus fanStatus { get; set; } + public List carrierList { get; set; } + public List antenaUsageInfo { get; set; } + public string productName { get; set; } + public string productCode { get; set; } + public string serialNumber { get; set; } + } + + public class NokiaBaseRoot + { + public string time { get; set; } + public int requestId { get; set; } + public string requestStatus { get; set; } + public RequestMessage requestMessage { get; set; } + public int errorCode { get; set; } + } + public class RootFailed + { + public int requestId { get; set; } + public string time { get; set; } + public string requestStatus { get; set; } + public string requestMessage { get; set; } + + public int errorCode { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class DelActivationResult + { + public string indicationDistName { get; set; } + public ResultNode resultNode { get; set; } + } + + public class DelCommissioningResult + { + public DelActivationResult activationResult { get; set; } + public bool isGoingToTriggerReset { get; set; } + } + + public class DelLogs + { + public object skippedElements { get; set; } + public object missingObjectsErrors { get; set; } + public object maxOccurrencesErrors { get; set; } + public object definitionErrors { get; set; } + public List relationErrors { get; set; } + public List hardwareErrors { get; set; } + } + + public class DelModifiedObjectsDistNames + { + public List modified { get; set; } + public List deleted { get; set; } + } + + public class DelNiddValidationResult + { + public DelLogs logs { get; set; } + public string status { get; set; } + } + + public class DelParameters + { + public List resetCoverage { get; set; } + public List rejectedObjects { get; set; } + public string result { get; set; } + public string feedback { get; set; } + } + + public class DelPdlValidationResult + { + public DelLogs logs { get; set; } + public string status { get; set; } + } + + public class DelRequestMessage + { + public DelCommissioningResult commissioningResult { get; set; } + public DelValidationResult validationResult { get; set; } + public DelModifiedObjectsDistNames modifiedObjectsDistNames { get; set; } + } + + public class DelResultNode + { + public string distName { get; set; } + public DelParameters parameters { get; set; } + } + + public class DelRoot + { + public string time { get; set; } + public int requestId { get; set; } + public string requestStatus { get; set; } + public DelRequestMessage requestMessage { get; set; } + public int errorCode { get; set; } + } + + public class DelValidationResult + { + public DelNiddValidationResult niddValidationResult { get; set; } + public DelPdlValidationResult pdlValidationResult { get; set; } + } + + + public class RootModify + { + public int requestId { get; set; } + public string time { get; set; } + public string requestStatus { get; set; } + public FailedRequestMessage requestMessage { get; set; } + + public int errorCode { get; set; } + } + public class SecondEndPointId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class SndParameters + { + public string LNApowerSupply { get; set; } + public string holdoverMode { get; set; } + public string locationMode { get; set; } + public bool actBeidou { get; set; } + public bool actGalileo { get; set; } + public bool actGlonass { get; set; } + public bool actGps { get; set; } + public bool actQzss { get; set; } + } + + public class StateInfo + { + public string operationalState { get; set; } + public string availabilityStatus { get; set; } + public string usageState { get; set; } + public string administrativeState { get; set; } + } + + public class Status + { + public string blockingState { get; set; } + public string operationalState { get; set; } + public string proceduralState { get; set; } + public string administrativeState { get; set; } + public string availabilityStatus { get; set; } + public string usageState { get; set; } + public string proceduralStatus { get; set; } + public string barringStatus { get; set; } + } + + public class SwInfo + { + public string swVersion { get; set; } + public string nrRatVersion { get; set; } + } + + public class SystemModule + { + public List ports { get; set; } + public Id id { get; set; } + public CabinetId cabinetId { get; set; } + public FanStatus fanStatus { get; set; } + public string productCode { get; set; } + public string productName { get; set; } + public string serialNumber { get; set; } + public Status status { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class ActivationResult + { + public string indicationDistName { get; set; } + public ResultNode resultNode { get; set; } + } + + public class CommissioningResult + { + public ActivationResult activationResult { get; set; } + public bool isGoingToTriggerReset { get; set; } + } + + public class Logs + { + public object skippedElements { get; set; } + public object missingObjectsErrors { get; set; } + public object maxOccurrencesErrors { get; set; } + public object definitionErrors { get; set; } + public List relationErrors { get; set; } + public List hardwareErrors { get; set; } + } + + public class ModifiedObjectsDistNames + { + public List modified { get; set; } + public List deleted { get; set; } + } + + public class NiddValidationResult + { + public Logs logs { get; set; } + public string status { get; set; } + } + + public class FailedParameters + { + public List resetCoverage { get; set; } + public List rejectedObjects { get; set; } + public string result { get; set; } + public string feedback { get; set; } + } + + public class PdlValidationResult + { + public Logs logs { get; set; } + public string status { get; set; } + } + + public class RelationError + { + public string distName { get; set; } + public string pdl { get; set; } + public string feedback { get; set; } + public string severity { get; set; } + public List relatedObjects { get; set; } + } + + public class FailedRequestMessage + { + public CommissioningResult commissioningResult { get; set; } + public ValidationResult validationResult { get; set; } + public ModifiedObjectsDistNames modifiedObjectsDistNames { get; set; } + } + + public class ResultNode + { + public string distName { get; set; } + public FailedParameters parameters { get; set; } + } + + public class ValidationResult + { + public NiddValidationResult niddValidationResult { get; set; } + public PdlValidationResult pdlValidationResult { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class List + { + [JsonProperty("@name")] + public string name { get; set; } + public object item { get; set; } + public object p { get; set; } + + } + + public class ManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public List

p { get; set; } + public List list { get; set; } + } + + public class P + { + [JsonProperty("@name")] + public string name { get; set; } + + [JsonProperty("#text")] + public string text { get; set; } + + public override string ToString() + { + return $"{name}, {text}"; + } + } + public class NRBTSP + { + [JsonProperty("@name")] + public string name { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + + [JsonProperty("#text")] + public string text { get; set; } + } + + public class NRBTSRoot + { + public NRBTSP p { get; set; } + } + public class ManagedRoot + { + public ManagedObject managedObject { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class Item + { + public List

p { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class NRHOIRItem + { + public List p { get; set; } + } + + public class NRHOIRList + { + [JsonProperty("@name")] + public string name { get; set; } + public NRHOIRItem item { get; set; } + } + + public class NRHOIRManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public List p { get; set; } + public NRHOIRList list { get; set; } + } + + public class NRHOIRP + { + [JsonProperty("@name")] + public string name { get; set; } + + [JsonProperty("#text")] + public string text { get; set; } + + public override string ToString() + { + return $"{name}, {text}"; + } + } + + public class NRHOIRRoot + { + public NRHOIRManagedObject managedObject { get; set; } + } + public class NRHOIFItem + { + public List

p { get; set; } + } + + public class NRHOIFList + { + [JsonProperty("@name")] + public string name { get; set; } + public NRHOIFItem item { get; set; } + } + public class NRHOIFManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public List

p { get; set; } + public List list { get; set; } + } + public class NRHOIFRoot + { + public NRHOIFManagedObject managedObject { get; set; } + } + public class LTEList + { + [JsonProperty("@name")] + public string name { get; set; } + public Item item { get; set; } + } + + public class LTEManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public List

p { get; set; } + public List list { get; set; } + } + + public class LTERoot + { + public LTEManagedObject managedObject { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + + public class LNADJList + { + [JsonProperty("@name")] + public string name { get; set; } + public Item item { get; set; } + } + + public class LNADJManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public List

p { get; set; } + public LNADJList list { get; set; } + } + public class LNADJRoot + { + public LNADJManagedObject managedObject { get; set; } + } + + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class LteAntennaLineId + { + public string @internal { get; set; } + public string configuration { get; set; } + public string runtime { get; set; } + } + + public class LteCarrierList + { + public LteId id { get; set; } + public LteAntennaLineId antennaLineId { get; set; } + public string direction { get; set; } + } + + public class LteCounters + { + public int activeUEs { get; set; } + public int successfullyAssignedRadioBearers { get; set; } + } + + public class LteintCounters + { + public int activeUEs { get; set; } + public int successfullyAssignedRadioBearers { get; set; } + } + public class LteId + { + public string @internal { get; set; } + public string configuration { get; set; } + } + public class LteRootint + { + public LteId id { get; set; } + public string cellName { get; set; } + public int globalCellId { get; set; } + public string downlinkChannelBandwidth { get; set; } + public string uplinkChannelBandwidth { get; set; } + public int uplinkFrequency { get; set; } + public int downlinkFrequency { get; set; } + public int bandNumber { get; set; } + public int maximumOutputPower { get; set; } + public string downlinkMimoMode { get; set; } + public int maximumNumberOfActiveUEs { get; set; } + public int maximumBitrateDownlink { get; set; } + public int maximumBitrateUplink { get; set; } + public LteintCounters counters { get; set; } + public List carrierList { get; set; } + public int physicalCellId { get; set; } + public int eutranCellId { get; set; } + public string technology { get; set; } + public string narrowbandIotMode { get; set; } + public string cellType { get; set; } + public string expectedCellSize { get; set; } + public int earfcnDownlink { get; set; } + public int earfcnUplink { get; set; } + public string energySavingState { get; set; } + public string actRtPerfMonitoring { get; set; } + public LteStatus status { get; set; } + public string IPAddress { get; set; } + public int port { get; set; } + } + public class LteRoot + { + public LteId id { get; set; } + public string cellName { get; set; } + public int globalCellId { get; set; } + public string downlinkChannelBandwidth { get; set; } + public string uplinkChannelBandwidth { get; set; } + public int uplinkFrequency { get; set; } + public int downlinkFrequency { get; set; } + public int bandNumber { get; set; } + public int maximumOutputPower { get; set; } + public string downlinkMimoMode { get; set; } + public int maximumNumberOfActiveUEs { get; set; } + public int maximumBitrateDownlink { get; set; } + public int maximumBitrateUplink { get; set; } + public LteCounters counters { get; set; } + public List carrierList { get; set; } + public int physicalCellId { get; set; } + public int eutranCellId { get; set; } + public string technology { get; set; } + public string narrowbandIotMode { get; set; } + public string cellType { get; set; } + public string expectedCellSize { get; set; } + public int earfcnDownlink { get; set; } + public int earfcnUplink { get; set; } + public string energySavingState { get; set; } + public string actRtPerfMonitoring { get; set; } + public LteStatus status { get; set; } + + public string IPAddress { get; set; } + public int port { get; set; } + public string lcrId { get; set; } + + } + + public class LteStatus + { + public string administrativeState { get; set; } + public string availabilityStatus { get; set; } + public string operationalState { get; set; } + public string usageState { get; set; } + public string blockingState { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class XNLINKManagedObject + { + [JsonProperty("@class")] + public string @class { get; set; } + + [JsonProperty("@distName")] + public string distName { get; set; } + + [JsonProperty("@version")] + public string version { get; set; } + + [JsonProperty("@operation")] + public string operation { get; set; } + + [JsonProperty("@xmlns")] + public string xmlns { get; set; } + public P p { get; set; } + } + + public class XNLINKRoot + { + public XNLINKManagedObject managedObject { get; set; } + } + + #region 创/删 邻区相关参数实体对象 + + public class PlanObject + { + [JsonProperty("distName")] + public string DistName { get; set; } + + [JsonProperty("operation")] + public string Operation { get; set; } + + [JsonProperty("parameters")] + public List Parameters { get; set; } + } + + public class Parameter + { + [JsonProperty("parameterName")] + public string ParameterName { get; set; } + + [JsonProperty("operation")] + public string Operation { get; set; } + + [JsonProperty("value")] + public object Value { get; set; } + + public override string ToString() + { + return $"{ParameterName}, {Operation}, {Value}"; + } + } + + public class GnbPlmn + { + [JsonProperty("mcc")] + public int Mcc { get; set; } + + [JsonProperty("mnc")] + public int Mnc { get; set; } + + [JsonProperty("mncLength")] + public int MncLength { get; set; } + + public override string ToString() + { + return $"{Mcc}, {Mnc}, {MncLength}"; + } + } + + public class ParameterBody + { + [JsonProperty("planObjects")] + public List PlanObjects { get; set; } + + [JsonProperty("skipParameterRelationErrors")] + public bool SkipParameterRelationErrors { get; set; } + + [JsonProperty("shouldBeActivated")] + public bool ShouldBeActivated { get; set; } + } + + public class RequestBody + { + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("parameters")] + public ParameterBody ParameterBody { get; set; } + } + + public class Root + { + [JsonProperty("requestId")] + public int RequestId { get; set; } + + [JsonProperty("parameters")] + public RequestBody Parameters { get; set; } + } + + #endregion +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/NokiaBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/NokiaBaseStationTester.cs new file mode 100644 index 00000000..b104992a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/NokiaBaseStationTester.cs @@ -0,0 +1,3056 @@ + +using MTNet.Application.ConnectBase; +using MTNet.Application.DriverLibrary.BaseStation.Nokia.Model; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using MTNet.Application.IDAL.Utils; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Xml; + + +namespace MTNet.Application.DriverLibrary.BaseStation.Nokia; + +public class NokiaBaseStationTester : ConnectInstBase, INokiaBaseStationTester +{ + private static string NokiaBaseStationCLIDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SBTS24R1_ENB_0000_001516_000004_ADMIN_CLI"); + private static string SpecialStr = @"{\"; + private static string SpecialStr2 = @"\"; + private static string SpecialStr3 = "}}}\""; + + int _rtn = 0; + string _cmd = ""; + bool _disposed { get; set; } = false; + + private List CellList = new List(); + + ///

+ /// 构造函数 + /// + /// + /// + public NokiaBaseStationTester(DeviceAddrConfig addrConfig) : base(addrConfig) + { + } + + public NokiaBaseStationTester(BaseStationTesterAddrConfig addrConfig) : base(addrConfig) + { + + } + + #region 接口实现 + + public override int Close() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"Virtual Turntable DisConnect Success!"); + return _rtn; + } + + public override int Connect() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"Nokia BaseStation Connect Success!"); + return _rtn; + } + + public void Dispose() + { + return; + } + + + + public async Task SetCellState(Cell cell, bool state) + { + int rtn = 0; + try + { + if (cell.FactoryType == BaseStationTesterTypeEnum.Nokia) + { + //DeviceControlLogger.Logger.Error($"SetCellState {cell.Nokia_cellName}."); + + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + if (state) + { + return await NokiaLock(cell.IPAddress, cell.Port, cell.Idconfiguration); + } + else + { + return await NokiaUnLock(cell.IPAddress, cell.Port, cell.Idconfiguration); + } + } + if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + if (state) + { + + //unlocked locked + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "administrativeState", $"locked"); + + return ResultCode; + } + else + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "administrativeState", $"unlocked"); + return ResultCode; + } + } + else + { + //DeviceControlLogger.Logger.Error($"{cell.Nokia_cellName} Current MobileStandard :{cell.MobileStandard}."); + return 0; + } + } + else + { + //DeviceControlLogger.Logger.Error($"{cell.Nokia_cellName} Current Cell FactoryType:{cell.FactoryType} SetCellState Not FactoryType.Nokia."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(15); + //DeviceControlLogger.Logger.Error($"{cell.Nokia_cellName} SetCellState result:{ex.Message}."); + return rtn; + } + + } + + public int SetMinAccessLevel(string cellName, double level) + { + return _rtn; + } + + public int SetReselectPriority(string cellName, int priority) + { + return _rtn; + } + + + public int SetCoFrequencyMeasurementStartUpThreshold(string cellName, double value) + { + return _rtn; + } + + public int SetNeighborhoodRelations(string cellName1, string cellName2) + { + return _rtn; + } + + public int QuerySiteState() + { + return _rtn; + } + + + public Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{cell.IPAddress}' --bts-port='{cell.Port}'"; + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var cellroot = GetNokiaNRCELL(cell.IPAddress, cell.Port); + + if (cellroot == null) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} get scf ok nokianrcell null."); + return Task.FromResult(-1); + } + + Item itemp = new Item(); + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var itemlist in item.managedObject.list) + { + if (itemlist.name == "a2MeashoSsbRsrpSA") + { + string myJson = JsonConvert.SerializeObject(itemlist.item); + itemp = JsonConvert.DeserializeObject(myJson); + break; + } + } + } + } + if (itemp == null) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} get a2MeashoSsbRsrpSA item null."); + } + else + { + //update SA + var modify = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":2,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{cell.Idconfiguration}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a2MeashoSsbRsrpSA{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"a2ThresholdhoSsbRsrpSA{SpecialStr2}\":{rsrpThresholdA2},{SpecialStr2}\"{itemp.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[1].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[1].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[3].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[3].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set a2ThresholdSA result:{bsInforoot.errorCode}."); + } + + Item itema2MeashoSsbRsrp = new Item(); + + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var itemlist in item.managedObject.list) + { + if (itemlist.name == "a2MeashoSsbRsrp") + { + string myJson = JsonConvert.SerializeObject(itemlist.item); + itema2MeashoSsbRsrp = JsonConvert.DeserializeObject(myJson); + break; + } + } + } + } + if (itema2MeashoSsbRsrp == null) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} get a2MeashoSsbRsrp item null."); + } + else + { + var modify2 = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":2,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{cell.Idconfiguration}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a2MeashoSsbRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"a2ThresholdhoSsbRsrp{SpecialStr2}\":{rsrpThresholdA2},{SpecialStr2}\"{itema2MeashoSsbRsrp.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{itema2MeashoSsbRsrp.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itema2MeashoSsbRsrp.p[2].name}{SpecialStr2}\":{SpecialStr2}\"{itema2MeashoSsbRsrp.p[2].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var result2 = ReturnStr(modify2); + RootModify bsInforoot2 = JsonConvert.DeserializeObject(result2); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set a2Threshold result:{bsInforoot2.requestMessage}."); + return Task.FromResult(bsInforoot2.errorCode); + } + return Task.FromResult(0); + + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "threshold2InterFreq", $"{rsrpThresholdA2}", "hysThreshold2InterFreq", $"{hysteresisA2}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetA2Threshold result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetA2Threshold Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + + public Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3) + { + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var cellroot = GetNokiaNRCELL(cell.IPAddress, cell.Port); + + if (cellroot == null) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} get scf ok nokianrcell null."); + return Task.FromResult(-1); + } + Item itemp = new Item(); + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var itemlist in item.managedObject.list) + { + if (itemlist.name == "a3MeasSsbRsrp") + { + string myJson = JsonConvert.SerializeObject(itemlist.item); + itemp = JsonConvert.DeserializeObject(myJson); + break; + } + } + } + } + if (itemp == null) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} get a3MeasSsbRsrp item null."); + } + else + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{cell.IPAddress}' --bts-port='{cell.Port}'"; + var modify = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{cell.Idconfiguration}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a3MeasSsbRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"{itemp.p[1].name}{SpecialStr2}\":{eventOffset},{SpecialStr2}\"{itemp.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[2].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[2].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set a3MeasSsbRsrp result:{bsInforoot.errorCode}."); + return Task.FromResult(bsInforoot.errorCode); + } + return Task.FromResult(0); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "a3Offset", $"{eventOffset}", "hysA3Offset", $"{hysteresisA3}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetA3Threshold result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetA3Threshold Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + public Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + return Task.FromResult(0); + } + public Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{cell.IPAddress}' --bts-port='{cell.Port}'"; + + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var cellroot = GetNokiaNRCELL(cell.IPAddress, cell.Port); + if (cellroot == null) + { + //DeviceControlLogger.Logger.Info($"set A1Threshold get scf ok null."); + return Task.FromResult(-1); + + } + Item itemp = new Item(); + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var itemlist in item.managedObject.list) + { + if (itemlist.name == "a1MeashoSsbRsrpSA") + { + string myJson = JsonConvert.SerializeObject(itemlist.item); + itemp = JsonConvert.DeserializeObject(myJson); + break; + } + } + } + } + if (itemp == null) + { + //DeviceControlLogger.Logger.Info($"set a1MeashoSsbRsrpSA item null."); + } + else + { + //sa + var modify1 = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":2,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{cell.Idconfiguration}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a1MeashoSsbRsrpSA{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"a1ThresholdhoSsbRsrpSA{SpecialStr2}\":{rsrpThresholdA1},{SpecialStr2}\"{itemp.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[1].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[1].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[3].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[3].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[4].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[4].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + + var result1 = ReturnStr(modify1); + RootModify bsInforoot1 = JsonConvert.DeserializeObject(result1); + //DeviceControlLogger.Logger.Info($"set a1MeashoSsbRsrpSA result:{bsInforoot1.requestMessage}."); + } + + Item itema2MeashoSsbRsrp = new Item(); + + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var itemlist in item.managedObject.list) + { + if (itemlist.name == "a1MeashoSsbRsrp") + { + string myJson = JsonConvert.SerializeObject(itemlist.item); + itema2MeashoSsbRsrp = JsonConvert.DeserializeObject(myJson); + break; + } + } + } + } + + if (itema2MeashoSsbRsrp == null) + { + //DeviceControlLogger.Logger.Info($"set a1MeashoSsbRsrp item null."); + } + else + { + //nsa + var modify2 = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":2,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{cell.Idconfiguration}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a1MeashoSsbRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"a1ThresholdhoSsbRsrp{SpecialStr2}\":{rsrpThresholdA1},{SpecialStr2}\"{itema2MeashoSsbRsrp.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{itema2MeashoSsbRsrp.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itema2MeashoSsbRsrp.p[2].name}{SpecialStr2}\":{SpecialStr2}\"{itema2MeashoSsbRsrp.p[2].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var result2 = ReturnStr(modify2); + RootModify bsInforoot2 = JsonConvert.DeserializeObject(result2); + //DeviceControlLogger.Logger.Info($"set a1MeashoSsbRsrp result:{bsInforoot2.requestMessage}."); + return Task.FromResult(bsInforoot2.errorCode); + + } + return Task.FromResult(0); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "threshold2a", $"{rsrpThresholdA1}", "hysThreshold2a", $"{hysteresisA1}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetA1Threshold result:{ResultCode}."); + return Task.FromResult(ResultCode); + + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA1Threshold Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + public Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd2Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{cell.IPAddress}' --bts-port='{cell.Port}'"; + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var NRHOIF = GetNokiaNRHOIF(cell.IPAddress, cell.Port); + string NRHOIFDistName = ""; + string a5HysteresisSsbRsrp = "0"; + string a5TimeToTriggerSsbRsrp = "ms0"; + foreach (var item in NRHOIF) + { + if (item[item.Count - 1].p.text.IndexOf($"NRCELL-{cell.MoId}") != -1) + { + foreach (var itemP in item) + { + + if (itemP.p.name == "ssbFrequency") + { + + if (itemP.p.name == "ssbFrequency") + { + if (itemP.p.text == cell.ssbFrequency) + { + foreach (var ititemP_P in item) + { + if (ititemP_P.p.name == "a5HysteresisSsbRsrp") + { + a5HysteresisSsbRsrp = ititemP_P.p.text; + } + if (ititemP_P.p.name == "a5TimeToTriggerSsbRsrp") + { + a5TimeToTriggerSsbRsrp = ititemP_P.p.text; + } + } + NRHOIFDistName = item[item.Count - 1].p.text; + break; + } + } + } + } + } + } + if (NRHOIFDistName == "") + { + //DeviceControlLogger.Logger.Info($"{cell.IPAddress}_{cell.Nokia_cellName} SetA5Threshold NRHOIF Not Goal ssbFrequency."); + return Task.FromResult(-1); + } + else + { + var modify = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{NRHOIFDistName}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"a5MeasSsbRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"a5Threshold1SsbRsrp{SpecialStr2}\":{rsrpThreshold},{SpecialStr2}\"a5Threshold2SsbRsrp{SpecialStr2}\":{A5Thrd2Rsrp},{SpecialStr2}\"a5HysteresisSsbRsrp{SpecialStr2}\":{a5HysteresisSsbRsrp},{SpecialStr2}\"a5TimeToTriggerSsbRsrp{SpecialStr2}\":{SpecialStr2}\"{a5TimeToTriggerSsbRsrp}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set A5Threshold result:{bsInforoot.errorCode}."); + return Task.FromResult(bsInforoot.errorCode); + } + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var cellroot = GetNokiaLTELNHOIF(cell.IPAddress, cell.Port); + if (cellroot == null || cellroot.Count == 0) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} GetNokiaLTELNHOIF count 0."); + return Task.FromResult(-1); + } + else + { + foreach (var item in cellroot) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + foreach (var itemp in item) + { + if (itemp.p.name == "eutraCarrierInfo") + { + if (itemp.p.text == $"{LNHOIF_eutraCarrierInfo}") + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "threshold3InterFreq", $"{rsrpThreshold}", "threshold3aInterFreq", $"{A5Thrd2Rsrp}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName}_{item[item.Count - 1].p.text} SetA5Threshold result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + } + } + } + } + //DeviceControlLogger.Logger.Info($"{cell.IPAddress} LTELNHOIF Not eutraCarrierInfo:{LNHOIF_eutraCarrierInfo}"); + return Task.FromResult(0); + } + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{cell.IPAddress}_{cell.Name} SetA5Threshold Exception:{ex.Message}."); + return Task.FromResult(-1); + } + + + } + + public Task SetB1Threshold(Cell cell, int value1) + { + return Task.FromResult(0); + } + + public Task SetB2Threshold(Cell cell, int value1, int value2) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{cell.IPAddress}' --bts-port='{cell.Port}'"; + + var NRHOIR = GetNokiaNRHOIR(cell.IPAddress, cell.Port); + + if (NRHOIR.Count == 0) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set B2Threshold GetNokiaNRHOIR Count 0."); + return Task.FromResult(-1); + } + var modify1 = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{NRHOIR[0].managedObject.distName}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"b2Threshold1hoRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{value1}{SpecialStr2}\",{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var result1 = ReturnStr(modify1); + RootModify bsInforoot1 = JsonConvert.DeserializeObject(result1); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set B2Threshold Value1 result:{bsInforoot1.requestMessage}."); + + NRHOIRItem nRHOIRItem = new NRHOIRItem(); + if (NRHOIR[0].managedObject.list.name == "eutraB2MeashoRsrp") + { + string myJson = JsonConvert.SerializeObject(NRHOIR[0].managedObject.list.item); + nRHOIRItem = JsonConvert.DeserializeObject(myJson); + } + + //B2 value2 + //var modify = RunCmdWithResult($"{admin} --format=human --data='{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{NRHOIR[0].managedObject.distName}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eutraB2MeashoRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"b2Threshold2hoRsrp{SpecialStr2}\":{rsrpThresholdA2},{SpecialStr2}\"{nRHOIRItem.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[1].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[1].text}{SpecialStr2}\",{SpecialStr2}\"{itemp.p[3].name}{SpecialStr2}\":{SpecialStr2}\"{itemp.p[3].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + var modify2 = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{NRHOIR[0].managedObject.distName}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eutraB2MeashoRsrp{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"b2Threshold2hoRsrp{SpecialStr2}\":{value2},{SpecialStr2}\"{nRHOIRItem.p[0].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[0].text}{SpecialStr2}\",{SpecialStr2}\"{nRHOIRItem.p[1].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[1].text}{SpecialStr2}\",{SpecialStr2}\"{nRHOIRItem.p[3].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[3].text}{SpecialStr2}\",{SpecialStr2}\"{nRHOIRItem.p[4].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[4].text}{SpecialStr2}\",{SpecialStr2}\"{nRHOIRItem.p[5].name}{SpecialStr2}\":{SpecialStr2}\"{nRHOIRItem.p[5].text}{SpecialStr2}\"{"}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + + var result2 = ReturnStr(modify2); + RootModify bsInforoot2 = JsonConvert.DeserializeObject(result2); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set B2Threshold Value2 result:{bsInforoot2.requestMessage}."); + return Task.FromResult(bsInforoot2.errorCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(20); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set B2Threshold Exception {ex.Message}."); + return Task.FromResult(rtn); + } + + + } + + public Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool await) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "chBw", BandWidth.ToString()); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set Bandwidth result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var cellroot = GetNokiaLTECELL(cell.IPAddress, cell.Port); + if (cellroot == null || cellroot.Count == 0) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} GetNokiaLTECELL count 0."); + return Task.FromResult(-1); + } + else + { + int ResultCode = -1; + foreach (var item in cellroot) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "dlChBw", $"{BandWidth} MHz", "ulChBw", $"{BandWidth} MHz"); + //DeviceControlLogger.Logger.Info($"{cell.IPAddress}_{cell.Nokia_cellName} SetBandwidth result:{ResultCode}."); + } + } + return Task.FromResult(ResultCode); + } + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetBandwidth Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + + public Task SetCarrierPCI(Cell cell, string CarrierPCI, bool await) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "physCellId", CarrierPCI); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set CarrierPCI result:{ResultCode}."); + return Task.FromResult(ResultCode); + + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "phyCellId", CarrierPCI); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set CarrierPCI result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierPCI Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + public Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + int rtn = 0; + try + { + cellPcis = cellPcis.ToList(); + + foreach (var item in cellPcis) + { + if (item.Item1.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(item.Item1.IPAddress, item.Item1.Port, item.Item1.Idconfiguration, "physCellId", item.Item2); + //DeviceControlLogger.Logger.Info($"{item.Item1.Nokia_cellName} set CarrierPCI result:{ResultCode}."); + return Task.FromResult(ResultCode); + + } + else if (item.Item1.MobileStandard == CellMobileStandardEnum.LTE) + { + var ResultCode = NokiaModifySCF(item.Item1.IPAddress, item.Item1.Port, item.Item1.Idconfiguration, "phyCellId", item.Item2); + //DeviceControlLogger.Logger.Info($"{item.Item1.Nokia_cellName} set CarrierPCI result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + return Task.FromResult(rtn); + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI cellPcis Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + public Task SetCarrierFrequency(Cell cell, string Frequency, bool await) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "nrarfcn", Frequency); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set CarrierFrequency result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var LTECELL = GetNokiaLTECELL(cell.IPAddress, cell.Port); + if (LTECELL == null && LTECELL.Count == 0) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierFrequency GetNokiaLTECELL count 0."); + return Task.FromResult(-1); + } + foreach (var item in LTECELL) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "earfcnDL", $"{Frequency}", "earfcnUL", $"{Frequency}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierFrequency result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + } + return Task.FromResult(0); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierFrequency Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + + } + + #endregion + + + public static string ReturnStr(string str) + { + List list = new List(); + string text2 = ""; + text2 = str; + + while (true) + { + string sss = "CLI LOG:"; + int num1 = text2.IndexOf(sss); + if (num1 < 0) + { + + } + int nums = num1 + sss.Length; + text2 = text2.Substring(nums, text2.Length - nums); + + if (text2.IndexOf(sss) == -1) + { + break; + } + } + return text2; + } + public static string RunCmdWithResult(string cmdStr, int waitTimeoutMS) + { + cmdStr = cmdStr.Trim().TrimEnd('&') + "&exit"; + using (Process process = new Process()) + { + process.StartInfo.WorkingDirectory = NokiaBaseStationCLIDirectory; + process.StartInfo.FileName = "cmd.exe"; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardInput = true; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; + process.StartInfo.CreateNoWindow = true; + process.Start(); + process.StandardInput.WriteLine(cmdStr); + process.StandardInput.AutoFlush = true; + StreamReader standardOutput = process.StandardOutput; + StreamReader standardError = process.StandardError; + string result = standardOutput.ReadToEnd() + standardError.ReadToEnd(); + process.WaitForExit(waitTimeoutMS); + process.Close(); + return result; + } + } + public Task CreateRelations(Cell FirstCell, Cell SecondCell) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{FirstCell.IPAddress}' --bts-port='{FirstCell.Port}'"; + if (FirstCell.MobileStandard == CellMobileStandardEnum.LTE && SecondCell.MobileStandard == CellMobileStandardEnum.LTE) + { + var SecondCellLNBTS = GetNokiaLNBTS(SecondCell.IPAddress, SecondCell.Port); + string mcc = "460"; + string mnc = "7"; + int mncLength = 2; + if (SecondCellLNBTS != null) + { + foreach (var item in SecondCellLNBTS) + { + foreach (var itemp in item) + { + if (itemp.p.name == "mcc") + { + mcc = itemp.p.text; + } + else if (itemp.p.name == "mnc") + { + mnc = itemp.p.text; + } + } + } + } + List> LTELNADJ = GetNokiaLTELNADJ(FirstCell.IPAddress, FirstCell.Port); + string Cmd = ""; + if (LTELNADJ == null || LTELNADJ.Count == 0) + { + Cmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{FirstCell.Idconfiguration.Split("/")[0] + "/" + FirstCell.Idconfiguration.Split("/")[1]}/LNADJ-0{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"create{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"adjEnbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddr{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{SecondCell.IPAddress}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddrCtrl{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"oamControlled{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"rlfBasedRCRsupported{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":false{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"plmnId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + } + else + { + foreach (var item in LTELNADJ) + { + foreach (var itemP in item) + { + //distName + if (itemP.p.text == SecondCell.IPAddress) + { + //DeviceControlLogger.Logger.Info($"CreateRelations This already exists."); + return Task.CompletedTask; + } + else if (itemP.p.name == "distName") + { + int newldnadjId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in LTELNADJ) + { + foreach (var excludeitemP in excludeitem) + { + if (excludeitemP.p.name == "distName") + { + var excludeitemPdis = excludeitemP.p.text.Split('-'); + int exc = (Convert.ToInt32(excludeitemPdis[excludeitemPdis.Length - 1])); + exclude.Add(exc); + } + } + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 255 - exclude.Count); + newldnadjId = range.ElementAt(index); + Cmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{FirstCell.Idconfiguration.Split("/")[0] + "/" + FirstCell.Idconfiguration.Split("/")[1]}/LNADJ-{newldnadjId}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"create{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"adjEnbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddr{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{SecondCell.IPAddress}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddrCtrl{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"oamControlled{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"rlfBasedRCRsupported{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":false{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"plmnId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + } + } + } + } + if (Cmd == "") + { + //DeviceControlLogger.Logger.Info($"CreateRelations Execute CreateRelation Cmd null."); + return Task.CompletedTask; + } + var CreateRelation = RunCmdWithResult(Cmd, 8000); + var result = ReturnStr(CreateRelation); + RootFailed rootFailed = JsonConvert.DeserializeObject(result); + + //DeviceControlLogger.Logger.Info($"CreateRelations result:{rootFailed.requestMessage}."); + + return Task.FromResult(rootFailed.errorCode); + } + else if (FirstCell.MobileStandard == CellMobileStandardEnum.NR && SecondCell.MobileStandard == CellMobileStandardEnum.NR) + { + + var NRREL = GetNokiaNRREL(FirstCell.IPAddress, FirstCell.Port); + if (NRREL == null) + { + return Task.CompletedTask; + } + var NRRELdistName = ""; + foreach (var item in NRREL)//查找当前两个小区是否有邻区关系 + { + //cell1 + if (item.managedObject.distName.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + ///cell2 + //if (item.managedObject.p[2].text == SecondCell.NodeBId && item.managedObject.p[5].text == SecondCell.MoId) + if (item.managedObject.p.FirstOrDefault(x => x.name == "gNbId").text == SecondCell.NodeBId.ToString() && item.managedObject.p.FirstOrDefault(x => x.name == "lcrId").text == SecondCell.MoId) + { + NRRELdistName = item.managedObject.distName; + } + } + } + if (NRRELdistName == "")//无邻区 + { + //目标plmn + var SecondCellNRBTS = GetNokiaNRBTS_P(SecondCell.IPAddress, SecondCell.Port); + string mcc = "460"; + string mnc = "7"; + int mncLength = 2; + if (SecondCellNRBTS != null) + { + foreach (var item in SecondCellNRBTS) + { + foreach (var itemp in item) + { + if (itemp.p.name == "mcc") + { + mcc = itemp.p.text; + } + if (itemp.p.name == "mnc") + { + mnc = itemp.p.text; + } + if (itemp.p.name == "mncLength") + { + mncLength = Convert.ToInt32(itemp.p.text); + } + } + } + } + + //获取随机新的NRRELId + int newnrrelId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in NRREL) + { + if (excludeitem.managedObject.distName.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + var excludeitemPdis = excludeitem.managedObject.distName.Split('-'); + int exc = (Convert.ToInt32(excludeitemPdis[excludeitemPdis.Length - 1])); + exclude.Add(exc); + } + + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 255 - exclude.Count); + newnrrelId = range.ElementAt(index); + + //不存在邻区 创建NRREL + //创建5G同站邻区 + if (FirstCell.NodeBId == SecondCell.NodeBId) + { + //string NRRELCmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{FirstCell.Idconfiguration}/NRREL-{newnrrelId}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"create{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrpOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"0dB{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrqOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"0dB{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbIdLength{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{24}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"handoverAllowedSA{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"allowed{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"lcrId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.MoId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"removeNotAllowed{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"false{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gnbPlmn{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + + string distName = $"{FirstCell.Idconfiguration}/NRREL-{newnrrelId}"; + var parameters = new List + { + new Parameter { ParameterName = "cellIndividualSsbRsrpOffset", Operation = NokiaOperationType.Update.GetDescription(), Value = "0dB" }, + new Parameter { ParameterName = "cellIndividualSsbRsrqOffset", Operation = NokiaOperationType.Update.GetDescription(), Value = "0dB" }, + new Parameter { ParameterName = "handoverAllowedSARedCap", Operation = NokiaOperationType.Update.GetDescription(), Value = "forbidden" }, + new Parameter { ParameterName = "handoverAllowedSA", Operation = NokiaOperationType.Update.GetDescription(), Value = "allowed" }, + new Parameter { ParameterName = "removeNotAllowed", Operation = NokiaOperationType.Update.GetDescription(), Value = false }, + new Parameter { ParameterName = "nrDcAllowed", Operation = NokiaOperationType.Update.GetDescription(), Value = false }, + new Parameter { ParameterName = "gNbIdLength", Operation = NokiaOperationType.Update.GetDescription(), Value = 24 }, + new Parameter { ParameterName = "gNbId", Operation = NokiaOperationType.Update.GetDescription(), Value = SecondCell.NodeBId }, + new Parameter { ParameterName = "lcrId", Operation = NokiaOperationType.Update.GetDescription(), Value = SecondCell.MoId }, + new Parameter { ParameterName = "gnbPlmn", Operation = NokiaOperationType.Update.GetDescription(), Value = new List { new GnbPlmn { Mcc = Convert.ToInt32(mcc), Mnc = Convert.ToInt32(mnc), MncLength = mncLength } } }, + }; + string cmdText = GetRelCommand(FirstCell.IPAddress, FirstCell.Port, distName, parameters); + + for (int i = 0; i < 1; i++) + { + var modify = RunCmdWithResult(cmdText, 8000); + var result = ReturnStr(modify); + var json = Newtonsoft.Json.Linq.JObject.Parse(result); + var status = json["requestStatus"].ToString(); + var code = json["errorCode"].ToString(); + if (status.Equals("completed")) + { + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} CreateRelations result:{bsInforoot.errorCode}."); + return Task.FromResult(bsInforoot.errorCode); + } + //if (status.Equals("failed") && code == "24")//nrRelId已存在 + //{ + // break; + //} + + //for (int t = 0; t < 20; t++) + //{ + // System.Threading.Thread.Sleep(1000); + //} + } + return Task.CompletedTask; + + //var modify = RunCmdWithResult(cmdText, 8000); + //var result = ReturnStr(modify); + //var json = Newtonsoft.Json.Linq.JObject.Parse(result); + //var status = json["requestStatus"].ToString(); + //if (status.Equals("failed")) + //{ + // for (int i = 0; i < 10; i++) + // { + // System.Threading.Thread.Sleep(1000); + // } + // modify = RunCmdWithResult(cmdText, 8000); + // result = ReturnStr(modify); + //} + ////var aa = GetNokiaNRREL(FirstCell.IPAddress, FirstCell.Port); + //RootModify bsInforoot = JsonConvert.DeserializeObject(result); + ////DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} CreateRelations result:{bsInforoot.errorCode}."); + //return Task.FromResult(bsInforoot.errorCode); + } + else + { + ///5G邻接关系 + var NRADJNRCEL = GetNokiaNRADJNRCELL(FirstCell.IPAddress, FirstCell.Port); + bool IsExecute = false; + foreach (var item in NRADJNRCEL) + { + + if (item.managedObject.p[3].text == $"{SecondCell.NodeBId}" && item.managedObject.p[5].text == $"{SecondCell.MoId}") + { + IsExecute = true; + break; + } + } + if (IsExecute) + { + string NRRELCmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{FirstCell.Idconfiguration}/NRREL-{newnrrelId}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"create{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrpOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"0dB{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrqOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"0dB{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbIdLength{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{24}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"handoverAllowedSA{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"allowed{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"lcrId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.MoId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"removeNotAllowed{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"false{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gnbPlmn{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + var modify = RunCmdWithResult(NRRELCmd, 8000); + + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} CreateRelations result:{bsInforoot.errorCode}."); + return Task.FromResult(bsInforoot.errorCode); + } + else + { + //DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} GetNokiaNRADJNRCELL Not Found {SecondCell.NodeBId}-{SecondCell.PCI}."); + return Task.FromResult(-1); + } + } + } + else//有邻区 + { + return Task.CompletedTask; + } + } + else + { + if (FirstCell.MobileStandard == CellMobileStandardEnum.NR) + { + var NRRELE = GetNokiaStructural(FirstCell.IPAddress, FirstCell.Port, "NRRELE"); + var NRRELEdistName = ""; + foreach (var item in NRRELE) + { + if (item[item.Count - 1].p.text.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + if (item[1].p.text == SecondCell.NodeBId.ToString() && item[3].p.text == SecondCell.MoId) + { + NRRELEdistName = item[item.Count - 1].p.text; + break; + } + } + } + //不等于“”有这个邻区 + if (NRRELEdistName == "") + { + var NRADJECELL = GetNokiaStructural(FirstCell.IPAddress, FirstCell.Port, "NRADJECELL"); + bool IsExecute = false; + + foreach (var item in NRADJECELL) + { + if (item[0].p.text == SecondCell.NodeBId.ToString() && item[3].p.text == SecondCell.MoId) + { + IsExecute = true; + break; + } + + } + if (IsExecute) + { + var SecondCellLNBTS = GetNokiaLNBTS(SecondCell.IPAddress, SecondCell.Port); + string mcc = "460"; + string mnc = "7"; + int mncLength = 2; + if (SecondCellLNBTS != null) + { + foreach (var item in SecondCellLNBTS) + { + foreach (var itemp in item) + { + if (itemp.p.name == "mcc") + { + mcc = itemp.p.text; + } + else if (itemp.p.name == "mnc") + { + mnc = itemp.p.text; + } + } + } + } + + int nrreleId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in NRRELE) + { + if (excludeitem[excludeitem.Count - 1].p.text.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + var excludeitemPdis = excludeitem[excludeitem.Count - 1].p.text.Split('-'); + int exc = (Convert.ToInt32(excludeitemPdis[excludeitemPdis.Length - 1])); + exclude.Add(exc); + } + + } + if (exclude.Count != 0) + { + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 255 - exclude.Count); + nrreleId = range.ElementAt(index); + } + string NRRELCmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{FirstCell.Idconfiguration}/NRRELE-{nrreleId}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"create{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"0dB{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eNodeBId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eutranCellBlacklisted{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":false{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"removeNotAllowed{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":false{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"lcrId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.MoId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"ecgiPlmn{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + var modify = RunCmdWithResult(NRRELCmd, 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} CreateRelations result:{bsInforoot.errorCode}."); + return Task.FromResult(bsInforoot.errorCode); + } + else + { + //DeviceControlLogger.Logger.Info($"{FirstCell.NodeBId}-{FirstCell.MoId} To {SecondCell.NodeBId}-{SecondCell.MoId} NRADJECELL Not Found {SecondCell.NodeBId}-{SecondCell.PCI}."); + return Task.FromResult(-1); + } + } + else + { + return Task.FromResult(0); + } + } + else + { + return Task.FromResult(0); + } + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"CreateRelations Exception:{ex.Message}."); + return Task.CompletedTask; + } + + } + public Task NokiaLock(string IPAddres, int Port, string distName) + { + int rtn = 0; + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var lockState = RunCmdWithResult($"{admin} --format=human --data={SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"requestType{SpecialStr2}\":{SpecialStr2}\"procedure{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"lock{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{distName}{SpecialStr2}\"}}}}}}", 8000); + var result = ReturnStr(lockState); + RootFailed rootFailed = JsonConvert.DeserializeObject(result); + + //DeviceControlLogger.Logger.Info($"NokiaLock result:{rootFailed.requestMessage}."); + return Task.FromResult(rootFailed.errorCode); + } + catch (Exception ex) + { + rtn = GetErrorCode(15); + //DeviceControlLogger.Logger.Info($"NokiaLock result:{ex.Message}."); + return Task.FromResult(rtn); + } + + } + public Task NokiaUnLock(string IPAddres, int Port, string distName) + { + int rtn = 0; + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var unlockState = RunCmdWithResult($"{admin} --format=human --data={SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"requestType{SpecialStr2}\":{SpecialStr2}\"procedure{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"unlock{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{distName}{SpecialStr2}\"}}}}}}", 8000); + + var result = ReturnStr(unlockState); + RootFailed rootFailed = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"NokiaUnLock result:{rootFailed.requestMessage}."); + + return Task.FromResult(rootFailed.errorCode); + } + catch (Exception ex) + { + rtn = GetErrorCode(15); + //DeviceControlLogger.Logger.Info($"NokiaUnLock result:{ex.Message}."); + return Task.FromResult(rtn); + } + + } + public Task> QueryFDDLteCells() + { + return null; + } + + public Task> QueryNrCells() + { + return null; + } + + public int NokiaModifySCF(string IPAddres, int Port, string DistName, string ParameterName, string ModifyValue) + { + try + { + //string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + //var modify = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"commission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"distName{SpecialStr2}\":{SpecialStr2}\"{DistName}{SpecialStr2}\",{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"{ParameterName}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{ModifyValue}{SpecialStr2}\",{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{SpecialStr3}", 8000); + + string cmdText = GetCmdText(IPAddres, Port, DistName, ParameterName, ModifyValue); + var modify = RunCmdWithResult(cmdText, 8000); + + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{IPAddres} {DistName} {ParameterName} ModifySCF result:{bsInforoot?.errorCode}."); + return bsInforoot.errorCode; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{IPAddres} {DistName} {ParameterName} NokiaModifySCF Exception:{ex.Message}."); + return -1; + } + + } + public int NokiaModifySCF(string IPAddres, int Port, string DistName, string ParameterName1, string ModifyValue1, string ParameterName2, string ModifyValue2) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{DistName}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"{ParameterName1}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{ModifyValue1}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"{ParameterName2}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{ModifyValue2}{SpecialStr2}\"{"}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"{IPAddres} {DistName} {ParameterName1}_{ParameterName2} ModifySCF result:{bsInforoot?.errorCode}."); + return bsInforoot.errorCode; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"{IPAddres} {DistName} {ParameterName1}_{ParameterName2} NokiaModifySCF Exception:{ex.Message}."); + return -1; + } + } + #region scf result + + public List> GetNokiaLNBTS(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List> listManagedObjectRoot = new List>(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "LNBTS") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS_P managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLNBTS Exception:{ex.Message}."); + continue; + } + + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLNBTS Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaNRBTS_P(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRBTS") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS_P managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS_P managedObject Exception:{ex.Message}."); + continue; + } + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS Exception:{ex.Message}."); + + return null; + } + + } + // + public List GetNokiaNRCELL(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRCELL") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + ManagedRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRCELL Exception:{ex.Message}."); + continue; + } + + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRCELL Exception:{ex.Message}."); + + return null; + } + + } + // + public List GetNokiaNRHOIR(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRHOIR") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + NRHOIRRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRHOIR Exception:{ex.Message}."); + continue; + } + + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRHOIR Exception:{ex.Message}."); + return null; + } + + } + public List> GetNokiaNRHOIF(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRHOIF") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRHOIF managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRHOIF Exception:{ex.Message}."); + continue; + } + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRHOIF Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaLTECELL(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List> listManagedObjectRoot = new List>(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "LNCEL_FDD") + { + + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS_P managedObject P Exception:{ex.Message}."); + continue; + } + } + + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTECELL Exception:{ex.Message}."); + continue; + } + + + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTECELL Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaLTESIB(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "SIB") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTESIB managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTESIB Exception:{ex.Message}."); + continue; + } + + + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTESIB Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaLTELNHOIF(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "LNHOIF") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTESIB managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTELNHOIF Exception:{ex.Message}."); + continue; + } + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTELNHOIF Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaLTELNADJ(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "LNADJ") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRBTS_P managedObject P Exception:{ex.Message}."); + continue; + } + } + + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTELNADJ Exception:{ex.Message}."); + continue; + } + + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaLTELNADJ Exception:{ex.Message}."); + + return null; + } + + } + public List> GetNokiaXNLINK(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "XNLINK") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaXNLINK managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaXNLINK Exception:{ex.Message}."); + + continue; + } + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaXNLINK Exception:{ex.Message}."); + + return null; + } + + } + public List GetNokiaNRADJGNB(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRADJGNB") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + NRHOIRRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJGNB Exception:{ex.Message}."); + + continue; + } + + + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJGNB Exception:{ex.Message}."); + + return null; + } + + } + public List GetNokiaNRADJNRCELL(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRADJNRCELL") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + NRHOIRRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJNRCELL Exception:{ex.Message}."); + + continue; + } + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJNRCELL Exception:{ex.Message}."); + + return null; + } + + } + /// + /// 查询NR邻区关系 + /// + /// + /// + /// + public List GetNokiaNRREL(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRREL") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + NRHOIRRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRREL Exception:{ex.Message}."); + + continue; + } + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRREL Exception:{ex.Message}."); + return null; + } + } + + + public List GetNokiaNRADJECELL(string IPAddres, int Port) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + + List listManagedObject = new List(); + + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == "NRADJECELL") + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + string json = JsonConvert.SerializeXmlNode(doc); + NRHOIRRoot managedObject = JsonConvert.DeserializeObject(json); + listManagedObject.Add(managedObject); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJECELL Exception:{ex.Message}."); + + continue; + } + } + } + return listManagedObject; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaNRADJECELL Exception:{ex.Message}."); + return null; + } + + } + public List> GetNokiaStructural(string IPAddres, int Port, string StructuralName) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + var modify = RunCmdWithResult($"{admin} --output-file=genScf_5G19B.xml --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"generateScf{SpecialStr2}\"{"}}"}\"", 8000); + var result = ReturnStr(modify); + RootModify bsInforoot = JsonConvert.DeserializeObject(result); + List> listManagedObjectRoot = new List>(); + //DeviceControlLogger.Logger.Info($"{IPAddres} get scf ok result:{bsInforoot.errorCode}."); + + if (bsInforoot.errorCode == 0) + { + string xmlPaths = Path.Combine(NokiaBaseStationCLIDirectory, "genScf_5G19B.xml"); + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.Load(xmlPaths); + XmlNodeList lis = xmlDoc.GetElementsByTagName("managedObject"); + foreach (XmlNode node in lis) + { + try + { + List listManagedObject = new List(); + + string[] Attributes = node.Attributes[0].Value.Split(':'); + if (Attributes[1] == StructuralName) + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(node.OuterXml); + XmlNodeList NRBTSPList = doc.GetElementsByTagName("p"); + foreach (XmlNode itemNRBTS in NRBTSPList) + { + try + { + XmlDocument NRBTSdoc = new XmlDocument(); + NRBTSdoc.LoadXml(itemNRBTS.OuterXml); + string NRBTSjson = JsonConvert.SerializeXmlNode(NRBTSdoc); + NRBTSRoot managedObject = JsonConvert.DeserializeObject(NRBTSjson); + listManagedObject.Add(managedObject); + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaStructural {StructuralName} managedObject P Exception:{ex.Message}."); + continue; + } + } + } + if (listManagedObject.Count > 0) + { + NRBTSRoot managedObject = new NRBTSRoot(); + NRBTSP rBTSP = new NRBTSP(); + rBTSP.name = "distName"; + rBTSP.text = $"{node.Attributes[1].Value}"; + managedObject.p = rBTSP; + listManagedObject.Add(managedObject); + listManagedObjectRoot.Add(listManagedObject); + } + + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaStructural {StructuralName} Exception:{ex.Message}."); + + continue; + } + } + } + return listManagedObjectRoot; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Error($"{IPAddres} GetNokiaXNLINK Exception:{ex.Message}."); + + return null; + } + + } + // + #endregion + //--output-file=genScf_5G19B.xml --data='{\"requestId\":1,\"parameters\":{\"name\":\"generateScf\"}}' --data='{\"requestId\":1,\"parameters\":{\"name\":\"commission\",\"parameters\":{\"distName\":\"MRBTS-51911/NRBTS-51911/NRCELL-2\",\"parameterName\":\"a3MeasSsbRsrp\",\"operation\":\"update\",\"value\":[{\"a3OffsetSsbRsrp\":5,\"a3HysteresisSsbRsrp\":\"\",\"a3TimeToTriggerSsbRsrp\":\"ms512\"}],\"skipParameterRelationErrors\":true,\"shouldBeActivated\":true}}}' + public async Task> GetCells() + { + try + { + + List NokiaCells = new List(); + + List rootBs = new List(); + List rootFaileds = new List(); + List nrs = new List(); + List ltes = new List(); + List lteints = new List(); + + + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{AddrConfig.AddrConfig}' --bts-port='{AddrConfig.PortConfig}'"; + + //获取基站信息 + var bsInfo = RunCmdWithResult($"{admin} --format=human --data={SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"getBtsInformation{SpecialStr2}\"}}}}", 5000); + var result = ReturnStr(bsInfo); + var ss = result.IndexOf("failed"); + if (result.IndexOf("failed") != -1 && result.IndexOf("failed") <= 1000) + { + RootFailed bsInforoot = JsonConvert.DeserializeObject(result); + + //DeviceControlLogger.Logger.Info($"getBtsInformation failed result:{bsInforoot.errorCode}."); + rootFaileds.Add(bsInforoot); + } + else + { + NokiaBaseRoot bsInforoot = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"getBtsInformation result:{bsInforoot.errorCode}."); + rootBs.Add(bsInforoot); + + if (bsInforoot.requestMessage.cells.nr.Count != 0) + { + //var NRCELL = GetNokiaNRCELL(item.IPAddress, port); + + foreach (var itemNr in bsInforoot.requestMessage.cells.nr) + { + try + { + var DistNames = itemNr.id.configuration.Split('-'); + itemNr.lcrId = DistNames[DistNames.Length - 1]; + itemNr.IPAddress =AddrConfig.AddrConfig; + itemNr.port = AddrConfig.PortConfig; + nrs.Add(itemNr); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"getBtsInformation {item.IPAddress} get cell faild:{ex.Message}."); + continue; + } + + } + } + if (bsInforoot.requestMessage.cells.lte.Count != 0) + { + foreach (var itemLte in bsInforoot.requestMessage.cells.lte) + { + try + { + var myjson = JsonConvert.SerializeObject(itemLte); + myjson = myjson.Replace("null", "0"); + myjson = myjson.Replace(".", ""); + LteRoot lte = JsonConvert.DeserializeObject(myjson); + var DistNames = lte.id.configuration.Split('-'); + lte.lcrId = DistNames[DistNames.Length - 1]; + + lte.IPAddress = AddrConfig.AddrConfig; + lte.port = AddrConfig.PortConfig; + ltes.Add(lte); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"getBtsInformation {item.IPAddress} get cell faild:{ex.Message}."); + continue; + } + } + } + if (bsInforoot.requestMessage.cells.gsm.Count != 0) + { + + } + if (bsInforoot.requestMessage.cells.wcdma.Count != 0) + { + + } + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"getBtsInformation {item.IPAddress} get cell faild:{ex.Message}."); + + } + + + + if (nrs != null && nrs.Count > 0) + { + foreach (var itemNr in nrs) + { + try + { + string[] Nokiaconfiguration = itemNr.id.configuration.Split('/'); + string[] Nokiaconfiguration2 = Nokiaconfiguration[0].Split('-'); + Cell cell = new Cell + { + FactoryType = BaseStationTesterTypeEnum.Nokia, + Name = itemNr.cellName, + MoId = itemNr.lcrId, + PCI = itemNr.physicalCellId, + DlBandwidth = itemNr.chBw, + ssbFrequency = itemNr.nrarfcn.ToString(), + MobileStandard = CellMobileStandardEnum.NR, + Status = (int)(itemNr.status.administrativeState == "Unlocked" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked), + IPAddress = itemNr.IPAddress, + Idconfiguration = itemNr.id.configuration, + Port = itemNr.port, + SubNetwork = $"{Nokiaconfiguration2[1]}", + NodeBId = int.Parse($"{Nokiaconfiguration2[1]}"), + ManagedElement = $"{Nokiaconfiguration[0]}", + CellId = itemNr.globalCellId + }; + NokiaCells.Add(cell); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"GetCells getBtsInformation foreach itemNr Exception:{ex.Message}."); + continue; + } + } + } + if (ltes != null && ltes.Count > 0) + { + foreach (var itemLte in ltes) + { + try + { + string[] Nokiaconfiguration = itemLte.id.configuration.Split('/'); + string[] Nokiaconfiguration2 = Nokiaconfiguration[0].Split('-'); + + //string dlChBw = ""; + //string ulChBw = ""; + //int earfcnDL = 0; + //int earfcnUL = 0; + //var cellroot = GetNokiaLTECELL(itemLte.IPAddress, itemLte.port); + //if (cellroot != null && cellroot.Count != 0) + //{ + // foreach (var item in cellroot) + // { + // if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{itemLte.lcrId}") != -1) + // { + // foreach (var itemp in item) + // { + // if (itemp.p.name == "dlChBw") + // { + // dlChBw = itemp.p.text; + // } + // if (itemp.p.name == "ulChBw") + // { + // ulChBw = itemp.p.text; + // } + // if (itemp.p.name == "earfcnDL") + // { + // earfcnDL = Convert.ToInt32(itemp.p.text); + // } + // if (itemp.p.name == "earfcnUL") + // { + // earfcnUL = Convert.ToInt32(itemp.p.text); + // } + // } + // } + // } + //} + Cell cell = new Cell + { + FactoryType = BaseStationTesterTypeEnum.Nokia, + Name = itemLte.cellName, + MoId = itemLte.lcrId, + PCI = itemLte.physicalCellId, + DlBandwidth = itemLte.downlinkChannelBandwidth, + UlBandwidth = itemLte.uplinkChannelBandwidth, + ssbFrequency = itemLte.downlinkFrequency.ToString(), + MobileStandard = CellMobileStandardEnum.LTE, + Status = (int)(itemLte.status.administrativeState == "Unlocked" ? CellStatusEnum.Unlocked : CellStatusEnum.Locked), + IPAddress = itemLte.IPAddress, + Idconfiguration = itemLte.id.configuration, + Port = itemLte.port, + + SubNetwork = $"{Nokiaconfiguration2[1]}", + NodeBId = int.Parse($"{Nokiaconfiguration2[1]}"), + ManagedElement = $"{Nokiaconfiguration[0]}", + CellId = itemLte.globalCellId + }; + NokiaCells.Add(cell); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"GetCells getBtsInformation foreach itemLte Exception:{ex.Message}."); + continue; + } + + } + } + //DeviceControlLogger.Logger.Info($"GetCells getBtsInformation cell count:{NokiaCells.Count}."); + + return NokiaCells; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"GetCells getBtsInformation failed result:{ex.Message}."); + return null; + } + } + + + public Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + //string IPAddres = "180.18.132.74"; + //int Port = 443; + //string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{IPAddres}' --bts-port='{Port}'"; + + //string disid = "MRBTS-51904/LNBTS-51904/LNCEL-1"; + //string disid2 = "MRBTS-51915/NRBTS-51915/NRCELL-1"; + + //string dis = "MRBTS-51904/LNBTS-51904"; + //string disLNCEL_FDD = "MRBTS-51904/LNBTS-51904/LNCEL-1/LNCEL_FDD-0"; + + + + //cell = new Cell(); + //cell.IPAddress = IPAddres; + //cell.Port = Port; + //cell.MoId = "1"; + //cell.FactoryType = FactoryType.Nokia; + ////cell.ssbFrequency = "504990"; + //Cell.NodeBId = "51915"; + //cell.MobileStandard = CellMobileStandardEnum.NR; + //cell.Idconfiguration = "MRBTS-51915/NRBTS-51915/NRCELL-1"; + + //Cell cell2 = new Cell(); + //cell2.IPAddress = "180.18.132.69"; + //cell2.Port = Port; + //cell2.MoId = "1"; + //cell2.FactoryType = FactoryType.Nokia; + //cell2.MobileStandard = CellMobileStandardEnum.LTE; + //cell2.gNBId = "51904"; + //cell2.Idconfiguration = "MRBTS-51904/LNBTS-51904/LNCEL-1"; + //var ssresult = CreateRelations(cell, cell2); + + //var ssresultde = DeleteRelations(cell, cell2); + + return Task.FromResult(0); + } + + + + + public Task ModifyCellResel(Cell cell, int cellReselectionPriority) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "cellReselectionPriority", $"{cellReselectionPriority}"); + //DeviceControlLogger.Logger.Info($"ModifyCellResel result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + + var cellroot = GetNokiaLTESIB(cell.IPAddress, cell.Port); + if (cellroot == null || cellroot.Count == 0) + { + //DeviceControlLogger.Logger.Info($"ModifyCellResel GetNokiaLTESIB null."); + return Task.FromResult(-1); + + + } + int ResultCode = -1; + foreach (var item in cellroot) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "cellReSelPrio", $"{cellReselectionPriority}"); + //DeviceControlLogger.Logger.Info($"ModifyCellResel result:{ResultCode}."); + } + } + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(10); + //DeviceControlLogger.Logger.Info($"ModifyCellResel Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + + public Task ModifyInactiveParameter(Cell cell, int inactiveTimer) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "inactivityTimerSA", inactiveTimer.ToString()); + //DeviceControlLogger.Logger.Info($"ModifyInactiveParameter result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "inactivityTimer", inactiveTimer.ToString()); + //DeviceControlLogger.Logger.Info($"ModifyInactiveParameter result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(11); + //DeviceControlLogger.Logger.Info($"ModifyInactiveParameter Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + + public Task DeleteRelations(Cell FirstCell, Cell SecondCell) + { + try + { + string admin = $"admin-cli.bat --bts-username=Nemuadmin --bts-password=nemuuser --bts-host='{FirstCell.IPAddress}' --bts-port='{FirstCell.Port}'"; + if (FirstCell.MobileStandard == CellMobileStandardEnum.NR && SecondCell.MobileStandard == CellMobileStandardEnum.NR) + { + var NRREL = GetNokiaNRREL(FirstCell.IPAddress, FirstCell.Port); + foreach (var item in NRREL) + { + if (item.managedObject.distName.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + //if (item.managedObject.p[2].text == SecondCell.NodeBId && item.managedObject.p[5].text == SecondCell.MoId) + if (item.managedObject.p.FirstOrDefault(x => x.name == "gNbId").text == SecondCell.NodeBId.ToString() && item.managedObject.p.FirstOrDefault(x => x.name == "lcrId").text == SecondCell.MoId) + { + //string DelCmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{item.managedObject.distName}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"delete{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrpOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{item.managedObject.p[0].text}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualSsbRsrqOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{item.managedObject.p[1].text}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{item.managedObject.p[2].text}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gNbIdLength{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{item.managedObject.p[3].text}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"handoverAllowedSA{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{item.managedObject.p[4].text}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"lcrId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{item.managedObject.p[5].text}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"removeNotAllowed{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{item.managedObject.p[6].text}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"gnbPlmn{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{item.managedObject.list.item.p[0].text},{SpecialStr2}\"mnc{SpecialStr2}\":{item.managedObject.list.item.p[1].text},{SpecialStr2}\"mncLength{SpecialStr2}\":{item.managedObject.list.item.p[2].text}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + + string distName = item.managedObject.distName; + var parameters = new List + { + new Parameter { ParameterName = "cellIndividualSsbRsrpOffset", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "cellIndividualSsbRsrpOffset").text }, + new Parameter { ParameterName = "cellIndividualSsbRsrqOffset", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "cellIndividualSsbRsrqOffset").text }, + new Parameter { ParameterName = "handoverAllowedSARedCap", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "handoverAllowedSARedCap").text }, + new Parameter { ParameterName = "handoverAllowedSA", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "handoverAllowedSA").text }, + new Parameter { ParameterName = "removeNotAllowed", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "removeNotAllowed").text }, + new Parameter { ParameterName = "nrDcAllowed", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "nrDcAllowed").text }, + new Parameter { ParameterName = "gNbIdLength", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "gNbIdLength").text }, + new Parameter { ParameterName = "gNbId", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "gNbId").text }, + new Parameter { ParameterName = "lcrId", Operation = NokiaOperationType.Update.GetDescription(), Value = item.managedObject.p.FirstOrDefault(x => x.name == "lcrId").text }, + new Parameter { ParameterName = "gnbPlmn", Operation = NokiaOperationType.Update.GetDescription(), Value = new List { new GnbPlmn { Mcc = Convert.ToInt32(item.managedObject.list.item.p[0].text), Mnc = Convert.ToInt32(item.managedObject.list.item.p[1].text), MncLength = Convert.ToInt32(item.managedObject.list.item.p[2].text) } } }, + }; + string cmdText = GetRelCommand(FirstCell.IPAddress, FirstCell.Port, distName, parameters, NokiaOperationType.Delete); + + var DelRelation = RunCmdWithResult(cmdText, 8000); + var result = ReturnStr(DelRelation); + DelRoot rootFailed = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"DeleteRelations result:[{rootFailed.errorCode}]{rootFailed.requestMessage}."); + //return Task.FromResult(rootFailed.errorCode); + } + } + } + return Task.FromResult(0); + } + else if (FirstCell.MobileStandard == CellMobileStandardEnum.LTE && SecondCell.MobileStandard == CellMobileStandardEnum.LTE) + { + string Cmd = ""; + List> LTELNADJ = GetNokiaLTELNADJ(FirstCell.IPAddress, FirstCell.Port); + if (LTELNADJ == null || LTELNADJ.Count == 0) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations FirstCell:{FirstCell.IPAddress} Not SecondCell:{SecondCell.IPAddress} Relation."); + return Task.FromResult(0); + } + else + { + foreach (var item in LTELNADJ) + { + foreach (var itemp in item) + { + if (itemp.p.text == SecondCell.IPAddress) + { + int mcc = 460; + int mnc = 7; + int mncLength = 2; + if (itemp.p.name == "mcc") + { + mcc = Convert.ToInt32(itemp.p.text); + } + else if (itemp.p.name == "mnc") + { + mnc = Convert.ToInt32(itemp.p.text); + } + else if (itemp.p.name == "mncLength") + { + mncLength = Convert.ToInt32(itemp.p.text); + } + else if (itemp.p.name == "distName") + { + var itemdists = itemp.p.text.Split('-'); + int newldnadjId = (Convert.ToInt32(itemdists[itemdists.Length - 1])) + 1; + Cmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{itemp.p.text}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"delete{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"adjEnbId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddr{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{SecondCell.IPAddress}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cPlaneIpAddrCtrl{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"oamControlled{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"rlfBasedRCRsupported{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":false{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"plmnId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{mcc},{SpecialStr2}\"mnc{SpecialStr2}\":{mnc},{SpecialStr2}\"mncLength{SpecialStr2}\":{mncLength}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + } + } + } + } + } + if (Cmd == "") + { + //DeviceControlLogger.Logger.Info($"DeleteRelations Execute CreateRelation Cmd null."); + return Task.FromResult(-1); + + } + var CreateRelation = RunCmdWithResult(Cmd, 8000); + var result = ReturnStr(CreateRelation); + RootFailed rootFailed = JsonConvert.DeserializeObject(result); + + //DeviceControlLogger.Logger.Info($"DeleteRelations result:{rootFailed.requestMessage}."); + return Task.FromResult(rootFailed.errorCode); + + } + else + { + if (FirstCell.MobileStandard == CellMobileStandardEnum.NR) + { + var NRRELE = GetNokiaStructural(FirstCell.IPAddress, FirstCell.Port, "NRRELE"); + foreach (var item in NRRELE) + { + if (item[item.Count - 1].p.text.IndexOf($"NRCELL-{FirstCell.MoId}") != -1) + { + if (item[1].p.text == SecondCell.NodeBId.ToString() && item[3].p.text == SecondCell.MoId) + { + string DelCmd = $"{admin} --format=human --data=\"{SpecialStr}\"requestId{SpecialStr2}\":1,{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"name{SpecialStr2}\":{SpecialStr2}\"recommission{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{SpecialStr}\"planObjects{SpecialStr2}\":{"[{"}{SpecialStr2}\"distName{SpecialStr2}\":{SpecialStr2}\"{item[item.Count - 1].p.text}{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"delete{SpecialStr2}\",{SpecialStr2}\"parameters{SpecialStr2}\":{"[{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"cellIndividualOffset{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SpecialStr2}\"{item[0].p.text}{SpecialStr2}\"{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eNodeBId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.NodeBId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"eutranCellBlacklisted{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{item[2].p.text}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"removeNotAllowed{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{item[4].p.text}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"lcrId{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{SecondCell.MoId}{"}"},{"{"}{SpecialStr2}\"parameterName{SpecialStr2}\":{SpecialStr2}\"ecgiPlmn{SpecialStr2}\",{SpecialStr2}\"operation{SpecialStr2}\":{SpecialStr2}\"update{SpecialStr2}\",{SpecialStr2}\"value{SpecialStr2}\":{"[{"}{SpecialStr2}\"mcc{SpecialStr2}\":{item[5].p.text},{SpecialStr2}\"mnc{SpecialStr2}\":{item[6].p.text},{SpecialStr2}\"mncLength{SpecialStr2}\":{item[7].p.text}{"}]}]}]"},{SpecialStr2}\"skipParameterRelationErrors{SpecialStr2}\":true,{SpecialStr2}\"shouldBeActivated{SpecialStr2}\":true{"}}}"}\""; + + var DelRelation = RunCmdWithResult(DelCmd, 8000); + var result = ReturnStr(DelRelation); + DelRoot rootFailed = JsonConvert.DeserializeObject(result); + //DeviceControlLogger.Logger.Info($"DeleteRelations result:{rootFailed.requestMessage}."); + return Task.FromResult(rootFailed.errorCode); + } + } + } + return Task.FromResult(0); + } + else + { + return Task.FromResult(0); + } + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + + + public Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + P P = new P(); + var cellroot = GetNokiaNRCELL(cell.IPAddress, cell.Port); + foreach (var item in cellroot) + { + if (item.managedObject.distName == cell.Idconfiguration) + { + foreach (var item_p in item.managedObject.p) + { + if (item_p.name == "nrSysInfoProfileDN") + { + var myjsoon = JsonConvert.SerializeObject(item_p); + P p = JsonConvert.DeserializeObject

(myjsoon); + P = p; + break; + } + } + } + } + if (P == null) + { + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection nrSysInfoProfileDN p null."); + return Task.FromResult(-1); + } + if (SameFrequency) + { + //var threshServingLowPResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, P.text, "threshServingLowP", $"{sIntraSearchP}"); + ////DeviceControlLogger.Logger.Info($"ModifyIntraFReselection NokiaModifySCF threshServingLowP result:{threshServingLowPResultCode}."); + return Task.FromResult(0); + } + else + { + var sNonIntraSearchPResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, P.text, "sNonIntraSearchP", $"{sIntraSearchP}"); + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection NokiaModifySCF sNonIntraSearchP result:{sNonIntraSearchPResultCode}."); + return Task.FromResult(sNonIntraSearchPResultCode); + } + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var cellroot = GetNokiaLTESIB(cell.IPAddress, cell.Port); + if (cellroot == null || cellroot.Count == 0) + { + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection GetNokiaLTESIB null."); + return Task.FromResult(-1); + + } + int ResultCode = -1; + foreach (var item in cellroot) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + if (SameFrequency) + { + ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "sIntrasearch", $"{sIntraSearchP}"); + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection sIntrasearch result:{ResultCode}."); + } + else + { + ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "sNonIntrsearch", $"{sIntraSearchP}"); + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection sNonIntrsearch result:{ResultCode}."); + } + } + } + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(12); + + //DeviceControlLogger.Logger.Info($"ModifyIntraFReselection NokiaModifySCF Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + + public Task SetCellSelection(Cell cell, double LevelValue) + { + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "qRxLevMin", $"{LevelValue}"); + //DeviceControlLogger.Logger.Info($"SetCellSelection result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + + var cellroot = GetNokiaLTESIB(cell.IPAddress, cell.Port); + if (cellroot == null || cellroot.Count == 0) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection GetNokiaLTESIB null."); + return Task.FromResult(-1); + } + int ResultCode = -1; + foreach (var item in cellroot) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "qrxlevmin", $"{LevelValue}"); + //DeviceControlLogger.Logger.Info($"SetCellSelection result:{ResultCode}."); + } + } + return Task.FromResult(ResultCode); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection Exception:{ex.Message}."); + return Task.FromResult(-1); + } + } + + public Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + int rtn = 0; + try + { + //DeviceControlLogger.Logger.Info($"--SetCarrierFrequency {cell.IPAddress}_{cell.Name}_{cell.FactoryType}"); + + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "nrarfcn", earfcnDL); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} set CarrierFrequency result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + var LTECELL = GetNokiaLTECELL(cell.IPAddress, cell.Port); + if (LTECELL == null && LTECELL.Count == 0) + { + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierFrequency GetNokiaLTECELL count 0."); + return Task.FromResult(-1); + } + foreach (var item in LTECELL) + { + if (item[item.Count - 1].p.text.IndexOf($"LNCEL-{cell.MoId}") != -1) + { + var ResultCode = NokiaModifySCF(cell.IPAddress, cell.Port, item[item.Count - 1].p.text, "earfcnDL", $"{earfcnDL}", "earfcnUL", $"{earfcnUL}"); + //DeviceControlLogger.Logger.Info($"{cell.Nokia_cellName} SetCarrierFrequency result:{ResultCode}."); + return Task.FromResult(ResultCode); + } + } + return Task.FromResult(0); + } + else + { + return Task.FromResult(0); + } + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency Exception:{ex.Message}."); + return Task.FromResult(rtn); + } + } + ///

+ /// 获取终端异常代码 + /// + /// + /// + public int GetErrorCode(int errorCode) + { + int.TryParse(ErrorCodeHelper.GetDeviceErrorCode(DeviceTypeEnum.BaseStationTester, errorCode), out int code); + return code; + } + + + + public Task ModifyPaging(Cell cell, string drxDefaultPaging) + { + int rtn = 0; + try + { + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + rtn = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration.Split("/")[0] + "/" + cell.Idconfiguration.Split("/")[1], "drxDefaultPaging", $"{drxDefaultPaging}"); + } + else if (cell.MobileStandard == CellMobileStandardEnum.LTE) + { + rtn = NokiaModifySCF(cell.IPAddress, cell.Port, cell.Idconfiguration, "defPagCyc", $"{drxDefaultPaging}"); + } + else + { + } + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"ModifyPaging result:{rtn}."); + } + catch (Exception ex) + { + rtn = GetErrorCode(11); + //DeviceControlLogger.Logger.Info($"ModifyPaging error {rtn}.", ex); + } + return Task.FromResult(rtn); + } + + private string GetCmdText(string host, int port, string distName, string parameterName, string value) + { + //string host = "180.18.132.72"; + //string port = "443"; + string userName = "Nemuadmin"; + string password = "nemuuser"; + NokiaFormatType format = NokiaFormatType.Human; + + string data = GetDataNotParameter(distName, parameterName, value); + + List args = new() + { + "admin-cli.bat", + $"--bts-username={userName}", + $"--bts-password={password}", + $"--bts-host='{host}'", + $"--bts-port='{port}'", + $"--format={format.GetDescription()}", + $"--data=\"{data}\"" + }; + + string cmdText = string.Join(' ', args); + return cmdText; + } + + private string GetDataNotParameter(string distName, string parameterName, string value, NokiaOperationType operation = NokiaOperationType.Update, int requestId = 1) + { + var data = new { requestId, parameters = new { name = "commission", parameters = new { distName, parameterName, value, operation = operation.GetDescription(), skipParameterRelationErrors = true, shouldBeActivated = true } } }; + return JsonConvert.SerializeObject(data).Replace("\"", "\\\""); + } + + private string GetCmdText(string host, int port, string data) + { + //string host = "180.18.132.72"; + //string port = "443"; + string userName = "Nemuadmin"; + string password = "nemuuser"; + NokiaFormatType format = NokiaFormatType.Human; + + List args = new() + { + "admin-cli.bat", + $"--bts-username={userName}", + $"--bts-password={password}", + $"--bts-host='{host}'", + $"--bts-port='{port}'", + $"--format={format.GetDescription()}", + $"--data=\"{data}\"" + }; + + string cmdText = string.Join(' ', args); + return cmdText; + } + + private string GetRelCommand(string host, int port, string distName, List parameters, NokiaOperationType operation = NokiaOperationType.Create, int requestId = 1) + { + var planObject = new PlanObject + { + DistName = distName, + Operation = operation.GetDescription(), + Parameters = parameters + }; + + var requestBody = new RequestBody + { + Name = "recommission", + ParameterBody = new ParameterBody + { + PlanObjects = new List { planObject }, + SkipParameterRelationErrors = true, + ShouldBeActivated = true + } + }; + + var root = new Root { RequestId = requestId, Parameters = requestBody }; + + // 序列化为JSON字符串,并转义双引号 + string jsonString = JsonConvert.SerializeObject(root); + string escapedJsonString = jsonString.Replace("\"", "\\\""); // 转义双引号 + return GetCmdText(host, port, escapedJsonString); + } + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait) + { + throw new NotImplementedException(); + } + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait) + { + throw new NotImplementedException(); + } + + public int BeforTest() + { + throw new NotImplementedException(); + } + + public int AfterTest() + { + throw new NotImplementedException(); + } + + public int Initial() + { + return _rtn; + } + + public enum NokiaFormatType + { + [Description("human")]//正常,带空格和换行 + Human, + [Description("compact")]//压缩 + Compact, + } + + public enum NokiaOperationType + { + [Description("create")] + Create, + [Description("delete")] + Delete, + [Description("update")] + Update, + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Virtual/VirtualBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Virtual/VirtualBaseStationTester.cs new file mode 100644 index 00000000..1a0a7f31 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Virtual/VirtualBaseStationTester.cs @@ -0,0 +1,168 @@ + +using MTNet.Application.ConnectBase; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + + +namespace MTNet.Application.DriverLibrary.BaseStation.Virtual +{ + public class VirtualBaseStationTester : ConnectInstBase, IVirtualBaseStationTester + { + int _rtn = 0; + /// + /// 构造函数 + /// + /// + /// < param name="port"> + public VirtualBaseStationTester(DeviceAddrConfig addrConfig) : base(addrConfig) + { + + } + + public VirtualBaseStationTester(BaseStationTesterAddrConfig addrConfig) : base(addrConfig) + { + + } + + public int BeforTest() + { + return _rtn; + } + + public int AfterTest() + { + return _rtn; + } + + public void Dispose() + { + + } + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task> GetCells() + { + IList list = new List(); + return Task.FromResult(list); + } + + public Task SetCellState(Cell cell, bool state) + { + return Task.FromResult(_rtn); + } + + public Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCarrierPCI(Cell cell, string CarrierPCI, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCarrierFrequency(Cell cell, string Frequency, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + return Task.FromResult(_rtn); + } + + public Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + return Task.FromResult(_rtn); + } + + public Task SetCellSelection(Cell cell, double LevelValue) + { + return Task.FromResult(_rtn); + } + + public Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1) + { + return Task.FromResult(_rtn); + } + + public Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2) + { + return Task.FromResult(_rtn); + } + + public Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3) + { + return Task.FromResult(_rtn); + } + + public Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + return Task.FromResult(_rtn); + } + + public Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + return Task.FromResult(_rtn); + } + + public Task SetB1Threshold(Cell cell, int value1) + { + return Task.FromResult(_rtn); + } + + public Task SetB2Threshold(Cell cell, int value1, int value2) + { + return Task.FromResult(_rtn); + } + + public Task CreateRelations(Cell FirstCell, Cell SecondCell) + { + return Task.FromResult(_rtn); + } + + public Task DeleteRelations(Cell FirstCell, Cell SecondCell) + { + return Task.FromResult(_rtn); + } + + public Task ModifyCellResel(Cell cell, int cellReselectionPriority) + { + return Task.FromResult(_rtn); + } + + public Task ModifyInactiveParameter(Cell cell, int inactiveTimer) + { + return Task.FromResult(_rtn); + } + + public Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency) + { + return Task.FromResult(_rtn); + } + + public int Initial() + { + return _rtn; + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Converters/NumberEnumConverter.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Converters/NumberEnumConverter.cs new file mode 100644 index 00000000..227db378 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Converters/NumberEnumConverter.cs @@ -0,0 +1,62 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Converters +{ + public class NumberEnumConverter : StringEnumConverter + { + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + bool isNullable = (Nullable.GetUnderlyingType(objectType) != null); + Type enumType = (Nullable.GetUnderlyingType(objectType) ?? objectType); + if (!enumType.IsEnum) + throw new JsonSerializationException(string.Format("type {0} is not a enum type", enumType.FullName)); + var prefix = enumType.Name + "_"; + + if (reader.TokenType == JsonToken.Null) + { + if (!isNullable) + throw new JsonSerializationException(); + return null; + } + + // Strip the prefix from the enum components (if any). + var token = JToken.Load(reader); + if (token.Type == JTokenType.String) + { + token = $"_{token}"; + //token = (JValue)string.Join(", ", token.ToString().Split(',').Select(s => s.Trim()).Select(s => s.StartsWith(prefix) ? s.Substring(prefix.Length) : s).ToArray()); + } + + using (var subReader = token.CreateReader()) + { + while (subReader.TokenType == JsonToken.None) + subReader.Read(); + return base.ReadJson(subReader, objectType, existingValue, serializer); // Use base class to convert + } + } + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + var array = new JArray(); + using (var tempWriter = array.CreateWriter()) + base.WriteJson(tempWriter, value, serializer); + var token = array.Single(); + + if (token.Type == JTokenType.String && value != null) + { + var enumType = value.GetType(); + var prefix = enumType.Name + "_"; + token = token.ToString().Replace("_", ""); + //token = (JValue)string.Join(", ", token.ToString().Split(',').Select(s => s.Trim()).Select(s => (!char.IsNumber(s[0]) && s[0] != '-') ? prefix + s : s).ToArray()); + } + + token.WriteTo(writer); + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/DistinctItemComparer.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/DistinctItemComparer.cs new file mode 100644 index 00000000..d2392434 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/DistinctItemComparer.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage +{ + //public class DistinctItemComparer : IEqualityComparer + //{ + + // public bool Equals(Item x, Item y) + // { + // return x.Id == y.Id && + // x.Name == y.Name && + // x.Code == y.Code && + // x.Price == y.Price; + // } + + // public int GetHashCode(Item obj) + // { + // return obj.Id.GetHashCode() ^ + // obj.Name.GetHashCode() ^ + // obj.Code.GetHashCode() ^ + // obj.Price.GetHashCode(); + // } + //} +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiENodesBExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiENodesBExtension.cs new file mode 100644 index 00000000..2d3609f1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiENodesBExtension.cs @@ -0,0 +1,2461 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.MoHandle; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.EasyApi +{ + public static class EasyApiENodesBExtension + { + /// + /// 使用MoGet api查询指定基站的所有小区 + /// + /// + /// 网元类型 + /// 子网id + /// 网元id + /// + public static async Task QueryCellsUseMoGet(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + attrFilter = new List { + new AttrFilter + { + attrNames = new List{ + "adminState" + }, + moc = "NRCellDU" + } + }, + mocList = new List { "NRCellDU" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return JsonConvert.DeserializeObject(content); + } + /// + /// 使用MoQuery查询小区列表 + /// + /// + /// 网元类型 + /// 网元列表,默认为空查询所有 + /// + public static async Task QueryCellsUseMoQuery(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "NRCellDU" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + + return JsonConvert.DeserializeObject(content); + } + /// + /// 使用MoQuery查询网元 + /// + /// + /// 网元类型 + /// 网元列表,默认为空查询所有 + /// + public static async Task> QueryNEsUseMoQuery(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "SystemFunctions" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + return JsonConvert.DeserializeObject>(content); + } + + public static async Task QueryCellsUse_9393(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + attrFilter = new List { + new AttrFilter + { + attrNames = new List{ + "rsrpThresholdA1", + "rsrpThresholdA2", + }, + moc = "InterFRATHoA1A2" + } + }, + mocList = new List { "InterFRATHoA1A2" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return JsonConvert.DeserializeObject(content); + } + public static async Task QueryCellsUseB1_B2_9393(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + attrFilter = new List { + new AttrFilter + { + attrNames = new List{ + "b2Thrd1Rsrp", + "rsrpThreshold", + "eventId" + }, + moc = "LTEFreqCovHo" + } + }, + mocList = new List { "LTEFreqCovHo" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return JsonConvert.DeserializeObject(content); + } + + /// + /// + /// + /// + /// + /// + /// + public static async Task<(string, int)?> QueryNRCellA1(this ZTEClient client, netype netype, CellModel cell) + { + var result = await client.ModataQuery(netype.ITBBU); + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + return data == null ? null : (data?.ldn, data.rsrpThreshold); + } + public static async Task QueryMocList(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "MobilityCtrl" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + + return JsonConvert.DeserializeObject(content); + } + public static async Task QueryMobilityCtrlLDN(this ZTEClient client, netype netype, CellModel cell) + { + var allResult = await QueryMocList(client, netype); + var sss = allResult.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.moData; + + var data = allResult.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.moData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + return data == null ? null : (data?.ldn); + } + + + + public static async Task ModifyVoNrSwitch(this ZTEClient client, netype netype, CellModel cell, bool val) + { + //var data = await client.QueryNRCellA1(netype, cell); + var ModifyLDN = await client.QueryMobilityCtrlLDN(netype, cell); + + if (ModifyLDN == null) + throw new InvalidOperationException("query nr cell a1 val error"); + + //string areaId = Guid.NewGuid().ToString().Replace("-", ""); + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var config = new List { + new MoConfigArgMobilityCtrl + { + ldn = ModifyLDN, + moOp = MoOp.update, + voNrSwitch = val + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task SetNRCellA1(this ZTEClient client, netype netype, CellModel cell, int val) + { + var data = await client.QueryNRCellA1(netype, cell); + + if (data == null) + throw new InvalidOperationException("query nr cell a1 val error"); + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var config = new List { + new MoConfigArgNRA1 + { + ldn = data?.Item1, + moOp = MoOp.update, + rsrpThreshold = val + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + + /// + /// A2 + /// + /// + /// + /// + /// + /// + public static async Task<(string, int)?> QueryNRCellA2(this ZTEClient client, netype netype, CellModel cell) + { + var result = await client.ModataQuery(netype.ITBBU); + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + return data == null ? null : (data?.ldn, data.rsrpThreshold); + } + + public static async Task SetNRCellA2(this ZTEClient client, netype netype, CellModel cell, int val) + { + var data = await client.QueryNRCellA2(netype, cell); + + if (data == null) + throw new InvalidOperationException("query nr cell a1 val error"); + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var config = new List { + new MoConfigArgNRA2 + { + ldn = data?.Item1, + moOp = MoOp.update, + rsrpThreshold = val + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + /// + /// A3 + /// + /// + /// + /// + /// + /// + public static async Task<(string, int, int?)?> QueryNRCellA3_A4_A5(this ZTEClient client, netype netype, CellModel cell, A3_A4_A5EventId checkEvenId) + { + var result = await client.ModataQuery(netype.ITBBU); + var eventId = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1)?.eventId; + if (eventId == checkEvenId) + { + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + return data == null ? null : (data.ldn, data.rsrpThreshold, data.A5Thrd1Rsrp); + } + else + { + await client.SwitchNRThreshold(netype.ITBBU, cell, checkEvenId); + result = await client.ModataQuery(netype.ITBBU); + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + (string, int, int?)? resultData = data == null ? null : (data.ldn, data.rsrpThreshold, data.A5Thrd1Rsrp); + await client.SwitchNRThreshold(netype.ITBBU, cell, eventId.Value); + return resultData; + } + } + /// + /// A3 + /// + /// + /// + /// + /// + /// + public static Task<(string, int, int?)?> QueryNRCellA3(this ZTEClient client, netype netype, CellModel cell) + { + return QueryNRCellA3_A4_A5(client, netype, cell, A3_A4_A5EventId.A3); + } + + public static async Task SetNRCellA3_A4_A5(this ZTEClient client, netype netype, CellModel cell, A3_A4_A5EventId setEventId, int val, int secondVal) + { + var result = await client.ModataQuery(netype.ITBBU); + var eventId = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1)?.eventId; + + + A3_A4_A5EventId currentEventId = eventId.Value; + (string, int, int?)? cellData; + if (eventId != setEventId) + { + await client.SwitchNRThreshold(netype.ITBBU, cell, A3_A4_A5EventId.A3); + + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + cellData = data == null ? null : (data.ldn, data.rsrpThreshold, data.A5Thrd1Rsrp); + } + else + { + result = await client.ModataQuery(netype.ITBBU); + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + cellData = data == null ? null : (data.ldn, data.rsrpThreshold, data.A5Thrd1Rsrp); + } + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (setEventId != A3_A4_A5EventId.A5) + { + Enum.TryParse(setEventId.ToString(), out var eventIdVal); + var config = new List { + new MoConfigArgNRA3_A4 + { + ldn = cellData?.Item1, + moOp = MoOp.update, + rsrpThreshold = val, + eventId = eventIdVal + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + else + { + var config = new List { + new MoConfigArgNRA5 + { + ldn = cellData?.Item1, + moOp = MoOp.update, + rsrpThreshold = val, + A5Thrd1Rsrp = secondVal + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + + if (currentEventId != setEventId) + { + await client.SwitchNRThreshold(netype.ITBBU, cell, currentEventId); + } + } + /// + /// A5 + /// + /// + /// + /// + /// + /// + public static Task<(string, int, int?)?> QueryNRCellA5(this ZTEClient client, netype netype, CellModel cell) + { + return QueryNRCellA3_A4_A5(client, netype, cell, A3_A4_A5EventId.A5); + } + + + /// + /// 查询小区b1 b2的值 + /// + /// + /// + /// + /// 第一个double返回值为B1和B2的第一个值,第二个double返回值为B2的第二个值 + public static async Task<(string, int, int?)?> QueryNRCellsB1_B2(this ZTEClient client, netype netype, CellModel cell) + { + var result = await client.ModataQuery(netype.ITBBU); + var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + var b1Value = data?.rsrpThreshold; + var b2SecondValue = data?.b2Thrd1Rsrp; + + return data == null ? null : (data?.ldn, b1Value.Value, b2SecondValue); + } + //public static async Task<(string, int, int?)?> QueryNrRatMeasCfgLTE(this ZTEClient client, netype netype, CellModel cell) + //{ + // var result = await client.ModataQuery(netype.ITBBU); + // //var data = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + // //var b1Value = data?.rsrpThreshold; + // //var b2SecondValue = data?.b2Thrd1Rsrp; + + // //return data == null ? null : (data?.ldn, b1Value.Value, b2SecondValue); + //} + //public static async Task SetNRCellB1_B2(this ZTEClient client, netype netype, CellModel cell, B1_B2EventId eventId, int val, int secondVal) + //{ + + + // //var data = await client.QueryNrRatMeasCfgLTE(netype, cell); + + // //if (data == null) + // // throw new InvalidOperationException("query nr cell a1 val error"); + // var result = await client.ModataQuery(netype.ITBBU); + + + // string areaId = Guid.NewGuid().ToString().Replace("-", ""); + + // try + // { + // await client.CreatePlannedArea(areaId, "MtnetAIbot001"); + // await client.OpenPlannedArea(areaId); + + + // //if (eventId == B1_B2EventId.B1) + // //{ + // // var config = new List { + // // new MoConfigArgNRB1 + // // { + // // ldn = data?.Item1, + // // moOp = MoOp.update, + // // rsrpThreshold = val + // // } + // // }; + + // // await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + // //} + // //else + // //{ + // // var config = new List { + // // new MoConfigArgNRB2 + // // { + // // ldn = data?.Item1, + // // moOp = MoOp.update, + // // rsrpThreshold = val, + // // b2Thrd1Rsrp = secondVal + + // // } + // // }; + + // // await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + // //} + // } + // catch (Exception ex) + // { + // throw new Exception(ex.Message); + // } + // finally + // { + // await client.DestroyPlannedAreaNoThrow(areaId); + // } + //} + public static async Task> CellDefiningSSB(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "CellDefiningSSB" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + Console.WriteLine($"{content}\n\t"); + return JsonConvert.DeserializeObject>(content); + } + public static async Task TestGetInfo(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "ReplaceableUnit" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + Console.WriteLine($"{content}\n\t"); + var ss = JsonConvert.DeserializeObject>(content); + } + public static async Task CellDefiningSSBUpdate(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + attrFilter = new List { + new AttrFilter + { + attrNames = new List{ + "adminState" + }, + moc = "CUEUtranCellFDDLTE" + } + }, + mocList = new List { "CUEUtranCellFDDLTE" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return JsonConvert.DeserializeObject(content); + } + public static async Task TDDCellDefiningSSBUpdate(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + attrFilter = new List { + new AttrFilter + { + attrNames = new List{ + "adminState" + }, + moc = "CUEUtranCellTDDLTE" + } + }, + mocList = new List { "CUEUtranCellTDDLTE" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return JsonConvert.DeserializeObject(content); + } + internal static IEnumerable ParseIndex(string str) + { + return str.Split(';')?.Distinct(); + } + + + public static async Task SwitchLTEB1_B2Threshold(this ZTEClient client, netype netype, CellModel cell, B1_B2EventId eventId = B1_B2EventId.B2) + { + var MeasResult = await client.ModataQuery(netype.ITBBU); + string cellMeasStr = MeasResult.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(d => d.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId},") != -1)?.refCellMeasGroupLTE; + + if (string.IsNullOrWhiteSpace(cellMeasStr)) + throw new InvalidOperationException("get cellMeasStr failed"); + + var MeasGroupLTEs = await client.ModataQuery(netype.ITBBU); + var measGroup = MeasGroupLTEs.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn == cellMeasStr); + + var b1_b2Str = measGroup.nRMeasCfg; + var b1_b2Results = ParseIndex(b1_b2Str)?.ToList(); + var resultSecond = await client.ModataQuery(netype.ITBBU); + + var b1_b2PageResults = resultSecond.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => b1_b2Results.Contains(d.nRRatMeasCfgIdx)); + var toData = b1_b2PageResults.Where(d => d.measCfgFunc == "2" && d.rptCriteria == "0" && d.eutranMeasQuan == "0" && d.evtId.ToString() == eventId.ToString())?.FirstOrDefault(); + + if (toData != null) + return; + + var data = b1_b2PageResults.Where(d => d.measCfgFunc == "2" && d.rptCriteria == "0" && d.eutranMeasQuan == "0")?.FirstOrDefault(); + if (data != null) + { + var config = new List { + new MoConfigArgSwitchLTEB1_B2 + { + ldn = data.ldn, + moOp = MoOp.update, + evtId = (int)eventId + } + }; + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + } + + /// + /// 查询lte小区门限 + /// + /// + /// + /// + /// + /// + public static async Task<(string, int, int?)?> QueryLteCellThreshold(this ZTEClient client, netype netype, CellModel cell, AllEventId eventId = AllEventId.A3) + { + var MeasResult = await client.ModataQuery(netype.ITBBU); + string cellMeasStr = MeasResult.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(d => d.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId},") != -1)?.refCellMeasGroupLTE; + + if (string.IsNullOrWhiteSpace(cellMeasStr)) + throw new InvalidOperationException("get cellMeasStr failed"); + + var MeasGroupLTEs = await client.ModataQuery(netype.ITBBU); + var measGroup = MeasGroupLTEs.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn == cellMeasStr); + + if (eventId <= AllEventId.A6_Dif) + { + var a1Str = measGroup.closedInterFMeasCfg; + + var a2Str = measGroup.openInterFMeasCfg; + //同频 + var a3_a4_a5Str = measGroup.intraFHOMeasCfg; + //异频 + var a4_a5Str = measGroup.interFHOMeasCfg; + + var a1Results = ParseIndex(a1Str)?.ToList(); + var a2Results = ParseIndex(a2Str)?.ToList(); + var a3_a4_a5Results = ParseIndex(a3_a4_a5Str)?.ToList(); + + //异频 + var a3_a4_a5DifStr = measGroup.interFHOMeasCfg; + var a3_a4_a5DifResults = ParseIndex(a3_a4_a5DifStr)?.ToList(); + + var result = await client.ModataQuery(netype.ITBBU); + + if (eventId == AllEventId.A1) + { + var a1PageResults = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => a1Results.Contains(d.measCfgIdx)); + var a1data = a1PageResults.Where(d => d.measCfgFunc == "0" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A1)?.FirstOrDefault(); + + return a1data == null ? null : (a1data.ldn, a1data.thresholdOfRSRP, -1); + } + else if (eventId == AllEventId.A2) + { + var a2PageResults = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => a2Results.Contains(d.measCfgIdx)); + var a2data = a2PageResults.Where(d => d.measCfgFunc == "1" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A2)?.FirstOrDefault(); + return a2data == null ? null : (a2data.ldn, a2data.thresholdOfRSRP, -1); + } + else if (eventId <= AllEventId.A6) + { + var a3_a4_a5PageResults = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => a3_a4_a5Results.Contains(d.measCfgIdx)); + var a3data = a3_a4_a5PageResults.Where(d => d.measCfgFunc == "4" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A3)?.FirstOrDefault(); + var a4data = a3_a4_a5PageResults.Where(d => d.measCfgFunc == "4" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A4)?.FirstOrDefault(); + var a5data = a3_a4_a5PageResults.Where(d => d.measCfgFunc == "4" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A5)?.FirstOrDefault(); + var a6data = a3_a4_a5PageResults.Where(d => d.measCfgFunc == "4" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A6)?.FirstOrDefault(); + var anydata = a3_a4_a5PageResults.Where(d => d.measCfgFunc == "4" && d.triggerQuantity == "0")?.FirstOrDefault(); + + if (eventId == AllEventId.A3) + { + return a3data != null ? (a3data.ldn, a3data.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + else if (eventId == AllEventId.A4) + { + return a4data != null ? (a4data.ldn, a4data.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + else if (eventId == AllEventId.A5) + { + return a5data != null ? (a5data.ldn, a5data.thresholdOfRSRP, a5data.a5Threshold2OfRSRP) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, anydata.a5Threshold2OfRSRP); + } + else if (eventId == AllEventId.A6) + { + return a6data != null ? (a6data.ldn, a6data.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + } + else + { + //异频 + var a3_a4_a5DifPageResults = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => a3_a4_a5DifResults.Contains(d.measCfgIdx)); + var a3Difdata = a3_a4_a5DifPageResults.Where(d => d.measCfgFunc == "5" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A3)?.FirstOrDefault(); + var a4Difdata = a3_a4_a5DifPageResults.Where(d => d.measCfgFunc == "5" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A4)?.FirstOrDefault(); + var a5Difdata = a3_a4_a5DifPageResults.Where(d => d.measCfgFunc == "5" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A5)?.FirstOrDefault(); + var a6Difdata = a3_a4_a5DifPageResults.Where(d => d.measCfgFunc == "5" && d.triggerQuantity == "0" && d.eventId == A1_A2_A3_A4_A5_A6EventId.A6)?.FirstOrDefault(); + var anydata = a3_a4_a5DifPageResults.Where(d => d.measCfgFunc == "5" && d.triggerQuantity == "0")?.FirstOrDefault(); + + if (eventId == AllEventId.A3_Dif) + { + return a3Difdata != null ? (a3Difdata.ldn, a3Difdata.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + else if (eventId == AllEventId.A4_Dif) + { + return a4Difdata != null ? (a4Difdata.ldn, a4Difdata.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + else if (eventId == AllEventId.A5_Dif) + { + return a5Difdata != null ? (a5Difdata.ldn, a5Difdata.thresholdOfRSRP, a5Difdata.a5Threshold2OfRSRP) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, anydata.a5Threshold2OfRSRP); + } + else if (eventId == AllEventId.A6_Dif) + { + return a6Difdata != null ? (a6Difdata.ldn, a6Difdata.thresholdOfRSRP, -1) : anydata == null ? null : (anydata.ldn, anydata.thresholdOfRSRP, -1); + } + } + } + else + { + var b1_b2Str = measGroup.nRMeasCfg; + var b1_b2Results = ParseIndex(b1_b2Str)?.ToList(); + var resultSecond = await client.ModataQuery(netype.ITBBU); + + var b1_b2PageResults = resultSecond.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData?.Where(d => b1_b2Results.Contains(d.nRRatMeasCfgIdx)); + var b1data = b1_b2PageResults.Where(d => d.measCfgFunc == "2" && d.rptCriteria == "0" && d.eutranMeasQuan == "0" && d.evtId == B1_B2_W1_W2_W3EventId.B1)?.FirstOrDefault(); + var b2data = b1_b2PageResults.Where(d => d.measCfgFunc == "2" && d.rptCriteria == "0" && d.eutranMeasQuan == "0" && d.evtId == B1_B2_W1_W2_W3EventId.B2)?.FirstOrDefault(); + var anydata = b1_b2PageResults.Where(d => d.measCfgFunc == "2" && d.rptCriteria == "0" && d.eutranMeasQuan == "0" && d.evtId == B1_B2_W1_W2_W3EventId.B2)?.FirstOrDefault(); + + if (eventId == AllEventId.B1) + { + return b1data != null ? (b1data.ldn, b1data.rsrpSrvTrd, b1data.rSRPNRTrd) : anydata == null ? null : (anydata.ldn, anydata.rsrpSrvTrd, -1); + } + else if (eventId == AllEventId.B2) + { + return b2data != null ? (b2data.ldn, b2data.rsrpSrvTrd, b2data.rSRPNRTrd) : anydata == null ? null : (anydata.ldn, anydata.rsrpSrvTrd, anydata.rSRPNRTrd); + } + } + throw new NotImplementedException($"not Implement match {eventId.ToString()}"); + } + public static async Task> GetNRDUCell(this ZTEClient client, netype netype, IList NeList = null) + { + var arg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { "NRCellDU" }, + NeList = NeList + }; + string content = await client.ModataQuery(arg); + var ss = JsonConvert.DeserializeObject>(content); + return JsonConvert.DeserializeObject>(content); + } + + ///获取基站下的小区门限值 + //public static async Task QueryLteCellA1(this ZTEClient client, netype netype, CellModel cell) + //{ + // //var query = new MocGetArg + // //{ + // // attrFilter = new List { + // // new AttrFilter + // // { + // // attrNames = new List{ + // // "a3Offset", + // // "thresholdOfRSRP", + // // "a5Threshold2OfRSRP" + // // }, + // // moc = "UeEUtranMeasurementLTE" + // // } + // // }, + // // mocList = new List { "UeEUtranMeasurementLTE" }, + // //}; + // //string content = await client.MoGet(netype, subnetid, neid, query); + // //return JsonConvert.DeserializeObject(content); + //} + + ///获取基站下的小区A1门限索引 + //public static async Task QueryCellsUse4GA1Index(this ZTEClient client, netype netype, string subnetid, string neid) + //{ + // var query = new MocGetArg + // { + // attrFilter = new List { + // new AttrFilter + // { + // attrNames = new List{ + // "closedInterFMeasCfg" + // }, + // moc = "CellMeasGroupLTE" + // } + // }, + // mocList = new List { "CellMeasGroupLTE" }, + // }; + // string content = await client.MoGet(netype, subnetid, neid, query); + // return JsonConvert.DeserializeObject(content); + //} + /////获取基站下的小区A2门限索引 + //public static async Task QueryCellsUse4GA2Index(this ZTEClient client, netype netype, string subnetid, string neid) + //{ + // var query = new MocGetArg + // { + // attrFilter = new List { + // new AttrFilter + // { + // attrNames = new List{ + // "openInterFMeasCfg", + // "openRatFMeasCfg" + // }, + // moc = "CellMeasGroupLTE" + // } + // }, + // mocList = new List { "CellMeasGroupLTE" }, + // }; + // string content = await client.MoGet(netype, subnetid, neid, query); + // return JsonConvert.DeserializeObject(content); + //} + /////获取基站下的小区A3门限索引 + //public static async Task QueryCellsUse4GA3Index(this ZTEClient client, netype netype, string subnetid, string neid) + //{ + // var query = new MocGetArg + // { + // attrFilter = new List { + // new AttrFilter + // { + // attrNames = new List{ + // "intraFHOMeasCfg" + // }, + // moc = "CellMeasGroupLTE" + // } + // }, + // mocList = new List { "CellMeasGroupLTE" }, + // }; + // string content = await client.MoGet(netype, subnetid, neid, query); + // return JsonConvert.DeserializeObject(content); + //} + + //public static async Task QueryCellsUse4GA4_5Index(this ZTEClient client, netype netype, string subnetid, string neid) + //{ + // var query = new MocGetArg + // { + // attrFilter = new List { + // new AttrFilter + // { + // attrNames = new List{ + // "interFHOMeasCfg" + // }, + // moc = "CellMeasGroupLTE" + // } + // }, + // mocList = new List { "CellMeasGroupLTE" }, + // }; + // string content = await client.MoGet(netype, subnetid, neid, query); + // return JsonConvert.DeserializeObject(content); + //} + //public static async Task QueryCellsUse4GB1_B2(this ZTEClient client, netype netype, string subnetid, string neid) + //{ + // var query = new MocGetArg + // { + // attrFilter = new List { + // new AttrFilter + // { + // attrNames = new List{ + // "evtId", + // "rSRPNRTrd", + // "rsrpSrvTrd" + // }, + // moc = "NrRatMeasCfgLTE" + // } + // }, + // mocList = new List { "NrRatMeasCfgLTE" }, + // }; + // string content = await client.MoGet(netype, subnetid, neid, query); + // return JsonConvert.DeserializeObject(content); + //} + + #region 2023-4-28 更改的门限参数 + + public static async Task ModifyInterFHoA1A2(this ZTEClient client, netype netype, CellModel cell, int rsrpThresholdA2, int hysteresisA2) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + + var result = await client.ModataQuery(netype); + + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgInterFHoA1A2 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + hysteresisA2 = hysteresisA2, + rsrpThresholdA2 = rsrpThresholdA2, + }; + moConfig.Add(config); + break; + } + } + } + var InterRatHoA1A2 = await client.ModataQuery(netype); + + foreach (var item in InterRatHoA1A2.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgInterRatHoA1A2_A2 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + rsrpThresholdA2 = $"{rsrpThresholdA2}" + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE || cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var UeEUtranMeasurementLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + foreach (var item in UeEUtranMeasurementLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] == "20") + { + UeEUtranMeasurementLTE ModifyCell = MoDataItem; + if (ModifyCell != null) + { + var config = new MoConfigArgFDDLTEA2 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + thresholdOfRSRP = $"{rsrpThresholdA2}", + }; + moConfig.Add(config); + } + } + else if (ldns[4] == "30") + { + UeEUtranMeasurementLTE ModifyCell = MoDataItem; + if (ModifyCell != null) + { + var config = new MoConfigArgFDDLTEA2 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + thresholdOfRSRP = $"{rsrpThresholdA2}", + }; + moConfig.Add(config); + } + } + } + + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyInterFHoA1A2:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + + } + public static async Task ModifyInterFHoA1A2_A1(this ZTEClient client, netype netype, CellModel cell, int rsrpThresholdA1, int hysteresisA1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + + var result = await client.ModataQuery(netype); + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgInterFHoA1A2_A1 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + hysteresisA1 = hysteresisA1, + rsrpThresholdA1 = rsrpThresholdA1, + }; + moConfig.Add(config); + break; + } + } + } + var InterRatHoA1A2 = await client.ModataQuery(netype); + + foreach (var item in InterRatHoA1A2.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgInterRatHoA1A2_A1 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + rsrpThresholdA1 = $"{rsrpThresholdA1}" + }; + moConfig.Add(config); + break; + } + } + } + + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE || cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var UeEUtranMeasurementLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in UeEUtranMeasurementLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + UeEUtranMeasurementLTE ModifyCell = null; + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] =="10") + { + ModifyCell = MoDataItem; + break; + } + } + if (ModifyCell != null) + { + var config = new MoConfigArgFDDLTEA1 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + thresholdOfRSRP = $"{rsrpThresholdA1}", + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyInterFHoA1A2_A1:{ex.Message}"); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyNRInterFCovHoA4(this ZTEClient client, netype netype, CellModel cell, int rsrpThresholdA4, int hysteresisA4) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var result = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgNRA3_A4 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + eventId = A3_A4EventId.A4, + hysteresis = hysteresisA4, + rsrpThreshold = rsrpThresholdA4, + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + return ResultCode; + } + else + { + return 0; + } + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + Console.WriteLine($"ModifyNRInterFCovHoA4:{ex.Message}"); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModifyNRInterFCovHoA3(this ZTEClient client, netype netype, CellModel cell, double eventOffset, int hysteresisA3) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + + + var result = await client.ModataQuery(netype.ITBBU); + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgNRA3 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + eventId = A3_A4EventId.A3, + hysteresis = hysteresisA3, + eventOffset =eventOffset, + }; + moConfig.Add(config); + // await client.QuickMoConfigTask(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, config); + break; + } + } + } + var NRIntraFCovHo = await client.ModataQuery(netype.ITBBU); + + foreach (var item in NRIntraFCovHo.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config = new MoConfigArgNRIntraFCovHo + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + hysteresis = $"{hysteresisA3}", + eventOffset = $"{eventOffset}", + }; + moConfig.Add(config); + //await client.QuickMoConfigTask(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, config); + break; + } + } + } + + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + //var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE || cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var result = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + UeEUtranMeasurementLTE ModifyCell = null; + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] == "50") + { + ModifyCell = MoDataItem; + break; + } + } + if (ModifyCell != null) + { + var config =new MoConfigArgFDDLTEA3 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + hysteresis = $"{hysteresisA3}", + a3Offset =$"{eventOffset}", + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyInterFHoA1A3:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyNRInterFCovHoA5(this ZTEClient client, netype netype, CellModel cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var result = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + if (ModifyCell != null) + { + var config =new MoConfigArgNRA5 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + hysteresis = hysteresisA5, + rsrpThreshold = rsrpThreshold, + A5Thrd1Rsrp = A5Thrd1Rsrp, + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE || cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var MeasGroupLTEs = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + foreach (var item in MeasGroupLTEs.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"CellMeasGroupLTE=1") != -1); + + if (ModifyCell != null) + { + var config =new MoConfigArgCellMeasGroupLTE + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + interFHOMeasCfg =$"100;100;100;100;100;100;100;100;100;100;100;100;100;100;100;100;101;101;101;101;101;101;101;101;101;101;101;101;101;101;101;101", + }; + moConfig.Add(config); + break; + } + } + } + var UeEUtranMeasurementLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var item in UeEUtranMeasurementLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + UeEUtranMeasurementLTE ModifyCell = null; + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] == "100") + { + ModifyCell = MoDataItem; + break; + } + } + + if (ModifyCell != null) + { + var config = + new MoConfigArgFDDLTEA5 + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + thresholdOfRSRP =$"{A5Thrd1Rsrp}", + a5Threshold2OfRSRP = $"{rsrpThreshold}", + }; + moConfig.Add(config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return -1; + } + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyNRInterFCovHoA5:{ex.Message}"); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + #endregion + + #region 2023-5-17 + /// + /// 小区重选优先级 + /// + /// + /// + /// + /// 该参数是同频小区重选的优先级。该参数配置越小,表示同频频点邻区的重选优先级越低 + public static async Task ModifyCellResel(this ZTEClient client, netype netype, CellModel cell, int cellReselectionPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + var CellResel = await client.ModataQuery(netype); + foreach (var item in CellResel.result) + { + if (item.ne == cell.GetZTENElement()) + { + var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.MoId}") != -1); + + if (ModifyCell != null) + { + if (ModifyCell.cellReselectionPriority == cellReselectionPriority.ToString()) + { + break; + } + var config = new MoConfigArgCellResel + { + ldn = ModifyCell.ldn, + moOp = MoOp.update, + cellReselectionPriority=$"{cellReselectionPriority}" + }; + moConfig.Add(config); + break; + } + } + } + var InterFReselection = await client.ModataQuery(netype); + foreach (var item in InterFReselection.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"NRCellCU={cell.MoId}") != -1) + { + if (itemI.cellReselectionPriority == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgInterFReselection + { + ldn = itemI.ldn, + moOp = MoOp.update, + cellReselectionPriority = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + + } + } + var EUTRAReselection = await client.ModataQuery(netype); + foreach (var item in EUTRAReselection.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"NRCellCU={cell.MoId}") != -1) + { + if (itemI.cellReselectionPriority == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgEUTRAReselection + { + ldn = itemI.ldn, + moOp = MoOp.update, + cellReselectionPriority = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var moConfig = new List(); + + var EUtranRslParaFDD = await client.ModataQuery(netype); + foreach (var item in EUtranRslParaFDD.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.MoId}") != -1) + { + if (itemI.interReselPrio == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgEUtranRslParaFDD + { + ldn = itemI.ldn, + moOp = MoOp.update, + interReselPrio = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + + } + } + + var NRCelRtFLTE = await client.ModataQuery(netype); + foreach (var item in NRCelRtFLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.MoId}") != -1) + { + if (itemI.nrReselPrio == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgNRCelRtFLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + nrReselPrio = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var moConfig = new List(); + + var EUtranRslParaTDD = await client.ModataQuery(netype); + foreach (var item in EUtranRslParaTDD.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.MoId}") != -1) + { + if (itemI.interReselPrio == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgEUtranRslParaTDD + { + ldn = itemI.ldn, + moOp = MoOp.update, + interReselPrio = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + + } + } + + var NRCelRtTLTE = await client.ModataQuery(netype); + foreach (var item in NRCelRtTLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.MoId}") != -1) + { + if (itemI.nrReselPrio == cellReselectionPriority.ToString()) + { + continue; + } + var config = new MoConfigArgNRCelRtTLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + nrReselPrio = $"{cellReselectionPriority}" + }; + moConfig.Add(config); + } + } + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyCellResel:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + /// + /// 用户非激活定时器 + /// + /// + /// + /// + /// 该参数是基站侧检测终端是否有用户数据的定时器时长。当终端进入连接态时,启动该定时器,当终端进入空闲态或非激活态时,中止该定时器。当终端在该定时器时长内无用户数据时,根据RRC状态转换功能配置(GlobalSwitchInformation.rrcStateFuncCfg)开关状态判决是否让终端从连接态进入到空闲态或者非激活态。 + public static async Task ModifyInactiveParameter(this ZTEClient client, netype netype, CellModel cell, int inactiveTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var result = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + if (item.MoData[0].inactiveTimer == $"{inactiveTimer}s") + { + break; + } + var config = new MoConfigArgInactiveParameter + { + ldn = item.MoData[0].ldn, + moOp = MoOp.update, + inactiveTimer = $"{inactiveTimer}s" + }; + moConfig.Add(config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + var result = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in result.result) + { + if (item.ne == cell.GetZTENElement()) + { + + var tUserInac = ""; + switch (inactiveTimer) + { + case 1: + tUserInac = "0"; + break; + case 2: + tUserInac = "1"; + break; + case 3: + tUserInac = "2"; + break; + case 5: + tUserInac = "3"; + break; + case 7: + tUserInac = "4"; + break; + case 10: + tUserInac = "5"; + break; + case 15: + tUserInac = "6"; + break; + case 20: + tUserInac = "7"; + break; + case 25: + tUserInac = "8"; + break; + case 30: + tUserInac = "9"; + break; + case 40: + tUserInac = "10"; + break; + case 50: + tUserInac = "11"; + break; + case 60: + tUserInac = "12"; + break; + case 80: + tUserInac = "13"; + break; + case 100: + tUserInac = "14"; + break; + case 120: + tUserInac = "15"; + break; + case 150: + tUserInac = "16"; + break; + case 180: + tUserInac = "17"; + break; + case 210: + tUserInac = "18"; + break; + case 240: + tUserInac = "19"; + break; + case 300: + tUserInac = "20"; + break; + case 360: + tUserInac = "21"; + break; + case 420: + tUserInac = "22"; + break; + case 480: + tUserInac = "23"; + break; + case 540: + tUserInac = "24"; + break; + case 600: + tUserInac = "25"; + break; + } + if (item.MoData[0].tUserInac == $"{tUserInac}") + { + break; + } + var config = new MoConfigArgUeTimerLTE + { + ldn = item.MoData[0].ldn, + moOp = MoOp.update, + tUserInac = tUserInac + }; + moConfig.Add(config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyInactiveParameter:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + /// + /// 修改NR B1/B2 + /// + /// + /// + /// + /// + /// + /// + public static async Task ModifyLTEFreqCovHo(this ZTEClient client, netype netype, CellModel cell, string eventId, double rsrpThreshold = 0, double b2Thrd1Rsrp = 0) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var LTEFreqCovHo = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in LTEFreqCovHo.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyLTEFreqCovHo-cellConfig:cell.LocalId:{cell.LocalId} Select LTEFreqCovHo null"); + break; + } + if (eventId == "B1") + { + var Config = new MoConfigArgLTEFreqCovHo + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + eventId = eventId, + rsrpThreshold = $"{rsrpThreshold}" + }; + moConfig.Add(Config); + break; + + } + else if (eventId == "B2") + { + var Config = new MoConfigArgLTEFreqCovHo + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + eventId =eventId, + rsrpThreshold =$"{rsrpThreshold}", + b2Thrd1Rsrp =$"{b2Thrd1Rsrp}" + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE || cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var NrRatMeasCfgLTE = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in NrRatMeasCfgLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + if (eventId == "B1") + { + NrRatMeasCfgLTE ModifyCell = null; + + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] == "2100") + { + ModifyCell = MoDataItem; + break; + } + } + if (ModifyCell != null) + { + var config = + new MoConfigArgNrRatMeasCfgLTE + { + + ldn = ModifyCell.ldn, + moOp = MoOp.update, + rsrpSrvTrd = $"{b2Thrd1Rsrp}", + evtId = 0, + }; + moConfig.Add(config); + break; + } + } + else if (eventId == "B2") + { + NrRatMeasCfgLTE ModifyCell = null; + + foreach (var MoDataItem in item.MoData) + { + var ldns = MoDataItem.ldn.Split('='); + if (ldns[4] == "2120") + { + ModifyCell = MoDataItem; + break; + } + } + if (ModifyCell != null) + { + var config =new MoConfigArgNrRatMeasCfgLTE + { + + ldn = ModifyCell.ldn, + moOp = MoOp.update, + rsrpSrvTrd = $"{b2Thrd1Rsrp}", + rSRPNRTrd = $"{rsrpThreshold}", + evtId = 1, + }; + moConfig.Add(config); + break; + } + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyInactiveParameter:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + + + #endregion + /// + /// 同频/异频小区重选起测RSRP门限 + /// + /// + /// + /// + /// + public static async Task ModifyIntraFReselection(this ZTEClient client, netype netype, CellModel cell, double sIntraSearchP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + var IntraFReselection = await client.ModataQuery(netype); + foreach (var item in IntraFReselection.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyIntraFReselection -cellConfig:cell.LocalId:{cell.LocalId} Select IntraFReselection null"); + break; + } + var Config = new MoConfigIntraFReselection + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + sIntraSearchP = $"{Math.Floor(sIntraSearchP / 2)}" + }; + moConfig.Add(Config); + break; + } + } + var CellResel = await client.ModataQuery(netype); + + foreach (var item in CellResel.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyIntraFReselection -cellConfig:cell.LocalId:{cell.LocalId} Select IntraFReselection null"); + break; + } + var Config = new MoConfigCellResel_sNonIntraSearch + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + sNonIntraSearchP = $"{Math.Floor(sIntraSearchP / 2)}", + sNonIntraSearchSwitch = "enable" + }; + moConfig.Add(Config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var EUtranReselectionFDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in EUtranReselectionFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyIntraFReselection -cellConfig:cell.LocalId:{cell.LocalId} Select EUtranReselectionFDDLTE null"); + break; + } + var Config = new MoConfigArgEUtranReselectionFDDLTE2 + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + r9SIntraSrchP = $"{sIntraSearchP}", + r9SNintraSrchP = $"{sIntraSearchP}", + sIntraSearch = $"{sIntraSearchP}" + }; + moConfig.Add(Config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var EUtranReselectionTDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + foreach (var item in EUtranReselectionTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyIntraFReselection -cellConfig:cell.LocalId:{cell.LocalId} Select EUtranReselectionFDDLTE null"); + break; + } + var Config = new MoConfigArgCUEUtranCellTDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + r9SIntraSrchP = $"{sIntraSearchP}", + r9SNintraSrchP = $"{sIntraSearchP}", + sIntraSearch = $"{sIntraSearchP}" + }; + moConfig.Add(Config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult!=0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyIntraFReselection:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + #region 2023-7-5 + public static async Task TestPlannedArea(this ZTEClient client) + { + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + + + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + + + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + + + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + + + return 0; + } + + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiQuickExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiQuickExtension.cs new file mode 100644 index 00000000..5fc209c3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiQuickExtension.cs @@ -0,0 +1,16964 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.General; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.MoHandle; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ENBCUCPFunction; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Carrier; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.EasyApi +{ + public static class EasyApiQuickExtension + { + #region 自动化频点 + public static async Task GetFreq(this ZTEClient client, CellModel targetTo, CellModel cell) + { + var infos = await client.ModataQuery(netype.ITBBU); + return infos?.result?.FirstOrDefault(n => n.ne == targetTo.GetZTENElement()).MoData?.FirstOrDefault(); + //var resultNRFreq = infos?.result?.FirstOrDefault(m => m.ne == targetTo.GetZTENElement()).MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRFreq={targetTo.LocalId}") != -1); + //if (resultNRFreq != null) + //{ + // return resultNRFreq; + + //} + //else + //{ + // return null; + //} + } + public static async Task AutoGetOrAddFreq(this ZTEClient client, string areaId, CellModel targetTo, CellModel cell) + { + var resultNRFreq = await GetFreq(client, targetTo, cell); + //var resultNRFreq = infos?.result?.FirstOrDefault(n => n.ne == targetTo.GetZTENElement()).MoData?.FirstOrDefault(m => m.ssbFrequency == cell.ssbFrequency); + if (resultNRFreq == null) + { + string moId = Guid.NewGuid().ToString().Replace("-", ""); + var moConfigArgs = new List { + new MoConfigArgNRFreq + { + moId = moId, + ssbFrequency = cell.ssbFrequency, + ldn = $"GNBCUCPFunction={targetTo.ZTEpLMNId}_{targetTo.ZTEgNBId},NRFreq={moId}", + moOp = MoOp.create, + //mocName = "NRFreq", + }, + new MoConfigArgFrequencyBandList + { + moId = moId, + ldn = $"GNBCUCPFunction={targetTo.ZTEpLMNId}_{targetTo.ZTEgNBId},NRFreq={moId},FrequencyBandList={moId}", + moOp = MoOp.create, + freqBandIndicator = 123, + }}; + await client.QuickMoConfigTask(areaId, netype.ITBBU, targetTo.ZTESubNetwork, targetTo.ZTEManagedElement, moConfigArgs); + } + resultNRFreq = await GetFreq(client, targetTo, cell); + + if (resultNRFreq == null) + { + throw new InvalidOperationException($"auto add Freq failed in cell {targetTo.Name} for cell {cell.Name}"); + } + return resultNRFreq; + } + #endregion + + #region 同网元NR同频切换 + public static MoQueryResultNRCellRelation GetSameNElementNRRelation(MoQueryResultBase Relations, CellModel cellFirst, CellModel cellSecond) + { + return Relations?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && !string.IsNullOrWhiteSpace(c.refNRCellCU) && c.refNRCellCU.IndexOf($"NRCellCU={cellSecond.LocalId}") != -1); + } + public static MoQueryResultNRCellCU GetCellCU(MoQueryResultBase moQuery, CellModel cell) + { + return moQuery?.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement()).MoData?.FirstOrDefault(d => d.cellLocalId == cell.LocalId); + } + public static async Task DeleteNRRelation(this ZTEClient client, string areaId, CellModel cell, MoQueryResultNRCellRelation relation) + { + var moConfigArgs = new List + { + + new MoConfigArgNRCellRelation + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfigArgs); + } + public static MoConfigArgNRCellRelation CreateSameNRCellRelationArg(CellModel cellFirst, CellModel cellSecond) + { + return + new MoConfigArgNRCellRelation + { + moOp = MoOp.create, + moId = $"{cellFirst.ZTEpLMNId}-{cellFirst.ZTEgNBId}-{cellFirst.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEManagedElement},NRCellCU={cellSecond.LocalId}" + }; + } + public static async Task CreateSameNRCellRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellFirst, cellSecond) + }; + + await client.QuickMoConfigRelatedTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + public static async Task CreateSameNRCellRelationEachOther(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellFirst, cellSecond), + CreateSameNRCellRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + public static async Task SameNElementNRtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.MobileStandard != CellMobileStandard.NR || cellSecond.MobileStandard != CellMobileStandard.NR) + throw new InvalidOperationException("cellFirst.MobileStandard != CellMobileStandard.NR || cellSecond.MobileStandard != CellMobileStandard.NR"); + + if (cellFirst.ZTEManagedElement != cellSecond.ZTEManagedElement) + throw new InvalidOperationException("this is not same ManagedElement"); + + var cellCUs = await client.ModataQuery(netype.ITBBU); + var cellFirstCU = GetCellCU(cellCUs, cellFirst); + var cellSecondCU = GetCellCU(cellCUs, cellSecond); + + var NRCell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + var cellFirstToSecond = GetSameNElementNRRelation(NRCell, cellFirst, cellSecond); + var cellSecondToFirst = GetSameNElementNRRelation(NRCell, cellSecond, cellFirst); + + if (cellSecondToFirst != null && cellFirstToSecond != null) + { + return; + } + + if (cellSecondToFirst == null && cellFirstToSecond == null) + { + await client.CreateSameNRCellRelationEachOther(areaId, cellFirst, cellSecond); + } + else if (cellFirstToSecond == null) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellFirst, cellSecond), + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else if (cellSecondToFirst == null) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + } + + /// + /// 创建邻区 5-5/5-4 + /// + /// + /// + /// + /// + /// + public static async Task NRtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + //5-5同站异站 + if (cellFirst.MobileStandard == CellMobileStandard.NR && cellSecond.MobileStandard == CellMobileStandard.NR) + { + var NRCellRelation = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + MoQueryResultNRCellRelation resultNRCellRelation = new MoQueryResultNRCellRelation(); + + resultNRCellRelation = NRCellRelation?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + if (resultNRCellRelation == null) + { + if (cellFirst.GetZTENElement() == cellSecond.GetZTENElement()) + { + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgNRCellRelation + { + moOp = MoOp.create, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEManagedElement},NRCellCU={cellSecond.LocalId}" + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else + { + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgExternalNRCellRelation + { + moOp = MoOp.create, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}" + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + } + } + else + { + var EutranCellRelations = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultEutranCellRelation resultEutranCellRelation = new MoQueryResultEutranCellRelation(); + resultEutranCellRelation = EutranCellRelations?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + + if (resultEutranCellRelation == null) + { + if (cellSecond.MobileStandard == CellMobileStandard.FDDLTE) + { + var lteMapping = await client.PreSettingsFDDLteRelationInNR(areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgEutranCellRelationFDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEutranCellFDD = lteMapping.ldn + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else if (cellSecond.MobileStandard == CellMobileStandard.TDDLTE) + { + var lteMapping = await client.PreSettingsTDDLteRelationInNR(areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgEutranCellRelationTDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEutranCellTDD = lteMapping.ldn + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + } + } + } + public static async Task LTEtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.MobileStandard == CellMobileStandard.FDDLTE) + { + var NRPhysicalCellDU = await client.ModataQuery(netype.ITBBU); + var SecondNRPhysicalCellDU = NRPhysicalCellDU.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + NRPhysicalCellDU nRPhysicalCellDU = SecondNRPhysicalCellDU.MoData.Where(m => m.moId == cellSecond.MoId).FirstOrDefault(); + if (nRPhysicalCellDU.duplexMode == "TDD") + { + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + ExternalNrCellLTE LastNrCellLTE = SecondExternalNrCellLTE.MoData.LastOrDefault(); + + ExternalNrCellLTE moQueryResult = new ExternalNrCellLTE(); + moQueryResult = SecondExternalNrCellLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + if (moQueryResult == null) + { + var nbrCells = await client.ModataQuery(netype.ITBBU); + var currentNbrCell = nbrCells.result.FirstOrDefault(c => c.ne == cellFirst.GetZTENElement()).MoData.FirstOrDefault(); + string[] pLMNs = cellSecond.ZTEpLMNId.Split('-'); + string mcc = pLMNs[0]; + string mnc = pLMNs[1]; + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in SecondExternalNrCellLTE.MoData) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + + moConfigArgs.Add(new MoConfigArgExternalNrCellLTE2 + { + moOp = MoOp.create, + ldn = currentNbrCell.ldn + $",ExternalNrCellLTE={newldnId}", + moId = $"{newldnId}", + gNodeBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId, + centerFreq = $"{cellSecond.ssbFrequency}", + mcc = mcc, + mnc = mnc, + mcclist = mcc, + mnclist = mnc, + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + if (ResultCode == 0) + { + ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + LastNrCellLTE = SecondExternalNrCellLTE.MoData.LastOrDefault(); + moQueryResult = SecondExternalNrCellLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + } + } + if (moQueryResult != null) + { + var NrNiborRelaFDDLTEs = await client.ModataQuery(netype.ITBBU); + NrNiborRelaFDDLTE moQueryNrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + var ZTENElementNrNiborRelaFDDLTE = NrNiborRelaFDDLTEs.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + + List CellFirstNrNiborRelaFDDLTE = new List(); + + foreach (var item in ZTENElementNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1) + { + CellFirstNrNiborRelaFDDLTE.Add(item); + } + } + NrNiborRelaFDDLTE LastCellFirstNrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + var sss = CellFirstNrNiborRelaFDDLTE.OrderBy(m => m.moId).ToList(); + LastCellFirstNrNiborRelaFDDLTE = CellFirstNrNiborRelaFDDLTE.LastOrDefault(); + NrNiborRelaFDDLTE NrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + NrNiborRelaFDDLTE = CellFirstNrNiborRelaFDDLTE.FirstOrDefault(m => m.refExternalNrCellLTE == moQueryResult.ldn); + if (NrNiborRelaFDDLTE == null) + { + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in CellFirstNrNiborRelaFDDLTE) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + + moConfigArgs.Add(new MoConfigArgNrNiborRelaFDDLTE_NrCellLTE + { + moOp = MoOp.create, + refExternalNrCellLTE = moQueryResult.ldn, + moId = $"{newldnId}", + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellFirst.LocalId},NeighbouringRelationFDD=1,NrNiborRelaFDDLTE={newldnId}", + }); + + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + + if (moConfig.Count != 0) + { + var ResultCode2 = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return ResultCode; + } + else + { + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode2 = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return 0; + } + } + else + { + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return -1; + } + } + else if (nRPhysicalCellDU.duplexMode == "FDD") + { + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + ExternalNrCellFDDLTE LastNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.LastOrDefault(); + + ExternalNrCellFDDLTE moQueryResult = new ExternalNrCellFDDLTE(); + moQueryResult = SecondExternalNrCellFDDLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + + if (moQueryResult == null) + { + var nbrCells = await client.ModataQuery(netype.ITBBU); + var currentNbrCell = nbrCells.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + string[] pLMNs = cellSecond.ZTEpLMNId.Split('-'); + string mcc = pLMNs[0]; + string mnc = pLMNs[1]; + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in SecondExternalNrCellFDDLTE.MoData) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + + moConfigArgs.Add(new MoConfigArgExternalNrCellLTE2 + { + moOp = MoOp.create, + ldn = currentNbrCell.ldn + $",ExternalNrCellFDDLTE={newldnId}", + moId = $"{newldnId}", + gNodeBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId, + centerFreq = $"{cellSecond.ssbFrequency}", + mcc = mcc, + mnc = mnc, + mcclist = mcc, + mnclist = mnc, + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + if (ResultCode == 0) + { + ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + LastNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.LastOrDefault(); + moQueryResult = SecondExternalNrCellFDDLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + } + + } + if (moQueryResult != null) + { + var NrNiborRelaFDDLTEs = await client.ModataQuery(netype.ITBBU); + NrNiborRelaFDDLTE moQueryNrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + var ZTENElementNrNiborRelaFDDLTE = NrNiborRelaFDDLTEs.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + + List CellFirstNrNiborRelaFDDLTE = new List(); + + foreach (var item in ZTENElementNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1) + { + CellFirstNrNiborRelaFDDLTE.Add(item); + } + } + NrNiborRelaFDDLTE LastCellFirstNrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + LastCellFirstNrNiborRelaFDDLTE = CellFirstNrNiborRelaFDDLTE.LastOrDefault(); + NrNiborRelaFDDLTE NrNiborRelaFDDLTE = new NrNiborRelaFDDLTE(); + // + + NrNiborRelaFDDLTE = CellFirstNrNiborRelaFDDLTE.FirstOrDefault(m => m.refExternalNrCellFDDLTE == moQueryResult.ldn); + if (NrNiborRelaFDDLTE == null) + { + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in CellFirstNrNiborRelaFDDLTE) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + moConfigArgs.Add(new MoConfigArgNrNiborRelaFDDLTE_NrCellFDDLTE + { + moOp = MoOp.create, + refExternalNrCellFDDLTE = moQueryResult.ldn, + moId = $"{newldnId}", + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellFirst.LocalId},NeighbouringRelationFDD=1,NrNiborRelaFDDLTE={newldnId}", + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode2 = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return ResultCode; + } + else + { + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + + } + return 0; + } + } + else + { + var EndcPlmnFDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnFDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnFDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return -1; + } + } + else + { + return 0; + } + } + else if (cellFirst.MobileStandard == CellMobileStandard.TDDLTE) + { + var NRPhysicalCellDU = await client.ModataQuery(netype.ITBBU); + var SecondNRPhysicalCellDU = NRPhysicalCellDU.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + NRPhysicalCellDU nRPhysicalCellDU = SecondNRPhysicalCellDU.MoData.Where(m => m.moId == cellSecond.MoId).FirstOrDefault(); + if (nRPhysicalCellDU.duplexMode == "TDD") + { + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + ExternalNrCellLTE LastNrCellLTE = SecondExternalNrCellLTE.MoData.LastOrDefault(); + + ExternalNrCellLTE moQueryResult = new ExternalNrCellLTE(); + moQueryResult = SecondExternalNrCellLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + if (moQueryResult == null) + { + var nbrCells = await client.ModataQuery(netype.ITBBU); + var currentNbrCell = nbrCells.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + string[] pLMNs = cellSecond.ZTEpLMNId.Split('-'); + string mcc = pLMNs[0]; + string mnc = pLMNs[1]; + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in SecondExternalNrCellLTE.MoData) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + moConfigArgs.Add(new MoConfigArgExternalNrCellLTE2 + { + moOp = MoOp.create, + ldn = currentNbrCell.ldn + $",ExternalNrCellLTE={newldnId}", + moId = $"{newldnId}", + gNodeBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId, + centerFreq = $"{cellSecond.ssbFrequency}", + mcc = mcc, + mnc = mnc, + mcclist = mcc, + mnclist = mnc, + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + if (ResultCode == 0) + { + ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + LastNrCellLTE = SecondExternalNrCellLTE.MoData.LastOrDefault(); + moQueryResult = SecondExternalNrCellLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + } + } + if (moQueryResult != null) + { + var NrNiborRelaTDDLTEs = await client.ModataQuery(netype.ITBBU); + NrNiborRelaTDDLTE moQueryNrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + var ZTENElementNrNiborRelaTDDLTE = NrNiborRelaTDDLTEs.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + + List CellFirstNrNiborRelaTDDLTE = new List(); + + foreach (var item in ZTENElementNrNiborRelaTDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1) + { + CellFirstNrNiborRelaTDDLTE.Add(item); + } + } + NrNiborRelaTDDLTE LastCellFirstNrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + LastCellFirstNrNiborRelaTDDLTE = CellFirstNrNiborRelaTDDLTE.LastOrDefault(); + NrNiborRelaTDDLTE NrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + NrNiborRelaTDDLTE = CellFirstNrNiborRelaTDDLTE.FirstOrDefault(m => m.refExternalNrCellLTE == moQueryResult.ldn); + if (NrNiborRelaTDDLTE == null) + { + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in CellFirstNrNiborRelaTDDLTE) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + moConfigArgs.Add(new MoConfigArgNrNiborRelaTDDLTE_NrCellLTE + { + moOp = MoOp.create, + refExternalNrCellLTE = moQueryResult.ldn, + moId = $"{newldnId}", + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellFirst.LocalId},NeighbouringRelationTDD=1,NrNiborRelaTDDLTE={newldnId}", + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode2 = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + + } + return ResultCode; + } + else + { + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return 0; + } + } + else + { + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return -1; + } + } + else if (nRPhysicalCellDU.duplexMode == "FDD") + { + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + ExternalNrCellFDDLTE LastNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.LastOrDefault(); + + ExternalNrCellFDDLTE moQueryResult = new ExternalNrCellFDDLTE(); + moQueryResult = SecondExternalNrCellFDDLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + + if (moQueryResult == null) + { + var nbrCells = await client.ModataQuery(netype.ITBBU); + var currentNbrCell = nbrCells.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + string[] pLMNs = cellSecond.ZTEpLMNId.Split('-'); + string mcc = pLMNs[0]; + string mnc = pLMNs[1]; + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in SecondExternalNrCellFDDLTE.MoData) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + + moConfigArgs.Add(new MoConfigArgExternalNrCellFDDLTE2 + { + moOp = MoOp.create, + ldn = currentNbrCell.ldn + $",ExternalNrCellFDDLTE={newldnId}", + moId = $"{newldnId}", + gNodeBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId, + centerFreq = $"{cellSecond.ssbFrequency}", + mcc = mcc, + mnc = mnc, + mcclist = mcc, + mnclist = mnc, + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + if (ResultCode == 0) + { + ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + LastNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.LastOrDefault(); + moQueryResult = SecondExternalNrCellFDDLTE.MoData.Where(m => m.gNodeBId == cellSecond.ZTEManagedElement && m.cellLocalId == cellSecond.LocalId).FirstOrDefault(); + } + + } + if (moQueryResult != null) + { + var NrNiborRelaTDDLTEs = await client.ModataQuery(netype.ITBBU); + NrNiborRelaTDDLTE moQueryNrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + var ZTENElementNrNiborRelaFDDLTE = NrNiborRelaTDDLTEs.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + + List CellFirstNrNiborRelaTDDLTE = new List(); + + foreach (var item in ZTENElementNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1) + { + CellFirstNrNiborRelaTDDLTE.Add(item); + } + } + NrNiborRelaTDDLTE LastCellFirstNrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + LastCellFirstNrNiborRelaTDDLTE = CellFirstNrNiborRelaTDDLTE.LastOrDefault(); + NrNiborRelaTDDLTE NrNiborRelaTDDLTE = new NrNiborRelaTDDLTE(); + + NrNiborRelaTDDLTE = CellFirstNrNiborRelaTDDLTE.FirstOrDefault(m => m.refExternalNrCellFDDLTE == moQueryResult.ldn); + if (NrNiborRelaTDDLTE == null) + { + var moConfigArgs = new List(); + int newldnId = 1; + var exclude = new HashSet(); + foreach (var excludeitem in CellFirstNrNiborRelaTDDLTE) + { + exclude.Add(Convert.ToInt32(excludeitem.moId)); + } + var range = Enumerable.Range(1, 255).Where(i => !exclude.Contains(i)); + var rand = new Random(); + int index = rand.Next(1, 100 - exclude.Count); + newldnId = range.ElementAt(index); + + moConfigArgs.Add(new MoConfigArgNrNiborRelaTDDLTE_NrCellFDDLTE + { + moOp = MoOp.create, + refExternalNrCellFDDLTE = moQueryResult.ldn, + moId = $"{newldnId}", + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellFirst.LocalId},NeighbouringRelationTDD=1,NrNiborRelaTDDLTE={newldnId}", + }); + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode2 = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return ResultCode; + } + else + { + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return 0; + } + } + else + { + var EndcPlmnTDDLTE = await client.ModataQuery(netype.ITBBU); + var moConfig = new List(); + + foreach (var item in EndcPlmnTDDLTE.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + foreach (var itemI in item.MoData) + { + if (itemI.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.MoId}") != -1) + { + if (itemI.enDcSwch1 == "1") + { + continue; + } + var config = new MoConfigArgEndcPlmnTDDLTE + { + ldn = itemI.ldn, + moOp = MoOp.update, + enDcSwch1 = "1" + }; + moConfig.Add(config); + } + } + break; + } + } + if (moConfig.Count != 0) + { + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + } + return -1; + } + } + else + { + return 0; + } + } + else + { + return 0; + } + ////5-5同站异站 + //if (cellFirst.MobileStandard == CellMobileStandard.NR && cellSecond.MobileStandard == CellMobileStandard.NR) + //{ + // var NRCellRelation = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + // MoQueryResultNRCellRelation resultNRCellRelation = new MoQueryResultNRCellRelation(); + + // resultNRCellRelation = NRCellRelation?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + // if (resultNRCellRelation == null) + // { + // if (cellFirst.GetZTENElement() == cellSecond.GetZTENElement()) + // { + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgNRCellRelation + // { + // moOp = MoOp.create, + // moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // refNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEManagedElement},NRCellCU={cellSecond.LocalId}" + // }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + // } + // else + // { + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgExternalNRCellRelation + // { + // moOp = MoOp.create, + // moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // refExternalNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}" + // }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + // } + + // } + //} + //else + //{ + // var EutranCellRelations = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + // MoQueryResultEutranCellRelation resultEutranCellRelation = new MoQueryResultEutranCellRelation(); + // resultEutranCellRelation = EutranCellRelations?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + + // if (resultEutranCellRelation == null) + // { + // if (cellSecond.MobileStandard == CellMobileStandard.FDDLTE) + // { + // var lteMapping = await client.PreSettingsFDDLteRelationInNR(areaId, cellFirst, cellSecond); + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgEutranCellRelationFDD + // { + // moOp = MoOp.create, + // ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // refExternalEutranCellFDD = lteMapping.ldn + // }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + // } + // else if (cellSecond.MobileStandard == CellMobileStandard.TDDLTE) + // { + // var lteMapping = await client.PreSettingsTDDLteRelationInNR(areaId, cellFirst, cellSecond); + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgEutranCellRelationTDD + // { + // moOp = MoOp.create, + // ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + // refExternalEutranCellTDD = lteMapping.ldn + // }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + // } + // } + //} + } + public static async Task LTEtoLTECreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + //4-4同站异站 + if (cellFirst.MobileStandard == CellMobileStandard.FDDLTE && cellSecond.MobileStandard == CellMobileStandard.FDDLTE) + { + var result = await client.ModataQuery(netype.ITBBU); + + var NRCellRelation = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + MoQueryResultNRCellRelation resultNRCellRelation = new MoQueryResultNRCellRelation(); + + resultNRCellRelation = NRCellRelation?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + if (resultNRCellRelation == null) + { + if (cellFirst.GetZTENElement() == cellSecond.GetZTENElement()) + { + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgNRCellRelation + { + moOp = MoOp.create, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEManagedElement},NRCellCU={cellSecond.LocalId}" + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else + { + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgExternalNRCellRelation + { + moOp = MoOp.create, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalNRCellCU = $"GNBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}" + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + } + } + else + { + var EutranCellRelations = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultEutranCellRelation resultEutranCellRelation = new MoQueryResultEutranCellRelation(); + resultEutranCellRelation = EutranCellRelations?.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + + if (resultEutranCellRelation == null) + { + if (cellSecond.MobileStandard == CellMobileStandard.FDDLTE) + { + var lteMapping = await client.PreSettingsFDDLteRelationInNR(areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgEutranCellRelationFDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEutranCellFDD = lteMapping.ldn + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else if (cellSecond.MobileStandard == CellMobileStandard.TDDLTE) + { + var lteMapping = await client.PreSettingsTDDLteRelationInNR(areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgEutranCellRelationTDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEutranCellTDD = lteMapping.ldn + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + } + } + } + public static async Task RemoveCellRelation(this ZTEClient client, CellModel cellFirst, CellModel cellSecond) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cellFirst.MobileStandard == CellMobileStandard.NR && cellSecond.MobileStandard == CellMobileStandard.NR) + { + var NRCell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultNRCellRelation relation = NRCell.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.Name}") != -1); + + if (relation == null) + { + return; + } + var moConfigArgs = new List + { + + new MoConfigArgNRCellRelationDel + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else + { + var NR_LTECell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultEutranCellRelation relation = NR_LTECell.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + if (relation == null) + { + return; + } + var moConfigArgs = new List + { + + new MoConfigArgEutranCellRelation + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"RemoveNRCellRelation:{ex.Message}"); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + + + } + /// + /// 5G同频切换 + /// + /// + /// + /// + /// + /// + /// + public static async Task SameNElementNNRtoNRSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.SameNElementNRtoNRCreateRelation(areaId, cellFirst, cellSecond); + + //var NRInterFCovHos = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + //var cellFirstA3 = NRInterFCovHos?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())? + //.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1); + //var cellSecondA3 = NRInterFCovHos?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())? + //.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cellSecond.LocalId}") != -1); + //if (cellFirstA3 != null && cellSecondA3 != null) + //{ + // var moConfigArgs = new List(); + + // if (cellFirstA3.eventOffset != A3Value) + // { + // moConfigArgs.Add(new MoConfigArgA3eventOffset { moOp = MoOp.update, ldn = cellFirstA3.ldn, eventOffset = A3Value }); + // } + + // if (cellSecondA3.eventOffset != A3Value) + // { + // moConfigArgs.Add(new MoConfigArgA3eventOffset { moOp = MoOp.update, ldn = cellSecondA3.ldn, eventOffset = A3Value }); + // }; + + // if (moConfigArgs.Count != 0) + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + //} + } + + #endregion + public static async Task RemoveNRCellRelation(this ZTEClient client, CellModel cellFirst, CellModel cellSecond) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cellFirst.MobileStandard == CellMobileStandard.NR && cellSecond.MobileStandard == CellMobileStandard.NR) + { + var NRCell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultNRCellRelation relation = NRCell.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + + if (relation == null) + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgNRCellRelationDel + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + + } + if (cellFirst.MobileStandard == CellMobileStandard.FDDLTE && cellSecond.MobileStandard == CellMobileStandard.FDDLTE) + { + + + var EUtranRelationFDDLTE = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + EUtranRelationFDDLTE relation = EUtranRelationFDDLTE.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1 && m.refCUEUtranCellFDDLTE.IndexOf($"CUEUtranCellFDDLTE={cellSecond.LocalId}") != -1); + + if (relation == null) + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgEUtranRelationFDDLTEDel + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + + } + if (cellFirst.MobileStandard == CellMobileStandard.TDDLTE && cellSecond.MobileStandard == CellMobileStandard.TDDLTE) + { + var NRCell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + EUtranRelationTDDLTE relation = NRCell.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1 && m.refCUEUtranCellTDDLTE.IndexOf($"CUEUtranCellTDDLTE={cellSecond.LocalId}") != -1); + + if (relation == null) + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgEUtranRelationTDDLTEDel + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + } + else + { + if (cellFirst.MobileStandard == CellMobileStandard.NR) + { + var NR_LTECell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + MoQueryResultEutranCellRelation relation = NR_LTECell.result?.FirstOrDefault().MoData?.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && m.ldn.IndexOf($"EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + if (relation == null) + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgEutranCellRelation + { + moOp = MoOp.delete, + ldn = relation.ldn, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + } + else + { + if (cellFirst.MobileStandard == CellMobileStandard.FDDLTE) + { + var NRPhysicalCellDU = await client.ModataQuery(netype.ITBBU); + var SecondNRPhysicalCellDU = NRPhysicalCellDU.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + NRPhysicalCellDU nRPhysicalCellDU = SecondNRPhysicalCellDU.MoData.Where(m => m.moId == cellSecond.MoId).FirstOrDefault(); + if (nRPhysicalCellDU.duplexMode == "TDD") + { + var NrNiborRelaFDDLTE = await client.ModataQuery(netype.ITBBU); + var SubNetworkNrNiborRelaFDDLTE = NrNiborRelaFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + var LDN = ""; + foreach (var item in SubNetworkNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1) + { + + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + var SecondNrCellLTE = SecondExternalNrCellLTE.MoData.FirstOrDefault(m => m.ldn == item.refExternalNrCellLTE && m.gNodeBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + if (SecondNrCellLTE != null) + { + LDN = item.ldn; + break; + } + + } + } + if (LDN == "") + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgNrNiborRelaFDDLTEDel + { + moOp = MoOp.delete, + ldn = LDN, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + } + else if (nRPhysicalCellDU.duplexMode == "FDD") + { + var NrNiborRelaFDDLTE = await client.ModataQuery(netype.ITBBU); + var SubNetworkNrNiborRelaFDDLTE = NrNiborRelaFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + var LDN = ""; + foreach (var item in SubNetworkNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId}") != -1) + { + + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + var SecondNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.FirstOrDefault(m => m.ldn == item.refExternalNrCellFDDLTE && m.gNodeBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + if (SecondNrCellFDDLTE != null) + { + + LDN = item.ldn; + break; + } + } + } + if (LDN == "") + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgNrNiborRelaFDDLTEDel + { + moOp = MoOp.delete, + ldn = LDN, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + + } + else + { + return 0; + } + + } + else if (cellFirst.MobileStandard == CellMobileStandard.TDDLTE) + { + var NRPhysicalCellDU = await client.ModataQuery(netype.ITBBU); + var SecondNRPhysicalCellDU = NRPhysicalCellDU.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + NRPhysicalCellDU nRPhysicalCellDU = SecondNRPhysicalCellDU.MoData.Where(m => m.moId == cellSecond.MoId).FirstOrDefault(); + if (nRPhysicalCellDU.duplexMode == "TDD") + { + var NrNiborRelaTDDLTE = await client.ModataQuery(netype.ITBBU); + var SubNetworkNrNiborRelaTDDLTE = NrNiborRelaTDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + var LDN = ""; + foreach (var item in SubNetworkNrNiborRelaTDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1) + { + + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellLTE = ExternalNrCellLTE.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + var SecondNrCellLTE = SecondExternalNrCellLTE.MoData.FirstOrDefault(m => m.ldn == item.refExternalNrCellLTE && m.gNodeBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + if (SecondNrCellLTE != null) + { + LDN = item.ldn; + break; + } + + } + } + if (LDN == "") + { + return 0; + } + var moConfigArgs = new List + { + + new MoConfigArgNrNiborRelaTDDLTEDel + { + moOp = MoOp.delete, + ldn = LDN, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + } + else if (nRPhysicalCellDU.duplexMode == "FDD") + { + var NrNiborRelaFDDLTE = await client.ModataQuery(netype.ITBBU); + var SubNetworkNrNiborRelaFDDLTE = NrNiborRelaFDDLTE.result.FirstOrDefault(m => m.ne == cellFirst.GetZTENElement()); + var LDN = ""; + foreach (var item in SubNetworkNrNiborRelaFDDLTE.MoData) + { + if (item.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1) + { + + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + var SecondExternalNrCellFDDLTE = ExternalNrCellFDDLTE.result.FirstOrDefault(m => m.ne == cellSecond.GetZTENElement()); + var SecondNrCellFDDLTE = SecondExternalNrCellFDDLTE.MoData.FirstOrDefault(m => m.ldn == item.refExternalNrCellFDDLTE && m.gNodeBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + if (SecondNrCellFDDLTE != null) + { + LDN = item.ldn; + break; + } + } + } + if (LDN == "") + { + return 0; + } + var moConfigArgs = new List + { + new MoConfigArgNrNiborRelaTDDLTEDel + { + moOp = MoOp.delete, + ldn = LDN, + }, + }; + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + return ResultCode; + + } + else + { + return 0; + } + } + else + { + return 0; + } + } + + + } + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"RemoveNRCellRelation:{ex.Message}"); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + + + } + #region 同网元NR异频切换测量配置 + public static async Task SameNElementOtherFreqNRtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.MobileStandard != CellMobileStandard.NR || cellSecond.MobileStandard != CellMobileStandard.NR) + throw new InvalidOperationException("cellFirst.MobileStandard != CellMobileStandard.NR || cellSecond.MobileStandard != CellMobileStandard.NR"); + + if (cellFirst.ZTEManagedElement != cellSecond.ZTEManagedElement) + throw new InvalidOperationException("this is not same ManagedElement"); + + var cellCUs = await client.ModataQuery(netype.ITBBU); + var cellFirstCU = GetCellCU(cellCUs, cellFirst); + var cellSecondCU = GetCellCU(cellCUs, cellSecond); + + var NRCell = await client.ModataQuery(netype.ITBBU, new List { cellFirst.GetZTENElement() }); + + var cellFirstToSecond = GetSameNElementNRRelation(NRCell, cellFirst, cellSecond); + var cellSecondToFirst = GetSameNElementNRRelation(NRCell, cellSecond, cellFirst); + + + if (cellSecondToFirst == null && cellFirstToSecond == null) + { + await client.CreateSameNRCellRelationEachOther(areaId, cellFirst, cellSecond); + } + else if (cellFirstToSecond == null) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellFirst, cellSecond), + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else if (cellSecondToFirst == null) + { + var moConfigArgs = new List + { + CreateSameNRCellRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + } + /// + /// 5G异频切换 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static async Task SameNElementOtherFreqNRtoNRSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.SameNElementOtherFreqNRtoNRCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + public static async Task ModifyExternalNRCellCUAsync(this ZTEClient client, netype netype, CellModel cell, CellModel CellRelation, string nRPCI) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var ExternalNRCellCU = await client.ModataQuery(netype.ITBBU); + var NRCellCUConfig = ExternalNRCellCU?.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.Where(m => m.cellLocalId == CellRelation.LocalId).FirstOrDefault(); + + if (NRCellCUConfig == null) + { + Console.WriteLine($"ExternalNRCellCU In CellRelation failed"); + return; + } + var moConfig = new List + { + new MoConfigArgExternalNRCellCUNR + { + ldn = NRCellCUConfig.ldn, + moOp = MoOp.update, + nRPCI = nRPCI + } + }; + + await client.QuickMoConfigTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine($"ModifyExternalNRCellCU:{ex.Message}"); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + + } + #region Lte to NR邻区配置 + //ExternalEutranCellTDD + public static async Task PreSettingsFDDLteRelationInNR(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var result = await client.ModataQuery(netype.ITBBU); + + var cellFDD = result?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.eNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + List moConfigArgs = null; + if (cellFDD == null) + { + moConfigArgs = new List + { + + new MoConfigArgExternalEutranCellFDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},ExternalEutranCellFDD={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + pLMNId = cellSecond.ZTEpLMNId, + eNBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId, + pLMNIdList=$"{cellFirst.ZTEpLMNId};{cellSecond.ZTEpLMNId}", + }, + + }; + await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + result = await client.ModataQuery(netype.ITBBU); + cellFDD = result?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.eNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + } + if (cellFDD == null) + throw new InvalidOperationException($"ExternalEutranCellFDD for cell {cellSecond.ZTEManagedElement}-{cellSecond.LocalId} in {cellFirst.ZTEManagedElement}-{cellFirst.LocalId}"); + + return cellFDD; + } + + public static async Task PreSettingsTDDLteRelationInNR(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var result = await client.ModataQuery(netype.ITBBU); + var cellTDD = result?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.eNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + List moConfigArgs = null; + if (cellTDD == null) + { + moConfigArgs = new List + { + + new MoConfigArgExternalEutranCellTDD + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},ExternalEutranCellFDD={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + pLMNId = cellSecond.ZTEpLMNId, + eNBId = cellSecond.ZTEgNBId, + cellLocalId = cellSecond.LocalId + }, + + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + result = await client.ModataQuery(netype.ITBBU); + cellTDD = result?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.eNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + } + if (cellTDD == null) + throw new InvalidOperationException($"ExternalEutranCellFDD for cell {cellSecond.ZTEManagedElement}-{cellSecond.LocalId} in {cellFirst.ZTEManagedElement}-{cellFirst.LocalId}"); + + return cellTDD; + } + public static async Task PreSettingsNRRelationInFDDLte(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var NRCellDUs = await client.ModataQuery(netype.ITBBU); + var firstCellDU = NRCellDUs?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.cellLocalId == cellFirst.LocalId); + //"NRRadioInfrastructure=1,NRPhysicalCellDU=3" + + var carrierId = firstCellDU.NRCarrierId; + + if (string.IsNullOrWhiteSpace(carrierId)) + { + //this code may be throw exception + var vals = firstCellDU?.refNRPhysicalCellDU.Split(',')?.Select(v => v.Split('='))?.FirstOrDefault(v => v[0] == "NRPhysicalCellDU"); + if (vals == null) + throw new InvalidOperationException("get refNRPhysicalCellDU failed"); + var PhysicalCellDUId = vals[1]; + + var PhysicalCellDUs = await client.ModataQuery(netype.ITBBU); + var physicalCellDU = PhysicalCellDUs.result?.FirstOrDefault(d => d.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(v => v.nrPhysicalCellDUId == PhysicalCellDUId); + //"NRRadioInfrastructure=1,NRCarrier=3" + var carrierVals = physicalCellDU?.refNRCarrier.Split(',')?.Select(v => v.Split('=')).FirstOrDefault(v => v[0] == "NRCarrier"); + if (carrierVals == null) + throw new InvalidOperationException("get refNRCarrier failed"); + carrierId = carrierVals[1]; + } + + var NRCarriers = await client.ModataQuery(netype.ITBBU); + var NRCarrierULs = await client.ModataQuery(netype.ITBBU); + var NrCellLTEs = await client.ModataQuery(netype.ITBBU); + + var nrCellLte = NrCellLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.gNodeBId == cellFirst.ZTEgNBId && d.cellLocalId == cellFirst.LocalId && d.pci == cellFirst.LocalId); + var nbrCells = await client.ModataQuery(netype.ITBBU); + var currentNbrCell = nbrCells.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + + var ENBCUCPFunctions = await client.ModataQuery(netype.ITBBU); + var currentENBCUCPFunction = ENBCUCPFunctions.result.FirstOrDefault(c => c.ne == cellFirst.GetZTENElement()).MoData.FirstOrDefault(); + var currentNRCarrier = NRCarriers?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(c => c.NRCarrierId == carrierId); + var currentNRCarrierUL = NRCarrierULs?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCarrier={currentNRCarrier.moId},") != -1); + List moConfigArgs = null; + if (nrCellLte == null) + { + moConfigArgs = new List + { + new MoConfigArgExternalNrCellLTE + { + moOp = MoOp.create, + ldn = currentNbrCell.ldn + $",ExternalNrCellLTE={cellFirst.LocalId}", + moId = $"{cellFirst.LocalId}", + cellLocalId = cellFirst.LocalId, + mcc = currentENBCUCPFunction.mcc, + mnc = currentENBCUCPFunction.mnc, + pci = cellFirst.LocalId, + mcclist = currentENBCUCPFunction.mcc, + gNodeBId = cellFirst.ZTEgNBId, + mnclist = currentENBCUCPFunction.mnc, + centerFreq = cellFirst.ssbFrequency, + freqBandInd = currentNRCarrierUL.frequencyBandList, + nrPointA = currentNRCarrierUL.pointAfrequencyUL + }, + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + + NrCellLTEs = await client.ModataQuery(netype.ITBBU); + nrCellLte = NrCellLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.gNodeBId == cellFirst.ZTEgNBId && d.cellLocalId == cellFirst.LocalId && d.pci == cellFirst.LocalId); + } + + if (nrCellLte == null) + throw new InvalidOperationException($"ExternalNrCellLTE for cell {cellFirst.ZTEManagedElement}-{cellFirst.LocalId} in {cellSecond.ZTEManagedElement}-{cellSecond.LocalId}"); + + return nrCellLte; + } + /// + /// 删除NR to Lte邻区 + /// + /// + /// + /// 5G站 + /// 4G站 + /// + public static async Task NRtoLteRelationDelete(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + /* + var lteMapping = await client.PreSettingsFDDLteRelationInNR(areaId, cellFirst, cellSecond); + + var eutranCellRelations = await client.ModataQuery(netype.ITBBU); + var firstToSecond = eutranCellRelations.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && d.refExternalEutranCellFDD == lteMapping.ldn); + List moConfigArgs = null; + if (firstToSecond != null) + { + moConfigArgs = new List + { + + new MoConfigArgEutranCellRelation + { + moOp = MoOp.delete, + ldn = firstToSecond.ldn, + }, + + }; + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + + //set nr cell Relation in 4g lte cell + var NrMapping = await client.PreSettingsNRRelationInFDDLte(areaId, cellFirst, cellSecond); + + var NrCellLTEs = await client.ModataQuery(netype.ITBBU); + + var nrCellLte = NrCellLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.gNodeBId == cellFirst.ZTEgNBId && d.cellLocalId == cellFirst.LocalId && d.pci == cellFirst.LocalId); + var NrNiborRelaFDDLTEs = await client.ModataQuery(netype.ITBBU); + + var fDDLTE = NrNiborRelaFDDLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => + { + var strs = d.ldn.Split(','); + + if (strs.Length < 3) + return false; + + return d.ldn.IndexOf($"CUEUtranCellFDDLTE={cellSecond.LocalId},") != -1 && d.refExternalNrCellLTE == nrCellLte.ldn; + }); + + if (fDDLTE != null) + { + moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgNrNiborRelaFDDLTE + { + ldn = fDDLTE.ldn, + moOp = MoOp.delete, + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + }*/ + } + /// + /// 建立NR to Lte邻区 + /// + /// + /// + /// 5G站 + /// 4G站 + /// + public static async Task NRtoLteRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + + var lteMapping = await client.PreSettingsFDDLteRelationInNR(areaId, cellFirst, cellSecond); + var eutranCellRelations = await client.ModataQuery(netype.ITBBU); + + var firstToSecond = eutranCellRelations.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1 && d.refExternalEutranCellFDD == lteMapping.ldn); + if (firstToSecond == null) + { + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgEutranCellRelation + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEManagedElement},NRCellCU={cellFirst.LocalId},EutranCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEutranCellFDD = lteMapping.ldn + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + + //set nr cell Relation in 4g lte cell + var NrMapping = await client.PreSettingsNRRelationInFDDLte(areaId, cellFirst, cellSecond); + + var NrCellLTEs = await client.ModataQuery(netype.ITBBU); + + var nrCellLte = NrCellLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.gNodeBId == cellFirst.ZTEgNBId && d.cellLocalId == cellFirst.LocalId && d.pci == cellFirst.LocalId); + //var nrCellLte = NrCellLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())?.MoData?.FirstOrDefault(d => d.gNodeBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId && d.pci == cellSecond.LocalId); + var NrNiborRelaFDDLTEs = await client.ModataQuery(netype.ITBBU); + + var fDDLTE = NrNiborRelaFDDLTEs.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + .MoData?.FirstOrDefault(d => + { + var strs = d.ldn.Split(','); + + if (strs.Length < 3) + return false; + + return d.ldn.IndexOf($"CUEUtranCellFDDLTE={cellSecond.LocalId},") != -1 && d.refExternalNrCellLTE == nrCellLte.ldn; + }); + + if (fDDLTE == null) + { + var moConfigArgs = new List(); + + moConfigArgs.Add(new MoConfigArgNrNiborRelaFDDLTE + { + moOp = MoOp.create, + refExternalNrCellLTE = NrMapping.ldn, + moId = $"{cellFirst.LocalId}", + ldn = $"ENBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellSecond.LocalId},NeighbouringRelationFDD=1,NrNiborRelaFDDLTE={cellFirst.LocalId}", + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + } + } + /// + /// 删除,重建NR to Lte邻区 + /// + /// + /// + /// 5G站 + /// 4G站 + /// + public static async Task NRtoLteReNewRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + //await client.NRtoLteRelationDelete(areaId, cellFirst, cellSecond); + if (cellFirst.MobileStandard == CellMobileStandard.NR && cellSecond.MobileStandard != CellMobileStandard.NR) + { + await client.NRtoLteRelation(areaId, cellFirst, cellSecond); + } + else + { + await client.NRtoLteRelation(areaId, cellSecond, cellFirst); + } + } + #endregion + + + #region 同网元NR LTE异系统切换 + //CreateRelation + public static async Task SameNElementNRtoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.NRtoLteReNewRelation(areaId, cellFirst, cellSecond); + + } + /// + /// 同站 5G到4G切换 + /// + /// + /// + /// 5G站 + /// 4G站 + /// + /// + /// + /// + public static async Task SameNElementNRtoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.SameNElementNRtoLteCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + #region 同站 NR 同频 + + public static async Task SameNElementSameFreqCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.ZTEManagedElement != cellSecond.ZTEManagedElement) + throw new InvalidOperationException("this is not same ManagedElement"); + + if (cellFirst.ssbFrequency != cellSecond.ssbFrequency) + throw new InvalidOperationException("this is not same ssbFrequency"); + + await client.CreateSameNRCellRelationEachOther(areaId, cellFirst, cellSecond); + await client.CreateSameNRCellRelationEachOther(areaId, cellSecond, cellFirst); + + } + public static async Task SameNElementSameFreq(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.SameNElementSameFreqCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + #region 同网元 LTE TO LTE同频切换 + public static MoQueryResultEUtranRelationFDDLTE FindSameNElementLtetoLteRelation(this ZTEClient client, MoQueryResultBase moQuery, CellModel cellFirst, CellModel cellSecond) + { + return moQuery?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => + { + var strs = d.refCUEUtranCellFDDLTE.Split(','); + + if (strs.Length < 3) + return false; + + return d.ldn.IndexOf($",CUEUtranCellFDDLTE={cellFirst.LocalId},") != -1 && strs[2] == $"CUEUtranCellFDDLTE={cellSecond.LocalId}"; + }); + } + public static EUtranRelationTDDLTE FindSameNElementLtetoLte_TDDRelation(this ZTEClient client, MoQueryResultBase moQuery, CellModel cellFirst, CellModel cellSecond) + { + return moQuery?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => d.refCUEUtranCellTDDLTE == $"ENBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellSecond.LocalId}" && d.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1); + } + public static EUtranRelationTDDLTE FindSameNElementLtetoLte_TDDRelation2(this ZTEClient client, MoQueryResultBase moQuery, CellModel cellFirst, CellModel cellSecond, string ExternalEUtranCellTDDLTE_LDN) + { + return moQuery?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => d.refExternalEUtranCellTDDLTE == ExternalEUtranCellTDDLTE_LDN && d.ldn.IndexOf($"CUEUtranCellTDDLTE={cellFirst.LocalId}") != -1); + } + public static MoConfigArgEUtranRelationFDDLTE GetSameNElementLtetoLteRelationArg(this ZTEClient client, CellModel cellFirst, CellModel cellSecond) + { + return new MoConfigArgEUtranRelationFDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellFirst.LocalId},NeighbouringRelationFDD=1,EUtranRelationFDDLTE={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refCUEUtranCellFDDLTE = $"ENBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellSecond.LocalId}" + }; + } + public static MoConfigArgEUtranRelationTDDLTE GetSameNElementLtetoLte_TDDRelationArg(this ZTEClient client, CellModel cellFirst, CellModel cellSecond) + { + return new MoConfigArgEUtranRelationTDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellFirst.LocalId},NeighbouringRelationTDD=1,EUtranRelationTDDLTE={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refCUEUtranCellTDDLTE = $"ENBCUCPFunction={cellSecond.ZTEpLMNId}_{cellSecond.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellSecond.LocalId}" + }; + } + public static MoConfigArgEUtranRelationTDDLTE_refExternalEUtranCellTDDLTE GetSameNElementLtetoLte_refExternalEUtranCellTDDLTEArg(this ZTEClient client, CellModel cellFirst, CellModel cellSecond, string MappingLDN) + { + return new MoConfigArgEUtranRelationTDDLTE_refExternalEUtranCellTDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellTDDLTE={cellFirst.LocalId},NeighbouringRelationTDD=1,EUtranRelationTDDLTE={cellFirst.ZTEpLMNId}-{cellFirst.ZTEgNBId}-{cellFirst.LocalId}", + moId = $"{cellFirst.ZTEpLMNId}-{cellFirst.ZTEgNBId}-{cellFirst.LocalId}", + refExternalEUtranCellTDDLTE = MappingLDN + }; + } + + + public static async Task SameNElementLtetoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.GetZTENElement() != cellSecond.GetZTENElement()) + throw new InvalidOperationException("cellFirst.GetZTENElement() != cellSecond.GetZTENElement()"); + + var result = await client.ModataQuery(netype.ITBBU); + var firstToSecond = client.FindSameNElementLtetoLteRelation(result, cellFirst, cellSecond); + var secondToFirst = client.FindSameNElementLtetoLteRelation(result, cellSecond, cellFirst); + + + if (firstToSecond == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLteRelationArg(cellFirst, cellSecond), + }; + + await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + if (secondToFirst == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLteRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + } + /// + /// 4GTDD异站 + /// + /// + /// + /// + /// + /// + public static async Task OtherNElementLtetoLteRelation_TDD(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await PreSettingsLteRelationInOtherNElementLte_TDD(client, areaId, cellFirst, cellSecond); + //await PreSettingsLteRelationInOtherNElementLte_TDD(client, areaId, cellSecond, cellFirst); + var result = await client.ModataQuery(netype.ITBBU); + + var lteMappings = await client.ModataQuery(netype.ITBBU); + var cellFirstMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()) + .MoData?.FirstOrDefault(m => m.eNBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + + var firstToSecond = client.FindSameNElementLtetoLte_TDDRelation2(result, cellFirst, cellSecond, cellFirstMapping.ldn); + + + //var cellSecondMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement()) + // .MoData?.FirstOrDefault(m => m.eNBId == cellFirst.ZTEgNBId && m.cellLocalId == cellFirst.LocalId); + //var secondToFirst = client.FindSameNElementLtetoLte_TDDRelation2(result, cellSecond, cellFirst, cellSecondMapping.ldn); + + if (firstToSecond == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLte_refExternalEUtranCellTDDLTEArg(cellFirst, cellSecond, cellFirstMapping.ldn), + }; + + await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + //if (secondToFirst == null) + //{ + // var moConfigArgs = new List + // { + // client.GetSameNElementLtetoLte_refExternalEUtranCellTDDLTEArg(cellSecond, cellFirst) + // }; + + // await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + //} + } + + /// + /// 4GTDD同站 + /// + /// + /// + /// + /// + /// + public static async Task SameNElementLtetoLte_TDDCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var result = await client.ModataQuery(netype.ITBBU); + var firstToSecond = client.FindSameNElementLtetoLte_TDDRelation(result, cellFirst, cellSecond); + var secondToFirst = client.FindSameNElementLtetoLte_TDDRelation(result, cellSecond, cellFirst); + + if (firstToSecond == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLte_TDDRelationArg(cellFirst, cellSecond), + }; + + await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + if (secondToFirst == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLte_TDDRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTaskRelatedResult(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + } + } + /// + /// 同站 4G 到 4G同频切换 + /// + /// + /// + /// 4G站 + /// 4G站 + /// + /// + public static async Task SameNElementLtetoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.SameNElementLtetoLteCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + #region 同网元 LTE TO LTE异频切换 + + public static async Task SameNElementOtherLtetoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.GetZTENElement() != cellSecond.GetZTENElement()) + throw new InvalidOperationException("cellFirst.GetZTENElement() != cellSecond.GetZTENElement()"); + + var result = await client.ModataQuery(netype.ITBBU); + //result?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => + //{ + // var strs = d.refCUEUtranCellFDDLTE.Split(','); + + // if (strs.Length < 3) + // return false; + + // return d.ldn.IndexOf($",CUEUtranCellFDDLTE={cellFirst.LocalId},") != -1 && strs[2] == $"CUEUtranCellFDDLTE={cellSecond.LocalId}"; + //}); + var firstToSecond = client.FindSameNElementLtetoLteRelation(result, cellFirst, cellSecond); + var secondToFirst = client.FindSameNElementLtetoLteRelation(result, cellSecond, cellFirst); + + + if (firstToSecond == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLteRelationArg(cellFirst, cellSecond), + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + if (secondToFirst == null) + { + var moConfigArgs = new List + { + client.GetSameNElementLtetoLteRelationArg(cellSecond, cellFirst) + }; + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + } + /// + /// 同站4G 到 4G 异频切换 + /// + /// + /// + /// 4G站 + /// 4G站 + /// + /// + /// + /// + public static async Task SameNElementOtherLtetoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await SameNElementOtherLtetoLteCreateRelation(client, areaId, cellFirst, cellSecond); + } + #endregion + + #region 跨站NR同频切换 + /// + /// 跨站添加5G邻区 + /// + /// + /// + /// + /// + /// + public static async Task SetOtherNElementNRtoNRRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var mappings = await client.ModataQuery(netype.ITBBU); + var targetMapping = mappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.gNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + + + if (targetMapping == null) + { + var targetFreq = await client.AutoGetOrAddFreq(areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgExternalNRCellCU + { + pLMNId = cellSecond.ZTEpLMNId, + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + gNBId = cellSecond.ZTEgNBId, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + cellLocalId = cellSecond.LocalId, + refNRFreq = targetFreq.ldn + }); + moConfigArgs.Add(new MoConfigArgSsbMeasInfo + { + moOp = MoOp.create, + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId},SsbMeasInfo=1", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + frequency = cellSecond.ssbFrequency + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + + mappings = await client.ModataQuery(netype.ITBBU); + targetMapping = mappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())?.MoData?.FirstOrDefault(d => d.pLMNId == cellSecond.ZTEpLMNId && d.gNBId == cellSecond.ZTEgNBId && d.cellLocalId == cellSecond.LocalId); + + if (targetMapping == null) + throw new InvalidOperationException($"Create ExternalNRCellCU failed for cell {cellSecond.ZTEManagedElement}-{cellSecond.LocalId} in {cellFirst.ZTEManagedElement}-{cellFirst.LocalId} "); + } + + + var relations = await client.ModataQuery(netype.ITBBU); + + var firstToSecond = relations?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()).MoData?.FirstOrDefault(d => d.ldn.IndexOf($",NRCellCU={cellFirst.LocalId},") != -1 && d.refExternalNRCellCU == targetMapping.ldn); + + if (firstToSecond == null) + { + var moConfigArgs = new List(); + + moConfigArgs.Add(new MoConfigArgNRExternalCellRelation + { + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + ldn = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},NRCellCU={cellFirst.LocalId},NRCellRelation={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalNRCellCU = $"GNBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}" + }); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + }; + } + //CreateRelation + public static async Task OtherNElementNNRtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.ZTEManagedElement == cellSecond.ZTEManagedElement) + throw new InvalidOperationException("this is not other ManagedElement"); + + if (cellFirst.ssbFrequency != cellSecond.ssbFrequency) + throw new InvalidOperationException("cellFirst.ssbFrequency != cellSecond.ssbFrequency"); + + await SetOtherNElementNRtoNRRelation(client, areaId, cellFirst, cellSecond); + await SetOtherNElementNRtoNRRelation(client, areaId, cellSecond, cellFirst); + } + /// + /// 跨站5G 到 5G 同频切换 + /// + /// + /// + /// + /// + /// + /// + public static async Task OtherNElementNNRtoNRSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementNNRtoNRCreateRelation(areaId, cellFirst, cellSecond); + + //var NRInterFCovHos = await client.ModataQuery(netype.ITBBU, new List { }); + + //var cellFirstA3 = NRInterFCovHos?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement())? + //.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cellFirst.LocalId}") != -1); + //var cellSecondA3 = NRInterFCovHos?.result?.FirstOrDefault(n => n.ne == cellSecond.GetZTENElement())? + //.MoData?.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cellSecond.LocalId}") != -1); + //if (cellFirstA3 != null && cellSecondA3 != null) + //{ + + // if (cellFirstA3.eventOffset != A3Value) + // { + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgA3eventOffset { moOp = MoOp.update, ldn = cellFirstA3.ldn, eventOffset = A3Value }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + // } + + // if (cellSecondA3.eventOffset != A3Value) + // { + // var moConfigArgs = new List(); + // moConfigArgs.Add(new MoConfigArgA3eventOffset { moOp = MoOp.update, ldn = cellSecondA3.ldn, eventOffset = A3Value }); + // await client.QuickMoConfigTask(areaId, netype.ITBBU, cellSecond.ZTESubNetwork, cellSecond.ZTEManagedElement, moConfigArgs); + // }; + + //} + } + + #endregion + + #region 跨站NR异频切换 + //CreateRelation + public static async Task OtherNElementOtherFreqNRtoNRCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + + await SetOtherNElementNRtoNRRelation(client, areaId, cellFirst, cellSecond); + await SetOtherNElementNRtoNRRelation(client, areaId, cellSecond, cellFirst); + } + /// + /// 跨站5G 到 5G 异频切换 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static async Task OtherNElementOtherFreqNRtoNRSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementOtherFreqNRtoNRCreateRelation(areaId, cellFirst, cellSecond); + } + + #endregion + + + #region 跨站NR LTE异系统切换 + public static async Task OtherNElementNRtoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + if (cellFirst.ZTEManagedElement == cellSecond.ZTEManagedElement) + throw new InvalidOperationException("this is not same ManagedElement"); + + if (cellFirst.MobileStandard == cellSecond.MobileStandard) + throw new InvalidOperationException("this is same MobileStandard"); + + await client.NRtoLteReNewRelation(areaId, cellFirst, cellSecond); + } + /// + /// 跨站5G到 LTE异系统切换 + /// + /// + /// + /// 5G站 + /// 4G站 + /// + /// + /// + /// + public static async Task OtherNElementNRtoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementNRtoLteCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + #region 跨站 LTE同频切换 + public static async Task PreSettingsLteRelationInOtherNElementLte(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var lteMappings = await client.ModataQuery(netype.ITBBU); + var currentLteMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()) + .MoData?.FirstOrDefault(m => m.eNBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + + if (currentLteMapping == null) + { + var ENBCUCPFunctions = await client.ModataQuery(netype.ITBBU); + var currentENBCUCPFunction = ENBCUCPFunctions.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgExternalEUtranCellFDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,NbrCell=1,ExternalEUtranCellFDDLTE={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + eNBId = cellSecond.ZTEgNBId, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + cellLocalId = cellSecond.LocalId, + mcc = currentENBCUCPFunction.mcc, + mnc = currentENBCUCPFunction.mnc, + mcclist = currentENBCUCPFunction.mcc, + mnclist = currentENBCUCPFunction.mnc, + }); + + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + lteMappings = await client.ModataQuery(netype.ITBBU); + currentLteMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()) + .MoData?.FirstOrDefault(m => m.eNBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + + if (currentLteMapping == null) + throw new InvalidOperationException($"add ExternalEUtranCellFDDLTE failed for cell {cellSecond.ZTEManagedElement}-{cellSecond.LocalId} in cell {cellFirst.ZTEManagedElement}-{cellFirst.LocalId}"); + return currentLteMapping; + } + public static async Task PreSettingsLteRelationInOtherNElementLte_TDD(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var lteMappings = await client.ModataQuery(netype.ITBBU); + var currentLteMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()) + .MoData?.FirstOrDefault(m => m.eNBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + + if (currentLteMapping == null) + { + var ENBCUCPFunctions = await client.ModataQuery(netype.ITBBU); + var currentENBCUCPFunction = ENBCUCPFunctions.result.FirstOrDefault(c => c.ne == cellSecond.GetZTENElement()).MoData.FirstOrDefault(); + + var moConfigArgs = new List(); + moConfigArgs.Add(new MoConfigArgExternalEUtranCellTDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,NbrCell=1,ExternalEUtranCellTDDLTE={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + eNBId = cellSecond.ZTEgNBId, + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + cellLocalId = cellSecond.LocalId, + mcc = currentENBCUCPFunction.mcc, + mnc = currentENBCUCPFunction.mnc, + mcclist = currentENBCUCPFunction.mcc, + mnclist = currentENBCUCPFunction.mnc, + }); + + await client.QuickMoConfigTaskResult(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + lteMappings = await client.ModataQuery(netype.ITBBU); + currentLteMapping = lteMappings?.result?.FirstOrDefault(n => n.ne == cellFirst.GetZTENElement()) + .MoData?.FirstOrDefault(m => m.eNBId == cellSecond.ZTEgNBId && m.cellLocalId == cellSecond.LocalId); + + if (currentLteMapping == null) + throw new InvalidOperationException($"add ExternalEUtranCellTDDLTE failed for cell {cellSecond.ZTEManagedElement}-{cellSecond.LocalId} in cell {cellFirst.ZTEManagedElement}-{cellFirst.LocalId}"); + return currentLteMapping; + } + + /// + /// + /// + /// + /// + /// + /// + /// + public static MoConfigArgEUtranRelationFDDLTE GetOtherNElementLtetoLteRelationArg(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond, MoQueryResultExternalEUtranCellFDDLTE mapping) + { + return new MoConfigArgEUtranRelationFDDLTE + { + moOp = MoOp.create, + ldn = $"ENBCUCPFunction={cellFirst.ZTEpLMNId}_{cellFirst.ZTEgNBId},CULTE=1,CUEUtranCellFDDLTE={cellFirst.LocalId},NeighbouringRelationFDD=1,EUtranRelationFDDLTE={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + moId = $"{cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}", + refExternalEUtranCellFDDLTE = mapping.ldn + }; + } + public static async Task OtherNElementLtetoLteRelationDelete(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var lteMapping = await PreSettingsLteRelationInOtherNElementLte(client, areaId, cellFirst, cellSecond); + var result = await client.ModataQuery(netype.ITBBU); + var cellFirstToSecond = result?.result?.First(n => n.ne == cellFirst.GetZTENElement())? + .MoData?.FirstOrDefault(d => d.ldn.IndexOf($"CUEUtranCellFDDLTE={cellFirst.LocalId},") != -1 && d.refExternalEUtranCellFDDLTE == lteMapping.ldn); + + + if (cellFirstToSecond != null) + { + return false; + //var moConfigArgs = new List { + //new MoConfigArgEUtranRelationFDDLTE + //{ + // moOp = MoOp.delete, + // ldn = cellFirstToSecond.ldn + //}}; + //await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + else + { + return true; + } + } + public static async Task OtherNElementLtetoLteRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + var lteMapping = await PreSettingsLteRelationInOtherNElementLte(client, areaId, cellFirst, cellSecond); + var moConfigArgs = new List(); + var relationArg = GetOtherNElementLtetoLteRelationArg(client, areaId, cellFirst, cellSecond, lteMapping); + moConfigArgs.Add(relationArg); + await client.QuickMoConfigTask(areaId, netype.ITBBU, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfigArgs); + } + + public static async Task OtherNElementLtetoLteReNewRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await OtherNElementLtetoLteRelation(client, areaId, cellFirst, cellSecond); + } + public static async Task OtherNElemenLtetoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementLtetoLteReNewRelation(areaId, cellFirst, cellSecond); + await client.OtherNElementLtetoLteReNewRelation(areaId, cellSecond, cellFirst); + } + public static async Task OtherNElemenLtetoLteCreateRelation_TDD(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await OtherNElementLtetoLteRelation_TDD(client, areaId, cellFirst, cellSecond); + await OtherNElementLtetoLteRelation_TDD(client, areaId, cellSecond, cellFirst); + } + public static async Task OtherNElemenLtetoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElemenLtetoLteCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + #region 跨站 LTE异频切换 + public static async Task OtherNElementOtherLtetoLteCreateRelation(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementLtetoLteReNewRelation(areaId, cellFirst, cellSecond); + await client.OtherNElementLtetoLteReNewRelation(areaId, cellSecond, cellFirst); + } + public static async Task OtherNElementOtherLtetoLteSwitch(this ZTEClient client, string areaId, CellModel cellFirst, CellModel cellSecond) + { + await client.OtherNElementOtherLtetoLteCreateRelation(areaId, cellFirst, cellSecond); + } + #endregion + + public static async Task> QuickAllNEsFirst(this ZTEClient client, netype netype) + { + var origins = await client.QueryNEsUseMoQuery(netype); + + if (origins == null || origins.result == null || origins.result.Count == 0) + return null; + + var neObjects = new List(); + + bool isFind = false; + foreach (var es in origins.result) + { + var neResult = es.ne.Split(new[] { ',' })?.Select(str => str.Split(new[] { '=' })).ToList(); + + if (neResult == null || neResult.Count < 2) + continue; + + var ne = new NEObject(); + if (neResult[0].Count() >= 2 && neResult[0][0] == "SubNetwork") + { + ne.Netype = es.ManagedElementType; + ne.SubnetId = neResult[0][1]; + if (neResult[1].Count() >= 2 && neResult[1][0] == "ManagedElement") + { + isFind = true; + ne.NetId = neResult[1][1]; + neObjects.Add(ne); + } + } + } + + //foreach(var es in neObjects) + //{ + // es.cells = (await client.QueryCellsUseMoGet(es.Netype, es.SubnetId, es.NetId)).result; + //} + + return isFind ? neObjects : null; + } + public static async Task> QuickAllNEsSecond(this ZTEClient client, netype netype) + { + var tree = await client.Tree(netype); + var subnetworks = await client.Subnetworks(); + + if (tree == null || tree.Count == 0) + return null; + + var neObjects = new List(); + + bool isFind = false; + foreach (var ne in tree[0].Children) + { + var subnetwork = subnetworks.FirstOrDefault(s => s.Id == ne.Id); + + if (subnetwork == null) + continue; + + netype neType = netype.ITBBU; + if (!Enum.TryParse(ne.Children[0].Moc, out netype)) + { + continue; + } + var neObject = new NEObject + { + Netype = neType, + NetId = ne.NbiId, + SubnetId = subnetwork.NbiId + }; + + isFind = true; + neObjects.Add(neObject); + } + + return isFind ? neObjects : null; + } + public static async Task> QuickAllNEsAndCell(this ZTEClient client, netype netype) + { + var origins = await client.QueryCellsUseMoQuery(netype); + + + if (origins == null || origins.Result == null || origins.Result.Count == 0) + return null; + + var neObjects = new List(); + + bool isFind = false; + foreach (var es in origins.Result) + { + var neResult = es.Ne.Split(new[] { ',' })?.Select(str => str.Split(new[] { '=' })).ToList(); + + if (neResult == null || neResult.Count < 2) + continue; + + var ne = new NEObject(); + if (neResult[0].Count() >= 2 && neResult[0][0] == "SubNetwork") + { + ne.Netype = es.ManagedElementType; + ne.SubnetId = neResult[0][1]; + if (neResult[1].Count() >= 2 && neResult[1][0] == "ManagedElement") + { + ne.NetId = neResult[1][1]; + neObjects.Add(ne); + } + + var cells = new List(); + foreach (var item in es.MoData) + { + isFind = true; + var cellObject = new CellObject(); + cellObject.LocalId = item.CellLocalId; + cellObject.Activated = item.CellState == "ACTIVE" ? true : false; + + cellObject.Parent = ne; + isFind = true; + cells.Add(cellObject); + } + if (cells.Count != 0) + ne.cells = cells; + } + } + return isFind ? neObjects : null; + } + //QuickLockCellMoConfigArg + + private static async Task QuickSetCellAdminStatus(this ZTEClient client, netype netype, string subnetId, string netId, string localId, string cmd) + { + var origins = await client.QueryCellsUseMoGet(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + { + return -1; + } + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + { + return -1; + } + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + ldnStr = item[0]; + if (item[1] == cmd) + return -1; + } + + } + + if (ldnStr == null) + { + return -1; + } + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List(); + var Config = new MoConfigArgNRCellDU_LockCell + { + ldn = ldnStr, + moOp = MoOp.update, + adminState = cmd, + }; + moConfig.Add(Config); + if (moConfig.Count == 0) + { + return 0; + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, subnetId, netId, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + + public static async Task QuickLockCell(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.QuickSetCellAdminStatus(netype, subnetId, netId, localId, "Locked"); + } + public static async Task QuickUnLockCell(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.QuickSetCellAdminStatus(netype, subnetId, netId, localId, "Unlocked"); + } + + + public static async Task QuickQueryCellsStatus(this ZTEClient client, QueryCellsStatus arg) + { + int i = 3; + MoGetQueryCellsResult origins = null; + while (i-- > 0) + { + origins = await client.QueryCellsUseMoGet(arg.netype, arg.subnetId, arg.netId); + if (origins.code == 0) + break; + await Task.Delay(800); + } + + if (origins == null || origins.result == null || origins.result.Count == 0) + throw new InvalidOperationException("origins == null || origins.result == null || origins.result.Count == 0"); + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + throw new InvalidOperationException("origins.result[0].Values == null || origins.result[0].Values.Count == 0"); + + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + string localId = cellInfo[1][1]; + var cell = arg.Cells.FirstOrDefault(c => c.LocalId == localId); + if (cell == null) + continue; + cell.ldnStr = item[0]; + if (item[1] == "Locked") + cell.Status = CellStatus.Locked; + else if (item[1] == "Unlocked") + cell.Status = CellStatus.Unlocked; + } + return arg; + } + public static async Task QuickSetCellsAdminStatus(this ZTEClient client, string areaId, IList arg, string cmd) + { + if (arg == null || arg.Count == 0) + throw new InvalidOperationException("arg == null || arg.Count == 0"); + + var cellGroups = (from c in arg + group c by new + { + c.netype, + c.subnetId, + c.netId, + } + into gcs + select new QueryCellsStatus + { + netype = gcs.Key.netype, + netId = gcs.Key.netId, + subnetId = gcs.Key.subnetId, + Cells = gcs.Select(c => new QueryCellStatus { LocalId = c.localId, Status = CellStatus.NoQuery }).ToList() + }).ToList(); + + var tasks = new List>(); + foreach (var bs in cellGroups)//查询基站 + { + var task = client.QuickQueryCellsStatus(bs); + tasks.Add(task); + } + await Task.WhenAll(tasks.ToArray()); + + var resultCellGroups = new List(); + for (int count = 0; count < tasks.Count; count++) + { + if (!tasks[count].IsFaulted) + resultCellGroups.Add(tasks[count].Result); + else + { + var cell = cellGroups[count]; + Console.WriteLine($"nettype: {cell.netype}, netId: {cell.netId}, subnetId:{cell.subnetId} get result failed"); + } + } + cellGroups = resultCellGroups; + + var setArg = new List>(); + + foreach (var bs in cellGroups)//设置基站 + { + var selectCells = bs.Cells.Where(c => c.Status.ToString() != cmd); + + if (selectCells == null || selectCells.Count() == 0) + continue; + + var configs = selectCells.Select(c => + { + return new MoConfigArgBase + { + ManagedElementType = bs.netype, + ne = $"SubNetwork={bs.subnetId},ManagedElement={bs.netId}", + moData = new List + { + new MoConfigArgLockCell + { + adminState = cmd, + ldn = c.ldnStr, + moOp = MoOp.update, + mocName = "NRCellDU", + }} + }; + }); + + setArg.AddRange(configs); + } + + + await client.MoConfig(areaId, JsonConvert.SerializeObject(setArg)); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List() + }; + activateArg.neList = validation.neList = cellGroups.Select(bs => + { + return new neListObject + { + ManagedElementType = bs.netype, + ne = $"SubNetwork={bs.subnetId},ManagedElement={bs.netId}" + + }; + })?.ToList(); + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + + } + public static async Task QuickLockCells(this ZTEClient client, string areaId, IList arg) + { + await client.QuickSetCellsAdminStatus(areaId, arg, "Locked"); + } + public static async Task QuickUnLockCells(this ZTEClient client, string areaId, IList arg) + { + await client.QuickSetCellsAdminStatus(areaId, arg, "Unlocked"); + } + public static async Task QuickGetCellsForNEsFunc(this ZTEClient client, IList neObjects) + { + if (neObjects == null || neObjects.Count == 0) + throw new ArgumentNullException("neObjects == null || neObjects.Count == 0"); + foreach (var es in neObjects) + { + var origins = await client.QueryCellsUseMoGet(es.Netype, es.SubnetId, es.NetId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + continue; + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + continue; + + var cells = new List(); + bool isFind = false; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + var cellObject = new CellObject(); + cellObject.LocalId = cellInfo[1][1]; + cellObject.Activated = item[1] == "Unlocked" ? true : false; + cellObject.Parent = es; + isFind = true; + cells.Add(cellObject); + } + + if (isFind) + { + es.cells = cells; + } + } + } + #region NR门限 + + + public static async Task SwitchNRThreshold(this ZTEClient client, netype netype, CellModel cell, A3_A4_A5EventId eventId = A3_A4_A5EventId.A3) + { + var result = await client.ModataQuery(netype); + var cellConfig = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.MoId},") != -1); + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List + { + new MoConfigArgSwitchA3_A4_A5 + { + eventId = eventId, + ldn = cellConfig.ldn, + moOp = MoOp.update, + //mocName = "NRIntraFCovHo", + } + }; + + await client.QuickMoConfigTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + + public static async Task SwitchNRB1_B2Threshold(this ZTEClient client, netype netype, CellModel cell, B1_B2EventId eventId = B1_B2EventId.B2) + { + var result = await client.ModataQuery(netype); + var cellConfig = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + + if (cellConfig.eventId == eventId) + { + return; + } + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List + { + new MoConfigArgSwitchNRB1_B2 + { + eventId = eventId, + ldn = cellConfig.ldn, + moOp = MoOp.update, + //mocName = "NRIntraFCovHo", + } + }; + + await client.QuickMoConfigTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + + #endregion + + /* + public static async Task LdnGetValues(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + ThreshoValues threshoValues = new ThreshoValues(); + string A1Value = null; + + string A2Value = null; + string B1Value = null; + string B2Value = null; + + + if (subnetId == "9393" || netId == "9393") + { + var origins_9393_A1 = await client.QueryCellsUse_9393(netype, subnetId, netId); + if (origins_9393_A1 == null || origins_9393_A1.result == null || origins_9393_A1.result.Count == 0) + throw new InvalidOperationException("origins_9393_A1 == null || origins_9393_A1.result == null || origins_9393_A1.result.Count == 0"); + + if (origins_9393_A1.result[0].Values == null || origins_9393_A1.result[0].Values.Count == 0) + throw new InvalidOperationException("origins_9393_A1.result[0].Values == null || origins_9393_A1.result[0].Values.Count == 0"); + + foreach (var item in origins_9393_A1.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + A1Value = item[1]; + A2Value = item[2]; + break; + } + } + + var originsB1 = await client.QueryCellsUseB1_B2_9393(netype, subnetId, netId); + + if (originsB1 == null || originsB1.result == null || originsB1.result.Count == 0) + throw new InvalidOperationException("originsB1 == null || originsB1.result == null || originsB1.result.Count == 0"); + + if (originsB1.result[0].Values == null || originsB1.result[0].Values.Count == 0) + throw new InvalidOperationException("originsB1.result[0].Values == null || originsB1.result[0].Values.Count == 0"); + + + foreach (var item in originsB1.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + B1Value = item[1]; + break; + } + } + + var originsB2 = await client.QueryCellsUseB1_B2_9393(netype, subnetId, netId); + + if (originsB2 == null || originsB2.result == null || originsB2.result.Count == 0) + throw new InvalidOperationException("originsB2 == null || originsB2.result == null || originsB2.result.Count == 0"); + + if (originsB2.result[0].Values == null || originsB2.result[0].Values.Count == 0) + throw new InvalidOperationException("originsB2.result[0].Values == null || originsB2.result[0].Values.Count == 0"); + + + foreach (var item in originsB2.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + B2Value = item[2]; + break; + } + } + + } + else + { + var originsA1 = await client.QueryCellsUseA1(netype, subnetId, netId); + + if (originsA1 == null || originsA1.result == null || originsA1.result.Count == 0) + throw new InvalidOperationException("originsA1 == null || originsA1.result == null || originsA1.result.Count == 0"); + + if (originsA1.result[0].Values == null || originsA1.result[0].Values.Count == 0) + throw new InvalidOperationException("originsA1.result[0].Values == null || originsA1.result[0].Values.Count == 0"); + + + foreach (var item in originsA1.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + A1Value = item[1]; + break; + } + } + + + var originsA2 = await client.QueryCellsUseA2(netype, subnetId, netId); + + if (originsA2 == null || originsA2.result == null || originsA2.result.Count == 0) + throw new InvalidOperationException("originsA2 == null || originsA2.result == null || originsA2.result.Count == 0"); + + if (originsA2.result[0].Values == null || originsA2.result[0].Values.Count == 0) + throw new InvalidOperationException("originsA2.result[0].Values == null || originsA2.result[0].Values.Count == 0"); + + + foreach (var item in originsA2.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + A2Value = item[1]; + break; + } + } + + var originsB1 = await client.QueryCellsUseB1_B2(netype, subnetId, netId); + + if (originsB1 == null || originsB1.result == null || originsB1.result.Count == 0) + throw new InvalidOperationException("originsB1 == null || originsB1.result == null || originsB1.result.Count == 0"); + + if (originsB1.result[0].Values == null || originsB1.result[0].Values.Count == 0) + throw new InvalidOperationException("originsB1.result[0].Values == null || originsB1.result[0].Values.Count == 0"); + + + foreach (var item in originsB1.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + B1Value = item[1]; + break; + } + } + + var originsB2 = await client.QueryCellsUseB1_B2(netype, subnetId, netId); + + if (originsB2 == null || originsB2.result == null || originsB2.result.Count == 0) + throw new InvalidOperationException("originsB2 == null || originsB2.result == null || originsB2.result.Count == 0"); + + if (originsB2.result[0].Values == null || originsB2.result[0].Values.Count == 0) + throw new InvalidOperationException("originsB2.result[0].Values == null || originsB2.result[0].Values.Count == 0"); + + + foreach (var item in originsB2.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + B2Value = item[1]; + break; + } + } + } + + var originsA3 = await client.QueryCellsUseA3(netype, subnetId, netId); + + if (originsA3 == null || originsA3.result == null || originsA3.result.Count == 0) + throw new InvalidOperationException("originsA3 == null || originsA3.result == null || originsA3.result.Count == 0"); + + if (originsA3.result[0].Values == null || originsA3.result[0].Values.Count == 0) + throw new InvalidOperationException("originsA3.result[0].Values == null || originsA3.result[0].Values.Count == 0"); + + + string A3Value = null; + foreach (var item in originsA3.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + A3Value = item[1]; + break; + } + } + + var originsA5 = await client.QueryCellsUseA5(netype, subnetId, netId); + + if (originsA5 == null || originsA5.result == null || originsA5.result.Count == 0) + throw new InvalidOperationException("originsA5 == null || originsA5.result == null || originsA5.result.Count == 0"); + + if (originsA5.result[0].Values == null || originsA5.result[0].Values.Count == 0) + throw new InvalidOperationException("originsA5.result[0].Values == null || originsA5.result[0].Values.Count == 0"); + + + string A5Value = null; + foreach (var item in originsA5.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[1][1] == localId) + { + A5Value = item[1]; + break; + } + } + + + + threshoValues.A1Value = A1Value; + threshoValues.A2Value = A2Value; + threshoValues.A3Value = A3Value; + threshoValues.A5Value = A5Value; + threshoValues.B1Value = B1Value; + threshoValues.B2Value = B2Value; + + return threshoValues; + }*/ + //public static async Task SwitchNRThreshold(this ZTEClient client, netype netype, CellModel cell, A3_A4_A5EventId eventId = A3_A4_A5EventId.A3) + //{ + // var result = await client.ModataQuery(netype); + // var cellConfig = result.result?.FirstOrDefault(n => n.ne == cell.GetZTENElement())?.MoData.FirstOrDefault(c => c.ldn.IndexOf($"NRCellCU={cell.LocalId},") != -1); + + // string areaId = Guid.NewGuid().ToString().Replace("-", ""); + // await client.CloseAndDestroyPlannedAreaNoThrow(areaId); + // await client.CreatePlannedArea(areaId, "MtnetAIbot001"); + // await client.OpenPlannedArea(areaId); + + // var moConfig = new List + // { + // new MoConfigArgSwitchA3_A4_A5 + // { + // eventId = eventId, + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // //mocName = "NRIntraFCovHo", + // } + // }; + + // await client.QuickMoConfigTask(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + + // await client.CloseAndDestroyPlannedAreaNoThrow(areaId); + //} + /// + /// 修改Carrier中心频点 + /// + /// + /// + /// + /// + /// + public static async Task ModifyCarrier(this ZTEClient client, netype netype, CellModel cell, string ssbFrequency) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List(); + + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CellDefiningSSB null"); + break; + } + var CarrierUL = new MoConfigArgCarrierUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = ssbFrequency + }; + moConfig.Add(CarrierUL); + break; + } + } + + + var resultDL = await client.ModataQuery(netype); + foreach (var item in resultDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + var CarrierDL = new MoConfigArgCarrierDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = ssbFrequency + }; + moConfig.Add(CarrierDL); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + + /// + /// 修改小区参数 + /// + /// + /// + /// + /// + /// + public static async Task ModifyParameter(this ZTEClient client, netype netype, CellModel cell, CellParameter cellParameter) + { + var moConfignew = new List>(); + //var moConfig = new List(); + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + #region 上下行频点 + if (!string.IsNullOrEmpty(cellParameter.ULssbFrequency) && !string.IsNullOrEmpty(cellParameter.DLssbFrequency)) + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var pointAfrequencyDL = ""; + var pointAfrequencyUL = ""; + var ssbFrequency = ""; + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CarrierUL null"); + break; + } + var CarrierUL = new MoConfigArgCarrierUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = cellParameter.ULssbFrequency + }; + var moConfig = new List(); + moConfig.Add(CarrierUL); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + var resultDL = await client.ModataQuery(netype); + foreach (var item in resultDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CarrierDL null"); + break; + } + var CarrierDL = new MoConfigArgCarrierDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = cellParameter.DLssbFrequency + }; + var moConfig = new List(); + moConfig.Add(CarrierDL); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + ////改完上下行频点使之生效 + await client.QuickMoConfigRelatedTaskNew (areaId, moConfignew); + moConfignew.Clear(); + //生效后读取里面的pointAfrequencyDL,pointAfrequencyUL + //和CellDefiningSSB里面ssbFrequency + //(根据gNodeBId,cellLocalId)修改到 + //ExternalNrCellLTE(nrPointA(上下行一样,一般读下行),centerFreq) + //ExternalNrCellFDDLTE(nrPointADL,nrPointAUL,centerFreqDL) + #region 生效后取 pointAfrequencyDL,pointAfrequencyUL,CellDefiningSSB里面ssbFrequency + var resultUL2 = await client.ModataQuery(netype); + foreach (var item in resultUL2.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CarrierUL null"); + break; + } + pointAfrequencyUL = cellConfig.pointAfrequencyUL; + break; + } + } + var resultDL2 = await client.ModataQuery(netype); + foreach (var item in resultDL2.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CarrierDL null"); + break; + } + pointAfrequencyDL = cellConfig.pointAfrequencyDL; + break; + } + } + var resultBase = await client.ModataQuery(netype); + foreach (var item in resultBase.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + ssbFrequency = cellConfig.ssbFrequency; + break; + } + } + } + #endregion + //对应的5g-FDD + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellFDDLTE != null) + { + foreach (var item in ExternalNrCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement()) + { + var ThirdExternalNrCellFDDLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellFDDLTE != null) + { + foreach (var thitem in ThirdExternalNrCellFDDLTE) + { + var config = new MoConfigArgExternalNrCellFDDLTE3 + { + ldn = thitem.ldn, + moOp = MoOp.update, + centerFreqDL = ssbFrequency, + nrPointADL = pointAfrequencyDL, + nrPointAUL = pointAfrequencyUL + }; + var moConfig = new List(); + moConfig.Add(config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + //改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) { + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + } + + //对应的5g-TDD + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellLTE != null) + { + foreach (var item in ExternalNrCellLTE.result) + { + if (item.ne != cell.GetZTENElement()) + { + var ThirdExternalNrCellLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellLTE != null) + { + foreach (var thitem in ThirdExternalNrCellLTE) + { + var config = new MoConfigArgExternalNrCellLTE3 + { + ldn = thitem.ldn, + moOp = MoOp.update, + nrPointA = pointAfrequencyDL,//(上下行一样,一般读下行) + centerFreq = ssbFrequency, + }; + var moConfig = new List(); + moConfig.Add(config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + //改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var resultULDL = await client.ModataQuery(netype); + foreach (var item in resultULDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + earfcnDl = cellParameter.DLssbFrequency, + earfcnUl = cellParameter.ULssbFrequency, + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + } + ////改完上下行频点使之生效 + //await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + //moConfig.Clear(); + #region //4g-5g同时修改(ExternalEUtranCellTDD :根据eNBId cellLocalId 改frequency)(ExternalEUtranCellFDD:根据eNBId cellLocalId 改 frequencyUL,frequencyDL) + var resulttdd = await client.ModataQuery(netype.ITBBU); + foreach (var item in resulttdd.result) + { + if (item.ne != cell.GetZTENElement()) + { + var result5g = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (result5g != null) + { + foreach (var item5g in result5g) + { + var Config = new MoConfigArgExternalEutranCellTDD_UD + { + ldn = item5g.ldn, + moOp = MoOp.update, + frequency = cellParameter.DLssbFrequency + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + ////改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + var resultfdd = await client.ModataQuery(netype.ITBBU); + foreach (var item in resultfdd.result) + { + if (item.ne != cell.GetZTENElement()) + { + var result5g = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (result5g != null) + { + foreach (var item5g in result5g) + { + var Config = new MoConfigArgExternalEutranCellFDD_UD + { + ldn = item5g.ldn, + moOp = MoOp.update, + frequencyDL = cellParameter.DLssbFrequency, + frequencyUL = cellParameter.ULssbFrequency + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + ////改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + + #endregion + #region // 4g-4g同时修改 (ExternalEUtranCellFDDLTE: 根据eNBIdcellLocalId改earfcnUl,earfcnDl) ExternalEUtranCellTDDLTE: 根据eNBId,cellLocalId改earfcn) + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in ExternalEUtranCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4 in cellConfig) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_UD + { + ldn = item4.ldn, + moOp = MoOp.update, + earfcnDl = cellParameter.DLssbFrequency, + earfcnUl = cellParameter.ULssbFrequency + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + + } + ////改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + var ExternalEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in ExternalEUtranCellTDDLTE.result) + { + if (item.ne != cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4 in cellConfig) + { + var Config = new MoConfigArgExternalEutranCellTDDLTE_UD + { + ldn = item4.ldn, + moOp = MoOp.update, + earfcn = cellParameter.DLssbFrequency,//上下行一样TDD + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + ////改完需要使邻区频点 生效 继续改别的邻区频点 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + #endregion + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + //此次无4G TDD直接修改 + } + else + { + //其他2g\3g + } + + } + #endregion + + #region PCI + if (!string.IsNullOrEmpty(cellParameter.PCI)) + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var resultBase = await client.ModataQuery(netype); + foreach (var item in resultBase.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellDefiningSSB + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + } + ////改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + //await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + //moConfig.Clear(); + //修改对应ExternalNrCellFDDLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellFDDLTE.result != null) + { + foreach (var item in ExternalNrCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellFDDLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellFDDLTE != null) + { + foreach (var itemli in ThirdExternalNrCellFDDLTE) + { + var Config = new MoConfigArgExternalNrCellFDDLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + ////改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + } + + //需要修改对应ExternalNrCellLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellLTE.result != null) + { + foreach (var item in ExternalNrCellLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellLTE != null) + { + foreach (var itemli in ThirdExternalNrCellLTE) + { + var Config = new MoConfigArgExternalNrCellLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + } + } + ////改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + ////改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + //await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + //moConfig.Clear(); + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + + var CUEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + } + ////改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + //await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + //moConfig.Clear(); + //同时修改ExternalEUtranCellFDDLTE里面pci 4g-4g + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in ExternalEUtranCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4 in cellConfig) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_Pci + { + ldn = item4.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + + } + } + ////改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + //同时修改ExternalEUtranCellFDD里面pci 4g-5g + var MoQueryResultExternalEutranCellFDD = await client.ModataQuery(netype.ITBBU); + foreach (var item in MoQueryResultExternalEutranCellFDD.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4_5g in cellConfig) + { + var Config = new MoConfigArgExternalEutranCellFDD_Pci + { + ldn = item4_5g.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={item.ne.Split("=")[1].Split(",")[0]},ManagedElement={item.ne.Split("=")[2]}", ManagedElementType = netype }); + + } + } + ////改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + //if (moConfig.Count == 0) + //{ + // continue; + //} + //await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + //moConfig.Clear(); + } + } + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) //此次没有4G TDD的直接修改 + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var item in CUEUtranCellTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = cellParameter.PCI + }; + var moConfig = new List(); + moConfig.Add(Config); + moConfignew.Add(new MoConfigArgBase() { moData = moConfig, ne = $"SubNetwork={cell.ZTESubNetwork},ManagedElement={cell.ZTEManagedElement}", ManagedElementType = netype }); + break; + } + } + } + } + else + { //其他2g\3g} + } + } + #endregion + #region 其他参数 + //if (cellParameter.qRxLevMin != null) + //{ + // var CellSelection = await client.ModataQuery(netype); + // foreach (var item in CellSelection.result) + // { + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + // if (cellConfig == null) + // { + // Console.WriteLine($"ModifyCarrier-cellConfig:cell.LocalId:{cell.LocalId} Select CellSelection null"); + // break; + // } + + // var CellSelectionConfig = new MoConfigArgCellSelection + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // qRxLevMin = cellParameter.qRxLevMin, + // qRxLevMinOffsetCell = cellParameter.qRxLevMinOffsetCell == null ? cellConfig.qRxLevMinOffsetCell : cellParameter.qRxLevMinOffsetCell + // }; + // moConfig.Add(CellSelectionConfig); + + // break; + // } + // } + //} + + //if (cellParameter.rsrpThresholdA1 != 0) + //{ + // var InterFHoA1A2_A1 = await client.ModataQuery(netype); + // foreach (var item in InterFHoA1A2_A1.result) + // { + // if (item.ne == cell.GetZTENElement()) + // { + // var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + // if (ModifyCell != null) + // { + + + + // var InterFHoA1A2config = new MoConfigArgInterFHoA1A2_A1 + // { + // ldn = ModifyCell.ldn, + // moOp = MoOp.update, + // hysteresisA1 = cellParameter.hysteresisA1 == 0 ? Convert.ToInt32(ModifyCell.hysteresisA1) : cellParameter.hysteresisA1, + // rsrpThresholdA1 = cellParameter.rsrpThresholdA1, + // }; + // moConfig.Add(InterFHoA1A2config); + + // break; + // } + // } + // } + //} + //if (cellParameter.rsrpThresholdA2 != 0) + //{ + // var InterFHoA1A2 = await client.ModataQuery(netype); + + // foreach (var item in InterFHoA1A2.result) + // { + // if (item.ne == cell.GetZTENElement()) + // { + // var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + // if (ModifyCell != null) + // { + + + + // var InterFHoA1A2config = new MoConfigArgInterFHoA1A2 + // { + // ldn = ModifyCell.ldn, + // moOp = MoOp.update, + // hysteresisA2 = cellParameter.hysteresisA2 == 0 ? Convert.ToInt32(ModifyCell.hysteresisA2) : cellParameter.hysteresisA2, + // rsrpThresholdA2 = cellParameter.rsrpThresholdA2, + // }; + // moConfig.Add(InterFHoA1A2config); + + // break; + // } + // } + // } + //} + //var NRInterFCovHo = await client.ModataQuery(netype); + //foreach (var item in NRInterFCovHo.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var ModifyCell = item.MoData.FirstOrDefault(m => m.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + + // if (ModifyCell != null) + // { + // if (cellParameter.eventOffset != 0) + // { + // var ArgNRA3config = new MoConfigArgNRA3 + // { + // ldn = ModifyCell.ldn, + // moOp = MoOp.update, + // eventId = A3_A4EventId.A3, + // hysteresis = cellParameter.hysteresisA3 == 0 ? Convert.ToInt32(ModifyCell.hysteresis) : cellParameter.hysteresisA3, + // eventOffset = cellParameter.eventOffset, + // }; + // moConfig.Add(ArgNRA3config); + // break; + // } + // else if (cellParameter.rsrpThresholdA4 != 0) + // { + // var NRA3_A4config = new MoConfigArgNRA3_A4 + // { + // ldn = ModifyCell.ldn, + // moOp = MoOp.update, + // eventId = A3_A4EventId.A4, + // hysteresis = cellParameter.hysteresisA4 == 0 ? Convert.ToInt32(ModifyCell.hysteresis) : cellParameter.hysteresisA4, + // rsrpThreshold = cellParameter.rsrpThresholdA4, + // }; + // moConfig.Add(NRA3_A4config); + + // break; + // } + + // else if (cellParameter.A5Thrd1Rsrp != 0 && cellParameter.rsrpThreshold != 0) + // { + // var NRA5config = new MoConfigArgNRA5 + // { + // ldn = ModifyCell.ldn, + // moOp = MoOp.update, + // hysteresis = cellParameter.hysteresisA5 == 0 ? Convert.ToInt32(ModifyCell.hysteresis) : cellParameter.hysteresisA5, + // rsrpThreshold = cellParameter.rsrpThreshold, + // A5Thrd1Rsrp = cellParameter.A5Thrd1Rsrp, + // }; + // moConfig.Add(NRA5config); + // break; + // } + // } + // } + //} + #endregion + if (moConfignew.Count != 0) + { + await client.QuickMoConfigRelatedTaskNew(areaId, moConfignew); + } + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyParameter:{ex.Message}"); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + + } + + + /// + /// 修改中心频点 DL UL + /// + /// + /// + /// + /// UL载波中心频点 + /// DL载波中心频点 + public static async Task ModifyCarrier(this ZTEClient client, netype netype, CellModel cell, string ULssbFrequency, string DLssbFrequency) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List(); + + //上行 + if (cell.MobileStandard == CellMobileStandard.NR) + { + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = ULssbFrequency + }; + + moConfig.Add(Config); + break; + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + earfcnUl = ULssbFrequency + }; + moConfig.Add(Config); + break; + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + + } + //下行 + if (cell.MobileStandard == CellMobileStandard.NR) + { + var resultDL = await client.ModataQuery(netype); + foreach (var item in resultDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + frequency = DLssbFrequency + }; + moConfig.Add(Config); + break; + } + + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + earfcnDl = DLssbFrequency + }; + moConfig.Add(Config); + break; + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + + } + + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + /// + /// 修改PCI + /// + /// + /// + /// + /// + /// + public static async Task ModifyCarrierCellPCI(this ZTEClient client, netype netype, CellModel cell, string NewPci) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + var closeResult = 0; + #region PCI + if (!string.IsNullOrEmpty(NewPci)) + { + var moConfig = new List(); + if (cell.MobileStandard == CellMobileStandard.NR) + { + var resultBase = await client.ModataQuery(netype); + foreach (var item in resultBase.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellDefiningSSB + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + break; + } + } + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + //修改对应ExternalNrCellFDDLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellFDDLTE.result != null) + { + foreach (var item in ExternalNrCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellFDDLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellFDDLTE != null) + { + foreach (var itemli in ThirdExternalNrCellFDDLTE) + { + var Config = new MoConfigArgExternalNrCellFDDLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + } + + //需要修改对应ExternalNrCellLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellLTE.result != null) + { + foreach (var item in ExternalNrCellLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellLTE != null) + { + foreach (var itemli in ThirdExternalNrCellLTE) + { + var Config = new MoConfigArgExternalNrCellLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + + var CUEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + break; + } + } + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + //同时修改ExternalEUtranCellFDDLTE里面pci 4g-4g + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in ExternalEUtranCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4 in cellConfig) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_Pci + { + ldn = item4.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + //同时修改ExternalEUtranCellFDD里面pci 4g-5g + var MoQueryResultExternalEutranCellFDD = await client.ModataQuery(netype.ITBBU); + foreach (var item in MoQueryResultExternalEutranCellFDD.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4_5g in cellConfig) + { + var Config = new MoConfigArgExternalEutranCellFDD_Pci + { + ldn = item4_5g.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) //此次没有4G TDD的直接修改 + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var item in CUEUtranCellTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + } + } + else + { //其他2g\3g} + } + if (moConfig.Count != 0) + { + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + } + closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + #endregion + return closeResult; + } + catch (Exception ex) + { + + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyCarrierCellPCI:{ex.Message}"); + return -1; + } + finally + { + + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + public static async Task ModifyCarrierCellPCINotAwait(this ZTEClient client, netype netype, CellModel cell, string NewPci) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + var closeResult = 0; + #region PCI + if (!string.IsNullOrEmpty(NewPci)) + { + var moConfig = new List(); + if (cell.MobileStandard == CellMobileStandard.NR) + { + var resultBase = await client.ModataQuery(netype); + foreach (var item in resultBase.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellDefiningSSB + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + break; + } + } + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + //修改对应ExternalNrCellFDDLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellFDDLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellFDDLTE.result != null) + { + foreach (var item in ExternalNrCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellFDDLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellFDDLTE != null) + { + foreach (var itemli in ThirdExternalNrCellFDDLTE) + { + var Config = new MoConfigArgExternalNrCellFDDLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + } + + //需要修改对应ExternalNrCellLTE里面的pci(根据gNodeBId cellLocalId改) + var ExternalNrCellLTE = await client.ModataQuery(netype.ITBBU); + if (ExternalNrCellLTE.result != null) + { + foreach (var item in ExternalNrCellLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var ThirdExternalNrCellLTE = item.MoData.Where(m => m.gNodeBId == cell.ZTEgNBId && m.cellLocalId == cell.LocalId); + if (ThirdExternalNrCellLTE != null) + { + foreach (var itemli in ThirdExternalNrCellLTE) + { + var Config = new MoConfigArgExternalNrCellLTE_pci + { + ldn = itemli.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + } + } + } + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + + var CUEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + break; + } + } + } + //改完pci使之 生效 因为需要改邻区里面对应的pci 需要切网元 所以需要先激活 + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + moConfig.Clear(); + //同时修改ExternalEUtranCellFDDLTE里面pci 4g-4g + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + foreach (var item in ExternalEUtranCellFDDLTE.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4 in cellConfig) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_Pci + { + ldn = item4.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + //同时修改ExternalEUtranCellFDD里面pci 4g-5g + var MoQueryResultExternalEutranCellFDD = await client.ModataQuery(netype.ITBBU); + foreach (var item in MoQueryResultExternalEutranCellFDD.result) + { + if (item.ne != cell.GetZTENElement())//非本站的 把本站当做外部邻区的 + { + var cellConfig = item.MoData.Where(a => a.eNBId == cell.ZTEgNBId && a.cellLocalId == cell.LocalId); + if (cellConfig != null) + { + foreach (var item4_5g in cellConfig) + { + var Config = new MoConfigArgExternalEutranCellFDD_Pci + { + ldn = item4_5g.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + //改完需要使邻区pci 生效 继续改别的邻区pci 需要切网元 所以需要先激活 + if (moConfig.Count == 0) + { + continue; + } + await client.QuickMoConfigRelatedTask(areaId, netype, item.ne.Split("=")[1].Split(",")[0], item.ne.Split("=")[2], moConfig); + moConfig.Clear(); + } + } + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) //此次没有4G TDD的直接修改 + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var item in CUEUtranCellTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = NewPci + }; + moConfig.Add(Config); + } + } + } + } + else + { //其他2g\3g} + } + if (moConfig.Count != 0) + { + await client.QuickMoConfigRelatedTask(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + } + closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + #endregion + } + catch (Exception ex) + { + + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyCarrierCellPCI:{ex.Message}"); + } + finally + { + + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + //QuickMoConfigTaskResultNotAwait + public static async Task ModifyCarrierCellPCI(this ZTEClient client, netype netype, List<(CellModel, string)> cellPcis) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + var moConfig = new List(); + + foreach (var item in cellPcis) + { + if (item.Item1.ZTEgNBId != cellPcis.FirstOrDefault().Item1.ZTEgNBId) + { + continue; + } + if (item.Item1.MobileStandard == CellMobileStandard.NR) + { + var resultUL = await client.ModataQuery(netype); + + foreach (var itemUL in resultUL.result) + { + if (itemUL.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemUL.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellDefiningSSB + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + } + else + { + if (item.Item1.MobileStandard == CellMobileStandard.FDDLTE) + { + var CUEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemFDDLTE in CUEUtranCellFDDLTE.result) + { + if (itemFDDLTE.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemFDDLTE.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemFDDLTE in ExternalEUtranCellFDDLTE.result) + { + var cellConfig = itemFDDLTE.MoData.FirstOrDefault(a => a.eNBId == item.Item1.ZTEgNBId && a.cellLocalId == item.Item1.LocalId); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_Pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + else if (item.Item1.MobileStandard == CellMobileStandard.TDDLTE) + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemTDDLTE in CUEUtranCellTDDLTE.result) + { + if (itemTDDLTE.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemTDDLTE.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cellPcis.FirstOrDefault().Item1.ZTESubNetwork, cellPcis.FirstOrDefault().Item1.ZTEManagedElement, moConfig); + await client.ClosePlannedAreaResult(areaId); + + await client.DestroyPlannedAreaNoThrow(areaId); + + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + Console.WriteLine($"ModifyCarrierCellPCI:{ex.Message}"); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + public static async Task ModifyCarrierCellPCINotAwait(this ZTEClient client, netype netype, List<(CellModel, string)> cellPcis) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + var moConfig = new List(); + + foreach (var item in cellPcis) + { + if (item.Item1.ZTEgNBId != cellPcis.FirstOrDefault().Item1.ZTEgNBId) + { + continue; + } + if (item.Item1.MobileStandard == CellMobileStandard.NR) + { + var resultUL = await client.ModataQuery(netype); + + foreach (var itemUL in resultUL.result) + { + if (itemUL.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemUL.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellDefiningSSB + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + } + else + { + if (item.Item1.MobileStandard == CellMobileStandard.FDDLTE) + { + var CUEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemFDDLTE in CUEUtranCellFDDLTE.result) + { + if (itemFDDLTE.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemFDDLTE.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + var ExternalEUtranCellFDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemFDDLTE in ExternalEUtranCellFDDLTE.result) + { + var cellConfig = itemFDDLTE.MoData.FirstOrDefault(a => a.eNBId == item.Item1.ZTEgNBId && a.cellLocalId == item.Item1.LocalId); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_Pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + else if (item.Item1.MobileStandard == CellMobileStandard.TDDLTE) + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype.ITBBU); + + foreach (var itemTDDLTE in CUEUtranCellTDDLTE.result) + { + if (itemTDDLTE.ne == item.Item1.GetZTENElement()) + { + var cellConfig = itemTDDLTE.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={item.Item1.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTE_pci + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + pci = item.Item2 + }; + moConfig.Add(Config); + break; + } + } + } + } + } + } + await client.QuickMoConfigTaskResultNotAwait(areaId, netype, cellPcis.FirstOrDefault().Item1.ZTESubNetwork, cellPcis.FirstOrDefault().Item1.ZTEManagedElement, moConfig); + + await client.ClosePlannedAreaResult(areaId); + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + } + catch (Exception ex) + { + Console.WriteLine($"ModifyCarrierCellPCI:{ex.Message}"); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + + } + + /// + /// 修改带宽 + /// + /// + /// + /// + /// + /// + public static async Task ModifyBandWidth(this ZTEClient client, netype netype, CellModel cell, string nrbandwidth) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new List(); + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.MoId}") != -1); + if (cellConfig != null) + { + var CarrierULMo = new MoConfigArgCarrierBandWidthUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + nrbandwidth = nrbandwidth + }; + moConfig.Add(CarrierULMo); + break; + } + } + } + + var resultDL = await client.ModataQuery(netype); + foreach (var item in resultDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.MoId}") != -1); + + string pointAfrequencyDL = ""; + switch (nrbandwidth) + { + case "20": pointAfrequencyDL = "2555.82"; break; + case "40": pointAfrequencyDL = ""; break; + case "60": pointAfrequencyDL = ""; break; + case "80": pointAfrequencyDL = "2525.94"; break; + case "90": pointAfrequencyDL = ""; break; + case "100": pointAfrequencyDL = "2515.86"; break; + default: pointAfrequencyDL = ""; break; + } + if (cellConfig != null) + { + var CarrierDLMo = new MoConfigArgCarrierBandWidthDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + nrbandwidth = nrbandwidth + //pointAfrequencyDL = pointAfrequencyDL + }; + moConfig.Add(CarrierDLMo); + + break; + } + + } + } + + var PhyResourceConfigforBWPUL = await client.ModataQuery(netype); + + foreach (var item in PhyResourceConfigforBWPUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + string refBwp = ""; + switch (nrbandwidth) + { + // + case "20": refBwp = "NRRadioInfrastructure=1,BWP=11"; break; + case "40": refBwp = "NRRadioInfrastructure=1,BWP=9"; break; + case "60": refBwp = "NRRadioInfrastructure=1,BWP=5"; break; + case "80": refBwp = "NRRadioInfrastructure=1,BWP=3"; break; + case "90": refBwp = "NRRadioInfrastructure=1,BWP=31"; break; + case "100": refBwp = "NRRadioInfrastructure=1,BWP=1"; break; + default: refBwp = ""; break; + } + var PhyResourceConfigforBWPULMo = new MoConfigArgPhyResourceConfigforBWPUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + refBWP = refBwp + }; + moConfig.Add(PhyResourceConfigforBWPULMo); + break; + } + } + + var PhyResourceConfigforBWPDL = await client.ModataQuery(netype); + + foreach (var item in PhyResourceConfigforBWPDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + string refBwp = ""; + switch (nrbandwidth) + { + case "20": refBwp = "NRRadioInfrastructure=1,BWP=12"; break; + case "40": refBwp = "NRRadioInfrastructure=1,BWP=10"; break; + case "60": refBwp = "NRRadioInfrastructure=1,BWP=6"; break; + case "80": refBwp = "NRRadioInfrastructure=1,BWP=4"; break; + case "90": refBwp = "NRRadioInfrastructure=1,BWP=32"; break; + case "100": refBwp = "NRRadioInfrastructure=1,BWP=2"; break; + default: refBwp = ""; break; + } + //var moConfig = new List + //{ + // new MoConfigArgPhyResourceConfigforBWPDL + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // refBWP = refBwp + // } + //}; + var PhyResourceConfigforBWPDLMo = new MoConfigArgPhyResourceConfigforBWPDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + refBWP = refBwp + }; + moConfig.Add(PhyResourceConfigforBWPDLMo); + + //await client.QuickMoConfigTask(areaId, netype, cell.ZTEManagedElement, cell.ZTESubNetwork, moConfig); + break; + } + } + + var SCSSpecificCarrierListUL = await client.ModataQuery(netype); + + foreach (var item in SCSSpecificCarrierListUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + string carrierBandwidth = ""; + switch (nrbandwidth) + { + // + case "20": carrierBandwidth = "51"; break; + case "40": carrierBandwidth = "106"; break; + case "60": carrierBandwidth = "162"; break; + case "80": carrierBandwidth = "217"; break; + case "90": carrierBandwidth = "245"; break; + case "100": carrierBandwidth = "273"; break; + default: carrierBandwidth = ""; break; + } + + var SCSSpecificCarrierListULMo = new MoConfigArgSCSSpecificCarrierListUL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + carrierBandwidth = carrierBandwidth + }; + moConfig.Add(SCSSpecificCarrierListULMo); + break; + } + } + var SCSSpecificCarrierListDL = await client.ModataQuery(netype); + + foreach (var item in SCSSpecificCarrierListDL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + string carrierBandwidth = ""; + switch (nrbandwidth) + { + // + case "20": carrierBandwidth = "51"; break; + case "40": carrierBandwidth = "106"; break; + case "60": carrierBandwidth = "162"; break; + case "80": carrierBandwidth = "217"; break; + case "90": carrierBandwidth = "245"; break; + case "100": carrierBandwidth = "273"; break; + default: carrierBandwidth = ""; break; + } + + var SCSSpecificCarrierListDLMo = new MoConfigArgSCSSpecificCarrierListDL + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + carrierBandwidth = carrierBandwidth + }; + moConfig.Add(SCSSpecificCarrierListDLMo); + + break; + } + } + + //var PUCCHConfig = await client.ModataQuery(netype); + + //foreach (var item in PUCCHConfig.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + // string pucchPRBstart = ""; + // switch (nrbandwidth) + // { + // case "20": pucchPRBstart = "5;48"; break; + // case "40": pucchPRBstart = ""; break; + // case "60": pucchPRBstart = ""; break; + // case "80": pucchPRBstart = "5;214"; break; + // case "90": pucchPRBstart = ""; break; + // case "100": pucchPRBstart = "5;270"; break; + // default: pucchPRBstart = ""; break; + // } + + // var PUCCHConfigMo = new MoConfigArgPUCCHConfig + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // pucchPRBstart = pucchPRBstart + // }; + // moConfig.Add(PUCCHConfigMo); + // break; + // } + //} + + //var SRSConfig = await client.ModataQuery(netype); + //foreach (var item in SRSConfig.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + // string srsNormalPeriod = ""; + // string narrowRbInitBw = ""; + // string symsOfComb = ""; + // //string srsNormalResource = ""; + // string narrowRbSymbNum = ""; + // string cSRSNarrowRB = ""; + // string cSRSWideRB = ""; + // string cSRS4APSRS = ""; + + // switch (nrbandwidth) + // { + // case "20": + // //srsNormalResource = "2;0;1"; + // narrowRbSymbNum = "0;0;4"; + // cSRSNarrowRB = "12"; + // cSRSWideRB = "12"; + // cSRS4APSRS = "12"; + // break; + // case "40": /*srsNormalResource = "";*/ narrowRbSymbNum = ""; cSRSNarrowRB = ""; cSRSWideRB = ""; cSRS4APSRS = ""; break; + // case "60": /*srsNormalResource = "";*/ narrowRbSymbNum = ""; cSRSNarrowRB = ""; cSRSWideRB = ""; cSRS4APSRS = ""; break; + // case "80": + // //srsNormalResource = ""; + // narrowRbSymbNum = "0;0;32"; + // cSRSNarrowRB = "51"; + // cSRSWideRB = "51"; + // cSRS4APSRS = "51"; + + // srsNormalPeriod = "20;40;160"; + // narrowRbInitBw = "2"; + // symsOfComb = "1;1;1;0"; + // break; + // case "90": /*srsNormalResource = "";*/ narrowRbSymbNum = ""; cSRSNarrowRB = ""; cSRSWideRB = ""; cSRS4APSRS = ""; break; + // case "100": + // //srsNormalResource = "2;1;0"; + // narrowRbSymbNum = "0;0;16"; + // cSRSNarrowRB = "63"; + // cSRSWideRB = "63"; + // cSRS4APSRS = "63"; + + // srsNormalPeriod = "20;40;80"; + // narrowRbInitBw = "1"; + // symsOfComb = "1;1;1;1"; + // break; + // default: /*srsNormalResource = ""; */; narrowRbSymbNum = ""; cSRSNarrowRB = ""; cSRSWideRB = ""; cSRS4APSRS = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgSRSConfig + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // //srsNormalResource = srsNormalResource, + // narrowRbSymbNum = narrowRbSymbNum, + // cSRSNarrowRB = cSRSNarrowRB, + // cSRSWideRB = cSRSWideRB, + // cSRS4APSRS = cSRS4APSRS, + // srsNormalPeriod =srsNormalPeriod, + // narrowRbInitBw = narrowRbInitBw, + // symsOfComb =symsOfComb, + // }; + // moConfig.Add(MoConfigArgMo); + // break; + // } + //} + + //var CSIIMCfg = await client.ModataQuery(netype); + //foreach (var item in CSIIMCfg.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + // string csiIMRbNum = ""; + // switch (nrbandwidth) + // { + // case "20": csiIMRbNum = "48"; break; + // case "40": csiIMRbNum = ""; break; + // case "60": csiIMRbNum = ""; break; + // case "80": csiIMRbNum = "216"; break; + // case "90": csiIMRbNum = ""; break; + // case "100": csiIMRbNum = "272"; break; + // default: csiIMRbNum = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgCSIIMCfg + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // csiIMRbNum = csiIMRbNum + // }; + // moConfig.Add(MoConfigArgMo); + // break; + // } + //} + + //var CQIMeasureCfg = await client.ModataQuery(netype); + //foreach (var item in CQIMeasureCfg.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + // string csiRsRbNum = ""; + // switch (nrbandwidth) + // { + // case "20": csiRsRbNum = "48"; break; + // case "40": csiRsRbNum = ""; break; + // case "60": csiRsRbNum = ""; break; + // case "80": csiRsRbNum = "216"; break; + // case "90": csiRsRbNum = ""; break; + // case "100": csiRsRbNum = "272"; break; + // default: csiRsRbNum = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgCQIMeasureCfg + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // csiRsRbNum = csiRsRbNum + // }; + // moConfig.Add(MoConfigArgMo); + // break; + // } + //} + + //var PmiMeasureCfg = await client.ModataQuery(netype); + //List pmiMeasureCfgs = new List(); + + //foreach (var item in PmiMeasureCfg.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // foreach (var itemLdn in item.MoData) + // { + // if (itemLdn.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1) + // { + // pmiMeasureCfgs.Add(itemLdn); + // } + // } + // break; + // } + //} + + //if (pmiMeasureCfgs != null && pmiMeasureCfgs.Count != 0) + //{ + // foreach (var item in pmiMeasureCfgs) + // { + // if (item.ldn.IndexOf($"PmiMeasureCfg=1") != -1 || item.ldn.IndexOf($"PmiMeasureCfg=2") != -1) + // { + // string csiRsRbNum = ""; + // switch (nrbandwidth) + // { + // case "20": csiRsRbNum = "48"; break; + // case "40": csiRsRbNum = ""; break; + // case "60": csiRsRbNum = ""; break; + // case "80": csiRsRbNum = "216"; break; + // case "90": csiRsRbNum = ""; break; + // case "100": csiRsRbNum = "272"; break; + // default: csiRsRbNum = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgPmiMeasureCfg + // { + // ldn = item.ldn, + // moOp = MoOp.update, + // csiRsRbNum = csiRsRbNum + // }; + // moConfig.Add(MoConfigArgMo); + // } + // } + //} + + //var AperiodicZPMeasureCfg = await client.ModataQuery(netype); + //foreach (var item in AperiodicZPMeasureCfg.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + // string csiRsRbNum = ""; + // switch (nrbandwidth) + // { + // case "20": csiRsRbNum = "48"; break; + // case "40": csiRsRbNum = ""; break; + // case "60": csiRsRbNum = ""; break; + // case "80": csiRsRbNum = "216"; break; + // case "90": csiRsRbNum = ""; break; + // case "100": csiRsRbNum = "272"; break; + // default: csiRsRbNum = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgAperiodicZPMeasureCfg + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // csiRsRbNum = csiRsRbNum + // }; + // moConfig.Add(MoConfigArgMo); + // break; + // } + //} + + + //var RSRPMeasureConfig = await client.ModataQuery(netype); + //List rSRPMeasureConfigs = new List(); + + //foreach (var item in RSRPMeasureConfig.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // foreach (var itemLdn in item.MoData) + // { + // if (itemLdn.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1) + // { + // rSRPMeasureConfigs.Add(itemLdn); + // } + // } + // break; + // } + //} + + //if (rSRPMeasureConfigs != null && rSRPMeasureConfigs.Count != 0) + //{ + // foreach (var item in rSRPMeasureConfigs) + // { + // if (item.ldn.IndexOf($"RSRPMeasureConfig=1") != -1 || item.ldn.IndexOf($"RSRPMeasureConfig=2") != -1) + // { + // string csiRsRbNum = ""; + // switch (nrbandwidth) + // { + // case "20": csiRsRbNum = "48"; break; + // case "40": csiRsRbNum = ""; break; + // case "60": csiRsRbNum = ""; break; + // case "80": csiRsRbNum = "216"; break; + // case "90": csiRsRbNum = ""; break; + // case "100": csiRsRbNum = "272"; break; + // default: csiRsRbNum = ""; break; + // } + // var MoConfigArgMo = new MoConfigArgRSRPMeasureConfig + // { + // ldn = item.ldn, + // moOp = MoOp.update, + // csiRsRbNum = csiRsRbNum + // }; + // moConfig.Add(MoConfigArgMo); + // } + // } + //} + + //var PDCCHConfig = await client.ModataQuery(netype); + //foreach (var item in PDCCHConfig.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + + // string frequencyDomainResources = ""; + // //string cceAdaptMod = ""; + // switch (nrbandwidth) + // { + // case "20": frequencyDomainResources = "000011110000000000000000000000000000000000000"; /*cceAdaptMod = "Adaptive";*/ break; + // case "40": frequencyDomainResources = ""; /*cceAdaptMod = ""; */break; + // case "60": frequencyDomainResources = ""; /*cceAdaptMod = ""; */break; + // case "80": frequencyDomainResources = "000000000111111111111111111111111110000000000"; /*cceAdaptMod = ""; */break; + // case "90": frequencyDomainResources = "";/* cceAdaptMod = ""; */break; + // case "100": frequencyDomainResources = "000000000111111111111111111111111111111111111"; /*cceAdaptMod = "";*/ break; + // default: frequencyDomainResources = ""; /*cceAdaptMod = "";*/ break; + // } + // var MoConfigArgMo = new MoConfigArgPDCCHConfig + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // frequencyDomainResources = frequencyDomainResources, + // //cceAdaptMod = cceAdaptMod + // }; + // //moConfig.Add(MoConfigArgMo); + // break; + // } + //} + + var ResultCode = await client.QuickMoConfigTaskRelatedResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"ModifyBandWidth:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + /// + /// + /// + /// + /// + /// + /// PCI 频点 带宽 + public static async Task<(string, string, string)?> Query_PCI_Frequency_BandWidth(this ZTEClient client, netype netype, CellModel cell) + { + string PCI = ""; + string Frequency = ""; + string BandWidth = ""; + + var CellDefiningSSB = await client.ModataQuery(netype); + + foreach (var item in CellDefiningSSB.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + PCI = cellConfig?.pci; + break; + } + } + var CarrierUL = await client.ModataQuery(netype); + foreach (var item in CarrierUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.MoId}") != -1); + Frequency = cellConfig?.frequency; + BandWidth = cellConfig?.nrbandwidth; + break; + } + } + return (PCI, Frequency, BandWidth); + } + + public static async Task QuickMoConfigTask(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + + var str = JsonConvert.SerializeObject(request); + var result = await client.MoConfig(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List{new neListObject + { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + } + public static async Task QuickMoConfigTaskResult(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + + var str = JsonConvert.SerializeObject(request); + // var result1 = await client.MoConfigcmtaskmng(dataAreaId, str); + + var result = await client.MoConfig(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArg); + if (string.IsNullOrWhiteSpace(activateResult.taskNo)) + return 0; + + var taskResult = await client.TaskStatus(activateResult.taskNo); + + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + if (taskResult.Count > 0) + return taskResult[0].code; + else return 0; + } + public static async Task QuickMoConfigTaskResultNotAwait(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + + var str = JsonConvert.SerializeObject(request); + await client.MoConfig(dataAreaId, str); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{new neListObject + { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + await client.PlannedareaActivate(dataAreaId, activateArg); + } + public static async Task QuickMoConfigTaskRelatedResult(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + var str = JsonConvert.SerializeObject(request); + var result = await client.MoConfigRelated(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List{new neListObject + { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + return taskResult[0].code; + } + + public static async Task QuickMoConfigRelatedTaskNew(this ZTEClient client, string dataAreaId, List> request) + { + Console.WriteLine("start update"+DateTime.Now.ToString()+"数据条数:"+request.Count); + if (request == null || request.Count == 0) + throw new InvalidOperationException("request == null || request.Count == 0"); + var str = JsonConvert.SerializeObject(request); + //Console.WriteLine("sub:"+subnetId,"netId:"+netId); + var result = await client.MoConfigRelated(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArgnew = new PlannedareaActivateArg() { neList=new List() }; + foreach (var item in request) + { + if (!activateArgnew.neList.Contains(new neListObject() + { + ne = item.ne, + ManagedElementType = item.ManagedElementType + })) + { + activateArgnew.neList.Add(new neListObject() + { + ne = item.ne, + ManagedElementType = item.ManagedElementType + }); + } + + } + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArgnew); + Console.WriteLine("end update" + DateTime.Now.ToString()); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + + } + public static async Task QuickMoConfigRelatedTask(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + + var str = JsonConvert.SerializeObject(request); + //Console.WriteLine("sub:"+subnetId,"netId:"+netId); + var result = await client.MoConfigRelated(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List{new neListObject + { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + + } + + private static async Task CellSSBAdminState(this ZTEClient client, netype netype, string subnetId, string netId, string localId, int state) + { + var origins = await client.CellDefiningSSBUpdate(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + { + return -1; + } + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + { + return -1; + } + + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[2][1] == localId) + { + ldnStr = item[0]; + if (item[1] == state.ToString()) + return -1; ; + } + } + + if (ldnStr == null) + { + return -1; + } + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new CellDefiningSSBUpdata + { + adminState=state, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "CUEUtranCellFDDLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + return taskResult[0].code; + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine($"Exception:{ex.Message}"); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + private static async Task TDDCellSSBAdminState(this ZTEClient client, netype netype, string subnetId, string netId, string localId, int state) + { + var origins = await client.TDDCellDefiningSSBUpdate(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + { + return -1; + } + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + { + return -1; + } + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[2][1] == localId) + { + ldnStr = item[0]; + if (item[1] == state.ToString()) + return -1; + } + } + + if (ldnStr == null) + { + return -1; + } + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new CellDefiningSSBUpdata + { + adminState=state, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "CUEUtranCellTDDLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + return taskResult[0].code; + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task QuickLockCellFDD(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.CellSSBAdminState(netype, subnetId, netId, localId, 1); + } + public static async Task QuickUnLockCellFDD(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.CellSSBAdminState(netype, subnetId, netId, localId, 0); + } + public static async Task QuickLockCellTDD(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.TDDCellSSBAdminState(netype, subnetId, netId, localId, 1); + } + public static async Task QuickUnLockCellTDD(this ZTEClient client, netype netype, string subnetId, string netId, string localId) + { + return await client.TDDCellSSBAdminState(netype, subnetId, netId, localId, 0); + } + #region LTE门限 + /* + private static async Task SetCellLTEA1(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string thresholdOfRSRP) + { + client.QueryLteCellThreshold(netype, n); + + var origins = await client.QueryCellsUse4GA1(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + throw new InvalidOperationException("origins == null || origins.result == null || origins.result.Count == 0"); + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + throw new InvalidOperationException("origins.result[0].Values == null || origins.result[0].Values.Count == 0"); + + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[3][1] == "10") + { + ldnStr = item[0]; + + } + } + + if (ldnStr == null) + throw new InvalidOperationException("get cell failed"); + + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new UeEUtranMeasurementLTE + { + thresholdOfRSRP=thresholdOfRSRP, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "UeEUtranMeasurementLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + } + */ + + public static async Task SetLteCellThreshold(this ZTEClient client, netype netype, CellModel cell, AllEventId eventId, int val, int secondVal) + { + var data = await client.QueryLteCellThreshold(netype, cell, eventId); + + if (data == null) + throw new InvalidOperationException("query a1 value failed"); + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (eventId <= AllEventId.A6_Dif && eventId != AllEventId.A5 && eventId != AllEventId.A5_Dif) + { + var config = new List { + new MoConfigArgLteA1_A2_A3_A4 + { + ldn = data?.Item1, + moOp = MoOp.update, + thresholdOfRSRP = val + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + else if (eventId == AllEventId.A5 || eventId == AllEventId.A5_Dif) + { + var config = new List { + new MoConfigArgLteA5 + { + ldn = data?.Item1, + moOp = MoOp.update, + thresholdOfRSRP = val, + a5Threshold2OfRSRP = secondVal + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + else if (eventId == AllEventId.B1) + { + var config = new List { + new MoConfigArgLteToNrB1 + { + ldn = data?.Item1, + moOp = MoOp.update, + rsrpSrvTrd = val, + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + else if (eventId == AllEventId.B2) + { + var config = new List { + new MoConfigArgLteToNrB2 + { + ldn = data?.Item1, + moOp = MoOp.update, + rsrpSrvTrd = val, + rSRPNRTrd = secondVal + } + }; + + await client.MoConfigTask(areaId, config, netype, cell.GetZTENElement()); + } + + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + /* + public static async Task SetCellLTEA2(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string thresholdOfRSRP) + { + var origins = await client.QueryCellsUse4GA1(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + throw new InvalidOperationException("origins == null || origins.result == null || origins.result.Count == 0"); + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + throw new InvalidOperationException("origins.result[0].Values == null || origins.result[0].Values.Count == 0"); + + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[3][1] == "20") + { + ldnStr = item[0]; + + } + } + + if (ldnStr == null) + throw new InvalidOperationException("get cell failed"); + + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new UeEUtranMeasurementLTE + { + thresholdOfRSRP=thresholdOfRSRP, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "UeEUtranMeasurementLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + + + } + + public static async Task CellLTEA2(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string thresholdOfRSRP) + { + await client.SetCellLTEA2(areaId, netype, subnetId, netId, thresholdOfRSRP); + } + + private static async Task SetCellLTEA3(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string a3Offset) + { + var origins = await client.QueryCellsUse4GA1(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + throw new InvalidOperationException("origins == null || origins.result == null || origins.result.Count == 0"); + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + throw new InvalidOperationException("origins.result[0].Values == null || origins.result[0].Values.Count == 0"); + + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[3][1] == "50") + { + ldnStr = item[0]; + + } + } + + if (ldnStr == null) + throw new InvalidOperationException("get cell failed"); + + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new UeEUtranMeasurementLTE + { + a3Offset=a3Offset, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "UeEUtranMeasurementLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + } + + public static async Task CellLTEA3(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string a3Offset) + { + await client.SetCellLTEA3(areaId, netype, subnetId, netId, a3Offset); + } + + //更改A4门限前先执这一步 + private static async Task SetCellLTEA4_Cfg(this ZTEClient client, string areaId, netype netype, string subnetId, string netId) + { + + } + public static async Task CellLTEA4_Cfg(this ZTEClient client, string areaId, netype netype, string subnetId, string netId) + { + await client.SetCellLTEA4_Cfg(areaId, netype, subnetId, netId); + } + + //更改A4门限值 + private static async Task SetCellLTEA4(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string thresholdOfRSRP) + { + + } + public static async Task CellLTEA4(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string thresholdOfRSRP) + { + await client.SetCellLTEA4(areaId, netype, subnetId, netId, thresholdOfRSRP); + } + + //更改A5门限前先执这一步 + private static async Task SetCellLTEA5_Cfg(this ZTEClient client, string areaId, netype netype, string subnetId, string netId) + { + + } + public static async Task CellLTEA5_Cfg(this ZTEClient client, string areaId, netype netype, string subnetId, string netId) + { + await client.SetCellLTEA5_Cfg(areaId, netype, subnetId, netId); + } + + //更改A5门限值 + private static async Task SetCellLTEA5(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string thresholdOfRSRP, string a5Threshold2OfRSRP) + { + var origins = await client.QueryCellsUse4GA1(netype, subnetId, netId); + + if (origins == null || origins.result == null || origins.result.Count == 0) + throw new InvalidOperationException("origins == null || origins.result == null || origins.result.Count == 0"); + + if (origins.result[0].Values == null || origins.result[0].Values.Count == 0) + throw new InvalidOperationException("origins.result[0].Values == null || origins.result[0].Values.Count == 0"); + + + string ldnStr = null; + foreach (var item in origins.result[0].Values) + { + if (item.Count < 2) + continue; + + var cellInfo = item[0].Split(new[] { ',' })?.ToList().Select(c => c.Split(new[] { '=' })).ToList(); + + if (cellInfo.Count() < 2 || cellInfo[1].Count() < 2) + continue; + + if (cellInfo[3][1] == "100") + { + ldnStr = item[0]; + + } + } + + if (ldnStr == null) + throw new InvalidOperationException("get cell failed"); + + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = new List + { + new UeEUtranMeasurementLTE + { + thresholdOfRSRP=thresholdOfRSRP, + a5Threshold2OfRSRP=a5Threshold2OfRSRP, + ldn = ldnStr, + moOp = MoOp.update, + mocName = "UeEUtranMeasurementLTE", + } + } + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype.ITBBU, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + } + public static async Task CellLTEA5(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string thresholdOfRSRP, string a5Threshold2OfRSRP) + { + await client.SetCellLTEA5(areaId, netype, subnetId, netId, thresholdOfRSRP, a5Threshold2OfRSRP); + } + + + private static async Task SetCellLTEB1(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string rSRPNRTrd) + { + + } + public static async Task CellLTEB1(this ZTEClient client, string areaId, netype netype, string subnetId, string netId, string rSRPNRTrd) + { + await client.SetCellLTEB1(areaId, netype, subnetId, netId, rSRPNRTrd); + } + + private static async Task SetCellLTEB2(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string rSRPNRTrd, string rsrpSrvTrd) + { + + + } + public static async Task CellLTEB2(this ZTEClient client, string areaId, netype netype, string subnetId, string netId,string rSRPNRTrd, string rsrpSrvTrd) + { + await client.SetCellLTEB2(areaId, netype, subnetId, netId, rSRPNRTrd, rsrpSrvTrd); + } + */ + + #endregion + + #region 不等待执行 + + /// + /// 修改最小接入电平(例:qRxLevMin为:-70,qRxLevMinOffsetCell为:8。最小接入电平计算 -70 + 8 =-62*2 最小接入电平为-124) + /// + /// + /// + /// + /// 小区选择所需的最小RSRP接收电平(dBm) + /// 小区选择所需的最小接收电平偏移量(2dB) + public static async Task ModifyCellSelection(this ZTEClient client, netype netype, CellModel cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + if (cell.MobileStandard == CellMobileStandard.NR) + { + var moConfig = new List(); + var resultUL = await client.ModataQuery(netype); + foreach (var item in resultUL.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellSelection + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + qRxLevMin = $"{Math.Floor(Convert.ToDouble(qRxLevMin) / 2)}", + qRxLevMinOffsetCell = qRxLevMinOffsetCell + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var EUtranReselectionFDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in EUtranReselectionFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUtranReselectionFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + qrxLevMinOfst = "0", + selQrxLevMin = qRxLevMin + }; + moConfig.Add(Config); + break; + } + + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var EUtranReselectionTDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + foreach (var item in EUtranReselectionTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig == null) + { + Console.WriteLine($"ModifyCellSelection -cellConfig:cell.LocalId:{cell.LocalId} Select EUtranReselectionFDDLTE null"); + break; + } + var Config = new MoConfigArgCUEUtranCellTDDLTE_selQrxLevMin + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + selQrxLevMin = qRxLevMin, + qrxLevMinOfst = "0", + + }; + moConfig.Add(Config); + break; + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else + { + return 0; + } + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModifyFDDCarrier(this ZTEClient client, netype netype, CellModel cell, double earfcnDl, double earfcnUl) + { + + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var moConfig = new List(); + + var CUEUtranCellFDDLTE = await client.ModataQuery(netype); + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + earfcnUl = $"{earfcnUl}", + earfcnDl = $"{earfcnDl}", + }; + moConfig.Add(Config); + break; + } + + } + } + var ResultCode = await client.QuickMoConfigTaskRelatedResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var CUEUtranCellFDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellTDDLTEearfcn + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + earfcn = $"{earfcnUl}" + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskRelatedResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + else + { + return 0; + } + + } + catch (Exception ex) + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + await client.DestroyPlannedAreaNoThrow(areaId); + + } + + } + public static async Task ModifyFDDBandWidth(this ZTEClient client, netype netype, CellModel cell, double BandWidthDl, double BandWidthUl) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + //string areaId = "f139eb6bb983411aa7c1cf5979ce1a0e"; + //var openResult = await client.OpenPlannedAreaResult(areaId); + //if (openResult != 0) + //{ + // await client.CreatePlannedArea(areaId, "TestPlannedArea"); + // openResult = await client.OpenPlannedAreaResult(areaId); + //} + try + { + if (cell.MobileStandard == CellMobileStandard.FDDLTE) + { + var CUEUtranCellFDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + + string cpTransPwr = ""; + + foreach (var item in CUEUtranCellFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + string maxUeRbNumDl = ""; + string maxUeRbNumUl = ""; + + string cellUpLeftBW = ""; + string cellUpRightBW = ""; + string cellDownLeftBW = ""; + string cellDownRightBW = ""; + switch (BandWidthDl) + { + case 10: + maxUeRbNumDl = "50"; + BandWidthDl = 3; + cellDownLeftBW = "5.0"; + cellDownRightBW = "5.0"; + cpTransPwr = "42.7"; + break; + case 15: + maxUeRbNumDl = "75"; + BandWidthDl = 4; + cellDownLeftBW = "7.5"; + cellDownRightBW = "7.5"; + cpTransPwr = "44.5"; + break; + case 20: + maxUeRbNumDl = "100"; + BandWidthDl = 5; + cellDownLeftBW = "10.0"; + cellDownRightBW = "10.0"; + cpTransPwr = "45.7"; + break; + default: break; + } + switch (BandWidthUl) + { + case 10: + maxUeRbNumUl = "23"; + BandWidthUl = 3; + cellUpLeftBW = "5.0"; + cellUpRightBW = "5.0"; + cpTransPwr = "42.7"; + break; + case 15: + maxUeRbNumUl = "28"; + BandWidthUl = 4; + cellUpLeftBW = "7.5"; + cellUpRightBW = "7.5"; + cpTransPwr = "44.5"; + break; + case 20: + maxUeRbNumUl = "33"; + BandWidthUl = 5; + cellUpLeftBW = "10.0"; + cellUpRightBW = "10.0"; + cpTransPwr = "45.7"; + break; + default: break; + } + var Config = new MoConfigArgCUEUtranCellFDDLTEBandWidth + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + bandWidthDl = $"{BandWidthDl}", + bandWidthUl = $"{BandWidthUl}", + maxUeRbNumDl = maxUeRbNumDl, + maxUeRbNumUl = maxUeRbNumUl, + cellUpLeftBW = cellUpLeftBW, + cellUpRightBW = cellUpRightBW, + cellDownLeftBW = cellDownLeftBW, + cellDownRightBW = cellDownRightBW, + }; + moConfig.Add(Config); + break; + } + + } + } + var ECellEquipFuncFDDLTE = await client.ModataQuery(netype); + foreach (var item in ECellEquipFuncFDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ECellEquipFuncFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgECellEquipFuncFDDLTE + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + cpTransPwr = cpTransPwr, + }; + moConfig.Add(Config); + break; + } + + } + } + + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else if (cell.MobileStandard == CellMobileStandard.TDDLTE) + { + var CUEUtranCellTDDLTE = await client.ModataQuery(netype); + var moConfig = new List(); + string cpTransPwr = ""; + foreach (var item in CUEUtranCellTDDLTE.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + string maxUeRbNumDl = ""; + string maxUeRbNumUl = ""; + + switch (BandWidthDl) + { + case 10: + maxUeRbNumDl = "50"; + BandWidthDl = 3; + cpTransPwr = "30.8"; + maxUeRbNumUl = "23"; + + break; + case 15: + maxUeRbNumDl = "75"; + BandWidthDl = 4; + cpTransPwr = "32.6"; + maxUeRbNumUl = "28"; + break; + case 20: + maxUeRbNumDl = "100"; + BandWidthDl = 5; + cpTransPwr = "33.8"; + maxUeRbNumUl = "33"; + break; + default: break; + } + var Config = new MoConfigArgCUEUtranCellTDDLTEBandWidth + { + ldn = cellConfig.ldn, + moOp = MoOp.update, + bandWidth = $"{BandWidthDl}", + maxUeRbNumDl = maxUeRbNumDl, + maxUeRbNumUl = maxUeRbNumUl, + }; + moConfig.Add(Config); + break; + } + + } + } + + //var ECellEquipFuncTDDLTE = await client.ModataQuery(netype); + //foreach (var item in ECellEquipFuncTDDLTE.result) + //{ + // if (item.ne == cell.GetZTENElement()) + // { + // var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ECellEquipFuncTDDLTE={cell.LocalId}") != -1); + // if (cellConfig != null) + // { + // var Config = new MoConfigArgECellEquipFuncTDDLTE + // { + // ldn = cellConfig.ldn, + // moOp = MoOp.update, + // cpTransPwr = cpTransPwr, + // }; + // moConfig.Add(Config); + // break; + // } + + // } + //} + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + if (closeResult != 0) + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + } + else + { + return 0; + } + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + //var closeResult = await client.ClosePlannedAreaResult(areaId); + //if (closeResult != 0) + //{ + // await client.DestroyPlannedAreaNoThrow(areaId); + //} + } + } + #endregion + public static async Task ModifySupportNetworkType(this ZTEClient client, netype netype, CellModel cellFirst, CellModel cellSecond, string VendorName) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cellFirst.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cellSecond.ZTEpLMNId}-{cellSecond.ZTEgNBId}-{cellSecond.LocalId}") != -1); + if (cellConfig != null) + { + + + var Config = new MoConfigArgExternalNRCellCUSupportNetworkType + { + ldn = cellConfig.ldn, + supportNetworkType = VendorName, + }; + moConfig.Add(Config); + break; + } + + } + } + + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cellFirst.ZTESubNetwork, cellFirst.ZTEManagedElement, moConfig); + + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + public static async Task ModifyCityLabel(this ZTEClient client, netype netype, CellModel cell, string cityLabel) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgNRCellCU + { + ldn = cellConfig.ldn, + cityLabel = cityLabel, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyLongitude(this ZTEClient client, netype netype, CellModel cell, string longitude, string latitude, string masterOperatorId) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgNRCellCUlongitude + { + ldn = cellConfig.ldn, + longitude = longitude, + latitude = latitude, + masterOperatorId = masterOperatorId, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyPlmn(this ZTEClient client, netype netype, CellModel cell, string pLMNId) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var GNBDUFunction = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in GNBDUFunction.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"GNBDUFunction={cell.ZTEpLMNId}_{cell.ZTEManagedElement}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgGNBDUFunction + { + ldn = cellConfig.ldn, + pLMNId = pLMNId, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + public static async Task ModifyTac(this ZTEClient client, netype netype, CellModel cell, string tac) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var GNBDUFunction = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in GNBDUFunction.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgNRCellDUtac + { + ldn = cellConfig.ldn, + tac = tac, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifygNBId(this ZTEClient client, netype netype, CellModel cell, string gNBId) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var GNBDUFunction = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in GNBDUFunction.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"GNBDUFunction={cell.ZTEpLMNId}_{cell.ZTEManagedElement}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgGNBDUFunctiongNBId + { + ldn = cellConfig.ldn, + gNBId = gNBId, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyCellLocalId(this ZTEClient client, netype netype, CellModel cell, string cellLocalId) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgNRCellCUcellLocalId + { + ldn = cellConfig.ldn, + cellLocalId = cellLocalId, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + public static async Task ModifyUserLabel(this ZTEClient client, netype netype, CellModel cell, string userLabel) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgNRCellCUuserLabel + { + ldn = cellConfig.ldn, + userLabel = userLabel, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyeNBId(this ZTEClient client, netype netype, CellModel cell, string eNBId) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ENBCUCPFunction={cell.ZTEpLMNId}_{cell.ZTEgNBId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgENBCUCPFunction + { + ldn = cellConfig.ldn, + eNBId = eNBId, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyenbName(this ZTEClient client, netype netype, CellModel cell, string enbName) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ENBCUCPFunction={cell.ZTEpLMNId}_{cell.ZTEgNBId}") != -1); + if (cellConfig != null) + { + + var Config = new MoConfigArgENBCUCPFunctionenbName + { + ldn = cellConfig.ldn, + enbName = enbName, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + + + public static async Task ModifyDuplexMode(this ZTEClient client, netype netype, CellModel cell, string duplexMode) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDUduplexMode + { + ldn = cellConfig.ldn, + duplexMode = duplexMode, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyOffsetToCarrierDL(this ZTEClient client, netype netype, CellModel cell, string offsetToCarrierDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cell.ZTEpLMNId}-{cell.ZTEManagedElement}-{cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalNRCellCU_offsetToCarrierDL + { + ldn = cellConfig.ldn, + offsetToCarrierDL = offsetToCarrierDL, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyOffsetToCarrierUL(this ZTEClient client, netype netype, CellModel cell, string offsetToCarrierUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cell.ZTEpLMNId}-{cell.ZTEManagedElement}-{cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalNRCellCU_offsetToCarrierUL + { + ldn = cellConfig.ldn, + offsetToCarrierUL = offsetToCarrierUL, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyPointAfrequencyDL(this ZTEClient client, netype netype, CellModel cell, string pointAfrequencyDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierDL_pointAfrequencyDL + { + ldn = cellConfig.ldn, + pointAfrequencyDL = pointAfrequencyDL, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyPointAfrequencyUL(this ZTEClient client, netype netype, CellModel cell, string pointAfrequencyUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierDL_pointAfrequencyUL + { + ldn = cellConfig.ldn, + pointAfrequencyUL = pointAfrequencyUL, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyCarrierListULOffsetToCarrier(this ZTEClient client, netype netype, CellModel cell, string offsetToCarrier) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSCSSpecificCarrierListUL_offsetToCarrier + { + ldn = cellConfig.ldn, + offsetToCarrier = offsetToCarrier, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyCarrierListDLOffsetToCarrier(this ZTEClient client, netype netype, CellModel cell, string offsetToCarrier) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSCSSpecificCarrierListDL_offsetToCarrier + { + ldn = cellConfig.ldn, + offsetToCarrier = offsetToCarrier, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyTddConfig_frameType1(this ZTEClient client, netype netype, CellModel cell, string frameType1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgTddConfig_frameType1 + { + ldn = cellConfig.ldn, + frameType1 = frameType1, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyTddConfig_frameType2(this ZTEClient client, netype netype, CellModel cell, string frameType2) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgTddConfig_frameType2 + { + ldn = cellConfig.ldn, + frameType2 = frameType2, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyTddConfig_nrofDownlinkSymbols1(this ZTEClient client, netype netype, CellModel cell, string nrofDownlinkSymbols1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgTddConfig_nrofDownlinkSymbols1 + { + ldn = cellConfig.ldn, + nrofDownlinkSymbols1 = nrofDownlinkSymbols1, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyTddConfig_nrofUplinkSymbols1(this ZTEClient client, netype netype, CellModel cell, string nrofUplinkSymbols1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgTddConfig_nrofUplinkSymbols1 + { + ldn = cellConfig.ldn, + nrofUplinkSymbols1 = nrofUplinkSymbols1, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModifyCarrierDL_frequencyBandList(this ZTEClient client, netype netype, CellModel cell, string frequencyBandList) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierDL_frequencyBandList + { + ldn = cellConfig.ldn, + frequencyBandList = frequencyBandList, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyCarrierUL_frequencyBandList(this ZTEClient client, netype netype, CellModel cell, string frequencyBandList) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCarrier={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCarrierUL_frequencyBandList + { + ldn = cellConfig.ldn, + frequencyBandList = frequencyBandList, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyfreqBandInd(this ZTEClient client, netype netype, CellModel cell, string freqBandInd) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalEUtranCellFDDLTE_freqBandInd + { + ldn = cellConfig.ldn, + freqBandInd = freqBandInd, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifySubcarrierSpacingUL(this ZTEClient client, netype netype, CellModel cell, string subcarrierSpacing) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSCSSpecificCarrierListUL_subcarrierSpacing + { + ldn = cellConfig.ldn, + subcarrierSpacing = subcarrierSpacing, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifySubcarrierSpacingDL(this ZTEClient client, netype netype, CellModel cell, string subcarrierSpacing) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSCSSpecificCarrierListDL_subcarrierSpacing + { + ldn = cellConfig.ldn, + subcarrierSpacing = subcarrierSpacing, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifySsbSubcarrierSpacing(this ZTEClient client, netype netype, CellModel cell, string ssbSubcarrierSpacing) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPBCH_ssbSubcarrierSpacing + { + ldn = cellConfig.ldn, + ssbSubcarrierSpacing = ssbSubcarrierSpacing, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyCarrierBandwidth(this ZTEClient client, netype netype, CellModel cell, string carrierBandwidth) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSCSSpecificCarrierListUL + { + ldn = cellConfig.ldn, + carrierBandwidth = carrierBandwidth, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifypMaxConfigSwitch(this ZTEClient client, netype netype, CellModel cell, string pMaxConfigSwitch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_pMaxConfigSwitch + { + ldn = cellConfig.ldn, + pMaxConfigSwitch = pMaxConfigSwitch, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifypMax(this ZTEClient client, netype netype, CellModel cell, string pMax) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_pMax + { + ldn = cellConfig.ldn, + pMax = pMax, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyPowerPerRERef(this ZTEClient client, netype netype, CellModel cell, string powerPerRERef) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCPList_powerPerRERef + { + ldn = cellConfig.ldn, + powerPerRERef = powerPerRERef, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyPuschtransformPrecoder(this ZTEClient client, netype netype, CellModel cell, string puschtransformPrecoder) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUSCHConfig_puschtransformPrecoder + { + ldn = cellConfig.ldn, + puschtransformPrecoder = puschtransformPrecoder, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyUePDSCHDmrsTyper(this ZTEClient client, netype netype, CellModel cell, string uePDSCHDmrsType) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPDSCHConfig_uePDSCHDmrsType + { + ldn = cellConfig.ldn, + uePDSCHDmrsType = uePDSCHDmrsType, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyInterFReselection_ssbSubcarrierSpacing(this ZTEClient client, netype netype, CellModel cell, string ssbSubcarrierSpacing) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterFReselection_ssbSubcarrierSpacing + { + ldn = cellConfig.ldn, + ssbSubcarrierSpacing = ssbSubcarrierSpacing, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyNRCellRelation_qOffsetCell(this ZTEClient client, netype netype, CellModel cell, string qOffsetCell) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterNRCellRelation_qOffsetCell + { + ldn = cellConfig.ldn, + qOffsetCell = qOffsetCell, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyEUTRAReselection_refEutranFreqRelation(this ZTEClient client, netype netype, CellModel cell, string refEutranFreqRelation) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_refEutranFreqRelation + { + ldn = cellConfig.ldn, + refEutranFreqRelation = refEutranFreqRelation, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyEUTRAReselection_cellReselectionPriority(this ZTEClient client, netype netype, CellModel cell, string cellReselectionPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_cellReselectionPriority + { + ldn = cellConfig.ldn, + cellReselectionPriority = cellReselectionPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyRefNRFreq(this ZTEClient client, netype netype, CellModel cell, string refNRFreq) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cell.ZTEpLMNId}-{cell.ZTEManagedElement}-{cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalNRCellCU_refNRFreq + { + ldn = cellConfig.ldn, + refNRFreq = refNRFreq, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + + public static async Task ModifyExternalNRCellCU_SubcarrierSpacingDL(this ZTEClient client, netype netype, CellModel cell, string subcarrierSpacingDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cell.ZTEpLMNId}-{cell.ZTEManagedElement}-{cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalNRCellCU_subcarrierSpacingDL + { + ldn = cellConfig.ldn, + subcarrierSpacingDL = subcarrierSpacingDL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyExternalNRCellCU_SubcarrierSpacingUL(this ZTEClient client, netype netype, CellModel cell, string subcarrierSpacingUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ExternalNRCellCU={cell.ZTEpLMNId}-{cell.ZTEManagedElement}-{cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgExternalNRCellCU_subcarrierSpacingUL + { + ldn = cellConfig.ldn, + subcarrierSpacingUL = subcarrierSpacingUL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModifyMeasObjEUTRA_refEutranFreqRelation(this ZTEClient client, netype netype, CellModel cell, string refEutranFreqRelation) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgMeasObjEUTRA_refEutranFreqRelation + { + ldn = cellConfig.ldn, + refEutranFreqRelation = refEutranFreqRelation, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyMeasObjEUTRA_measBandWidth(this ZTEClient client, netype netype, CellModel cell, string measBandWidth) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgMeasObjEUTRA_measBandWidth + { + ldn = cellConfig.ldn, + measBandWidth = measBandWidth, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyMeasObjEUTRA_offsetFreq(this ZTEClient client, netype netype, CellModel cell, string offsetFreq) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgMeasObjEUTRA_offsetFreq + { + ldn = cellConfig.ldn, + offsetFreq = offsetFreq, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + public static async Task ModifynLPsHoSwch(this ZTEClient client, netype netype, CellModel cell, string nLPsHoSwch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + //GlobalSwitch + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"ENBCUCPFunction={cell.ZTEpLMNId}_{cell.ZTEgNBId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgGlobalSwitch_nLPsHoSwch + { + ldn = cellConfig.ldn, + nLPsHoSwch = nLPsHoSwch, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyThreshServingLowP(this ZTEClient client, netype netype, CellModel cell, string threshServingLowP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_threshServingLowP + { + ldn = cellConfig.ldn, + threshServingLowP = threshServingLowP, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyThreshServingLowQ(this ZTEClient client, netype netype, CellModel cell, string threshServingLowQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_threshServingLowQ + { + ldn = cellConfig.ldn, + threshServingLowQ = threshServingLowQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModifyqHyst(this ZTEClient client, netype netype, CellModel cell, string qHyst) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_qHyst + { + ldn = cellConfig.ldn, + qHyst = qHyst, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyReselectionEUTRA(this ZTEClient client, netype netype, CellModel cell, string tReselectionEUTRA) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgReselectionCtrl_tReselectionEUTRA + { + ldn = cellConfig.ldn, + tReselectionEUTRA = tReselectionEUTRA, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyEUTRAReselection(this ZTEClient client, netype netype, CellModel cell, string cellReselectionPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_cellReselectionPriority + { + ldn = cellConfig.ldn, + cellReselectionPriority = cellReselectionPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellReselectionSubPriority(this ZTEClient client, netype netype, CellModel cell, string cellReselectionSubPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_cellReselectionSubPriority + { + ldn = cellConfig.ldn, + cellReselectionSubPriority = cellReselectionSubPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyThreshXHigh(this ZTEClient client, netype netype, CellModel cell, string threshXHigh) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_threshXHigh + { + ldn = cellConfig.ldn, + threshXHigh = threshXHigh, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyThreshXHighQ(this ZTEClient client, netype netype, CellModel cell, string threshXHighQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_threshXHighQ + { + ldn = cellConfig.ldn, + threshXHighQ = threshXHighQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyThreshXLow(this ZTEClient client, netype netype, CellModel cell, string threshXLow) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_threshXLow + { + ldn = cellConfig.ldn, + threshXLow = threshXLow, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyThreshXLowQ(this ZTEClient client, netype netype, CellModel cell, string threshXLowQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_threshXLowQ + { + ldn = cellConfig.ldn, + threshXLowQ = threshXLowQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyqRxLevMin(this ZTEClient client, netype netype, CellModel cell, string qRxLevMin) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_qRxLevMin + { + ldn = cellConfig.ldn, + qRxLevMin = qRxLevMin, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyqualMin(this ZTEClient client, netype netype, CellModel cell, string qualMin) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUTRAReselection_qualMin + { + ldn = cellConfig.ldn, + qualMin = qualMin, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySib24(this ZTEClient client, netype netype, CellModel cell, string sib24) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSISchedulingFDDLTE_sib24 + { + ldn = cellConfig.ldn, + sib24 = sib24, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftytReselNr(this ZTEClient client, netype netype, CellModel cell, string tReselNr) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCellResetFDDLTE_tReselNr + { + ldn = cellConfig.ldn, + tReselNr = tReselNr, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + // + + public static async Task ModiftyNrCarriFreq(this ZTEClient client, netype netype, CellModel cell, string nrCarriFreq) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrCarriFreq + { + ldn = cellConfig.ldn, + nrCarriFreq = nrCarriFreq, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftysSBMeasPeriod(this ZTEClient client, netype netype, CellModel cell, string sSBMeasPeriod) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_sSBMeasPeriod + { + ldn = cellConfig.ldn, + sSBMeasPeriod = sSBMeasPeriod, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftysSBMeasDuration(this ZTEClient client, netype netype, CellModel cell, string sSBMeasDuration) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_sSBMeasDuration + { + ldn = cellConfig.ldn, + sSBMeasDuration = sSBMeasDuration, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftysSBSCS(this ZTEClient client, netype netype, CellModel cell, string sSBSCS) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_sSBSCS + { + ldn = cellConfig.ldn, + sSBSCS = sSBSCS, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftynrReselPrio(this ZTEClient client, netype netype, CellModel cell, string nrReselPrio) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrReselPrio + { + ldn = cellConfig.ldn, + nrReselPrio = nrReselPrio, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftynrThrdXHigh(this ZTEClient client, netype netype, CellModel cell, string nrThrdXHigh) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrThrdXHigh + { + ldn = cellConfig.ldn, + nrThrdXHigh = nrThrdXHigh, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftynrThrdXLow(this ZTEClient client, netype netype, CellModel cell, string nrThrdXLow) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrThrdXLow + { + ldn = cellConfig.ldn, + nrThrdXLow = nrThrdXLow, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftynrThrdXHighQ(this ZTEClient client, netype netype, CellModel cell, string nrThrdXHighQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrThrdXHighQ + { + ldn = cellConfig.ldn, + nrThrdXHighQ = nrThrdXHighQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyqrxLevMin(this ZTEClient client, netype netype, CellModel cell, string qrxLevMin) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_qrxLevMin + { + ldn = cellConfig.ldn, + qrxLevMin = qrxLevMin, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyqQualMin1(this ZTEClient client, netype netype, CellModel cell, string qQualMin1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_qQualMin1 + { + ldn = cellConfig.ldn, + qQualMin1 = qQualMin1, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftynrPmax(this ZTEClient client, netype netype, CellModel cell, string nrPmax) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCelRtFLTE_nrPmax + { + ldn = cellConfig.ldn, + nrPmax = nrPmax, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task Modiftyn26InterfaceEnable(this ZTEClient client, netype netype, CellModel cell, string n26InterfaceEnable) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"GNBCUCPFunction={cell.ZTEpLMNId}-{cell.ZTEManagedElement}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgGlobalSwitchInformation_n26InterfaceEnable + { + ldn = cellConfig.ldn, + n26InterfaceEnable = n26InterfaceEnable, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyInterRatHoA1A2_hysteresisA2(this ZTEClient client, netype netype, CellModel cell, string hysteresisA2) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterRatHoA1A2_hysteresisA2 + { + ldn = cellConfig.ldn, + hysteresisA2 = hysteresisA2, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyInterRatHoA1A2_timeToTriggerA2(this ZTEClient client, netype netype, CellModel cell, string timeToTriggerA2) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterRatHoA1A2_timeToTriggerA2 + { + ldn = cellConfig.ldn, + timeToTriggerA2 = timeToTriggerA2, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRBlindRd_rsrpThreshold(this ZTEClient client, netype netype, CellModel cell, string rsrpThreshold) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRBlindRd_rsrpThreshold + { + ldn = cellConfig.ldn, + rsrpThreshold = rsrpThreshold, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + + public static async Task ModiftyLTEFreqCovHo_timeToTrigger(this ZTEClient client, netype netype, CellModel cell, string timeToTrigger) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgtimeToTrigger_timeToTrigger + { + ldn = cellConfig.ldn, + timeToTrigger = timeToTrigger, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRCellRelation_cellIndividualOffset(this ZTEClient client, netype netype, CellModel cell, string cellIndividualOffset) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRCellRelation_cellIndividualOffset + { + ldn = cellConfig.ldn, + cellIndividualOffset = cellIndividualOffset, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyEUtranCellMeasFDDLTE_methodLTEtoNR(this ZTEClient client, netype netype, CellModel cell, string methodLTEtoNR) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_methodLTEtoNR + { + ldn = cellConfig.ldn, + methodLTEtoNR = methodLTEtoNR, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyCUEUtranCellFDDLTE_rd4ForCoverage(this ZTEClient client, netype netype, CellModel cell, string rd4ForCoverage) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_rd4ForCoverage + { + ldn = cellConfig.ldn, + rd4ForCoverage = rd4ForCoverage, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeEUtranMeasurementLTE_timeToTrigger(this ZTEClient client, netype netype, CellModel cell, string timeToTrigger) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeEUtranMeasurementLTE_timeToTrigger + { + ldn = cellConfig.ldn, + timeToTrigger = timeToTrigger, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyEPSFallbackCtrl_epsfbSwitch(this ZTEClient client, netype netype, CellModel cell, string epsfbSwitch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackCtrl_epsfbSwitch + { + ldn = cellConfig.ldn, + epsfbSwitch = epsfbSwitch, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyEPSFallbackCtrl_epsfbLteMethod(this ZTEClient client, netype netype, CellModel cell, string epsfbLteMethod) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackCtrl_epsfbLteMethod + { + ldn = cellConfig.ldn, + epsfbLteMethod = epsfbLteMethod, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyEPSFallbackCtrl_epsfbWaitBetterCellTimer(this ZTEClient client, netype netype, CellModel cell, string epsfbWaitBetterCellTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackCtrl_epsfbWaitBetterCellTimer + { + ldn = cellConfig.ldn, + epsfbWaitBetterCellTimer = epsfbWaitBetterCellTimer, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyEPSFallbackRptCfg_rsrpThreshold(this ZTEClient client, netype netype, CellModel cell, string rsrpThreshold, string hysteresis) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackRptCfg_rsrpThreshold + { + ldn = cellConfig.ldn, + rsrpThreshold = rsrpThreshold, + hysteresis = hysteresis + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyEPSFallbackRptCfg_timeToTrigger(this ZTEClient client, netype netype, CellModel cell, string timeToTrigger) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackRptCfg_timeToTrigger + { + ldn = cellConfig.ldn, + timeToTrigger = timeToTrigger, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyEPSFallbackLTEFreqMeasConfig_epsfbPriority(this ZTEClient client, netype netype, CellModel cell, string epsfbPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEPSFallbackLTEFreqMeasConfig_epsfbPriority + { + ldn = cellConfig.ldn, + epsfbPriority = epsfbPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyEUtranCellMeasFDDLTE_epsFBEndFastReturnSwch(this ZTEClient client, netype netype, CellModel cell, string epsFBEndFastReturnSwch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgEUtranCellMeasFDDLTE_epsFBEndFastReturnSwch + { + ldn = cellConfig.ldn, + epsFBEndFastReturnSwch = epsFBEndFastReturnSwch, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyEUtranCellMeasFDDLTE_powerControlOffsetSS(this ZTEClient client, netype netype, CellModel cell, string powerControlOffsetSS) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCQIMeasureCfg_powerControlOffsetSS + { + ldn = cellConfig.ldn, + powerControlOffsetSS = powerControlOffsetSS, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyRSRPMeasureConfig_powerControlOffsetSS(this ZTEClient client, netype netype, CellModel cell, string powerControlOffsetSS) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgRSRPMeasureConfig_powerControlOffsetSS + { + ldn = cellConfig.ldn, + powerControlOffsetSS = powerControlOffsetSS, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyRachConfigGeneric_preambleReceivedTargetPower(this ZTEClient client, netype netype, CellModel cell, string preambleReceivedTargetPower) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgRachConfigGeneric_preambleReceivedTargetPower + { + ldn = cellConfig.ldn, + preambleReceivedTargetPower = preambleReceivedTargetPower, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyRachConfigGeneric_powerRampingStep(this ZTEClient client, netype netype, CellModel cell, string powerRampingStep) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgRachConfigGeneric_powerRampingStep + { + ldn = cellConfig.ldn, + powerRampingStep = powerRampingStep, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyRachConfigGeneric_preambleTransMax(this ZTEClient client, netype netype, CellModel cell, string preambleTransMax) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgRachConfigGeneric_preambleTransMax + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + preambleTransMax = preambleTransMax, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPUSCHConfigCommon_msg3DeltaPreamble(this ZTEClient client, netype netype, CellModel cell, string msg3DeltaPreamble) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUSCHConfigCommon_msg3DeltaPreamble + { + ldn = cellConfig.ldn, + msg3DeltaPreamble = msg3DeltaPreamble, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPUSCHConfigCommon_p0NominalWithGrant(this ZTEClient client, netype netype, CellModel cell, string p0NominalWithGrant) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUSCHConfigCommon_p0NominalWithGrant + { + ldn = cellConfig.ldn, + p0NominalWithGrant = p0NominalWithGrant, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyPUSCHP0AlphaSets_p0(this ZTEClient client, netype netype, CellModel cell, string p0) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUSCHP0AlphaSets_p0 + { + ldn = cellConfig.ldn, + p0 = p0, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyPUSCHP0AlphaSets_alpha(this ZTEClient client, netype netype, CellModel cell, string alpha) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUSCHP0AlphaSets_alpha + { + ldn = cellConfig.ldn, + alpha = alpha, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftySRSConfig_p0(this ZTEClient client, netype netype, CellModel cell, string p0) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new SRSConfig_p0 + { + ldn = cellConfig.ldn, + p0 = p0, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySRSConfig_alpha(this ZTEClient client, netype netype, CellModel cell, string alpha) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new SRSConfig_alpha + { + ldn = cellConfig.ldn, + alpha = alpha, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPUCCHConfigCommon_p0Nomina(this ZTEClient client, netype netype, CellModel cell, string p0Nomina) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPUCCHConfigCommon_p0Nomina + { + ldn = cellConfig.ldn, + p0Nomina = p0Nomina, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyP0PUCCH_p0PUCCHValue(this ZTEClient client, netype netype, CellModel cell, string p0PUCCHValue) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgP0PUCCH_p0PUCCHValue + { + ldn = cellConfig.ldn, + p0PUCCHValue = p0PUCCHValue, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPowerControlUL_switchForCLPCofPUSCH(this ZTEClient client, netype netype, CellModel cell, string switchForCLPCofPUSCH) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlUL_switchForCLPCofPUSCH + { + ldn = cellConfig.ldn, + switchForCLPCofPUSCH = switchForCLPCofPUSCH, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyPowerPowerControlULFDDLTE_p0NominalPUSCH(this ZTEClient client, netype netype, CellModel cell, string p0NominalPUSCH) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlULFDDLTE_p0NominalPUSCH + { + ldn = cellConfig.ldn, + p0NominalPUSCH = p0NominalPUSCH, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPowerPowerControlULFDDLTE_alpha(this ZTEClient client, netype netype, CellModel cell, string alpha) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlULFDDLTE_alpha + { + ldn = cellConfig.ldn, + alpha = alpha, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyPowerPowerControlULFDDLTE_poNominalPUCCH(this ZTEClient client, netype netype, CellModel cell, string poNominalPUCCH) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlULFDDLTE_poNominalPUCCH + { + ldn = cellConfig.ldn, + poNominalPUCCH = poNominalPUCCH, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyCUEUtranCellFDDLTE_phyChCPSel(this ZTEClient client, netype netype, CellModel cell, string phyChCPSel) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCUEUtranCellFDDLTE_phyChCPSel + { + ldn = cellConfig.ldn, + phyChCPSel = phyChCPSel, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRIntraFCovHo_timeToTrigger(this ZTEClient client, netype netype, CellModel cell, string timeToTrigger) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_timeToTrigger + { + ldn = cellConfig.ldn, + timeToTrigger = timeToTrigger, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyInterFHoA1A2_timeToTriggerA1(this ZTEClient client, netype netype, CellModel cell, string timeToTriggerA1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterFHoA1A2_timeToTriggerA1 + { + ldn = cellConfig.ldn, + timeToTriggerA1 = timeToTriggerA1, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyInterFHoA1A2_timeToTriggerA2(this ZTEClient client, netype netype, CellModel cell, string timeToTriggerA2) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterFHoA1A2_timeToTriggerA2 + { + ldn = cellConfig.ldn, + timeToTriggerA2 = timeToTriggerA2, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyNRInterFCovHo_triggerQuantity(this ZTEClient client, netype netype, CellModel cell, string triggerQuantity) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_triggerQuantity + { + ldn = cellConfig.ldn, + triggerQuantity = triggerQuantity, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRInterFCovHo_rptInterval(this ZTEClient client, netype netype, CellModel cell, string rptInterval) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_rptInterval + { + ldn = cellConfig.ldn, + rptInterval = rptInterval, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyNRInterFCovHo_rptAmount(this ZTEClient client, netype netype, CellModel cell, string rptAmount) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_rptAmount + { + ldn = cellConfig.ldn, + rptAmount = rptAmount, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRInterFCovHo_maxRptCellNum(this ZTEClient client, netype netype, CellModel cell, string maxRptCellNum) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_maxRptCellNum + { + ldn = cellConfig.ldn, + maxRptCellNum = maxRptCellNum, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyNRInterFCovHo_rptQuantityRsIndex(this ZTEClient client, netype netype, CellModel cell, string rptQuantityRsIndex) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_rptQuantityRsIndex + { + ldn = cellConfig.ldn, + rptQuantityRsIndex = rptQuantityRsIndex, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyNRInterFCovHo_maxNrofRSIndexToReport(this ZTEClient client, netype netype, CellModel cell, string maxNrofRSIndexToReport) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRIntraFCovHo_maxNrofRSIndexToReport + { + ldn = cellConfig.ldn, + maxNrofRSIndexToReport = maxNrofRSIndexToReport, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyNRInterFCovHo_includeBeamMeasurements(this ZTEClient client, netype netype, CellModel cell, string includeBeamMeasurements) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRInterFCovHo_includeBeamMeasurements + { + ldn = cellConfig.ldn, + includeBeamMeasurements = includeBeamMeasurements, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyQuantityConfigNR_ssbRsrpMeasFilterCoeff(this ZTEClient client, netype netype, CellModel cell, string ssbRsrpMeasFilterCoeff) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgQuantityConfigNR_ssbRsrpMeasFilterCoeff + { + ldn = cellConfig.ldn, + ssbRsrpMeasFilterCoeff = ssbRsrpMeasFilterCoeff, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_rangeToBestCell(this ZTEClient client, netype netype, CellModel cell, string rangeToBestCell) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_rangeToBestCell + { + ldn = cellConfig.ldn, + rangeToBestCell = rangeToBestCell, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_ssbConsolidRsrpThr(this ZTEClient client, netype netype, CellModel cell, string ssbConsolidRsrpThr) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_ssbConsolidRsrpThr + { + ldn = cellConfig.ldn, + ssbConsolidRsrpThr = ssbConsolidRsrpThr, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_nrofSSBlocksToAverage(this ZTEClient client, netype netype, CellModel cell, string nrofSSBlocksToAverage) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_nrofSSBlocksToAverage + { + ldn = cellConfig.ldn, + nrofSSBlocksToAverage = nrofSSBlocksToAverage, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyCellResel_cellReselectionPriority(this ZTEClient client, netype netype, CellModel cell, string cellReselectionPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_cellReselectionPriority + { + ldn = cellConfig.ldn, + cellReselectionPriority = cellReselectionPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_cellReselectionSubPriority(this ZTEClient client, netype netype, CellModel cell, string cellReselectionSubPriority) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_cellReselectionSubPriority + { + ldn = cellConfig.ldn, + cellReselectionSubPriority = cellReselectionSubPriority, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_sNonIntraSearchP(this ZTEClient client, netype netype, CellModel cell, string sNonIntraSearchP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_sNonIntraSearchP + { + ldn = cellConfig.ldn, + sNonIntraSearchP = sNonIntraSearchP, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_sNonIntraSearchQ(this ZTEClient client, netype netype, CellModel cell, string sNonIntraSearchQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_sNonIntraSearchQ + { + ldn = cellConfig.ldn, + sNonIntraSearchQ = sNonIntraSearchQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyIntraFReselection_qRxLevMin(this ZTEClient client, netype netype, CellModel cell, string qRxLevMin) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_qRxLevMin + { + ldn = cellConfig.ldn, + qRxLevMin = qRxLevMin, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyIntraFReselection_qQualMin(this ZTEClient client, netype netype, CellModel cell, string qQualMin) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_qQualMin + { + ldn = cellConfig.ldn, + qQualMin = qQualMin, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyIntraFReselection_sIntraSearchP(this ZTEClient client, netype netype, CellModel cell, string sIntraSearchP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_sIntraSearchP + { + ldn = cellConfig.ldn, + sIntraSearchP = sIntraSearchP, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyIntraFReselection_sIntraSearchQ(this ZTEClient client, netype netype, CellModel cell, string sIntraSearchQ) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_sIntraSearchQ + { + ldn = cellConfig.ldn, + sIntraSearchQ = sIntraSearchQ, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyIntraFReselection_tReselectionNR(this ZTEClient client, netype netype, CellModel cell, string tReselectionNR) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_tReselectionNR + { + ldn = cellConfig.ldn, + tReselectionNR = tReselectionNR, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyCellResel_IntraFReselection(this ZTEClient client, netype netype, CellModel cell, string IntraFReselection) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgCellResel_IntraFReselection + { + ldn = cellConfig.ldn, + IntraFReselection = IntraFReselection, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyIntraFReselection_duration(this ZTEClient client, netype netype, CellModel cell, string duration) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_duration + { + ldn = cellConfig.ldn, + duration = duration, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyIntraFReselection_deriveSSBIndexFromCell(this ZTEClient client, netype netype, CellModel cell, string deriveSSBIndexFromCell) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgIntraFReselection_deriveSSBIndexFromCell + { + ldn = cellConfig.ldn, + deriveSSBIndexFromCell = deriveSSBIndexFromCell, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyInterFReselection_threshXHighP(this ZTEClient client, netype netype, CellModel cell, string threshXHighP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterFReselection_threshXHighP + { + ldn = cellConfig.ldn, + threshXHighP = threshXHighP, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyInterFReselection_threshXLowP(this ZTEClient client, netype netype, CellModel cell, string threshXLowP) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInterFReselection_threshXLowP + { + ldn = cellConfig.ldn, + threshXLowP = threshXLowP, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyDRXCfg_drxSwitch(this ZTEClient client, netype netype, CellModel cell, string drxSwitch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgDRXCfg_drxSwitch + { + ldn = cellConfig.ldn, + drxSwitch = drxSwitch, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRX_onDuratTimer(this ZTEClient client, netype netype, CellModel cell, string onDuratTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_onDuratTimer + { + ldn = cellConfig.ldn, + onDuratTimer = onDuratTimer, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRX_drxInactivityTimer(this ZTEClient client, netype netype, CellModel cell, string drxInactivityTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_drxInactivityTimer + { + ldn = cellConfig.ldn, + drxInactivityTimer = drxInactivityTimer, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRXCycle_drxLongCycle(this ZTEClient client, netype netype, CellModel cell, string drxLongCycle) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgSADRXCycle_drxLongCycle + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + drxLongCycle = drxLongCycle, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftySADRX_drxRetransTimerUL(this ZTEClient client, netype netype, CellModel cell, string drxRetransTimerUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_drxRetransTimerUL + { + ldn = cellConfig.ldn, + drxRetransTimerUL = drxRetransTimerUL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRX_drxRetransTimerDL(this ZTEClient client, netype netype, CellModel cell, string drxRetransTimerDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_drxRetransTimerUL + { + ldn = cellConfig.ldn, + drxRetransTimerUL = drxRetransTimerDL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRX_drxHarqRttTimerUL(this ZTEClient client, netype netype, CellModel cell, string drxHarqRttTimerUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_drxHarqRttTimerUL + { + ldn = cellConfig.ldn, + drxHarqRttTimerUL = drxHarqRttTimerUL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRX_drxHarqRttTimerDL(this ZTEClient client, netype netype, CellModel cell, string drxHarqRttTimerDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRX_drxHarqRttTimerDL + { + ldn = cellConfig.ldn, + drxHarqRttTimerDL = drxHarqRttTimerDL, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRXCycle_shortDRXCycInd(this ZTEClient client, netype netype, CellModel cell, string shortDRXCycInd) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRXCycle_shortDRXCycInd + { + ldn = cellConfig.ldn, + shortDRXCycInd = shortDRXCycInd, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftySADRXCycle_drxShortCycleTimer(this ZTEClient client, netype netype, CellModel cell, string drxShortCycleTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSADRXCycle_drxShortCycleTimer + { + ldn = cellConfig.ldn, + drxShortCycleTimer = drxShortCycleTimer, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyUeTimer_t300(this ZTEClient client, netype netype, CellModel cell, string t300) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t300 + { + ldn = cellConfig.ldn, + t300 = t300, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_t301(this ZTEClient client, netype netype, CellModel cell, string t301) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t301 + { + ldn = cellConfig.ldn, + t301 = t301, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_t310(this ZTEClient client, netype netype, CellModel cell, string t310) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t310 + { + ldn = cellConfig.ldn, + t310 = t310, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_t311(this ZTEClient client, netype netype, CellModel cell, string t311) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t311 + { + ldn = cellConfig.ldn, + t311 = t311, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_n311(this ZTEClient client, netype netype, CellModel cell, string n311) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_n311 + { + ldn = cellConfig.ldn, + n311 = n311, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_t319(this ZTEClient client, netype netype, CellModel cell, string t319) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t319 + { + ldn = cellConfig.ldn, + t319 = t319, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyUeTimer_t304(this ZTEClient client, netype netype, CellModel cell, string t304) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgUeTimer_t304 + { + ldn = cellConfig.ldn, + t304 = t304, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyRSRPMeasureConfig_reportQuantity(this ZTEClient client, netype netype, CellModel cell, string reportQuantity) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgRSRPMeasureConfig_reportQuantity + { + ldn = cellConfig.ldn, + reportQuantity = reportQuantity, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyTddConfig_dlULTransmissionPeriodicity1(this ZTEClient client, netype netype, CellModel cell, string dlULTransmissionPeriodicity1) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgTddConfig_dlULTransmissionPeriodicity1 + { + ldn = cellConfig.ldn, + dlULTransmissionPeriodicity1 = dlULTransmissionPeriodicity1, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyClockSyncConfig_frameOffset(this ZTEClient client, netype netype, CellModel cell, string frameOffset) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgClockSyncConfig_frameOffset + { + ldn = cellConfig.ldn, + frameOffset = frameOffset, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + public static async Task ModiftyNRPhysicalCellDU_sib1Periodicity(this ZTEClient client, netype netype, CellModel cell, string sib1Periodicity) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_sib1Periodicity + { + ldn = cellConfig.ldn, + sib1Periodicity = sib1Periodicity, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftySsbMeasInfo_ssbSubcarrierSpacing(this ZTEClient client, netype netype, CellModel cell, string ssbSubcarrierSpacing) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_sib1Periodicity + { + ldn = cellConfig.ldn, + sib1Periodicity = ssbSubcarrierSpacing, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPCCHConfig_defaultPagingCycle(this ZTEClient client, netype netype, CellModel cell, string defaultPagingCycle) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"PCCHConfig=1") != -1); + foreach (var cellConfigitem in cellConfig) + { + var Config = new MoConfigArgPCCHConfig_defaultPagingCycle + { + moOp = MoOp.update, + ldn = cellConfigitem.ldn, + defaultPagingCycle = defaultPagingCycle, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPagingLTE_defaultPagingCycle(this ZTEClient client, netype netype, CellModel cell, string defaultPagingCycle) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"PagingLTE=1") != -1); + foreach (var cellConfigitem in cellConfig) + { + var Config = new MoConfigArgPagingLTE_defaultPagingCycle + { + moOp = MoOp.update, + ldn = cellConfigitem.ldn, + defaultPagingCycle = defaultPagingCycle, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPDCP_profile(this ZTEClient client, netype netype, CellModel cell, string drb5qi, bool profile0x0001 = false, bool profile0x0002 = false, bool profile0x0004 = false) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == drb5qi); + foreach (var cellConfigitem in cellConfig) + { + + var Config = new MoConfigArgPDCP_profile + { + moOp = MoOp.update, + ldn = cellConfigitem.ldn, + profile0x0001 = profile0x0001, + profile0x0002 = profile0x0002, + profile0x0004 = profile0x0004, + }; + moConfig.Add(Config); + } + + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + + } + } + + public static async Task ModiftyPDCPLTE_profile(this ZTEClient client, netype netype, CellModel cell, string qCI, bool profile1 = false, bool profile2 = false, bool profile4 = false, bool profile6 = false) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == qCI); + foreach (var cellConfigitem in cellConfig) + { + var Config = new MoConfigArgPDCPLTE_profile + { + moOp = MoOp.update, + ldn = cellConfigitem.ldn, + profile1 = profile1 ? "1" : "0", + profile2 = profile2 ? "1" : "0", + profile4 = profile4 ? "1" : "0", + profile6 = profile6 ? "1" : "0" + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyNRPhysicalCellDU_ulCceRatio4Coreset0(this ZTEClient client, netype netype, CellModel cell, string ulCceRatio4Coreset0) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_ulCceRatio4Coreset0 + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + ulCceRatio4Coreset0 = ulCceRatio4Coreset0, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPHR_prdPhrTimer(this ZTEClient client, netype netype, CellModel cell, string prdPhrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPHR_prdPhrTimer + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + prdPhrTimer = prdPhrTimer, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPHR_phtPhrTimer(this ZTEClient client, netype netype, CellModel cell, string phtPhrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPHR_phtPhrTimer + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + phtPhrTimer = phtPhrTimer, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftySRSConfig_srsPeriod(this ZTEClient client, netype netype, CellModel cell, string srsPeriod) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgSRSConfig_srsPeriod + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + srsPeriod = srsPeriod, + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPhyChannelFDDLTE_srsEnable(this ZTEClient client, netype netype, CellModel cell, string srsEnable) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPhyChannelFDDLTE_srsEnable + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + srsEnable = srsEnable, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPhyChannelTDDLTE_srsEnable(this ZTEClient client, netype netype, CellModel cell, string srsEnable) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPhyChannelTDDLTE_srsEnable + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + srsEnable = srsEnable, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPowerControlDLFDDLTE_paForDTCH(this ZTEClient client, netype netype, CellModel cell, string paForDTCH) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlDLFDDLTE_paForDTCH + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + paForDTCH = paForDTCH, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPowerControlDLTDDLTE_paForDTCH(this ZTEClient client, netype netype, CellModel cell, string paForDTCH) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPowerControlDLTDDLTE_paForDTCH + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + paForDTCH = paForDTCH, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPagingLTE_modificationPeriodCoeff(this ZTEClient client, netype netype, CellModel cell, string modificationPeriodCoeff) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"PagingLTE=1") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgPagingLTE_modificationPeriodCoeff + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + modificationPeriodCoeff = modificationPeriodCoeff, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPrachFDDLTE_preambleTransMax(this ZTEClient client, netype netype, CellModel cell, string preambleTransMax) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPrachFDDLTE_preambleTransMax + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + preambleTransMax = preambleTransMax, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPrachTDDLTE_preambleTransMax(this ZTEClient client, netype netype, CellModel cell, string preambleTransMax) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPrachTDDLTE_preambleTransMax + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + preambleTransMax = preambleTransMax, + }; + moConfig.Add(Config); + break; + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPDCP_snSizeUl(this ZTEClient client, netype netype, CellModel cell, string snSizeUl) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPDCP_snSizeUl + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + snSizeUl = snSizeUl + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPDCP_snSizeDl(this ZTEClient client, netype netype, CellModel cell, string snSizeDl) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPDCP_snSizeDl + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + snSizeDl = snSizeDl + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyQoSServiceClassLTE_sequenNumLenth(this ZTEClient client, netype netype, CellModel cell, string sequenNumLenth) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgQoSServiceClassLTE_sequenNumLenth + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + sequenNumLenth = sequenNumLenth + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyQoSServiceClassLTE_spsIntervalUL(this ZTEClient client, netype netype, CellModel cell, string spsIntervalUL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgQoSServiceClassLTE_spsIntervalUL + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + spsIntervalUL = spsIntervalUL + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyQoSServiceClassLTE_spsIntervalDL(this ZTEClient client, netype netype, CellModel cell, string spsIntervalDL) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgQoSServiceClassLTE_spsIntervalDL + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + spsIntervalDL = spsIntervalDL + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyPhyChannelFDDLTE_swchTTIBundling(this ZTEClient client, netype netype, CellModel cell, string swchTTIBundling) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPhyChannelFDDLTE_swchTTIBundling + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + swchTTIBundling = swchTTIBundling + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPhyChannelTDDLTE_swchTTIBundling(this ZTEClient client, netype netype, CellModel cell, string swchTTIBundling) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPhyChannelTDDLTE_swchTTIBundling + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + swchTTIBundling = swchTTIBundling + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyVoLTEConfigCellFDDLTE_ttiBHarqNum(this ZTEClient client, netype netype, CellModel cell, string ttiBHarqNum) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgVoLTEConfigCellFDDLTE_ttiBHarqNum + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + ttiBHarqNum = ttiBHarqNum + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyVoLTEConfigCellTDDLTE_ttiBHarqNum(this ZTEClient client, netype netype, CellModel cell, string ttiBHarqNum) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgVoLTEConfigCellTDDLTE_ttiBHarqNum + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + ttiBHarqNum = ttiBHarqNum + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyPDCP_rlcMode(this ZTEClient client, netype netype, CellModel cell, string rlcMode) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgPDCP_rlcMode + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + rlcMode = rlcMode + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyRLC_snFieldLengthUM(this ZTEClient client, netype netype, CellModel cell, string snFieldLengthUM) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgRLC_snFieldLengthUM + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + snFieldLengthUM = snFieldLengthUM + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyRLC_snFieldLengthAM(this ZTEClient client, netype netype, CellModel cell, string snFieldLengthAM) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.drb5qi == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgRLC_snFieldLengthAM + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + snFieldLengthAM = snFieldLengthAM + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyQoSServiceClassLTE_rlcMode(this ZTEClient client, netype netype, CellModel cell, string rlcMode) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgQoSServiceClassLTE_rlcMode + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + rlcMode = rlcMode + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyQoSServiceClassLTE_sequenceNumType(this ZTEClient client, netype netype, CellModel cell, string sequenceNumType) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgQoSServiceClassLTE_sequenceNumType + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + sequenceNumType = sequenceNumType + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftySADRXCycle_drxValid(this ZTEClient client, netype netype, CellModel cell, string drxValid) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgSADRXCycle_drxValid + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + drxValid = drxValid + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyServiceDrxFDDLTE_longDrxCyc(this ZTEClient client, netype netype, CellModel cell, string longDrxCyc) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CULTE=1") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceDrxFDDLTE_longDrxCyc + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + longDrxCyc = longDrxCyc + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyServiceDrxFDDLTE_perQCIDrxSwch(this ZTEClient client, netype netype, CellModel cell, string perQCIDrxSwch) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + //var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CULTE=1") != -1); + var cellConfig = item.MoData.Where(a => a.qCI == "1"); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceDrxFDDLTE_perQCIDrxSwch + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + perQCIDrxSwch = perQCIDrxSwch + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyMACCellGroupConfig_prdBsrTimer(this ZTEClient client, netype netype, CellModel cell, string prdBsrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgMACCellGroupConfig_prdBsrTimer + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + prdBsrTimer = prdBsrTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + public static async Task ModiftyServiceMACFDDLTE_prdBsrTimer(this ZTEClient client, netype netype, CellModel cell, string prdBsrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceMACFDDLTE_prdBsrTimer + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + prdBsrTimer = prdBsrTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyServiceMACTDDLTE_prdBsrTimer(this ZTEClient client, netype netype, CellModel cell, string prdBsrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceMACTDDLTE_prdBsrTimer + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + prdBsrTimer = prdBsrTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyServiceMACFDDLTE_retxBsrTimer(this ZTEClient client, netype netype, CellModel cell, string retxBsrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellFDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceMACFDDLTE_retxBsrTimer + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + retxBsrTimer = retxBsrTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyServiceMACTDDLTE_retxBsrTimer(this ZTEClient client, netype netype, CellModel cell, string retxBsrTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"CUEUtranCellTDDLTE={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgServiceMACTDDLTE_retxBsrTimer + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + retxBsrTimer = retxBsrTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + //无修改参数套接口 + public static async Task ModiftyNRPhysicalCellDU_FNRparamSuite(this ZTEClient client, netype netype, CellModel cell, string FNRparamSuite) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.Where(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + foreach (var cellConfigItem in cellConfig) + { + var Config = new MoConfigArgNRPhysicalCellDU_FNRparamSuite + { + moOp = MoOp.update, + ldn = cellConfigItem.ldn, + FNRparamSuite = FNRparamSuite + }; + moConfig.Add(Config); + } + } + } + var ResultCode = 0;// await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftySSBlock_smtc1PrdAndOffset(this ZTEClient client, netype netype, CellModel cell, string smtc1PrdAndOffset) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSSBlock_smtc1PrdAndOffset + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + smtc1PrdAndOffset = smtc1PrdAndOffset + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftySSBlock_duration(this ZTEClient client, netype netype, CellModel cell, string duration) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgSSBlock_duration + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + duration = duration + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyNRPhysicalCellDU_nTimingAdvanceOffset(this ZTEClient client, netype netype, CellModel cell, string nTimingAdvanceOffset) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgNRPhysicalCellDU_nTimingAdvanceOffset + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + nTimingAdvanceOffset = nTimingAdvanceOffset + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + public static async Task ModiftyInactiveCfgForServ_ueInactiveTimer(this ZTEClient client, netype netype, CellModel cell, string ueInactiveTimer) + { + string areaId = "88bc0544a61e4a3e8ef5936cf0a6c099"; + + await client.DestroyPlannedAreaNoThrow(areaId); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + + try + { + var ManagedElement = await client.ModataQuery(netype); + var moConfig = new List(); + + foreach (var item in ManagedElement.result) + { + if (item.ne == cell.GetZTENElement()) + { + var cellConfig = item.MoData.FirstOrDefault(a => a.ldn.IndexOf($"NRCellCU={cell.LocalId}") != -1); + if (cellConfig != null) + { + var Config = new MoConfigArgInactiveCfgForServ_ueInactiveTimer + { + moOp = MoOp.update, + ldn = cellConfig.ldn, + ueInactiveTimer = ueInactiveTimer + }; + moConfig.Add(Config); + } + } + } + var ResultCode = await client.QuickMoConfigTaskResult(areaId, netype, cell.ZTESubNetwork, cell.ZTEManagedElement, moConfig); + var closeResult = await client.ClosePlannedAreaResult(areaId); + await client.DestroyPlannedAreaNoThrow(areaId); + return ResultCode; + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + + Console.WriteLine(ex.Message); + return -1; + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiRelationExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiRelationExtension.cs new file mode 100644 index 00000000..f05ac77e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/EasyApi/EasyApiRelationExtension.cs @@ -0,0 +1,91 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.MoHandle; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.EasyApi +{ + public static class EasyApiRelationExtension + { + /// + /// 查询邻区关系 + /// + /// + /// + /// + /// + /// + public static async Task QueryRelationsUseMoGet(this ZTEClient client, netype netype, string subnetid, string neid) + { + var query = new MocGetArg + { + mocList = new List { "NRCellRelation" }, + }; + string content = await client.MoGet(netype, subnetid, neid, query); + return content; + } + /// + /// 设置邻区关系 + /// + /// + /// + /// + /// + /// + /// + /// + public static async Task SetRelationsUseMoConfig(this ZTEClient client, string dataAreaId, netype netype, string subnetId, string netId, IList moCells) + { + if (moCells == null || moCells.Count == 0) + throw new InvalidOperationException("moCells == null || moCells.Count == 0"); + + var request = new List> + { + new MoConfigArgBase { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}", + moData = moCells + } + }; + + var str = JsonConvert.SerializeObject(request); + var result = await client.MoConfig(dataAreaId, str); + + var validation = new ValidationArg { neList = new List() }; + var activateArg = new PlannedareaActivateArg + { + neList = new List{new neListObject + { + ManagedElementType = netype, + ne = $"SubNetwork={subnetId},ManagedElement={netId}" + } + } + }; + + var validationResult = await client.Validation(dataAreaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateResult = await client.PlannedareaActivate(dataAreaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0) + { + var results = taskResult.Where(t => t.progress < 100); + if (results == null || results.Count() == 0) + break; + + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Logger.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Logger.cs new file mode 100644 index 00000000..93cfb014 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Logger.cs @@ -0,0 +1,63 @@ +using log4net; +using log4net.Config; +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage +{ + public class Logger + { + static ILog Loger = null; + //日志类初始化(读取配置文件) + public static void LogInit() + { + XmlConfigurator.Configure(new FileInfo(Path.Combine("D:\\Code\\submitcode\\MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage\\MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage\\bin\\Debug\\net471", "log4net.config"))); + Loger = LogManager.GetLogger(typeof(Logger)); + Loger.Info("系统初始化Logger模块"); + } + + /// + /// Log4日志 + /// + /// + /// + public static void Error(string msg = "出现异常", Exception ex = null) + { + //Console.WriteLine(msg); + Loger.Error(msg, ex); + } + + /// + /// Log4日志 + /// + /// + public static void Warn(string msg) + { + //Console.WriteLine(msg); + Loger.Warn(msg); + } + + /// + /// Log4日志 + /// + /// + public static void Info(string msg) + { + //Console.WriteLine(msg); + Loger.Info(msg); + } + + /// + /// Log4日志 + /// + /// + public static void Debug(string msg) + { + //Console.WriteLine(msg); + Loger.Debug(msg); + } + } +} + diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CellExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CellExtension.cs new file mode 100644 index 00000000..0ba40612 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CellExtension.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + + public static class CellExtension + { + public static async Task> QueryNRCellCU(this ZTEClient client, netype netype, IList neList = null) + { + return await client.ModataQuery(netype, neList); + } + public static async Task> QueryFDDLteCell(this ZTEClient client, netype netype, IList NeList = null) + { + return await client.ModataQuery(netype, NeList); + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CmtaskmngExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CmtaskmngExtension.cs new file mode 100644 index 00000000..0b925426 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CmtaskmngExtension.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cmtaskmng; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + public static class CmtaskmngExtension + { + public static async Task> TaskStatus(this ZTEClient client, string taskNo) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/cmtaskmng/v1/taskstatus?taskNo={taskNo}"; + using var responseMessage = await client.GetAsync(url); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject>(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(TaskStatus)} error {result.message}"); + } + //public static IList TaskStatusNoAwait(this ZTEClient client, string taskNo) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/cmtaskmng/v1/taskstatus?taskNo={taskNo}"; + // using var responseMessage = client.NoAwaitGetAsync(url); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject>(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(TaskStatus)} error {result.message}"); + //} + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CurrentAreaExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CurrentAreaExtension.cs new file mode 100644 index 00000000..7ea13ea0 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/CurrentAreaExtension.cs @@ -0,0 +1,221 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + public static class CurrentAreaExtension + { + + public static async Task DataExport(this ZTEClient client, DataExportArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/currentarea/v1/dataexport"; + var str = JsonConvert.SerializeObject(arg); + //Console.WriteLine(str); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return resultStr; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(DataExport)} error {result.message}"); + } + public static async Task ModataQuery(this ZTEClient client, ModataQueryArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/currentarea/v1/modataquery"; + var str = JsonConvert.SerializeObject(arg); + //Console.WriteLine(str); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + //Logger.LogInit(); + //Logger.Info($"GetLicense responseMessage{responseMessage.StatusCode}"); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return resultStr; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(ModataQuery)} error {result.message}"); + } + public static async Task> ModataQuery(this ZTEClient client, netype netype, IList neList = null) + { + string queryName = typeof(T).Name.Replace("MoQueryResult", string.Empty); + var queryArg = new ModataQueryArg + { + ManagedElementType = netype, + MocList = new List { queryName }, + NeList = neList + }; + string content = await client.ModataQuery(queryArg); + return JsonConvert.DeserializeObject>(content); + } + public static async Task GetLicense(this ZTEClient client, netype netype) + { + //https://{serverIP}:{port}/api/nelcsmgr/v1/license/query/licenseinfo/{netype} + string url = $"https://{client.IpAddr}:{client.Port}/api/nelcsmgr/v1/license/query/licenseinfo/{netype}"; + var arg = new LicenseModel + { + SubNetwork = "9090", + ManagedElement = "9090" + + }; + + var str = JsonConvert.SerializeObject(arg); + using var content = new StringContent(str, Encoding.UTF8, "application/json"); + + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Logger.LogInit(); + //Logger.Info($"GetLicense responseMessage{responseMessage.StatusCode}"); + //Console.WriteLine("ModataQuery response status code:" + responseMessage.StatusCode); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(ModataQuery)} error {result.message}"); + } + public static async Task CurrentAreaExtensionTest(this ZTEClient client, netype netype) + { + //https://{serverIP}:{port}/api/nelcsmgr/v1/license/query/licenseinfo/{netype} + string url = $"https://{client.IpAddr}:{client.Port}/api/pm-task/v1/task/customized"; + + //using var responseMessage = await client.GetAsync(url); + //var arg = new LicenseModel + //{ + // SubNetwork = "9090", + // ManagedElement = "9090" + + //}; + var ss = new LocationRoot + { + taskid = 123, + creator="a", + modifier="a", + source = 1, + createtime=DateTime.Now, + modifytime=DateTime.Now, + healthstatus = 0, + hasemstask =true, + hasumetask =true, + ommresult = 0, + action = 0, + reportinterval = 0, + confirmedmessageids = new List { "a" }, + emdn="a", + nfctid = "a", + motid = "a", + mtids = new List { "a"}, + counterids = new List { "a"}, + name="aName", + gr = 0, + status = 0, + filterlayer = "f", + locations =new List() + { + new Location() + { + me="me", + mois=new List + { + "mois" + }, + nfctid="nf", + motid="mo" + } + }, + uilocations =new List() + { + new Uilocation() + { + id="123", + pmid="1", + name="Uiname", + haslogicmoc=true, + model="m", + type="t", + moc="400" + } + }, + starttime=DateTime.Now, + endtime=DateTime.Now, + modelversion = new List { + "mod" + }, + dayinmonthfilter="d", + dayinweekfilter="d", + timespanfiltertype=0, + visibleflag=0, + objecttemplateids = new List + { + "ob" + }, + objecttype=0, + showtype="s", + fuzzymodelversion = new List + { + "fu" + }, + + saveas=true, + migrate=true, + }; + + var str = JsonConvert.SerializeObject(ss); + using var content = new StringContent(str, Encoding.UTF8, "application/json"); + + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(ModataQuery)} error {result.message}"); + } + #region 不等待执行 + + //public static string ModataQueryNoAwait(this ZTEClient client, ModataQueryArg arg) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/currentarea/v1/modataquery"; + // var str = JsonConvert.SerializeObject(arg); + // //Console.WriteLine(str); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // //Logger.LogInit(); + // //Logger.Info($"GetLicense responseMessage{responseMessage.StatusCode}"); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return resultStr; + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(ModataQuery)} error {result.message}"); + //} + //public static MoQueryResultBase ModataQueryNoAwait(this ZTEClient client, netype netype, IList neList = null) + //{ + // string queryName = typeof(T).Name.Replace("MoQueryResult", string.Empty); + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { queryName }, + // NeList = neList + // }; + // string content = client.ModataQueryNoAwait(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + #endregion + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/MoHandleExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/MoHandleExtension.cs new file mode 100644 index 00000000..26457750 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/MoHandleExtension.cs @@ -0,0 +1,167 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.MoHandle; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + /// + /// Mo编辑扩展方法类 + /// + public static class MoHandleExtension + { + /// + /// 失败,moGet无法获取所有小区 + /// + /// + /// + /// + /// + public static async Task MoGetTest(this ZTEClient client, netype netype, MocGetArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/mohandle/v1/ManagedElementType/{netype.ToString()}/SubNetwork/moget"; + var str = JsonConvert.SerializeObject(arg); + Console.WriteLine(str); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return resultStr; + //return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(MoGet)} error {result.message}"); + } + public static async Task MoGet(this ZTEClient client, netype netype, string subnetid, string neid, MocGetArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/mohandle/v1/ManagedElementType/{netype.ToString()}/SubNetwork" + + $"/{subnetid}/ManagedElement/{neid}/moget"; + var str = JsonConvert.SerializeObject(arg); + //Console.WriteLine(str); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return resultStr; + //return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(MoGet)} error {result.message}"); + } + public static async Task MoConfig(this ZTEClient client, string dataAreaId, string request) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/moconfig"; + // Console.WriteLine(request); + var content = new StringContent(request, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + ///Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + } + public static async Task MoConfigRelated(this ZTEClient client, string dataAreaId, string request) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/moconfigrelated"; + // Console.WriteLine(request); + var content = new StringContent(request, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + ///Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + } + public static async Task MoConfigcmtaskmng(this ZTEClient client, string dataAreaId, string request) + { + //https://{serverIP}:{port}/api/cmtaskmng/v1/task/exportFile?fileName={fileName} + string url = $"https://{client.IpAddr}:{client.Port}/api/tpdatahandle/v1/{dataAreaId}/BT/dataExport"; + var content = new StringContent(request, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + //using var responseMessage = await client.GetAsync(url); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + //if (responseMessage.StatusCode == HttpStatusCode.OK) + //{ + // return JsonConvert.DeserializeObject>(resultStr); + //} + //// Console.WriteLine(request); + + //var resultStr = await responseMessage.Content.ReadAsStringAsync(); + ///Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + } + + //public static async Task MoConfigRelated(this ZTEClient client, string dataAreaId, string request) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/moconfigrelated"; + // //Console.WriteLine(request); + // var content = new StringContent(request, Encoding.UTF8, "application/json"); + // using var responseMessage = await client.PostAsync(url, content); + // var resultStr = await responseMessage.Content.ReadAsStringAsync(); + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + //} + #region 不等待执行 + + //public static MoConfigResult MoConfigNoAwait(this ZTEClient client, string dataAreaId, string request) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/moconfig"; + // Console.WriteLine(request); + // var content = new StringContent(request, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // Console.WriteLine($"***:{resultStr}\n"); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + //} + //public static MoConfigRelatedResult MoConfigRelatedNoAwait(this ZTEClient client, string dataAreaId, string request) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/moconfigrelated"; + // Console.WriteLine(request); + // var content = new StringContent(request, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // ///Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(MoConfig)} error {result.message}"); + //} + + #endregion + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/NEExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/NEExtension.cs new file mode 100644 index 00000000..f2718ddd --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/NEExtension.cs @@ -0,0 +1,58 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.NetworkElement; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + /// + /// 网元扩展方法类 + /// + public static class NEExtension + { + public static async Task> Mes(this ZTEClient client) + { + //string url = $"https://{client.IpAddr}:{client.Port}/api/res/v1/mes"; + string url = $"https://{client.IpAddr}:{client.Port}/api/rantopo/v1/ranmes"; + using var responseMessage = await client.GetAsync(url); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject>(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(Mes)} error {result.message}"); + } + public static async Task> Subnetworks(this ZTEClient client)//SubnetworksResultObject + { + string url = $"https://{client.IpAddr}:{client.Port}/api/res/v1/subnetworks"; + using var responseMessage = await client.GetAsync(url); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject>(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(Subnetworks)} error {result.message}"); + } + public static async Task> Tree(this ZTEClient client, netype netype)//SubnetworksResultObject + { + string url = $"https://{client.IpAddr}:{client.Port}/api/res/v1/tree/?dataType=tree&includeMocs={netype}"; + using var responseMessage = await client.GetAsync(url); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject>(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(Tree)} error {result.message}"); + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/PlannedAreaExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/PlannedAreaExtension.cs new file mode 100644 index 00000000..8f54de53 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/PlannedAreaExtension.cs @@ -0,0 +1,337 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + public class CreatePlanned + { + public int authority { get; set; } + public string userLabel { get; set; } + } + + public class ClosePlanned + { + public bool directClose { get; set; } = false; + } + + /// + /// 规划区扩展方法类 + /// + public static class PlannedAreaExtension + { + public static async Task CreatePlannedArea(this ZTEClient client, string dataAreaId, string userLabel, Authority authority = Authority.Private) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/new"; + //https://{serverIP}:{port}/api/plannedmng/v1/{dataAreaId}/new + var data = new CreatePlanned + { + authority = (int)authority, + userLabel = userLabel + }; + var str = JsonConvert.SerializeObject(data); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + var result1 = JsonConvert.DeserializeObject(resultStr); + if (result1.code == 900) + { + + } + return; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(CreatePlannedArea)} error {result.message}"); + } + public static async Task OpenPlannedArea(this ZTEClient client, string dataAreaId) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/open"; + using var responseMessage = await client.PostAsync(url, null); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(OpenPlannedArea)} error {result.message}"); + } + public static async Task OpenPlannedAreaResult(this ZTEClient client, string dataAreaId) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/open"; + using var responseMessage = await client.PostAsync(url, null); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(resultStr); + return result.code; + } + public static async Task ClosePlannedAreaResult(this ZTEClient client, string dataAreaId) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/close"; + + var request = new ClosePlanned + { + directClose = true + }; + var str = JsonConvert.SerializeObject(request); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + + var result = JsonConvert.DeserializeObject(resultStr); + return result.code; + } + /// + /// 强制关闭规划区 + /// + /// + /// + /// + private static async Task ClosePlannedArea(this ZTEClient client, string dataAreaId) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/close"; + + var request = new ClosePlanned + { + directClose = true + }; + + var str = JsonConvert.SerializeObject(request); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(ClosePlannedArea)} error {result.message}"); + } + + /// + /// 强制关闭和删除规划区,并且不抛出异常 + /// + /// + /// + /// + public static async Task DestroyPlannedAreaNoThrow(this ZTEClient client, string dataAreaId) + { + try + { + await ClosePlannedAreaResult(client, dataAreaId); + + await DestroyPlannedArea(client, dataAreaId); + } + catch (Exception) { } + } + /// + /// 强制关闭和删除规划区 + /// + /// + /// + /// + private static async Task DestroyPlannedArea(this ZTEClient client, string dataAreaId) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/destroy"; + var request = new ClosePlanned + { + directClose = true + }; + var str = JsonConvert.SerializeObject(request); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine($"DestroyPlannedArea:{resultStr}"); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(DestroyPlannedArea)} error {result.message}"); + } + public static async Task Validation(this ZTEClient client, string dataAreaId, ValidationArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/validation"; + + var str = JsonConvert.SerializeObject(arg); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject(resultStr); + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(Validation)} error {result.message}"); + } + + public static async Task PlannedareaActivate(this ZTEClient client, string dataAreaId, PlannedareaActivateArg arg) + { + string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/activate"; + + var str = JsonConvert.SerializeObject(arg); + var content = new StringContent(str, Encoding.UTF8, "application/json"); + using var responseMessage = await client.PostAsync(url, content); + var resultStr = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine(resultStr); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + var resultTask = JsonConvert.DeserializeObject(resultStr); + Console.WriteLine(resultTask); + return resultTask; + } + var result = JsonConvert.DeserializeObject(resultStr); + throw new InvalidOperationException($"{nameof(PlannedareaActivate)} error {result.message}"); + } + + + #region 不等待执行 + //public static void CreatePlannedAreaNoAwait(this ZTEClient client, string dataAreaId, string userLabel, Authority authority = Authority.Private) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/new"; + // //https://{serverIP}:{port}/api/plannedmng/v1/{dataAreaId}/new + // var data = new CreatePlanned + // { + // authority = (int)authority, + // userLabel = userLabel + // }; + // var str = JsonConvert.SerializeObject(data); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return; + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(CreatePlannedArea)} error {result.message}"); + //} + //public static void OpenPlannedAreaNoAwait(this ZTEClient client, string dataAreaId) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/open"; + // using var responseMessage = client.NoAwaitPostAsync(url, null); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return; + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(OpenPlannedArea)} error {result.message}"); + //} + ///// + ///// 强制关闭规划区 + ///// + ///// + ///// + ///// + //private static void ClosePlannedAreaNoAwait(this ZTEClient client, string dataAreaId) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/close"; + + // var request = new ClosePlanned + // { + // directClose = true + // }; + + // var str = JsonConvert.SerializeObject(request); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return; + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(ClosePlannedArea)} error {result.message}"); + //} + + ///// + ///// 强制关闭和删除规划区,并且不抛出异常 + ///// + ///// + ///// + ///// + //public static async void DestroyPlannedAreaNoThrowNoAwait(this ZTEClient client, string dataAreaId) + //{ + // try + // { + // await DestroyPlannedArea(client, dataAreaId); + // } + // catch (Exception) { } + //} + ///// + ///// 强制关闭和删除规划区 + ///// + ///// + ///// + ///// + //private static void DestroyPlannedAreaNoAwait(this ZTEClient client, string dataAreaId) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedmng/v1/{dataAreaId}/destroy"; + // var request = new ClosePlanned + // { + // directClose = true + // }; + // var str = JsonConvert.SerializeObject(request); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // Console.WriteLine($"DestroyPlannedAreaNoAwait:{resultStr}"); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return; + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(DestroyPlannedArea)} error {result.message}"); + //} + //public static GetResultTask ValidationNoAwait(this ZTEClient client, string dataAreaId, ValidationArg arg) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/validation"; + + // var str = JsonConvert.SerializeObject(arg); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // //Console.WriteLine(resultStr); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(Validation)} error {result.message}"); + //} + + //public static GetResultTask PlannedareaActivateNoAwait(this ZTEClient client, string dataAreaId, PlannedareaActivateArg arg) + //{ + // string url = $"https://{client.IpAddr}:{client.Port}/api/plannedarea/v1/{dataAreaId}/activate"; + + // var str = JsonConvert.SerializeObject(arg); + // var content = new StringContent(str, Encoding.UTF8, "application/json"); + // using var responseMessage = client.NoAwaitPostAsync(url, content); + // var resultStr = responseMessage.Content.ReadAsStringAsync().Result; + // Console.WriteLine($"***{resultStr}\n"); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return JsonConvert.DeserializeObject(resultStr); + // } + // var result = JsonConvert.DeserializeObject(resultStr); + // throw new InvalidOperationException($"{nameof(PlannedareaActivate)} error {result.message}"); + //} + + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/ReportConfigNRExtension.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/ReportConfigNRExtension.cs new file mode 100644 index 00000000..3d82cf88 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Management/ReportConfigNRExtension.cs @@ -0,0 +1,82 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management +{ + public static class ReportConfigNRExtension + { + //public static async Task> QueryNRFreq(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "NRFreq" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + //public static async Task> QueryGNBCUCPFunction(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "GNBCUCPFunction" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + //public static async Task> QueryFrequencyBandList(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "FrequencyBandList" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + //public static async Task> QueryNRFreqRelation(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "NRFreqRelation" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + //public static async Task> QueryNRInterFMeasConfig(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "NRInterFMeasConfig" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + + //public static async Task> QueryNRInterFCovHo(this ZTEClient client, netype netype, IList neList = null) + //{ + // var queryArg = new ModataQueryArg + // { + // ManagedElementType = netype, + // MocList = new List { "NRInterFCovHo" }, + // NeList = neList + // }; + // string content = await client.ModataQuery(queryArg); + // return JsonConvert.DeserializeObject>(content); + //} + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/MoConfigTask.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/MoConfigTask.cs new file mode 100644 index 00000000..cdda40e9 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/MoConfigTask.cs @@ -0,0 +1,70 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage +{ + public class MoConfigTask + { + public int Progress { get; set; } + public bool Complete { get; set; } = false; + public async Task Run(ZTEClient client, string areaId, IList moConfigArgs, netype netype, string ne) + { + try + { + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype, + ne = ne, + moData = moConfigArgs + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype, + ne = ne + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype, + ne = ne + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + Progress = taskResult[0].progress; + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + Progress = taskResult[0].progress; + } + finally + { + Complete = true; + } + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/AttrFilter.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/AttrFilter.cs new file mode 100644 index 00000000..ca27e138 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/AttrFilter.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class AttrFilter + { + public string moc { get; set; } + public List attrNames { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Carrier/CarrierUL.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Carrier/CarrierUL.cs new file mode 100644 index 00000000..a5d6cfd1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Carrier/CarrierUL.cs @@ -0,0 +1,719 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Carrier +{ + public class CarrierUL + { + [JsonProperty("nrbandwidth")] + public string nrbandwidth { get; set; } + + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + + [JsonProperty("endFreqPointWithForbid")] + public string endFreqPointWithForbid { get; set; } + + [JsonProperty("mocName")] + public string mocName { get; set; } + + [JsonProperty("endFreqPointWithForbidFreq")] + public string endFreqPointWithForbidFreq { get; set; } + + [JsonProperty("moId")] + public string moId { get; set; } + + [JsonProperty("pointAfrequencyUL")] + public string pointAfrequencyUL { get; set; } + + [JsonProperty("frequency")] + public string frequency { get; set; } + + [JsonProperty("startFreqPointWithForbidFreq")] + public string startFreqPointWithForbidFreq { get; set; } + + [JsonProperty("frequencyBandList")] + public string frequencyBandList { get; set; } + + [JsonProperty("ldn")] + public string ldn { get; set; } + + + [JsonProperty("startFreqPointWithForbid")] + public string startFreqPointWithForbid { get; set; } + + [JsonProperty("ulTimePhaseOffset")] + public string ulTimePhaseOffset { get; set; } + + } + + public class ModataQueryCarrierULResultArg + { + [JsonProperty("moData")] + public List MoData { get; set; } + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("ne")] + public string Ne { get; set; } + } + public class ModataQueryCarrierULResult + { + [JsonProperty("code")] + public int Code { get; set; } + + [JsonProperty("message")] + public string Message { get; set; } + + [JsonProperty("result")] + public List Result { get; set; } + } + + public class CarrierDL + { + [JsonProperty("nrbandwidth")] + public string nrbandwidth { get; set; } + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + [JsonProperty("endFreqPointWithForbid")] + public string endFreqPointWithForbid { get; set; } + [JsonProperty("mocName")] + public string mocName { get; set; } + [JsonProperty("endFreqPointWithForbidFreq")] + public string endFreqPointWithForbidFreq { get; set; } + [JsonProperty("operatorDefined")] + public string operatorDefined { get; set; } + [JsonProperty("moId")] + public string moId { get; set; } + [JsonProperty("pointAfrequencyDL")] + public string pointAfrequencyDL { get; set; } + [JsonProperty("frequency")] + public string frequency { get; set; } + [JsonProperty("startFreqPointWithForbidFreq")] + public string startFreqPointWithForbidFreq { get; set; } + [JsonProperty("frequencyBandList")] + public string frequencyBandList { get; set; } + [JsonProperty("ldn")] + public string ldn { get; set; } + [JsonProperty("startFreqPointWithForbid")] + public string startFreqPointWithForbid { get; set; } + } + + public class ModataQueryCarrierDLResultArg + { + [JsonProperty("moData")] + public List MoData { get; set; } + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("ne")] + public string Ne { get; set; } + } + public class ModataQueryCarrierDLResult + { + [JsonProperty("code")] + public int Code { get; set; } + + [JsonProperty("message")] + public string Message { get; set; } + + [JsonProperty("result")] + public List Result { get; set; } + } + + public class PhyResourceConfigforBWPUL + { + [JsonProperty("userLabel")] + public string userLabel { get; set; } + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + [JsonProperty("mocName")] + public string mocName { get; set; } + [JsonProperty("ldn")] + public string ldn { get; set; } + [JsonProperty("bwpId")] + public string bwpId { get; set; } + [JsonProperty("moId")] + public string moId { get; set; } + [JsonProperty("refBWP")] + public string refBWP { get; set; } + } + public class PhyResourceConfigforBWPDL + { + [JsonProperty("userLabel")] + public string userLabel { get; set; } + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + [JsonProperty("mocName")] + public string mocName { get; set; } + [JsonProperty("ldn")] + public string ldn { get; set; } + [JsonProperty("bwpId")] + public string bwpId { get; set; } + [JsonProperty("moId")] + public string moId { get; set; } + [JsonProperty("refBWP")] + public string refBWP { get; set; } + } + + public class SCSSpecificCarrierListUL + { + [JsonProperty("carrierBandwidth")] + public string carrierBandwidth { get; set; } + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + [JsonProperty("mocName")] + public string mocName { get; set; } + [JsonProperty("offsetToCarrier")] + public string offsetToCarrier { get; set; } + [JsonProperty("ldn")] + public string ldn { get; set; } + [JsonProperty("moId")] + public string moId { get; set; } + [JsonProperty("subcarrierSpacing")] + public string subcarrierSpacing { get; set; } + } + public class SCSSpecificCarrierListDL + { + [JsonProperty("carrierBandwidth")] + public string carrierBandwidth { get; set; } + [JsonProperty("lastModifiedTime")] + public string lastModifiedTime { get; set; } + [JsonProperty("mocName")] + public string mocName { get; set; } + [JsonProperty("offsetToCarrier")] + public string offsetToCarrier { get; set; } + [JsonProperty("ldn")] + public string ldn { get; set; } + [JsonProperty("moId")] + public string moId { get; set; } + [JsonProperty("subcarrierSpacing")] + public string subcarrierSpacing { get; set; } + } + + public class PUCCHConfig + { + public string intraslotFrequencyHopping { get; set; } + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string longPUCCHorShortPUCCH { get; set; } + public string rsrpReportEnable { get; set; } + public string dlDataToULACK { get; set; } + public string cqiReportEnable { get; set; } + public string moId { get; set; } + public string pmiReportEnable { get; set; } + public string anResNumPerSet { get; set; } + public string maxPayloadMinus1 { get; set; } + public string lowOrHighWithoutFH { get; set; } + public string pucchPRBstart { get; set; } + public string ldn { get; set; } + public string dlDataToUlAckForAirLine { get; set; } + public string extraANResRBRatio { get; set; } + public string longScale { get; set; } + } + public class SRResource + { + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string startSym4SR { get; set; } + public string srfmt { get; set; } + public string deltaCHfmt { get; set; } + public string moId { get; set; } + public string scene { get; set; } + public string tranPeriod4SR { get; set; } + public string srTrCHNumScale { get; set; } + public string rb4SR { get; set; } + public string sym4SR { get; set; } + public string ANCHNumfmt { get; set; } + public string ldn { get; set; } + public string trCHNum4SR { get; set; } + } + + public class CSIReportResource + { + public string rbNum4PerCSI { get; set; } + public string lastModifiedTime { get; set; } + public string userPeriod4CSI { get; set; } + public string mocName { get; set; } + public string trPeriod4CSI { get; set; } + public string rsrpReportEnable { get; set; } + public string rbNum4CSI { get; set; } + public string cqiReportEnable { get; set; } + public string moId { get; set; } + public string pmiReportEnable { get; set; } + public string cSIfmt { get; set; } + public string scene { get; set; } + public string startSym4CSI { get; set; } + public string symNum4PerCSI { get; set; } + public string ldn { get; set; } + public string rsrpReportPeriod { get; set; } + public string pmiReportPeriod { get; set; } + public string cqiReportPeriod { get; set; } + } + public class ANResource + { + public string RBforLANF2 { get; set; } + public string RBforLANF3 { get; set; } + public string lastModifiedTime { get; set; } + public string rb4SPSAN { get; set; } + public string mocName { get; set; } + public string startSym4ShortAN { get; set; } + public string RBforLANF0 { get; set; } + public string RBforLANF1 { get; set; } + public string symNum4PerSPSAN { get; set; } + public string anFmt { get; set; } + public string deltaCHfmt { get; set; } + public string RbNum4AN { get; set; } + public string moId { get; set; } + public string fmt4RBocc2scale { get; set; } + public string scene { get; set; } + public string RbNum4PerAN { get; set; } + public string startSym4SPSAN { get; set; } + public string usageAN { get; set; } + public string startSym4AN { get; set; } + public string symNum4ShortAN { get; set; } + public string ldn { get; set; } + public string longScale { get; set; } + public string symNum4PerAN { get; set; } + public string spsANfmt { get; set; } + } + public class SRResCfg + { + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string startSym4SR { get; set; } + public string srfmt { get; set; } + public string deltaCHfmt { get; set; } + public string moId { get; set; } + public string scene { get; set; } + + public string tranPeriod4SR { get; set; } + + public string srTrCHNumScale { get; set; } + + public string rb4SR { get; set; } + + public string sym4SR { get; set; } + public string ANCHNumfmt { get; set; } + public string ldn { get; set; } + public string trCHNum4SR { get; set; } + } + + public class CSIRptResCfg + { + public string rbNum4PerCSI { get; set; } + public string lastModifiedTime { get; set; } + public string userPeriod4CSI { get; set; } + public string mocName { get; set; } + public string trPeriod4CSI { get; set; } + public string rbNum4CSI { get; set; } + public string moId { get; set; } + public string scene { get; set; } + public string cSIfmt { get; set; } + public string startSym4CSI { get; set; } + public string ldn { get; set; } + public string symNum4PerCSI { get; set; } + public string rsrpReportPeriod { get; set; } + public string pmiReportPeriod { get; set; } + public string cqiReportPeriod { get; set; } + + } + + public class ANResCfg + { + public string Rb4AN { get; set; } + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string deltaCHfmt { get; set; } + public string moId { get; set; } + public string anckFmt { get; set; } + public string fmt4RBocc2scale { get; set; } + public string scene { get; set; } + public string RbNum4PerAN { get; set; } + public string usageAN { get; set; } + public string startSym4AN { get; set; } + public string ldn { get; set; } + public string symNum4PerAN { get; set; } + } + + + public class SRSConfig + { + public string freqDomainShift4APSRS { get; set; } + public string tpcAccumulation { get; set; } + public string bhop { get; set; } + public string symsOfComb { get; set; } + public string srsNormalPeriod { get; set; } + public string srsMulSymPeriod { get; set; } + + + public string cSRSNarrowRB { get; set; } + public string SRSSymbolLength { get; set; } + public string bSRS { get; set; } + public string srsResRatio4eachPeriod { get; set; } + public string mocName { get; set; } + public string srsMulSymSwitchperComb { get; set; } + public string srsTrp { get; set; } + public string wideRbSymbNum { get; set; } + public string antennaSwitchingSRSPortNum { get; set; } + public string srsResRatio4APSRS { get; set; } + public string period4APSRS { get; set; } + public string srsPosSymNumPerResource { get; set; } + public string period4MulSymAPSRS { get; set; } + public string srsPosSymNumInSRSTrp { get; set; } + public string wideMulSymRbSymbNum { get; set; } + public string srsWideResRatio4eachPeriod { get; set; } + public string cSRS4APSRS { get; set; } + public string srsPosPCImodValue { get; set; } + public string mulSymSRSResRationinMulSymComb { get; set; } + public string freqDomainShift { get; set; } + public string SRSSlot { get; set; } + public string reservedSymResNumForSRSPos { get; set; } + public string srsPeriod4eachComb { get; set; } + public string cSRS { get; set; } + public string p0 { get; set; } + public string lastModifiedTime { get; set; } + public string srsPowerControlAdjustmentStates { get; set; } + + + public string srsNormalResource { get; set; } + public string srsMulSymResource { get; set; } + public string apSRSResRationinMulSymComb { get; set; } + public string bSRS4APSRS { get; set; } + public string SRSStartSymbol { get; set; } + public string combCountOfSRS { get; set; } + public string alpha { get; set; } + + + public string narrowRbSymbNum { get; set; } + public string narrowMulSymRbSymbNum { get; set; } + public string srsRecfgSwitch { get; set; } + public string portNum { get; set; } + public string combRepetitionType { get; set; } + public string srsTxTurnSwitch { get; set; } + public string groupOrSequenceHopping { get; set; } + public string wideRbInitBw { get; set; } + public string srsPeriod { get; set; } + public string moId { get; set; } + public string codeCountOfSRS { get; set; } + public string narrowRbInitBw { get; set; } + public string srsAdaptionSwitch { get; set; } + public string srsCodeMultiplex4UESwitch { get; set; } + public string period4MulSymSRS { get; set; } + public string ldn { get; set; } + public string srsMulSymTrp { get; set; } + + public string cSRSWideRB { get; set; } + public string srsPosPeriod { get; set; } + } + + public class CSIIMCfg + { + public string csiIMEnable { get; set; } + public string lastModifiedTime { get; set; } + public string csiIMRbNum { get; set; } + public string mocName { get; set; } + public string csiIMSlotOffset { get; set; } + public string ldn { get; set; } + public string csiIMRbStart { get; set; } + public string moId { get; set; } + } + public class CQIMeasureCfg + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string rbParity { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string reportQuantity { get; set; } + public string pCSIRSscale { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string powerControlOffsetSS { get; set; } + public string slotOffset { get; set; } + } + public class TrackingRsCfg + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string pCSIRSscale { get; set; } + public string csiRsRbNum { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string powerControlOffsetSS { get; set; } + public string slotOffset { get; set; } + } + public class TrackingRsCfg2 + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string pCSIRSscale { get; set; } + public string csiRsRbNum { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string powerControlOffsetSS { get; set; } + public string slotOffset { get; set; } + } + + + public class PmiMeasureCfg + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string rbParity { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string reportQuantity { get; set; } + public string pCSIRSscale { get; set; } + public string codebookTypeIN1N2 { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string firstOFDMSymbolInTimeDomain2 { get; set; } + public string powerControlOffsetSS { get; set; } + public string slotOffset { get; set; } + } + + public class ZPMeasureConfig + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string csiRsFreBitMap { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsRbStart { get; set; } + public string firstOFDMSymbolInTimeDomain2 { get; set; } + public string slotOffset { get; set; } + } + + public class AperiodicPmiMeasureCfg + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string density { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string moId { get; set; } + public string reportQuantity { get; set; } + public string pCSIRSscale { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string firstOFDMSymbolInTimeDomain2 { get; set; } + public string powerControlOffsetSS { get; set; } + } + + public class AperiodicZPMeasureCfg + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string density { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string csiRsFreBitMap { get; set; } + public string moId { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsRbStart { get; set; } + public string firstOFDMSymbolInTimeDomain2 { get; set; } + } + + public class RSRPMeasureConfig + { + public string resStartId { get; set; } + public string lastModifiedTime { get; set; } + public string csiResourceNum { get; set; } + public string ssbEnable { get; set; } + public string firstOFDMSymbolInTimeDomain { get; set; } + public string mocName { get; set; } + public string rbParity { get; set; } + public string csiRsFreBitMap { get; set; } + public string csirsPortAntMap { get; set; } + public string repetition { get; set; } + public string moId { get; set; } + public string csiRsPeriod { get; set; } + public string reportQuantity { get; set; } + public string pCSIRSscale { get; set; } + public string csiRsRbNum { get; set; } + public string csiRow { get; set; } + public string ldn { get; set; } + public string csiRsEnable { get; set; } + public string csiRsBeamBitMap { get; set; } + public string csiRsRbStart { get; set; } + public string powerControlOffsetSS { get; set; } + public string slotOffset { get; set; } + } + + public class PDCCHConfig + { + public string pdcchTmMod { get; set; } + public string frequencyDomainResources { get; set; } + + public string lastModifiedTime { get; set; } + public string dLPreemptionSwitch { get; set; } + public string mocName { get; set; } + public string pdcchSymbAdaptForOtherScs { get; set; } + public string pdcchSymbAdaptNumForOtherScs { get; set; } + public string ldn { get; set; } + public string cceAdaptMod { get; set; } + public string moId { get; set; } + public string regBundleMaxFlowNum { get; set; } + } + + public class SearchSpace + { + public string lastModifiedTime { get; set; } + public string controlResourceSetId { get; set; } + public string sl16 { get; set; } + public string sl10 { get; set; } + public string sl2560 { get; set; } + public string monitoringSymbolsWithinSlot { get; set; } + public string common { get; set; } + public string nrofCandidatesAggregationLevel4 { get; set; } + public string nrofCandidatesAggregationLevel2 { get; set; } + public string nrofCandidatesAggregationLevel1 { get; set; } + public string nrofCandidatesAggregationLevel16 { get; set; } + public string nrofCandidatesAggregationLevel8 { get; set; } + public string sl40 { get; set; } + public string sl20 { get; set; } + public string sl80 { get; set; } + public string mocName { get; set; } + public string ueSpecific { get; set; } + public string moId { get; set; } + public string searchSpaceTypeList { get; set; } + public string searchSpaceId { get; set; } + public string monitoringSlotPeriodicityAndOffset { get; set; } + public string sl160 { get; set; } + public string sl1280 { get; set; } + public string ldn { get; set; } + public string sl2 { get; set; } + public string sl1 { get; set; } + public string sl4 { get; set; } + public string sl5 { get; set; } + public string sl8 { get; set; } + public string sl320 { get; set; } + public string sl640 { get; set; } + } + public class ControlResourceSet + { + public string duration { get; set; } + public string frequencyDomainResources { get; set; } + public string cceRegMappingType { get; set; } + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string controlResourceSetId { get; set; } + public string regBundleSize { get; set; } + public string interleavedSize { get; set; } + public string shiftIndex { get; set; } + public string moId { get; set; } + public string precoderGranularity { get; set; } + } + public class CarrierAdmission + { + public string lastModifiedTime { get; set; } + public string mocName { get; set; } + public string nr5QI2NumAcThrd { get; set; } + public string highPriPrbResRatio { get; set; } + public string moId { get; set; } + public string nr5QI1NumAcThrd { get; set; } + public string maxPreemptDrbNum { get; set; } + public string prbBasedGBRACSwch { get; set; } + public string prbBasedGBRACThrd { get; set; } + public string ldn { get; set; } + public string prbBasedACPreemptSwch { get; set; } + public string prbBasedNGBRACSwch { get; set; } + public string callAcSwitch { get; set; } + } + + public class NRSectorCarrier + { + public string userLabel { get; set; } + public string lastModifiedTime { get; set; } + public string rfAppMode { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string refSectorFunction { get; set; } + public string refBpPoolFunction { get; set; } + public string txDirection { get; set; } + public string configuredMaxTxPower { get; set; } + public string antType8T { get; set; } + public string moId { get; set; } + [JsonProperty("maximumTransmissionPower")] + public string maximumTransmissionPower { get; set; } + } + public class Result + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class Root + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellMobileStandard.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellMobileStandard.cs new file mode 100644 index 00000000..ccda2fd9 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellMobileStandard.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public enum CellMobileStandard + { + /// + /// 1G FDMA + /// + NMT = 1000, + /// + /// 2G TDMA and FDMA + /// + GSM = 2000, + /// + /// 2G CDMA one + /// + IS_95 = 2001, + /// + /// 2G CDMA 2000 + /// + IS_2000 = 2002, + /// + /// 3GSM + /// + UMTS = 3000, + /// + /// 4G + /// + LTE = 4000, + /// + /// 4G FDDLTE + /// + FDDLTE = 4011, + /// + /// 4G TDDLTE + /// + TDDLTE = 4012, + /// + /// 5G + /// + NR = 5000 + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellModel.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellModel.cs new file mode 100644 index 00000000..003f3b04 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/CellModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class CellModel + { + public string Name { get; set; } + public string ZTEpLMNId { get; set; } + public string ZTEgNBId { get; set; } + public string ZTESubNetwork { get; set; } + /// + /// 中心频点 + /// + public string ssbFrequency { get; set; } + /// + /// 移动制式 + /// + public CellMobileStandard MobileStandard { get; set; } + public string ZTEManagedElement { get; set; } + public string LocalId { get; set; } + public string MoId { get; set; } + public string GetZTENElement() => $"SubNetwork={ZTESubNetwork},ManagedElement={ZTEManagedElement}"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoConfigArgExternalEUtranCellFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoConfigArgExternalEUtranCellFDDLTE.cs new file mode 100644 index 00000000..9c2c455b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoConfigArgExternalEUtranCellFDDLTE.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoConfigArgExternalEUtranCellFDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "ExternalEUtranCellFDDLTE"; + public string eNBId { get; set; } + public string cellLocalId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + + } + public class MoConfigArgExternalEUtranCellTDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "ExternalEUtranCellTDDLTE"; + public string eNBId { get; set; } + public string cellLocalId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + + } + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultCarrierUL.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultCarrierUL.cs new file mode 100644 index 00000000..f4182cad --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultCarrierUL.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoQueryResultCarrierUL + { + public string nrbandwidth { get; set; } + public DateTime lastModifiedTime { get; set; } + public string endFreqPointWithForbid { get; set; } + public string mocName { get; set; } + public string bandwidth { get; set; } + public string endFreqPointWithForbidFreq { get; set; } + public string moId { get; set; } + public string frequency { get; set; } + public string startFreqPointWithForbidFreq { get; set; } + public int frequencyBandList { get; set; } + public string ldn { get; set; } + public string startFreqPointWithForbid { get; set; } + public string ulTimePhaseOffset { get; set; } + public double pointAfrequencyUL { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultExternalNrCellLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultExternalNrCellLTE.cs new file mode 100644 index 00000000..f8036e4e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultExternalNrCellLTE.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoQueryResultExternalNrCellLTE + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string mcc { get; set; } + public string gNodeBId { get; set; } + public string nrPointA { get; set; } + public string bandWidthNrSCS { get; set; } + public string centerFreq { get; set; } + public string bandWidthNrNRB { get; set; } + public string supportEnDc { get; set; } + public string pci { get; set; } + public string addiFreqBandInd { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string enDcCfgTAC { get; set; } + public string reserve1 { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string sSBSCS { get; set; } + public string algNRTDDRsved1 { get; set; } + public string ldn { get; set; } + public string mcclist { get; set; } + public string fiveGSTAC { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class NrNiborRelaFDDLTE + { + public string userLabel { get; set; } + public string swchNoRemove { get; set; } + public string interSysHoDirFwdSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string cooperType { get; set; } + public string mocName { get; set; } + public string nrRATShareCover { get; set; } + public string algNRNBRRsved1 { get; set; } + public string reserve1 { get; set; } + public string refExternalNrCellLTE { get; set; } + public string swchNoHO { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string refExternalNrCellFDDLTE { get; set; } + public string isSpecShareCell { get; set; } + public string voiceMobilitySwch { get; set; } + public string swchNoENDC { get; set; } + public string whiteListNbrInd { get; set; } + public string ldn { get; set; } + public string highSpeedRailCellInd { get; set; } + } + public class NrNiborRelaTDDLTE + { + public string userLabel { get; set; } + public string swchNoRemove { get; set; } + public string interSysHoDirFwdSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string cooperType { get; set; } + public string mocName { get; set; } + public string nrRATShareCover { get; set; } + public string algNRNBRRsved1 { get; set; } + public string reserve1 { get; set; } + public string refExternalNrCellLTE { get; set; } + public string swchNoHO { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string refExternalNrCellFDDLTE { get; set; } + public string isSpecShareCell { get; set; } + public string voiceMobilitySwch { get; set; } + public string swchNoENDC { get; set; } + public string whiteListNbrInd { get; set; } + public string ldn { get; set; } + public string highSpeedRailCellInd { get; set; } + } + public class NrNiborRelaFDDLTEResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class NrNiborRelaFDDLTERoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCarrier.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCarrier.cs new file mode 100644 index 00000000..a88a01ad --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCarrier.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoQueryResultNRCarrier + { + public string userLabel { get; set; } + public string nrCarrierType { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string qcellPositionEnable { get; set; } + public string refNRSectorCarrier { get; set; } + public string moId { get; set; } + public string cpriCompressionMode { get; set; } + public string prruPollTime { get; set; } + public string prruPollPeriodFactor { get; set; } + public string superCarrierId { get; set; } + public string supercellBackupArea1 { get; set; } + public string ldn { get; set; } + public string adminState { get; set; } + public string NRCarrierId { get; set; } + public string bpSharingSwitch { get; set; } + public string supercellFlag { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellCU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellCU.cs new file mode 100644 index 00000000..2ab6656e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellCU.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoQueryResultNRCellCU + { + public string reserved65 { get; set; } + public string reserved64 { get; set; } + public string reserved63 { get; set; } + public string reserved62 { get; set; } + public string reserved61 { get; set; } + public string cellLocalId { get; set; } + public string azimuth { get; set; } + public string reserved69 { get; set; } + public string reserved68 { get; set; } + public string reserved67 { get; set; } + public string reserved66 { get; set; } + public string pciReuseDistance { get; set; } + public string superCarrierId { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string longitude { get; set; } + public string masterOperatorId { get; set; } + public string reserved98 { get; set; } + public string mocName { get; set; } + public string reserved99 { get; set; } + public string sonModifyPciSwitch { get; set; } + public string cityLabel { get; set; } + public string operState { get; set; } + public string NRCarrierId { get; set; } + public string userLabel { get; set; } + public string duMeMoId { get; set; } + public DateTime lastModifiedTime { get; set; } + public string latitude { get; set; } + public string reserved80 { get; set; } + public string pciSectionID { get; set; } + public string reserved100 { get; set; } + public string cellState { get; set; } + public string nsaState { get; set; } + public string plmnIdList { get; set; } + public string operatorPriority { get; set; } + public string serviceStatus { get; set; } + public string adminState { get; set; } + public string saState { get; set; } + public string reserved76 { get; set; } + public string testState { get; set; } + public string reserved75 { get; set; } + public string reserved74 { get; set; } + public string reserved73 { get; set; } + public string reserved72 { get; set; } + public string reserved71 { get; set; } + public string reserved70 { get; set; } + public string reserved79 { get; set; } + public string moId { get; set; } + public string pciReuseLayers { get; set; } + public string reserved78 { get; set; } + public string reserved77 { get; set; } + public string coverageType { get; set; } + public string ldn { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellDU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellDU.cs new file mode 100644 index 00000000..aeed5f2a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cell/MoQueryResultNRCellDU.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell +{ + public class MoQueryResultNRCellDU + { + public string reserved21 { get; set; } + public string ulDemMethod { get; set; } + public string reserved20 { get; set; } + public string nrCellScene { get; set; } + public string netSharePLMNW { get; set; } + public string cellLocalId { get; set; } + public string reserved29 { get; set; } + public string reserved28 { get; set; } + public string epsTacSwch { get; set; } + public string reserved27 { get; set; } + public string reserved26 { get; set; } + public string tacSwch { get; set; } + public string reserved25 { get; set; } + public string reserved24 { get; set; } + public string reserved23 { get; set; } + public string reserved22 { get; set; } + public string refNRPhysicalCellDU { get; set; } + public string superCarrierId { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string specialShareCellSwitch { get; set; } + public string ssbARFCN { get; set; } + public string tac { get; set; } + public string cellEsState { get; set; } + public string ulweakCellDetectionSwch { get; set; } + public string masterOperatorId { get; set; } + public string netShareCellW { get; set; } + public string reserved97 { get; set; } + public string reserved96 { get; set; } + public string reserved95 { get; set; } + public string netSharePLMNShareW { get; set; } + public string reserved94 { get; set; } + public string mocName { get; set; } + public string reserved18 { get; set; } + public string reserved17 { get; set; } + public string reserved16 { get; set; } + public string ucUlSCActiveSetThr { get; set; } + public string reserved15 { get; set; } + public string refPlmnIdList { get; set; } + public string reserved14 { get; set; } + public string reserved13 { get; set; } + public string reserved12 { get; set; } + public string reserved11 { get; set; } + public string resSharePrbRatioPlmnGrp { get; set; } + public string operState { get; set; } + public string reserved19 { get; set; } + public string NRCarrierId { get; set; } + public string prbResUsedByOtherPlmnGrpSwch { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string evadeMode { get; set; } + public string cellState { get; set; } + public string licenseType { get; set; } + public string serviceStatus { get; set; } + public string adminState { get; set; } + public string ueInactiveTimer { get; set; } + public string imsEmergencySupport { get; set; } + public string cellReservedForOperatorUse { get; set; } + public string plThrd4ULWeakCell { get; set; } + public string availStatus { get; set; } + public string testState { get; set; } + public string reserved30 { get; set; } + public string nrCarrierGroupId { get; set; } + public string rnac { get; set; } + public string moId { get; set; } + public string configuredEpsTAC { get; set; } + public string ldn { get; set; } + public string rmsiTransSwitch4NSA { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cmtaskmng/TaskStatusResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cmtaskmng/TaskStatusResult.cs new file mode 100644 index 00000000..14abc364 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Cmtaskmng/TaskStatusResult.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cmtaskmng +{ + public class TaskStatusResultObject + { + public string taskNo { get; set; } + public string funcName { get; set; } + public string detail { get; set; } + public int progress { get; set; } + public int code { get; set; } + public string user { get; set; } + public DateTime startTime { get; set; } + public string dataAreaId { get; set; } + public string sessionId { get; set; } + public string hostname { get; set; } + public string ipAddress { get; set; } + public int eta { get; set; } + public int holdtime { get; set; } + public bool visibleForWeb { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportArg.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportArg.cs new file mode 100644 index 00000000..3e9c3054 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportArg.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea +{ + public class DataExportArg + { + [JsonProperty("fileFormat")] + [JsonConverter(typeof(StringEnumConverter))] + public FileFormat FileFormat { get; set; } + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("neList")] + public IList NeList { get; set; } + + [JsonProperty("mocList")] + public IList MocList { get; set; } + + [JsonProperty("moFilter")] + public IList MoFilter { get; set; } + + [JsonProperty("attrFilter")] + public IList AttrFilter { get; set; } + + [JsonProperty("treeFilter")] + public IList TreeFilter { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportResult.cs new file mode 100644 index 00000000..3a86a24e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/DataExportResult.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea +{ + public class DataExportResult + { + public string code { get; set; } + public string taskNo { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/FileFormat.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/FileFormat.cs new file mode 100644 index 00000000..bded65c6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/FileFormat.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea +{ + public enum FileFormat + { + modata + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/LicenseModel.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/LicenseModel.cs new file mode 100644 index 00000000..96ebcad5 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/LicenseModel.cs @@ -0,0 +1,138 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea +{ + public class LicenseModel + { + [JsonProperty("SubNetwork")] + public string SubNetwork { get; set; } + [JsonProperty("ManagedElement")] + public string ManagedElement { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class Arraycounterinfo + { + public string itemid { get; set; } + public List statisticinfos { get; set; } + } + + public class Ftpserver + { + public string protocol { get; set; } + public string address { get; set; } + public int port { get; set; } + public string username { get; set; } + public string password { get; set; } + public string dir { get; set; } + } + + //public class Location + //{ + // public string me { get; set; } + // public List mois { get; set; } + //} + + //public class FtpserverRoot + //{ + // public string taskname { get; set; } + // public Ftpserver ftpserver { get; set; } + // public bool autoclean { get; set; } + // public int reservehour { get; set; } + // public string nfctid { get; set; } + // public string motid { get; set; } + // public List items { get; set; } + // public List arraycounterinfos { get; set; } + // public int gr { get; set; } + // public int duration { get; set; } + // public List locations { get; set; } + // public bool showbusinesscolumn { get; set; } + // public int status { get; set; } + // public int kpiheaddisplaymode { get; set; } + // public int formatwithts { get; set; } + //} + + public class Statisticinfo + { + public int type { get; set; } + public string scopevalue { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class Healthydetail + { + } + + public class I18names + { + } + + public class Location + { + public string me { get; set; } + public List mois { get; set; } + public string nfctid { get; set; } + public string motid { get; set; } + } + + public class LocationRoot + { + public int taskid { get; set; } + public string creator { get; set; } + public string modifier { get; set; } + public int source { get; set; } + public DateTime createtime { get; set; } + public DateTime modifytime { get; set; } + public int healthstatus { get; set; } + public Healthydetail healthydetail { get; set; } + public DateTime healthchecktime { get; set; } + public bool hasumetask { get; set; } + public bool hasemstask { get; set; } + public int ommresult { get; set; } + public int action { get; set; } + public int reportinterval { get; set; } + public List confirmedmessageids { get; set; } + public string emdn { get; set; } + public string nfctid { get; set; } + public string motid { get; set; } + public List mtids { get; set; } + public List counterids { get; set; } + public string name { get; set; } + public int gr { get; set; } + public int status { get; set; } + public string filterlayer { get; set; } + public List locations { get; set; } + public List uilocations { get; set; } + public DateTime starttime { get; set; } + public DateTime endtime { get; set; } + public List modelversion { get; set; } + public string dayinweekfilter { get; set; } + public string dayinmonthfilter { get; set; } + public string timespanfilter { get; set; } + public int timespanfiltertype { get; set; } + public int visibleflag { get; set; } + public List objecttemplateids { get; set; } + public int objecttype { get; set; } + public string showtype { get; set; } + public List fuzzymodelversion { get; set; } + public I18names i18names { get; set; } + public bool saveas { get; set; } + public bool migrate { get; set; } + } + + public class Uilocation + { + public string id { get; set; } + public string pmid { get; set; } + public string name { get; set; } + public bool haslogicmoc { get; set; } + public string model { get; set; } + public string type { get; set; } + public string moc { get; set; } + } + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/ModataQueryArg.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/ModataQueryArg.cs new file mode 100644 index 00000000..6a0c7985 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/CurrentArea/ModataQueryArg.cs @@ -0,0 +1,31 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.CurrentArea +{ + public class ModataQueryArg + { + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("neList")] + public IList NeList { get; set; } + + [JsonProperty("mocList")] + public IList MocList { get; set; } + + [JsonProperty("moFilter")] + public IList MoFilter { get; set; } + + [JsonProperty("attrFilter")] + public IList AttrFilter { get; set; } + + [JsonProperty("treeFilter")] + public IList TreeFilter { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ENBCUCPFunction/MoQueryResultENBCUCPFunction.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ENBCUCPFunction/MoQueryResultENBCUCPFunction.cs new file mode 100644 index 00000000..d0eefbb1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ENBCUCPFunction/MoQueryResultENBCUCPFunction.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ENBCUCPFunction +{ + public class MoQueryResultENBCUCPFunction + { + public string userLabel { get; set; } + public string gnbIdLength { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string eNBId { get; set; } + public string additionalMccList { get; set; } + public string additionalMncList { get; set; } + public string mcc { get; set; } + public string moId { get; set; } + public string enbName { get; set; } + public string radioMode { get; set; } + public string ldn { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellDefiningSSB.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellDefiningSSB.cs new file mode 100644 index 00000000..cc3ab84b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellDefiningSSB.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class CellDefiningSSB + { + public string dmrsTypeAPosition { get; set; } + public string cellBarred { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ssbFrequency { get; set; } + public string ldn { get; set; } + public string pci { get; set; } + public string ssbSubcarrierOffset { get; set; } + public string subCarrierSpacingCommon { get; set; } + public string moId { get; set; } + public string intraFreqReselection { get; set; } + } + public class ReplaceableUnitResult + { + public string ldn { get; set; } + public string moId { get; set; } + public string mocName { get; set; } + public string refSubRack1 { get; set; } + public string slotNo { get; set; } + public string name { get; set; } + public string hwWorkScence { get; set; } + public string functionMode { get; set; } + public string hwFunction { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellParameter.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellParameter.cs new file mode 100644 index 00000000..870fe743 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/CellParameter.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class CellParameter + { + /// + /// 上行载波频点 + /// + public string ULssbFrequency { get; set; } = null; + /// + /// 下行载波频点 + /// + public string DLssbFrequency { get; set; } = null; + /// + /// 小区pci + /// + public string PCI { get; set; } = null; + ///// + ///// 带宽 + ///// + //public string NRBandWidth { get; set; } = null; + /// + /// 小区选择所需的最小RSRP接收电平(dBm) + /// + public string qRxLevMin { get; set; } = null; + /// + /// 小区选择所需的最小接收电平偏移量(2dB) + /// + public string qRxLevMinOffsetCell { get; set; } = null; + /// + /// A1事件判决的RSRP绝对门限 + /// + public int rsrpThresholdA1 { get; set; } = 0; + /// + /// 事件测量判决迟滞 + /// + public int hysteresisA1 { get; set; } = 0; + /// + /// A2事件判决的RSRP绝对门限 + /// + public int rsrpThresholdA2 { get; set; } = 0; + /// + /// 事件测量判决迟滞 + /// + public int hysteresisA2 { get; set; } = 0; + /// + /// A3事件偏移 + /// + public double eventOffset { get; set; } = 0; + /// + /// 事件测量判决迟滞 + /// + public int hysteresisA3 { get; set; } = 0; + /// + /// A4/A5事件邻区判决的RSRP绝对门限 + /// + public int rsrpThresholdA4 { get; set; } = 0; + /// + /// 事件测量判决迟滞 + /// + public int hysteresisA4 { get; set; } = 0; + /// + /// A4/A5事件邻区判决的RSRP绝对门限 + /// + public int rsrpThreshold { get; set; } = 0; + /// + /// A5事件服务小区判决的RSRP绝对门限 + /// + public int A5Thrd1Rsrp { get; set; } = 0; + /// + /// 事件测量判决迟滞 + /// + public int hysteresisA5 { get; set; } = 0; + + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/InterFHoA1A2.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/InterFHoA1A2.cs new file mode 100644 index 00000000..d8355def --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/InterFHoA1A2.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class InterFHoA1A2 + { + public string includeBeamMeasurements { get; set; } + public string userLabel { get; set; } + public string rsrqThresholdA2 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rsrqThresholdA1 { get; set; } + public string rptQuantityCell { get; set; } + public string hysteresisA1 { get; set; } + public string hysteresisA2 { get; set; } + public string timeToTriggerA2 { get; set; } + public string timeToTriggerA1 { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string rsrpThresholdA1 { get; set; } + public string rsrpThresholdA2 { get; set; } + public string sinrThresholdA1 { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public string sinrThresholdA2 { get; set; } + public string rptQuantityRsIndex { get; set; } + } + public class InterRatHoA1A2 + { + public string includeBeamMeasurements { get; set; } + public string userLabel { get; set; } + public string rsrqThresholdA2 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rsrqThresholdA1 { get; set; } + public string rptQuantityCell { get; set; } + public string hysteresisA1 { get; set; } + public string hysteresisA2 { get; set; } + public string timeToTriggerA2 { get; set; } + public string timeToTriggerA1 { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string rsrpThresholdA1 { get; set; } + public string rsrpThresholdA2 { get; set; } + public string sinrThresholdA1 { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public string sinrThresholdA2 { get; set; } + public string rptQuantityRsIndex { get; set; } + } + + public class InterFHoA1A2Result + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class InterFHoA1A2Root + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class IntraFReselection + { + public string measurementSolts { get; set; } + public DateTime lastModifiedTime { get; set; } + public string sf5 { get; set; } + public string tReselectionNR { get; set; } + public string sf10 { get; set; } + public string duration { get; set; } + public string smtc1PrdAndOffset { get; set; } + public string sIntraSearchQ { get; set; } + public string qRxLevMin { get; set; } + public string sIntraSearchP { get; set; } + public string sIntraSearchSwitch { get; set; } + public string pMax { get; set; } + public string longBitmap { get; set; } + public string deriveSSBIndexFromCell { get; set; } + public string sf20 { get; set; } + public string mocName { get; set; } + public string ssbToMeasure { get; set; } + public string sfHigh { get; set; } + public string mediumBitmap { get; set; } + public string moId { get; set; } + public string sfMedium { get; set; } + public string sSRSSIMeasurementSwitch { get; set; } + public string ldn { get; set; } + public string sf40 { get; set; } + public string sf160 { get; set; } + public string endSymbol { get; set; } + public string shortBitmap { get; set; } + public string sf80 { get; set; } + public string qQualMin { get; set; } + } + + public class IntraFReselectionResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class IntraFReselectionRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgCell.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgCell.cs new file mode 100644 index 00000000..9ee2919e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgCell.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class MoConfigArgNRCell : MoConfigArgObject + { + public override string mocName { get; } = "NRCellRelation"; + public string moId { get; set; } + public string refExternalNRCellCU { get; set; } + public string refNRCellCU { get; set; } + public string cellIndividualOffset { get; set; } + public string qOffsetCell { get; set; } + public string rachLessEnabled { get; set; } + public string caSupport { get; set; } + public string coverType { get; set; } + public string esCellType { get; set; } + public string controlMode { get; set; } + public string hoState { get; set; } + public string anrIndicator { get; set; } + public string supportXnHo { get; set; } + public string qRxLevMinOffsetCell { get; set; } + public string qQualMinOffsetCell { get; set; } + public string ngHoDataDirectFwdSupport { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgLockCell.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgLockCell.cs new file mode 100644 index 00000000..0e3fc6c7 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoConfigArgLockCell.cs @@ -0,0 +1,22 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class MoConfigArgLockCell + { + public string adminState { get; set; } + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + } + public class MoConfigArgNRCellDU_LockCell : MoConfigArgObject + { + public override string mocName => "NRCellDU"; + public string adminState { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoDataQueryResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoDataQueryResult.cs new file mode 100644 index 00000000..e6934259 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoDataQueryResult.cs @@ -0,0 +1,624 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + internal class MoDataQueryResult + { + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class MoDatum + { + public string dssBandAdaptSASwch { get; set; } + public string vonrBoundSuppressionSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string rfFingerNbCellHoExecuSucesRate { get; set; } + public string cgiMeasFilterUserInd { get; set; } + public string mobiManageSwitch { get; set; } + public string handoverDelayServSINRThrd { get; set; } + public string handoverDelayServRSRQThrd { get; set; } + public string voiceOnUEHOContinueProtSwch { get; set; } + public string measReportReorderSwch { get; set; } + public string mrFiltNbRSRPoffsetThrd { get; set; } + public string handoverDelayServSINRThrdUL { get; set; } + public string mrFiltNbBasedBestCellSwch { get; set; } + public string rfFingerFreeMeasSwch { get; set; } + public string hoAssureServiceList { get; set; } + public string handoverDelayServRSRPThrd { get; set; } + public string interPLMNIdHOSwch { get; set; } + public string rfFingerReduceMeasSwch { get; set; } + public string hoCandiCellNum { get; set; } + public string reportAddNeighMeas { get; set; } + public string pingPongHoSwitch { get; set; } + public string mocName { get; set; } + public string pingPongTmr { get; set; } + public string mrFiltNbSINRoffsetThrd { get; set; } + public string handoverBasedCGIMeasTimer { get; set; } + public string forbiddenPLMNIdList { get; set; } + public string moId { get; set; } + public string vonrBoundSuppressionNbDiffThrd { get; set; } + public string mrFiltNbRSRQoffsetThrd { get; set; } + public string specialNbCellCGIMeasHOInd { get; set; } + public string mrEnhancedReorderSwch { get; set; } + public string hoAllowPartAdmSwch { get; set; } + public string ldn { get; set; } + public string gapAdaptiveSwch { get; set; } + public string pingPongTmrMeasCtrlSwch { get; set; } + public string voNrSwitch { get; set; } + public string rfFingerFreeMeasCellMaxNum { get; set; } + public string uset312Swch { get; set; } + } + public class CellSelection + { + public DateTime lastModifiedTime { get; set; } + public string qRxLevMinOffsetCell { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string qRxLevMin { get; set; } + public string qQualMinOffsetCell { get; set; } + public string moId { get; set; } + public string qQualMin { get; set; } + } + + + public class CellSelectionRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + public class CellSelectionResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + public class Result + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class MobilityCtrlRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + public class CellResel + { + public string threshServingLowP { get; set; } + public DateTime lastModifiedTime { get; set; } + public string threshServingLowQ { get; set; } + public string nCrM { get; set; } + public string sNonIntraSearchP { get; set; } + public string sNonIntraSearchQ { get; set; } + public string tCrMaxHyst { get; set; } + public string nrofSSBlocksToAverage { get; set; } + public string ssbConsolidRsrqThr { get; set; } + public string qHystSFHigh { get; set; } + public string qHystSFMedium { get; set; } + public string qRxLevMinOffsetCellSwitch { get; set; } + public string pMaxConfigSwitch { get; set; } + public string ssbConsolidSinrThr { get; set; } + public string nCrH { get; set; } + public string qHyst { get; set; } + public string cellReselectionSubPriority { get; set; } + public string cellReselectionPriority { get; set; } + public string reselParaBaseSpeedSwitch { get; set; } + public string mocName { get; set; } + public string sNonIntraSearchSwitch { get; set; } + public string moId { get; set; } + public string qQualMinOffsetCellSwitch { get; set; } + public string highPowUESwitch { get; set; } + public string ssbConsolidRsrpThr { get; set; } + public string threshServingLowQSwitch { get; set; } + public string tCrMax { get; set; } + public string ldn { get; set; } + public string rangeToBestCell { get; set; } + } + public class InterFReselection + { + public string measurementSolts { get; set; } + public DateTime lastModifiedTime { get; set; } + public string sf5 { get; set; } + public string tReselectionNR { get; set; } + public string sf10 { get; set; } + public string nrofSSBlocksToAverage { get; set; } + public string duration { get; set; } + public string ssbConsolidRsrqThr { get; set; } + public string threshXLowP { get; set; } + public string threshXLowQ { get; set; } + public string smtc1PrdAndOffset { get; set; } + public string ssbSubcarrierSpacing { get; set; } + public string ssbConsolidSinrThr { get; set; } + public string refNRFreqRelation { get; set; } + public string qRxLevMin { get; set; } + public string cellReselectionSubPriority { get; set; } + public string cellReselectionPriority { get; set; } + public string qOffsetFreq { get; set; } + public string pMax { get; set; } + public string longBitmap { get; set; } + public string deriveSSBIndexFromCell { get; set; } + public string sf20 { get; set; } + public string mocName { get; set; } + public string ssbToMeasure { get; set; } + public string sfHigh { get; set; } + public string mediumBitmap { get; set; } + public string moId { get; set; } + public string sfMedium { get; set; } + public string threshXHighQ { get; set; } + public string threshXHighP { get; set; } + public string sSRSSIMeasurementSwitch { get; set; } + public string ssbConsolidRsrpThr { get; set; } + public string ldn { get; set; } + public string sf40 { get; set; } + public string sf160 { get; set; } + public string endSymbol { get; set; } + public string shortBitmap { get; set; } + public string sf80 { get; set; } + public string qQualMin { get; set; } + } + public class EUTRAReselection + { + public string pMax { get; set; } + public string highSpeedEUTRACarrierFlag { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string allowedMeasBandwidth { get; set; } + public string moId { get; set; } + public string threshXHighQ { get; set; } + public string threshXLowQ { get; set; } + public string qualMin { get; set; } + public string ldn { get; set; } + public string threshXLow { get; set; } + public string refEutranFreqRelation { get; set; } + public string threshXHigh { get; set; } + public string qRxLevMin { get; set; } + public string cellReselectionSubPriority { get; set; } + public string cellReselectionPriority { get; set; } + } + public class CellReselResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class CellReselRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + public class UeTimerLTE + { + public string t301Tdd { get; set; } + public DateTime lastModifiedTime { get; set; } + public string tUserInacVoLTE { get; set; } + public string t304_Cco { get; set; } + public string endcAnchorImmciT320 { get; set; } + public string mocName { get; set; } + public string t304Tdd { get; set; } + public string t320 { get; set; } + public string sADirectIMMCIT320 { get; set; } + public string t300 { get; set; } + public string moId { get; set; } + public string t310_Ue { get; set; } + public string t301Fdd { get; set; } + public string tUserInac { get; set; } + public string t311_Ue { get; set; } + public string t302 { get; set; } + public string t304Fdd { get; set; } + public string n310 { get; set; } + public string tUserInacForSpecUe { get; set; } + public string ldn { get; set; } + public string n311 { get; set; } + public string tUserInacforMobile { get; set; } + public string nonSptVoNRIMMCIT320 { get; set; } + } + public class InactiveParameter + { + public string inactivePagingCycle { get; set; } + public string inactiveTimer4SRB2 { get; set; } + public string inactiveTimer { get; set; } + public string ranPagingPrioDetSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ranPagingRspWaitTimerLen { get; set; } + public string vonrInactiveTimerOffset { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string periodicRnauTimerLen { get; set; } + public string periodicRnauGuardTimerOffset { get; set; } + public string moId { get; set; } + } + + public class InactiveParameterResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class InactiveParameterRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class EUtranReselectionFDDLTE + { + public string acBarWorkMode { get; set; } + public string eMTCCellSelQqualMin { get; set; } + public string selQrxMinOffset { get; set; } + public string csgIndication { get; set; } + public string voiceBarringTime { get; set; } + public string videoBarringFactor { get; set; } + public string acBarringFactorOrig { get; set; } + public string acBarringFactor { get; set; } + public string acBarringForSpecialAC { get; set; } + public string cellReselPrioBaseSpid { get; set; } + public string cellSelQqualMin { get; set; } + public string snonintrasearch { get; set; } + public string eMTCIntraQrxLevMin { get; set; } + public string cellBarred { get; set; } + public string nCellChangeMedium { get; set; } + public string sIntraSrchQ { get; set; } + public string eMTCSelQrxLevMin { get; set; } + public string qHystSFHigh { get; set; } + public string qHystSFMedium { get; set; } + public string sfIntraHigh { get; set; } + public string interFreqNumExt { get; set; } + public string eMTCQqualminoffset { get; set; } + public string intraSearch { get; set; } + public string eMTCSNintraSrchPre { get; set; } + public string r9SIntraSrchP { get; set; } + public string intraReselSubPrio { get; set; } + public string intraPresenceAntPort1 { get; set; } + public string interFreqNum { get; set; } + public string videoBarringTime { get; set; } + public string eMTCtRslIntraEutra { get; set; } + public string dlCoverOptRecoverTimeLen { get; set; } + public string videoBarForSpecAC { get; set; } + public string mocName { get; set; } + public string eMTCSIntraSrchPre { get; set; } + public string r9SNintraSrchP { get; set; } + public string eMTCThreshSrvLowQSwitch { get; set; } + public string freqBandPriInd { get; set; } + public string eMTCQhyst { get; set; } + public string nCellChangeHigh { get; set; } + public string intraQrxLevMin { get; set; } + public string dlCoverOptimSwch { get; set; } + public string preBlockTimer { get; set; } + public string acBarringForSpecialACtOrig { get; set; } + public string sfIntraMedium { get; set; } + public string reselParaBaseSpeedFlag { get; set; } + public string iIntraPmax { get; set; } + public string iIntraPmaxOffset { get; set; } + public string threshSrvLowQSwitch { get; set; } + public string qrxLevMinOfst { get; set; } + public string tReselectionIntraEUTRA { get; set; } + public string videoServiceCauseIndSwch { get; set; } + public string csfbBarForSpecAC { get; set; } + public string csfbBarringFactor { get; set; } + public string selQrxLevMin { get; set; } + public string userLabel { get; set; } + public string voiceBarForSpecAC { get; set; } + public DateTime lastModifiedTime { get; set; } + public string voiceBarringFactor { get; set; } + public string sIntraSearch { get; set; } + public string eMTCSNintraSrch { get; set; } + public string eMTCQrxLevMinOfst { get; set; } + public string qhyst { get; set; } + public string tCrMaxHyst { get; set; } + public string aCBPendingWin { get; set; } + public string tEvaluation { get; set; } + public string acBarringTimeOrig { get; set; } + public string eMTCThreshSvrLow { get; set; } + public string sNintraSrchQ { get; set; } + public string csfbBarringTime { get; set; } + public string qQualminoffset { get; set; } + public string eMTCR9SNintraSrchP { get; set; } + public string intraPmax { get; set; } + public string eMTCSIntraSrch { get; set; } + public string cellReselectionPriority { get; set; } + public string threshSrvLowQ { get; set; } + public string intraFreqQqualMin { get; set; } + public string freqBandPriSwch { get; set; } + public string threshSvrLow { get; set; } + public string voiceServiceCauseIndSwch { get; set; } + public string eMTCSNintraSrchQ { get; set; } + public string eMTCIntraFreqQqualMin { get; set; } + public string pLMNACBGroupId { get; set; } + public string dlCoverOptKeepTimeLen { get; set; } + public string eMTCR9SIntraSrchP { get; set; } + public string eMTCIntraReselPrio { get; set; } + public string moId { get; set; } + public string isIntraFreqReselection { get; set; } + public string sNintraSrchPre { get; set; } + public string eMTCThreshSrvLowQ { get; set; } + public string acBarringTime { get; set; } + public string eMTCSIntraSrchQ { get; set; } + public string ldn { get; set; } + public string intraPmaxOffset { get; set; } + public string acBarringForEmergency { get; set; } + } + public class EUtranReselectionTDDLTE + { + public string acBarWorkMode { get; set; } + public string eMTCCellSelQqualMin { get; set; } + public string selQrxMinOffset { get; set; } + public string csgIndication { get; set; } + public string voiceBarringTime { get; set; } + public string videoBarringFactor { get; set; } + public string acBarringFactorOrig { get; set; } + public string acBarringFactor { get; set; } + public string acBarringForSpecialAC { get; set; } + public string cellReselPrioBaseSpid { get; set; } + public string cellSelQqualMin { get; set; } + public string snonintrasearch { get; set; } + public string eMTCIntraQrxLevMin { get; set; } + public string cellBarred { get; set; } + public string nCellChangeMedium { get; set; } + public string sIntraSrchQ { get; set; } + public string eMTCSelQrxLevMin { get; set; } + public string qHystSFHigh { get; set; } + public string qHystSFMedium { get; set; } + public string sfIntraHigh { get; set; } + public string interFreqNumExt { get; set; } + public string eMTCQqualminoffset { get; set; } + public string intraSearch { get; set; } + public string eMTCSNintraSrchPre { get; set; } + public string r9SIntraSrchP { get; set; } + public string intraReselSubPrio { get; set; } + public string intraPresenceAntPort1 { get; set; } + public string interFreqNum { get; set; } + public string videoBarringTime { get; set; } + public string eMTCtRslIntraEutra { get; set; } + public string dlCoverOptRecoverTimeLen { get; set; } + public string videoBarForSpecAC { get; set; } + public string mocName { get; set; } + public string eMTCSIntraSrchPre { get; set; } + public string r9SNintraSrchP { get; set; } + public string eMTCThreshSrvLowQSwitch { get; set; } + public string freqBandPriInd { get; set; } + public string eMTCQhyst { get; set; } + public string nCellChangeHigh { get; set; } + public string intraQrxLevMin { get; set; } + public string dlCoverOptimSwch { get; set; } + public string preBlockTimer { get; set; } + public string acBarringForSpecialACtOrig { get; set; } + public string sfIntraMedium { get; set; } + public string reselParaBaseSpeedFlag { get; set; } + public string iIntraPmax { get; set; } + public string iIntraPmaxOffset { get; set; } + public string threshSrvLowQSwitch { get; set; } + public string qrxLevMinOfst { get; set; } + public string tReselectionIntraEUTRA { get; set; } + public string videoServiceCauseIndSwch { get; set; } + public string csfbBarForSpecAC { get; set; } + public string csfbBarringFactor { get; set; } + public string selQrxLevMin { get; set; } + public string userLabel { get; set; } + public string voiceBarForSpecAC { get; set; } + public DateTime lastModifiedTime { get; set; } + public string voiceBarringFactor { get; set; } + public string sIntraSearch { get; set; } + public string eMTCSNintraSrch { get; set; } + public string eMTCQrxLevMinOfst { get; set; } + public string qhyst { get; set; } + public string tCrMaxHyst { get; set; } + public string aCBPendingWin { get; set; } + public string tEvaluation { get; set; } + public string acBarringTimeOrig { get; set; } + public string eMTCThreshSvrLow { get; set; } + public string sNintraSrchQ { get; set; } + public string csfbBarringTime { get; set; } + public string qQualminoffset { get; set; } + public string eMTCR9SNintraSrchP { get; set; } + public string intraPmax { get; set; } + public string eMTCSIntraSrch { get; set; } + public string cellReselectionPriority { get; set; } + public string threshSrvLowQ { get; set; } + public string intraFreqQqualMin { get; set; } + public string freqBandPriSwch { get; set; } + public string threshSvrLow { get; set; } + public string voiceServiceCauseIndSwch { get; set; } + public string eMTCSNintraSrchQ { get; set; } + public string eMTCIntraFreqQqualMin { get; set; } + public string pLMNACBGroupId { get; set; } + public string dlCoverOptKeepTimeLen { get; set; } + public string eMTCR9SIntraSrchP { get; set; } + public string eMTCIntraReselPrio { get; set; } + public string moId { get; set; } + public string isIntraFreqReselection { get; set; } + public string sNintraSrchPre { get; set; } + public string eMTCThreshSrvLowQ { get; set; } + public string acBarringTime { get; set; } + public string eMTCSIntraSrchQ { get; set; } + public string ldn { get; set; } + public string intraPmaxOffset { get; set; } + public string acBarringForEmergency { get; set; } + } + + public class EUtranRslParaFDD + { + public string interReselPrio { get; set; } + public string interFreqQqualMin { get; set; } + public string interCarriFreq { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string interThreshXLowQ { get; set; } + public string eMTCQOffsetFreq { get; set; } + public string freqBandInd3 { get; set; } + public string eMTCInterQrxLevMin { get; set; } + public string eMTCInterThreshXHighQ { get; set; } + public string interQrxLevMin { get; set; } + public string freqBandInd2 { get; set; } + public string sfInterHigh { get; set; } + public string freqBandInd5 { get; set; } + public string freqBandInd4 { get; set; } + public string freqBandInd7 { get; set; } + public string freqBandInd6 { get; set; } + public string eMTCInterThrdXLow { get; set; } + public string freqBandInd8 { get; set; } + public string interPmax { get; set; } + public string qOffsetFreq { get; set; } + public string eMTCInterReselPrio { get; set; } + public string mocName { get; set; } + public string eMTCInterFreqQqualMin { get; set; } + public string interThreshXHighQ { get; set; } + public string tReselectionInterEUTRA { get; set; } + public string interReselSubPrio { get; set; } + public string moId { get; set; } + public string freqRslCfgIndex { get; set; } + public string freqBandInd1 { get; set; } + public string sfInterMedium { get; set; } + public string eMTCInterThrdXHigh { get; set; } + public string ldn { get; set; } + public string eMTCtRslInterEutra { get; set; } + public string interFreqMeasPerformance { get; set; } + public string interThrdXLow { get; set; } + public string interPresenceAntPort1 { get; set; } + public string interThrdXHigh { get; set; } + public string eMTCInterThreshXLowQ { get; set; } + } + + public class NRCelRtFLTE + { + public string frameBoundaryOffset { get; set; } + public DateTime lastModifiedTime { get; set; } + public string nrThrdXLow { get; set; } + public string sSBMeasPeriod { get; set; } + public string qrxLevMin { get; set; } + public string nrCarriFreq { get; set; } + public string sSBConsolidationRSRQThr1 { get; set; } + public string qQualMin1 { get; set; } + public string maxRSIndexCellQual { get; set; } + public string sSBMeasSubframeOffset { get; set; } + public string band { get; set; } + public string nrThrdXHighQ { get; set; } + public string nrThrdXHigh { get; set; } + public string deriveSSBIndexFromCell { get; set; } + public string nrThrdXLowQ { get; set; } + public string mocName { get; set; } + public string rSSIMeasEndSymbol { get; set; } + public string sSBConsolidationRSRPThr1 { get; set; } + public string rSSIMeasSlots { get; set; } + public string moId { get; set; } + public string freqRslCfgIndex { get; set; } + public string sSBSCS { get; set; } + public string sSBToMeasBitmap { get; set; } + public string nrReselPrio { get; set; } + public string nrFreqLooseSyncInd { get; set; } + public string ldn { get; set; } + public string nrPmax { get; set; } + public string sSBMeasDuration { get; set; } + public string systemFrameNumberOffset { get; set; } + public string nrReselSubPrio { get; set; } + } + public class EUtranRslParaTDD + { + public string interReselPrio { get; set; } + public string interFreqQqualMin { get; set; } + public string interCarriFreq { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string interThreshXLowQ { get; set; } + public string eMTCQOffsetFreq { get; set; } + public string freqBandInd3 { get; set; } + public string eMTCInterQrxLevMin { get; set; } + public string eMTCInterThreshXHighQ { get; set; } + public string interQrxLevMin { get; set; } + public string freqBandInd2 { get; set; } + public string sfInterHigh { get; set; } + public string freqBandInd5 { get; set; } + public string freqBandInd4 { get; set; } + public string freqBandInd7 { get; set; } + public string freqBandInd6 { get; set; } + public string eMTCInterThrdXLow { get; set; } + public string freqBandInd8 { get; set; } + public string interPmax { get; set; } + public string qOffsetFreq { get; set; } + public string eMTCInterReselPrio { get; set; } + public string mocName { get; set; } + public string eMTCInterFreqQqualMin { get; set; } + public string interThreshXHighQ { get; set; } + public string tReselectionInterEUTRA { get; set; } + public string interReselSubPrio { get; set; } + public string moId { get; set; } + public string freqRslCfgIndex { get; set; } + public string freqBandInd1 { get; set; } + public string sfInterMedium { get; set; } + public string eMTCInterThrdXHigh { get; set; } + public string ldn { get; set; } + public string eMTCtRslInterEutra { get; set; } + public string interFreqMeasPerformance { get; set; } + public string interThrdXLow { get; set; } + public string interPresenceAntPort1 { get; set; } + public string interThrdXHigh { get; set; } + public string eMTCInterThreshXLowQ { get; set; } + } + public class NRCelRtTLTE + { + public string frameBoundaryOffset { get; set; } + public DateTime lastModifiedTime { get; set; } + public string nrThrdXLow { get; set; } + public string sSBMeasPeriod { get; set; } + public string qrxLevMin { get; set; } + public string nrCarriFreq { get; set; } + public string sSBConsolidationRSRQThr1 { get; set; } + public string qQualMin1 { get; set; } + public string maxRSIndexCellQual { get; set; } + public string sSBMeasSubframeOffset { get; set; } + public string band { get; set; } + public string nrThrdXHighQ { get; set; } + public string nrThrdXHigh { get; set; } + public string deriveSSBIndexFromCell { get; set; } + public string nrThrdXLowQ { get; set; } + public string mocName { get; set; } + public string rSSIMeasEndSymbol { get; set; } + public string sSBConsolidationRSRPThr1 { get; set; } + public string rSSIMeasSlots { get; set; } + public string moId { get; set; } + public string freqRslCfgIndex { get; set; } + public string sSBSCS { get; set; } + public string sSBToMeasBitmap { get; set; } + public string nrReselPrio { get; set; } + public string nrFreqLooseSyncInd { get; set; } + public string ldn { get; set; } + public string nrPmax { get; set; } + public string sSBMeasDuration { get; set; } + public string systemFrameNumberOffset { get; set; } + public string nrReselSubPrio { get; set; } + } + + + public class EUtranReselectionFDDLTEResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class EUtranReselectionFDDLTERoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoGetQueryCellsResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoGetQueryCellsResult.cs new file mode 100644 index 00000000..e3258371 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/MoGetQueryCellsResult.cs @@ -0,0 +1,26 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class MoGetQueryCellsResultCell + { + [JsonProperty("moc")] + public string Moc { get; set; } + + [JsonProperty("attrNames")] + public IList AttrNames { get; set; } + + [JsonProperty("values")] + public IList> Values { get; set; } + } + + public class MoGetQueryCellsResult + { + public int code { get; set; } + + public IList result { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResult.cs new file mode 100644 index 00000000..d61d8e14 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResult.cs @@ -0,0 +1,58 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class ModataQueryCellsResultArg + { + [JsonProperty("moData")] + public List MoData { get; set; } + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("ne")] + public string Ne { get; set; } + } + + public class ModataQueryCellsResult + { + [JsonProperty("code")] + public int Code { get; set; } + + [JsonProperty("message")] + public string Message { get; set; } + + [JsonProperty("result")] + public List Result { get; set; } + } + + public class ModataQueryCellsResultArg1 + { + [JsonProperty("moData")] + public List MoData { get; set; } + + [JsonProperty("ManagedElementType")] + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + + [JsonProperty("ne")] + public string Ne { get; set; } + } + + public class ModataQueryCellsResult1 + { + [JsonProperty("code")] + public int Code { get; set; } + + [JsonProperty("message")] + public string Message { get; set; } + + [JsonProperty("result")] + public List Result { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCell.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCell.cs new file mode 100644 index 00000000..d9ca3c37 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCell.cs @@ -0,0 +1,190 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class ModataQueryCellsResultCell + { + [JsonProperty("reserved21")] + public string Reserved21 { get; set; } + + [JsonProperty("ulDemMethod")] + public string UlDemMethod { get; set; } + + [JsonProperty("reserved20")] + public string Reserved20 { get; set; } + + [JsonProperty("nrCellScene")] + public string NrCellScene { get; set; } + + [JsonProperty("netSharePLMNW")] + public string NetSharePLMNW { get; set; } + + [JsonProperty("cellLocalId")] + public string CellLocalId { get; set; } + + [JsonProperty("reserved29")] + public string Reserved29 { get; set; } + + [JsonProperty("reserved28")] + public string Reserved28 { get; set; } + + [JsonProperty("epsTacSwch")] + public string EpsTacSwch { get; set; } + + [JsonProperty("reserved27")] + public string Reserved27 { get; set; } + + [JsonProperty("reserved26")] + public string Reserved26 { get; set; } + + [JsonProperty("tacSwch")] + public string TacSwch { get; set; } + + [JsonProperty("reserved25")] + public string Reserved25 { get; set; } + + [JsonProperty("reserved24")] + public string Reserved24 { get; set; } + + [JsonProperty("reserved23")] + public string Reserved23 { get; set; } + + [JsonProperty("reserved22")] + public string Reserved22 { get; set; } + + [JsonProperty("refNRPhysicalCellDU")] + public string RefNRPhysicalCellDU { get; set; } + + [JsonProperty("ssbARFCN")] + public string SsbARFCN { get; set; } + + [JsonProperty("tac")] + public string Tac { get; set; } + + [JsonProperty("ulweakCellDetectionSwch")] + public string UlweakCellDetectionSwch { get; set; } + + [JsonProperty("masterOperatorId")] + public string MasterOperatorId { get; set; } + + [JsonProperty("netShareCellW")] + public string NetShareCellW { get; set; } + + [JsonProperty("reserved97")] + public string Reserved97 { get; set; } + + [JsonProperty("reserved96")] + public string Reserved96 { get; set; } + + [JsonProperty("reserved95")] + public string Reserved95 { get; set; } + + [JsonProperty("netSharePLMNShareW")] + public string NetSharePLMNShareW { get; set; } + + [JsonProperty("reserved94")] + public string Reserved94 { get; set; } + + [JsonProperty("mocName")] + public string MocName { get; set; } + + [JsonProperty("reserved18")] + public string Reserved18 { get; set; } + + [JsonProperty("reserved17")] + public string Reserved17 { get; set; } + + [JsonProperty("reserved16")] + public string Reserved16 { get; set; } + + [JsonProperty("ucUlSCActiveSetThr")] + public string UcUlSCActiveSetThr { get; set; } + + [JsonProperty("reserved15")] + public string Reserved15 { get; set; } + + [JsonProperty("refPlmnIdList")] + public string RefPlmnIdList { get; set; } + + [JsonProperty("reserved14")] + public string Reserved14 { get; set; } + + [JsonProperty("reserved13")] + public string Reserved13 { get; set; } + + [JsonProperty("reserved12")] + public string Reserved12 { get; set; } + + [JsonProperty("reserved11")] + public string Reserved11 { get; set; } + + [JsonProperty("resSharePrbRatioPlmnGrp")] + public string ResSharePrbRatioPlmnGrp { get; set; } + + [JsonProperty("operState")] + public string OperState { get; set; } + + [JsonProperty("reserved19")] + public string Reserved19 { get; set; } + + [JsonProperty("prbResUsedByOtherPlmnGrpSwch")] + public string PrbResUsedByOtherPlmnGrpSwch { get; set; } + + [JsonProperty("userLabel")] + public string UserLabel { get; set; } + + [JsonProperty("lastModifiedTime")] + public DateTime LastModifiedTime { get; set; } + + [JsonProperty("evadeMode")] + public string EvadeMode { get; set; } + + [JsonProperty("cellState")] + public string CellState { get; set; } + + [JsonProperty("licenseType")] + public string LicenseType { get; set; } + + [JsonProperty("serviceStatus")] + public string ServiceStatus { get; set; } + + [JsonProperty("adminState")] + public string AdminState { get; set; } + + [JsonProperty("ueInactiveTimer")] + public string UeInactiveTimer { get; set; } + + [JsonProperty("imsEmergencySupport")] + public string ImsEmergencySupport { get; set; } + + [JsonProperty("cellReservedForOperatorUse")] + public string CellReservedForOperatorUse { get; set; } + + [JsonProperty("plThrd4ULWeakCell")] + public string PlThrd4ULWeakCell { get; set; } + + [JsonProperty("availStatus")] + public string AvailStatus { get; set; } + + [JsonProperty("reserved30")] + public string Reserved30 { get; set; } + + [JsonProperty("rnac")] + public string Rnac { get; set; } + + [JsonProperty("moId")] + public string MoId { get; set; } + + [JsonProperty("configuredEpsTAC")] + public string ConfiguredEpsTAC { get; set; } + + [JsonProperty("ldn")] + public string Ldn { get; set; } + + [JsonProperty("rmsiTransSwitch4NSA")] + public string RmsiTransSwitch4NSA { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCellCU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCellCU.cs new file mode 100644 index 00000000..28332fc6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ModataQueryCellsResultCellCU.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class ModataQueryCellsResultCellCU + { + public string reserved65 { get; set; } + public string reserved64 { get; set; } + public string reserved63 { get; set; } + public string reserved62 { get; set; } + public string reserved61 { get; set; } + public string cellLocalId { get; set; } + public string azimuth { get; set; } + public string reserved69 { get; set; } + public string reserved68 { get; set; } + public string reserved67 { get; set; } + public string reserved66 { get; set; } + public string pciReuseDistance { get; set; } + public string superCarrierId { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string longitude { get; set; } + public string masterOperatorId { get; set; } + public string reserved98 { get; set; } + public string mocName { get; set; } + public string reserved99 { get; set; } + public string sonModifyPciSwitch { get; set; } + public string cityLabel { get; set; } + public string operState { get; set; } + public string NRCarrierId { get; set; } + public string userLabel { get; set; } + public string duMeMoId { get; set; } + public DateTime lastModifiedTime { get; set; } + public string latitude { get; set; } + public string reserved80 { get; set; } + public string pciSectionID { get; set; } + public string reserved100 { get; set; } + public string cellState { get; set; } + public string nsaState { get; set; } + public string plmnIdList { get; set; } + public string operatorPriority { get; set; } + public string serviceStatus { get; set; } + public string AdminState { get; set; } + public string saState { get; set; } + public string Reserved76 { get; set; } + public string testState { get; set; } + public string Reserved75 { get; set; } + public string Reserved74 { get; set; } + public string Reserved73 { get; set; } + public string Reserved72 { get; set; } + public string NrCarrierGroupId { get; set; } + public string Reserved71 { get; set; } + public string Reserved70 { get; set; } + public string Reserved79 { get; set; } + public string moId { get; set; } + public string pciReuseLayers { get; set; } + public string Reserved78 { get; set; } + public string Reserved77 { get; set; } + public string CoverageType { get; set; } + public string ldn { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/QueryNEsUseMoQueryResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/QueryNEsUseMoQueryResult.cs new file mode 100644 index 00000000..3dc2e07d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/QueryNEsUseMoQueryResult.cs @@ -0,0 +1,44 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class MoQueryQueryNEsResultMoData + { + [JsonProperty("lastModifiedTime")] + public DateTime LastModifiedTime { get; set; } + + [JsonProperty("mocName")] + public string MocName { get; set; } + + [JsonProperty("ldn")] + public string Ldn { get; set; } + + [JsonProperty("moId")] + public string MoId { get; set; } + } + //public class MoQueryQueryNEsResultNE + //{ + // [JsonProperty("moData")] + // public List MoData { get; set; } + + // [JsonProperty("ManagedElementType")] + // [JsonConverter(typeof(StringEnumConverter))] + // public netype ManagedElementType { get; set; } + + // [JsonProperty("ne")] + // public string Ne { get; set; } + //} + //public class MoQueryQueryNEsResult + //{ + // public int code { get; set; } + + // public string message { get; set; } + + // public List result { get; set; } + //} + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellAdminStatus.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellAdminStatus.cs new file mode 100644 index 00000000..e1729f6e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellAdminStatus.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public enum CellStatus + { + NoQuery, + Locked, + Unlocked + } + public class QueryCellStatus + { + public string LocalId { get; set; } + public CellStatus Status { get; set; } + public string ldnStr { get; set; } = string.Empty; + } + public class QueryCellsStatus + { + public netype netype { get; set; } + public string subnetId { get; set; } + public string netId { get; set; } + public IList Cells { get; set; } + } + public class SetCellStatusArg + { + public netype netype { get; set; } + public string subnetId { get; set; } + public string netId { get; set; } + public string localId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellThresho.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellThresho.cs new file mode 100644 index 00000000..12e64324 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/SetCellThresho.cs @@ -0,0 +1,105 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class SetCellThresho + { + public string b2Thrd1Rsrp { get; set; } + public string rsrpThreshold { get; set; } + public string eventId { get; set; } + + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + public class SetNRIntraFMacroSmallHo + { + public string eventId { get; set; } + + public string rsrpThreshold { get; set; } + + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + public class SetNRInterFCovHo + { + public double eventOffset { get; set; } + + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + public class NRCloseInterFRATHo + { + public string rsrpThreshold { get; set; } + + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + public class NROpenInterFRATHo + { + public string rsrpThreshold { get; set; } + + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + public class NRInterFCovHo + { + public string A5Thrd1Rsrp { get; set; } + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + + public class CellDefiningSSBUpdata + { + public int adminState { get; set; } + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + + //public class UeEUtranMeasurementLTE + //{ + // public string thresholdOfRSRP { get; set; } + // public string a3Offset { get; set; } + // public string a5Threshold2OfRSRP { get; set; } + + // public string ldn { get; set; } + // [JsonConverter(typeof(StringEnumConverter))] + // public MoOp moOp { get; set; } + // public string mocName { get; set; } + // public string lastModifiedTime { get; set; } + //} + public class CellMeasGroupLTE + { + public string interFHOMeasCfg { get; set; } + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public string mocName { get; set; } + public string lastModifiedTime { get; set; } + } + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ThreshoValues.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ThreshoValues.cs new file mode 100644 index 00000000..bd3c278a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/EasyApi/ThreshoValues.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi +{ + public class ThreshoValues + { + public int A1Value { get; set; } + public int A2Value { get; set; } + public int A3Value { get; set; } + public int A4Value { get; set; } + public int A5Value { get; set; } + public int A6Value { get; set; } + public int B1Value { get; set; } + public int B2Value { get; set; } + public string CellName { get; set; } + public int A5Value_adj { get; set; } + public int B2Value_adj { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ErrorMessage.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ErrorMessage.cs new file mode 100644 index 00000000..8c6d1f2b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ErrorMessage.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class ErrorMessage + { + public int code { get; set; } + public string message { get; set; } + } + public class codeMessage + { + public int code { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/CellObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/CellObject.cs new file mode 100644 index 00000000..85a2574b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/CellObject.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.General +{ + public class CellObject + { + public string LocalId { get; set; } + public bool Activated { get; set; } + public NEObject Parent { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/NEObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/NEObject.cs new file mode 100644 index 00000000..672ffb85 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/General/NEObject.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.General +{ + /// + /// 网元对象 + /// + public class NEObject + { + public netype Netype { get; set; } + public string SubnetId { get; set; } + public string NetId { get; set; } + public IList cells { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgBaseT.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgBaseT.cs new file mode 100644 index 00000000..671c9065 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgBaseT.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoConfigArgBase + { + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + public string ne { get; set; } + public IList moData { get; set; } = new List(); + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgObject.cs new file mode 100644 index 00000000..cb1c2fc3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoConfigArgObject.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoConfigArgObject + { + public string ldn { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MoOp moOp { get; set; } + public virtual string mocName { get; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoFilter.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoFilter.cs new file mode 100644 index 00000000..d5b014d3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoFilter.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoFilter + { + public string moc { get; set; } + public string filter { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoHandle/MocQueryResult.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoHandle/MocQueryResult.cs new file mode 100644 index 00000000..c9f8dd08 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoHandle/MocQueryResult.cs @@ -0,0 +1,98 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.MoHandle +{ + public class MocGetArg + { + public List mocList { get; set; } + public TreeFilter treeFilter { get; set; } + public List attrFilter { get; set; } + } + + public class MoDataQueryArg + { + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + public List neList { get; set; } + public List mocList { get; set; } + public List moFilter { get; set; } + public List attrFilter { get; set; } + } + public enum MocQueryResultMoOp + { + create, + update, + delete + } + public class MocQueryResultMoData + { + [JsonConverter(typeof(StringEnumConverter))] + public MocQueryResultMoOp moOp { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string userLabel { get; set; } + } + + public class MoConfigArgMoData + { + [JsonConverter(typeof(StringEnumConverter))] + public MocQueryResultMoOp moOp { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + } + + public class MoConfigArg + { + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + public string ne { get; set; } + public List moData { get; set; } = new List(); + } + public class MoConfigResult + { + public int code { get; set; } + public List successList { get; set; } + } + public class Result + { + public string moc { get; set; } + public List attrNames { get; set; } + public List> values { get; set; } + } + public class MoConfigRelatedResultSuccessList + { + public string neId { get; set; } + public string ManagedElementType { get; set; } + } + + public class MoConfigRelatedResult + { + public int code { get; set; } + public List successList { get; set; } + } + + //public class MoQueryResult + //{ + // public int code { get; set; } + + // public string message { get; set; } + + // public List result { get; set; } + //} + + //public class MoConfigArgMoData + //{ + // public string mocName { get; set; } + // public string ldn { get; set; } + // public string antType { get; set; } + // public string antGain { get; set; } + // public string antGap { get; set; } + // public string antUnitsNumber { get; set; } + // public string antModel { get; set; } + // public DateTime lastModifiedTime { get; set; } + //} +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoOp.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoOp.cs new file mode 100644 index 00000000..39794c36 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoOp.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum MoOp + { + create, + update, + delete + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultBaseT.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultBaseT.cs new file mode 100644 index 00000000..2b556d21 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultBaseT.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoQueryResultBase + { + public int code { get; set; } + + public string message { get; set; } + + public List> result { get; set; } + } + public class MoQueryResultData + { + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + public string ne { get; set; } + [JsonProperty("moData")] + public List MoData { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultMsRATPriFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultMsRATPriFDDLTE.cs new file mode 100644 index 00000000..77a30ca1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultMsRATPriFDDLTE.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoQueryResultMsRATPriFDDLTE + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string ratPriority4 { get; set; } + public string ratPriority3 { get; set; } + public string ratPriority2 { get; set; } + public string ratPriority1 { get; set; } + public string ratPriority8 { get; set; } + public string ratPriority7 { get; set; } + public string moId { get; set; } + public string ratPriority6 { get; set; } + public string ratPriority5 { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultNRPhysicalCellDU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultNRPhysicalCellDU.cs new file mode 100644 index 00000000..0ba7047c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/MoQueryResultNRPhysicalCellDU.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class MoQueryResultNRPhysicalCellDU + { + public string nrCellScene { get; set; } + public string oneSRORmoreSRforUE { get; set; } + public string pdschMappingTypeChoice { get; set; } + public string rateMatchStrategySwch { get; set; } + public string reserved128 { get; set; } + public string ueSyncCmpIndTimer { get; set; } + public string srsAntiInterferenceSwitch { get; set; } + public string bwpCfgType { get; set; } + public string gnssPredictStartTimer { get; set; } + public string reserved129 { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string pMaxConfigSwitch { get; set; } + public string schduleLimitaionEnable { get; set; } + public string timeSequenceTestMode { get; set; } + public string qcellFlag { get; set; } + public string reserved131 { get; set; } + public string firstActiveDownlinkBWPId { get; set; } + public string reserved130 { get; set; } + public string reserved50 { get; set; } + public string mocName { get; set; } + public string reserved137 { get; set; } + public string reserved136 { get; set; } + public string reserved139 { get; set; } + public string reserved138 { get; set; } + public string reserved133 { get; set; } + public string bwpInactivityTimer { get; set; } + public string reserved132 { get; set; } + public string reserved135 { get; set; } + public string reserved134 { get; set; } + public string ulCceRatio4DedCoreset { get; set; } + public string speedMaxThr { get; set; } + public string duplexMode { get; set; } + public string puschBlankingEnable { get; set; } + public string reserved43 { get; set; } + public string reserved140 { get; set; } + public string reserved42 { get; set; } + public string reserved41 { get; set; } + public string reserved142 { get; set; } + public string reserved40 { get; set; } + public string reserved141 { get; set; } + public string reserved148 { get; set; } + public string reserved147 { get; set; } + public string reserved49 { get; set; } + public string tciSwitch { get; set; } + public string reserved48 { get; set; } + public string reserved149 { get; set; } + public string reserved47 { get; set; } + public string reserved144 { get; set; } + public string reserved46 { get; set; } + public string reserved143 { get; set; } + public string blankingRBstart { get; set; } + public string reserved45 { get; set; } + public string reserved146 { get; set; } + public string reserved44 { get; set; } + public string reserved145 { get; set; } + public string dlResRBPropShare { get; set; } + public string cellAtt { get; set; } + public string imsEmergencySupport { get; set; } + public string gnssPredictEndTimer { get; set; } + public string reserved32 { get; set; } + public string reserved151 { get; set; } + public string reserved31 { get; set; } + public string reserved150 { get; set; } + public string reserved153 { get; set; } + public string reserved152 { get; set; } + public string initLimitSchdPRBPos { get; set; } + public string sib1Periodicity { get; set; } + public string reserved159 { get; set; } + public string reserved39 { get; set; } + public string reserved158 { get; set; } + public string reserved38 { get; set; } + public string reserved37 { get; set; } + public string reserved36 { get; set; } + public string reserved155 { get; set; } + public string reserved35 { get; set; } + public string reserved154 { get; set; } + public string moId { get; set; } + public string reserved34 { get; set; } + public string reserved157 { get; set; } + public string reserved33 { get; set; } + public string reserved156 { get; set; } + public string initSchdBandwidth { get; set; } + public string sliceGuarRBSwit { get; set; } + public string highPowUESwitch { get; set; } + public string dssGSCNOffset { get; set; } + public string reserved162 { get; set; } + public string reserved161 { get; set; } + public string reserved164 { get; set; } + public string msg2Msg4TransOnMbsfnSwitch { get; set; } + public string reserved163 { get; set; } + public string resourceExpansion { get; set; } + public string reserved160 { get; set; } + public string nrCellCapaLeveInd { get; set; } + public string reserved169 { get; set; } + public string reserved166 { get; set; } + public string reserved165 { get; set; } + public string reserved168 { get; set; } + public string ucNeighbCrsPortInd { get; set; } + public string reserved167 { get; set; } + public string userExpSwitch { get; set; } + public string ulResRBPropShare { get; set; } + public string blankingRBnum { get; set; } + public string bwpParamSuiteLastApply { get; set; } + public string superCarrierId { get; set; } + public string pdcchPowerAdaptSwitch { get; set; } + public string cellReservedForOtherUse { get; set; } + public string masterOperatorId { get; set; } + public string reserved173 { get; set; } + public string reserved172 { get; set; } + public string reserved175 { get; set; } + public string reserved174 { get; set; } + public string reserved93 { get; set; } + public string spectrumShareScene { get; set; } + public string reserved92 { get; set; } + public string reserved171 { get; set; } + public string reserved91 { get; set; } + public string reserved170 { get; set; } + public string hoSSBNum { get; set; } + public string reserved177 { get; set; } + public string reserved176 { get; set; } + public string pdcchPowerRange { get; set; } + public string reserved179 { get; set; } + public string reserved178 { get; set; } + public string diffSignalPerCPSwitch { get; set; } + public string bwpHOSwitch { get; set; } + public string refNRCarrier { get; set; } + public string netShareModSelect { get; set; } + public string NRCarrierId { get; set; } + public string useFullResumeID { get; set; } + public string tiltAngleThr { get; set; } + public string reserved184 { get; set; } + public string userLabel { get; set; } + public string reserved183 { get; set; } + public string preambleResAllocType { get; set; } + public string srsCarrierSwitchingEnable { get; set; } + public string reserved186 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string reserved185 { get; set; } + public string reserved180 { get; set; } + public string reserved182 { get; set; } + public string gSCNOffset { get; set; } + public string ulCceRatio4Coreset0 { get; set; } + public string reserved181 { get; set; } + public string reserved188 { get; set; } + public string reserved187 { get; set; } + public string cellState { get; set; } + public string diffPlmnMUEnable { get; set; } + public string firstActiveUplinkBWPId { get; set; } + public string netShareCellShareW { get; set; } + public string rptIntervalOfAssistanceInfo { get; set; } + public string cceReservationMode { get; set; } + public string pMax { get; set; } + public string eCallOverIMSSupport { get; set; } + public string nrCarrierGroupId { get; set; } + public string reserved115 { get; set; } + public string reserved114 { get; set; } + public string reserved117 { get; set; } + public string reserved116 { get; set; } + public string reserved113 { get; set; } + public string reserved112 { get; set; } + public string coverageType { get; set; } + public string prbResUsedByOtherLogicCellSwch { get; set; } + public string powerPerRERef { get; set; } + public string nTimingAdvanceOffset { get; set; } + public string reserved118 { get; set; } + public string ldn { get; set; } + public string puschMappingTypeChoice { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MesResultNEObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MesResultNEObject.cs new file mode 100644 index 00000000..a6e92202 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MesResultNEObject.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Globalization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.NetworkElement +{ + public partial class MesResultNEObject + { + [JsonProperty("administrativeState")] + public long AdministrativeState { get; set; } + + [JsonProperty("baseMoc")] + public string BaseMoc { get; set; } + + [JsonProperty("cmDataFreeze")] + public long CmDataFreeze { get; set; } + + [JsonProperty("connectionState")] + public long ConnectionState { get; set; } + + [JsonProperty("connectionType")] + public long ConnectionType { get; set; } + + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("displayName")] + public string DisplayName { get; set; } + + [JsonProperty("engineeringOperation")] + public long EngineeringOperation { get; set; } + + [JsonProperty("gbscid")] + public string Gbscid { get; set; } + + [JsonProperty("id")] + public Guid Id { get; set; } + + [JsonProperty("ipAddress")] + public string IpAddress { get; set; } + + [JsonProperty("isSuppSummTime")] + public long IsSuppSummTime { get; set; } + + [JsonProperty("latitude")] + public string Latitude { get; set; } + + [JsonProperty("location")] + public string Location { get; set; } + + [JsonProperty("lockSatellitesStatus")] + public long LockSatellitesStatus { get; set; } + + [JsonProperty("longitude")] + public string Longitude { get; set; } + + [JsonProperty("maintainState")] + public long MaintainState { get; set; } + + [JsonProperty("managedFunctionInfo")] + public string ManagedFunctionInfo { get; set; } + + [JsonProperty("mcc")] + public string Mcc { get; set; } + + [JsonProperty("mimVersion")] + public string MimVersion { get; set; } + + [JsonProperty("mnc")] + public string Mnc { get; set; } + + [JsonProperty("moc")] + public string Moc { get; set; } + + [JsonProperty("model")] + public string Model { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("nbiId")] + public long NbiId { get; set; } + + [JsonProperty("networkingMode")] + public long NetworkingMode { get; set; } + + [JsonProperty("operationalState")] + public long OperationalState { get; set; } + + [JsonProperty("password")] + public string Password { get; set; } + + [JsonProperty("plmn")] + public string Plmn { get; set; } + + [JsonProperty("port")] + public long Port { get; set; } + + [JsonProperty("priority")] + public long Priority { get; set; } + + [JsonProperty("productInfo")] + public string ProductInfo { get; set; } + + [JsonProperty("protocol")] + public string Protocol { get; set; } + + [JsonProperty("ranShareSwitch")] + public long RanShareSwitch { get; set; } + + [JsonProperty("reConnState")] + public long ReConnState { get; set; } + + [JsonProperty("rncid")] + public string Rncid { get; set; } + + [JsonProperty("subType")] + public string SubType { get; set; } + + [JsonProperty("summTimeEnd")] + public string SummTimeEnd { get; set; } + + [JsonProperty("summTimeStart")] + public string SummTimeStart { get; set; } + + [JsonProperty("summerTimeoffset")] + public long SummerTimeoffset { get; set; } + + [JsonProperty("swInfo")] + public string SwInfo { get; set; } + + [JsonProperty("timeZoneoffset")] + public long TimeZoneoffset { get; set; } + + [JsonProperty("userName")] + public string UserName { get; set; } + + [JsonProperty("vendorName")] + public string VendorName { get; set; } + + [JsonProperty("version")] + public string Version { get; set; } + + [JsonProperty("virtualizationId")] + public long VirtualizationId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MoQueryResultSctp.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MoQueryResultSctp.cs new file mode 100644 index 00000000..1a8b593f --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/MoQueryResultSctp.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.NetworkElement +{ + public class MoQueryResultSctp + { + public string minRTO { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string maxAssoRetran { get; set; } + public string dscp { get; set; } + public string delayAckTime { get; set; } + public string maxInitRetran { get; set; } + public string maxPathRetran { get; set; } + public string radioMode { get; set; } + public string refBandwidthResource { get; set; } + public string refDtls { get; set; } + public string adminState { get; set; } + public string initRTO { get; set; } + public string availStatus { get; set; } + public string remoteIp { get; set; } + public string localPort { get; set; } + public string mocName { get; set; } + public string maxRTO { get; set; } + public string remotePort { get; set; } + public string assoType { get; set; } + public string moId { get; set; } + public string refIp { get; set; } + public string operState { get; set; } + public string ldn { get; set; } + public string congestEndure { get; set; } + public string inOutStreamNum { get; set; } + public string sctpControlState { get; set; } + public string hbInterval { get; set; } + public string primaryPathNo { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/SubnetworksResultObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/SubnetworksResultObject.cs new file mode 100644 index 00000000..aa61763a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/SubnetworksResultObject.cs @@ -0,0 +1,31 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.NetworkElement +{ + public class SubnetworksResultObject + { + [JsonProperty("baseMoc")] + public string BaseMoc { get; set; } + + [JsonProperty("displayName")] + public string DisplayName { get; set; } + + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("moc")] + public string Moc { get; set; } + + [JsonProperty("model")] + public string Model { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("nbiId")] + public string NbiId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/TreeResultNEObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/TreeResultNEObject.cs new file mode 100644 index 00000000..291bb6e3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/NetworkElement/TreeResultNEObject.cs @@ -0,0 +1,44 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.NetworkElement +{ + + public class TreeResultNEObject + { + [JsonProperty("lid")] + public string Lid { get; set; } + + [JsonProperty("plid")] + public string Plid { get; set; } + + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("nbiId")] + public string NbiId { get; set; } + + [JsonProperty("moc")] + public string Moc { get; set; } + + [JsonProperty("displayName")] + public string DisplayName { get; set; } + + [JsonProperty("baseMoc")] + public string BaseMoc { get; set; } + + [JsonProperty("children")] + public List Children { get; set; } + + [JsonProperty("depth")] + public int Depth { get; set; } + + [JsonProperty("hasChildren")] + public bool HasChildren { get; set; } + + [JsonProperty("visible")] + public string Visible { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/Authority.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/Authority.cs new file mode 100644 index 00000000..96d4222a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/Authority.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea +{ + public enum Authority + { + Private = 0, + Public = 1 + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/GetResultTask.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/GetResultTask.cs new file mode 100644 index 00000000..6c0206b0 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/GetResultTask.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea +{ + public class GetResultTask + { + public int code { get; set; } + public string taskNo { get; set; } + public string message { get; set; } = string.Empty; + + public override string ToString() + { + return JsonConvert.SerializeObject(this); + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/PlannedareaActivateArg.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/PlannedareaActivateArg.cs new file mode 100644 index 00000000..95a2432f --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/PlannedareaActivateArg.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea +{ + public class PlannedareaActivateArg + { + public IList neList { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/ValidationArg.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/ValidationArg.cs new file mode 100644 index 00000000..d07e445d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/PlannedArea/ValidationArg.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea +{ + public class ValidationArg + { + public IList neList { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEUtranRelationFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEUtranRelationFDDLTE.cs new file mode 100644 index 00000000..1d8b1ec3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEUtranRelationFDDLTE.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgEUtranRelationFDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EUtranRelationFDDLTE"; + public string refCUEUtranCellFDDLTE { get; set; } + public string refExternalEUtranCellFDDLTE { get; set; } + } + + public class MoConfigArgEUtranRelationTDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EUtranRelationTDDLTE"; + //public string refExternalEUtranCellTDDLTE { get; set; } + public string refCUEUtranCellTDDLTE { get; set; } + } + public class MoConfigArgEUtranRelationTDDLTE_refExternalEUtranCellTDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EUtranRelationTDDLTE"; + //public string refExternalEUtranCellTDDLTE { get; set; } + public string refExternalEUtranCellTDDLTE { get; set; } + } + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEutranCellRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEutranCellRelation.cs new file mode 100644 index 00000000..24365864 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgEutranCellRelation.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgEutranCellRelation : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EutranCellRelation"; + public string refExternalEutranCellTDD { get; set; } + public string refExternalEutranCellFDD { get; set; } + } + public class MoConfigArgEutranCellRelationTDD : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EutranCellRelation"; + public string refExternalEutranCellTDD { get; set; } + } + public class MoConfigArgEutranCellRelationFDD : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "EutranCellRelation"; + public string refExternalEutranCellFDD { get; set; } + } + public class MoConfigArgNrNiborRelaFDDLTEDel : MoConfigArgObject + { + public override string mocName => "NrNiborRelaFDDLTE"; + } + public class MoConfigArgNrNiborRelaTDDLTEDel : MoConfigArgObject + { + public override string mocName => "NrNiborRelaTDDLTE"; + } + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalEutranCellFDD.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalEutranCellFDD.cs new file mode 100644 index 00000000..5a89413b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalEutranCellFDD.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgExternalEutranCellFDD : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "ExternalEutranCellFDD"; + public string eNBId { get; set; } + public string pLMNId { get; set; } + public string cellLocalId { get; set; } + public string pLMNIdList { get; set; } + } + public class MoConfigArgExternalEutranCellTDD : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "ExternalEutranCellTDD"; + public string eNBId { get; set; } + public string pLMNId { get; set; } + public string cellLocalId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNRCellCU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNRCellCU.cs new file mode 100644 index 00000000..2bb33ce1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNRCellCU.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgExternalNRCellCU : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "ExternalNRCellCU"; + public string pLMNId { get; set; } + public string gNBId { get; set; } + public string cellLocalId { get; set; } + public string refNRFreq { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNrCellLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNrCellLTE.cs new file mode 100644 index 00000000..9439d50f --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgExternalNrCellLTE.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgExternalNrCellLTE : MoConfigArgObject + { + public override string mocName => "ExternalNrCellLTE"; + public string moId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string pci { get; set; } + public string gNodeBId { get; set; } + public string cellLocalId { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + public string centerFreq { get; set; } + public int freqBandInd { get; set; } + public double nrPointA { get; set; } + } + public class MoConfigArgExternalNrCellLTE2 : MoConfigArgObject + { + public override string mocName => "ExternalNrCellLTE"; + public string moId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string gNodeBId { get; set; } + public string cellLocalId { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + public string centerFreq { get; set; } + } + public class MoConfigArgExternalNrCellFDDLTE : MoConfigArgObject + { + public override string mocName => "ExternalNrCellFDDLTE"; + public string moId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string pci { get; set; } + public string gNodeBId { get; set; } + public string cellLocalId { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + public double centerFreq { get; set; } + public int freqBandInd { get; set; } + public double nrPointA { get; set; } + } + public class MoConfigArgExternalNrCellFDDLTE2 : MoConfigArgObject + { + public override string mocName => "ExternalNrCellFDDLTE"; + public string moId { get; set; } + public string mcc { get; set; } + public string mnc { get; set; } + public string pci { get; set; } + public string gNodeBId { get; set; } + public string cellLocalId { get; set; } + public string mcclist { get; set; } + public string mnclist { get; set; } + public string centerFreq { get; set; } + } + public class MoConfigArgExternalNrCellFDDLTE3 : MoConfigArgObject + { + public override string mocName => "ExternalNrCellFDDLTE"; + public string nrPointADL { get; set; } + public string nrPointAUL { get; set; } + public string centerFreqDL { get; set; } + } + public class MoConfigArgExternalNrCellLTE3 : MoConfigArgObject + { + public override string mocName => "ExternalNrCellLTE"; + public string nrPointA { get; set; } + public string centerFreq { get; set; } + } + public class MoConfigArgEndcPlmnFDDLTE : MoConfigArgObject + { + public override string mocName => "EndcPlmnFDDLTE"; + public string enDcSwch1 { get; set; } + } + public class MoConfigArgEndcPlmnTDDLTE : MoConfigArgObject + { + public override string mocName => "EndcPlmnTDDLTE"; + public string enDcSwch1 { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRCellRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRCellRelation.cs new file mode 100644 index 00000000..71b47678 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRCellRelation.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgNRCellRelation : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NRCellRelation"; + public string refNRCellCU { get; set; } + } + public class MoConfigArgExternalNRCellRelation : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NRCellRelation"; + public string refExternalNRCellCU { get; set; } + } + public class MoConfigArgNRCellRelationDel : MoConfigArgObject + { + public override string mocName => "NRCellRelation"; + } + public class MoConfigArgEUtranRelationTDDLTEDel : MoConfigArgObject + { + public override string mocName => "EUtranRelationTDDLTE"; + } + + public class MoConfigArgEUtranRelationFDDLTEDel : MoConfigArgObject + { + public override string mocName => "EUtranRelationFDDLTE"; + } +} + diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRExternalCellRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRExternalCellRelation.cs new file mode 100644 index 00000000..f3ff709c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNRExternalCellRelation.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgNRExternalCellRelation : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NRCellRelation"; + public string refExternalNRCellCU { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNrNiborRelaFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNrNiborRelaFDDLTE.cs new file mode 100644 index 00000000..53c1fa8c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgNrNiborRelaFDDLTE.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgNrNiborRelaFDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NrNiborRelaFDDLTE"; + + public string refExternalNrCellFDDLTE { get; set; } + public string refExternalNrCellLTE { get; set; } + } + public class MoConfigArgNrNiborRelaFDDLTE_NrCellLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NrNiborRelaFDDLTE"; + public string refExternalNrCellLTE { get; set; } + } + public class MoConfigArgNrNiborRelaFDDLTE_NrCellFDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NrNiborRelaFDDLTE"; + public string refExternalNrCellFDDLTE { get; set; } + } + public class MoConfigArgNrNiborRelaTDDLTE_NrCellLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NrNiborRelaTDDLTE"; + public string refExternalNrCellLTE { get; set; } + } + public class MoConfigArgNrNiborRelaTDDLTE_NrCellFDDLTE : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NrNiborRelaTDDLTE"; + public string refExternalNrCellFDDLTE { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgSsbMeasInfo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgSsbMeasInfo.cs new file mode 100644 index 00000000..a146efca --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoConfigArgSsbMeasInfo.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoConfigArgSsbMeasInfo : MoConfigArgObject + { + public override string mocName => "SsbMeasInfo"; + public string moId { get; set; } + public string frequency { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEUtranRelationFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEUtranRelationFDDLTE.cs new file mode 100644 index 00000000..1846ac16 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEUtranRelationFDDLTE.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultEUtranRelationFDDLTE + { + public string userLabel { get; set; } + public string overlapCoverage { get; set; } + public DateTime lastModifiedTime { get; set; } + public string coverESCell { get; set; } + public string noSupMobilitySwch { get; set; } + public string overlapRateUpdateSwch { get; set; } + public string overlapRate { get; set; } + public string bigSRVHOIndUL { get; set; } + public string switchonTimeWindow { get; set; } + public string isBasicCoverageCell { get; set; } + public string coperType { get; set; } + public string refExternalEUtranCellTDDLTE { get; set; } + public string whiteListNbrInd { get; set; } + public string isRemoveAllowed { get; set; } + public string cellIndivOffset { get; set; } + public string bigSRVHOIndDL { get; set; } + public string isHOAllowed { get; set; } + public string s1DataFwdFlag { get; set; } + public string refCUEUtranCellTDDLTE { get; set; } + public string stateInd { get; set; } + public string resPRBDown { get; set; } + public string cellIndiOffstPlmn { get; set; } + public string autoShareCover { get; set; } + public string algLTENBRRsved1 { get; set; } + public string mocName { get; set; } + public string nSACellIndivOffset { get; set; } + public string refCUEUtranCellFDDLTE { get; set; } + public string hSpeedRailCellInd { get; set; } + public string coperModSwch { get; set; } + public string isESCoveredBy { get; set; } + public string moId { get; set; } + public string supportMRO { get; set; } + public string ldn { get; set; } + public string lbIntraMeasureOffset { get; set; } + public string shareCover { get; set; } + public string numRRCCntNumCov { get; set; } + public string qofStCell { get; set; } + public string resPRBUp { get; set; } + public string isAnrCreated { get; set; } + public string refExternalEUtranCellFDDLTE { get; set; } + public string isX2HOAllowed { get; set; } + public string nSACellIndOffPlmn { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEutranCellRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEutranCellRelation.cs new file mode 100644 index 00000000..9ae87e65 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultEutranCellRelation.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultEutranCellRelation + { + public string controlMode { get; set; } + public string anrIndicator { get; set; } + public string coAAUState { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string qRxLevMinOffsetCell { get; set; } + public string mocName { get; set; } + public string refExternalEutranCellTDD { get; set; } + public string eutranNeighCovOverlap { get; set; } + public string esCellType { get; set; } + public string removeAllowed { get; set; } + public string moId { get; set; } + public string coverType { get; set; } + public string voiceMobilitySwch { get; set; } + public string hoState { get; set; } + public string ldn { get; set; } + public string cellIndividualOffset { get; set; } + public string refExternalEutranCellFDD { get; set; } + public string qQualMinOffsetCell { get; set; } + public string useState { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEUtranCellFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEUtranCellFDDLTE.cs new file mode 100644 index 00000000..7b8e87f5 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEUtranCellFDDLTE.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultExternalEUtranCellFDDLTE + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string earfcnDl { get; set; } + public string algLTEFDDRsved1 { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string nbrEnDcAnchorInd { get; set; } + public string mcc { get; set; } + public string cellMbsfnAtt { get; set; } + public string massiveMIMOInd { get; set; } + public string esCellNum { get; set; } + public string rsrpThrPrachInfoList { get; set; } + public string earfcnUl { get; set; } + public string pci { get; set; } + public string tac { get; set; } + public string bandWidthUl { get; set; } + public string alias { get; set; } + public string buildPhyLocation { get; set; } + public string voLTESwch { get; set; } + public string freqBandPriSwch { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string antPort1 { get; set; } + public string addiFreqBand { get; set; } + public string mocName { get; set; } + public string bandWidthDl { get; set; } + public string eNBId { get; set; } + public string emtcSwch { get; set; } + public string freqBandPriInd { get; set; } + public string moId { get; set; } + public string cellType { get; set; } + public string ldn { get; set; } + public string mcclist { get; set; } + } + + public class ExternalEUtranCellTDDLTE + { + public string bandWidth { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string nbrEnDcAnchorInd { get; set; } + public string mcc { get; set; } + public string cellMbsfnAtt { get; set; } + public string massiveMIMOInd { get; set; } + public string esCellNum { get; set; } + public string rsrpThrPrachInfoList { get; set; } + public string algLTETDDRsved1 { get; set; } + public string pci { get; set; } + public string tac { get; set; } + public string alias { get; set; } + public string buildPhyLocation { get; set; } + public string earfcn { get; set; } + public string voLTESwch { get; set; } + public string freqBandPriSwch { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string antPort1 { get; set; } + public string addiFreqBand { get; set; } + public string mocName { get; set; } + public string eNBId { get; set; } + public string emtcSwch { get; set; } + public string freqBandPriInd { get; set; } + public string moId { get; set; } + public string cellType { get; set; } + public string ldn { get; set; } + public string mcclist { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEutranCellFDD.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEutranCellFDD.cs new file mode 100644 index 00000000..02adc654 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalEutranCellFDD.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultExternalEutranCellFDD + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string frequencyDL { get; set; } + public string antPort1 { get; set; } + public string mocName { get; set; } + public string eNBId { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string pLMNId { get; set; } + public string moId { get; set; } + public string frequencyUL { get; set; } + public string bandIndicator { get; set; } + public string ldn { get; set; } + public string pci { get; set; } + public string tac { get; set; } + public string pLMNIdList { get; set; } + public string dlBandWidth { get; set; } + public string ulBandWidth { get; set; } + public string longitude { get; set; } + } + + public class MoQueryResultExternalEutranCellTDD + { + public string bandWidth { get; set; } + public string anrIndicator { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string antPort1 { get; set; } + public string mocName { get; set; } + public string eNBId { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string pLMNId { get; set; } + public string moId { get; set; } + public string frequency { get; set; } + public string bandIndicator { get; set; } + public string ldn { get; set; } + public string pci { get; set; } + public string tac { get; set; } + public string pLMNIdList { get; set; } + public string supportPowerShare { get; set; } + public string longitude { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalNRCellCU.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalNRCellCU.cs new file mode 100644 index 00000000..2976b0b6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultExternalNRCellCU.cs @@ -0,0 +1,3334 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultExternalNRCellCU + { + public string userLabel { get; set; } + public string supportNetworkType { get; set; } + public DateTime lastModifiedTime { get; set; } + public string pointAFrequencyUL { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string pLMNId { get; set; } + public string subcarrierSpacingUL { get; set; } + public string offsetToCarrierDL { get; set; } + public string tac { get; set; } + public string gNBId { get; set; } + public string freqBandListUL { get; set; } + public string bandwidthDL { get; set; } + public string longitude { get; set; } + public string frequencyDL { get; set; } + public string mocName { get; set; } + public string refNRFreq { get; set; } + public string offsetToCarrierUL { get; set; } + public string nRPCI { get; set; } + public string freqBandListDL { get; set; } + public string moId { get; set; } + public string bandwidthUL { get; set; } + public string configuredEpsTAC { get; set; } + public string coverageType { get; set; } + public string frequencyUL { get; set; } + public string ranac { get; set; } + public string pointAFrequencyDL { get; set; } + public string ldn { get; set; } + public string duplexMode { get; set; } + public string pLMNIdList { get; set; } + public string gNBIdLength { get; set; } + public string subcarrierSpacingDL { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class ExternalNRCellCU + { + public string userLabel { get; set; } + public string supportNetworkType { get; set; } + public DateTime lastModifiedTime { get; set; } + public string pointAFrequencyUL { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string pLMNId { get; set; } + public string subcarrierSpacingUL { get; set; } + public string offsetToCarrierDL { get; set; } + public string tac { get; set; } + public string pNINPNIdList { get; set; } + public string gNBId { get; set; } + public string freqBandListUL { get; set; } + public string bandwidthDL { get; set; } + public string longitude { get; set; } + public string frequencyDL { get; set; } + public string mocName { get; set; } + public string refNRFreq { get; set; } + public string offsetToCarrierUL { get; set; } + public string nRPCI { get; set; } + public string freqBandListDL { get; set; } + public string moId { get; set; } + public string bandwidthUL { get; set; } + public string configuredEpsTAC { get; set; } + public string coverageType { get; set; } + public string frequencyUL { get; set; } + public string ranac { get; set; } + public string pointAFrequencyDL { get; set; } + public string ldn { get; set; } + public string duplexMode { get; set; } + public string pLMNIdList { get; set; } + public string gNBIdLength { get; set; } + public string subcarrierSpacingDL { get; set; } + } + public class ExternalNRCellCUResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class ExternalNRCellCURoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + public class NRCellCU + { + public string reserved65 { get; set; } + public string reserved64 { get; set; } + public string reserved63 { get; set; } + public string reserved62 { get; set; } + public string reserved61 { get; set; } + public string cellLocalId { get; set; } + public string azimuth { get; set; } + public string reserved69 { get; set; } + public string reserved68 { get; set; } + public string reserved67 { get; set; } + public string reserved66 { get; set; } + public string pciReuseDistance { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string ssbFrequency { get; set; } + public string longitude { get; set; } + public string masterOperatorId { get; set; } + public string reserved98 { get; set; } + public string mocName { get; set; } + public string reserved99 { get; set; } + public string sonModifyPciSwitch { get; set; } + public string cityLabel { get; set; } + public string userLabel { get; set; } + public string duMeMoId { get; set; } + public string altitude { get; set; } + public DateTime lastModifiedTime { get; set; } + public string latitude { get; set; } + public string reserved80 { get; set; } + public string pciSectionID { get; set; } + public string reserved100 { get; set; } + public string cellState { get; set; } + public string nsaState { get; set; } + public string plmnIdList { get; set; } + public string operatorPriority { get; set; } + public string frequencyBandList { get; set; } + public string serviceStatus { get; set; } + public string saState { get; set; } + public string testState { get; set; } + public string reserved76 { get; set; } + public string reserved75 { get; set; } + public string reserved74 { get; set; } + public string reserved73 { get; set; } + public string nrCarrierGroupId { get; set; } + public string reserved72 { get; set; } + public string reserved71 { get; set; } + public string reserved70 { get; set; } + public string reserved79 { get; set; } + public string moId { get; set; } + public string pciReuseLayers { get; set; } + public string reserved78 { get; set; } + public string reserved77 { get; set; } + public string coverageType { get; set; } + public string mbsSwitch { get; set; } + public string ldn { get; set; } + } + public class GNBDUFunction + { + public string userLabel { get; set; } + public string reserved9 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string reserved8 { get; set; } + public string reserved302 { get; set; } + public string pLMNId { get; set; } + public string reserved301 { get; set; } + public string reserved304 { get; set; } + public string specialSharingModeSwch { get; set; } + public string reserved303 { get; set; } + public string gNBDUName { get; set; } + public string RrcVersion { get; set; } + public string holdoverTime { get; set; } + public string reserved305 { get; set; } + public string reserved3 { get; set; } + public string gNBId { get; set; } + public string gNBDUId { get; set; } + public string reserved2 { get; set; } + public string reserved1 { get; set; } + public string reserved7 { get; set; } + public string backupGnbId { get; set; } + public string reserved6 { get; set; } + public string reserved5 { get; set; } + public string reserved4 { get; set; } + public string reserved10 { get; set; } + public string mocName { get; set; } + public string caSupport { get; set; } + public string moId { get; set; } + public string reserved255 { get; set; } + public string gNBLoggedMdtMaxUeNum { get; set; } + public string ldn { get; set; } + public string gNBIdLength { get; set; } + } + public class NRCellDU + { + public string reserved21 { get; set; } + public string reserved20 { get; set; } + public string cellLocalId { get; set; } + public string reserved29 { get; set; } + public string reserved28 { get; set; } + public string epsTacSwch { get; set; } + public string reserved27 { get; set; } + public string reserved26 { get; set; } + public string tacSwch { get; set; } + public string reserved25 { get; set; } + public string reserved24 { get; set; } + public string reserved23 { get; set; } + public string reserved22 { get; set; } + public string refNRPhysicalCellDU { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string specialShareCellSwitch { get; set; } + public string tac { get; set; } + public string cellEsState { get; set; } + public string ulweakCellDetectionSwch { get; set; } + public string masterOperatorId { get; set; } + public string netShareCellW { get; set; } + public string reserved97 { get; set; } + public string reserved96 { get; set; } + public string reserved95 { get; set; } + public string reserved94 { get; set; } + public string mocName { get; set; } + public string reserved18 { get; set; } + public string reserved17 { get; set; } + public string reserved16 { get; set; } + public string reserved15 { get; set; } + public string reserved14 { get; set; } + public string refPlmnIdList { get; set; } + public string reserved13 { get; set; } + public string reserved12 { get; set; } + public string reserved11 { get; set; } + public string resSharePrbRatioPlmnGrp { get; set; } + public string operState { get; set; } + public string reserved19 { get; set; } + public string pNINPNCagIdList { get; set; } + public string prbResUsedByOtherPlmnGrpSwch { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string evadeMode { get; set; } + public string cellState { get; set; } + public string licenseType { get; set; } + public string reserved309 { get; set; } + public string reserved306 { get; set; } + public string serviceStatus { get; set; } + public string reserved308 { get; set; } + public string reserved307 { get; set; } + public string adminState { get; set; } + public string imsEmergencySupport { get; set; } + public string cellReservedForOperatorUse { get; set; } + public string plThrd4ULWeakCell { get; set; } + public string testState { get; set; } + public string reserved30 { get; set; } + public string nrCarrierGroupId { get; set; } + public string nRTAC { get; set; } + public string rnac { get; set; } + public string moId { get; set; } + public string reserved310 { get; set; } + public string configuredEpsTAC { get; set; } + public string rmsiTransSwitch { get; set; } + public string ldn { get; set; } + public string rmsiTransSwitch4NSA { get; set; } + public string standbyStatus { get; set; } + } + public class ENBCUCPFunction + { + public string userLabel { get; set; } + public string gnbIdLength { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string eNBId { get; set; } + public string additionalMccList { get; set; } + public string additionalMncList { get; set; } + public string mcc { get; set; } + public string moId { get; set; } + public string enbName { get; set; } + public string radioMode { get; set; } + public string ldn { get; set; } + } + public class TddConfig + { + public string gpNum { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string frameType2 { get; set; } + public string nrofUplinkSymbols2 { get; set; } + public string frameType1 { get; set; } + public string nrofUplinkSymbols1 { get; set; } + public string moId { get; set; } + public string dlCommPdcPdsMaxLen { get; set; } + public string frameType2Present { get; set; } + public string ldn { get; set; } + public string nrofDownlinkSymbols1 { get; set; } + public string nrofDownlinkSymbols2 { get; set; } + public string flexibleSymbol4GP { get; set; } + public string dlULTransmissionPeriodicity2 { get; set; } + public string dlULTransmissionPeriodicity1 { get; set; } + } + public class PBCH + { + public string controlResourceSetZero { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string searchSpaceZero { get; set; } + public string ldn { get; set; } + public string ssbSubcarrierSpacing { get; set; } + public string coreset0RbAndSymbNum { get; set; } + public string moId { get; set; } + public string ssbPeriodicityServingCell { get; set; } + } + public class PCCHConfig + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ns { get; set; } + public string pagingTimeoutDiscardTimer { get; set; } + public string pagingTbMinScaleFactor { get; set; } + public string firstPDCCHMoOfPO { get; set; } + public string moId { get; set; } + public string n { get; set; } + public string pagingTbScalePriorityThr { get; set; } + public string pfOffset { get; set; } + public string pagingTransNum { get; set; } + public string ldn { get; set; } + public string defaultPagingCycle { get; set; } + } + public class PagingLTE + { + public string pagingRepeatTime { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string modificationPeriodCoeff { get; set; } + public string pagingAdaptiveSwch { get; set; } + public string pagingCapacityOptSwch { get; set; } + public string moId { get; set; } + public string pagingStormDetectPeriod { get; set; } + public string pagingNumStaPrd { get; set; } + public string pagingCapacityPercent { get; set; } + public string ldn { get; set; } + public string defaultPagingCycle { get; set; } + public string cSPagRepeatTime { get; set; } + public string pagingStormEndPeriodNum { get; set; } + public string pagingAdaptivePrd { get; set; } + } + public class PDCP + { + public string drb5qi { get; set; } + public DateTime lastModifiedTime { get; set; } + public string snSizeUl { get; set; } + public string mocName { get; set; } + public string rlcMode { get; set; } + public string reorderTimer { get; set; } + public string profile0x0002 { get; set; } + public string profile0x0001 { get; set; } + public string dlOutOfOrderDelivery { get; set; } + public string moId { get; set; } + public string profile0x0004 { get; set; } + public string gnbReorderTimer { get; set; } + public string discardTimer { get; set; } + public string snSizeDl { get; set; } + public string maxCID { get; set; } + public string ldn { get; set; } + public string ulPdcpStatusReportSwitch { get; set; } + public string ulOutOfOrderDelivery { get; set; } + public string ranPdbAsDiscardTimerSwch { get; set; } + public string gnbDiscardTimer { get; set; } + } + public class PDCPLTE + { + public string deflateUDCCtxtMemSizeMax { get; set; } + public string pdcpStatRptInd { get; set; } + public string profile6Ul { get; set; } + public string tReordering { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string profile4 { get; set; } + public string profile1 { get; set; } + public string profile2 { get; set; } + public string deflateUDCSupport { get; set; } + public string profile257 { get; set; } + public string moId { get; set; } + public string ulDataCompSupport { get; set; } + public string profile6 { get; set; } + public string maxCidUl { get; set; } + public string maxCid { get; set; } + public string qCI { get; set; } + public string ldn { get; set; } + public string ulDataCompCtxtMemSizeMax { get; set; } + public string deflateUDCStandardDic { get; set; } + } + public class PHR + { + public string prdPhrTimer { get; set; } + public string phtPhrTimer { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string dlPathlossChgTh { get; set; } + public string moId { get; set; } + } + public class PhyChannelTDDLTE + { + + public string coMPTReorderingFdd { get; set; } + + public string coMPCellBlerLThr { get; set; } + + public string aperiodicSRSSwch { get; set; } + + public string lTEDlAvoidNRMode { get; set; } + + public string bstFreSelRatioUl { get; set; } + + public string vTDataRBThrd { get; set; } + + public string tm49McsRatioThr4TMM { get; set; } + + public string nonidealLatencyCoMPSwch { get; set; } + + public string ttiBMutexDRXSwch { get; set; } + + public string mmRatioSwch { get; set; } + + public string cqiRptPeriod { get; set; } + + public string specShareUlRbGuaPolicy { get; set; } + + public string singleRBSinr4WeakUser { get; set; } + + public string dLTMMForbidSfnRandSwch { get; set; } + + public string dci0LostThr4WeakUe { get; set; } + + public string rbForbiddenBitMapDL { get; set; } + + public string tm4toTm8McsThr8TX { get; set; } + + public string lowLoadBSR { get; set; } + + public string pimUlChanCloseRbRatioThr { get; set; } + + public string smallBSRCoeffiPairOpt { get; set; } + + public string mocName { get; set; } + + public string tTIBundWithoutQCI1Swch { get; set; } + + public string dualPilotCeSwch { get; set; } + + public string tM9OpenloopRI2LowThr { get; set; } + + public string orthPrjSwch { get; set; } + + public string weakUeSchdCtrlSwch { get; set; } + + public string sPIDBasedPUCCH3ConfigSwch { get; set; } + + public string pucch5RB { get; set; } + + public string coMPCellPeriod { get; set; } + + public string schmeModeSelect { get; set; } + + public string lTEUlAvoidNRMode { get; set; } + + public string tm48SchdSEThr8TX { get; set; } + + public string srsBlankRBOptSwch { get; set; } + + public string svdOptFlag { get; set; } + + public string diagFactor { get; set; } + + public string atmosDuctTMOptSwch { get; set; } + + public string highPimUeSelectPolicy { get; set; } + + public string ulInterfereX { get; set; } + + public string tansAntenSel { get; set; } + + public string pucchSrNum { get; set; } + + public string tm84TestMcsThr8TX4RX { get; set; } + + public string pucchBlankFlag { get; set; } + + public string ul256QamDemSpInd4DCI0 { get; set; } + + public string ttiBundSinrIn4QCI1 { get; set; } + + public string speUeTpyeSel4EnRbAlloc { get; set; } + + public string periodCqiFbMethd { get; set; } + + public string pimDlHighFreqBandConfig { get; set; } + + public string srsTrP { get; set; } + + public string tM9OpenloopRI58LowThr { get; set; } + + public string tm9PmiRIReport { get; set; } + + public string tTIBuningWithQCI1swchDl { get; set; } + + public string atmosChaSeq20BitSwch { get; set; } + + public string hoppingMode { get; set; } + + public string farPointCeOptMcsThr { get; set; } + + public string srAccafterOptSwch { get; set; } + + public string dlSpecUserFreqSelectSwch { get; set; } + + public string stopUlSchdAftMsg3HFSwch { get; set; } + + public string bigGrantBSR { get; set; } + + public string tm94McsRatioRollBackThr4TMM { get; set; } + + public string pucchPuschSimulTraInd { get; set; } + + public string pim5DetectBaseChannel { get; set; } + + public string uLHstSdmaSwch { get; set; } + + public string nRSAllocRBNumUl { get; set; } + + public string diagSwitch { get; set; } + + public string sRSResConfigMethod { get; set; } + + public string moId { get; set; } + + public string tTIBSinrDiscardThre { get; set; } + + public string sINRThr4SpeEdgeUe { get; set; } + + public string dlPingPreSchdSwitch { get; set; } + + public string cqiAccafterOptSwch { get; set; } + + public string isSupportDualTM8 { get; set; } + + public string sRSResDisCellNum { get; set; } + + public string pucchNcsAn { get; set; } + + public string srbAdpRetxOptInFreqSwch { get; set; } + + public string dsrTransMax { get; set; } + + public string mobilityEnhanceSwch { get; set; } + + public string srsIniBW { get; set; } + + public string ulRbForbiddenBitMap { get; set; } + + public string noIdealSftBitThr { get; set; } + + public string ttiBundSinrOut { get; set; } + + public string maskGain4BMIMO { get; set; } + + public string schdTimesThr4WeakUe { get; set; } + + public string bFtoTm3TestMcsThr8Tx4Rx { get; set; } + + public string speUeNum4EnPrbLocAlloc { get; set; } + + public string srsMaxUpPts { get; set; } + + public string pucchAckRepNum { get; set; } + + public string muTBsizeFactor2 { get; set; } + + public string muTBsizeFactor1 { get; set; } + + public string ulWeakUeNoSchdTime { get; set; } + + public string coMPTStatusProhibt { get; set; } + + public string pucch3RB { get; set; } + + public string srSecPeriodQCI { get; set; } + + public string tm8Ant4CdBk { get; set; } + + public string pucchRsvRBOpt4CFI { get; set; } + + public string maxSDMAlayerThrd { get; set; } + + public string rbHighThrOfFullSchForMMUl { get; set; } + + public string maxUserPucchfmt2 { get; set; } + + public string sRSecAlloSwch { get; set; } + + public string farPointAperiodicCQISwch { get; set; } + + public string uLComRatioCfg { get; set; } + + public string pim3DetectBaseChannel { get; set; } + + public string cDMALTECutRbNum { get; set; } + + public string cellColor { get; set; } + + public string maxRbOffsetOfDlPrbRand { get; set; } + + public string dLHstSdmaSwch { get; set; } + + public string lastModifiedTime { get; set; } + + public string ulMaxMcsOptSwch { get; set; } + + public string srsNormalResource { get; set; } + + public string manuPwrConvFac { get; set; } + + public string enUlPrbLocAlloc4SpeUeSwch { get; set; } + + public string ulRbRsvNumRatio { get; set; } + + public string ackSrsTraSptInd { get; set; } + + public string cceRatioForCCLR { get; set; } + + public string lowCQIAMCOptSwch { get; set; } + + public string dlEnhancedSchdSwch { get; set; } + + public string pucchCqiRBNum { get; set; } + + public string pRBUnequalPairSwch { get; set; } + + public string antiInterOptSwch { get; set; } + + public string maxRbOffsetOfUlPrbRand { get; set; } + + public string hOWithTTIBSwch { get; set; } + + public string rbLowThrOfNonFullSchForMMUl { get; set; } + + public string maxActiveBeamNum { get; set; } + + public string csiReportMode { get; set; } + + public string tTIBSinrDiscardWin { get; set; } + + public string pbrThrforExitDLComp { get; set; } + + public string pimTargetUeForUlChanClose { get; set; } + + public string largeCapaUeNum { get; set; } + + public string adapSRSSINRTh4MM { get; set; } + + public string srsBWCfg { get; set; } + + public string sVDLamdaThr { get; set; } + + public string pucchOptSwch { get; set; } + + public string dlPrbRandForceModeForDss { get; set; } + + public string tM9OpenloopRI2HighThr { get; set; } + + public string coMPCellResponRatioLThr { get; set; } + + public string srLteOptEnable { get; set; } + + public string cqiRptChNum { get; set; } + + public string srsEnable { get; set; } + + public string srsSubFrameCfg { get; set; } + + public string mmQosPrioritySwch { get; set; } + + public string ttiBundSinrIn { get; set; } + + public string pbrThrforComp { get; set; } + + public string coMPDeltaSINR { get; set; } + + public string ulRbRsvRbLoadThr { get; set; } + + public string ulRBShareAlgSwitch4NR { get; set; } + + public string tMMBeamValidTimer { get; set; } + + public string sccMUOptSwch { get; set; } + + public string dLMMFlowNumThr { get; set; } + + public string falseAntSelIndentifySwch { get; set; } + + public string fMMDssDlRbAllocPolicy { get; set; } + + public string coMPDeltaMCS { get; set; } + + public string nPucch1bP1 { get; set; } + + public string rRC4TM7swch { get; set; } + + public string srsLargePowResource { get; set; } + + public string rnnAvgSwch { get; set; } + + public string lTEDlReserveRBRatioforNR { get; set; } + + public string tM9OpenloopRI34LowThr { get; set; } + + public string cidofCoMP { get; set; } + + public string srTrCHNum { get; set; } + + public string maxMMRBRatio { get; set; } + + public string sRSResDisMethod { get; set; } + + public string sRReconfigSwch { get; set; } + + public string compPLThread { get; set; } + + public string maxNhelpRB { get; set; } + + public string niEigNum { get; set; } + + public string mmEnableUL { get; set; } + + public string iMDSwitch { get; set; } + + public string ueTransPortNum { get; set; } + + public string tTIBSinrFilterThre { get; set; } + + public string ulRbRsvStart { get; set; } + + public string tm84TestMcsThr8TX { get; set; } + + public string tm94TestMcsRatioThr4TMM { get; set; } + + public string tm84TestMcsThrAntSelct8TX { get; set; } + + public string coMPCellResponRatioHThr { get; set; } + + public string sDMASwch42RxUe { get; set; } + + public string pucchSemiAnNum { get; set; } + + public string pim5DetectBaseCarrier { get; set; } + + public string ackNackFdbkMode { get; set; } + + public string tm4toTm8McsThr8TX4RX { get; set; } + + public string rbHighThrOfFullSchedUl { get; set; } + + public string bearForCompSwchDL { get; set; } + + public string tM9OpenloopRI58HighThr { get; set; } + + public string puschIrcMode { get; set; } + + public string dLMMMCSAdptThr { get; set; } + + public string ulWeakUeNormalSchdTime { get; set; } + + public string capacityMarginThr { get; set; } + + public string mmSideNum { get; set; } + + public string tM9MaxlayerNum4BMIMO { get; set; } + + public string bearForCompSwchUL { get; set; } + + public string cCEConsValue4BMIMO { get; set; } + + public string vTDataStatSwch { get; set; } + + public string sSCGRbLimitSwitch8T { get; set; } + + public string tm94TestMcsThr4TMM { get; set; } + + public string pimRankReduceFlag { get; set; } + + public string dlPrbOptGuaType { get; set; } + + public string dlConPreSchdSwitch { get; set; } + + public string ulInterferFixSwch { get; set; } + + public string filterTaCompVal { get; set; } + + public string pucchDeltaShf { get; set; } + + public string ulInterferNIMode { get; set; } + + public string rRCLowThrd4TM7 { get; set; } + + public string srTrPeriod { get; set; } + + public string ulSpecUserFreqSelectSwch { get; set; } + + public string tmmMultTeamNum { get; set; } + + public string srsReserveRatio { get; set; } + + public string mainBeamEnergyRatioThrd { get; set; } + + public string srPriPeriodQCI { get; set; } + + public string tm48McsThr4TMM { get; set; } + + public string tm3toBFMcsThr8Tx4Rx { get; set; } + + public string pucchBlankNum { get; set; } + + public string bufferCSSModeDl { get; set; } + + public string dlRBShareAlgSwitch4NR { get; set; } + + public string coMPCellBlerHThr { get; set; } + + public string calcCorrelaCoeffiOptSwch { get; set; } + + public string swchDAdjCqiMode { get; set; } + + public string srsNormalPeriod { get; set; } + + public string srAccOptSwch { get; set; } + + public string lTEUlReserveRBRatioforNR { get; set; } + + public string freqSelectDl { get; set; } + + public string farPointCeOptRBThr { get; set; } + + public string uLRBRetrOptSwch { get; set; } + + public string bufferCSSModeUl { get; set; } + + public string prbRandNumberDl { get; set; } + + public string ttiBundSinrOut4QCI1 { get; set; } + + public string vTDataStatPrd { get; set; } + + public string tMMBMIMOSwch { get; set; } + + public string tm8Ant2CdBk { get; set; } + + public string rbLowThrOfNonFullSchedUl { get; set; } + + public string coMPCellSchNumThr { get; set; } + + public string puschCqiFbMethd { get; set; } + + public string pim3DetectBaseCarrier { get; set; } + + public string maxCoopNbrCellNum { get; set; } + + public string tm48McsThrAntSelct8TX { get; set; } + + public string orthPrjOptFlag { get; set; } + + public string ttiBundPlIn { get; set; } + + public string pucchSORTDEnable { get; set; } + + public string maxMMRBNum { get; set; } + + public string nd { get; set; } + + public string niPrjManualThr { get; set; } + + public string ng { get; set; } + + public string dBFPairSwch { get; set; } + + public string compCSSwchUL { get; set; } + + public string threshold4CoMPPsUl { get; set; } + + public string extendedBSRSwch { get; set; } + + public string threshold4CoMPCellJudUl { get; set; } + + public string pucchIrcSwch { get; set; } + + public string beamEnergyRatioThrd { get; set; } + + public string dLRetrRBOptSwtch { get; set; } + + public string uLRBRetrOptOLSwch { get; set; } + + public string dmrsWithOCCActivated { get; set; } + + public string spectrumSharingPolicy { get; set; } + + public string tm84TestMcsThr4TMM { get; set; } + + public string sRSSINRTh4MM { get; set; } + + public string puschNsb { get; set; } + + public string phichDuration { get; set; } + + public string ueAntSelIdentifySwch { get; set; } + + public string groupHoppingSwitch { get; set; } + + public string tm49McsThr4TMM { get; set; } + + public string cqiK { get; set; } + + public string srsHopBW { get; set; } + + public string pimDlLowFreqBandConfig { get; set; } + + public string rRCHighThrd4TM7 { get; set; } + + public string vTDataCCEThrd { get; set; } + + public string freqSelectUl { get; set; } + + public string cDMALTECSSSwch { get; set; } + + public string pucchIrcMode { get; set; } + + public string swchTTIBundling { get; set; } + + public string prbRandNumberUl { get; set; } + + public string puschhoppingOffset { get; set; } + + public string tM9OpenloopRI34HighThr { get; set; } + + public string mMDlMuTbsizeSwch { get; set; } + + public string srsLargePowPeriod { get; set; } + + public string harmInterferAvoidMode { get; set; } + + public string ldn { get; set; } + + public string freqDomformSwchDL { get; set; } + + public string ttiBundPlOut { get; set; } + + public string minActiveBeamDis { get; set; } + + public string niCofIndex { get; set; } + + public string numPucch1b { get; set; } + + public string harmonicSwitch { get; set; } + } + + public class PhyChannelFDDLTE + { + public string aperiodicSRSSwch { get; set; } + public string lTEDlAvoidNRMode { get; set; } + public string bstFreSelRatioUl { get; set; } + public string vTDataRBThrd { get; set; } + public string resourceAllocPolicyDL { get; set; } + public string ttiBMutexDRXSwch { get; set; } + public string nrWeightFactorDL { get; set; } + public string mmRatioSwch { get; set; } + public string cqiRptPeriod { get; set; } + public string specShareUlRbGuaPolicy { get; set; } + public string singleRBSinr4WeakUser { get; set; } + public string rbForbiddenBitMapDL { get; set; } + public string resourceAllocPolicyUL { get; set; } + public string periodMutingRBSwch { get; set; } + public string smallBSRCoeffiPairOpt { get; set; } + public string nrWeightFactorUL { get; set; } + public string mocName { get; set; } + public string tTIBundWithoutQCI1Swch { get; set; } + public string dualPilotCeSwch { get; set; } + public string orthPrjSwch { get; set; } + public string pucch5RB { get; set; } + public string lTEUlAvoidNRMode { get; set; } + public string time4MutingRB { get; set; } + public string pimInterfereAvoidMode { get; set; } + public string tansAntenSel { get; set; } + public string pucchSrNum { get; set; } + public string mutingRbNumLow { get; set; } + public string dlShareResAllocPolicy { get; set; } + public string pucchBlankFlag { get; set; } + public string ul256QamDemSpInd4DCI0 { get; set; } + public string ttiBundSinrIn4QCI1 { get; set; } + public string speUeTpyeSel4EnRbAlloc { get; set; } + public string periodCqiFbMethd { get; set; } + public string srsTrP { get; set; } + public string tm9PmiRIReport { get; set; } + public string tTIBuningWithQCI1swchDl { get; set; } + public string atmosChaSeq20BitSwch { get; set; } + public string hoppingMode { get; set; } + public string farPointCeOptMcsThr { get; set; } + public string srAccafterOptSwch { get; set; } + public string stopUlSchdAftMsg3HFSwch { get; set; } + public string pucchPuschSimulTraInd { get; set; } + public string uLHstSdmaSwch { get; set; } + public string nRSAllocRBNumUl { get; set; } + public string sRSResConfigMethod { get; set; } + public string moId { get; set; } + public string tTIBSinrDiscardThre { get; set; } + public string sINRThr4SpeEdgeUe { get; set; } + public string pimInterferenceAvoidSwch { get; set; } + public string dlPingPreSchdSwitch { get; set; } + public string cqiAccafterOptSwch { get; set; } + public string isSupportDualTM8 { get; set; } + public string sRSResDisCellNum { get; set; } + public string pucchNcsAn { get; set; } + public string srbAdpRetxOptInFreqSwch { get; set; } + public string dsrTransMax { get; set; } + public string mobilityEnhanceSwch { get; set; } + public string lteSpecShareSwch { get; set; } + public string srsIniBW { get; set; } + public string ulRbForbiddenBitMap { get; set; } + public string ttiBundSinrOut { get; set; } + public string pucchWgtCompSwitch { get; set; } + public string speUeNum4EnPrbLocAlloc { get; set; } + public string pucchAckRepNum { get; set; } + public string pucch3RB { get; set; } + public string srSecPeriodQCI { get; set; } + public string rbHighThrOfFullSchForMMUl { get; set; } + public string maxUserPucchfmt2 { get; set; } + public string sRSecAlloSwch { get; set; } + public string farPointAperiodicCQISwch { get; set; } + public string uLComRatioCfg { get; set; } + public string inbandNbCfg { get; set; } + public string cDMALTECutRbNum { get; set; } + public string cellColor { get; set; } + public string dLHstSdmaSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ulMaxMcsOptSwch { get; set; } + public string srsNormalResource { get; set; } + public string enUlPrbLocAlloc4SpeUeSwch { get; set; } + public string ulRbRsvNumRatio { get; set; } + public string ackSrsTraSptInd { get; set; } + public string pdschLimitSchdSwch { get; set; } + public string lowCQIAMCOptSwch { get; set; } + public string dlEnhancedSchdSwch { get; set; } + public string pucchCqiRBNum { get; set; } + public string pRBUnequalPairSwch { get; set; } + public string antiInterOptSwch { get; set; } + public string maxRbOffsetOfUlPrbRand { get; set; } + public string hOWithTTIBSwch { get; set; } + public string rbLowThrOfNonFullSchForMMUl { get; set; } + public string csiReportMode { get; set; } + public string tTIBSinrDiscardWin { get; set; } + public string pbrThrforExitDLComp { get; set; } + public string largeCapaUeNum { get; set; } + public string srsBWCfg { get; set; } + public string pucchOptSwch { get; set; } + public string dlPrbRandForceModeForDss { get; set; } + public string srLteOptEnable { get; set; } + public string cqiRptChNum { get; set; } + public string srsEnable { get; set; } + public string srsSubFrameCfg { get; set; } + public string mmQosPrioritySwch { get; set; } + public string ttiBundSinrIn { get; set; } + public string pbrThrforComp { get; set; } + public string ulRbRsvRbLoadThr { get; set; } + public string ulRBShareAlgSwitch4NR { get; set; } + public string sccMUOptSwch { get; set; } + public string falseAntSelIndentifySwch { get; set; } + public string fMMDssDlRbAllocPolicy { get; set; } + public string nPucch1bP1 { get; set; } + public string srsLargePowResource { get; set; } + public string rnnAvgSwch { get; set; } + public string ulShareResAllocPolicy { get; set; } + public string lTEDlReserveRBRatioforNR { get; set; } + public string cidofCoMP { get; set; } + public string srTrCHNum { get; set; } + public string maxMMRBRatio { get; set; } + public string sRSResDisMethod { get; set; } + public string sRReconfigSwch { get; set; } + public string prePeriod4MutingRB { get; set; } + public string compPLThread { get; set; } + public string maxNhelpRB { get; set; } + public string mmEnableUL { get; set; } + public string iMDSwitch { get; set; } + public string ueTransPortNum { get; set; } + public string tTIBSinrFilterThre { get; set; } + public string ulRbRsvStart { get; set; } + public string dlDisRsAllSpInd { get; set; } + public string pucchSemiAnNum { get; set; } + public string sharePrbPositionDL { get; set; } + public string rbHighThrOfFullSchedUl { get; set; } + public string bearForCompSwchDL { get; set; } + public string puschIrcMode { get; set; } + public string capacityMarginThr { get; set; } + public string sharePrbPositionUL { get; set; } + public string mri { get; set; } + public string mmSideNum { get; set; } + public string lteMinGuarFactorDL { get; set; } + public string bearForCompSwchUL { get; set; } + public string vTDataStatSwch { get; set; } + public string dlPrbOptGuaType { get; set; } + public string dlConPreSchdSwitch { get; set; } + public string ulInterferFixSwch { get; set; } + public string pucchDeltaShf { get; set; } + public string srTrPeriod { get; set; } + public string lteMinGuarFactorUL { get; set; } + public string srsReserveRatio { get; set; } + public string srPriPeriodQCI { get; set; } + public string pucchBlankNum { get; set; } + public string bufferCSSModeDl { get; set; } + public string dlRBShareAlgSwitch4NR { get; set; } + public string lteWeightFactorUL { get; set; } + public string nrNeedProFactorUL { get; set; } + public string lteSpecShareCId { get; set; } + public string swchDAdjCqiMode { get; set; } + public string srsNormalPeriod { get; set; } + public string srAccOptSwch { get; set; } + public string lTEUlReserveRBRatioforNR { get; set; } + public string freqSelectDl { get; set; } + public string farPointCeOptRBThr { get; set; } + public string uLRBRetrOptSwch { get; set; } + public string bufferCSSModeUl { get; set; } + public string nrNeedProFactorDL { get; set; } + public string prbRandNumberDl { get; set; } + public string inbandNbNumUl { get; set; } + public string ttiBundSinrOut4QCI1 { get; set; } + public string vTDataStatPrd { get; set; } + public string lteWeightFactorDL { get; set; } + public string rbLowThrOfNonFullSchedUl { get; set; } + public string puschCqiFbMethd { get; set; } + public string mriCalOptiSwch { get; set; } + public string ulRbRsvInDssSwch { get; set; } + public string maxCoopNbrCellNum { get; set; } + public string ttiBundPlIn { get; set; } + public string pucchSORTDEnable { get; set; } + public string maxMMRBNum { get; set; } + public string nd { get; set; } + public string ng { get; set; } + public string mriConfigSwch { get; set; } + public string dBFPairSwch { get; set; } + public string compCSSwchUL { get; set; } + public string threshold4CoMPPsUl { get; set; } + public string extendedBSRSwch { get; set; } + public string mutingStartRbLow { get; set; } + public string threshold4CoMPCellJudUl { get; set; } + public string pucchIrcSwch { get; set; } + public string dLRetrRBOptSwtch { get; set; } + public string uLRBRetrOptOLSwch { get; set; } + public string dmrsWithOCCActivated { get; set; } + public string puschNsb { get; set; } + public string phichDuration { get; set; } + public string ueAntSelIdentifySwch { get; set; } + public string dssMsg2SchdOptSwch { get; set; } + public string cqiK { get; set; } + public string srsHopBW { get; set; } + public string dLRBLimit4PoorUEEnable { get; set; } + public string vTDataCCEThrd { get; set; } + public string freqSelectUl { get; set; } + public string cDMALTECSSSwch { get; set; } + public string mutingRbNumHigh { get; set; } + public string pucchIrcMode { get; set; } + public string swchTTIBundling { get; set; } + public string prbRandNumberUl { get; set; } + public string puschhoppingOffset { get; set; } + public string mutingStartRbHigh { get; set; } + public string srsLargePowPeriod { get; set; } + public string harmInterferAvoidMode { get; set; } + public string ldn { get; set; } + public string freqDomformSwchDL { get; set; } + public string ttiBundPlOut { get; set; } + public string numPucch1b { get; set; } + public string harmonicSwitch { get; set; } + } + public class PowerControlDLFDDLTE + { + public string paForMSG2 { get; set; } + public string fMMPwrBackBw { get; set; } + public string paForDTCH { get; set; } + public string pwrCtlSwchDl { get; set; } + public string magicRadioCssPwrCtrl { get; set; } + public string rouFactor { get; set; } + public string adjustPwr4TM3PwrCtrl { get; set; } + public string pdcchF1APwrOfst { get; set; } + public string pdcchF1BPwrOfst { get; set; } + public string msg2AdjustPwr4SSCG { get; set; } + public string pdschPwrAdjustUEType { get; set; } + public string pdschPwrAdjustMode { get; set; } + public string pdcchF3APwrOfst { get; set; } + public string adjustPwr4PwrCtrl { get; set; } + public string dlPwrOptSwch4GenQoS { get; set; } + public string uenumThr4CrsCtrl { get; set; } + public string dynamicPowerSwch { get; set; } + public string mocName { get; set; } + public string fMMRxxSwitchShiftFactor { get; set; } + public string pdcchF1CPwrOfst { get; set; } + public string pcfichPwrOfst { get; set; } + public string rbRatioThr4CrsCtrl { get; set; } + public string nonBfPwrFactor { get; set; } + public string iCoDLPowerOffset { get; set; } + public string sSCGCRSBoostingSwch { get; set; } + public string sharePwrAssignTypeDl { get; set; } + public string paForDCCH { get; set; } + public string qamMcsThr4PwrCtrl { get; set; } + public string maxPowerAdjustValue { get; set; } + public string paForPCCH { get; set; } + public DateTime lastModifiedTime { get; set; } + public string noneStdBwPwrCtrl { get; set; } + public string pdcchF0PwrOfst { get; set; } + public string pdcchF1PwrOfst { get; set; } + public string phichPwrOfst { get; set; } + public string pdcchF3PwrOfst { get; set; } + public string pdcchF2PwrOfst { get; set; } + public string pdcchF2APwrOfst { get; set; } + public string sSCGCRSMaxBoostingValue { get; set; } + public string paForCCCH { get; set; } + public string rbRatioThr4PwrCtrl { get; set; } + public string sSCGPwrReduceCtrl { get; set; } + public string csiRSPwrOfst { get; set; } + public string preOnDurat4CrsCtrl { get; set; } + public string crsPwrCtlSwch { get; set; } + public string pdcchReMutingSwch { get; set; } + public string mcsThres4PwrCtrl { get; set; } + public string msg2PDCCHIdx4SSCG { get; set; } + public string pwrWaterFillSwchDL { get; set; } + public string pdcchF1DPwrOfst { get; set; } + public string adjustPwr4CrsCtrl1 { get; set; } + public string adjustPwr4CrsCtrl2 { get; set; } + public string postOnDurat4CrsCtrl { get; set; } + public string moId { get; set; } + public string ldn { get; set; } + public string paForBCCH { get; set; } + public string cellRBRatioThr4PwrCtrl { get; set; } + public string dynPwrShareAbilitySwch { get; set; } + } + public class PowerControlDLTDDLTE + { + + public string paForMSG2 { get; set; } + + public string emfSlidingWindow { get; set; } + + public string dlMcsThr4EdgeUE { get; set; } + + public string dlMcsAdjThr4EdgeUE { get; set; } + + public string paForDTCH { get; set; } + + public string pwrCtlSwchDl { get; set; } + + public string tMMCRSMaxBoostingValue { get; set; } + + public string adjustPwr4TM3PwrCtrl { get; set; } + + public string pdschCLPCSwchDl { get; set; } + + public string pdcchF1APwrOfst { get; set; } + + public string pdcchF1BPwrOfst { get; set; } + + public string pdschPwrAdjustUEType { get; set; } + + public string tMMPowerBoostingSwch { get; set; } + + public string tMMCRSBoostingSwch { get; set; } + + public string pdschPwrAdjustMode { get; set; } + + public string pdcchF3APwrOfst { get; set; } + + public string adjustPwr4PwrCtrl { get; set; } + + public string dlPwrOptSwch4GenQoS { get; set; } + + public string emfCtrlWindow { get; set; } + + public string uenumThr4CrsCtrl { get; set; } + + public string dynamicPowerSwch { get; set; } + + public string mocName { get; set; } + + public string emfFunctionSwitch { get; set; } + + public string pdcchF1CPwrOfst { get; set; } + + public string pcfichPwrOfst { get; set; } + + public string rbRatioThr4CrsCtrl { get; set; } + + public string iCoDLPowerOffset { get; set; } + + public string sharePwrAssignTypeDl { get; set; } + + public string crsMutingFreqPolicy { get; set; } + + public string paForDCCH { get; set; } + + public string qamMcsThr4PwrCtrl { get; set; } + + public string maxPowerAdjustValue { get; set; } + + public string paForPCCH { get; set; } + + public string hstPwrShrDlAmcOffset { get; set; } + + public string dlForbidRbCrsPunchSwch { get; set; } + + public string lastModifiedTime { get; set; } + + public string hstPwrShrLowSpdUeThr { get; set; } + + public string hstPwrShareUeThr { get; set; } + + public string pdcchF0PwrOfst { get; set; } + + public string pdcchF1PwrOfst { get; set; } + + public string pdschPwrAdjustSwthDl { get; set; } + + public string phichPwrOfst { get; set; } + + public string pdcchF3PwrOfst { get; set; } + + public string pdcchF2PwrOfst { get; set; } + + public string dssMutingRbRatio { get; set; } + + public string pdcchF2APwrOfst { get; set; } + + public string dssMutingOptiSwit { get; set; } + + public string paForCCCH { get; set; } + + public string rbRatioThr4PwrCtrl { get; set; } + + public string sINRAdjFactor4EdgeUE { get; set; } + + public string csiRSPwrOfst { get; set; } + + public string preOnDurat4CrsCtrl { get; set; } + + public string crsPwrCtlSwch { get; set; } + + public string pdcchReMutingSwch { get; set; } + + public string mcsThres4PwrCtrl { get; set; } + + public string eirpThrRef { get; set; } + + public string pwrWaterFillSwchDL { get; set; } + + public string pdcchF1DPwrOfst { get; set; } + + public string adjustPwr4CrsCtrl1 { get; set; } + + public string operatorDefined { get; set; } + + public string adjustPwr4CrsCtrl2 { get; set; } + + public string postOnDurat4CrsCtrl { get; set; } + + public string moId { get; set; } + + public string crsMutingTimeBitmap { get; set; } + + public string hstPwrShareSwch { get; set; } + + public string ldn { get; set; } + + public string pwrBackOffThrRef { get; set; } + + public string eirpThrOffset { get; set; } + + public string paForBCCH { get; set; } + + public string pwrBackOffThrOffset { get; set; } + + public string cellRBRatioThr4PwrCtrl { get; set; } + + public string dynPwrShareAbilitySwch { get; set; } + + public string dlPwrAdaptSwch4EdgeUE { get; set; } + + public string emfThrType { get; set; } + } + public class PrachFDDLTE + { + public DateTime lastModifiedTime { get; set; } + public string prachFMRecTAThresh { get; set; } + public string prachSupFarCoverSwch { get; set; } + public string prachUpdateDetectionSwch { get; set; } + public string macContResTimer { get; set; } + public string preambleIniReceivedPower { get; set; } + public string ncs { get; set; } + public string maxHarqMsg3Tx { get; set; } + public string macNonContenPreamble { get; set; } + public string preambleTransMax { get; set; } + public string prachUltiCapSwch { get; set; } + public string mocName { get; set; } + public string highSpeedFlag { get; set; } + public string reserve1 { get; set; } + public string numberOfRAPreambles { get; set; } + public string messagePowerOffsetGroupB { get; set; } + public string prachFreqOffset { get; set; } + public string moId { get; set; } + public string prachConfigIndex { get; set; } + public string ldn { get; set; } + public string rootSequenceIndex { get; set; } + public string raResponseWindowSize { get; set; } + public string raCollProb { get; set; } + public string prachFMRecOnTASwch { get; set; } + public string rachProtecSwch { get; set; } + public string prachFreqOffsetFlag { get; set; } + public string powerRampingStep { get; set; } + public string sizeOfRAPreamblesGroupA { get; set; } + public string messageSizeGroupA { get; set; } + } + public class PrachTDDLTE + { + + public string lastModifiedTime { get; set; } + + public string prachFMRecTAThresh { get; set; } + + public string prachSupFarCoverSwch { get; set; } + + public string prachUpdateDetectionSwch { get; set; } + + public string macContResTimer { get; set; } + + public string preambleIniReceivedPower { get; set; } + + public string ncs { get; set; } + + public string maxHarqMsg3Tx { get; set; } + + public string macNonContenPreamble { get; set; } + + public string preambleTransMax { get; set; } + + public string prachUltiCapSwch { get; set; } + + public string mocName { get; set; } + + public string highSpeedFlag { get; set; } + + public string reserve1 { get; set; } + + public string numberOfRAPreambles { get; set; } + + public string messagePowerOffsetGroupB { get; set; } + + public string prachFreqOffset { get; set; } + + public string moId { get; set; } + + public string prachConfigIndex { get; set; } + + public string ldn { get; set; } + + public string rootSequenceIndex { get; set; } + + public string raResponseWindowSize { get; set; } + + public string raCollProb { get; set; } + + public string prachFMRecOnTASwch { get; set; } + + public string rachProtecSwch { get; set; } + + public string prachFreqOffsetFlag { get; set; } + + public string powerRampingStep { get; set; } + + public string sizeOfRAPreamblesGroupA { get; set; } + + public string messageSizeGroupA { get; set; } + } + + public class QoSServiceClassLTE + { + public string disCardTimerForEnbFdd { get; set; } + public string ueRATType { get; set; } + public DateTime lastModifiedTime { get; set; } + public string discardTimerTdd { get; set; } + public string rlcMode { get; set; } + public string spsIntervalUL { get; set; } + public string srvPacketLoss { get; set; } + public string prdPhrTimer { get; set; } + public string disCardTimerForEnbTdd { get; set; } + public string qCI { get; set; } + public string srvPacketDelay { get; set; } + public string spsIntervalDL { get; set; } + public string meaGRP { get; set; } + public string phtPhrTimer { get; set; } + public string srvBearerType { get; set; } + public string mocName { get; set; } + public string dlPathlossChgTh { get; set; } + public string moId { get; set; } + public string srvPrior { get; set; } + public string sequenNumLenth { get; set; } + public string srvClassName { get; set; } + public string bucketSizeDura { get; set; } + public string ldn { get; set; } + public string discardTimerFdd { get; set; } + public string factorForQCI { get; set; } + public string sequenceNumType { get; set; } + } + public class VoLTEConfigCellTDDLTE + { + + public string atmosHFRatio { get; set; } + + public string tTIBRlcSegSwch { get; set; } + + public string videoBlerDl { get; set; } + + public string dlMCSMax4VT { get; set; } + + public string qCI5TbsizeThr4NonConserve { get; set; } + + public string pwrBoostSwchDL { get; set; } + + public string voiceRbRsvSwchUl { get; set; } + + public string qci1RelDisableTTIBSwch { get; set; } + + public string dltaMcs4VolteSr { get; set; } + + public string silenceGrantSwch { get; set; } + + public string remoteOpt4VoLTESwch { get; set; } + + public string delayTimeUL { get; set; } + + public string mocName { get; set; } + + public string weakCellSinrPeriod4Video { get; set; } + + public string weakCellSinrThrd { get; set; } + + public string abHFPDCCHUpPower { get; set; } + + public string qci1SrsSwch { get; set; } + + public string uLCoMPPriority { get; set; } + + public string voLTEHarqNum4eMTCUl { get; set; } + + public string sINRLimitWin { get; set; } + + public string hoUmDrbPdcpSnSwch { get; set; } + + public string atmosRsrpNbrThrd { get; set; } + + public string maxBoostPwr { get; set; } + + public string voLTEUllayerSwch { get; set; } + + public string weakCellSinrThrd4AddVideo { get; set; } + + public string abAccBigBsrThrd { get; set; } + + public string dlBlerOffset { get; set; } + + public string weakCellSinrThrd4DelVideo { get; set; } + + public string voLTEHarqNum4eMTCDl { get; set; } + + public string intraSysCoverQualitySwch { get; set; } + + public string vtMoMtRecDrxSwch { get; set; } + + public string rbUsageThr4DLRBR { get; set; } + + public string ttiBMcsCeiling { get; set; } + + public string atmosGERANNbrThrd { get; set; } + + public string voIPRLFDelayTime { get; set; } + + public string eMIPeriod { get; set; } + + public string sinrThrTDD4ULRBR { get; set; } + + public string forbidSPSUeNum { get; set; } + + public string weakCellForbidVTCallSwch { get; set; } + + public string atmosRsrqSrvThrd { get; set; } + + public string maxHarqNum4SegTb { get; set; } + + public string dl256QAMSwch4VoLTE { get; set; } + + public string abUserIdntfyNumThrd { get; set; } + + public string silenceGrantPeriod { get; set; } + + public string dLMCSTd4VoLTEWorseOffset { get; set; } + + public string bler4Congestion { get; set; } + + public string piecesMaxNum4ULVoLTE { get; set; } + + public string dlVoiceRbRsvStart { get; set; } + + public string sINRThrd4VoLTEbetterUL { get; set; } + + public string qci5PreSchd4VoLTESwch { get; set; } + + public string atmosDisableDRXInd { get; set; } + + public string sinrThr4FarPointVoiceJRUe { get; set; } + + public string mumimoEnable4VoipUl { get; set; } + + public string moId { get; set; } + + public string atmosRsrqNbrThrd { get; set; } + + public string dlMCSMin4VT { get; set; } + + public string sINRThrd4VoLTEWorseUL { get; set; } + + public string volteRcySwch { get; set; } + + public string atmosHarqNewTxCnt { get; set; } + + public string atmosVoLTERATInd { get; set; } + + public string sinrThrFDD4ULRBR { get; set; } + + public string abHFThrd { get; set; } + + public string taMcs4VolteSr4eMTCDl { get; set; } + + public string videoBlerUl { get; set; } + + public string piecesMinNum4eMTC { get; set; } + + public string voLTEDLFlowCtrlOptSwch { get; set; } + + public string ttiBHarqNum { get; set; } + + public string switchOfFreqSel4Ni { get; set; } + + public string voiceRbRsvStartUl { get; set; } + + public string abAccBigBsrTimes { get; set; } + + public string piecesMaxNum4TTIB { get; set; } + + public string atmosDetectMode { get; set; } + + public string activeGrantPrdeMTC { get; set; } + + public string switchDualIntv { get; set; } + + public string ulMCSMin4VT { get; set; } + + public string volteDRXAdjSwch { get; set; } + + public string activeGrantPrd { get; set; } + + public string rBRDLSwch { get; set; } + + public string voiceRbRsvNumUl { get; set; } + + public string voLTEHarqNumDl { get; set; } + + public string voLTELoadList { get; set; } + + public string volteCmrSwch { get; set; } + + public string abHFConseMcs { get; set; } + + public string volteQualityDetectPrd { get; set; } + + public string enterPUSCHRBRsvSwch4TTIB { get; set; } + + public string swch4SubRbAllocDirection { get; set; } + + public string eMIValue { get; set; } + + public string srvccDlBler { get; set; } + + public string volteUeThr { get; set; } + + public string voLTEBlerDl { get; set; } + + public string mCSThr4DLRBR { get; set; } + + public string rlcSegmentUl { get; set; } + + public string activeSPSUeNum { get; set; } + + public string aNBRQProhibitTimer { get; set; } + + public string qualityBetterCnt { get; set; } + + public string voLTEHarqNumUl { get; set; } + + public string dlVoiceRbRsvNum { get; set; } + + public string ulMCSMax4VT { get; set; } + + public string audioBler4eMTCDl { get; set; } + + public string qCI5MinTBSizeSwch { get; set; } + + public string atmosRscpSysNbrThrd { get; set; } + + public string tTIBundSinrInLowerLimit { get; set; } + + public string prSchBasdIntvalOptSwch { get; set; } + + public string pdschPuschEnSwitch { get; set; } + + public string voLTEBlerUl { get; set; } + + public string audioBler4eMTCUl { get; set; } + + public string atmosAccuBsr { get; set; } + + public string subbandRemapModeUL { get; set; } + + public string uLSINRTd4VoLTEWorseOffset { get; set; } + + public string conservedCancel4QCI5Swch { get; set; } + + public string lastModifiedTime { get; set; } + + public string dRXReConfigSwch { get; set; } + + public string weakCellStrategy4Video { get; set; } + + public string voLTEDlNewTxPrioSwch { get; set; } + + public string implicitRelAfter { get; set; } + + public string atmosLastHarqFailNum { get; set; } + + public string rBRPickUpProtectTimer { get; set; } + + public string activeDelay { get; set; } + + public string voLTEUlHarqOptSwch { get; set; } + + public string abUseIdntfySwch { get; set; } + + public string sRVCCCSonlySwch { get; set; } + + public string aNBRQSwch { get; set; } + + public string abAccBsrThrd { get; set; } + + public string piecesMinNum4ULVoLTE { get; set; } + + public string piecesMinNum4TTIB { get; set; } + + public string scheLimitWin { get; set; } + + public string atmosSinrThrUl { get; set; } + + public string activeGrantSwch { get; set; } + + public string atmosDetectPrdNum { get; set; } + + public string atmosEcNoSysNbrThrd { get; set; } + + public string qualityWorseCnt { get; set; } + + public string dlVoiceRbRsvSwch { get; set; } + + public string volteOnDuratTimer { get; set; } + + public string piecesMaxNum4eMTC { get; set; } + + public string voLTEUlHarqGroupNum { get; set; } + + public string pucchFmt2CtrlSwch { get; set; } + + public string atmosRsrpSrvThrd { get; set; } + + public string tTIBundDlMcsInLowerLimit { get; set; } + + public string emiSwch { get; set; } + + public string mCSThrd4VoLTEWorseDL { get; set; } + + public string abUserIdentifyTimer { get; set; } + + public string ldn { get; set; } + + public string voLTEMoMtDcchPriSwch { get; set; } + + public string mCSThrd4VoLTEBetterDL { get; set; } + + public string rBRSwch { get; set; } + + public string volDatatoSRPriSwch { get; set; } + + public string preSchd4PUCCH { get; set; } + + public string silenceGrantPeriod4eMTC { get; set; } + } + + + public class VoLTEConfigCellFDDLTE + { + public string tTIBRlcSegSwch { get; set; } + public string videoBlerDl { get; set; } + public string dlMCSMax4VT { get; set; } + public string pwrBoostSwchDL { get; set; } + public string voiceRbRsvSwchUl { get; set; } + public string qci1RelDisableTTIBSwch { get; set; } + public string dltaMcs4VolteSr { get; set; } + public string silenceGrantSwch { get; set; } + public string delayTimeUL { get; set; } + public string mocName { get; set; } + public string weakCellSinrPeriod4Video { get; set; } + public string weakCellSinrThrd { get; set; } + public string abHFPDCCHUpPower { get; set; } + public string qci1SrsSwch { get; set; } + public string uLCoMPPriority { get; set; } + public string voLTEHarqNum4eMTCUl { get; set; } + public string sINRLimitWin { get; set; } + public string hoUmDrbPdcpSnSwch { get; set; } + public string maxBoostPwr { get; set; } + public string voLTEUllayerSwch { get; set; } + public string weakCellSinrThrd4AddVideo { get; set; } + public string abAccBigBsrThrd { get; set; } + public string dlBlerOffset { get; set; } + public string weakCellSinrThrd4DelVideo { get; set; } + public string voLTEHarqNum4eMTCDl { get; set; } + public string intraSysCoverQualitySwch { get; set; } + public string vtMoMtRecDrxSwch { get; set; } + public string ttiBMcsCeiling { get; set; } + public string voIPRLFDelayTime { get; set; } + public string eMIPeriod { get; set; } + public string sINRDown4QCI5eMTCSwch { get; set; } + public string forbidSPSUeNum { get; set; } + public string weakCellForbidVTCallSwch { get; set; } + public string dl256QAMSwch4VoLTE { get; set; } + public string abUserIdntfyNumThrd { get; set; } + public string silenceGrantPeriod { get; set; } + public string dLMCSTd4VoLTEWorseOffset { get; set; } + public string piecesMaxNum4ULVoLTE { get; set; } + public string dlVoiceRbRsvStart { get; set; } + public string sINRThrd4VoLTEbetterUL { get; set; } + public string qci5PreSchd4VoLTESwch { get; set; } + public string sinrThr4FarPointVoiceJRUe { get; set; } + public string mumimoEnable4VoipUl { get; set; } + public string moId { get; set; } + public string dlMCSMin4VT { get; set; } + public string sINRThrd4VoLTEWorseUL { get; set; } + public string volteRcySwch { get; set; } + public string abHFThrd { get; set; } + public string taMcs4VolteSr4eMTCDl { get; set; } + public string videoBlerUl { get; set; } + public string piecesMinNum4eMTC { get; set; } + public string ttiBHarqNum { get; set; } + public string switchOfFreqSel4Ni { get; set; } + public string voiceRbRsvStartUl { get; set; } + public string tTIBReTxOptSwch { get; set; } + public string abAccBigBsrTimes { get; set; } + public string piecesMaxNum4TTIB { get; set; } + public string activeGrantPrdeMTC { get; set; } + public string ulMCSMin4VT { get; set; } + public string activeGrantPrd { get; set; } + public string rBRDLSwch { get; set; } + public string voiceRbRsvNumUl { get; set; } + public string puschNumRepet4QCI5eMTC { get; set; } + public string voLTEHarqNumDl { get; set; } + public string voLTELoadList { get; set; } + public string sINRDown4QCI5eMTC { get; set; } + public string volteCmrSwch { get; set; } + public string abHFConseMcs { get; set; } + public string volteQualityDetectPrd { get; set; } + public string eMIValue { get; set; } + public string srvccDlBler { get; set; } + public string voLTEBlerDl { get; set; } + public string rlcSegmentUl { get; set; } + public string activeSPSUeNum { get; set; } + public string aNBRQProhibitTimer { get; set; } + public string qualityBetterCnt { get; set; } + public string voLTEHarqNumUl { get; set; } + public string dlVoiceRbRsvNum { get; set; } + public string ulMCSMax4VT { get; set; } + public string audioBler4eMTCDl { get; set; } + public string qCI5MinTBSizeSwch { get; set; } + public string tTIBundSinrInLowerLimit { get; set; } + public string prSchBasdIntvalOptSwch { get; set; } + public string pdschPuschEnSwitch { get; set; } + public string voLTEBlerUl { get; set; } + public string audioBler4eMTCUl { get; set; } + public string subbandRemapModeUL { get; set; } + public string uLSINRTd4VoLTEWorseOffset { get; set; } + public DateTime lastModifiedTime { get; set; } + public string dRXReConfigSwch { get; set; } + public string weakCellStrategy4Video { get; set; } + public string voLTEDlNewTxPrioSwch { get; set; } + public string implicitRelAfter { get; set; } + public string activeDelay { get; set; } + public string voLTEUlHarqOptSwch { get; set; } + public string abUseIdntfySwch { get; set; } + public string sRVCCCSonlySwch { get; set; } + public string aNBRQSwch { get; set; } + public string abAccBsrThrd { get; set; } + public string piecesMinNum4ULVoLTE { get; set; } + public string piecesMinNum4TTIB { get; set; } + public string scheLimitWin { get; set; } + public string activeGrantSwch { get; set; } + public string qualityWorseCnt { get; set; } + public string dlVoiceRbRsvSwch { get; set; } + public string piecesMaxNum4eMTC { get; set; } + public string voLTEUlHarqGroupNum { get; set; } + public string pucchFmt2CtrlSwch { get; set; } + public string tTIBundDlMcsInLowerLimit { get; set; } + public string emiSwch { get; set; } + public string mCSThrd4VoLTEWorseDL { get; set; } + public string abUserIdentifyTimer { get; set; } + public string ldn { get; set; } + public string voLTEMoMtDcchPriSwch { get; set; } + public string mCSThrd4VoLTEBetterDL { get; set; } + public string rBRSwch { get; set; } + public string volDatatoSRPriSwch { get; set; } + public string preSchd4PUCCH { get; set; } + public string silenceGrantPeriod4eMTC { get; set; } + } + public class RLC + { + public string drb5qi { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string rlcMode { get; set; } + public string pollPdu { get; set; } + public string reassemblyTimer { get; set; } + public string moId { get; set; } + public string statusProhibitTimer { get; set; } + public string pollByte { get; set; } + public string snFieldLengthAM { get; set; } + public string pollRetransTimer { get; set; } + public string maxRetxThreshold { get; set; } + public string ldn { get; set; } + public string snFieldLengthUM { get; set; } + public string direction { get; set; } + } + public class SADRXCycle + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string drxShortCycle { get; set; } + public string drxShortCycleTimer { get; set; } + public string per5QIEnsDrx { get; set; } + public string moId { get; set; } + public string refQoSCharacteristicsCU { get; set; } + public string servicePriorityLevel4DRX { get; set; } + public string farDrxAdpCloseOfServSwch { get; set; } + public string drxLongCycle { get; set; } + public string ldn { get; set; } + public string drxValid { get; set; } + public string drxCloseFarPoinChanlThrd { get; set; } + public string shortDRXCycInd { get; set; } + } + public class ServiceDrxFDDLTE + { + public string shortDrxCyc { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string onDuratTimer { get; set; } + public string shortDrxCycInd { get; set; } + public string longDrxCyc { get; set; } + public string srvPriLv4DRX { get; set; } + public string moId { get; set; } + public string shortDrxCycT { get; set; } + public string qCI { get; set; } + public string perQCIDrxSwch { get; set; } + public string ldn { get; set; } + public string drxInactTimer { get; set; } + public string drxRetranTimer { get; set; } + } + public class MACCellGroupConfig + { + public string k2Advance { get; set; } + public string preScheduleLimit4Normal { get; set; } + public string sinr4SkipOut { get; set; } + public DateTime lastModifiedTime { get; set; } + public string statisticalPeriodOfPaddingRate { get; set; } + public string preSchdPuschPwrThr { get; set; } + public string delayOptimizationPolicy { get; set; } + public string seThr4NearPoint { get; set; } + public string abnormalUEMaxSchdRBNum { get; set; } + public string tsnPacketPeriodThr { get; set; } + public string sinr4SkipThr { get; set; } + public string schdRBNumThrOfAbnormalUE { get; set; } + public string skipUplinkTxCfgGrantSwch { get; set; } + public string timerforstayinBWP { get; set; } + public string prdBsrTimer { get; set; } + public string dataBlockFilterCoeffUl { get; set; } + public string endcTargetBufferingTimeCoeff { get; set; } + public string retxBsrTimer { get; set; } + public string qoSSelectFreqFilterCoeff { get; set; } + public string fastBwpSwitch { get; set; } + public string timerForQoSCountThr { get; set; } + public string mocName { get; set; } + public string skipUplinkTxDynamicSwch { get; set; } + public string tAOfNoRqstDataForDlSplit { get; set; } + public string switchForAccessOpt { get; set; } + public string dlSplitSchNumThrd { get; set; } + public string moId { get; set; } + public string paddingRateThrOfAbnormalUE { get; set; } + public string crossSlotSchedulingForK0Sw { get; set; } + public string singleRbSinrThr4NearPoint { get; set; } + public string bsrBlockTBSizeRate { get; set; } + public string srTransMax { get; set; } + public string bfrEnableSwitch { get; set; } + public string bsrBlockRateTBSizeTimer { get; set; } + public string tAOfRqstDataForDlSplit { get; set; } + public string ldn { get; set; } + public string sinr4SkipIn { get; set; } + public string defaultDataBlockRatio { get; set; } + } + public class ServiceMACTDDLTE + { + + public string harqMaxTxNum4DlDcchSwch { get; set; } + + public string preScheBSRPrioSwch { get; set; } + + public string rRCNumExitSpecSched { get; set; } + + public string grantBsr4NSARRCMsgUL { get; set; } + + public string aMBRLimitType6Swch { get; set; } + + public string grantTimes4NSARRCMsgUL { get; set; } + + public string grantTimes4OthersUL { get; set; } + + public string dnsProxy4NormUserSwch { get; set; } + + public string virtulBSRSetNum4TCPACK { get; set; } + + public string msg5DelayOptSwch { get; set; } + + public string preSchedWindowLen { get; set; } + + public string prdBsrTimer { get; set; } + + public string rBRatio4NormalPreSch { get; set; } + + public string mMReduceUEBLER4RetrsUL { get; set; } + + public string harqMaxTxNum4UlDcch { get; set; } + + public string retxBsrTimer { get; set; } + + public string srTbsizeFilterFactor { get; set; } + + public string mMAddUEBLER4NewtrsUL { get; set; } + + public string preSchdValidThr { get; set; } + + public string mMAddUEBLER4RetrsUL { get; set; } + + public string uLMMBeamIntervalThresh { get; set; } + + public string mocName { get; set; } + + public string paddingSize4SrHigh { get; set; } + + public string lamdaOfTBSize4ULMM { get; set; } + + public string harqMaxTxNum { get; set; } + + public string tCPACKSize { get; set; } + + public string timeDelayOptSwch { get; set; } + + public string mMReduceUEBLER4NewtrsUL { get; set; } + + public string lowLim4Type6UEGua { get; set; } + + public string virtulBSRSetInterval4Get { get; set; } + + public string phrProcessDisablePrbThr { get; set; } + + public string preSchd4IMEI { get; set; } + + public string bSRSetInterval4HTTPACK { get; set; } + + public string harqMaxTxNum4DlDcch { get; set; } + + public string singleSinr1RBThrdUL { get; set; } + + public string grantTimes4Msg5UL { get; set; } + + public string mrRptOlSINRThr { get; set; } + + public string taDelayThr { get; set; } + + public string rRCNumEnterSpecSched4MM { get; set; } + + public string aMBRLimitType6DL4NormUe { get; set; } + + public string kpiBaseOnTASwch { get; set; } + + public string lastModifiedTime { get; set; } + + public string preSchdPuschPwrThr { get; set; } + + public string optPara { get; set; } + + public string upLim4NonType6UEGu { get; set; } + + public string ulPBRFlowWndAdapAdjThr { get; set; } + + public string nSARRCMsgNum4Preschd { get; set; } + + public string tCPACKSize4HTTP4NormUser { get; set; } + + public string raRetxSchdOptSwch { get; set; } + + public string harqMaxTxNum4UlDcchSwch { get; set; } + + public string bSRSetInterval4TCPACK { get; set; } + + public string sRAuthMode { get; set; } + + public string uLMMBeamSwch { get; set; } + + public string rBRatioIncludNormPreSch { get; set; } + + public string paddingSize4SrLow { get; set; } + + public string virtulBSRSetNum4HTTPACK { get; set; } + + public string rRCNumEnterSpecSched { get; set; } + + public string virBSRSetNum4FIN4NormUe { get; set; } + + public string httpRecog4NormUserSwch { get; set; } + + public string rRCNumThres { get; set; } + + public string virtulBSRSetNum4Get { get; set; } + + public string preSchPitNum4InitiRA { get; set; } + + public string httpPreSch4NormUserSwch { get; set; } + + public string httpCare4NormUserSwch { get; set; } + + public string msg3ResourceAdjStrategy { get; set; } + + public string nSARRCPreschdSwch { get; set; } + + public string moId { get; set; } + + public string virBSR4Get { get; set; } + + public string rRCNumExitSpecSched4MM { get; set; } + + public string uLMMBeamWidth { get; set; } + + public string learnDataSize4SR { get; set; } + + public string ldn { get; set; } + + public string port4HTTPOrSYNACK4NormUser { get; set; } + + public string commCodeRate { get; set; } + + public string taMaxThr { get; set; } + } + + + public class ServiceMACFDDLTE + { + public string harqMaxTxNum4DlDcchSwch { get; set; } + public string preScheBSRPrioSwch { get; set; } + public string rRCNumExitSpecSched { get; set; } + public string grantBsr4NSARRCMsgUL { get; set; } + public string aMBRLimitType6Swch { get; set; } + public string grantTimes4NSARRCMsgUL { get; set; } + public string grantTimes4OthersUL { get; set; } + public string dnsProxy4NormUserSwch { get; set; } + public string virtulBSRSetNum4TCPACK { get; set; } + public string msg5DelayOptSwch { get; set; } + public string preSchedWindowLen { get; set; } + public string prdBsrTimer { get; set; } + public string rBRatio4NormalPreSch { get; set; } + public string mMReduceUEBLER4RetrsUL { get; set; } + public string harqMaxTxNum4UlDcch { get; set; } + public string retxBsrTimer { get; set; } + public string uLRBLimit4PoorUESwch { get; set; } + public string srTbsizeFilterFactor { get; set; } + public string mMAddUEBLER4NewtrsUL { get; set; } + public string mMAddUEBLER4RetrsUL { get; set; } + public string uLMMBeamIntervalThresh { get; set; } + public string mocName { get; set; } + public string paddingSize4SrHigh { get; set; } + public string lamdaOfTBSize4ULMM { get; set; } + public string harqMaxTxNum { get; set; } + public string tCPACKSize { get; set; } + public string timeDelayOptSwch { get; set; } + public string mMReduceUEBLER4NewtrsUL { get; set; } + public string lowLim4Type6UEGua { get; set; } + public string virtulBSRSetInterval4Get { get; set; } + public string phrProcessDisablePrbThr { get; set; } + public string preSchd4IMEI { get; set; } + public string bSRSetInterval4HTTPACK { get; set; } + public string harqMaxTxNum4DlDcch { get; set; } + public string singleSinr1RBThrdUL { get; set; } + public string grantTimes4Msg5UL { get; set; } + public string mrRptOlSINRThr { get; set; } + public string taDelayThr { get; set; } + public string rRCNumEnterSpecSched4MM { get; set; } + public string aMBRLimitType6DL4NormUe { get; set; } + public string kpiBaseOnTASwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string optPara { get; set; } + public string upLim4NonType6UEGu { get; set; } + public string nSARRCMsgNum4Preschd { get; set; } + public string tCPACKSize4HTTP4NormUser { get; set; } + public string raRetxSchdOptSwch { get; set; } + public string harqMaxTxNum4UlDcchSwch { get; set; } + public string bSRSetInterval4TCPACK { get; set; } + public string sRAuthMode { get; set; } + public string uLMMBeamSwch { get; set; } + public string rBRatioIncludNormPreSch { get; set; } + public string paddingSize4SrLow { get; set; } + public string virtulBSRSetNum4HTTPACK { get; set; } + public string rRCNumEnterSpecSched { get; set; } + public string virBSRSetNum4FIN4NormUe { get; set; } + public string httpRecog4NormUserSwch { get; set; } + public string rRCNumThres { get; set; } + public string virtulBSRSetNum4Get { get; set; } + public string preSchPitNum4InitiRA { get; set; } + public string httpPreSch4NormUserSwch { get; set; } + public string httpCare4NormUserSwch { get; set; } + public string msg3ResourceAdjStrategy { get; set; } + public string nSARRCPreschdSwch { get; set; } + public string moId { get; set; } + public string virBSR4Get { get; set; } + public string rRCNumExitSpecSched4MM { get; set; } + public string uLMMBeamWidth { get; set; } + public string learnDataSize4SR { get; set; } + public string ldn { get; set; } + public string port4HTTPOrSYNACK4NormUser { get; set; } + public string commCodeRate { get; set; } + public string taMaxThr { get; set; } + } + public class CPList + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ssbList { get; set; } + public string powerPerRERef { get; set; } + public string mocName { get; set; } + public string cpId { get; set; } + public string serviceStatus { get; set; } + public string ldn { get; set; } + public string refNRCarrier { get; set; } + public string adminState { get; set; } + public string csirsPmiResourceIdList { get; set; } + public string moId { get; set; } + } + public class PUSCHConfig + { + public string ulFreqSelectTarget { get; set; } + public string scaling { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ueDmrsMaxLength { get; set; } + public string mocName { get; set; } + public string ulMaxRankConfigPolicy { get; set; } + public string uciOnPUSCH { get; set; } + public string ulResAllocMode { get; set; } + public string rbgSize { get; set; } + public string aperiodicPMIRptSwitch { get; set; } + public string dmrsPUSCHShareSwitch { get; set; } + public string moId { get; set; } + public string puschtransformPrecoder { get; set; } + public string csirsSubbandSize { get; set; } + public string ulDMRSReTxShareScheme { get; set; } + public string resourceAllocation { get; set; } + public string ulFreqSelectMode { get; set; } + public string ldn { get; set; } + public string uePUSCHDmrsType { get; set; } + public string uePUSCHDmrsAdditionalPosition { get; set; } + public string thr4PmiFreSelectRB { get; set; } + public string pi2BPSKEnable { get; set; } + public string txConfig { get; set; } + } + public class PDSCHConfig + { + public string rateMatchEnable { get; set; } + public DateTime lastModifiedTime { get; set; } + public string pdschAggregationFactor { get; set; } + public string ueDmrsMaxLength { get; set; } + public string mocName { get; set; } + public string prbBundlingType { get; set; } + public string staticBundlingSize { get; set; } + public string dlResAllocMode { get; set; } + public string dmrsPDSCHShareSwitch { get; set; } + public string rbgSize { get; set; } + public string d1d2BsrThrd { get; set; } + public string dlFreqSelTarget { get; set; } + public string moId { get; set; } + public string dlDMRSReTxShareScheme { get; set; } + public string resourceAllocation { get; set; } + public string dynamicBundlingSizeSet1 { get; set; } + public string dynamicBundlingSizeSet2 { get; set; } + public string ldn { get; set; } + public string uePDSCHDmrsAdditionalPosition { get; set; } + public string dlFreqSelectSwitch { get; set; } + public string dlMaxMIMOLayersForBwp { get; set; } + public string uePDSCHDmrsType { get; set; } + public string freqDetectSwch { get; set; } + public string vrbToPRBInterleaver { get; set; } + } + public class NRCellRelation + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string qRxLevMinOffsetCell { get; set; } + public string nrNeighCovOverlap { get; set; } + public string nrdcSupportInd { get; set; } + public string qOffsetCell { get; set; } + public string choTargetNbInd { get; set; } + public string refExternalNRCellCU { get; set; } + public string nrdcPSCellSupportInd { get; set; } + public string refNRCellCU { get; set; } + public string nbrType { get; set; } + public string endcPSCellChangeInd { get; set; } + public string reasonForBlackCell { get; set; } + public string nrOverlapCovValidMode { get; set; } + public string coverType { get; set; } + public string voiceMobilitySwch { get; set; } + public string rachLessEnabled { get; set; } + public string nrDataQualMigInd { get; set; } + public string compSupport { get; set; } + public string controlMode { get; set; } + public string anrIndicator { get; set; } + public string mocName { get; set; } + public string caSupport { get; set; } + public string supportXnHo { get; set; } + public string nrLBTargetInd { get; set; } + public string esCellType { get; set; } + public string removeAllowed { get; set; } + public string moId { get; set; } + public string ngHoDataDirectFwdSupport { get; set; } + public string hoState { get; set; } + public string ldn { get; set; } + public string cellIndividualOffset { get; set; } + public string qQualMinOffsetCell { get; set; } + public string highSpeedRailCellInd { get; set; } + public string useState { get; set; } + } + + public class MeasObjEUTRA + { + public string rdFreqPriority { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string offsetFreq { get; set; } + public string ldn { get; set; } + public string refEutranFreqRelation { get; set; } + public string moId { get; set; } + public string measBandWidth { get; set; } + } + public class GlobalSwitch + { + public string unidireThreUl { get; set; } + public string tddFdd3ccCaSwch { get; set; } + public string allowLTEFreqAtuoDetSwch { get; set; } + public string udcResetProtestSwch { get; set; } + public string enablePaIVDA { get; set; } + public string eNDCAnchorAttriUpdateSwch { get; set; } + public string swichForCpuAC { get; set; } + public string rplcPLMNInRanSharSwch { get; set; } + public string macroMicroCaSwch { get; set; } + public string rFFInterFInfoReportPeriod { get; set; } + public string periodicANRSwitch { get; set; } + public string enbWarnSwch { get; set; } + public string x2PassProcSwch { get; set; } + public string cmasSwch { get; set; } + public string dedctRANSharingSwch { get; set; } + public string lteBlackNbrDbsSwch { get; set; } + public string fddTddCaSwchUL { get; set; } + public string fastCABaseServiceSwch { get; set; } + public string enDcULPsHoSwch { get; set; } + public string interBandCaSwch { get; set; } + public string signalMdtM7PeriodMode { get; set; } + public string mmeUeCapVerifySwch { get; set; } + public string intraEnbInterPlmnHOSwch { get; set; } + public string mocName { get; set; } + public string caLAAKpiOfEnbCfgSwch { get; set; } + public string erabSwitch { get; set; } + public string fddTdd3ccCaSwch { get; set; } + public string cgiSpecUeSwch { get; set; } + public string sigMdtCdmaPrdMeasSwch { get; set; } + public string unidireThreDl { get; set; } + public string dsDsFuncSwch { get; set; } + public string eDecorSwch { get; set; } + public string nsaInterPeriodMeasSwitch { get; set; } + public string sendPWSFailureIndSwch { get; set; } + public string hoBaseFreqPriSwch { get; set; } + public string magicRadioModeSwch { get; set; } + public string interEnbReestRetrvSwch { get; set; } + public string utranCsfbSwch { get; set; } + public string ueCapSecOptSwitch { get; set; } + public string dsDsMacCeAckTimer { get; set; } + public string enDcGlPsHoSwitch { get; set; } + public string fairSchdSwch { get; set; } + public string tddFddCaSwch { get; set; } + public string sip100tryingSizeHighThr { get; set; } + public string mfbiSwch { get; set; } + public string tcpProxySwch { get; set; } + public string rohcProfile4Switch { get; set; } + public string dCBearerTypePLMNSwch { get; set; } + public string tcpFluidCtrlSwch { get; set; } + public string sip100tryingSizeLowThr { get; set; } + public string tcpMssModifySwch { get; set; } + public string enbFCErabRejectSwch { get; set; } + public string relScellOnDelaySwch { get; set; } + public string deflateUDCSwch { get; set; } + public string specialECGISwch { get; set; } + public string snTransOptSwch { get; set; } + public string rlfKpiReportSwch { get; set; } + public string magicRadioUserMigStrategy { get; set; } + public string moId { get; set; } + public string interFMeasIndDif4VTDTSwch { get; set; } + public string cnUbFtpEnable { get; set; } + public string mMESelec4LteUE { get; set; } + public string cgiMeasSelectCAUeSwch { get; set; } + public string gsmCsfbSwitch { get; set; } + public string tmsiCodecSwch { get; set; } + public string s1TansBackPressureSwch { get; set; } + public string osgEcgiMeasGapRelSwch { get; set; } + public string specUeIdentityQci { get; set; } + public string redirectwithSecuritySwch { get; set; } + public string caMIMOAdptSwch { get; set; } + public string mdtPlmnListSwch { get; set; } + public string eNDCX2AlarmSwch { get; set; } + public string mMESelec4RerouteFail { get; set; } + public string ueCapForcedSaveSwch { get; set; } + public string threeCC2fourCCthr { get; set; } + public string switchForUserInactivity { get; set; } + public string interPlmnHoToNRSwch { get; set; } + public string reserved3 { get; set; } + public string tddFdd5ccCaSwch { get; set; } + public string reserved2 { get; set; } + public string reserved7 { get; set; } + public string reserved6 { get; set; } + public string reserved5 { get; set; } + public string reserved4 { get; set; } + public string rFFInfoReportPeriod { get; set; } + public string nrShareMode { get; set; } + public string fddTdd5ccCaSwch { get; set; } + public string ueCapLenOptSwitch { get; set; } + public string caRequestBandSwch { get; set; } + public string swchOfMtcACRest { get; set; } + public string lwaSwch { get; set; } + public string magRaDataUserMigMode { get; set; } + public string sigMdtUtranPrdMeasSwch { get; set; } + public string drxConfig4NormalUEHOSwch { get; set; } + public string mod4MovingUE { get; set; } + public string cellBarHoFailPunishSwch { get; set; } + public string swicthForHoPartCac { get; set; } + public string uRIMGetLBInfoSwch { get; set; } + public string enableMroAlarm { get; set; } + public string ulBaseStationFDS { get; set; } + public string caScellHOSwch { get; set; } + public string nrMeasGapSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string utranSrvccSwitch { get; set; } + public string interFHOBaseVOIPSwch { get; set; } + public string inBandContCaSwch { get; set; } + public string cssStaticSharingSwitch { get; set; } + public string cont3ccCaSwch { get; set; } + public string sccJudgeOfFSFatSwchUl { get; set; } + public string lbtEnableSwch { get; set; } + public string compJESwchUL { get; set; } + public string voNRSpecStgySwch { get; set; } + public string interEnbCaSwch { get; set; } + public string cnUbFtpAddr { get; set; } + public string tcpProxyNSASwch { get; set; } + public string twoCC2oneCCthr { get; set; } + public string signalBasedMdtSwch { get; set; } + public string tcpOrderEnable { get; set; } + public string clPsHoSwitch { get; set; } + public string sendPWSRestartIndSwch { get; set; } + public string enableSleepAlarm { get; set; } + public string cloudReliaSwch { get; set; } + public string extendedQCISwitch { get; set; } + public string csfbFastenInVoLTESwch { get; set; } + public string inBandInContCaSwch { get; set; } + public string massiveCooperationSwch { get; set; } + public string unidireDetectEnableSwch { get; set; } + public string cmasSpecialRangeSwitch { get; set; } + public string spidSwitch { get; set; } + public string noLogMdtTkReqLogDataSwch { get; set; } + public string blackNbrReservedSwch { get; set; } + public string rtpOrderEnable { get; set; } + public string fddTddHoSwitch { get; set; } + public string eNDCX2UpdateOMCSwch { get; set; } + public string compSelMergeSwch { get; set; } + public string mccMaxRetranQueNum { get; set; } + public string algGlobalRsved1 { get; set; } + public string hOBasedNbrStatSwch { get; set; } + public string eMTCHOCeLevelSwch { get; set; } + public string caReduceNonContCombSwch { get; set; } + public string hoToOSGForQCI1Swch { get; set; } + public string refOperatorCert { get; set; } + public string mrMaxOnlineTimeMode { get; set; } + public string glPsHoSwitch { get; set; } + public string ulCOMPCloudIrcSwch { get; set; } + public string tempNBRKpiRptSwch { get; set; } + public string plmnRouteSwch { get; set; } + public string userStateTransSwch { get; set; } + public string tcpAckSplitSwchUl { get; set; } + public string potentialCOMPUserSwch { get; set; } + public string cgiMeasSelQCI1UeSwch { get; set; } + public string enablePciAlarm { get; set; } + public string sigMdtGsmPrdMeasSwch { get; set; } + public string cOMPUserOptSwch { get; set; } + public string etwsRepetitionCheck { get; set; } + public string caMaxCcNumIndSwch { get; set; } + public string psHoSwchUL { get; set; } + public string unidireRecoverySwch { get; set; } + public string macro2SmallPingPSwch { get; set; } + public string eNDCEnhcedAchorpolySwch { get; set; } + public string enDcX2CertType { get; set; } + public string enDcPerQCIMeasWhrScgBear { get; set; } + public string interPlmnHOLTEStgy { get; set; } + public string measRptTolerantSwch { get; set; } + public string defaultNsaMode { get; set; } + public string fddTdd4ccCaSwch { get; set; } + public string secRatRptSwch { get; set; } + public string cdmCsfbSwitch { get; set; } + public string nrPciAlarmSwch { get; set; } + public string ncgiMeasType { get; set; } + public string fddTddCaSwch { get; set; } + public string x2AdjCellDelSwch { get; set; } + public string gsmSrvccSwitch { get; set; } + public string prmtEpcInDenbRnSwch { get; set; } + public string caBandPrioritySwch { get; set; } + public string sipIdentifySwch { get; set; } + public string utranLBSwch { get; set; } + public string sigMdtInterPrdMeasSwch { get; set; } + public string mecsQcellPosiSwitch { get; set; } + public string interPlmnHOLTEQciInd { get; set; } + public string rplcNrPLMNInRanSharSwch { get; set; } + public string interEnbReestabSwch { get; set; } + public string loadBalanceMode { get; set; } + public string caBackOffSwch { get; set; } + public string caSkipFallBackCombSwch { get; set; } + public string caMonitorSwch { get; set; } + public string gsmLBSwch { get; set; } + public string jugeMMERelayIndSwch { get; set; } + public string tempNbrULSRVHOSwch { get; set; } + public string ueRecordIdSwitch { get; set; } + public string unidireDetectDura { get; set; } + public string dssNbrSelfCfgSwitch { get; set; } + public string uldlFtpSwch { get; set; } + public string gsmTempNbrHoSwch { get; set; } + public string sMTCWarnSwch { get; set; } + public string etwsSwitch { get; set; } + public string onlyRohcSwchUl { get; set; } + public string tcpAckSplitSwch { get; set; } + public string sib8SysTimeSwch { get; set; } + public string oneCC2twoCCthr { get; set; } + public string x2UpdateOMCSwch { get; set; } + public string ulDataCompSwch { get; set; } + public string x2RebuildSwch { get; set; } + public string hoToOSGSwch { get; set; } + public string decorSwch { get; set; } + public string tempNBRLBSwch { get; set; } + public string potentialDmimoUserSwch { get; set; } + public string priBasedPLMNSwch { get; set; } + public string tddFdd4ccCaSwch { get; set; } + public string utranTempNbrHoSwch { get; set; } + public string bandCompSwch { get; set; } + public string freqSpaceCfgMode { get; set; } + public string movUe4CellBlockSwch { get; set; } + public string SCSdmaSwchUl { get; set; } + public string cdmaSrvccSwitch { get; set; } + public string caDiffFallBackCombSwch { get; set; } + public string nLPsHoSwch { get; set; } + public string interPlmnHOSwch { get; set; } + public string SCSdmaSwchDl { get; set; } + public string gummeiRouteCompSwch { get; set; } + public string sipInviteSizeThr { get; set; } + public string ipsecStatus { get; set; } + public string compMicroAndMacroSwch { get; set; } + public string fourCC2threeCCthr { get; set; } + public string blackNbrSynPrd { get; set; } + public string procConflict4MmeSwch { get; set; } + public string cCOSwitch { get; set; } + public string cpuLoadMngSwch { get; set; } + public string loadControlSwch { get; set; } + public string manageBasedMdtSwch { get; set; } + public string ldn { get; set; } + public string x2AlarmSwch { get; set; } + public string caFullConfigSwch { get; set; } + public string lteUuUpdateAdjCellMode { get; set; } + public string ranSharSwch { get; set; } + } + + public class ReselectionCtrl + { + public DateTime lastModifiedTime { get; set; } + public string qQualMinOffsetCellSwitch { get; set; } + public string tReselEUTRANSFH { get; set; } + public string mocName { get; set; } + public string qRxLevMinOffsetCellSwitch { get; set; } + public string ldn { get; set; } + public string deprioritisationTimer { get; set; } + public string PLMNIdBasedDedicatedReselSwch { get; set; } + public string tReselectionEUTRA { get; set; } + public string moId { get; set; } + public string deprioritisationType { get; set; } + public string tReselEUTRANSFM { get; set; } + } + public class SISchedulingFDDLTE + { + public DateTime lastModifiedTime { get; set; } + public string siId { get; set; } + public string mocName { get; set; } + public string sib12 { get; set; } + public string sib11 { get; set; } + public string sib22 { get; set; } + public string sib14 { get; set; } + public string sib13 { get; set; } + public string sib24 { get; set; } + public string moId { get; set; } + public string sib10 { get; set; } + public string sib3 { get; set; } + public string sib2 { get; set; } + public string sib16 { get; set; } + public string sib15 { get; set; } + public string ldn { get; set; } + public string sib17 { get; set; } + public string periodicity { get; set; } + public string sib9 { get; set; } + public string sib8 { get; set; } + public string sib5 { get; set; } + public string sib4 { get; set; } + public string sib7 { get; set; } + public string sib6 { get; set; } + } + public class NRCellResetFDDLTE + { + public string tReselNrSFH { get; set; } + public DateTime lastModifiedTime { get; set; } + public string tReselNr { get; set; } + public string nrFreqNum { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string tReselNrRSFM { get; set; } + public string rSSIMeasSwch { get; set; } + public string qQualMinSwch { get; set; } + public string moId { get; set; } + } + public class GlobalSwitchInformation + { + public string snChangeCellPunishSwitch { get; set; } + public string drxCfgControlSwitch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string voiceHandoverPriorityStgy { get; set; } + public string depthROHCSwitch { get; set; } + public string cmasSpecialRangeSwitch { get; set; } + public string dataForwardingSwitch { get; set; } + public string ueMeasRecfgType { get; set; } + public string userNumStatMode { get; set; } + public string amfSelectStgy { get; set; } + public string msOperatorCfgSyncSwitch { get; set; } + public string rrcStateFuncCfg { get; set; } + public string qosFlowIDDupPolicy { get; set; } + public string checkUeNgApIdFailRelUeSwitch { get; set; } + public string ngcOutServRanOnlineSwitch { get; set; } + public string inactiveTimeOptmizeSwch { get; set; } + public string pduIDDupPolicy { get; set; } + public string specialNCGISwch { get; set; } + public string cmasSwch { get; set; } + public string ueCapSegmentQuerySwitch { get; set; } + public string saSpecUeForceFullConfigSwch { get; set; } + public string UEContextReqEnable { get; set; } + public string amfOverloadCtrlSwch { get; set; } + public string ueCapOptimizeSwitch { get; set; } + public string mocName { get; set; } + public string dlDataForwardingSwitch { get; set; } + public string continueROHCContextSwitch { get; set; } + public string nbCellSliceObtBasedTASwch { get; set; } + public string n26InterfaceEnable { get; set; } + public string nrNeighCellUpdateSwitch { get; set; } + public string moId { get; set; } + public string switchForSecondaryRATDataUsageReport { get; set; } + public string drbActiveIdentifySwitch { get; set; } + public string n2ReleaseWithPduListSwitch { get; set; } + public string ulFailThrOfAbnormalUe { get; set; } + public string smcF1TransportMode { get; set; } + public string nbCellFiltBasedSliceSwch { get; set; } + public string startLoadCollectMaxRetryNum { get; set; } + public string mecTrigInactiveSwch { get; set; } + public string ldn { get; set; } + public string snChangePunishSwitch { get; set; } + public string eutranNeighCellUpdateSwitch { get; set; } + public string switchForSrb3Enabled { get; set; } + } + public class NRBlindRd + { + public string includeBeamMeasurements { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public string rsrqThreshold { get; set; } + public string rptQuantityRsIndex { get; set; } + public string rsrpThreshold { get; set; } + } + public class EUtranCellMeasFDDLTE + { + public string wcdmaEcNoThr4DT { get; set; } + public string refCellMeasGroupLTE { get; set; } + public string tarNeighCellRsrqThr { get; set; } + public string anrMeasMicroCellSwch { get; set; } + public string lbNSAIntraFreqPriority { get; set; } + public string filterCoeffRsrp { get; set; } + public string tarNeighCellVTRsrpThr { get; set; } + public string filterCoeffRsrq { get; set; } + public string sAIndependentMeasCfgSwch { get; set; } + public string multiPLMNLocStCSFB { get; set; } + public string sADirectMigMaxRetryNum { get; set; } + public string bigSRVHOTargetTypeDL { get; set; } + public string migBaseUEPositionSwch { get; set; } + public string minSampNumOverlapRate { get; set; } + public string perQCIInterRATMeaGrpCfg { get; set; } + public string psInterFMeasStrategy { get; set; } + public string tarNeighRsrqThr4HoBasedVoice { get; set; } + public string qAdjBasedBfGainSwch { get; set; } + public string interFandInterR { get; set; } + public string srvccPingPongHOSwch { get; set; } + public string mocName { get; set; } + public string nSAOcs { get; set; } + public string spidStrategyGrpCfg { get; set; } + public string bigSRVHOULPRBStartThrdUL { get; set; } + public string sPIDDataMeasFreqStgy { get; set; } + public string bigSRVHO4WorseQualUEIndUL { get; set; } + public string migBaseUEPosiWhr4Rat { get; set; } + public string epsFBEndFastReturnSwch { get; set; } + public string sAImmciSubPrioSwch { get; set; } + public string IntraRATPinPonCIOStep { get; set; } + public string srvccBasedVoLTEQualitySwch { get; set; } + public string speedRangeStep4MM { get; set; } + public string uePosiMeasSwch { get; set; } + public string maxUserNum4Overlap { get; set; } + public string emtcCovHOSwch { get; set; } + public string nRInterRATMeasStrategy { get; set; } + public string lbIntraFreqPriority { get; set; } + public string migBasePosiWheConQCIRel { get; set; } + public string lbMaxHOCell { get; set; } + public string wcdmaHOBasedRscpandEcNoSwch { get; set; } + public string interRatGsmPeriodMeasSwitch { get; set; } + public string whrSpeUE4MigBasePosition { get; set; } + public string enDcPerQCIA1A2MeaGrpCfg { get; set; } + public string highSpeedThr { get; set; } + public string hoBasedSpeedSwch { get; set; } + public string bigSRVHO4WorseQualUEIndDL { get; set; } + public string filterCoeffNR { get; set; } + public string uLSINRBasedRdUERecTimer { get; set; } + public string endcPccIntraFreqPrio { get; set; } + public string geranCarriFreqNum { get; set; } + public string handover4AtmosductCell { get; set; } + public string bigSRVHO4FormalNbIndUL { get; set; } + public string enDcPerQCIIntraFMeaGrpCfg { get; set; } + public string sADirectMigMethod { get; set; } + public string wcdmaEcNoThr4VT { get; set; } + public string moId { get; set; } + public string geranAnrArfcn { get; set; } + public string atmosphericDataSINR { get; set; } + public string nbrCelThrIntrFOverlap { get; set; } + public string csfbMethdofUMTS { get; set; } + public string icoCellType { get; set; } + public string bigSRVHOTargetDLPRBThrdDL { get; set; } + public string timeOfShortHO { get; set; } + public string qCILevelHOBaseULBigSRV { get; set; } + public string interFPeriodMeasSwitch { get; set; } + public string intraRATPingPongHODetTimeLen { get; set; } + public string hoBasedRSRPandRSRQSwch { get; set; } + public string overlapRateInterFreqSwch { get; set; } + public string minStayTimeInSC { get; set; } + public string srvCellArrJudgeStgySwch { get; set; } + public string cdmaCarriFreqNum { get; set; } + public string csfbCEUUserMcsThrd { get; set; } + public string interFreqNum { get; set; } + public string csfbMeasure { get; set; } + public string hlMigrtRATPriority { get; set; } + public string wCDMAFHOMeasCfgSwch { get; set; } + public string geranBandAnrMeas { get; set; } + public string hoBaseServiceReturnSwch { get; set; } + public string sRVCCBasedCSFBSwch { get; set; } + public string bigSRVHODLPRBStartThrdDL { get; set; } + public string sADirectIMMCIEffectRange { get; set; } + public string migBasePosiFilterEnDcInd { get; set; } + public string umtsMeaObjUpdateSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mCSWorseThrdDL { get; set; } + public string uESpeedIndCompJudgeSwch { get; set; } + public string perQCIA1A2MeaGrpCfg { get; set; } + public string sRVCCBasedCSFBMeasTimer { get; set; } + public string overlapRateThr4SameCover { get; set; } + public string atmosphericVoiceSINR { get; set; } + public string qCILevelMigBasePosiInd { get; set; } + public string bigSRVHOUENumStartThrdDL { get; set; } + public string blindA2Strategy { get; set; } + public string lowSpeedThr { get; set; } + public string trigQuaofTarCellOrder { get; set; } + public string sPIDVoiceMeasFreqStgy { get; set; } + public string methodLTEtoUTRAN { get; set; } + public string operSpecUserIMMCISwch { get; set; } + public string qosCfgBySpeedIndSwchUl { get; set; } + public string pingPongTmr { get; set; } + public string meas4HOBasedVoLTEQual { get; set; } + public string speedMeasureSwch { get; set; } + public string tarNeighCellVTRsrqThr { get; set; } + public string periodMeasGnssSwitch { get; set; } + public string srvCelThrInterFOverlap { get; set; } + public string qosCfgBySpeedIndSwchDl { get; set; } + public string caPcellMeasure { get; set; } + public string uENumThr4HOBaseService { get; set; } + public string multiPLMNLocSt4RdSwch { get; set; } + public string eventMeasGnssSwitch { get; set; } + public string pingPongThres4Macro2Small { get; set; } + public string voiceAdmtSwch { get; set; } + public string intraRATPingPongHOSwch { get; set; } + public string trainOutjudgeThr { get; set; } + public string schedInEcgiHoSwch { get; set; } + public string hOBaseServFilterEnDcInd { get; set; } + public string bigSRVHOWhr4HOinScenDL { get; set; } + public string macrotSmallForbidTime { get; set; } + public string speedHoFreqSelOptSwch { get; set; } + public string srvccInterFMeasStrategy { get; set; } + public string maxSRVCCPingPongHONum { get; set; } + public string hOBaseServiceWhr4HOinScen { get; set; } + public string servCellRsrqThr { get; set; } + public string epsFBEndFRMethod { get; set; } + public string utranCarriFreqNum { get; set; } + public string measType4CASelfCfg { get; set; } + public string interRATNoHOCellRedSwch { get; set; } + public string measureThresh { get; set; } + public string methodLTEtoNR { get; set; } + public string bigSRVHOLoadObDLPRBThrdDL { get; set; } + public string ocs { get; set; } + public string methodLTEtoGSM { get; set; } + public string csfbMethdofCDMA { get; set; } + public string sAPerQCIIntraFMeaGrpCfg { get; set; } + public string interRatCdmaPeriodMeasSwch { get; set; } + public string wCDMARscpThr4VT { get; set; } + public string anrMeaUmtsNbrSortSwch { get; set; } + public string srvCelThrIntrFOverlap { get; set; } + public string utranPciEcNoThrd { get; set; } + public string csfbMethodofGSM { get; set; } + public string geranAnrArfcnNum { get; set; } + public string bigSRVHO4MMCellIndUL { get; set; } + public string overlapRateIntraFreqSwch { get; set; } + public string intraFMeasBW { get; set; } + public string quantityFddUtra { get; set; } + public string nbrCelOffsIntrFOverlap { get; set; } + public string tarNeighCellRsrpThr4LB { get; set; } + public string intraRATNoHOCellRedSwch { get; set; } + public string uLSINRBasedRdThrd { get; set; } + public string bigSRVHOTargetULPRBThrdUL { get; set; } + public string sAPerQCIA1A2MeaGrpCfg { get; set; } + public string csfbVagueUserLocation { get; set; } + public string bigSRVHO4MMCellIndDL { get; set; } + public string r8r9UnsuptEutraFreqs { get; set; } + public string speedRangeStep4Macro { get; set; } + public string hOBaseServiceMaxRetryNum { get; set; } + public string crsRsrp6RBSwch { get; set; } + public string operSpecUserStgySwch { get; set; } + public string nbrCelOffsInteFOverlap { get; set; } + public string hOBaseServiceRetryTimer { get; set; } + public string cSFBbaseLAI { get; set; } + public string eMTCCEAdaptHOSwch { get; set; } + public string qCILevelMigBaseSA { get; set; } + public string bigSRVHOSwchDL { get; set; } + public string filCoeUtran { get; set; } + public string lastTimerExpMeaRecfg { get; set; } + public string perQCIRedA2MeaGrpCfg { get; set; } + public string bigSRVHOWhrConsidNbLoadUL { get; set; } + public string tarNRsrpThr4HOBasedSRVUl { get; set; } + public string uLSINRBasedRdSwch { get; set; } + public string intraRATHObasedLoadSwch { get; set; } + public string sADirectImmciSpidSwch { get; set; } + public string uLSINRLowThrd { get; set; } + public string qci1RedSwch { get; set; } + public string intraRATUnkPCIRedSwch { get; set; } + public string trainInjudgeThr { get; set; } + public string maxIntraRATPingPongHONum { get; set; } + public string servCellRsrpThr { get; set; } + public string neighCellConfig { get; set; } + public string interFHOBasedVoLTEQualSwch { get; set; } + public string overlapSrvRSRPThr { get; set; } + public string macroSmallIntraFreqMeasSwch { get; set; } + public string netWorkControlOrder { get; set; } + public string hoBasedeMBMSSwch { get; set; } + public string operSpecUserStgyGroupId { get; set; } + public string uLSINRBasedRdUERecFactor { get; set; } + public string sINRWorseThrdUL { get; set; } + public string tarNeighCellRsrqThr4LB { get; set; } + public string perQCIMeasSwch { get; set; } + public string bigSRVHOMeasTimerDL { get; set; } + public string bigSRVHOFilterEnDcIndDL { get; set; } + public string multiPLMNLocSt4PSSwch { get; set; } + public string hoBasedSpeedWhrRefArrStat { get; set; } + public string speedFreqOffThr { get; set; } + public string perQCIIntraFreqMeaGrpCfg { get; set; } + public string overlapRateUpdateDThr { get; set; } + public string bigSRVHOFilterEnDcIndUL { get; set; } + public string qCILevelHOBaseDLBigSRV { get; set; } + public string interRatUtranPeriodMeasSwitch { get; set; } + public string measScaleFactor { get; set; } + public string mediumSpeedUserInd { get; set; } + public string sADirectMigRetryTimer { get; set; } + public string bigSRVHOLoadObULPRBThrdUL { get; set; } + public string gapDelay { get; set; } + public string tarPBasedULSRV { get; set; } + public string freqRandomSwch { get; set; } + public string hoCandCelNum { get; set; } + public string perQCIStrategyGrpCfg { get; set; } + public string multiPLMNLocSt4ReestabSwch { get; set; } + public string intraFPeriodMeasSwitch { get; set; } + public string algRsved1 { get; set; } + public string handOverBasedULSRVSwch { get; set; } + public string dualMeasSwitch { get; set; } + public string hoBaseServiceSwch { get; set; } + public string bigSRVHOLoadObUENumThrdDL { get; set; } + public string diffA1Swch { get; set; } + public string filterCoeffGera { get; set; } + public string caReselIntraFreqPriority { get; set; } + public string voLTEMeasFreqStgy { get; set; } + public string tarNRsrpThr4HOBasedVoice { get; set; } + public string csfbBldRedRanSharePlcy { get; set; } + public string srvccPingPongHODetTimeLen { get; set; } + public string wCDMARscpThr4DT { get; set; } + public string bigSRVHOLoadObUENumThrdUL { get; set; } + public string direHOBasedHSpeedSwch { get; set; } + public string nSAAndSAStgyCfg { get; set; } + public string sADirectIMMCIRATPri { get; set; } + public string whrSpeUE4ULBigSRVHO { get; set; } + public string hSpeedSRPriSchdSwch { get; set; } + public string sADirectIMMCISwch { get; set; } + public string uLSINRHighThrd { get; set; } + public string pingPongHoSwitch { get; set; } + public string whrSpeUE4BigSRVHODL { get; set; } + public string sADirectMigSwch { get; set; } + public string nbrCelThrInteFOverlap { get; set; } + public string speedJudgeSwch { get; set; } + public string hSpeedSpecMeasCfgSwch { get; set; } + public string tarNeighCellRsrpThr { get; set; } + public string blackListTmpCellRedSwch { get; set; } + public string hoTarCellPRBThrd { get; set; } + public string perQCIMeasCfgStrategy { get; set; } + public string migBasePosiFilterCAInd { get; set; } + public string enDcSpecMobilityMeasSwch { get; set; } + public string ldn { get; set; } + public string sceneOfRanShare { get; set; } + public string sAImmciFreqRamSwch { get; set; } + public string blindRedBasedVTQualSwch { get; set; } + } + + public class EPSFallbackCtrl + { + public string epsfbSpeedBasedSwch { get; set; } + public string epsfbLTEUnitJudgSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string epsfbMeasTimer { get; set; } + public string epsfbOverlapThrd { get; set; } + public string t320 { get; set; } + public string epsfbLtePriMethod { get; set; } + public string epsfbDetServCellA2RsrpThrd { get; set; } + public string epsfbSingleRBSINRThrdUL { get; set; } + public string epsfbDetServCellQualPoInd { get; set; } + public string epsfbSingleRBSINRULJudgSwch { get; set; } + public string voiceOriginWorseDelayIdTimer { get; set; } + public string epsfbDetServCellA3Offset { get; set; } + public string voiceFBIndSwch { get; set; } + public string epsFallbackRedIndSwch { get; set; } + public string weakCellForbidVoiceCallSwch { get; set; } + public string mocName { get; set; } + public string epsfbEarlyMeasSwch { get; set; } + public string voiceOriginWorseDelayIdSwch { get; set; } + public string epsfbLteMethod { get; set; } + public string voiceOriginWorseRedoffset { get; set; } + public string epsfbSwitch { get; set; } + public string epsfbWaitBetterCellTimer { get; set; } + public string moId { get; set; } + public string epsfbBetterCellSelectStgy { get; set; } + public string epsfbDedicatedReselSwch { get; set; } + public string epsfbEarlyMeasWaitTimer { get; set; } + public string ldn { get; set; } + public string epsfbDetServCellA2SinrThrd { get; set; } + public string voiceOriginWorseSpecStgy { get; set; } + public string epsfbDetServCellA2RsrqThrd { get; set; } + public string epsfbWaitBetterCellSwch { get; set; } + } + public class EPSFallbackRptCfg + { + public string rptAmount { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string ldn { get; set; } + public string rsrqThreshold { get; set; } + public string maxRptCellNum { get; set; } + public string rsrpThreshold { get; set; } + } + public class EPSFallbackLTEFreqMeasConfig + { + public DateTime lastModifiedTime { get; set; } + public string refMeasObjEUTRA { get; set; } + public string epsfbUnitJudgLTENbRSRQThrd { get; set; } + public string mocName { get; set; } + public string epsfbPriority { get; set; } + public string epsfbUnitJudgLTENbRSRPThrd { get; set; } + public string ldn { get; set; } + public string epsfbBlindPriority { get; set; } + public string epsfbBetterCellRSRPThrd { get; set; } + public string epsfbUnitJudgLTENbSINRThrd { get; set; } + public string moId { get; set; } + public string refEPSFallbackRptCfg { get; set; } + } + public class RachConfigGeneric + { + public string preambleTransMax { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string msg1FrequencyStart { get; set; } + public string moId { get; set; } + public string prachConfigIndex { get; set; } + public string preambleReceivedTargetPower { get; set; } + public string ldn { get; set; } + public string msg1FDM { get; set; } + public string zeroCorrelationZoneConfig { get; set; } + public string powerRampingStep { get; set; } + public string bfrRsrpThresholdSsb { get; set; } + public string raResponseWindow { get; set; } + public string zeroCorrelationZoneConfigforBFR { get; set; } + } + public class PUSCHConfigCommon + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string p0NominalWithGrant { get; set; } + public string puschIrcSwch { get; set; } + public string ldn { get; set; } + public string msg3PowerCtrlSwitch { get; set; } + public string moId { get; set; } + public string msg3DeltaPreamble { get; set; } + } + public class PUSCHP0AlphaSets + { + public string p0 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string alpha { get; set; } + public string moId { get; set; } + public string p0AlphaSetId { get; set; } + } + public class PUCCHConfigCommon + { + public string pucchResourceCommon { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string p0Nominal { get; set; } + public string ldn { get; set; } + public string commonPucchAdaptSwch { get; set; } + public string moId { get; set; } + public string pucchIrcSwch { get; set; } + } + + public class P0PUCCH + { + public string p0PUCCHValue { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string p0PUCCHId { get; set; } + public string moId { get; set; } + } + public class PowerControlUL + { + public DateTime lastModifiedTime { get; set; } + public string maxPLforAccMaxTarget { get; set; } + public string targetRbNumForMaxPL { get; set; } + public string atmosDeltaSrsP0 { get; set; } + public string maxPLforAbsMaxTarget { get; set; } + public string puschPowCtrlLowTargetSINR { get; set; } + public string puschOutLoopPowCtrlSwich { get; set; } + public string atmosDeltaPucchP0 { get; set; } + public string switchForCLPCofPUSCH { get; set; } + public string ulUePowerLimitThpThr { get; set; } + public string maxProtectTime4PucchPc { get; set; } + public string closeLoopPowerProtectSwitch { get; set; } + public string deltaPLBeforeMaxPL { get; set; } + public string pucchTargetSinrMargin { get; set; } + public string mocName { get; set; } + public string atmosDeltaPuschP0 { get; set; } + public string switchForCLPCofPUCCH { get; set; } + public string puschPsThrMargin2 { get; set; } + public string switchForCLPCofSRS { get; set; } + public string atmosDeltaMsg1P0 { get; set; } + public string ulUePowerLimitNumThr { get; set; } + public string oINIRBRatioThr { get; set; } + public string tpcStepSwitch { get; set; } + public string moId { get; set; } + public string puschPsThrMargin1 { get; set; } + public string puschPowCtrlPsdOptiSwch { get; set; } + public string pucchPsThrMargin2 { get; set; } + public string puschOIBasedPCSwch { get; set; } + public string puschPowCtrlPeriod { get; set; } + public string targetSINRMargin { get; set; } + public string pNR { get; set; } + public string pucchPsThrMargin1 { get; set; } + public string puschOIBasedPCNIThr { get; set; } + public string ldn { get; set; } + public string xScale { get; set; } + public string ulPowPosProtectPolicy { get; set; } + public string phrThreshold { get; set; } + public string puschPowCtrlHighTargetSINR { get; set; } + public string phrPoorQualitySwitch { get; set; } + public string puschPowCtrlMidTargetSINR { get; set; } + public string pucchDemoTargetSinr { get; set; } + public string targetIoT { get; set; } + public string msg4DedicatedPowCtrlSwitch { get; set; } + } + public class PowerControlULFDDLTE + { + public string rsrpPeriodMeasSwitchDl { get; set; } + public string poNominalPUSCH1 { get; set; } + public string deltaFPucchFormat1b { get; set; } + public string targetBler4A2 { get; set; } + public string targetBler4A1 { get; set; } + public string nSALTEPmax { get; set; } + public string puschPCAdjType { get; set; } + public string targetBler4A0 { get; set; } + public string oIHiIoTThr { get; set; } + public string targetBler4A24QoS { get; set; } + public string pc4GeneralQosSwchUl { get; set; } + public string mocName { get; set; } + public string atmosphericUlPcAckThr { get; set; } + public string puschPwrFiUpMargin4QoS { get; set; } + public string highPowerSwch { get; set; } + public string pmaxConfigHighPowerSwch { get; set; } + public string deltaFPucchFormat2a { get; set; } + public string pmaxforPuschPowCtrl { get; set; } + public string sinrBasedNSADeleteSwch { get; set; } + public string deltaFPucchFormat2b { get; set; } + public string fiMarginforMU { get; set; } + public string oIPuschPowCtrlSwch { get; set; } + public string scalingDownFactor { get; set; } + public string pmaxOfLte4NonSharingPwrUE { get; set; } + public string switchForDCI3A3Pusch { get; set; } + public string sinrBasedNSADeleteHys { get; set; } + public string p0NominalPUSCH { get; set; } + public string lenofNIWindow { get; set; } + public string puschPwrNiThr4QoS { get; set; } + public string upPowAdjSINRThr { get; set; } + public string oIPuschPowA3Offset { get; set; } + public string swithForPHR { get; set; } + public string innerSINRThr4PwrCtr { get; set; } + public string deltaPreambleMsg3 { get; set; } + public string poNominalPUCCH { get; set; } + public string ulPCMaxFiThrd { get; set; } + public string maxAdpUlLtePwrOfNsa { get; set; } + public string powCtrlOpt4FarPoint { get; set; } + public string atmosphericValidMonth { get; set; } + public string deltaTargetMCS4A2 { get; set; } + public string accPowCtrlSwch { get; set; } + public string deltaFPucchFormat5 { get; set; } + public string puschPwrFiUpMargin { get; set; } + public string ks { get; set; } + public string deltaFPucchFormat1 { get; set; } + public string dCI3A3SelPucch { get; set; } + public string deltaFPucchFormat2 { get; set; } + public string filterCoeffRSRP { get; set; } + public string deltaFPucchFormat3 { get; set; } + public string nSAPowAlloOptiSwch { get; set; } + public string atmosRsDecSwch { get; set; } + public string moId { get; set; } + public string mCS0BlerHThr { get; set; } + public string adpAllocNsaUlPwrSwch { get; set; } + public string dCI3A3SelPusch { get; set; } + public string oIDecPowUeType { get; set; } + public string accSINRLowThr { get; set; } + public string atmosphericValidHourTime { get; set; } + public string deltaMsg3 { get; set; } + public string p0UePucchPub { get; set; } + public string atmosRsDecPLThr { get; set; } + public string fiMarginforSU { get; set; } + public string iCoULPowerOffset { get; set; } + public string puschPwrNiThr { get; set; } + public string pmaxOfLte4SharingPwrUE { get; set; } + public string switchForCLPCofPUSCH { get; set; } + public string puschPwrFiupLimit { get; set; } + public string opt4DynSharingPwrNsaUE { get; set; } + public string deltaFiMarginforVoLTE { get; set; } + public string fiMarginfor256Qam { get; set; } + public string acc64SINRUpThr { get; set; } + public string fiMarginfor64Qam { get; set; } + public string switchForCLPCofPUCCH { get; set; } + public string puschDSKeyIndBasePwAdjLim { get; set; } + public string targetBler4A14QoS { get; set; } + public string switchForDCI3A3Pucch { get; set; } + public string puschSSKeyIndBasePwAdjLim { get; set; } + public string difofPucchPsandNi { get; set; } + public string puschPwrFilowLimit { get; set; } + public string oISendTypeswch { get; set; } + public string nsaHighPowerSwch { get; set; } + public string pucchPsTargetAdapSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string deltaPL { get; set; } + public string acc16SINRUpThr { get; set; } + public string atmosphericUlPcNackThr { get; set; } + public string rsrpEventMeasSwitchDl { get; set; } + public string phrThpThrInAtmosduct { get; set; } + public string atmosphericPreInitPwr { get; set; } + public string atmosphericFiUpLimit { get; set; } + public string atmosphericTimeSwch { get; set; } + public string deltaFPucchFormat1bCS { get; set; } + public string oiSwitchOfClosePc { get; set; } + public string alpha { get; set; } + public string pucchFmt2InPowCtrlSwch { get; set; } + public string targetIOT { get; set; } + public string pucchKeyIndBasedPwAdjLim { get; set; } + public string pucchTgtPsHiLimt { get; set; } + public string oIDecPowPLThr { get; set; } + public string powerOffsetOfSRS { get; set; } + public string pucchTgtPsLwLimt { get; set; } + public string p0UePusch1Pub { get; set; } + public string deltaPL4QoS { get; set; } + public string ulPCMaxSINRThrd { get; set; } + public string maxSINRThr256Qam { get; set; } + public string ldn { get; set; } + public string atmosphericAlfa { get; set; } + public string oILwIoTThr { get; set; } + } + public class QuantityConfigNR + { + public string ssbRsrqMeasFilterCoeff { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ssbRsrpMeasFilterCoeff { get; set; } + public string mocName { get; set; } + public string csiRsSinrMeasFilterCoeff { get; set; } + public string ldn { get; set; } + public string csiRsRsrqMeasFilterCoeff { get; set; } + public string ssbSinrMeasFilterCoeff { get; set; } + public string csiRsRsrpMeasFilterCoeff { get; set; } + public string moId { get; set; } + } + public class DRXCfg + { + public string serviceMergePrioCNInd { get; set; } + public DateTime lastModifiedTime { get; set; } + public string serviceQualDrxSwch { get; set; } + public string mocName { get; set; } + public string drxLongCycleForANR { get; set; } + public string defaultDrxMergePriority { get; set; } + public string drxLongCycleForLteANR { get; set; } + public string moId { get; set; } + public string enDcDrxLongCycleForANR { get; set; } + public string drxSwitch { get; set; } + public string enDcDrxLongCycleForLteANR { get; set; } + public string ldn { get; set; } + public string ueNumDrxSwch { get; set; } + public string qosTypeDrxSwch { get; set; } + } + public class UeTimer + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string n310VoNR { get; set; } + public string t300 { get; set; } + public string t311 { get; set; } + public string t310 { get; set; } + public string t310VoNR { get; set; } + public string moId { get; set; } + public string t319 { get; set; } + public string t304VoNR { get; set; } + public string t301 { get; set; } + public string n311VoNR { get; set; } + public string t304 { get; set; } + public string n310 { get; set; } + public string ldn { get; set; } + public string n311 { get; set; } + } + public class ClockSyncConfig + { + public string refSubRack { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string clockSyncMode { get; set; } + public string holdoverAlmEnable { get; set; } + public string mocName { get; set; } + public string difAlarmThreshold { get; set; } + public string bbuMutualBackup { get; set; } + public string clockSwitchPolicy { get; set; } + public string phaseDifDetEnable { get; set; } + public string moId { get; set; } + public string airAlmDelayTime { get; set; } + public string synceAssisHoldEnable { get; set; } + public string frameOffset { get; set; } + public string refReplaceableUnit { get; set; } + public string basestationClkMSMode { get; set; } + public string operState { get; set; } + public string ldn { get; set; } + public string difAlarmRecvThreshold { get; set; } + public string benchmarkClock { get; set; } + public string availStatus { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNRCellRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNRCellRelation.cs new file mode 100644 index 00000000..4fbddca6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNRCellRelation.cs @@ -0,0 +1,552 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultNRCellRelation + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string qRxLevMinOffsetCell { get; set; } + public string qOffsetCell { get; set; } + public string refExternalNRCellCU { get; set; } + public string refNRCellCU { get; set; } + public string endcPSCellChangeInd { get; set; } + public string coverType { get; set; } + public string voiceMobilitySwch { get; set; } + public string rachLessEnabled { get; set; } + public string compSupport { get; set; } + public string controlMode { get; set; } + public string anrIndicator { get; set; } + public string mocName { get; set; } + public string caSupport { get; set; } + public string supportXnHo { get; set; } + public string esCellType { get; set; } + public string removeAllowed { get; set; } + public string moId { get; set; } + public string ngHoDataDirectFwdSupport { get; set; } + public string hoState { get; set; } + public string ldn { get; set; } + public string cellIndividualOffset { get; set; } + public string qQualMinOffsetCell { get; set; } + public string useState { get; set; } + } + public class ExternalNrCellLTE + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string mcc { get; set; } + public string gNodeBId { get; set; } + public string nrPointA { get; set; } + public string bandWidthNrSCS { get; set; } + public string centerFreq { get; set; } + public string bandWidthNrNRB { get; set; } + public string supportEnDc { get; set; } + public string pci { get; set; } + public string addiFreqBandInd { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string enDcCfgTAC { get; set; } + public string reserve1 { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string sSBSCS { get; set; } + public string algNRTDDRsved1 { get; set; } + public string ldn { get; set; } + public string mcclist { get; set; } + public string fiveGSTAC { get; set; } + } + public class InactiveCfgForServ + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string ueInactiveTimer { get; set; } + public string moId { get; set; } + public string refQoSCharacteristicsCU { get; set; } + public string weakCellUeMbRlsNoServTime { get; set; } + } + public class SSBlock { + public DateTime lastModifiedTime { get; set; } + public string sf5 { get; set; } + public string cellMainSSBPosOffset { get; set; } + public string sf10 { get; set; } + public string reserved127 { get; set; } + public string duration { get; set; } + public string isMultiCover { get; set; } + public string ssbBeamNumForDiff { get; set; } + public string smtc1PrdAndOffset { get; set; } + public string posDiffSwch { get; set; } + public string ssblockBeamType { get; set; } + public string cellSSBRMBitmap { get; set; } + public string beamValid { get; set; } + public string longBitmap { get; set; } + public string sf20 { get; set; } + public string mocName { get; set; } + public string moId { get; set; } + public string envelopeAzimuth { get; set; } + public string envelopeTilt { get; set; } + public string ssbPositionInBurst { get; set; } + public string ssblockBeamConfig { get; set; } + public string localCellSSBBitmap { get; set; } + public string ldn { get; set; } + public string sf40 { get; set; } + public string sf160 { get; set; } + public string ssblockBeamCoverType { get; set; } + public string sf80 { get; set; } + public string shortBitmap { get; set; } + } + + public class NRPhysicalCellDU + { + public string nrCellScene { get; set; } + public string reserved401 { get; set; } + public string reserved400 { get; set; } + public string reserved403 { get; set; } + public string reserved402 { get; set; } + public string srsAntiInterferenceSwitch { get; set; } + public string bwpCfgType { get; set; } + public string reserved409 { get; set; } + public string pucchResShareSwch { get; set; } + public string reserved408 { get; set; } + public string reserved405 { get; set; } + public string reserved404 { get; set; } + public string nrPhysicalCellDUId { get; set; } + public string reserved407 { get; set; } + public string reserved406 { get; set; } + public string schduleLimitaionEnable { get; set; } + public string qcellFlag { get; set; } + public string firstActiveDownlinkBWPId { get; set; } + public string reserved50 { get; set; } + public string mocName { get; set; } + public string reserved410 { get; set; } + public string licenseTags { get; set; } + public string ulCceRatio4DedCoreset { get; set; } + public string reserved43 { get; set; } + public string reserved42 { get; set; } + public string reserved41 { get; set; } + public string reserved40 { get; set; } + public string reserved49 { get; set; } + public string tciSwitch { get; set; } + public string reserved48 { get; set; } + public string reserved47 { get; set; } + public string reserved46 { get; set; } + public string reserved45 { get; set; } + public string reserved44 { get; set; } + public string cellAtt { get; set; } + public string gnssPredictEndTimer { get; set; } + public string reserved32 { get; set; } + public string reserved31 { get; set; } + public string initLimitSchdPRBPos { get; set; } + public string reserved313 { get; set; } + public string reserved39 { get; set; } + public string reserved312 { get; set; } + public string reserved38 { get; set; } + public string reserved315 { get; set; } + public string reserved37 { get; set; } + public string reserved314 { get; set; } + public string reserved36 { get; set; } + public string reserved35 { get; set; } + public string moId { get; set; } + public string reserved34 { get; set; } + public string reserved311 { get; set; } + public string reserved33 { get; set; } + public string reserved317 { get; set; } + public string highPowUESwitch { get; set; } + public string reserved316 { get; set; } + public string reserved319 { get; set; } + public string reserved318 { get; set; } + public string nrCellRadius { get; set; } + public string reserved203 { get; set; } + public string reserved324 { get; set; } + public string reserved202 { get; set; } + public string reserved323 { get; set; } + public string reserved205 { get; set; } + public string reserved326 { get; set; } + public string reserved204 { get; set; } + public string reserved325 { get; set; } + public string reserved320 { get; set; } + public string reserved201 { get; set; } + public string reserved322 { get; set; } + public string reserved200 { get; set; } + public string reserved321 { get; set; } + public string userExpSwitch { get; set; } + public string bwpParamSuiteLastApply { get; set; } + public string reserved207 { get; set; } + public string reserved328 { get; set; } + public string reserved206 { get; set; } + public string reserved327 { get; set; } + public string reserved209 { get; set; } + public string reserved208 { get; set; } + public string reserved329 { get; set; } + public string pdcchPowerAdaptSwitch { get; set; } + public string cellReservedForOtherUse { get; set; } + public string spectrumShareScene { get; set; } + public string reserved214 { get; set; } + public string reserved335 { get; set; } + public string reserved213 { get; set; } + public string reserved334 { get; set; } + public string reserved216 { get; set; } + public string reserved337 { get; set; } + public string reserved215 { get; set; } + public string reserved336 { get; set; } + public string reserved210 { get; set; } + public string reserved331 { get; set; } + public string reserved330 { get; set; } + public string reserved212 { get; set; } + public string reserved333 { get; set; } + public string reserved211 { get; set; } + public string reserved332 { get; set; } + public string bwpHOSwitch { get; set; } + public string reserved218 { get; set; } + public string reserved339 { get; set; } + public string reserved217 { get; set; } + public string reserved338 { get; set; } + public string resourceRptPeriod { get; set; } + public string refNRCarrier { get; set; } + public string reserved219 { get; set; } + public string netShareModSelect { get; set; } + public string mainPhysicalCellSwitch { get; set; } + public string useFullResumeID { get; set; } + public string userLabel { get; set; } + public string reserved340 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string ulCceRatio4Coreset0 { get; set; } + public string reserved225 { get; set; } + public string reserved346 { get; set; } + public string reserved224 { get; set; } + public string reserved345 { get; set; } + public string reserved227 { get; set; } + public string reserved348 { get; set; } + public string reserved226 { get; set; } + public string reserved347 { get; set; } + public string reserved221 { get; set; } + public string reserved342 { get; set; } + public string reserved220 { get; set; } + public string reserved341 { get; set; } + public string reserved223 { get; set; } + public string reserved344 { get; set; } + public string reserved222 { get; set; } + public string reserved343 { get; set; } + public string reserved229 { get; set; } + public string reserved228 { get; set; } + public string reserved349 { get; set; } + public string netShareCellShareW { get; set; } + public string pMax { get; set; } + public string reserved230 { get; set; } + public string reserved351 { get; set; } + public string reserved350 { get; set; } + public string nrCarrierGroupId { get; set; } + public string reserved115 { get; set; } + public string reserved236 { get; set; } + public string reserved357 { get; set; } + public string reserved114 { get; set; } + public string reserved235 { get; set; } + public string reserved356 { get; set; } + public string reserved117 { get; set; } + public string reserved238 { get; set; } + public string reserved359 { get; set; } + public string reserved116 { get; set; } + public string reserved237 { get; set; } + public string reserved358 { get; set; } + public string reserved232 { get; set; } + public string reserved353 { get; set; } + public string reserved231 { get; set; } + public string reserved352 { get; set; } + public string reserved113 { get; set; } + public string reserved234 { get; set; } + public string reserved355 { get; set; } + public string reserved112 { get; set; } + public string reserved233 { get; set; } + public string reserved354 { get; set; } + public string prbResUsedByOtherLogicCellSwch { get; set; } + public string reserved118 { get; set; } + public string reserved239 { get; set; } + public string reserved360 { get; set; } + public string reserved241 { get; set; } + public string reserved362 { get; set; } + public string reserved240 { get; set; } + public string reserved361 { get; set; } + public string oneSRORmoreSRforUE { get; set; } + public string pdschMappingTypeChoice { get; set; } + public string reserved247 { get; set; } + public string reserved368 { get; set; } + public string rateMatchStrategySwch { get; set; } + public string reserved246 { get; set; } + public string reserved367 { get; set; } + public string reserved128 { get; set; } + public string reserved249 { get; set; } + public string reserved248 { get; set; } + public string reserved369 { get; set; } + public string reserved243 { get; set; } + public string reserved364 { get; set; } + public string reserved242 { get; set; } + public string reserved363 { get; set; } + public string ueSyncCmpIndTimer { get; set; } + public string reserved245 { get; set; } + public string reserved366 { get; set; } + public string reserved244 { get; set; } + public string reserved365 { get; set; } + public string serviceSwch { get; set; } + public string gnssPredictStartTimer { get; set; } + public string reserved129 { get; set; } + public string pMaxConfigSwitch { get; set; } + public string timeSequenceTestMode { get; set; } + public string reserved250 { get; set; } + public string reserved371 { get; set; } + public string reserved370 { get; set; } + public string reserved131 { get; set; } + public string reserved373 { get; set; } + public string reserved130 { get; set; } + public string reserved251 { get; set; } + public string reserved372 { get; set; } + public string reserved137 { get; set; } + public string reserved379 { get; set; } + public string reserved136 { get; set; } + public string reserved378 { get; set; } + public string reserved139 { get; set; } + public string reserved138 { get; set; } + public string reserved133 { get; set; } + public string reserved375 { get; set; } + public string bwpInactivityTimer { get; set; } + public string reserved132 { get; set; } + public string reserved374 { get; set; } + public string reserved135 { get; set; } + public string reserved377 { get; set; } + public string reserved134 { get; set; } + public string reserved376 { get; set; } + public string speedMaxThr { get; set; } + public string duplexMode { get; set; } + public string reserved140 { get; set; } + public string reserved382 { get; set; } + public string reserved381 { get; set; } + public string reserved142 { get; set; } + public string reserved384 { get; set; } + public string reserved141 { get; set; } + public string reserved383 { get; set; } + public string reserved380 { get; set; } + public string reserved148 { get; set; } + public string reserved147 { get; set; } + public string reserved389 { get; set; } + public string reserved149 { get; set; } + public string reserved144 { get; set; } + public string reserved386 { get; set; } + public string reserved143 { get; set; } + public string reserved385 { get; set; } + public string reserved146 { get; set; } + public string reserved388 { get; set; } + public string reserved145 { get; set; } + public string reserved387 { get; set; } + public string imsEmergencySupport { get; set; } + public string reserved151 { get; set; } + public string reserved393 { get; set; } + public string reserved150 { get; set; } + public string reserved392 { get; set; } + public string reserved153 { get; set; } + public string reserved395 { get; set; } + public string reserved152 { get; set; } + public string reserved394 { get; set; } + public string reserved391 { get; set; } + public string reserved390 { get; set; } + public string sib1Periodicity { get; set; } + public string reserved159 { get; set; } + public string reserved158 { get; set; } + public string reserved155 { get; set; } + public string reserved397 { get; set; } + public string reserved154 { get; set; } + public string reserved396 { get; set; } + public string reserved157 { get; set; } + public string reserved399 { get; set; } + public string reserved156 { get; set; } + public string reserved398 { get; set; } + public string sliceGuarRBSwit { get; set; } + public string reserved162 { get; set; } + public string reserved161 { get; set; } + public string reserved164 { get; set; } + public string msg2Msg4TransOnMbsfnSwitch { get; set; } + public string reserved163 { get; set; } + public string resourceExpansion { get; set; } + public string reserved160 { get; set; } + public string reserved169 { get; set; } + public string reserved166 { get; set; } + public string reserved165 { get; set; } + public string reserved168 { get; set; } + public string ucNeighbCrsPortInd { get; set; } + public string reserved167 { get; set; } + public string masterOperatorId { get; set; } + public string reserved173 { get; set; } + public string reserved172 { get; set; } + public string reserved175 { get; set; } + public string reserved174 { get; set; } + public string reserved93 { get; set; } + public string reserved92 { get; set; } + public string reserved171 { get; set; } + public string reserved91 { get; set; } + public string reserved170 { get; set; } + public string hoSSBNum { get; set; } + public string reserved177 { get; set; } + public string reserved176 { get; set; } + public string pdcchPowerRange { get; set; } + public string reserved179 { get; set; } + public string reserved178 { get; set; } + public string diffSignalPerCPSwitch { get; set; } + public string scheduleLimitationSwitch { get; set; } + public string tiltAngleThr { get; set; } + public string reserved184 { get; set; } + public string reserved183 { get; set; } + public string preambleResAllocType { get; set; } + public string srsCarrierSwitchingEnable { get; set; } + public string reserved186 { get; set; } + public string reserved185 { get; set; } + public string reserved180 { get; set; } + public string reserved182 { get; set; } + public string gSCNOffset { get; set; } + public string reserved181 { get; set; } + public string reserved188 { get; set; } + public string reserved187 { get; set; } + public string ueNumPhyResAdm { get; set; } + public string diffPlmnMUEnable { get; set; } + public string firstActiveUplinkBWPId { get; set; } + public string rptIntervalOfAssistanceInfo { get; set; } + public string cceReservationMode { get; set; } + public string eCallOverIMSSupport { get; set; } + public string reserved197 { get; set; } + public string reserved199 { get; set; } + public string reserved198 { get; set; } + public string coverageType { get; set; } + public string nTimingAdvanceOffset { get; set; } + public string ldn { get; set; } + } + public class ExternalNrCellFDDLTE + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string nrPointAUL { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string addiFreqBandIndDL { get; set; } + public string mcc { get; set; } + public string gNodeBId { get; set; } + public string supportEnDc { get; set; } + public string pci { get; set; } + public string bandWidthNrSCSDL { get; set; } + public string bandWidthNrNRBDL { get; set; } + public string freqBandIndUL { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string enDcCfgTAC { get; set; } + public string algNRFDDRsved1 { get; set; } + public string reserve1 { get; set; } + public string bandWidthNrSCSUL { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string bandWidthNrNRBUL { get; set; } + public string sSBSCS { get; set; } + public string centerFreqDL { get; set; } + public string ldn { get; set; } + public string nrPointADL { get; set; } + public string mcclist { get; set; } + public string fiveGSTAC { get; set; } + } + public class EUtranRelationTDDLTE + { + public string userLabel { get; set; } + public string overlapCoverage { get; set; } + public DateTime lastModifiedTime { get; set; } + public string coverESCell { get; set; } + public string noSupMobilitySwch { get; set; } + public string overlapRateUpdateSwch { get; set; } + public string overlapRate { get; set; } + public string bigSRVHOIndUL { get; set; } + public string switchonTimeWindow { get; set; } + public string isBasicCoverageCell { get; set; } + public string coperType { get; set; } + public string refExternalEUtranCellTDDLTE { get; set; } + public string whiteListNbrInd { get; set; } + public string isRemoveAllowed { get; set; } + public string cellIndivOffset { get; set; } + public string bigSRVHOIndDL { get; set; } + public string isHOAllowed { get; set; } + public string s1DataFwdFlag { get; set; } + public string refCUEUtranCellTDDLTE { get; set; } + public string stateInd { get; set; } + public string resPRBDown { get; set; } + public string cellIndiOffstPlmn { get; set; } + public string autoShareCover { get; set; } + public string algLTENBRRsved1 { get; set; } + public string mocName { get; set; } + public string nSACellIndivOffset { get; set; } + public string refCUEUtranCellFDDLTE { get; set; } + public string hSpeedRailCellInd { get; set; } + public string coperModSwch { get; set; } + public string isESCoveredBy { get; set; } + public string moId { get; set; } + public string supportMRO { get; set; } + public string ldn { get; set; } + public string lbIntraMeasureOffset { get; set; } + public string shareCover { get; set; } + public string numRRCCntNumCov { get; set; } + public string qofStCell { get; set; } + public string resPRBUp { get; set; } + public string isAnrCreated { get; set; } + public string refExternalEUtranCellFDDLTE { get; set; } + public string isX2HOAllowed { get; set; } + public string nSACellIndOffPlmn { get; set; } + } + public class EUtranRelationFDDLTE + { + public string userLabel { get; set; } + public string overlapCoverage { get; set; } + public DateTime lastModifiedTime { get; set; } + public string coverESCell { get; set; } + public string noSupMobilitySwch { get; set; } + public string overlapRateUpdateSwch { get; set; } + public string overlapRate { get; set; } + public string bigSRVHOIndUL { get; set; } + public string switchonTimeWindow { get; set; } + public string isBasicCoverageCell { get; set; } + public string coperType { get; set; } + public string refExternalEUtranCellTDDLTE { get; set; } + public string whiteListNbrInd { get; set; } + public string isRemoveAllowed { get; set; } + public string cellIndivOffset { get; set; } + public string bigSRVHOIndDL { get; set; } + public string isHOAllowed { get; set; } + public string s1DataFwdFlag { get; set; } + public string refCUEUtranCellTDDLTE { get; set; } + public string stateInd { get; set; } + public string resPRBDown { get; set; } + public string cellIndiOffstPlmn { get; set; } + public string autoShareCover { get; set; } + public string algLTENBRRsved1 { get; set; } + public string mocName { get; set; } + public string nSACellIndivOffset { get; set; } + public string refCUEUtranCellFDDLTE { get; set; } + public string hSpeedRailCellInd { get; set; } + public string coperModSwch { get; set; } + public string isESCoveredBy { get; set; } + public string moId { get; set; } + public string supportMRO { get; set; } + public string ldn { get; set; } + public string lbIntraMeasureOffset { get; set; } + public string shareCover { get; set; } + public string numRRCCntNumCov { get; set; } + public string qofStCell { get; set; } + public string resPRBUp { get; set; } + public string isAnrCreated { get; set; } + public string refExternalEUtranCellFDDLTE { get; set; } + public string isX2HOAllowed { get; set; } + public string nSACellIndOffPlmn { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNbrCell.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNbrCell.cs new file mode 100644 index 00000000..fd838fcd --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNbrCell.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultNbrCell + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNeighbouringRelationFDD.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNeighbouringRelationFDD.cs new file mode 100644 index 00000000..cd1c7220 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNeighbouringRelationFDD.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultNeighbouringRelationFDD + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNrNiborRelaFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNrNiborRelaFDDLTE.cs new file mode 100644 index 00000000..f6b50969 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/Relations/MoQueryResultNrNiborRelaFDDLTE.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations +{ + public class MoQueryResultNrNiborRelaFDDLTE + { + public string userLabel { get; set; } + public string swchNoRemove { get; set; } + public DateTime lastModifiedTime { get; set; } + public string cooperType { get; set; } + public string mocName { get; set; } + public string nrRATShareCover { get; set; } + public string algNRNBRRsved1 { get; set; } + public string reserve1 { get; set; } + public string refExternalNrCellLTE { get; set; } + public string swchNoHO { get; set; } + public string reserve2 { get; set; } + public string moId { get; set; } + public string refExternalNrCellFDDLTE { get; set; } + public string isSpecShareCell { get; set; } + public string voiceMobilitySwch { get; set; } + public string swchNoENDC { get; set; } + public string whiteListNbrInd { get; set; } + public string ldn { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2_A3_A5eventOffset.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2_A3_A5eventOffset.cs new file mode 100644 index 00000000..d40080ca --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2_A3_A5eventOffset.cs @@ -0,0 +1,44 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgA2eventOffset : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public override string mocName => "NROpenInterFHo"; + } + public class MoConfigArgA3eventOffset : MoConfigArgObject + { + public double eventOffset { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId => A3_A4_A5EventId.A3; + public override string mocName => "NRInterFCovHo"; + } + public class MoConfigArgA5eventOffset : MoConfigArgObject + { + public int A5Thrd1Rsrp { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId => A3_A4_A5EventId.A5; + public override string mocName => "NRInterFCovHo"; + } + + public class MoConfigArgB1eventOffset : MoConfigArgObject + { + public int A5Thrd1Rsrp { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2EventId eventId => B1_B2EventId.B1; + public override string mocName => "InterRATCovHo"; + } + + public class MoConfigArgB2eventOffset : MoConfigArgObject + { + public int A5Thrd1Rsrp { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2EventId eventId => B1_B2EventId.B2; + public override string mocName => "InterRATCovHo"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2rsrpThreshold.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2rsrpThreshold.cs new file mode 100644 index 00000000..06b633dc --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgA2rsrpThreshold.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgA2rsrpThreshold : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public override string mocName => "NROpenInterFHo"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgCarrier.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgCarrier.cs new file mode 100644 index 00000000..0d395787 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgCarrier.cs @@ -0,0 +1,1419 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgCellSelection : MoConfigArgObject + { + public override string mocName => "CellSelection"; + public string qRxLevMin { get; set; } + public string qRxLevMinOffsetCell { get; set; } + } + public class MoConfigArgEUtranReselectionFDDLTE : MoConfigArgObject + { + public override string mocName => "EUtranReselectionFDDLTE"; + public string selQrxLevMin { get; set; } + public string qrxLevMinOfst { get; set; } + } + public class MoConfigArgEUtranReselectionFDDLTE_interFreqNum : MoConfigArgObject + { + public override string mocName => "EUtranReselectionFDDLTE"; + public string interFreqNum { get; set; } + } + public class MoConfigArgEUtranReselectionFDDLTE2 : MoConfigArgObject + { + public override string mocName => "EUtranReselectionFDDLTE"; + public string r9SIntraSrchP { get; set; } + public string sIntraSearch { get; set; } + public string r9SNintraSrchP { get; set; } + + } + public class MoConfigArgCUEUtranCellTDDLTE : MoConfigArgObject + { + public override string mocName => "EUtranReselectionTDDLTE"; + public string r9SIntraSrchP { get; set; } + public string sIntraSearch { get; set; } + public string r9SNintraSrchP { get; set; } + + } + public class MoConfigArgCUEUtranCellTDDLTE_selQrxLevMin : MoConfigArgObject + { + public override string mocName => "EUtranReselectionTDDLTE"; + public string selQrxLevMin { get; set; } + public string qrxLevMinOfst { get; set; } + } + + + // + public class MoConfigArgEUtranReselectionFDDLTEPriority : MoConfigArgObject + { + public override string mocName => "EUtranReselectionFDDLTE"; + public string cellReselectionPriority { get; set; } + } + + + public class MoConfigArgCarrierUL : MoConfigArgObject + { + public override string mocName => "CarrierUL"; + public string frequency { get; set; } + } + public class MoConfigArgCUEUtranCellFDDLTE : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string earfcnUl { get; set; } + public string earfcnDl { get; set; } + } + public class MoConfigArgEUtranCellMeasFDDLTE : MoConfigArgObject + { + public override string mocName => "EUtranCellMeasFDDLTE"; + public string interFreqNum { get; set; } + } + + + + public class MoConfigArgCUEUtranCellFDDLTEBandWidth : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string bandWidthDl { get; set; } + public string bandWidthUl { get; set; } + public string maxUeRbNumDl { get; set; } + public string maxUeRbNumUl { get; set; } + public string cellUpLeftBW { get; set; } + public string cellUpRightBW { get; set; } + + public string cellDownLeftBW { get; set; } + public string cellDownRightBW { get; set; } + + } + public class MoConfigArgECellEquipFuncFDDLTE : MoConfigArgObject + { + public override string mocName => "ECellEquipFuncFDDLTE"; + public string cpTransPwr { get; set; } + } + public class MoConfigArgCUEUtranCellTDDLTEBandWidth : MoConfigArgObject + { + public override string mocName => "CUEUtranCellTDDLTE"; + public string bandWidth { get; set; } + public string maxUeRbNumDl { get; set; } + public string maxUeRbNumUl { get; set; } + } + public class MoConfigArgECellEquipFuncTDDLTE : MoConfigArgObject + { + public override string mocName => "ECellEquipFuncTDDLTE"; + public string cpTransPwr { get; set; } + } + + + public class MoConfigArgCUEUtranCellTDDLTEearfcn : MoConfigArgObject + { + public override string mocName => "CUEUtranCellTDDLTE"; + public string earfcn { get; set; } + } + public class MoConfigArgLTEFreqCovHo : MoConfigArgObject + { + public override string mocName => "LTEFreqCovHo"; + public string eventId { get; set; } + public string rsrpThreshold { get; set; } + public string b2Thrd1Rsrp { get; set; } + } + public class MoConfigIntraFReselection : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string sIntraSearchP { get; set; } + } + public class MoConfigCellResel_sNonIntraSearch : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string sNonIntraSearchSwitch { get; set; } + public string sNonIntraSearchP { get; set; } + } + public class MoConfigArgCarrierDL : MoConfigArgObject + { + public override string mocName => "CarrierDL"; + public string frequency { get; set; } + } + + public class MoConfigArgCarrierBandWidthUL : MoConfigArgObject + { + public override string mocName => "CarrierUL"; + public string nrbandwidth { get; set; } + } + public class MoConfigArgCarrierBandWidthDL : MoConfigArgObject + { + public override string mocName => "CarrierDL"; + public string nrbandwidth { get; set; } + //public string pointAfrequencyDL { get; set; } + } + public class MoConfigArgExternalNrCellFDDLTE_pci : MoConfigArgObject { + public override string mocName => "ExternalNrCellFDDLTE"; + public string pci { get; set; } + } + public class MoConfigArgExternalNrCellLTE_pci : MoConfigArgObject + { + public override string mocName => "ExternalNrCellLTE"; + public string pci { get; set; } + } + public class MoConfigArgCellDefiningSSB : MoConfigArgObject + { + public override string mocName => "CellDefiningSSB"; + public string pci { get; set; } + } + public class MoConfigArgCUEUtranCellFDDLTE_pci : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string pci { get; set; } + } + public class MoConfigArgExternalEUtranCellFDDLTE_Pci : MoConfigArgObject + { + public override string mocName => "ExternalEUtranCellFDDLTE"; + public string pci { get; set; } + } + public class MoConfigArgExternalEUtranCellFDDLTE_UD : MoConfigArgObject + { + public override string mocName => "ExternalEUtranCellFDDLTE"; + public string earfcnUl{ get; set; } + public string earfcnDl{ get; set; } + } + public class MoConfigArgExternalEutranCellTDD_UD : MoConfigArgObject + { + public override string mocName => "ExternalEutranCellTDD"; + public string frequency { get; set; } + } + public class MoConfigArgExternalEutranCellFDD_UD : MoConfigArgObject + { + public override string mocName => "ExternalEutranCellFDD"; + public string frequencyUL { get; set; } + public string frequencyDL { get; set; } + } + public class MoConfigArgExternalEutranCellTDDLTE_UD : MoConfigArgObject + { + public override string mocName => "ExternalEutranCellTDDLTE"; + public string earfcn { get; set; } + } + public class MoConfigArgExternalEutranCellFDD_Pci : MoConfigArgObject + { + public override string mocName => "ExternalEutranCellFDD"; + public string pci { get; set; } + } + public class MoConfigArgCUEUtranCellTDDLTE_pci : MoConfigArgObject + { + public override string mocName => "CUEUtranCellTDDLTE"; + public string pci { get; set; } + } + + //MoQueryResultExternalNRCellCU + public class MoConfigArgExternalNRCellCUNR : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string nRPCI { get; set; } + } + + public class MoConfigArgPhyResourceConfigforBWPUL : MoConfigArgObject + { + public override string mocName => "PhyResourceConfigforBWPUL"; + public string refBWP { get; set; } + + } + public class MoConfigArgPhyResourceConfigforBWPDL : MoConfigArgObject + { + public override string mocName => "PhyResourceConfigforBWPDL"; + public string refBWP { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListUL : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListUL"; + public string carrierBandwidth { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListDL : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListDL"; + public string carrierBandwidth { get; set; } + + } + public class MoConfigArgPUCCHConfig : MoConfigArgObject + { + public override string mocName => "PUCCHConfig"; + public string pucchPRBstart { get; set; } + } + public class MoConfigArgSRResource : MoConfigArgObject + { + public override string mocName => "SRResource"; + public string rb4SR { get; set; } + } + public class MoConfigArgCSIReportResource : MoConfigArgObject + { + public override string mocName => "CSIReportResource"; + public string rsrpReportPeriod { get; set; } + public string pmiReportPeriod { get; set; } + public string cqiReportPeriod { get; set; } + public string rbNum4CSI { get; set; } + + } + public class MoConfigArgANResource : MoConfigArgObject + { + public override string mocName => "ANResource"; + public string RbNum4AN { get; set; } + } + public class MoConfigArgSRResCfg58 : MoConfigArgObject + { + public override string mocName => "SRResCfg"; + public string tranPeriod4SR { get; set; } + public string srTrCHNumScale { get; set; } + public string rb4SR { get; set; } + } + public class MoConfigArgSRResCfg467 : MoConfigArgObject + { + public override string mocName => "SRResCfg"; + public string tranPeriod4SR { get; set; } + } + public class MoConfigArgSRResCfg3 : MoConfigArgObject + { + public override string mocName => "SRResCfg"; + public string rb4SR { get; set; } + } + public class MoConfigArgSRResCfg2 : MoConfigArgObject + { + public override string mocName => "SRResCfg"; + public string tranPeriod4SR { get; set; } + public string srTrCHNumScale { get; set; } + } + public class MoConfigArgCSIRptResCfg56 : MoConfigArgObject + { + public override string mocName => "CSIRptResCfg"; + public string rsrpReportPeriod { get; set; } + public string pmiReportPeriod { get; set; } + public string cqiReportPeriod { get; set; } + public string rbNum4CSI { get; set; } + } + public class MoConfigArgCSIRptResCfg234 : MoConfigArgObject + { + public override string mocName => "CSIRptResCfg"; + public string rsrpReportPeriod { get; set; } + public string pmiReportPeriod { get; set; } + public string cqiReportPeriod { get; set; } + } + public class MoConfigArgCSIRptResCfg8 : MoConfigArgObject + { + public override string mocName => "CSIRptResCfg"; + public string rbNum4CSI { get; set; } + + } + public class MoConfigArgANResCfg : MoConfigArgObject + { + public override string mocName => "ANResCfg"; + public string Rb4AN { get; set; } + } + public class MoConfigArgSRSConfig : MoConfigArgObject + { + public override string mocName => "SRSConfig"; + //public string srsNormalResource { get; set; } + public string narrowRbSymbNum { get; set; } + public string cSRSNarrowRB { get; set; } + public string cSRSWideRB { get; set; } + public string cSRS4APSRS { get; set; } + public string srsNormalPeriod { get; set; } + public string narrowRbInitBw { get; set; } + public string symsOfComb { get; set; } + } + public class MoConfigArgCSIIMCfg : MoConfigArgObject + { + public override string mocName => "CSIIMCfg"; + public string csiIMRbNum { get; set; } + } + public class MoConfigArgCQIMeasureCfg : MoConfigArgObject + { + public override string mocName => "CQIMeasureCfg"; + public string csiRsRbNum { get; set; } + } + public class MoConfigArgTrackingRsCfg : MoConfigArgObject + { + public override string mocName => "TrackingRsCfg"; + public string csiRsRbStart { get; set; } + + } + public class MoConfigArgTrackingRsCfg2 : MoConfigArgObject + { + public override string mocName => "TrackingRsCfg2"; + public string csiRsRbStart { get; set; } + + } + public class MoConfigArgPmiMeasureCfg : MoConfigArgObject + { + public override string mocName => "PmiMeasureCfg"; + public string csiRsRbNum { get; set; } + } + public class MoConfigArgZPMeasureConfig : MoConfigArgObject + { + public override string mocName => "ZPMeasureConfig"; + public string csiRsRbStart { get; set; } + } + public class MoConfigArgAperiodicPmiMeasureCfg : MoConfigArgObject + { + public override string mocName => "AperiodicPmiMeasureCfg"; + public string csiRsRbNum { get; set; } + } + public class MoConfigArgAperiodicZPMeasureCfg : MoConfigArgObject + { + public override string mocName => "AperiodicZPMeasureCfg"; + public string csiRsRbNum { get; set; } + } + public class MoConfigArgRSRPMeasureConfig : MoConfigArgObject + { + public override string mocName => "RSRPMeasureConfig"; + public string csiRsRbNum { get; set; } + + } + public class MoConfigArgPDCCHConfig : MoConfigArgObject + { + public override string mocName => "PDCCHConfig"; + public string frequencyDomainResources { get; set; } + //public string cceAdaptMod { get; set; } + + } + public class MoConfigArgSearchSpace : MoConfigArgObject + { + public override string mocName => "SearchSpace"; + public string nrofCandidatesAggregationLevel4 { get; set; } + public string nrofCandidatesAggregationLevel2 { get; set; } + public string nrofCandidatesAggregationLevel1 { get; set; } + + } + public class MoConfigArgControlResourceSet : MoConfigArgObject + { + public override string mocName => "ControlResourceSet"; + public string duration { get; set; } + } + public class MoConfigArgCarrierAdmission : MoConfigArgObject + { + public override string mocName => "CarrierAdmission"; + public string nr5QI1NumAcThrd { get; set; } + + } + public class MoConfigArgNRSectorCarrier : MoConfigArgObject + { + public override string mocName => "NRSectorCarrier"; + public string maximumTransmissionPower { get; set; } + } + public class MoConfigArgManagedElement : MoConfigArgObject + { + public override string mocName => "ManagedElement"; + public string vendorName { get; set; } + } + public class MoConfigArgExternalNRCellCUSupportNetworkType : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string supportNetworkType { get; set; } + } + public class MoConfigArgNRCellCU : MoConfigArgObject + { + public override string mocName => "NRCellCU"; + public string cityLabel { get; set; } + } + public class MoConfigArgNRCellCUlongitude : MoConfigArgObject + { + public override string mocName => "NRCellCU"; + public string longitude { get; set; } + public string latitude { get; set; } + public string masterOperatorId { get; set; } + + } + public class MoConfigArgGNBDUFunction : MoConfigArgObject + { + public override string mocName => "GNBDUFunction"; + public string pLMNId { get; set; } + + } + public class MoConfigArgNRCellDUtac : MoConfigArgObject + { + public override string mocName => "NRCellDU"; + public string tac { get; set; } + } + public class MoConfigArgGNBDUFunctiongNBId : MoConfigArgObject + { + public override string mocName => "GNBDUFunction"; + public string gNBId { get; set; } + + } + public class MoConfigArgNRCellCUcellLocalId : MoConfigArgObject + { + public override string mocName => "NRCellCU"; + public string cellLocalId { get; set; } + } + public class MoConfigArgNRCellCUuserLabel : MoConfigArgObject + { + public override string mocName => "NRCellCU"; + public string userLabel { get; set; } + } + public class MoConfigArgENBCUCPFunction : MoConfigArgObject + { + public override string mocName => "ENBCUCPFunction"; + public string eNBId { get; set; } + } + public class MoConfigArgENBCUCPFunctionenbName : MoConfigArgObject + { + public override string mocName => "ENBCUCPFunction"; + public string enbName { get; set; } + } + public class MoConfigArgNRPhysicalCellDUduplexMode : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string duplexMode { get; set; } + } + public class MoConfigArgExternalNRCellCU_offsetToCarrierDL : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string offsetToCarrierDL { get; set; } + } + public class MoConfigArgExternalNRCellCU_offsetToCarrierUL : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string offsetToCarrierUL { get; set; } + } + public class MoConfigArgCarrierDL_pointAfrequencyDL : MoConfigArgObject + { + public override string mocName => "CarrierDL"; + public string pointAfrequencyDL { get; set; } + } + public class MoConfigArgCarrierDL_pointAfrequencyUL : MoConfigArgObject + { + public override string mocName => "CarrierDL"; + public string pointAfrequencyUL { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListUL_offsetToCarrier : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListUL"; + public string offsetToCarrier { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListDL_offsetToCarrier : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListDL"; + public string offsetToCarrier { get; set; } + } + public class MoConfigArgTddConfig_frameType1 : MoConfigArgObject + { + public override string mocName => "TddConfig"; + public string frameType1 { get; set; } + } + public class MoConfigArgTddConfig_frameType2 : MoConfigArgObject + { + public override string mocName => "TddConfig"; + public string frameType2 { get; set; } + } + public class MoConfigArgTddConfig_nrofDownlinkSymbols1 : MoConfigArgObject + { + public override string mocName => "TddConfig"; + public string nrofDownlinkSymbols1 { get; set; } + } + public class MoConfigArgTddConfig_nrofUplinkSymbols1 : MoConfigArgObject + { + public override string mocName => "TddConfig"; + public string nrofUplinkSymbols1 { get; set; } + } + public class MoConfigArgCarrierDL_frequencyBandList : MoConfigArgObject + { + public override string mocName => "CarrierDL"; + public string frequencyBandList { get; set; } + } + public class MoConfigArgCarrierUL_frequencyBandList : MoConfigArgObject + { + public override string mocName => "CarrierUL"; + public string frequencyBandList { get; set; } + } + public class MoConfigArgExternalEUtranCellFDDLTE_freqBandInd : MoConfigArgObject + { + public override string mocName => "ExternalEUtranCellFDDLTE"; + public string freqBandInd { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListUL_subcarrierSpacing : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListUL"; + public string subcarrierSpacing { get; set; } + } + public class MoConfigArgSCSSpecificCarrierListDL_subcarrierSpacing : MoConfigArgObject + { + public override string mocName => "SCSSpecificCarrierListDL"; + public string subcarrierSpacing { get; set; } + } + public class MoConfigArgPBCH_ssbSubcarrierSpacing : MoConfigArgObject + { + public override string mocName => "PBCH"; + public string ssbSubcarrierSpacing { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_pMaxConfigSwitch : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string pMaxConfigSwitch { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_pMax : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string pMax { get; set; } + } + public class MoConfigArgCPList_powerPerRERef : MoConfigArgObject + { + public override string mocName => "CPList"; + public string powerPerRERef { get; set; } + } + public class MoConfigArgPUSCHConfig_puschtransformPrecoder : MoConfigArgObject + { + public override string mocName => "PUSCHConfig"; + public string puschtransformPrecoder { get; set; } + } + public class MoConfigArgPDSCHConfig_uePDSCHDmrsType : MoConfigArgObject + { + public override string mocName => "PDSCHConfig"; + public string uePDSCHDmrsType { get; set; } + } + public class MoConfigArgInterFReselection_ssbSubcarrierSpacing : MoConfigArgObject + { + public override string mocName => "InterFReselection"; + public string ssbSubcarrierSpacing { get; set; } + } + public class MoConfigArgInterNRCellRelation_qOffsetCell : MoConfigArgObject + { + public override string mocName => "NRCellRelation"; + public string qOffsetCell { get; set; } + } + public class MoConfigArgEUTRAReselection_refEutranFreqRelation : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string refEutranFreqRelation { get; set; } + } + public class MoConfigArgEUTRAReselection_cellReselectionPriority : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string cellReselectionPriority { get; set; } + } + public class MoConfigArgExternalNRCellCU_refNRFreq : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string refNRFreq { get; set; } + } + public class MoConfigArgExternalNRCellCU_subcarrierSpacingDL : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string subcarrierSpacingDL { get; set; } + } + public class MoConfigArgExternalNRCellCU_subcarrierSpacingUL : MoConfigArgObject + { + public override string mocName => "ExternalNRCellCU"; + public string subcarrierSpacingUL { get; set; } + } + public class MoConfigArgMeasObjEUTRA_refEutranFreqRelation : MoConfigArgObject + { + public override string mocName => "MeasObjEUTRA"; + public string refEutranFreqRelation { get; set; } + } + public class MoConfigArgMeasObjEUTRA_measBandWidth : MoConfigArgObject + { + public override string mocName => "MeasObjEUTRA"; + public string measBandWidth { get; set; } + } + public class MoConfigArgMeasObjEUTRA_offsetFreq : MoConfigArgObject + { + public override string mocName => "MeasObjEUTRA"; + public string offsetFreq { get; set; } + } + public class MoConfigArgGlobalSwitch_nLPsHoSwch : MoConfigArgObject + { + public override string mocName => "GlobalSwitch"; + public string nLPsHoSwch { get; set; } + } + public class MoConfigArgCellResel_threshServingLowP : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string threshServingLowP { get; set; } + } + public class MoConfigArgCellResel_threshServingLowQ : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string threshServingLowQ { get; set; } + } + public class MoConfigArgCellResel_qHyst : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string qHyst { get; set; } + } + public class MoConfigArgReselectionCtrl_tReselectionEUTRA : MoConfigArgObject + { + public override string mocName => "ReselectionCtrl"; + public string tReselectionEUTRA { get; set; } + } + public class MoConfigArgEUTRAReselection_cellReselectionSubPriority : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string cellReselectionSubPriority { get; set; } + } + public class MoConfigArgEUTRAReselection_threshXHigh : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string threshXHigh { get; set; } + } + public class MoConfigArgEUTRAReselection_threshXHighQ : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string threshXHighQ { get; set; } + } + public class MoConfigArgEUTRAReselection_threshXLow : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string threshXLow { get; set; } + } + public class MoConfigArgEUTRAReselection_threshXLowQ : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string threshXLowQ { get; set; } + } + public class MoConfigArgEUTRAReselection_qRxLevMin : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string qRxLevMin { get; set; } + } + public class MoConfigArgEUTRAReselection_qualMin : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string qualMin { get; set; } + } + public class MoConfigArgSISchedulingFDDLTE_sib24 : MoConfigArgObject + { + public override string mocName => "SISchedulingFDDLTE"; + public string sib24 { get; set; } + } + public class MoConfigArgNRCellResetFDDLTE_tReselNr : MoConfigArgObject + { + public override string mocName => "NRCellResetFDDLTE"; + public string tReselNr { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrCarriFreq : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrCarriFreq { get; set; } + } + public class MoConfigArgNRCelRtFLTE_sSBMeasPeriod : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string sSBMeasPeriod { get; set; } + } + public class MoConfigArgNRCelRtFLTE_sSBMeasDuration : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string sSBMeasDuration { get; set; } + } + public class MoConfigArgNRCelRtFLTE_sSBSCS : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string sSBSCS { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrReselPrio : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrReselPrio { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrThrdXHigh : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrThrdXHigh { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrThrdXLow : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrThrdXLow { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrThrdXHighQ : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrThrdXHighQ { get; set; } + } + public class MoConfigArgNRCelRtFLTE_qrxLevMin : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string qrxLevMin { get; set; } + } + public class MoConfigArgNRCelRtFLTE_qQualMin1 : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string qQualMin1 { get; set; } + } + public class MoConfigArgNRCelRtFLTE_nrPmax : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrPmax { get; set; } + } + public class MoConfigArgGlobalSwitchInformation_n26InterfaceEnable : MoConfigArgObject + { + public override string mocName => "GlobalSwitchInformation"; + public string n26InterfaceEnable { get; set; } + } + public class MoConfigArgInterRatHoA1A2_hysteresisA2 : MoConfigArgObject + { + public override string mocName => "InterRatHoA1A2"; + public string hysteresisA2 { get; set; } + } + public class MoConfigArgInterRatHoA1A2_timeToTriggerA2 : MoConfigArgObject + { + public override string mocName => "InterRatHoA1A2"; + public string timeToTriggerA2 { get; set; } + } + public class MoConfigArgNRBlindRd_rsrpThreshold : MoConfigArgObject + { + public override string mocName => "NRBlindRd"; + public string rsrpThreshold { get; set; } + } + public class MoConfigArgtimeToTrigger_timeToTrigger : MoConfigArgObject + { + public override string mocName => "LTEFreqCovHo"; + public string timeToTrigger { get; set; } + } + public class MoConfigArgNRCellRelation_cellIndividualOffset : MoConfigArgObject + { + public override string mocName => "NRCellRelation"; + public string cellIndividualOffset { get; set; } + } + public class MoConfigArgCUEUtranCellFDDLTE_methodLTEtoNR : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string methodLTEtoNR { get; set; } + } + public class MoConfigArgCUEUtranCellFDDLTE_rd4ForCoverage : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string rd4ForCoverage { get; set; } + } + public class MoConfigArgUeEUtranMeasurementLTE_timeToTrigger : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public string timeToTrigger { get; set; } + } + public class MoConfigArgNrRatMeasCfgLTE_trigTime : MoConfigArgObject + { + public override string mocName => "NrRatMeasCfgLTE"; + public string trigTime { get; set; } + } + public class MoConfigArgEPSFallbackCtrl_epsfbSwitch : MoConfigArgObject + { + public override string mocName => "EPSFallbackCtrl"; + public string epsfbSwitch { get; set; } + } + public class MoConfigArgEPSFallbackCtrl_epsfbLteMethod : MoConfigArgObject + { + public override string mocName => "EPSFallbackCtrl"; + public string epsfbLteMethod { get; set; } + } + public class MoConfigArgEPSFallbackCtrl_epsfbWaitBetterCellTimer : MoConfigArgObject + { + public override string mocName => "EPSFallbackCtrl"; + public string epsfbWaitBetterCellTimer { get; set; } + } + public class MoConfigArgEPSFallbackRptCfg_rsrpThreshold : MoConfigArgObject + { + public override string mocName => "EPSFallbackRptCfg"; + public string rsrpThreshold { get; set; } + public string hysteresis { get; set; } + + } + public class MoConfigArgEPSFallbackRptCfg_timeToTrigger : MoConfigArgObject + { + public override string mocName => "EPSFallbackRptCfg"; + public string timeToTrigger { get; set; } + } + public class MoConfigArgEPSFallbackLTEFreqMeasConfig_epsfbPriority : MoConfigArgObject + { + public override string mocName => "EPSFallbackLTEFreqMeasConfig"; + public string epsfbPriority { get; set; } + } + public class MoConfigArgEUtranCellMeasFDDLTE_epsFBEndFastReturnSwch : MoConfigArgObject + { + public override string mocName => "EUtranCellMeasFDDLTE"; + public string epsFBEndFastReturnSwch { get; set; } + } + public class MoConfigArgCQIMeasureCfg_powerControlOffsetSS : MoConfigArgObject + { + public override string mocName => "CQIMeasureCfg"; + public string powerControlOffsetSS { get; set; } + } + public class MoConfigArgRSRPMeasureConfig_powerControlOffsetSS : MoConfigArgObject + { + public override string mocName => "RSRPMeasureConfig"; + public string powerControlOffsetSS { get; set; } + } + public class MoConfigArgRachConfigGeneric_preambleReceivedTargetPower : MoConfigArgObject + { + public override string mocName => "RachConfigGeneric"; + public string preambleReceivedTargetPower { get; set; } + } + public class MoConfigArgRachConfigGeneric_powerRampingStep : MoConfigArgObject + { + public override string mocName => "RachConfigGeneric"; + public string powerRampingStep { get; set; } + } + public class MoConfigArgRachConfigGeneric_preambleTransMax : MoConfigArgObject + { + public override string mocName => "RachConfigGeneric"; + public string preambleTransMax { get; set; } + } + public class MoConfigArgPUSCHConfigCommon_msg3DeltaPreamble : MoConfigArgObject + { + public override string mocName => "PUSCHConfigCommon"; + public string msg3DeltaPreamble { get; set; } + } + public class MoConfigArgPUSCHConfigCommon_p0NominalWithGrant : MoConfigArgObject + { + public override string mocName => "PUSCHConfigCommon"; + public string p0NominalWithGrant { get; set; } + } + public class MoConfigArgPUSCHP0AlphaSets_p0 : MoConfigArgObject + { + public override string mocName => "PUSCHP0AlphaSets"; + public string p0 { get; set; } + } + public class MoConfigArgPUSCHP0AlphaSets_alpha : MoConfigArgObject + { + public override string mocName => "PUSCHP0AlphaSets"; + public string alpha { get; set; } + } + public class SRSConfig_p0 : MoConfigArgObject + { + public override string mocName => "SRSConfig"; + public string p0 { get; set; } + } + public class SRSConfig_alpha : MoConfigArgObject + { + public override string mocName => "SRSConfig"; + public string alpha { get; set; } + } + public class MoConfigArgPUCCHConfigCommon_p0Nomina : MoConfigArgObject + { + public override string mocName => "PUCCHConfigCommon"; + public string p0Nomina { get; set; } + } + public class MoConfigArgP0PUCCH_p0PUCCHValue : MoConfigArgObject + { + public override string mocName => "P0PUCCH"; + public string p0PUCCHValue { get; set; } + } + public class MoConfigArgPowerControlUL_switchForCLPCofPUSCH : MoConfigArgObject + { + public override string mocName => "PowerControlUL"; + public string switchForCLPCofPUSCH { get; set; } + } + public class MoConfigArgPowerControlULFDDLTE_p0NominalPUSCH : MoConfigArgObject + { + public override string mocName => "PowerControlULFDDLTE"; + public string p0NominalPUSCH { get; set; } + } + public class MoConfigArgPowerControlULFDDLTE_alpha : MoConfigArgObject + { + public override string mocName => "PowerControlULFDDLTE"; + public string alpha { get; set; } + } + public class MoConfigArgPowerControlULFDDLTE_poNominalPUCCH : MoConfigArgObject + { + public override string mocName => "PowerControlULFDDLTE"; + public string poNominalPUCCH { get; set; } + } + public class MoConfigArgCUEUtranCellFDDLTE_phyChCPSel : MoConfigArgObject + { + public override string mocName => "CUEUtranCellFDDLTE"; + public string phyChCPSel { get; set; } + } + public class MoConfigArgNRIntraFCovHo_timeToTrigger : MoConfigArgObject + { + public override string mocName => "NRIntraFCovHo"; + public string timeToTrigger { get; set; } + } + public class MoConfigArgInterFHoA1A2_timeToTriggerA1 : MoConfigArgObject + { + public override string mocName => "InterFHoA1A2"; + public string timeToTriggerA1 { get; set; } + } + public class MoConfigArgInterFHoA1A2_timeToTriggerA2 : MoConfigArgObject + { + public override string mocName => "InterFHoA1A2"; + public string timeToTriggerA2 { get; set; } + } + public class MoConfigArgNRIntraFCovHo_triggerQuantity : MoConfigArgObject + { + public override string mocName => "NRIntraFCovHo"; + public string triggerQuantity { get; set; } + } + public class MoConfigArgNRIntraFCovHo_rptInterval : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string rptInterval { get; set; } + } + public class MoConfigArgNRIntraFCovHo_rptAmount : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string rptAmount { get; set; } + } + public class MoConfigArgNRIntraFCovHo_maxRptCellNum : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string maxRptCellNum { get; set; } + } + public class MoConfigArgNRIntraFCovHo_rptQuantityRsIndex : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string rptQuantityRsIndex { get; set; } + } + public class MoConfigArgNRIntraFCovHo_maxNrofRSIndexToReport : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string maxNrofRSIndexToReport { get; set; } + } + + public class MoConfigArgNRInterFCovHo_includeBeamMeasurements : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + public string includeBeamMeasurements { get; set; } + } + public class MoConfigArgQuantityConfigNR_ssbRsrpMeasFilterCoeff : MoConfigArgObject + { + public override string mocName => "QuantityConfigNR"; + public string ssbRsrpMeasFilterCoeff { get; set; } + } + public class MoConfigArgCellResel_rangeToBestCell : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string rangeToBestCell { get; set; } + } + public class MoConfigArgCellResel_ssbConsolidRsrpThr : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string ssbConsolidRsrpThr { get; set; } + } + public class MoConfigArgCellResel_nrofSSBlocksToAverage : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string nrofSSBlocksToAverage { get; set; } + } + public class MoConfigArgCellResel_cellReselectionPriority : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string cellReselectionPriority { get; set; } + } + public class MoConfigArgCellResel_cellReselectionSubPriority : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string cellReselectionSubPriority { get; set; } + } + public class MoConfigArgCellResel_sNonIntraSearchP : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string sNonIntraSearchP { get; set; } + } + public class MoConfigArgCellResel_sNonIntraSearchQ : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string sNonIntraSearchQ { get; set; } + } + + public class MoConfigArgIntraFReselection_qRxLevMin : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string qRxLevMin { get; set; } + } + public class MoConfigArgIntraFReselection_qQualMin : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string qQualMin { get; set; } + } + public class MoConfigArgIntraFReselection_sIntraSearchP : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string sIntraSearchP { get; set; } + } + public class MoConfigArgIntraFReselection_sIntraSearchQ : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string sIntraSearchQ { get; set; } + } + public class MoConfigArgIntraFReselection_tReselectionNR : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string tReselectionNR { get; set; } + } + public class MoConfigArgCellResel_IntraFReselection : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string IntraFReselection { get; set; } + } + public class MoConfigArgIntraFReselection_duration : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string duration { get; set; } + } + public class MoConfigArgIntraFReselection_deriveSSBIndexFromCell : MoConfigArgObject + { + public override string mocName => "IntraFReselection"; + public string deriveSSBIndexFromCell { get; set; } + } + public class MoConfigArgInterFReselection_threshXHighP : MoConfigArgObject + { + public override string mocName => "InterFReselection"; + public string threshXHighP { get; set; } + } + public class MoConfigArgInterFReselection_threshXLowP : MoConfigArgObject + { + public override string mocName => "InterFReselection"; + public string threshXLowP { get; set; } + } + public class MoConfigArgDRXCfg_drxSwitch : MoConfigArgObject + { + public override string mocName => "DRXCfg"; + public string drxSwitch { get; set; } + } + public class MoConfigArgSADRX_onDuratTimer : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string onDuratTimer { get; set; } + } + public class MoConfigArgSADRX_drxInactivityTimer : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string drxInactivityTimer { get; set; } + } + public class MoConfigArgSADRXCycle_drxLongCycle : MoConfigArgObject + { + public override string mocName => "SADRXCycle"; + public string drxLongCycle { get; set; } + } + //shortDRXCycInd + public class MoConfigArgSADRX_drxRetransTimerUL : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string drxRetransTimerUL { get; set; } + } + public class MoConfigArgSADRX_drxRetransTimerDL : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string drxRetransTimerDL { get; set; } + } + public class MoConfigArgSADRX_drxHarqRttTimerUL : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string drxHarqRttTimerUL { get; set; } + } + public class MoConfigArgSADRX_drxHarqRttTimerDL : MoConfigArgObject + { + public override string mocName => "SADRX"; + public string drxHarqRttTimerDL { get; set; } + } + public class MoConfigArgSADRXCycle_shortDRXCycInd : MoConfigArgObject + { + public override string mocName => "SADRXCycle"; + public string shortDRXCycInd { get; set; } + } + public class MoConfigArgSADRXCycle_drxShortCycleTimer : MoConfigArgObject + { + public override string mocName => "SADRXCycle"; + public string drxShortCycleTimer { get; set; } + } + public class MoConfigArgUeTimer_t300 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t300 { get; set; } + } + public class MoConfigArgUeTimer_t301 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t301 { get; set; } + } + public class MoConfigArgUeTimer_t310 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t310 { get; set; } + } + public class MoConfigArgUeTimer_n310 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string n310 { get; set; } + } + + + public class MoConfigArgUeTimer_t311 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t311 { get; set; } + } + public class MoConfigArgUeTimer_n311 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string n311 { get; set; } + } + public class MoConfigArgUeTimer_t319 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t319 { get; set; } + } + public class MoConfigArgUeTimer_t304 : MoConfigArgObject + { + public override string mocName => "UeTimer"; + public string t304 { get; set; } + } + public class MoConfigArgRSRPMeasureConfig_reportQuantity : MoConfigArgObject + { + public override string mocName => "RSRPMeasureConfig"; + public string reportQuantity { get; set; } + } + public class MoConfigArgTddConfig_dlULTransmissionPeriodicity1 : MoConfigArgObject + { + public override string mocName => "TddConfig"; + public string dlULTransmissionPeriodicity1 { get; set; } + } + public class MoConfigArgClockSyncConfig_frameOffset : MoConfigArgObject + { + public override string mocName => "ClockSyncConfig"; + public string frameOffset { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_sib1Periodicity : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string sib1Periodicity { get; set; } + } + public class MoConfigArgPCCHConfig_defaultPagingCycle : MoConfigArgObject + { + public override string mocName => "PCCHConfig"; + public string defaultPagingCycle { get; set; } + } + public class MoConfigArgPagingLTE_defaultPagingCycle : MoConfigArgObject + { + public override string mocName => "PagingLTE"; + public string defaultPagingCycle { get; set; } + } + public class MoConfigArgPDCP_profile : MoConfigArgObject + { + public override string mocName => "PDCP"; + public bool profile0x0001 { get; set; } + public bool profile0x0002 { get; set; } + public bool profile0x0004 { get; set; } + } + public class MoConfigArgPDCPLTE_profile : MoConfigArgObject + { + public override string mocName => "PDCPLTE"; + public string profile1 { get; set; } + public string profile2 { get; set; } + public string profile4 { get; set; } + public string profile6 { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_ulCceRatio4Coreset0 : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string ulCceRatio4Coreset0 { get; set; } + } + public class MoConfigArgPHR_prdPhrTimer : MoConfigArgObject + { + public override string mocName => "PHR"; + public string prdPhrTimer { get; set; } + } + public class MoConfigArgPHR_phtPhrTimer : MoConfigArgObject + { + public override string mocName => "PHR"; + public string phtPhrTimer { get; set; } + } + public class MoConfigArgSRSConfig_srsPeriod : MoConfigArgObject + { + public override string mocName => "SRSConfig"; + public string srsPeriod { get; set; } + } + public class MoConfigArgPhyChannelFDDLTE_srsEnable : MoConfigArgObject + { + public override string mocName => "PhyChannelFDDLTE"; + public string srsEnable { get; set; } + } + public class MoConfigArgPhyChannelTDDLTE_srsEnable : MoConfigArgObject + { + public override string mocName => "PhyChannelTDDLTE"; + public string srsEnable { get; set; } + } + public class MoConfigArgPowerControlDLFDDLTE_paForDTCH : MoConfigArgObject + { + public override string mocName => "PowerControlDLFDDLTE"; + public string paForDTCH { get; set; } + } + public class MoConfigArgPowerControlDLTDDLTE_paForDTCH : MoConfigArgObject + { + public override string mocName => "PowerControlDLTDDLTE"; + public string paForDTCH { get; set; } + } + public class MoConfigArgPagingLTE_modificationPeriodCoeff : MoConfigArgObject + { + public override string mocName => "PagingLTE"; + public string modificationPeriodCoeff { get; set; } + } + public class MoConfigArgPrachFDDLTE_preambleTransMax : MoConfigArgObject + { + public override string mocName => "PrachFDDLTE"; + public string preambleTransMax { get; set; } + } + public class MoConfigArgPrachTDDLTE_preambleTransMax : MoConfigArgObject + { + public override string mocName => "PrachTDDLTE"; + public string preambleTransMax { get; set; } + } + public class MoConfigArgPDCP_snSizeUl : MoConfigArgObject + { + public override string mocName => "PDCP"; + public string snSizeUl { get; set; } + } + public class MoConfigArgPDCP_snSizeDl : MoConfigArgObject + { + public override string mocName => "PDCP"; + public string snSizeDl { get; set; } + } + public class MoConfigArgQoSServiceClassLTE_sequenNumLenth : MoConfigArgObject + { + public override string mocName => "QoSServiceClassLTE"; + public string sequenNumLenth { get; set; } + } + public class MoConfigArgQoSServiceClassLTE_spsIntervalUL : MoConfigArgObject + { + public override string mocName => "QoSServiceClassLTE"; + public string spsIntervalUL { get; set; } + } + public class MoConfigArgQoSServiceClassLTE_spsIntervalDL : MoConfigArgObject + { + public override string mocName => "QoSServiceClassLTE"; + public string spsIntervalDL { get; set; } + } + public class MoConfigArgPhyChannelFDDLTE_swchTTIBundling : MoConfigArgObject + { + public override string mocName => "PhyChannelFDDLTE"; + public string swchTTIBundling { get; set; } + } + public class MoConfigArgPhyChannelTDDLTE_swchTTIBundling : MoConfigArgObject + { + public override string mocName => "PhyChannelTDDLTE"; + public string swchTTIBundling { get; set; } + } + public class MoConfigArgVoLTEConfigCellFDDLTE_ttiBHarqNum : MoConfigArgObject + { + public override string mocName => "VoLTEConfigCellFDDLTE"; + public string ttiBHarqNum { get; set; } + } + public class MoConfigArgVoLTEConfigCellTDDLTE_ttiBHarqNum : MoConfigArgObject + { + public override string mocName => "VoLTEConfigCellTDDLTE"; + public string ttiBHarqNum { get; set; } + } + public class MoConfigArgPDCP_rlcMode : MoConfigArgObject + { + public override string mocName => "PDCP"; + public string rlcMode { get; set; } + } + public class MoConfigArgRLC_snFieldLengthUM : MoConfigArgObject + { + public override string mocName => "RLC"; + public string snFieldLengthUM { get; set; } + } + public class MoConfigArgRLC_snFieldLengthAM : MoConfigArgObject + { + public override string mocName => "RLC"; + public string snFieldLengthAM { get; set; } + } + public class MoConfigArgQoSServiceClassLTE_rlcMode : MoConfigArgObject + { + public override string mocName => "QoSServiceClassLTE"; + public string rlcMode { get; set; } + } + public class MoConfigArgQoSServiceClassLTE_sequenceNumType : MoConfigArgObject + { + public override string mocName => "QoSServiceClassLTE"; + public string sequenceNumType { get; set; } + } + public class MoConfigArgSADRXCycle_drxValid : MoConfigArgObject + { + public override string mocName => "SADRXCycle"; + public string drxValid { get; set; } + } + public class MoConfigArgServiceDrxFDDLTE_longDrxCyc : MoConfigArgObject + { + public override string mocName => "ServiceDrxFDDLTE"; + public string longDrxCyc { get; set; } + } + public class MoConfigArgServiceDrxFDDLTE_perQCIDrxSwch : MoConfigArgObject + { + public override string mocName => "ServiceDrxFDDLTE"; + public string perQCIDrxSwch { get; set; } + } + public class MoConfigArgMACCellGroupConfig_prdBsrTimer : MoConfigArgObject + { + public override string mocName => "MACCellGroupConfig"; + public string prdBsrTimer { get; set; } + } + public class MoConfigArgServiceMACFDDLTE_prdBsrTimer : MoConfigArgObject + { + public override string mocName => "ServiceMACFDDLTE"; + public string prdBsrTimer { get; set; } + } + public class MoConfigArgServiceMACTDDLTE_prdBsrTimer : MoConfigArgObject + { + public override string mocName => "ServiceMACTDDLTE"; + public string prdBsrTimer { get; set; } + } + public class MoConfigArgServiceMACFDDLTE_retxBsrTimer : MoConfigArgObject + { + public override string mocName => "ServiceMACFDDLTE"; + public string retxBsrTimer { get; set; } + } + public class MoConfigArgServiceMACTDDLTE_retxBsrTimer : MoConfigArgObject + { + public override string mocName => "ServiceMACTDDLTE"; + public string retxBsrTimer { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_FNRparamSuite : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string FNRparamSuite { get; set; } + } + public class MoConfigArgSSBlock_smtc1PrdAndOffset : MoConfigArgObject + { + public override string mocName => "SSBlock"; + public string smtc1PrdAndOffset { get; set; } + } + public class MoConfigArgSSBlock_duration : MoConfigArgObject + { + public override string mocName => "SSBlock"; + public string duration { get; set; } + } + public class MoConfigArgNRPhysicalCellDU_nTimingAdvanceOffset : MoConfigArgObject + { + public override string mocName => "NRPhysicalCellDU"; + public string nTimingAdvanceOffset { get; set; } + } + public class MoConfigArgInactiveCfgForServ_ueInactiveTimer : MoConfigArgObject + { + public override string mocName => "InactiveCfgForServ"; + public string ueInactiveTimer { get; set; } + } + + public class EndcPlmnFDDLTE + { + public string enDcSwch1 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string mcc { get; set; } + public string upperLayerIndSwch1 { get; set; } + public string moId { get; set; } + } + + public class EndcPlmnTDDLTE + { + public string enDcSwch1 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mnc { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string mcc { get; set; } + public string upperLayerIndSwch1 { get; set; } + public string moId { get; set; } + } + + + + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreq.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreq.cs new file mode 100644 index 00000000..84d9a1ef --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreq.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgEutranFreq : MoConfigArgObject + { + public double frequency { get; set; } + public override string mocName => "EutranFreq"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreqRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreqRelation.cs new file mode 100644 index 00000000..58b20d13 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgEutranFreqRelation.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgEutranFreqRelation : MoConfigArgObject + { + public string moId { get; set; } + public string refEutranFreq { get; set; } + public override string mocName => "EutranFreqRelation"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgFrequencyBandList.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgFrequencyBandList.cs new file mode 100644 index 00000000..d6cc9c0b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgFrequencyBandList.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgFrequencyBandList : MoConfigArgObject + { + public string moId { get; set; } + public int freqBandIndicator { get; set; } + public override string mocName => "FrequencyBandList"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgGlobalSwitchInformation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgGlobalSwitchInformation.cs new file mode 100644 index 00000000..20d91016 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgGlobalSwitchInformation.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgGlobalSwitchInformation : MoConfigArgObject + { + public bool n26InterfaceEnable { get; set; } + public override string mocName => "GlobalSwitchInformation"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgHysteresis.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgHysteresis.cs new file mode 100644 index 00000000..11afbc12 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgHysteresis.cs @@ -0,0 +1,14 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgHysteresis : MoConfigArgObject + { + public int hysteresis { get; set; } + public override string mocName => "NRIntraFCovHo"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA1_A2_A3_A4.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA1_A2_A3_A4.cs new file mode 100644 index 00000000..fe576ef4 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA1_A2_A3_A4.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgLteA1_A2_A3_A4 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public int thresholdOfRSRP { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA5.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA5.cs new file mode 100644 index 00000000..15c53dc1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteA5.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgLteA5 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public int thresholdOfRSRP { get; set; } + public int a5Threshold2OfRSRP { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB1.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB1.cs new file mode 100644 index 00000000..d53e0e88 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB1.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgLteToNrB1 : MoConfigArgObject + { + public override string mocName => "NrRatMeasCfgLTE"; + public int rsrpSrvTrd { get; set; } + public int rSRPNRTrd { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB2.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB2.cs new file mode 100644 index 00000000..f32f5ad9 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgLteToNrB2.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgLteToNrB2 : MoConfigArgObject + { + public override string mocName => "NrRatMeasCfgLTE"; + public int rsrpSrvTrd { get; set; } + public int rSRPNRTrd { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasConfig.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasConfig.cs new file mode 100644 index 00000000..b7d51687 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasConfig.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgMeasConfig : MoConfigArgObject + { + public override string mocName => "MeasConfig"; + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasObjEUTRA.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasObjEUTRA.cs new file mode 100644 index 00000000..b96395f2 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMeasObjEUTRA.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgMeasObjEUTRA : MoConfigArgObject + { + public string moId { get; set; } + public int measBandWidth { get; set; } + public string refEutranFreqRelation { get; set; } + public override string mocName => "MeasObjEUTRA"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMobilityCtrl.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMobilityCtrl.cs new file mode 100644 index 00000000..1d9949d6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgMobilityCtrl.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgMobilityCtrl : MoConfigArgObject + { + public bool mobiManageSwitch { get; set; } + public bool hoBaseServiceSwch { get; set; } + public bool voNrSwitch { get; set; } + + public override string mocName => "MobilityCtrl"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRA1.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRA1.cs new file mode 100644 index 00000000..812f3e00 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRA1.cs @@ -0,0 +1,168 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNRA1 : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public override string mocName => "NRCloseInterFRATHo"; + } + + public class MoConfigArgNRA2 : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public override string mocName => "NROpenInterFRATHo"; + } + public class MoConfigArgInterFHoA1A2 : MoConfigArgObject + { + public override string mocName => "InterFHoA1A2"; + public int hysteresisA2 { get; set; } + public int rsrpThresholdA2 { get; set; } + } + public class MoConfigArgInterRatHoA1A2_A1 : MoConfigArgObject + { + public override string mocName => "InterRatHoA1A2"; + public string rsrpThresholdA1 { get; set; } + } + public class MoConfigArgInterRatHoA1A2_A2 : MoConfigArgObject + { + public override string mocName => "InterRatHoA1A2"; + public string rsrpThresholdA2 { get; set; } + } + public class MoConfigArgCellResel : MoConfigArgObject + { + public override string mocName => "CellResel"; + public string cellReselectionPriority { get; set; } + } + public class MoConfigArgInterFReselection : MoConfigArgObject + { + public override string mocName => "InterFReselection"; + public string cellReselectionPriority { get; set; } + } + public class MoConfigArgEUtranRslParaFDD : MoConfigArgObject + { + public override string mocName => "EUtranRslParaFDD"; + public string interReselPrio { get; set; } + + } + public class MoConfigArgNRCelRtFLTE : MoConfigArgObject + { + public override string mocName => "NRCelRtFLTE"; + public string nrReselPrio{ get; set; } + + } + public class MoConfigArgEUtranRslParaTDD : MoConfigArgObject + { + public override string mocName => "EUtranRslParaTDD"; + public string interReselPrio { get; set; } + + } + public class MoConfigArgNRCelRtTLTE : MoConfigArgObject + { + public override string mocName => "NRCelRtTLTE"; + public string nrReselPrio { get; set; } + + } + // + public class MoConfigArgEUTRAReselection : MoConfigArgObject + { + public override string mocName => "EUTRAReselection"; + public string cellReselectionPriority { get; set; } + } + public class MoConfigArgInactiveParameter : MoConfigArgObject + { + public override string mocName => "InactiveParameter"; + public string inactiveTimer { get; set; } + } + public class MoConfigArgUeTimerLTE : MoConfigArgObject + { + public override string mocName => "UeTimerLTE"; + public string tUserInac { get; set; } + } + public class MoConfigArgInterFHoA1A2_A1 : MoConfigArgObject + { + public override string mocName => "InterFHoA1A2"; + public int hysteresisA1 { get; set; } + public int rsrpThresholdA1 { get; set; } + } + public class MoConfigArgNRA3_A4 : MoConfigArgObject + { + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4EventId eventId { get; set; } + public int rsrpThreshold { get; set; } + public override string mocName => "NRInterFCovHo"; + public int hysteresis { get; set; } + + } + public class MoConfigArgNRA3 : MoConfigArgObject + { + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4EventId eventId { get; set; } + public override string mocName => "NRInterFCovHo"; + public double eventOffset { get; set; } + public int hysteresis { get; set; } + + } + public class MoConfigArgNRIntraFCovHo : MoConfigArgObject + { + public override string mocName => "NRIntraFCovHo"; + public string eventOffset { get; set; } + public string hysteresis { get; set; } + } + public class MoConfigArgFDDLTEA3 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public string hysteresis { get; set; } + public string a3Offset { get; set; } + } + public class MoConfigArgFDDLTEA1 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public string thresholdOfRSRP { get; set; } + } + public class MoConfigArgFDDLTEA2 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public string thresholdOfRSRP { get; set; } + } + public class MoConfigArgFDDLTEA5 : MoConfigArgObject + { + public override string mocName => "UeEUtranMeasurementLTE"; + public string thresholdOfRSRP { get; set; } + public string a5Threshold2OfRSRP { get; set; } + + } + public class MoConfigArgCellMeasGroupLTE : MoConfigArgObject + { + public override string mocName => "CellMeasGroupLTE"; + public string interFHOMeasCfg { get; set; } + } + + public class MoConfigArgNRA5 : MoConfigArgObject + { + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId => A3_A4_A5EventId.A5; + public int rsrpThreshold { get; set; } + public int A5Thrd1Rsrp { get; set; } + public int hysteresis { get; set; } + + public override string mocName => "NRInterFCovHo"; + } + + public class MoConfigArgNRB1 : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public override string mocName => "InterRATCovHo"; + } + + public class MoConfigArgNRB2 : MoConfigArgObject + { + public int rsrpThreshold { get; set; } + public int b2Thrd1Rsrp { get; set; } + public override string mocName => "InterRATCovHo"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreq.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreq.cs new file mode 100644 index 00000000..5034034a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreq.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNRFreq : MoConfigArgObject + { + public string moId { get; set; } + public string ssbFrequency { get; set; } + public override string mocName => "NRFreq"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreqParaFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreqParaFDDLTE.cs new file mode 100644 index 00000000..d288d21a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRFreqParaFDDLTE.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNRFreqParaFDDLTE : MoConfigArgObject + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFCovHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFCovHo.cs new file mode 100644 index 00000000..d492ac1c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFCovHo.cs @@ -0,0 +1,34 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Converters; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNRInterFCovHo : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NRIntraFCovHo"; + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId { get; set; } + [JsonConverter(typeof(NumberEnumConverter))] + public triggerQuantity triggerQuantity { get; set; } + [JsonConverter(typeof(NumberEnumConverter))] + public timeToTrigger timeToTrigger { get; set; } + [JsonConverter(typeof(NumberEnumConverter))] + public rptInterval rptInterval { get; set; } + [JsonConverter(typeof(NumberEnumConverter))] + public rptAmount rptAmount { get; set; } + public int maxRptCellNum { get; set; } + public int hysteresis { get; set; } + public double eventOffset { get; set; } + public int rsrpThreshold { get; set; } + public double rsrqThreshold { get; set; } + public double sinrThreshold { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public rptQuantity rptQuantityRsIndex { get; set; } + public int maxNrofRSIndexToReport { get; set; } + public bool includeBeamMeasurements { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public rptQuantity rptQuantityCell { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFMeasConfig.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFMeasConfig.cs new file mode 100644 index 00000000..5a50f2fb --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNRInterFMeasConfig.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNRInterFMeasConfig : MoConfigArgObject + { + public string moId { get; set; } + public override string mocName => "NRInterFMeasConfig"; + public string refNRInterFMeasObject { get; set; } + public string refNRCaAddSCellA4 { get; set; } + public string refNRCaRmvSCellA2 { get; set; } + public string refNRPSCellChangeInterF { get; set; } + public string refNRInterFCovHo { get; set; } + public string refNRBaseServiceInterFHo { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNROpenInterFHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNROpenInterFHo.cs new file mode 100644 index 00000000..615b08a1 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNROpenInterFHo.cs @@ -0,0 +1,27 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Converters; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNROpenInterFHo : MoConfigArgObject + { + public bool includeBeamMeasurements { get; set; } + [JsonConverter(typeof(NumberEnumConverter))] + public triggerQuantity triggerQuantity { get; set; } + public override string mocName => "NROpenInterFHo"; + [JsonConverter(typeof(NumberEnumConverter))] + public timeToTrigger timeToTrigger { get; set; } + public string moId { get; set; } + public int hysteresis { get; set; } + public double sinrThreshold { get; set; } + public int maxNrofRSIndexToReport { get; set; } + public int rsrqThreshold { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public rptQuantity rptQuantityRsIndex { get; set; } + public int rsrpThreshold { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNrRatMeasCfgLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNrRatMeasCfgLTE.cs new file mode 100644 index 00000000..b93dbd4e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgNrRatMeasCfgLTE.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgNrRatMeasCfgLTE : MoConfigArgObject + { + public int evtId { get; set; } + public string rsrpSrvTrd { get; set; } + public string rSRPNRTrd { get; set; } + public override string mocName => "NrRatMeasCfgLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgReportConfigNR.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgReportConfigNR.cs new file mode 100644 index 00000000..9cdf8200 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgReportConfigNR.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgReportConfigNR : MoConfigArgObject + { + public override string mocName => "ReportConfigNR"; + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchA3_A4_A5.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchA3_A4_A5.cs new file mode 100644 index 00000000..5d4a787c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchA3_A4_A5.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgSwitchA3_A4_A5 : MoConfigArgObject + { + public override string mocName => "NRInterFCovHo"; + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId = A3_A4_A5EventId.A3; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchLTEB1_B2.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchLTEB1_B2.cs new file mode 100644 index 00000000..d649216d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchLTEB1_B2.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgSwitchLTEB1_B2 : MoConfigArgObject + { + public override string mocName => "NrRatMeasCfgLTE"; + //[JsonConverter(typeof(StringEnumConverter))] + public int evtId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchNRB1_B2.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchNRB1_B2.cs new file mode 100644 index 00000000..a7ce97fb --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgSwitchNRB1_B2.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgSwitchNRB1_B2 : MoConfigArgObject + { + public override string mocName => "InterRATCovHo"; + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2EventId eventId = B1_B2EventId.B1; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgUeEUtranMeasurementLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgUeEUtranMeasurementLTE.cs new file mode 100644 index 00000000..afcd429a --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgUeEUtranMeasurementLTE.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgUeEUtranMeasurementLTE : MoConfigArgObject + { + public int measCfgFunc { get; set; } + public int reportCriteria { get; set; } + public int eventId { get; set; } + public int thresholdOfRSRP { get; set; } + public override string mocName => "UeEUtranMeasurementLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgblindA2Strategy.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgblindA2Strategy.cs new file mode 100644 index 00000000..1bf22951 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgblindA2Strategy.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgblindA2Strategy : MoConfigArgObject + { + public int blindA2Strategy { get; set; } + public override string mocName => "MobilityCtrl"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgmethodLTEtoNR.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgmethodLTEtoNR.cs new file mode 100644 index 00000000..aba3d4b8 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgmethodLTEtoNR.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgmethodLTEtoNR : MoConfigArgObject + { + public int methodLTEtoNR { get; set; } + public override string mocName => "EUtranCellMeasFDDLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgnLPsHoSwch.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgnLPsHoSwch.cs new file mode 100644 index 00000000..3d6cd005 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgnLPsHoSwch.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgnLPsHoSwch : MoConfigArgObject + { + public int nLPsHoSwch { get; set; } + public override string mocName => "GlobalSwitch"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgratPriority8.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgratPriority8.cs new file mode 100644 index 00000000..064fe413 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgratPriority8.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgratPriority8 : MoConfigArgObject + { + public int ratPriority8 { get; set; } + public override string mocName => "MsRATPriFDDLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsADirectMigSwch.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsADirectMigSwch.cs new file mode 100644 index 00000000..ac4cf91c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsADirectMigSwch.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgsADirectMigSwch : MoConfigArgObject + { + public int sADirectMigSwch { get; set; } + public override string mocName => "EUtranCellMeasFDDLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsSBToMeasBitmap.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsSBToMeasBitmap.cs new file mode 100644 index 00000000..e4755973 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsSBToMeasBitmap.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgsSBToMeasBitmap : MoConfigArgObject + { + public int nRFreqBandInd { get; set; } + public double nRearfcn { get; set; } + public long sSBToMeasBitmap { get; set; } + public override string mocName => "NRFreqParaFDDLTE"; + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsrd4ForCoverage.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsrd4ForCoverage.cs new file mode 100644 index 00000000..7e41bfbc --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigArgsrd4ForCoverage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigArgsrd4ForCoverage : MoConfigArgObject + { + public int rd4ForCoverage { get; set; } + public override string mocName => "CUEUtranCellFDDLTE"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigResultNRFreqRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigResultNRFreqRelation.cs new file mode 100644 index 00000000..d7bab83d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoConfigResultNRFreqRelation.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoConfigResultNRFreqRelation : MoConfigArgObject + { + public string moId { get; set; } + public string refNRFreq { get; set; } + public override string mocName => "NRFreqRelation"; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCUEUtranCellFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCUEUtranCellFDDLTE.cs new file mode 100644 index 00000000..1b035bf5 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCUEUtranCellFDDLTE.cs @@ -0,0 +1,1134 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultCUEUtranCellFDDLTE + { + public string case5RecoverThrdDl { get; set; } + public string atmosphericDetecPerid { get; set; } + public string reuseMagicRadioSwch { get; set; } + public string tddCfg0MUMIMOSwchUL { get; set; } + public string ratioThr4PagingStorm { get; set; } + public string gLCssCoopOffset { get; set; } + public string pubAndHwPriOvlpRbStartPosUL { get; set; } + public string case5RecoverThrdUl { get; set; } + public string fullConfigSwch { get; set; } + public string lowSpeedThr4Normal { get; set; } + public string ratioOperatorGroupn { get; set; } + public string type1RBAllocEnableSwchDl { get; set; } + public string rbNumMultiFactor4Mod1 { get; set; } + public string puschMrcIrcSwch { get; set; } + public string ratioThr4PagingStormEnd { get; set; } + public string ueTransMode { get; set; } + public string scCRSActiveSetThrDl { get; set; } + public string atmosDataQualDetectTimes { get; set; } + public string laaCarrierPriSwch { get; set; } + public string pullCardJudgeSwitch { get; set; } + public string mocName { get; set; } + public string rBRsvRatio4OprGrp { get; set; } + public string atmosDataULWorseSINRTrd { get; set; } + public string addiSpecEmiss { get; set; } + public string lteNbSpecShareTime { get; set; } + public string schedInDRX4ECGI { get; set; } + public string oneRBAllocateSwch { get; set; } + public string tm34T4RSwch { get; set; } + public string rbSharMode { get; set; } + public string prbUsageThrdForMuMimoUl { get; set; } + public string acSendPowdeltaUL { get; set; } + public string atmosphericDecPowrThres { get; set; } + public string atmosWorseDataMigSwch { get; set; } + public string switchForGbrDrx { get; set; } + public string latitude { get; set; } + public string freqOffCompenSwchDl { get; set; } + public string phyChCPSel { get; set; } + public string startPreCompenRatioThr { get; set; } + public string oprGrpRBGrabLvl { get; set; } + public string hiterThreshold { get; set; } + public string atmosphericUpNiThres { get; set; } + public string lowFreCutRbNumDL { get; set; } + public string rlfSwitch { get; set; } + public string radioLinkCongestSwch { get; set; } + public string pucchMrcIrcSwch { get; set; } + public string narrowInterferenceSwch { get; set; } + public string cellRSPortNum { get; set; } + public string hARQWeightCombSwch { get; set; } + public string configDRXTimerForNSA { get; set; } + public string atmosENBIDDropThr { get; set; } + public string case5PlmnGroupCongThrd { get; set; } + public string prbRelChkTimes { get; set; } + public string cFI { get; set; } + public string offsetAngle { get; set; } + public string radioLinkOutageSwch { get; set; } + public string magicRadioSwch { get; set; } + public string taLimitedReleaseSwch { get; set; } + public string uLMMMaxSDMANum { get; set; } + public string cellRadius { get; set; } + public string moId { get; set; } + public string pucchFOCSwch { get; set; } + public string acSendPowdeltaDL { get; set; } + public string largeSc4OneHighSINRTASwch { get; set; } + public string performanceScene { get; set; } + public string simuLoadSwchDl { get; set; } + public string subMcsRectifyByNISwch { get; set; } + public string cceAdaptMod { get; set; } + public string filteWndLen4SRMode1 { get; set; } + public string freqOffRptValidThr { get; set; } + public string minMCSUl { get; set; } + public string rbInterferenceBitMapDl { get; set; } + public string ringCoverAdjustQuantity { get; set; } + public string tm38McsThr8TX { get; set; } + public string tm83TestMcsThr8TX { get; set; } + public string withoutQCIDRXMergPrior { get; set; } + public string cellLocalId { get; set; } + public string edgeUeThroughOptSwch { get; set; } + public string iMEISVStgySwch { get; set; } + public string qamSwch { get; set; } + public string cutRbNumDl { get; set; } + public string case5CongJudPrd { get; set; } + public string allowedAccessClasses { get; set; } + public string rbInterferenceBitMapUl { get; set; } + public string AtmosSubFrameBackSwch { get; set; } + public string tmmSrsConfidenceDelta { get; set; } + public string siWindowLength { get; set; } + public string deRohcSch { get; set; } + public string cSSInterferIntAvdSwch { get; set; } + public string mmModeSwch { get; set; } + public string distributedMIMOSwch { get; set; } + public string the256QAMCATLimitSwch { get; set; } + public string cellLAACarrierAtt { get; set; } + public string ringCoverSwch { get; set; } + public string rlfDelayTime { get; set; } + public string minMCSDl { get; set; } + public string operState { get; set; } + public string dLMMMaxSDMANum { get; set; } + public string cellResvInfo { get; set; } + public string bfRbExpandSwch { get; set; } + public string urgencyeai { get; set; } + public string stopPreCompenRatioThr { get; set; } + public string addiSpecEmissForAddiFreq { get; set; } + public string userLabel { get; set; } + public string prachMrcIrcEnable { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mbsfnSyncAreaID { get; set; } + public string gSMBandIdent { get; set; } + public string cutRbModeDl { get; set; } + public string highBllrCntThrUL { get; set; } + public string timeAlignTimer { get; set; } + public string reservedPara10 { get; set; } + public string pci { get; set; } + public string bandWidthUl { get; set; } + public string adminState { get; set; } + public string cellReservedForOptUse { get; set; } + public string highBllrCntThrDL { get; set; } + public string atmosphericSupresEnterPerid { get; set; } + public string availStatus { get; set; } + public string coModePConfig { get; set; } + public string configDRXTimerForRA { get; set; } + public string speedInd { get; set; } + public string laaDFSSwch { get; set; } + public string glCSSSwch { get; set; } + public string relRetranOptSwitch { get; set; } + public string loadtestSwitch { get; set; } + public string switchForNGbrDrx { get; set; } + public string emtcSwch { get; set; } + public string phrProcessDisablePrbSwch { get; set; } + public string forceLowSpeedThr4Normal { get; set; } + public string prbUsageRelThredDL { get; set; } + public string qam64DemSpIndUl { get; set; } + public string crcMergeSwch { get; set; } + public string coModeBConfig { get; set; } + public string shortDrxSwch { get; set; } + public string gLCoopPowerReduceSwch { get; set; } + public string cutRbNumUl { get; set; } + public string oprGrpShrAccFlag { get; set; } + public string atmosphericLocationSwch { get; set; } + public string prbUsageRelThredUL { get; set; } + public string spidIdleMobiCtrlSwch { get; set; } + public string pciList { get; set; } + public string bfmumimoEnableDl { get; set; } + public string measFreqOptSwitch { get; set; } + public string atmosphericSymBackSwch { get; set; } + public string scActiveSetThrUl { get; set; } + public string coModeISwch { get; set; } + public string defaultSpecShareState { get; set; } + public string prachMrcIrcSwch { get; set; } + public string ulMMNewTransNumAdaptSwch { get; set; } + public string magicRadioULDCESwch { get; set; } + public string atmosphericQuitPerid { get; set; } + public string rbRatioLowThr4Mod1 { get; set; } + public string atmosphericSwch { get; set; } + public string atmosphericSeqDemAntNum { get; set; } + public string bandWidthDl { get; set; } + public string flagSwiModeUl { get; set; } + public string matrixType { get; set; } + public string muPrbUsagePeriodUl { get; set; } + public string cqiExpiredTimer { get; set; } + public string maxMCSUl { get; set; } + public string highPrbEstimForMuMimoUl { get; set; } + public string tmmAntCombTypeUl { get; set; } + public string coModePSwch { get; set; } + public string ratioShared { get; set; } + public string configDRXTimerForHO { get; set; } + public string reTxExpandStreamSwch { get; set; } + public string maxShareRatio { get; set; } + public string case5RatioACSwch { get; set; } + public string maxMCSDl { get; set; } + public string phsNIInd { get; set; } + public string puschChEstType { get; set; } + public string case5PlmnGroupRecoverThrd { get; set; } + public string edgeUeAmcOLOptSwitch { get; set; } + public string tATConsistencySwch { get; set; } + public string earfcnDl { get; set; } + public string energySavControl { get; set; } + public string ulTranSchemeSet { get; set; } + public string dlPRBTrd4AtmosDataMig { get; set; } + public string rBShareRatio4OprGrp { get; set; } + public string avoidFreqOffsetNISwch { get; set; } + public string lowPrbEstimForMuMimoUl { get; set; } + public string allowFreq4SpecIMEISVSwch { get; set; } + public string muMimoPriorSwchUl { get; set; } + public string plmnGroupIndex { get; set; } + public string case5CongPunishPeriod { get; set; } + public string prbRtrChkTimes { get; set; } + public string accMCSEnableSwchDl { get; set; } + public string earfcnUl { get; set; } + public string prbRtrThredDL { get; set; } + public string tm9TM10TbsAltSwch { get; set; } + public string accMCSEnableSwchUl { get; set; } + public string nRRatBlindRedStgy { get; set; } + public string gLCssCoopSwch { get; set; } + public string commCCENumDl { get; set; } + public string atmosphericSeqDemParaThres { get; set; } + public string sampleRateCfg { get; set; } + public string scUERSActiveSetThrDl { get; set; } + public string ratioOperatorn { get; set; } + public string ulMMRetransNumAdaptSwch { get; set; } + public string qosAdpSwchUL { get; set; } + public string powerSharingSwchUL { get; set; } + public string prbRtrThredUL { get; set; } + public string networkSharingOptSwch { get; set; } + public string rruFilterMode { get; set; } + public string reservedPara8 { get; set; } + public string maxUeRbNumDl { get; set; } + public string reservedPara9 { get; set; } + public string uLSharingMode { get; set; } + public string narrowInterferenceLen { get; set; } + public string enSrsPhrPrecisionSwch { get; set; } + public string ambrLimtSwch { get; set; } + public string reservedPara1 { get; set; } + public string reservedPara2 { get; set; } + public string refPlmn { get; set; } + public string srRBNumAuthMode { get; set; } + public string reservedPara3 { get; set; } + public string reservedPara4 { get; set; } + public string reservedPara5 { get; set; } + public string largeFreqOffEstSwchUl { get; set; } + public string highFreCutRbNumDL { get; set; } + public string reservedPara6 { get; set; } + public string qosAdpSwchDL { get; set; } + public string atmosphericPAPRThres { get; set; } + public string reservedPara7 { get; set; } + public string pGBRSwch { get; set; } + public string blerAdaptSwitch4IncBler { get; set; } + public string maxUeRbNumUl { get; set; } + public string magicRadioMaxBandWidth { get; set; } + public string mimoScenarios { get; set; } + public string tm44T4RSwch { get; set; } + public string atmoIDDectNumThershold { get; set; } + public string atmosphericGrdNiThresUl { get; set; } + public string closeFrameRatio { get; set; } + public string freqBandInd { get; set; } + public string atmosphericSupresThres { get; set; } + public string atmosphericDetecWaySwch { get; set; } + public string amc4GeneralQosSwchUl { get; set; } + public string qcellPosiSwch { get; set; } + public string rbRatioHighThr4Mod1 { get; set; } + public string upInterfFreqEffThr { get; set; } + public string nB { get; set; } + public string tac { get; set; } + public string buildPhyLocation { get; set; } + public string longitude { get; set; } + public string voLTESwch { get; set; } + public string nCSpeedJudgeSwch { get; set; } + public string isFddSDMAEnable4DMDL { get; set; } + public string cellCapaLeveInd { get; set; } + public string relatedCellLocalId { get; set; } + public string atmosphericSupresQuitPerid { get; set; } + public string ulPRBTrd4AtmosDataMig { get; set; } + public string case5CongStarThrdUl { get; set; } + public string case5GuaranteedGBR { get; set; } + public string isFddSDMAEnable4DMUL { get; set; } + public string lAADRSSwch { get; set; } + public string gLDBENonStdSupport { get; set; } + public string atmosphericNoLoadThres { get; set; } + public string shareAreaId { get; set; } + public string iCo4PubAndHwPriSwch { get; set; } + public string case5CongStarThrdDl { get; set; } + public string configDRXTimerForConnect { get; set; } + public string atmosDataULSINRProtectTrd { get; set; } + public string tm9EnhancedSDMASwch { get; set; } + public string mbmsSvcAreaIDList { get; set; } + public string highBllrCntThr4VOIPUl { get; set; } + public string atmosphericSeqContThres1 { get; set; } + public string cellSize { get; set; } + public string atmosphericSeqContThres3 { get; set; } + public string atmosphericSeqContThres2 { get; set; } + public string coModeBSwch { get; set; } + public string atmosphericSeqJontThres { get; set; } + public string sinrInterMatrixSwch { get; set; } + public string forceEdgeUeToMultANSwch { get; set; } + public string alias { get; set; } + public string mbmsCCEAdaptMod { get; set; } + public string pubAndHwPriOvlpRbNumUL { get; set; } + public string closeFrameOffset { get; set; } + public string testState { get; set; } + public string muMIMO4MultiUESwchUl { get; set; } + public string pubAndHwPriOvlpRbStartPosDL { get; set; } + public string addiFreqBand { get; set; } + public string atmosDataQualSampPriod { get; set; } + public string cellHeavyLoadFlag { get; set; } + public string rd4ForCoverage { get; set; } + public string pubAndHwPriOvlpRbNumDL { get; set; } + public string drxSleepJudgeOptSwch { get; set; } + public string coModeIConfig { get; set; } + public string lteNbPwrShareTime { get; set; } + public string mumimoEnableUl { get; set; } + public string highSpeedThr4Normal { get; set; } + public string pb { get; set; } + public string ldn { get; set; } + public string flagSwiMode { get; set; } + public string filteFactor4SRMode1 { get; set; } + public string tmmSrsConfidenceSwch { get; set; } + public string highBllrCntThr4VOIPDl { get; set; } + public string sceneCfg { get; set; } + public string dlDeltaMCS4Release { get; set; } + public string lteNbSharePeriod { get; set; } + } + public class CUEUtranCellFDDLTE + { + public string plmnUserLabel { get; set; } + public string case5RecoverThrdDl { get; set; } + public string atmosphericDetecPerid { get; set; } + public string reuseMagicRadioSwch { get; set; } + public string tddCfg0MUMIMOSwchUL { get; set; } + public string ratioThr4PagingStorm { get; set; } + public string gLCssCoopOffset { get; set; } + public string pubAndHwPriOvlpRbStartPosUL { get; set; } + public string case5RecoverThrdUl { get; set; } + public string fullConfigSwch { get; set; } + public string lowSpeedThr4Normal { get; set; } + public string ratioOperatorGroupn { get; set; } + public string type1RBAllocEnableSwchDl { get; set; } + public string rbNumMultiFactor4Mod1 { get; set; } + public string puschMrcIrcSwch { get; set; } + public string ratioThr4PagingStormEnd { get; set; } + public string ueTransMode { get; set; } + public string scCRSActiveSetThrDl { get; set; } + public string atmosDataQualDetectTimes { get; set; } + public string laaCarrierPriSwch { get; set; } + public string pullCardJudgeSwitch { get; set; } + public string mocName { get; set; } + public string rBRsvRatio4OprGrp { get; set; } + public string atmosDataULWorseSINRTrd { get; set; } + public string addiSpecEmiss { get; set; } + public string cellUpRightBW { get; set; } + public string lteNbSpecShareTime { get; set; } + public string schedInDRX4ECGI { get; set; } + public string oneRBAllocateSwch { get; set; } + public string tm34T4RSwch { get; set; } + public string rbSharMode { get; set; } + public string aggModeUlPrbRatioThrd { get; set; } + public string prbUsageThrdForMuMimoUl { get; set; } + public string acSendPowdeltaUL { get; set; } + public string atmosphericDecPowrThres { get; set; } + public string atmosWorseDataMigSwch { get; set; } + public string switchForGbrDrx { get; set; } + public string latitude { get; set; } + public string freqOffCompenSwchDl { get; set; } + public string phyChCPSel { get; set; } + public string startPreCompenRatioThr { get; set; } + public string oprGrpRBGrabLvl { get; set; } + public string hiterThreshold { get; set; } + public string atmosphericUpNiThres { get; set; } + public string lowFreCutRbNumDL { get; set; } + public string rlfSwitch { get; set; } + public string radioLinkCongestSwch { get; set; } + public string pucchMrcIrcSwch { get; set; } + public string narrowInterferenceSwch { get; set; } + public string cellRSPortNum { get; set; } + public string hARQWeightCombSwch { get; set; } + public string configDRXTimerForNSA { get; set; } + public string s1EcgiPlmnConvertSwch { get; set; } + public string atmosENBIDDropThr { get; set; } + public string case5PlmnGroupCongThrd { get; set; } + public string prbRelChkTimes { get; set; } + public string cFI { get; set; } + public string offsetAngle { get; set; } + public string radioLinkOutageSwch { get; set; } + public string magicRadioSwch { get; set; } + public string taLimitedReleaseSwch { get; set; } + public string uLMMMaxSDMANum { get; set; } + public string cellRadius { get; set; } + public string moId { get; set; } + public string pucchFOCSwch { get; set; } + public string acSendPowdeltaDL { get; set; } + public string largeSc4OneHighSINRTASwch { get; set; } + public string performanceScene { get; set; } + public string simuLoadSwchDl { get; set; } + public string subMcsRectifyByNISwch { get; set; } + public string cceAdaptMod { get; set; } + public string filteWndLen4SRMode1 { get; set; } + public string freqOffRptValidThr { get; set; } + public string highPwrRatioThr { get; set; } + public string minMCSUl { get; set; } + public string rbInterferenceBitMapDl { get; set; } + public string ringCoverAdjustQuantity { get; set; } + public string tm38McsThr8TX { get; set; } + public string tm83TestMcsThr8TX { get; set; } + public string withoutQCIDRXMergPrior { get; set; } + public string cellLocalId { get; set; } + public string edgeUeThroughOptSwch { get; set; } + public string iMEISVStgySwch { get; set; } + public string qamSwch { get; set; } + public string cutRbNumDl { get; set; } + public string case5CongJudPrd { get; set; } + public string ueRelativeSignalThr { get; set; } + public string allowedAccessClasses { get; set; } + public string rbInterferenceBitMapUl { get; set; } + public string AtmosSubFrameBackSwch { get; set; } + public string cellEsState { get; set; } + public string tmmSrsConfidenceDelta { get; set; } + public string siWindowLength { get; set; } + public string deRohcSch { get; set; } + public string cSSInterferIntAvdSwch { get; set; } + public string mmModeSwch { get; set; } + public string distributedMIMOSwch { get; set; } + public string the256QAMCATLimitSwch { get; set; } + public string cellLAACarrierAtt { get; set; } + public string ringCoverSwch { get; set; } + public string rlfDelayTime { get; set; } + public string minMCSDl { get; set; } + public string operState { get; set; } + public string dLMMMaxSDMANum { get; set; } + public string cellResvInfo { get; set; } + public string bfRbExpandSwch { get; set; } + public string urgencyeai { get; set; } + public string stopPreCompenRatioThr { get; set; } + public string addiSpecEmissForAddiFreq { get; set; } + public string aggModeDlPrbRatioThrd { get; set; } + public string userLabel { get; set; } + public string prachMrcIrcEnable { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mbsfnSyncAreaID { get; set; } + public string gSMBandIdent { get; set; } + public string cutRbModeDl { get; set; } + public string highBllrCntThrUL { get; set; } + public string timeAlignTimer { get; set; } + public string reservedPara10 { get; set; } + public string pci { get; set; } + public string bandWidthUl { get; set; } + public string adminState { get; set; } + public string cellReservedForOptUse { get; set; } + public string highBllrCntThrDL { get; set; } + public string atmosphericSupresEnterPerid { get; set; } + public string availStatus { get; set; } + public string coModePConfig { get; set; } + public string configDRXTimerForRA { get; set; } + public string speedInd { get; set; } + public string laaDFSSwch { get; set; } + public string glCSSSwch { get; set; } + public string relRetranOptSwitch { get; set; } + public string loadtestSwitch { get; set; } + public string switchForNGbrDrx { get; set; } + public string emtcSwch { get; set; } + public string phrProcessDisablePrbSwch { get; set; } + public string forceLowSpeedThr4Normal { get; set; } + public string prbUsageRelThredDL { get; set; } + public string qam64DemSpIndUl { get; set; } + public string crcMergeSwch { get; set; } + public string coModeBConfig { get; set; } + public string shortDrxSwch { get; set; } + public string gLCoopPowerReduceSwch { get; set; } + public string cutRbNumUl { get; set; } + public string oprGrpShrAccFlag { get; set; } + public string atmosphericLocationSwch { get; set; } + public string prbUsageRelThredUL { get; set; } + public string spidIdleMobiCtrlSwch { get; set; } + public string pciList { get; set; } + public string bfmumimoEnableDl { get; set; } + public string measFreqOptSwitch { get; set; } + public string atmosphericSymBackSwch { get; set; } + public string scActiveSetThrUl { get; set; } + public string coModeISwch { get; set; } + public string defaultSpecShareState { get; set; } + public string prachMrcIrcSwch { get; set; } + public string ulMMNewTransNumAdaptSwch { get; set; } + public string magicRadioULDCESwch { get; set; } + public string atmosphericQuitPerid { get; set; } + public string rbRatioLowThr4Mod1 { get; set; } + public string atmosphericSwch { get; set; } + public string atmosphericSeqDemAntNum { get; set; } + public string prruStatisticsSwitch { get; set; } + public string bandWidthDl { get; set; } + public string flagSwiModeUl { get; set; } + public string matrixType { get; set; } + public string muPrbUsagePeriodUl { get; set; } + public string netShareULRBRatioSwch { get; set; } + public string cqiExpiredTimer { get; set; } + public string cellUpLeftBW { get; set; } + public string maxMCSUl { get; set; } + public string cellDownRightBW { get; set; } + public string highPrbEstimForMuMimoUl { get; set; } + public string tmmAntCombTypeUl { get; set; } + public string coModePSwch { get; set; } + public string ratioShared { get; set; } + public string configDRXTimerForHO { get; set; } + public string reTxExpandStreamSwch { get; set; } + public string dssBandAdaptNSASwch { get; set; } + public string maxShareRatio { get; set; } + public string case5RatioACSwch { get; set; } + public string maxMCSDl { get; set; } + public string phsNIInd { get; set; } + public string puschChEstType { get; set; } + public string case5PlmnGroupRecoverThrd { get; set; } + public string edgeUeAmcOLOptSwitch { get; set; } + public string tATConsistencySwch { get; set; } + public string earfcnDl { get; set; } + public string energySavControl { get; set; } + public string ulTranSchemeSet { get; set; } + public string dlPRBTrd4AtmosDataMig { get; set; } + public string rBShareRatio4OprGrp { get; set; } + public string avoidFreqOffsetNISwch { get; set; } + public string lowPrbEstimForMuMimoUl { get; set; } + public string allowFreq4SpecIMEISVSwch { get; set; } + public string muMimoPriorSwchUl { get; set; } + public string plmnGroupIndex { get; set; } + public string case5CongPunishPeriod { get; set; } + public string prbRtrChkTimes { get; set; } + public string accMCSEnableSwchDl { get; set; } + public string earfcnUl { get; set; } + public string prbRtrThredDL { get; set; } + public string tm9TM10TbsAltSwch { get; set; } + public string accMCSEnableSwchUl { get; set; } + public string nRRatBlindRedStgy { get; set; } + public string gLCssCoopSwch { get; set; } + public string commCCENumDl { get; set; } + public string atmosphericSeqDemParaThres { get; set; } + public string sampleRateCfg { get; set; } + public string scUERSActiveSetThrDl { get; set; } + public string ratioOperatorn { get; set; } + public string ulMMRetransNumAdaptSwch { get; set; } + public string qosAdpSwchUL { get; set; } + public string powerSharingSwchUL { get; set; } + public string prbRtrThredUL { get; set; } + public string networkSharingOptSwch { get; set; } + public string rruFilterMode { get; set; } + public string reservedPara8 { get; set; } + public string maxUeRbNumDl { get; set; } + public string reservedPara9 { get; set; } + public string uLSharingMode { get; set; } + public string narrowInterferenceLen { get; set; } + public string enSrsPhrPrecisionSwch { get; set; } + public string ambrLimtSwch { get; set; } + public string reservedPara1 { get; set; } + public string reservedPara2 { get; set; } + public string refPlmn { get; set; } + public string srRBNumAuthMode { get; set; } + public string reservedPara3 { get; set; } + public string reservedPara4 { get; set; } + public string reservedPara5 { get; set; } + public string largeFreqOffEstSwchUl { get; set; } + public string highFreCutRbNumDL { get; set; } + public string reservedPara6 { get; set; } + public string qosAdpSwchDL { get; set; } + public string atmosphericPAPRThres { get; set; } + public string reservedPara7 { get; set; } + public string pGBRSwch { get; set; } + public string blerAdaptSwitch4IncBler { get; set; } + public string maxUeRbNumUl { get; set; } + public string magicRadioMaxBandWidth { get; set; } + public string mimoScenarios { get; set; } + public string tm44T4RSwch { get; set; } + public string atmoIDDectNumThershold { get; set; } + public string atmosphericGrdNiThresUl { get; set; } + public string closeFrameRatio { get; set; } + public string freqBandInd { get; set; } + public string atmosphericSupresThres { get; set; } + public string atmosphericDetecWaySwch { get; set; } + public string amc4GeneralQosSwchUl { get; set; } + public string qcellPosiSwch { get; set; } + public string rbRatioHighThr4Mod1 { get; set; } + public string upInterfFreqEffThr { get; set; } + public string oldCellId { get; set; } + public string nB { get; set; } + public string tac { get; set; } + public string buildPhyLocation { get; set; } + public string eSState { get; set; } + public string blockHighThr { get; set; } + public string aggreModeSelectSwch { get; set; } + public string longitude { get; set; } + public string voLTESwch { get; set; } + public string nCSpeedJudgeSwch { get; set; } + public string isFddSDMAEnable4DMDL { get; set; } + public string cellCapaLeveInd { get; set; } + public string analysisNrCapSwch { get; set; } + public string relatedCellLocalId { get; set; } + public string atmosphericSupresQuitPerid { get; set; } + public string ulPRBTrd4AtmosDataMig { get; set; } + public string case5CongStarThrdUl { get; set; } + public string case5GuaranteedGBR { get; set; } + public string isFddSDMAEnable4DMUL { get; set; } + public string lAADRSSwch { get; set; } + public string enhancedSiSchedulingSwch { get; set; } + public string gLDBENonStdSupport { get; set; } + public string atmosphericNoLoadThres { get; set; } + public string lowPwrRatioThr { get; set; } + public string shareAreaId { get; set; } + public string iCo4PubAndHwPriSwch { get; set; } + public string case5CongStarThrdDl { get; set; } + public string configDRXTimerForConnect { get; set; } + public string aggModeUserRatioThrd { get; set; } + public string altitude { get; set; } + public string atmosDataULSINRProtectTrd { get; set; } + public string tm9EnhancedSDMASwch { get; set; } + public string mbmsSvcAreaIDList { get; set; } + public string highBllrCntThr4VOIPUl { get; set; } + public string atmosphericSeqContThres1 { get; set; } + public string cellSize { get; set; } + public string atmosphericSeqContThres3 { get; set; } + public string atmosphericSeqContThres2 { get; set; } + public string coModeBSwch { get; set; } + public string atmosphericSeqJontThres { get; set; } + public string ueAbsoluteSignalThr { get; set; } + public string sinrInterMatrixSwch { get; set; } + public string forceEdgeUeToMultANSwch { get; set; } + public string alias { get; set; } + public string mbmsCCEAdaptMod { get; set; } + public string pubAndHwPriOvlpRbNumUL { get; set; } + public string closeFrameOffset { get; set; } + public string blockUserBlerAdaptSwch { get; set; } + public string testState { get; set; } + public string muMIMO4MultiUESwchUl { get; set; } + public string pubAndHwPriOvlpRbStartPosDL { get; set; } + public string addiFreqBand { get; set; } + public string atmosDataQualSampPriod { get; set; } + public string cellHeavyLoadFlag { get; set; } + public string alphaMaxLTE { get; set; } + public string rd4ForCoverage { get; set; } + public string pubAndHwPriOvlpRbNumDL { get; set; } + public string drxSleepJudgeOptSwch { get; set; } + public string pwrPortShareSwch { get; set; } + public string coModeIConfig { get; set; } + public string lteNbPwrShareTime { get; set; } + public string mumimoEnableUl { get; set; } + public string highSpeedThr4Normal { get; set; } + public string blockLowThr { get; set; } + public string pb { get; set; } + public string blockFilterCoef { get; set; } + public string ldn { get; set; } + public string flagSwiMode { get; set; } + public string filteFactor4SRMode1 { get; set; } + public string tmmSrsConfidenceSwch { get; set; } + public string highBllrCntThr4VOIPDl { get; set; } + public string cellDownLeftBW { get; set; } + public string sceneCfg { get; set; } + public string dlDeltaMCS4Release { get; set; } + public string lteNbSharePeriod { get; set; } + } + public class ECellEquipFuncFDDLTE + { + public string anttoPortMap { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string rfAppMode { get; set; } + public string cpId { get; set; } + public string limitPwrChannel { get; set; } + public string cpTransTime { get; set; } + public string refSectorFunction { get; set; } + public string adminState { get; set; } + public string refBpPoolFunction { get; set; } + public string aasTiltUl { get; set; } + public string cpTransPwr { get; set; } + public string dynBCWeightSwitch { get; set; } + public string supercellFlagCopy { get; set; } + public string testState { get; set; } + public string rruCarrierNo { get; set; } + public string cpSpeRefSigPwr { get; set; } + public string anttoCSIRSPortMap { get; set; } + public string mocName { get; set; } + public string bplPort { get; set; } + public string aasTiltDl { get; set; } + public string moId { get; set; } + public string maxCPTransPwr { get; set; } + public string upActAntBitmapSeq { get; set; } + public string supercellBackupArea1 { get; set; } + public string lnShareBB { get; set; } + public string iFModeFlag { get; set; } + public string operState { get; set; } + public string ldn { get; set; } + public string antMapDlSeq { get; set; } + public string antMapUlSeq { get; set; } + public string maxRestrictedTransPwr { get; set; } + public string dlTransInd { get; set; } + public string supercellFlag { get; set; } + } + public class ECellEquipFuncTDDLTE + { + public string anttoPortMap { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string rfAppMode { get; set; } + public string cpId { get; set; } + public string planCPTransPwr { get; set; } + public string cpTransTime { get; set; } + public string beamWidth { get; set; } + public string refSectorFunction { get; set; } + public string adminState { get; set; } + public string refBpPoolFunction { get; set; } + public string cpTransPwr { get; set; } + public string dynBCWeightSwitch { get; set; } + public string supercellFlagCopy { get; set; } + public string testState { get; set; } + public string cpSpeRefSigPwr { get; set; } + public string anttoCSIRSPortMap { get; set; } + public string insPortCmpModDl { get; set; } + public string planCPRsPwr { get; set; } + public string mocName { get; set; } + public string moId { get; set; } + public string upActAntBitmapSeq { get; set; } + public string supercellBackupArea1 { get; set; } + public string lnShareBB { get; set; } + public string operState { get; set; } + public string ldn { get; set; } + public string anttoR13CSIRSPortMap { get; set; } + public string dlTransInd { get; set; } + public string elecDowntilt { get; set; } + public string supercellFlag { get; set; } + } + public class CUEUtranCellTDDLTE + { + public string plmnUserLabel { get; set; } + public string case5RecoverThrdDl { get; set; } + public string atmosphericDetecPerid { get; set; } + public string reuseMagicRadioSwch { get; set; } + public string tddCfg0MUMIMOSwchUL { get; set; } + public string ratioThr4PagingStorm { get; set; } + public string enhancedTransAntSelSwch { get; set; } + public string pubAndHwPriOvlpRbStartPosUL { get; set; } + public string case5RecoverThrdUl { get; set; } + public string fullConfigSwch { get; set; } + public string lowSpeedThr4Normal { get; set; } + public string atmosductVoLTESwch { get; set; } + public string ratioOperatorGroupn { get; set; } + public string type1RBAllocEnableSwchDl { get; set; } + public string rbNumMultiFactor4Mod1 { get; set; } + public string puschMrcIrcSwch { get; set; } + public string ratioThr4PagingStormEnd { get; set; } + public string scCRSActiveSetThrDl { get; set; } + public string sasSwch { get; set; } + public string atmosDataQualDetectTimes { get; set; } + public string pullCardJudgeSwitch { get; set; } + public string mocName { get; set; } + public string rBRsvRatio4OprGrp { get; set; } + public string atmosDataULWorseSINRTrd { get; set; } + public string addiSpecEmiss { get; set; } + public string schedInDRX4ECGI { get; set; } + public string oneRBAllocateSwch { get; set; } + public string tm34T4RSwch { get; set; } + public string rbSharMode { get; set; } + public string aCKMtiPlexingSwchUl { get; set; } + public string aggModeUlPrbRatioThrd { get; set; } + public string prbUsageThrdForMuMimoUl { get; set; } + public string tansAntenSelOptSwch { get; set; } + public string acSendPowdeltaUL { get; set; } + public string atmosphericDecPowrThres { get; set; } + public string atmosWorseDataMigSwch { get; set; } + public string switchForGbrDrx { get; set; } + public string pdcchSDswch { get; set; } + public string latitude { get; set; } + public string freqOffCompenSwchDl { get; set; } + public string phyChCPSel { get; set; } + public string tM9OpenloopforSuSwch { get; set; } + public string startPreCompenRatioThr { get; set; } + public string oprGrpRBGrabLvl { get; set; } + public string hiterThreshold { get; set; } + public string atmosphericUpNiThres { get; set; } + public string lowFreCutRbNumDL { get; set; } + public string rlfSwitch { get; set; } + public string radioLinkCongestSwch { get; set; } + public string pucchMrcIrcSwch { get; set; } + public string narrowInterferenceSwch { get; set; } + public string fixTM9SchSwch { get; set; } + public string cellRSPortNum { get; set; } + public string hARQWeightCombSwch { get; set; } + public string configDRXTimerForNSA { get; set; } + public string s1EcgiPlmnConvertSwch { get; set; } + public string atmosENBIDDropThr { get; set; } + public string case5PlmnGroupCongThrd { get; set; } + public string cFI { get; set; } + public string offsetAngle { get; set; } + public string radioLinkOutageSwch { get; set; } + public string magicRadioSwch { get; set; } + public string sfAssignment { get; set; } + public string tm39McsThrAntSelct4TX { get; set; } + public string taLimitedReleaseSwch { get; set; } + public string uLMMMaxSDMANum { get; set; } + public string cellRadius { get; set; } + public string moId { get; set; } + public string pucchFOCSwch { get; set; } + public string acSendPowdeltaDL { get; set; } + public string largeSc4OneHighSINRTASwch { get; set; } + public string performanceScene { get; set; } + public string simuLoadSwchDl { get; set; } + public string mmMuUEThrMedHigh2Low { get; set; } + public string subMcsRectifyByNISwch { get; set; } + public string sRSMovIntervalThr4TMM { get; set; } + public string wimaxCoexistSwitch { get; set; } + public string cceAdaptMod { get; set; } + public string mimoModeSwitch { get; set; } + public string filteWndLen4SRMode1 { get; set; } + public string freqOffRptValidThr { get; set; } + public string minMCSUl { get; set; } + public string tm38McsThr8TX { get; set; } + public string tm83TestMcsThr8TX { get; set; } + public string pseuAntSeleProtSwch { get; set; } + public string withoutQCIDRXMergPrior { get; set; } + public string cellLocalId { get; set; } + public string edgeUeThroughOptSwch { get; set; } + public string iMEISVStgySwch { get; set; } + public string qamSwch { get; set; } + public string cutRbNumDl { get; set; } + public string case5CongJudPrd { get; set; } + public string ueRelativeSignalThr { get; set; } + public string allowedAccessClasses { get; set; } + public string tm38McsThrAntSelct8TX { get; set; } + public string AtmosSubFrameBackSwch { get; set; } + public string cellEsState { get; set; } + public string tmmSrsConfidenceDelta { get; set; } + public string siWindowLength { get; set; } + public string deRohcSch { get; set; } + public string mmModeSwch { get; set; } + public string tm83TestMcsThrAntSelct8TX { get; set; } + public string the256QAMCATLimitSwch { get; set; } + public string distributedMIMOSwch { get; set; } + public string muMimoModeDL { get; set; } + public string tM8SuWCalcSwitch { get; set; } + public string rlfDelayTime { get; set; } + public string minMCSDl { get; set; } + public string operState { get; set; } + public string mmSchUEThrHigh2Med { get; set; } + public string tm93TestMcsThrAntSelct8TX { get; set; } + public string dLMMMaxSDMANum { get; set; } + public string atmoOnlyRecvSeqSwitch { get; set; } + public string cellResvInfo { get; set; } + public string bfRbExpandSwch { get; set; } + public string urgencyeai { get; set; } + public string mmSchUEThrMed2High { get; set; } + public string stopPreCompenRatioThr { get; set; } + public string addiSpecEmissForAddiFreq { get; set; } + public string aggModeDlPrbRatioThrd { get; set; } + public string userLabel { get; set; } + public string prachMrcIrcEnable { get; set; } + public string mmSchUEThrMedHigh2Low { get; set; } + public DateTime lastModifiedTime { get; set; } + public string sRSMovNiThr4TMM { get; set; } + public string mbsfnSyncAreaID { get; set; } + public string cutRbModeDl { get; set; } + public string highBllrCntThrUL { get; set; } + public string timeAlignTimer { get; set; } + public string atmoFixTranSeqSwitch { get; set; } + public string reservedPara10 { get; set; } + public string pci { get; set; } + public string adminState { get; set; } + public string cellReservedForOptUse { get; set; } + public string highBllrCntThrDL { get; set; } + public string atmosphericSupresEnterPerid { get; set; } + public string atmosDuctInnerAmcEffectQci { get; set; } + public string availStatus { get; set; } + public string coModePConfig { get; set; } + public string configDRXTimerForRA { get; set; } + public string speedInd { get; set; } + public string tM98T8RSwch { get; set; } + public string relRetranOptSwitch { get; set; } + public string loadtestSwitch { get; set; } + public string tM9SubBandPMISwch { get; set; } + public string switchForNGbrDrx { get; set; } + public string emtcSwch { get; set; } + public string phrProcessDisablePrbSwch { get; set; } + public string forceLowSpeedThr4Normal { get; set; } + public string qam64DemSpIndUl { get; set; } + public string crcMergeSwch { get; set; } + public string coModeBConfig { get; set; } + public string antDecRankSwch { get; set; } + public string shortDrxSwch { get; set; } + public string cutRbNumUl { get; set; } + public string oprGrpShrAccFlag { get; set; } + public string atmosphericLocationSwch { get; set; } + public string spidIdleMobiCtrlSwch { get; set; } + public string pciList { get; set; } + public string sRSMovSwch4TMM { get; set; } + public string bfmumimoEnableDl { get; set; } + public string measFreqOptSwitch { get; set; } + public string srsWinFilterSwch { get; set; } + public string atmosphericSymBackSwch { get; set; } + public string scActiveSetThrUl { get; set; } + public string interCellDmimoSwch { get; set; } + public string coModeISwch { get; set; } + public string defaultSpecShareState { get; set; } + public string prachMrcIrcSwch { get; set; } + public string ulMMNewTransNumAdaptSwch { get; set; } + public string atmosphericQuitPerid { get; set; } + public string rbRatioLowThr4Mod1 { get; set; } + public string atmosphericSwch { get; set; } + public string mMMuAmcBitmap { get; set; } + public string atmosphericSeqDemAntNum { get; set; } + public string prruStatisticsSwitch { get; set; } + public string flagSwiModeUl { get; set; } + public string mmTM7UserThrMed2High { get; set; } + public string matrixType { get; set; } + public string muPrbUsagePeriodUl { get; set; } + public string mmTM7UserThrHigh2Med { get; set; } + public string netShareULRBRatioSwch { get; set; } + public string cqiExpiredTimer { get; set; } + public string mmMayerThrHigh2MedUl { get; set; } + public string maxMCSUl { get; set; } + public string isCompressed { get; set; } + public string highPrbEstimForMuMimoUl { get; set; } + public string tmmAntCombTypeUl { get; set; } + public string coModePSwch { get; set; } + public string bandIndicator { get; set; } + public string ratioShared { get; set; } + public string configDRXTimerForHO { get; set; } + public string reTxExpandStreamSwch { get; set; } + public string dssBandAdaptNSASwch { get; set; } + public string case5RatioACSwch { get; set; } + public string maxMCSDl { get; set; } + public string phsNIInd { get; set; } + public string puschChEstType { get; set; } + public string case5PlmnGroupRecoverThrd { get; set; } + public string edgeUeAmcOLOptSwitch { get; set; } + public string tATConsistencySwch { get; set; } + public string energySavControl { get; set; } + public string ulTranSchemeSet { get; set; } + public string dlPRBTrd4AtmosDataMig { get; set; } + public string rBShareRatio4OprGrp { get; set; } + public string avoidFreqOffsetNISwch { get; set; } + public string lowPrbEstimForMuMimoUl { get; set; } + public string allowFreq4SpecIMEISVSwch { get; set; } + public string mmTMAlgCellloadSwch { get; set; } + public string muMimoPriorSwchUl { get; set; } + public string mmPRBThrLow2MedHighDl { get; set; } + public string plmnGroupIndex { get; set; } + public string case5CongPunishPeriod { get; set; } + public string accMCSEnableSwchDl { get; set; } + public string tm9TM10TbsAltSwch { get; set; } + public string mmMayerThrMed2HighUl { get; set; } + public string accMCSEnableSwchUl { get; set; } + public string nRRatBlindRedStgy { get; set; } + public string commCCENumDl { get; set; } + public string mmMuUEThrLow2MedHigh { get; set; } + public string atmosphericSeqDemParaThres { get; set; } + public string sampleRateCfg { get; set; } + public string scUERSActiveSetThrDl { get; set; } + public string ratioOperatorn { get; set; } + public string ulMMRetransNumAdaptSwch { get; set; } + public string qosAdpSwchUL { get; set; } + public string networkSharingOptSwch { get; set; } + public string tm39McsThrAntSelct8TX { get; set; } + public string reservedPara8 { get; set; } + public string maxUeRbNumDl { get; set; } + public string reservedPara9 { get; set; } + public string atmosDuctMethod { get; set; } + public string narrowInterferenceLen { get; set; } + public string enSrsPhrPrecisionSwch { get; set; } + public string ambrLimtSwch { get; set; } + public string reservedPara1 { get; set; } + public string mMMultiAmcSwch { get; set; } + public string reservedPara2 { get; set; } + public string refPlmn { get; set; } + public string srRBNumAuthMode { get; set; } + public string reservedPara3 { get; set; } + public string reservedPara4 { get; set; } + public string reservedPara5 { get; set; } + public string largeFreqOffEstSwchUl { get; set; } + public string highFreCutRbNumDL { get; set; } + public string reservedPara6 { get; set; } + public string qosAdpSwchDL { get; set; } + public string atmosphericPAPRThres { get; set; } + public string reservedPara7 { get; set; } + public string pGBRSwch { get; set; } + public string blerAdaptSwitch4IncBler { get; set; } + public string maxUeRbNumUl { get; set; } + public string magicRadioMaxBandWidth { get; set; } + public string mimoScenarios { get; set; } + public string tm44T4RSwch { get; set; } + public string bandWidth { get; set; } + public string atmoIDDectNumThershold { get; set; } + public string atmosphericGrdNiThresUl { get; set; } + public string closeFrameRatio { get; set; } + public string tM9OpenloopOptSwch { get; set; } + public string atmosphericSupresThres { get; set; } + public string atmosphericDetecWaySwch { get; set; } + public string amc4GeneralQosSwchUl { get; set; } + public string qcellPosiSwch { get; set; } + public string rbRatioHighThr4Mod1 { get; set; } + public string upInterfFreqEffThr { get; set; } + public string oldCellId { get; set; } + public string nB { get; set; } + public string preScheUEAccessSwitchUl { get; set; } + public string tac { get; set; } + public string tm38McsThrAntSelct4TX { get; set; } + public string buildPhyLocation { get; set; } + public string eSState { get; set; } + public string blockHighThr { get; set; } + public string aggreModeSelectSwch { get; set; } + public string longitude { get; set; } + public string voLTESwch { get; set; } + public string nCSpeedJudgeSwch { get; set; } + public string isFddSDMAEnable4DMDL { get; set; } + public string cellCapaLeveInd { get; set; } + public string analysisNrCapSwch { get; set; } + public string tm93TestMcsThrAntSelct4TX { get; set; } + public string relatedCellLocalId { get; set; } + public string atmosphericSupresQuitPerid { get; set; } + public string ulPRBTrd4AtmosDataMig { get; set; } + public string case5CongStarThrdUl { get; set; } + public string case5GuaranteedGBR { get; set; } + public string isFddSDMAEnable4DMUL { get; set; } + public string tddDmimoSwch { get; set; } + public string lAADRSSwch { get; set; } + public string enhancedSiSchedulingSwch { get; set; } + public string gLDBENonStdSupport { get; set; } + public string atmosphericNoLoadThres { get; set; } + public string iCo4PubAndHwPriSwch { get; set; } + public string case5CongStarThrdDl { get; set; } + public string tm83TestMcsThrAntSelct4TX { get; set; } + public string configDRXTimerForConnect { get; set; } + public string aggModeUserRatioThrd { get; set; } + public string altitude { get; set; } + public string atmosDataULSINRProtectTrd { get; set; } + public string mbmsSvcAreaIDList { get; set; } + public string highBllrCntThr4VOIPUl { get; set; } + public string atmosphericSRSMovSwch { get; set; } + public string atmosphericSeqContThres1 { get; set; } + public string cellSize { get; set; } + public string atmosphericSeqContThres3 { get; set; } + public string cbpSwch { get; set; } + public string atmosphericSeqContThres2 { get; set; } + public string coModeBSwch { get; set; } + public string atmosphericSeqJontThres { get; set; } + public string ueAbsoluteSignalThr { get; set; } + public string atmosductVoLTETimer { get; set; } + public string ueTransModeTDD { get; set; } + public string forceEdgeUeToMultANSwch { get; set; } + public string alias { get; set; } + public string mbmsCCEAdaptMod { get; set; } + public string pubAndHwPriOvlpRbNumUL { get; set; } + public string closeFrameOffset { get; set; } + public string blockUserBlerAdaptSwch { get; set; } + public string mmSchUEThrLow2MedHigh { get; set; } + public string earfcn { get; set; } + public string specialSfPatterns { get; set; } + public string testState { get; set; } + public string muMIMO4MultiUESwchUl { get; set; } + public string pubAndHwPriOvlpRbStartPosDL { get; set; } + public string addiFreqBand { get; set; } + public string atmosDataQualSampPriod { get; set; } + public string cellHeavyLoadFlag { get; set; } + public string tbs33bAltSwch { get; set; } + public string rd4ForCoverage { get; set; } + public string pubAndHwPriOvlpRbNumDL { get; set; } + public string drxSleepJudgeOptSwch { get; set; } + public string coModeIConfig { get; set; } + public string mumimoEnableUl { get; set; } + public string highSpeedThr4Normal { get; set; } + public string mmPRBThrMedHigh2LowDl { get; set; } + public string blockLowThr { get; set; } + public string pb { get; set; } + public string blockFilterCoef { get; set; } + public string ldn { get; set; } + public string flagSwiMode { get; set; } + public string filteFactor4SRMode1 { get; set; } + public string tmmSrsConfidenceSwch { get; set; } + public string highBllrCntThr4VOIPDl { get; set; } + public string sceneCfg { get; set; } + public string dlDeltaMCS4Release { get; set; } + public string tM9FeedbackAdaptNonCASwch { get; set; } + } + public class ExternalEUtranCellFDDLTE + { + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string freqBandInd { get; set; } + public string earfcnDl { get; set; } + public string algLTEFDDRsved1 { get; set; } + public string latitude { get; set; } + public string cellLocalId { get; set; } + public string nbrEnDcAnchorInd { get; set; } + public string mcc { get; set; } + public string cellMbsfnAtt { get; set; } + public string massiveMIMOInd { get; set; } + public string esCellNum { get; set; } + public string rsrpThrPrachInfoList { get; set; } + public string earfcnUl { get; set; } + public string pci { get; set; } + public string tac { get; set; } + public string bandWidthUl { get; set; } + public string alias { get; set; } + public string buildPhyLocation { get; set; } + public string voLTESwch { get; set; } + public string freqBandPriSwch { get; set; } + public string longitude { get; set; } + public string mnclist { get; set; } + public string mnc { get; set; } + public string antPort1 { get; set; } + public string addiFreqBand { get; set; } + public string mocName { get; set; } + public string bandWidthDl { get; set; } + public string eNBId { get; set; } + public string emtcSwch { get; set; } + public string freqBandPriInd { get; set; } + public string moId { get; set; } + public string cellType { get; set; } + public string ldn { get; set; } + public string mcclist { get; set; } + } + + public class ManagedElement + { + public string userLabel { get; set; } + public string adminStateGSM { get; set; } + public DateTime lastModifiedTime { get; set; } + public string swVersion { get; set; } + public string rfSwmMsConfig { get; set; } + public string managedElementType { get; set; } + public string cnfName { get; set; } + public string latitude { get; set; } + public string adminStateUMTS { get; set; } + public string adminStateLTEFDD { get; set; } + public string cnfNamespace { get; set; } + public string adminState { get; set; } + public string adminStateLTETDD { get; set; } + public string productType { get; set; } + public string longitude { get; set; } + public string deployNodeType { get; set; } + public string xcMEId { get; set; } + public string mimVersion { get; set; } + public string locationName { get; set; } + public string mocName { get; set; } + public string userDefinedState { get; set; } + public string vendorName { get; set; } + public string moId { get; set; } + public string cnfId { get; set; } + public string masterNodeId { get; set; } + public string adminStateNBIoT { get; set; } + public string nfTypes { get; set; } + public string ldn { get; set; } + public string mimType { get; set; } + public string isRedundancyMode { get; set; } + public string autoGetGeographicPos { get; set; } + public string sharedDeviceEnvParaSwitch { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCellMeasGroupLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCellMeasGroupLTE.cs new file mode 100644 index 00000000..3c14c875 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultCellMeasGroupLTE.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultCellMeasGroupLTE + { + public string returnMeasCfgBaseService { get; set; } + public string sAInterFHOMeasCfg { get; set; } + public string enDcIntraFHOMeasCfg { get; set; } + public string interFHOMeasCfg { get; set; } + public string enDcOpeRatVoiceMeasCfg { get; set; } + public string compMeasCfgDL { get; set; } + public string highSpeedInNmlCellMeasCfg { get; set; } + public string opeRatVoiceMeasCfg { get; set; } + public string measCfg4movUE { get; set; } + public string closeEnPcellAnchInterFMeas { get; set; } + public string macro2SmallMeasCfg { get; set; } + public string openInterFMeasCfg { get; set; } + public string tdsLBMeasCfg { get; set; } + public string wCDMAFHOMeasCfg { get; set; } + public string caOptBandCombHoMeasCfg { get; set; } + public string eMTCOpenRdMeasCfg { get; set; } + public string rrcAccessLBMeasCfg { get; set; } + public string clseMTCInterFMeasCfg { get; set; } + public string cELevel3ToCELevel2 { get; set; } + public string mocName { get; set; } + public string sAOpeRatFMeasCfg { get; set; } + public string intraLBMeasExtCfg { get; set; } + public string openRedMeasCfg { get; set; } + public string magicRadioGERANMeasCfg4movUE { get; set; } + public string cdmaANRMeasCfg { get; set; } + public string pcellMeasCfg { get; set; } + public string sPIDSmtNetDistRedMeasCfg { get; set; } + public string anrMeasCfg { get; set; } + public string sAIntraFHOMeasCfg { get; set; } + public string activeLWACMeasCfg { get; set; } + public string geranMeasCfg { get; set; } + public string clsInterFVoiceMeasCfg { get; set; } + public string modeAToModeBCELevel2 { get; set; } + public string interFMeasCfgBaseService { get; set; } + public string clseMTCIntraFMeasCfg { get; set; } + public string endcAnchSrvNrCovMeasCfg { get; set; } + public string nRSNRatAddMeasCfg { get; set; } + public string sAOpeInterFMeasCfg { get; set; } + public string cELevel0ToCELevel1 { get; set; } + public string migBaseUEPosiInterFMeasCfg { get; set; } + public string modeBToModeACELevel1 { get; set; } + public string enDcClsInterFMeasCfg { get; set; } + public string cdma2K1xMeasCfg { get; set; } + public string enDcOpeInterFMeasCfg { get; set; } + public string clsRatVoiceMeasCfg { get; set; } + public string enDcOpeInterFVoiceMeasCfg { get; set; } + public string wcdmaLBMeasCfg { get; set; } + public string interFPeriodMeasCfg { get; set; } + public string rsrpEventMeasCfgIdDl { get; set; } + public string homePLMNeasCfg { get; set; } + public string nRMeasCfg { get; set; } + public string interRatGSMPeriodMeasCfg { get; set; } + public string wcdmaSRVCCBasVoLTECongMeasCfg { get; set; } + public string cEModeToCEleve0 { get; set; } + public string anrA2MeasCfg { get; set; } + public string moId { get; set; } + public string judgeCEUMeasCfg { get; set; } + public string nRRptCGIMeasCfg { get; set; } + public string deactiveLWACMeasCfg { get; set; } + public string addSCellMeasCfgIdx { get; set; } + public string opeeMTCIntraFMeasCfg { get; set; } + public string enDcAnchHOMeasCfg { get; set; } + public string intraFPeriodMeasCfg { get; set; } + public string eICICMeasCfg { get; set; } + public string crsICMeasCfg { get; set; } + public string cSSGERANPeriodMeasCfg { get; set; } + public string gsmCSFBMeasCfg { get; set; } + public string lowSpeedInHighwayMeasCfg { get; set; } + public string modScellMeasCfg { get; set; } + public string caEICICMeasCfg { get; set; } + public string geranANRMeasCfg { get; set; } + public string openRatFMeasCfg { get; set; } + public string openEnPcellAnchInterFMeas { get; set; } + public string sADirectMigMeasCfg { get; set; } + public string geranSRVCCBaVoLTEQuMeCfg { get; set; } + public string rmvSCellMeasCfgIdx { get; set; } + public string icicMeasCfg { get; set; } + public string wCDMAFHOVoLTEQuaMeasCfg { get; set; } + public string periodCdmaMeasCfg { get; set; } + public string wcdmaMeasCfg { get; set; } + public string rsrpPeriodMeasCfgIdDl { get; set; } + public string cdma2K1xCSFBMeasCfg { get; set; } + public string eMBMSMobMeasCfg { get; set; } + public string opeeMTCInterFMeasCfg { get; set; } + public string tdCSFBMeasCfg { get; set; } + public string geranPRBUsageRatioMeasCfg { get; set; } + public string closedInterFMeasCfg { get; set; } + public string enPcellAnchHighPrioHOMeas { get; set; } + public string enPcellAnchLowPrioHOMeas { get; set; } + public string utranANRMeasCfg { get; set; } + public string tdsSRVCCBasedVoLTECongMeasCfg { get; set; } + public string enDcClsRatMeasCfg { get; set; } + public string interRatUTRANPeriodMeasCfg { get; set; } + public string sAClsInterFMeasCfg { get; set; } + public string intraLBMeasCfg { get; set; } + public string geranSRVCCBasVoLTECongMeasCfg { get; set; } + public string interFHOBasedVoLTEQuaMeasCfg { get; set; } + public string eMTCInterFHOMeasCfg { get; set; } + public string tdMeasCfg { get; set; } + public string cdma2KHRPDMeasCfg { get; set; } + public string wcdmaCSFBMeasCfg { get; set; } + public string hSpeedIntraFSpecMeasCfg { get; set; } + public string meaGroupId { get; set; } + public string handOverBasedULSRVMeasCfg { get; set; } + public string userLabel { get; set; } + public DateTime lastModifiedTime { get; set; } + public string sAClsNRMeasCfg { get; set; } + public string rptCGIMeasCfg { get; set; } + public string caSpecCoordHoMeasCfg { get; set; } + public string ueRxTxTimeDiffPeriodMeasCfg { get; set; } + public string atmosWorseDataMigMeaCfg { get; set; } + public string cdmaSRVCCBasedVoLTEQuaMeasCfg { get; set; } + public string enDcOpeRatFMeasCfg { get; set; } + public string emtcIntraFHOMeasCfg { get; set; } + public string magicRadioWCDMAMeasCfg4movUE { get; set; } + public string tdsSRVCCBasedVoLTEQuaMeasCfg { get; set; } + public string enDcClsRatVoiceMeasCfg { get; set; } + public string sAOpeNRMeasCfg { get; set; } + public string small2MacroMeasCfg { get; set; } + public string overlapInterFPeriodMeasCfg { get; set; } + public string caJointDecisionSCCDelMeas { get; set; } + public string enDcClsInterFVoiceMeasCfg { get; set; } + public string clsRatMeasCfg { get; set; } + public string dLBigSRVHOMeasCfg { get; set; } + public string enterModeBCELevel3 { get; set; } + public string sAClsRatMeasCfg { get; set; } + public string opeInterFVoiceMeasCfg { get; set; } + public string puschOIPowConMeasCfg { get; set; } + public string openRdVoiceMeasCfg { get; set; } + public string intraFHOMeasCfg { get; set; } + public string enDcInterFHOMeasCfg { get; set; } + public string endcAnchNbrNrCovMeasCfg { get; set; } + public string tmmINCMeasCfg { get; set; } + public string epsFBEndFRMeasCfg { get; set; } + public string ldn { get; set; } + public string caOvelaInFEveMeasCfg { get; set; } + public string judgeCCUMeasCfg { get; set; } + public string migBaseUEPosiWCDMAMeasCfg { get; set; } + public string compMeasCfgUL { get; set; } + public string gsmLBMeasCfg { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEUtranCellMeasFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEUtranCellMeasFDDLTE.cs new file mode 100644 index 00000000..df1569f5 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEUtranCellMeasFDDLTE.cs @@ -0,0 +1,253 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultEUtranCellMeasFDDLTE + { + public string wcdmaEcNoThr4DT { get; set; } + public string refCellMeasGroupLTE { get; set; } + public string tarNeighCellRsrqThr { get; set; } + public string anrMeasMicroCellSwch { get; set; } + public string lbNSAIntraFreqPriority { get; set; } + public string filterCoeffRsrp { get; set; } + public string tarNeighCellVTRsrpThr { get; set; } + public string filterCoeffRsrq { get; set; } + public string sAIndependentMeasCfgSwch { get; set; } + public string multiPLMNLocStCSFB { get; set; } + public string sADirectMigMaxRetryNum { get; set; } + public string bigSRVHOTargetTypeDL { get; set; } + public string migBaseUEPositionSwch { get; set; } + public string minSampNumOverlapRate { get; set; } + public string perQCIInterRATMeaGrpCfg { get; set; } + public string psInterFMeasStrategy { get; set; } + public string tarNeighRsrqThr4HoBasedVoice { get; set; } + public string qAdjBasedBfGainSwch { get; set; } + public string interFandInterR { get; set; } + public string srvccPingPongHOSwch { get; set; } + public string mocName { get; set; } + public string nSAOcs { get; set; } + public string spidStrategyGrpCfg { get; set; } + public string bigSRVHOULPRBStartThrdUL { get; set; } + public string sPIDDataMeasFreqStgy { get; set; } + public string bigSRVHO4WorseQualUEIndUL { get; set; } + public string migBaseUEPosiWhr4Rat { get; set; } + public string epsFBEndFastReturnSwch { get; set; } + public string sAImmciSubPrioSwch { get; set; } + public string IntraRATPinPonCIOStep { get; set; } + public string srvccBasedVoLTEQualitySwch { get; set; } + public string speedRangeStep4MM { get; set; } + public string uePosiMeasSwch { get; set; } + public string maxUserNum4Overlap { get; set; } + public string emtcCovHOSwch { get; set; } + public string nRInterRATMeasStrategy { get; set; } + public string lbIntraFreqPriority { get; set; } + public string migBasePosiWheConQCIRel { get; set; } + public string lbMaxHOCell { get; set; } + public string wcdmaHOBasedRscpandEcNoSwch { get; set; } + public string interRatGsmPeriodMeasSwitch { get; set; } + public string whrSpeUE4MigBasePosition { get; set; } + public string enDcPerQCIA1A2MeaGrpCfg { get; set; } + public string highSpeedThr { get; set; } + public string hoBasedSpeedSwch { get; set; } + public string bigSRVHO4WorseQualUEIndDL { get; set; } + public string filterCoeffNR { get; set; } + public string uLSINRBasedRdUERecTimer { get; set; } + public string endcPccIntraFreqPrio { get; set; } + public string geranCarriFreqNum { get; set; } + public string handover4AtmosductCell { get; set; } + public string bigSRVHO4FormalNbIndUL { get; set; } + public string enDcPerQCIIntraFMeaGrpCfg { get; set; } + public string sADirectMigMethod { get; set; } + public string wcdmaEcNoThr4VT { get; set; } + public string moId { get; set; } + public string geranAnrArfcn { get; set; } + public string atmosphericDataSINR { get; set; } + public string nbrCelThrIntrFOverlap { get; set; } + public string csfbMethdofUMTS { get; set; } + public string icoCellType { get; set; } + public string bigSRVHOTargetDLPRBThrdDL { get; set; } + public string timeOfShortHO { get; set; } + public string qCILevelHOBaseULBigSRV { get; set; } + public string interFPeriodMeasSwitch { get; set; } + public string intraRATPingPongHODetTimeLen { get; set; } + public string hoBasedRSRPandRSRQSwch { get; set; } + public string overlapRateInterFreqSwch { get; set; } + public string minStayTimeInSC { get; set; } + public string srvCellArrJudgeStgySwch { get; set; } + public string cdmaCarriFreqNum { get; set; } + public string csfbCEUUserMcsThrd { get; set; } + public string interFreqNum { get; set; } + public string csfbMeasure { get; set; } + public string hlMigrtRATPriority { get; set; } + public string wCDMAFHOMeasCfgSwch { get; set; } + public string geranBandAnrMeas { get; set; } + public string hoBaseServiceReturnSwch { get; set; } + public string sRVCCBasedCSFBSwch { get; set; } + public string bigSRVHODLPRBStartThrdDL { get; set; } + public string sADirectIMMCIEffectRange { get; set; } + public string migBasePosiFilterEnDcInd { get; set; } + public string umtsMeaObjUpdateSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mCSWorseThrdDL { get; set; } + public string uESpeedIndCompJudgeSwch { get; set; } + public string perQCIA1A2MeaGrpCfg { get; set; } + public string sRVCCBasedCSFBMeasTimer { get; set; } + public string overlapRateThr4SameCover { get; set; } + public string atmosphericVoiceSINR { get; set; } + public string qCILevelMigBasePosiInd { get; set; } + public string bigSRVHOUENumStartThrdDL { get; set; } + public string blindA2Strategy { get; set; } + public string lowSpeedThr { get; set; } + public string trigQuaofTarCellOrder { get; set; } + public string sPIDVoiceMeasFreqStgy { get; set; } + public string methodLTEtoUTRAN { get; set; } + public string operSpecUserIMMCISwch { get; set; } + public string qosCfgBySpeedIndSwchUl { get; set; } + public string pingPongTmr { get; set; } + public string meas4HOBasedVoLTEQual { get; set; } + public string speedMeasureSwch { get; set; } + public string tarNeighCellVTRsrqThr { get; set; } + public string periodMeasGnssSwitch { get; set; } + public string srvCelThrInterFOverlap { get; set; } + public string qosCfgBySpeedIndSwchDl { get; set; } + public string caPcellMeasure { get; set; } + public string uENumThr4HOBaseService { get; set; } + public string multiPLMNLocSt4RdSwch { get; set; } + public string eventMeasGnssSwitch { get; set; } + public string pingPongThres4Macro2Small { get; set; } + public string voiceAdmtSwch { get; set; } + public string intraRATPingPongHOSwch { get; set; } + public string trainOutjudgeThr { get; set; } + public string schedInEcgiHoSwch { get; set; } + public string hOBaseServFilterEnDcInd { get; set; } + public string bigSRVHOWhr4HOinScenDL { get; set; } + public string macrotSmallForbidTime { get; set; } + public string speedHoFreqSelOptSwch { get; set; } + public string srvccInterFMeasStrategy { get; set; } + public string maxSRVCCPingPongHONum { get; set; } + public string hOBaseServiceWhr4HOinScen { get; set; } + public string servCellRsrqThr { get; set; } + public string epsFBEndFRMethod { get; set; } + public string utranCarriFreqNum { get; set; } + public string measType4CASelfCfg { get; set; } + public string interRATNoHOCellRedSwch { get; set; } + public string measureThresh { get; set; } + public string methodLTEtoNR { get; set; } + public string bigSRVHOLoadObDLPRBThrdDL { get; set; } + public string ocs { get; set; } + public string methodLTEtoGSM { get; set; } + public string csfbMethdofCDMA { get; set; } + public string sAPerQCIIntraFMeaGrpCfg { get; set; } + public string interRatCdmaPeriodMeasSwch { get; set; } + public string wCDMARscpThr4VT { get; set; } + public string anrMeaUmtsNbrSortSwch { get; set; } + public string srvCelThrIntrFOverlap { get; set; } + public string utranPciEcNoThrd { get; set; } + public string csfbMethodofGSM { get; set; } + public string geranAnrArfcnNum { get; set; } + public string bigSRVHO4MMCellIndUL { get; set; } + public string overlapRateIntraFreqSwch { get; set; } + public string intraFMeasBW { get; set; } + public string quantityFddUtra { get; set; } + public string nbrCelOffsIntrFOverlap { get; set; } + public string tarNeighCellRsrpThr4LB { get; set; } + public string intraRATNoHOCellRedSwch { get; set; } + public string uLSINRBasedRdThrd { get; set; } + public string bigSRVHOTargetULPRBThrdUL { get; set; } + public string sAPerQCIA1A2MeaGrpCfg { get; set; } + public string csfbVagueUserLocation { get; set; } + public string bigSRVHO4MMCellIndDL { get; set; } + public string r8r9UnsuptEutraFreqs { get; set; } + public string speedRangeStep4Macro { get; set; } + public string hOBaseServiceMaxRetryNum { get; set; } + public string crsRsrp6RBSwch { get; set; } + public string operSpecUserStgySwch { get; set; } + public string nbrCelOffsInteFOverlap { get; set; } + public string hOBaseServiceRetryTimer { get; set; } + public string cSFBbaseLAI { get; set; } + public string eMTCCEAdaptHOSwch { get; set; } + public string qCILevelMigBaseSA { get; set; } + public string bigSRVHOSwchDL { get; set; } + public string filCoeUtran { get; set; } + public string lastTimerExpMeaRecfg { get; set; } + public string perQCIRedA2MeaGrpCfg { get; set; } + public string bigSRVHOWhrConsidNbLoadUL { get; set; } + public string uLSINRBasedRdSwch { get; set; } + public string intraRATHObasedLoadSwch { get; set; } + public string sADirectImmciSpidSwch { get; set; } + public string uLSINRLowThrd { get; set; } + public string qci1RedSwch { get; set; } + public string intraRATUnkPCIRedSwch { get; set; } + public string trainInjudgeThr { get; set; } + public string maxIntraRATPingPongHONum { get; set; } + public string servCellRsrpThr { get; set; } + public string neighCellConfig { get; set; } + public string interFHOBasedVoLTEQualSwch { get; set; } + public string overlapSrvRSRPThr { get; set; } + public string macroSmallIntraFreqMeasSwch { get; set; } + public string netWorkControlOrder { get; set; } + public string hoBasedeMBMSSwch { get; set; } + public string operSpecUserStgyGroupId { get; set; } + public string uLSINRBasedRdUERecFactor { get; set; } + public string sINRWorseThrdUL { get; set; } + public string tarNeighCellRsrqThr4LB { get; set; } + public string perQCIMeasSwch { get; set; } + public string bigSRVHOMeasTimerDL { get; set; } + public string bigSRVHOFilterEnDcIndDL { get; set; } + public string multiPLMNLocSt4PSSwch { get; set; } + public string hoBasedSpeedWhrRefArrStat { get; set; } + public string speedFreqOffThr { get; set; } + public string perQCIIntraFreqMeaGrpCfg { get; set; } + public string overlapRateUpdateDThr { get; set; } + public string bigSRVHOFilterEnDcIndUL { get; set; } + public string qCILevelHOBaseDLBigSRV { get; set; } + public string interRatUtranPeriodMeasSwitch { get; set; } + public string measScaleFactor { get; set; } + public string mediumSpeedUserInd { get; set; } + public string sADirectMigRetryTimer { get; set; } + public string bigSRVHOLoadObULPRBThrdUL { get; set; } + public string gapDelay { get; set; } + public string freqRandomSwch { get; set; } + public string hoCandCelNum { get; set; } + public string perQCIStrategyGrpCfg { get; set; } + public string multiPLMNLocSt4ReestabSwch { get; set; } + public string intraFPeriodMeasSwitch { get; set; } + public string algRsved1 { get; set; } + public string dualMeasSwitch { get; set; } + public string hoBaseServiceSwch { get; set; } + public string bigSRVHOLoadObUENumThrdDL { get; set; } + public string diffA1Swch { get; set; } + public string filterCoeffGera { get; set; } + public string caReselIntraFreqPriority { get; set; } + public string voLTEMeasFreqStgy { get; set; } + public string tarNRsrpThr4HOBasedVoice { get; set; } + public string csfbBldRedRanSharePlcy { get; set; } + public string srvccPingPongHODetTimeLen { get; set; } + public string wCDMARscpThr4DT { get; set; } + public string bigSRVHOLoadObUENumThrdUL { get; set; } + public string direHOBasedHSpeedSwch { get; set; } + public string nSAAndSAStgyCfg { get; set; } + public string sADirectIMMCIRATPri { get; set; } + public string whrSpeUE4ULBigSRVHO { get; set; } + public string hSpeedSRPriSchdSwch { get; set; } + public string sADirectIMMCISwch { get; set; } + public string uLSINRHighThrd { get; set; } + public string pingPongHoSwitch { get; set; } + public string whrSpeUE4BigSRVHODL { get; set; } + public string sADirectMigSwch { get; set; } + public string nbrCelThrInteFOverlap { get; set; } + public string speedJudgeSwch { get; set; } + public string hSpeedSpecMeasCfgSwch { get; set; } + public string tarNeighCellRsrpThr { get; set; } + public string blackListTmpCellRedSwch { get; set; } + public string hoTarCellPRBThrd { get; set; } + public string perQCIMeasCfgStrategy { get; set; } + public string enDcSpecMobilityMeasSwch { get; set; } + public string ldn { get; set; } + public string sceneOfRanShare { get; set; } + public string sAImmciFreqRamSwch { get; set; } + public string blindRedBasedVTQualSwch { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreq.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreq.cs new file mode 100644 index 00000000..334f8c88 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreq.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultEutranFreq + { + public string freqBand { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + public double frequency { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreqRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreqRelation.cs new file mode 100644 index 00000000..72a52a0b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultEutranFreqRelation.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultEutranFreqRelation + { + public DateTime lastModifiedTime { get; set; } + public string refEutranFreq { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultFrequencyBandList.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultFrequencyBandList.cs new file mode 100644 index 00000000..f62df200 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultFrequencyBandList.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultFrequencyBandList + { + //public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string freqBandIndicator { get; set; } + public int moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGNBCUCPFunction.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGNBCUCPFunction.cs new file mode 100644 index 00000000..b4a21487 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGNBCUCPFunction.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultGNBCUCPFunction + { + public string reserved54 { get; set; } + public string userLabel { get; set; } + public string reserved53 { get; set; } + public string reserved52 { get; set; } + public DateTime lastModifiedTime { get; set; } + public string reserved51 { get; set; } + public string mocName { get; set; } + public string reserved60 { get; set; } + public string pLMNId { get; set; } + public string reserved59 { get; set; } + public string reserved58 { get; set; } + public string reserved57 { get; set; } + public string moId { get; set; } + public string reserved56 { get; set; } + public string reserved256 { get; set; } + public string reserved55 { get; set; } + public string RrcVersion { get; set; } + public string ldn { get; set; } + public string gNBId { get; set; } + public string gNBIdLength { get; set; } + public string NgVersion { get; set; } + public string gNBCUName { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitch.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitch.cs new file mode 100644 index 00000000..3d705008 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitch.cs @@ -0,0 +1,218 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultGlobalSwitch + { + public string unidireThreUl { get; set; } + public string tddFdd3ccCaSwch { get; set; } + public string udcResetProtestSwch { get; set; } + public string enablePaIVDA { get; set; } + public string eNDCAnchorAttriUpdateSwch { get; set; } + public string swichForCpuAC { get; set; } + public string rplcPLMNInRanSharSwch { get; set; } + public string macroMicroCaSwch { get; set; } + public string rFFInterFInfoReportPeriod { get; set; } + public string periodicANRSwitch { get; set; } + public string enbWarnSwch { get; set; } + public string x2PassProcSwch { get; set; } + public string cmasSwch { get; set; } + public string dedctRANSharingSwch { get; set; } + public string lteBlackNbrDbsSwch { get; set; } + public string fddTddCaSwchUL { get; set; } + public string fastCABaseServiceSwch { get; set; } + public string enDcULPsHoSwch { get; set; } + public string interBandCaSwch { get; set; } + public string intraEnbInterPlmnHOSwch { get; set; } + public string mocName { get; set; } + public string caLAAKpiOfEnbCfgSwch { get; set; } + public string erabSwitch { get; set; } + public string fddTdd3ccCaSwch { get; set; } + public string cgiSpecUeSwch { get; set; } + public string sigMdtCdmaPrdMeasSwch { get; set; } + public string unidireThreDl { get; set; } + public string dsDsFuncSwch { get; set; } + public string eDecorSwch { get; set; } + public string nsaInterPeriodMeasSwitch { get; set; } + public string hoBaseFreqPriSwch { get; set; } + public string magicRadioModeSwch { get; set; } + public string utranCsfbSwch { get; set; } + public string dsDsMacCeAckTimer { get; set; } + public string enDcGlPsHoSwitch { get; set; } + public string fairSchdSwch { get; set; } + public string tddFddCaSwch { get; set; } + public string sip100tryingSizeHighThr { get; set; } + public string mfbiSwch { get; set; } + public string tcpProxySwch { get; set; } + public string tcpFluidCtrlSwch { get; set; } + public string sip100tryingSizeLowThr { get; set; } + public string tcpMssModifySwch { get; set; } + public string enbFCErabRejectSwch { get; set; } + public string relScellOnDelaySwch { get; set; } + public string deflateUDCSwch { get; set; } + public string snTransOptSwch { get; set; } + public string rlfKpiReportSwch { get; set; } + public string magicRadioUserMigStrategy { get; set; } + public string moId { get; set; } + public string interFMeasIndDif4VTDTSwch { get; set; } + public string cnUbFtpEnable { get; set; } + public string mMESelec4LteUE { get; set; } + public string cgiMeasSelectCAUeSwch { get; set; } + public string gsmCsfbSwitch { get; set; } + public string tmsiCodecSwch { get; set; } + public string s1TansBackPressureSwch { get; set; } + public string osgEcgiMeasGapRelSwch { get; set; } + public string redirectwithSecuritySwch { get; set; } + public string caMIMOAdptSwch { get; set; } + public string mdtPlmnListSwch { get; set; } + public string eNDCX2AlarmSwch { get; set; } + public string mMESelec4RerouteFail { get; set; } + public string ueCapForcedSaveSwch { get; set; } + public string threeCC2fourCCthr { get; set; } + public string switchForUserInactivity { get; set; } + public string reserved3 { get; set; } + public string tddFdd5ccCaSwch { get; set; } + public string reserved2 { get; set; } + public string reserved7 { get; set; } + public string reserved6 { get; set; } + public string reserved5 { get; set; } + public string reserved4 { get; set; } + public string rFFInfoReportPeriod { get; set; } + public string nrShareMode { get; set; } + public string fddTdd5ccCaSwch { get; set; } + public string caRequestBandSwch { get; set; } + public string swchOfMtcACRest { get; set; } + public string lwaSwch { get; set; } + public string magRaDataUserMigMode { get; set; } + public string sigMdtUtranPrdMeasSwch { get; set; } + public string drxConfig4NormalUEHOSwch { get; set; } + public string mod4MovingUE { get; set; } + public string swicthForHoPartCac { get; set; } + public string uRIMGetLBInfoSwch { get; set; } + public string enableMroAlarm { get; set; } + public string ulBaseStationFDS { get; set; } + public string caScellHOSwch { get; set; } + public string nrMeasGapSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string utranSrvccSwitch { get; set; } + public string interFHOBaseVOIPSwch { get; set; } + public string inBandContCaSwch { get; set; } + public string cssStaticSharingSwitch { get; set; } + public string cont3ccCaSwch { get; set; } + public string sccJudgeOfFSFatSwchUl { get; set; } + public string lbtEnableSwch { get; set; } + public string compJESwchUL { get; set; } + public string interEnbCaSwch { get; set; } + public string cnUbFtpAddr { get; set; } + public string tcpProxyNSASwch { get; set; } + public string twoCC2oneCCthr { get; set; } + public string signalBasedMdtSwch { get; set; } + public string tcpOrderEnable { get; set; } + public string clPsHoSwitch { get; set; } + public string cloudReliaSwch { get; set; } + public string extendedQCISwitch { get; set; } + public string csfbFastenInVoLTESwch { get; set; } + public string inBandInContCaSwch { get; set; } + public string massiveCooperationSwch { get; set; } + public string unidireDetectEnableSwch { get; set; } + public string spidSwitch { get; set; } + public string noLogMdtTkReqLogDataSwch { get; set; } + public string rtpOrderEnable { get; set; } + public string fddTddHoSwitch { get; set; } + public string eNDCX2UpdateOMCSwch { get; set; } + public string compSelMergeSwch { get; set; } + public string mccMaxRetranQueNum { get; set; } + public string algGlobalRsved1 { get; set; } + public string hOBasedNbrStatSwch { get; set; } + public string eMTCHOCeLevelSwch { get; set; } + public string caReduceNonContCombSwch { get; set; } + public string hoToOSGForQCI1Swch { get; set; } + public string refOperatorCert { get; set; } + public string mrMaxOnlineTimeMode { get; set; } + public string glPsHoSwitch { get; set; } + public string ulCOMPCloudIrcSwch { get; set; } + public string tempNBRKpiRptSwch { get; set; } + public string plmnRouteSwch { get; set; } + public string userStateTransSwch { get; set; } + public string tcpAckSplitSwchUl { get; set; } + public string potentialCOMPUserSwch { get; set; } + public string cgiMeasSelQCI1UeSwch { get; set; } + public string enablePciAlarm { get; set; } + public string sigMdtGsmPrdMeasSwch { get; set; } + public string cOMPUserOptSwch { get; set; } + public string etwsRepetitionCheck { get; set; } + public string caMaxCcNumIndSwch { get; set; } + public string psHoSwchUL { get; set; } + public string unidireRecoverySwch { get; set; } + public string macro2SmallPingPSwch { get; set; } + public string eNDCEnhcedAchorpolySwch { get; set; } + public string enDcX2CertType { get; set; } + public string enDcPerQCIMeasWhrScgBear { get; set; } + public string fddTdd4ccCaSwch { get; set; } + public string secRatRptSwch { get; set; } + public string cdmCsfbSwitch { get; set; } + public string nrPciAlarmSwch { get; set; } + public string fddTddCaSwch { get; set; } + public string x2AdjCellDelSwch { get; set; } + public string gsmSrvccSwitch { get; set; } + public string prmtEpcInDenbRnSwch { get; set; } + public string caBandPrioritySwch { get; set; } + public string sipIdentifySwch { get; set; } + public string utranLBSwch { get; set; } + public string sigMdtInterPrdMeasSwch { get; set; } + public string mecsQcellPosiSwitch { get; set; } + public string interEnbReestabSwch { get; set; } + public string loadBalanceMode { get; set; } + public string caBackOffSwch { get; set; } + public string caSkipFallBackCombSwch { get; set; } + public string caMonitorSwch { get; set; } + public string gsmLBSwch { get; set; } + public string jugeMMERelayIndSwch { get; set; } + public string tempNbrULSRVHOSwch { get; set; } + public string ueRecordIdSwitch { get; set; } + public string unidireDetectDura { get; set; } + public string uldlFtpSwch { get; set; } + public string gsmTempNbrHoSwch { get; set; } + public string sMTCWarnSwch { get; set; } + public string etwsSwitch { get; set; } + public string onlyRohcSwchUl { get; set; } + public string tcpAckSplitSwch { get; set; } + public string sib8SysTimeSwch { get; set; } + public string oneCC2twoCCthr { get; set; } + public string x2UpdateOMCSwch { get; set; } + public string ulDataCompSwch { get; set; } + public string x2RebuildSwch { get; set; } + public string hoToOSGSwch { get; set; } + public string decorSwch { get; set; } + public string tempNBRLBSwch { get; set; } + public string potentialDmimoUserSwch { get; set; } + public string priBasedPLMNSwch { get; set; } + public string tddFdd4ccCaSwch { get; set; } + public string utranTempNbrHoSwch { get; set; } + public string bandCompSwch { get; set; } + public string freqSpaceCfgMode { get; set; } + public string movUe4CellBlockSwch { get; set; } + public string SCSdmaSwchUl { get; set; } + public string cdmaSrvccSwitch { get; set; } + public string caDiffFallBackCombSwch { get; set; } + public string nLPsHoSwch { get; set; } + public string interPlmnHOSwch { get; set; } + public string SCSdmaSwchDl { get; set; } + public string gummeiRouteCompSwch { get; set; } + public string sipInviteSizeThr { get; set; } + public string ipsecStatus { get; set; } + public string compMicroAndMacroSwch { get; set; } + public string fourCC2threeCCthr { get; set; } + public string blackNbrSynPrd { get; set; } + public string cCOSwitch { get; set; } + public string cpuLoadMngSwch { get; set; } + public string loadControlSwch { get; set; } + public string manageBasedMdtSwch { get; set; } + public string ldn { get; set; } + public string x2AlarmSwch { get; set; } + public string caFullConfigSwch { get; set; } + public string ranSharSwch { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitchInformation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitchInformation.cs new file mode 100644 index 00000000..18efa742 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultGlobalSwitchInformation.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultGlobalSwitchInformation + { + public string UEContextReqEnable { get; set; } + public string qosMapStrategy { get; set; } + public string ueCapOptimizeSwitch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string depthROHCSwitch { get; set; } + public string mocName { get; set; } + public string dlDataForwardingSwitch { get; set; } + public string xnAlarmSwitch { get; set; } + public string ueMeasRecfgType { get; set; } + public string n26InterfaceEnable { get; set; } + public string moId { get; set; } + public string switchForSecondaryRATDataUsageReport { get; set; } + public string rrcStateFuncCfg { get; set; } + public string n2ReleaseWithPduListSwitch { get; set; } + public string smcF1TransportMode { get; set; } + public string ldn { get; set; } + public string snChangePunishSwitch { get; set; } + public string switchForSrb3Enabled { get; set; } + public string pduIntProtRateLimSwitch { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultInterRATCovHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultInterRATCovHo.cs new file mode 100644 index 00000000..51916486 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultInterRATCovHo.cs @@ -0,0 +1,70 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultInterRATCovHo + { + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2EventId eventId { get; set; } + public string rptAmount { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public double? b2Thrd1Rsrq { get; set; } + public int? b2Thrd1Rsrp { get; set; } + public double b2Thrd1Sinr { get; set; } + public string moId { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string ldn { get; set; } + public double rsrqThreshold { get; set; } + public int rsrpThreshold { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class LTEFreqCovHo + { + public string userLabel { get; set; } + public string eventId { get; set; } + public string rptAmount { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string b2Thrd1Rsrq { get; set; } + public string b2Thrd1Rsrp { get; set; } + public string b2Thrd1Sinr { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string ldn { get; set; } + public string rsrqThreshold { get; set; } + public string maxRptCellNum { get; set; } + public string rsrpThreshold { get; set; } + } + + public class LTEFreqCovHoResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class LTEFreqCovHoRoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasConfig.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasConfig.cs new file mode 100644 index 00000000..ef5bdb55 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasConfig.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultMeasConfig + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasObjEUTRA.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasObjEUTRA.cs new file mode 100644 index 00000000..5df25d5c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMeasObjEUTRA.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultMeasObjEUTRA + { + public string rdFreqPriority { get; set; } + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string offsetFreq { get; set; } + public string epsfbPriority { get; set; } + public string ldn { get; set; } + public string refEutranFreqRelation { get; set; } + public string moId { get; set; } + public string measBandWidth { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMobilityCtrl.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMobilityCtrl.cs new file mode 100644 index 00000000..72b8f1cd --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultMobilityCtrl.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultMobilityCtrl + { + public string hoBaseServiceSwch { get; set; } + public DateTime lastModifiedTime { get; set; } + public string epsfbMeasTimer { get; set; } + public string intraFMacroSmallHoStrategy { get; set; } + public string mobiManageSwitch { get; set; } + public string serviceMigMeasTimer { get; set; } + public string epsfbLtePriMethod { get; set; } + public string intraRatUnkownPciRdSwch { get; set; } + public string lteFreqServiceMigStgy { get; set; } + public string hoAssureServiceList { get; set; } + public string noHoInterRatRdSwitch { get; set; } + public string blindA2Strategy { get; set; } + public string interPLMNIdHOSwch { get; set; } + public string rdRatPriority { get; set; } + public string hoCandiCellNum { get; set; } + public string interRatUnkownPciRdSwch { get; set; } + public string pingPongHoSwitch { get; set; } + public string weakCellForbidVoiceCallSwch { get; set; } + public string mocName { get; set; } + public string pingPongTmr { get; set; } + public string forbiddenPLMNIdList { get; set; } + public string epsfbSwitch { get; set; } + public string moId { get; set; } + public string hoAllowPartAdmSwch { get; set; } + public string ldn { get; set; } + public string gapAdaptiveSwch { get; set; } + public string interFRatA2Strategy { get; set; } + public string voNrSwitch { get; set; } + public string serviceLTERatMigSwch { get; set; } + public string lteFreqServiceMigMethod { get; set; } + public string noHoIntraRatRdSwitch { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRCloseInterFRATHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRCloseInterFRATHo.cs new file mode 100644 index 00000000..f80fa9a2 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRCloseInterFRATHo.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRCloseInterFRATHo + { + public string includeBeamMeasurements { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string moId { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public double rsrqThreshold { get; set; } + public string rptQuantityRsIndex { get; set; } + public int rsrpThreshold { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreq.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreq.cs new file mode 100644 index 00000000..ac4a3350 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreq.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRFreq + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string ssbFrequency { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqParaFDDLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqParaFDDLTE.cs new file mode 100644 index 00000000..ed5135fb --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqParaFDDLTE.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRFreqParaFDDLTE + { + public string nRFreqENDCInd { get; set; } + public string frameBoundaryOffset { get; set; } + public DateTime lastModifiedTime { get; set; } + public string sSBMeasPeriod { get; set; } + public string sADirectIMMCINRFreqPri { get; set; } + public string sSBConsolidationSINRThr { get; set; } + public string nRFreqSAInd { get; set; } + public string sSBConsolidationNumber { get; set; } + public string nRFreqOffset { get; set; } + public string sADirectMigNRFreqPri { get; set; } + public string sSBMeasSubframeOffset { get; set; } + public string nrFreqMeaCfgIndex { get; set; } + public string epsFBEndFRFreqPrio { get; set; } + public string sSBConsolidationRSRQThr { get; set; } + public string eNDCFreqANRInd { get; set; } + public string mocName { get; set; } + public string moId { get; set; } + public string sSBSCS { get; set; } + public string nRFreqPSHOMeasInd { get; set; } + public int sSBToMeasBitmap { get; set; } + public string endcAnchHoMonNRCovFPrio { get; set; } + public string nRFreqRdPriority { get; set; } + public string nRFreqVoLTEHOMeasInd { get; set; } + public string sAPerQCINRMeaGrpCfg { get; set; } + public string ldn { get; set; } + public string nrPSCellFreqPrio { get; set; } + public string nRearfcn { get; set; } + public string sSBMeasDuration { get; set; } + public string systemFrameNumberOffset { get; set; } + public string nRFreqBandInd { get; set; } + public string eNDCFreqANRDelInd { get; set; } + public string sSBConsolidationRSRPThr { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqRelation.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqRelation.cs new file mode 100644 index 00000000..fad4309c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRFreqRelation.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRFreqRelation + { + public DateTime lastModifiedTime { get; set; } + public string mocName { get; set; } + public string refNRFreq { get; set; } + public string ldn { get; set; } + public string moId { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFCovHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFCovHo.cs new file mode 100644 index 00000000..b159c93e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFCovHo.cs @@ -0,0 +1,84 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRInterFCovHo + { + public string includeBeamMeasurements { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public A3_A4_A5EventId eventId { get; set; } + public string rptAmount { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string A5Thrd1Sinr { get; set; } + public double eventOffset { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public int? A5Thrd1Rsrp { get; set; } + public string hysteresis { get; set; } + public double? A5Thrd1Rsrq { get; set; } + public string sinrThreshold { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public double rsrqThreshold { get; set; } + public string maxRptCellNum { get; set; } + public string rptQuantityRsIndex { get; set; } + public int rsrpThreshold { get; set; } + } + + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class UeEUtranMeasurementLTE + { + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string measCfgIdx { get; set; } + public string maxReportCellNum { get; set; } + public string timeToTrigger { get; set; } + public string reportQuantity { get; set; } + public string hysteresis { get; set; } + public string measCfgFunc { get; set; } + public string thresholdOfRSRP { get; set; } + public string thresholdOfRSRQ { get; set; } + public string a6Offset { get; set; } + public string reportAddNeighMeasSwch { get; set; } + public string eventId { get; set; } + public string a5Threshold2OfRSRQ { get; set; } + public string a5Threshold2OfRSRP { get; set; } + public string mocName { get; set; } + public string prdRptRurpose { get; set; } + public string a3Offset { get; set; } + public string reportOnLeaveA6Swch { get; set; } + public string moId { get; set; } + public string reportCriteria { get; set; } + public string reportInterval { get; set; } + public string prdReportInterval { get; set; } + public string reportOnLeave { get; set; } + public string ldn { get; set; } + public string reportAmount { get; set; } + public string prdReportAmount { get; set; } + } + + public class UeEUtranMeasurementLTEResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class UeEUtranMeasurementLTERoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFMeasConfig.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFMeasConfig.cs new file mode 100644 index 00000000..02dea5c9 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRInterFMeasConfig.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRInterFMeasConfig + { + public DateTime lastModifiedTime { get; set; } + public string refNRInterFCovHo { get; set; } + public string mocName { get; set; } + public string refNRPSCellChangeInterF { get; set; } + public string refNRBaseServiceInterFHo { get; set; } + public string ldn { get; set; } + public string refNRInterFMeasObject { get; set; } + public string refNRCaAddSCellA4 { get; set; } + public string moId { get; set; } + public string refNRCaRmvSCellA2 { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRIntraFCovHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRIntraFCovHo.cs new file mode 100644 index 00000000..8c1e5683 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNRIntraFCovHo.cs @@ -0,0 +1,75 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNRIntraFCovHo + { + [JsonProperty("includeBeamMeasurements")] + public string IncludeBeamMeasurements { get; set; } + + [JsonProperty("rptAmount")] + public string RptAmount { get; set; } + + [JsonProperty("lastModifiedTime")] + public DateTime LastModifiedTime { get; set; } + + [JsonProperty("triggerQuantity")] + public string TriggerQuantity { get; set; } + + [JsonProperty("mocName")] + public string MocName { get; set; } + + [JsonProperty("rptQuantityCell")] + public string RptQuantityCell { get; set; } + + [JsonProperty("timeToTrigger")] + public string TimeToTrigger { get; set; } + + [JsonProperty("eventOffset")] + public string EventOffset { get; set; } + + [JsonProperty("moId")] + public string MoId { get; set; } + + [JsonProperty("rptInterval")] + public string RptInterval { get; set; } + + [JsonProperty("hysteresis")] + public string Hysteresis { get; set; } + + [JsonProperty("maxNrofRSIndexToReport")] + public string MaxNrofRSIndexToReport { get; set; } + + [JsonProperty("ldn")] + public string Ldn { get; set; } + + [JsonProperty("maxRptCellNum")] + public string MaxRptCellNum { get; set; } + + [JsonProperty("rptQuantityRsIndex")] + public string RptQuantityRsIndex { get; set; } + } + public class NRIntraFCovHo + { + public string includeBeamMeasurements { get; set; } + public string userLabel { get; set; } + public string rptAmount { get; set; } + public string startCHOFirstA3Offset { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string eventOffset { get; set; } + public string moId { get; set; } + public string rptInterval { get; set; } + public string hysteresis { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public string maxRptCellNum { get; set; } + public string rptQuantityRsIndex { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFHo.cs new file mode 100644 index 00000000..c60e4169 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFHo.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNROpenInterFHo + { + public string includeBeamMeasurements { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string timeToTrigger { get; set; } + public string moId { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public double rsrqThreshold { get; set; } + public string rptQuantityRsIndex { get; set; } + public double rsrpThreshold { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFRATHo.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFRATHo.cs new file mode 100644 index 00000000..6ccbd517 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNROpenInterFRATHo.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNROpenInterFRATHo + { + public string includeBeamMeasurements { get; set; } + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string mocName { get; set; } + public string rptQuantityCell { get; set; } + public string timeToTrigger { get; set; } + public string moId { get; set; } + public string hysteresis { get; set; } + public string sinrThreshold { get; set; } + public string maxNrofRSIndexToReport { get; set; } + public string ldn { get; set; } + public double rsrqThreshold { get; set; } + public string rptQuantityRsIndex { get; set; } + public int rsrpThreshold { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNrRatMeasCfgLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNrRatMeasCfgLTE.cs new file mode 100644 index 00000000..e7fa9c6e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultNrRatMeasCfgLTE.cs @@ -0,0 +1,88 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultNrRatMeasCfgLTE + { + public DateTime lastModifiedTime { get; set; } + public double rSRQNRTrd { get; set; } + public string trigTime { get; set; } + public string prdRptAmount { get; set; } + public string rpRSIndexSwch { get; set; } + public string hysteresis { get; set; } + public string rpQuantityNRbitmap { get; set; } + public string sSBRpQuantityNRbitmap { get; set; } + public string measCfgFunc { get; set; } + public string nRRatMeasCfgIdx { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2_W1_W2_W3EventId evtId { get; set; } + public string rptCriteria { get; set; } + public string evtRptInterval { get; set; } + public string maxReportRSIndex { get; set; } + public string prdRptInterval { get; set; } + public string reportOnleave { get; set; } + public int rsrpSrvTrd { get; set; } + public string evtRptAmount { get; set; } + public string mocName { get; set; } + public int rSRPNRTrd { get; set; } + public string moId { get; set; } + public string quantityNR { get; set; } + public string sINRNRTrd { get; set; } + public string eutranMeasQuan { get; set; } + public string ldn { get; set; } + public double rsrqSrvTrd { get; set; } + public string maxRptCellNum { get; set; } + } + // Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); + public class NrRatMeasCfgLTE + { + public DateTime lastModifiedTime { get; set; } + public string rSRQNRTrd { get; set; } + public string trigTime { get; set; } + public string prdRptAmount { get; set; } + public string rpRSIndexSwch { get; set; } + public string hysteresis { get; set; } + public string rpQuantityNRbitmap { get; set; } + public string sSBRpQuantityNRbitmap { get; set; } + public string measCfgFunc { get; set; } + public string nRRatMeasCfgIdx { get; set; } + public string evtId { get; set; } + public string rptCriteria { get; set; } + public string evtRptInterval { get; set; } + public string maxReportRSIndex { get; set; } + public string prdRptInterval { get; set; } + public string reportOnleave { get; set; } + public string rsrpSrvTrd { get; set; } + public string evtRptAmount { get; set; } + public string mocName { get; set; } + public string rSRPNRTrd { get; set; } + public string moId { get; set; } + public string quantityNR { get; set; } + public string sINRNRTrd { get; set; } + public string eutranMeasQuan { get; set; } + public string ldn { get; set; } + public string rsrqSrvTrd { get; set; } + public string maxRptCellNum { get; set; } + } + + public class NrRatMeasCfgLTEResult + { + public List moData { get; set; } + public string ManagedElementType { get; set; } + public string ne { get; set; } + } + + public class NrRatMeasCfgLTERoot + { + public int code { get; set; } + public string message { get; set; } + public List result { get; set; } + public List failList { get; set; } + } + + +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeEUtranMeasurementLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeEUtranMeasurementLTE.cs new file mode 100644 index 00000000..8e3ec7e5 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeEUtranMeasurementLTE.cs @@ -0,0 +1,40 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultUeEUtranMeasurementLTE + { + public DateTime lastModifiedTime { get; set; } + public string triggerQuantity { get; set; } + public string measCfgIdx { get; set; } + public string maxReportCellNum { get; set; } + public string timeToTrigger { get; set; } + public string reportQuantity { get; set; } + public string hysteresis { get; set; } + public string measCfgFunc { get; set; } + public int thresholdOfRSRP { get; set; } + public double thresholdOfRSRQ { get; set; } + public string a6Offset { get; set; } + public string reportAddNeighMeasSwch { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public A1_A2_A3_A4_A5_A6EventId eventId { get; set; } + public double? a5Threshold2OfRSRQ { get; set; } + public int? a5Threshold2OfRSRP { get; set; } + public string mocName { get; set; } + public string prdRptRurpose { get; set; } + public string a3Offset { get; set; } + public string reportOnLeaveA6Swch { get; set; } + public string moId { get; set; } + public string reportCriteria { get; set; } + public string reportInterval { get; set; } + public string prdReportInterval { get; set; } + public string reportOnLeave { get; set; } + public string ldn { get; set; } + public string reportAmount { get; set; } + public string prdReportAmount { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeRATMeasurementLTE.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeRATMeasurementLTE.cs new file mode 100644 index 00000000..e384788c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReportConfigNR/MoQueryResultUeRATMeasurementLTE.cs @@ -0,0 +1,37 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR +{ + public class MoQueryResultUeRATMeasurementLTE + { + [JsonConverter(typeof(StringEnumConverter))] + public B1_B2_W1_W2_W3EventId eventId { get; set; } + public string eutranMeasQuantity { get; set; } + public DateTime lastModifiedTime { get; set; } + public string geranNbrTrd { get; set; } + public string cdmaSysNbrTrd { get; set; } + public string mocName { get; set; } + public string maxReportCellNum { get; set; } + public string trigTime { get; set; } + public string evtReportInterval { get; set; } + public string ratMeasCfgIdx { get; set; } + public string hysterisis { get; set; } + public string utraFddReportQuan { get; set; } + public string moId { get; set; } + public string rscpSysNbrTrd { get; set; } + public string reportCriteria { get; set; } + public string prdReportInterval { get; set; } + public string wlanRssiTrd { get; set; } + public string measCfgFunc { get; set; } + public string ldn { get; set; } + public double rsrqSrvTrd { get; set; } + public string prdReportAmount { get; set; } + public string evtReportAmount { get; set; } + public int rsrpSrvTrd { get; set; } + public string ecNoSysNbrTrd { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReturnMessage.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReturnMessage.cs new file mode 100644 index 00000000..90437530 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/ReturnMessage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class ReturnMessage + { + public int code { get; set; } + public string result { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/TreeFilter.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/TreeFilter.cs new file mode 100644 index 00000000..dfb31da6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/TreeFilter.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class TreeFilter + { + public string moc { get; set; } + public string filter { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/eventId.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/eventId.cs new file mode 100644 index 00000000..ee366807 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/eventId.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum A3_A4EventId + { + A3, + A4, + } + + public enum A3_A4_A5EventId + { + A3, + A4, + A5 + } + + public enum B1_B2EventId + { + B1, + B2, + } + + public enum A1_A2_A3_A4_A5_A6EventId + { + A1, + A2, + A3, + A4, + A5, + A6 + } + + public enum B1_B2_W1_W2_W3EventId + { + B1, + B2, + W1, + W2, + W3 + } + + public enum AllEventId + { + A1, + A2, + A3, + A4, + A5, + A6, + A3_Dif, + A4_Dif, + A5_Dif, + A6_Dif, + B1, + B2, + W1, + W2, + W3 + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/neListObject.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/neListObject.cs new file mode 100644 index 00000000..b65ca81f --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/neListObject.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public class neListObject + { + [JsonConverter(typeof(StringEnumConverter))] + public netype ManagedElementType { get; set; } + public string ne { get; set; } + /// + /// 是否回滚 + /// + public bool fallbackEnabled { get; set; } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/netype.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/netype.cs new file mode 100644 index 00000000..ca6f0c17 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/netype.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum netype + { + ITBBU, + SDR, + RNC, + MCE, + MEC + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptAmount.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptAmount.cs new file mode 100644 index 00000000..52c72177 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptAmount.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum rptAmount + { + _1, + _2, + _4, + _8, + _16, + _32, + _64, + Infinity + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptInterval.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptInterval.cs new file mode 100644 index 00000000..d6332f55 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptInterval.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum rptInterval + { + _120ms, + _240ms, + _480ms, + _640ms, + _1024ms, + _2048ms, + _5120ms, + _10240ms, + _20480ms, + _40960ms, + _1min, + _6min, + _12min, + _30min + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptQuantity.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptQuantity.cs new file mode 100644 index 00000000..58855f33 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/rptQuantity.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum rptQuantity + { + No, + Rsrp, + Rsrq, + RsrpAndRsrq, + Sinr, + RsrpAndSinr, + RsrqAndSinr, + All + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/timeToTrigger.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/timeToTrigger.cs new file mode 100644 index 00000000..3a35f22d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/timeToTrigger.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum timeToTrigger + { + _0, + _40, + _64, + _80, + _100, + _128, + _160, + _256, + _320, + _480, + _512, + _640, + _1024, + _1280, + _2560, + _5120 + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/triggerQuantity.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/triggerQuantity.cs new file mode 100644 index 00000000..982eb708 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/Models/triggerQuantity.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models +{ + public enum triggerQuantity + { + _0, + _1, + _2 + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTEClient.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTEClient.cs new file mode 100644 index 00000000..b0e18a06 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTEClient.cs @@ -0,0 +1,199 @@ +using Newtonsoft.Json; +using System; +using System.Net; +using System.Net.Http; +using System.Security.Authentication; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage +{ + public class LoginModel + { + public string userName { get; set; } + public string value { get; set; } + public string grantType => "password"; + } + public class TokenModel + { + public string accessToken { get; set; } + public long expires { get; set; } + } + public class ZTEClient : IDisposable + { + private string _token { get; set; } + public string UserName { get; set; } + public string Password { get; set; } + public string IpAddr { get; set; } = "10.92.243.190"; + public int Port { get; set; } = 2443; + private HttpClientHandler _handler = new HttpClientHandler(); + private HttpClient http; + + public ZTEClient() + { + http = new HttpClient(_handler); + _handler.ServerCertificateCustomValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true; + _handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; + //_handler.SslProtocols = SslProtocols.Tls13 | SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; + } + public Task GetAsync(string requestUri) + { + return http.GetAsync(requestUri); + } + public Task PostAsync(string requestUri, HttpContent content) + { + return http.PostAsync(requestUri, content); + } + public async Task CreateToken() + { + string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/token"; + + Console.WriteLine($"Connect url:\n{url}"); + + var login = new LoginModel + { + userName = UserName, + value = Password + }; + var str = JsonConvert.SerializeObject(login); + //Console.WriteLine($"Connect content:\n{str}"); + using var content = new StringContent(str, Encoding.UTF8, "application/json"); + + using var responseMessage = await http.PostAsync(url, content); + + //Console.WriteLine("response status code:" + responseMessage.StatusCode); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + string result = await responseMessage.Content.ReadAsStringAsync(); + //Console.WriteLine("response content:\n" + result); + var tokenModel = JsonConvert.DeserializeObject(result); + _token = tokenModel.accessToken; + http.DefaultRequestHeaders.Add("accessToken", _token); + return; + } + string result01 = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("response content:\n" + result01); + throw new InvalidOperationException($"get token failed, http status code {responseMessage.StatusCode.ToString()}"); + } + public async Task RefreshToken() + { + string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/handshake"; + + //Console.WriteLine($"Connect url:\n{url}"); + using var responseMessage = await http.PostAsync(url, null); + + //Console.WriteLine("response status code:" + responseMessage.StatusCode); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return; + } + throw new InvalidOperationException("Refresh Token failed, http status code"); + } + #region 不等待执行 + //public HttpResponseMessage NoAwaitGetAsync(string requestUri) + //{ + // var response = http.GetAsync(requestUri); + // return response.Result; + //} + //public HttpResponseMessage NoAwaitPostAsync(string requestUri, HttpContent content) + //{ + // var response = http.PostAsync(requestUri, content); + // return response.Result; + //} + //public async void CreateToken2() + //{ + // string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/token"; + + // Console.WriteLine($"Connect url:\n{url}"); + + // var login = new LoginModel + // { + // userName = UserName, + // value = Password + // }; + // var str = JsonConvert.SerializeObject(login); + // //Console.WriteLine($"Connect content:\n{str}"); + // using var content = new StringContent(str, Encoding.UTF8, "application/json"); + + // using var responseMessage = await http.PostAsync(url, content); + + // //Console.WriteLine("response status code:" + responseMessage.StatusCode); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // string result = await responseMessage.Content.ReadAsStringAsync(); + // //Console.WriteLine("response content:\n" + result); + // var tokenModel = JsonConvert.DeserializeObject(result); + // _token = tokenModel.accessToken; + // http.DefaultRequestHeaders.Add("accessToken", _token); + // return; + // } + // string result01 = await responseMessage.Content.ReadAsStringAsync(); + // //Console.WriteLine("response content:\n" + result01); + // throw new InvalidOperationException($"get token failed, http status code {responseMessage.StatusCode.ToString()}"); + //} + //public void NoAwaitCreateToken() + //{ + // string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/token"; + + // //Console.WriteLine($"Connect url:\n{url}"); + + // var login = new LoginModel + // { + // userName = UserName, + // value = Password + // }; + // var str = JsonConvert.SerializeObject(login); + // //Console.WriteLine($"Connect content:\n{str}"); + // using var content = new StringContent(str, Encoding.UTF8, "application/json"); + + // using var responseMessage = http.PostAsync(url, content); + + // //Console.WriteLine("response status code:" + responseMessage.StatusCode); + // //if (responseMessage.StatusCode == HttpStatusCode.OK) + // //{ + // // string result = await responseMessage.Content.ReadAsStringAsync(); + // // Console.WriteLine("response content:\n" + result); + // // var tokenModel = JsonConvert.DeserializeObject(result); + // // _token = tokenModel.accessToken; + // // http.DefaultRequestHeaders.Add("accessToken", _token); + // // return; + // //} + // //string result01 = await responseMessage.Content.ReadAsStringAsync(); + // //Console.WriteLine("response content:\n" + result01); + // //throw new InvalidOperationException($"get token failed, http status code {responseMessage.StatusCode.ToString()}"); + //} + //public void NoAwaitRefreshToken() + //{ + // string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/handshake"; + + // //Console.WriteLine($"Connect url:\n{url}"); + // using var responseMessage = http.PostAsync(url, null); + + // //Console.WriteLine("response status code:" + responseMessage.StatusCode); + // //if (responseMessage.StatusCode == HttpStatusCode.OK) + // //{ + // // return; + // //} + // //throw new InvalidOperationException("Refresh Token failed, http status code"); + //} + //public async void RefreshToken2() + //{ + // string url = $"https://{IpAddr}:{Port}/api/oauth2/v1/oauth/handshake"; + + // //Console.WriteLine($"Connect url:\n{url}"); + // using var responseMessage = await http.PostAsync(url, null); + + // //Console.WriteLine("response status code:" + responseMessage.StatusCode); + // if (responseMessage.StatusCode == HttpStatusCode.OK) + // { + // return; + // } + // throw new InvalidOperationException("Refresh Token failed, http status code"); + //} + #endregion + public void Dispose() + { + _handler?.Dispose(); + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTETask.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTETask.cs new file mode 100644 index 00000000..acb10ac2 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/Manage/ZTETask.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.PlannedArea; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage +{ + public static class ZTETask + { + public static async Task MoConfigTask(this ZTEClient client, string areaId, IList moConfigArgs, netype netype, string ne) + { + var moConfig = new MoConfigArgBase + { + ManagedElementType = netype, + ne = ne, + moData = moConfigArgs + }; + var arg = new List> { moConfig }; + await client.MoConfig(areaId, JsonConvert.SerializeObject(arg)); + + var validation = new ValidationArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype, + ne = ne + } + } + }; + var validationResult = await client.Validation(areaId, validation); + await client.TaskStatus(validationResult.taskNo); + + var activateArg = new PlannedareaActivateArg + { + neList = new List{ + new neListObject + { + ManagedElementType = netype, + ne = ne + } + } + }; + + var activateResult = await client.PlannedareaActivate(areaId, activateArg); + var taskResult = await client.TaskStatus(activateResult.taskNo); + + while (taskResult.Count > 0 && taskResult[0].progress < 100) + { + await Task.Delay(800); + taskResult = await client.TaskStatus(activateResult.taskNo); + } + } + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/ZTEBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/ZTEBaseStationTester.cs new file mode 100644 index 00000000..3a081e1d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/ZTEBaseStationTester.cs @@ -0,0 +1,2836 @@ +using MTNet.Application.ConnectBase; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Management; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Cell; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.Relations; +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.ReportConfigNR; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using MTNet.Application.IDAL.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary.BaseStation.ZTE; + +public class ZTEBaseStationTester : ConnectInstBase, IZTEBaseStationTester +{ + + int _rtn = 0; + bool _disposed { get; set; } = false; + private List CellList = new List(); + + public ZTEBaseStationTester(BaseStationTesterAddrConfig addrConfig) : base(addrConfig) + { + } + + public ZTEBaseStationTester(DeviceAddrConfig addrConfig) : base(addrConfig) + { + } + + + public async Task GetClient() + { + try + { + var client = new ZTEClient + { + IpAddr = AddrConfig.AddrConfig, + Port = AddrConfig.PortConfig, + UserName = AddrConfig.UserName, + Password = AddrConfig.Password, + }; + return client; + } + catch (Exception ex) + { + return null; + } + } + public override int Close() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"ZTE BaseStation DisConnect Success!"); + return _rtn; + } + + public override int Connect() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"ZTE BaseStation Connect Success!"); + return _rtn; + } + + public void Dispose() + { + throw new NotImplementedException(); + } + public int QuerySiteState() + { + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"ZTE BaseStation AfterTest Success!"); + return _rtn; + } + public async Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyInterFHoA1A2_A1(netype.ITBBU, cellModel, rsrpThresholdA1, hysteresisA1); + //DeviceControlLogger.Logger.Info($"SetA1Threshold {cell.Name} ModifyInterFHoA1A2_A1 Result:0."); + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"SetA1Threshold {cell.Name} Exception:{ex.Message}."); + } + } + public async Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyInterFHoA1A2(netype.ITBBU, cellModel, rsrpThresholdA2, hysteresisA2); + //DeviceControlLogger.Logger.Info($"SetA2Threshold {cell.Name} ModifyInterFHoA1A2 Result:0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA2Threshold {cell.Name} Exception:{ex.Message}."); + } + } + public async Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + //client.ModifyNRInterFCovHoA3(netype.ITBBU, cell, 1.5, 3); + + await client.ModifyNRInterFCovHoA3(netype.ITBBU, cellModel, eventOffset, hysteresisA3); + //DeviceControlLogger.Logger.Info($"SetA3Threshold {cell.Name} ModifyNRInterFCovHoA3 Result:0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA3Threshold {cell.Name} Exception:{ex.Message}."); + } + } + public async Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + await client.ModifyNRInterFCovHoA4(netype.ITBBU, cellModel, rsrpThresholdA4, hysteresisA4); + //DeviceControlLogger.Logger.Info($"SetA4Threshold {cell.Name} ModifyNRInterFCovHoA4 Result:0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA4Threshold {cell.Name} Exception:{ex.Message}."); + } + + } + public async Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyNRInterFCovHoA5(netype.ITBBU, cellModel, A5Thrd1Rsrp, rsrpThreshold, 0); + //DeviceControlLogger.Logger.Info($"SetA5Threshold {cell.Name} ModifyNRInterFCovHoA5 Result:0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetA5Threshold {cell.Name} Exception:{ex.Message}."); + } + + } + public async Task SetB1Threshold(Cell cell, int value1) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyLTEFreqCovHo(netype.ITBBU, cellModel, "B1", value1); + //DeviceControlLogger.Logger.Info($"SetB1Threshold {cell.Name} ModifyLTEFreqCovHo B1 Result:0."); + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(20); + //DeviceControlLogger.Logger.Info($"SetB1Threshold {cell.Name} Exception:{ex.Message}."); + return rtn; + } + + } + + public async Task SetB2Threshold(Cell cell, int value1, int value2) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + await client.ModifyLTEFreqCovHo(netype.ITBBU, cellModel, "B2", value2, value1); + //DeviceControlLogger.Logger.Info($"SetB2Threshold {cell.Name} ModifyLTEFreqCovHo B2 Result:0."); + return rtn; + } + catch (Exception ex) + { + rtn = GetErrorCode(20); + //DeviceControlLogger.Logger.Info($"SetB2Threshold {cell.Name} Exception:{ex.Message}."); + return rtn; + } + } + + public async Task SetCellState(Cell cell, bool state) + { + int rtn = 0; + try + { + if (cell.FactoryType == BaseStationTesterTypeEnum.ZTE) + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + if (state) + { + await Task.Delay(2000); + //0--1 + //去闭塞 + await client.QuickLockCell(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updatenrcells = await QueryNrCells(); + var a = Updatenrcells.Where(m => m.Name == cell.Name)?.FirstOrDefault(); + if (Updatenrcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 1) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + } + } + else + { + await Task.Delay(2000); + //1--0 + //去解闭塞 + await client.QuickUnLockCell(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updatenrcells = await QueryNrCells(); + if (Updatenrcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 0) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + } + } + } + else if (cell.MobileStandard == CellMobileStandardEnum.FDDLTE) + { + if (state) + { + await Task.Delay(2000); + //TestFactory.AddMsg(0, $"正在闭塞{cell.Name}"); + //0--1 + //去闭塞 + await client.QuickLockCellFDD(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updateletcells = await QueryFDDLteCells(); + if (Updateletcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 1) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + //TestFactory.AddMsg(1, $"{cell.Name}闭塞成功!"); + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + //TestFactory.AddMsg(2, $"{cell.Name}闭塞失败!"); + + } + } + else + { + await Task.Delay(2000); + //TestFactory.AddMsg(0, $"正在解闭塞{cell.Name}..."); + //1--0 + //去解闭塞 + await client.QuickUnLockCellFDD(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updateletcells = await QueryFDDLteCells(); + if (Updateletcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 0) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + //TestFactory.AddMsg(1, $"{cell.Name}解闭塞成功!"); + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + //TestFactory.AddMsg(2, $"{cell.Name}解闭塞失败!"); + //TestFactory.SetError(0, 0, null); + } + } + } + else if (cell.MobileStandard == CellMobileStandardEnum.TDDLTE) + { + if (state) + { + await Task.Delay(2000); + //0--1 + //去闭塞 + await client.QuickLockCellTDD(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updateletcells = await QueryTDDLteCells(); + if (Updateletcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 1) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + } + } + else + { + await Task.Delay(2000); + //去解闭塞 + await client.QuickUnLockCellTDD(netype.ITBBU, cell.SubNetwork, cell.ManagedElement, cell.CellId.ToString()); + var Updateletcells = await QueryTDDLteCells(); + if (Updateletcells.Where(m => m.Name == cell.Name).FirstOrDefault().Status == 0) + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result 0."); + return 0; + } + else + { + //DeviceControlLogger.Logger.Info($"SetCellState QuickLockCell Result -1."); + return -1; + } + } + } + else + { + return 0; + } + } + else + { + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(15); + //DeviceControlLogger.Logger.Info($"SetCellState {cell.Name} Exception:{ex.Message}."); + return rtn; + } + } + + public int SetCoFrequencyMeasurementStartUpThreshold(string cellName, double value) + { + return 0; + } + + public int SetMinAccessLevel(string cellName, double level) + { + return 0; + } + + public int SetNeighborhoodRelations(string cellName1, string cellName2) + { + return 0; + } + + public int SetReselectPriority(string cellName, int priority) + { + return 0; + } + + public int SetUEInactivityTimer(string cellName, double timeSpan) + { + return 0; + } + public async Task SetBandwidth(Cell cell, string BandWidth, bool wait) + { + int rtn = 0; + try + { + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + MoId = cell.MoId, + LocalId = cell.CellId.ToString(), + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + await client.ModifyBandWidth(netype.ITBBU, cellModel, $"{BandWidth}"); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} ModifyBandWidth Result 0."); + return 0; + } + else + { + await client.ModifyFDDBandWidth(netype.ITBBU, cellModel, Convert.ToDouble(BandWidth), Convert.ToDouble(BandWidth)); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} ModifyLTEBandWidth Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} Exception:{ex.Message}."); + return rtn; + } + + } + + public async Task SetCarrierPCI(Cell cell, string CarrierPCI, bool wait) + { + int rtn = 0; + try + { + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + if (wait) + { + await client.ModifyCarrierCellPCI(netype.ITBBU, cellModel, CarrierPCI); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI ModifyCarrierCellPCI Result 0."); + return 0; + } + else + { + await client.ModifyCarrierCellPCINotAwait(netype.ITBBU, cellModel, CarrierPCI); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI ModifyCarrierCellPCI Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI {cell.Name} Exception:{ex.Message}."); + return rtn; + } + + } + public async Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait) + { + int rtn = 0; + try + { + var newList = cellPcis.Select(x => (new CellModel() + { + Name = x.Item1.Name, + MobileStandard = (CellMobileStandard)x.Item1.MobileStandard, + LocalId = x.Item1.CellId.ToString(), + MoId = x.Item1.MoId, + ssbFrequency = x.Item1.ssbFrequency, + ZTEgNBId = x.Item1.NodeBId.ToString(), + ZTEpLMNId = x.Item1.mcc+"-"+ x.Item1.mnc, + ZTEManagedElement = x.Item1.ManagedElement, + ZTESubNetwork = x.Item1.SubNetwork + }, x.Item2)).ToList(); + + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + if (wait) + { + await client.ModifyCarrierCellPCI(netype.ITBBU, newList); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI ModifyCarrierCellPCI Result 0."); + return 0; + } + else + { + await client.ModifyCarrierCellPCINotAwait(netype.ITBBU, newList); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI ModifyCarrierCellPCI Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(6); + //DeviceControlLogger.Logger.Info($"SetCarrierPCI cellPcis Exception:{ex.Message}."); + return rtn; + } + } + public async Task SetCarrierFrequency(Cell cell, string Frequency, bool wait) + { + int rtn = 0; + try + { + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + + await client.ModifyCarrier(netype.ITBBU, cellModel, Frequency); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency ModifyCarrier Result 0."); + + return 0; + } + else + { + await client.ModifyFDDCarrier(netype.ITBBU, cellModel, Convert.ToDouble(Frequency), Convert.ToDouble(Frequency)); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency ModifyCarrier Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency Exception:{ex.Message}."); + return rtn; + } + } + + + public async Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool wait) + { + int rtn = 0; + try + { + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + MoId = cell.MoId, + LocalId = cell.CellId.ToString(), + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + await client.ModifyBandWidth(netype.ITBBU, cellModel, $"{BandWidth}"); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} ModifyBandWidth Result 0."); + return 0; + } + else + { + await client.ModifyFDDBandWidth(netype.ITBBU, cellModel, BandWidth, BandWidthUl); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} ModifyLTEBandWidth Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(7); + //DeviceControlLogger.Logger.Info($"SetBandwidth {cell.Name} Exception:{ex.Message}."); + return rtn; + } + + } + + + public async Task> QueryFDDLteCells() + { + try + { + using var client = await GetClient(); + + await client.CreateToken(); + await client.RefreshToken(); + + var realCells = new List(); + var results = await client.ModataQuery(netype.ITBBU); + //频段 + //var NEresult = await client.Mes(); + if (results == null || results.result == null) + { + //DeviceControlLogger.Logger.Info($"QueryFDDLteCells MoQueryResultCUEUtranCellFDDLTE null."); + return null; + } + + foreach (var ManagedElement in results.result) + { + + try + { + var neArgs = ManagedElement.ne.Split(',')?.Select(v => v.Split("="))?.ToList(); + + if (neArgs == null || neArgs.Count() != 2 || neArgs[0][0] != "SubNetwork" || neArgs[1][0] != "ManagedElement") + { + //DeviceControlLogger.Logger.Info($" MoQueryResultCUEUtranCellFDDLTE ManagedElement neArgs null or ManagedElement not find."); + continue; + } + + string ZTESubNetwork = neArgs[0][1]; + string ZTEManagedElement = neArgs[1][1]; + foreach (var cellData in ManagedElement.MoData) + { + + var strs = cellData.ldn.Split(','); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[0].Split('='); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[1].Split("_"); + if (strs == null || strs.Length < 2) + continue; + //var FrequencyName = NEresult.Where(m => m.NbiId.ToString() == ZTEManagedElement).FirstOrDefault().DisplayName; + var cell = new Cell + { + mcc = strs[0].Split('-')[0], + mnc = strs[0].Split('-')[1], + NodeBId =int.Parse(strs[1]), + PCI =int.Parse(cellData.pci), + MoId = cellData.moId, + SubNetwork = ZTESubNetwork, + ManagedElement = ZTEManagedElement, + CellId =int.Parse(cellData.cellLocalId) , + MobileStandard = CellMobileStandardEnum.FDDLTE, + FactoryType = BaseStationTesterTypeEnum.ZTE, + ssbFrequency =cellData.earfcnDl , + Name = strs[1] + "-" + cellData.cellLocalId, + Status = (int)(cellData.adminState == "1" ? CellStatusEnum.Locked : CellStatusEnum.Unlocked) + }; + Console.WriteLine($"GetCell:{cell.Name}"); + realCells.Add(cell); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"MoQueryResultCUEUtranCellFDDLTE ManagedElement {ex.Message}."); + continue; + } + + } + Console.WriteLine($"FDDLTE:{realCells.Count}"); + return realCells; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"QueryFDDLteCells Exception Result {ex.Message}."); + return null; + } + + } + public async Task> QueryTDDLteCells() + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var realCells = new List(); + + var results = await client.ModataQuery(netype.ITBBU); + if (results == null || results.result == null) + { + //DeviceControlLogger.Logger.Info($"QueryTDDLteCells CUEUtranCellTDDLTE null."); + return null; + } + + foreach (var ManagedElement in results.result) + { + + try + { + var neArgs = ManagedElement.ne.Split(',')?.Select(v => v.Split("="))?.ToList(); + + if (neArgs == null || neArgs.Count() != 2 || neArgs[0][0] != "SubNetwork" || neArgs[1][0] != "ManagedElement") + { + //DeviceControlLogger.Logger.Info($" CUEUtranCellTDDLTE ManagedElement neArgs null or ManagedElement not find."); + continue; + } + + string ZTESubNetwork = neArgs[0][1]; + string ZTEManagedElement = neArgs[1][1]; + foreach (var cellData in ManagedElement.MoData) + { + + var strs = cellData.ldn.Split(','); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[0].Split('='); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[1].Split("_"); + if (strs == null || strs.Length < 2) + continue; + //var FrequencyName = NEresult.Where(m => m.NbiId.ToString() == ZTEManagedElement).FirstOrDefault().DisplayName; + var cell = new Cell + { + mcc = strs[0].Split('-')[0], + mnc = strs[0].Split('-')[1], + NodeBId = int.Parse(strs[1]), + PCI = int.Parse(cellData.pci), + MoId = cellData.moId, + SubNetwork = ZTESubNetwork, + ManagedElement = ZTEManagedElement, + CellId = int.Parse(cellData.cellLocalId), + MobileStandard = CellMobileStandardEnum.TDDLTE, + FactoryType = BaseStationTesterTypeEnum.ZTE, + ssbFrequency =cellData.earfcn , + Name = strs[1] + "-" + cellData.cellLocalId, + Status = (int)(cellData.adminState == "1" ? CellStatusEnum.Locked : CellStatusEnum.Unlocked) + }; + Console.WriteLine($"GetCell:{cell.Name}"); + realCells.Add(cell); + } + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"CUEUtranCellTDDLTE ManagedElement {ex.Message}."); + continue; + } + + } + Console.WriteLine($"TDDLTE:{realCells.Count}"); + return realCells; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"QueryTDDLteCells Exception Result {ex.Message}."); + return null; + } + + } + public async Task> QueryNrCells() + { + try + { + using var client = await GetClient(); + + await client.CreateToken(); + await client.RefreshToken(); + + var realCells = new List(); + var NRPhysicalResults = await client.ModataQuery(netype.ITBBU); + var results = await client.ModataQuery(netype.ITBBU); + + var definingSSBs = await client.CellDefiningSSB(netype.ITBBU); + + if (results == null || results.result == null) + { + //DeviceControlLogger.Logger.Info($"QueryNrCells MoQueryResultNRCellDU null."); + return null; + + } + + foreach (var ManagedElement in results.result) + { + var neArgs = ManagedElement.ne.Split(',')?.Select(v => v.Split("="))?.ToList(); + + if (neArgs == null || neArgs.Count() != 2 || neArgs[0][0] != "SubNetwork" || neArgs[1][0] != "ManagedElement") + { + //DeviceControlLogger.Logger.Info($" MoQueryResultNRCellDU ManagedElement neArgs null or ManagedElement not find."); + continue; + } + + var ManagedElementSSBs = definingSSBs?.result?.FirstOrDefault(n => n.ne == ManagedElement.ne); + var NRPhysicalCell = NRPhysicalResults?.result?.FirstOrDefault(m => m.ne == ManagedElement.ne); + + string ZTESubNetwork = neArgs[0][1]; + string ZTEManagedElement = neArgs[1][1]; + foreach (var cellData in ManagedElement.MoData) + { + try + { + CellDefiningSSB definingSSB = null; + var strs = cellData.ldn.Split(','); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[0].Split('='); + if (strs == null || strs.Length < 2) + continue; + + strs = strs[1].Split("_"); + if (strs == null || strs.Length < 2) + continue; + + var cellMoId = ""; + var userLabel = ""; + if (NRPhysicalCell != null) + { + var NRPhysical = NRPhysicalCell.MoData?.FirstOrDefault(m => m.nrPhysicalCellDUId == cellData.nrPhysicalCellDUId); + cellMoId = NRPhysical?.moId; + userLabel = NRPhysical?.nrPhysicalCellDUId; + } + if (ManagedElementSSBs != null) + { + definingSSB = ManagedElementSSBs.MoData?.FirstOrDefault(a => a.ldn.IndexOf($"NRPhysicalCellDU={cellMoId}") != -1); + } + if (definingSSB == null) + { + //DeviceControlLogger.Logger.Info($"CellDefiningSSB null."); + continue; + } + var cell = new Cell + { + mcc = strs[0].Split('-')[0], + mnc = strs[0].Split('-')[1], + NodeBId =int.Parse(strs[1]) , + PCI =int.Parse(definingSSB.pci), + SubNetwork = ZTESubNetwork, + ManagedElement = ZTEManagedElement, + CellId =int.Parse(cellMoId) , + MoId = cellData.moId, + MobileStandard = CellMobileStandardEnum.NR, + FactoryType = BaseStationTesterTypeEnum.ZTE, + ssbFrequency = definingSSB != null ? definingSSB.ssbFrequency: "0", + Name = ZTEManagedElement + "-" + cellData.cellLocalId, + Status = (int)(cellData.adminState == "Locked" ? CellStatusEnum.Locked : CellStatusEnum.Unlocked), + }; + Console.WriteLine($"GetCell:{cell.Name}"); + realCells.Add(cell); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"MoQueryResultNRCellDU ManagedElement {ex.Message}."); + continue; + } + } + } + Console.WriteLine($"NR:{realCells.Count}"); + return realCells; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"QueryNrCells Exception {ex.Message}."); + return null; + } + + } + + public async Task CreateRelations(Cell FirstCell, Cell SecondCell) + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + string areaId = Guid.NewGuid().ToString().Replace("-", ""); + await client.CreatePlannedArea(areaId, "TestPlannedArea"); + await client.OpenPlannedArea(areaId); + try + { + var firstCell = new CellModel + { + LocalId = FirstCell.CellId.ToString(), + MoId = FirstCell.MoId, + MobileStandard = (CellMobileStandard)FirstCell.MobileStandard, + Name = FirstCell.Name, + ssbFrequency = FirstCell.ssbFrequency, + ZTEgNBId = FirstCell.NodeBId.ToString(), + ZTEManagedElement = FirstCell.ManagedElement, + ZTEpLMNId = FirstCell.mcc+ FirstCell.mnc, + ZTESubNetwork = FirstCell.SubNetwork + }; + //testCells[0]; + var secondCell = new CellModel + { + LocalId = SecondCell.CellId.ToString(), + MoId = SecondCell.MoId, + MobileStandard = (CellMobileStandard)SecondCell.MobileStandard, + Name = SecondCell.Name, + ssbFrequency = SecondCell.ssbFrequency, + ZTEgNBId = SecondCell.NodeBId.ToString(), + ZTEManagedElement = SecondCell.ManagedElement, + ZTEpLMNId = SecondCell.mcc+ SecondCell.mnc, + ZTESubNetwork = SecondCell.SubNetwork + }; + //testCells[1]; + //NR to NR + if (firstCell.MobileStandard == CellMobileStandard.NR && secondCell.MobileStandard == CellMobileStandard.NR) + { + if (firstCell.GetZTENElement() == secondCell.GetZTENElement()) + { + //DeviceControlLogger.Logger.Info($"NR to NR CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.NRtoNRCreateRelation(areaId, firstCell, secondCell); + } + else + { + //DeviceControlLogger.Logger.Info($"NR to NR CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.SetOtherNElementNRtoNRRelation(areaId, firstCell, secondCell); + } + } + //LTE To LTE + else if (firstCell.MobileStandard == CellMobileStandard.FDDLTE && secondCell.MobileStandard == CellMobileStandard.FDDLTE) + { + if (firstCell.GetZTENElement() == secondCell.GetZTENElement()) + { + if (firstCell.ssbFrequency == secondCell.ssbFrequency) + { + //DeviceControlLogger.Logger.Info($"FDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.SameNElementLtetoLteCreateRelation(areaId, firstCell, secondCell); + } + else + { + //DeviceControlLogger.Logger.Info($"FDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.SameNElementOtherLtetoLteCreateRelation(areaId, firstCell, secondCell); + } + } + else + { + if (firstCell.ssbFrequency == secondCell.ssbFrequency) + { + //DeviceControlLogger.Logger.Info($"FDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.OtherNElemenLtetoLteCreateRelation(areaId, firstCell, secondCell); + } + else + { + //DeviceControlLogger.Logger.Info($"FDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.OtherNElementOtherLtetoLteCreateRelation(areaId, firstCell, secondCell); + } + } + } + else if (firstCell.MobileStandard == CellMobileStandard.TDDLTE && secondCell.MobileStandard == CellMobileStandard.TDDLTE) + { + if (firstCell.GetZTENElement() == secondCell.GetZTENElement()) + { + //DeviceControlLogger.Logger.Info($"TDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.SameNElementLtetoLte_TDDCreateRelation(areaId, firstCell, secondCell); + } + else + { + //DeviceControlLogger.Logger.Info($"TDDLTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.OtherNElementLtetoLteRelation_TDD(areaId, firstCell, secondCell); + } + } + else + { + // NR to LTE + if (firstCell.MobileStandard == CellMobileStandard.NR) + { + //DeviceControlLogger.Logger.Info($"NR to LTE CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.NRtoNRCreateRelation(areaId, firstCell, secondCell); + } + // LTE to NR + else if (firstCell.MobileStandard != CellMobileStandard.NR) + { + + //DeviceControlLogger.Logger.Info($"LTE to NR CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name}."); + await client.LTEtoNRCreateRelation(areaId, firstCell, secondCell); + //DeviceControlLogger.Logger.Info($"LTE to NR CreateRelations firstCell:{firstCell.Name} secondCell:{secondCell.Name} Result:0."); + } + } + } + catch (Exception ex) + { + await client.DestroyPlannedAreaNoThrow(areaId); + //DeviceControlLogger.Logger.Info($"CreateRelations failed Exception {ex.Message}."); + } + finally + { + await client.DestroyPlannedAreaNoThrow(areaId); + } + } + + + public async Task> GetCells() + { + int rtn = 0; + try + { + List cells = new List(); + + var fddLteCells = await QueryFDDLteCells(); + var nrCells = await QueryNrCells(); + var tddLteCells = await QueryTDDLteCells(); + + if (nrCells != null) + { + cells.AddRange(nrCells); + //DeviceControlLogger.Logger.Info($"GetCells nrCells count:{nrCells.Count} fddLteCells count:{fddLteCells.Count} ."); + } + if (fddLteCells != null) + { + cells.AddRange(fddLteCells); + //DeviceControlLogger.Logger.Info($"GetCells fddLteCells count:{fddLteCells.Count} ."); + } + if (tddLteCells != null) + { + cells.AddRange(tddLteCells); + //DeviceControlLogger.Logger.Info($"GetCells tddLteCells count:{tddLteCells.Count} ."); + + } + CellList = cells; + return cells; + } + catch (Exception ex) + { + rtn = GetErrorCode(5); + //DeviceControlLogger.Logger.Info($"GetCells Exception {ex.Message}."); + return null; + } + + } + public async Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyCellSelection(netype.ITBBU, cellModel, qRxLevMin, qRxLevMinOffsetCell); + //DeviceControlLogger.Logger.Info($"SetCellSelection {cell.Name} ModifyCellSelection Result 0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection {cell.Name} Exception:{ex.Message}."); + } + } + public async Task SetCellSelection(Cell cell, double LevelValue) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyCellSelection(netype.ITBBU, cellModel, $"{LevelValue}", "0"); + //DeviceControlLogger.Logger.Info($"SetCellSelection {cell.Name} ModifyCellSelection Result 0."); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection {cell.Name} Exception:{ex.Message}."); + } + } + + public async Task ModifyBSParameter(Cell cell, CellParameter cellParameter) + { + + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + await client.ModifyParameter(netype.ITBBU, cellModel, cellParameter); + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"SetCellSelection Exception {ex.Message}."); + } + + } + + public async Task ModifyCellResel(Cell cell, int cellReselectionPriority) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyCellResel(netype.ITBBU, cellModel, cellReselectionPriority); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellResel Result 0."); + return 0; + } + catch (Exception ex) + { + rtn = GetErrorCode(10); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyCellResel Exception:{ex.Message}."); + return rtn; + } + } + + public async Task ModifyInactiveParameter(Cell cell, int ueinactiveTimer) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + var RsultCode = await client.ModifyInactiveParameter(netype.ITBBU, cellModel, ueinactiveTimer); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyInactiveParameter Result 0."); + return 0; + } + catch (Exception ex) + { + rtn = GetErrorCode(11); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyInactiveParameter Exception:{ex.Message}."); + return rtn; + } + } + + public async Task ModifyExternalNRCellCU(Cell cell, Cell relationCell, string nRPCI) + { + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + var relationCellModel = new CellModel + { + Name = relationCell.Name, + MobileStandard = (CellMobileStandard)relationCell.MobileStandard, + LocalId = relationCell.CellId.ToString(), + MoId = relationCell.MoId, + ssbFrequency = relationCell.ssbFrequency, + ZTEgNBId = relationCell.NodeBId.ToString(), + ZTEpLMNId = relationCell.mcc+cell.mnc, + ZTEManagedElement = relationCell.ManagedElement, + ZTESubNetwork = relationCell.SubNetwork + }; + await client.ModifyExternalNRCellCUAsync(netype.ITBBU, cellModel, relationCellModel, nRPCI); + //DeviceControlLogger.Logger.Info($"ModifyExternalNRCellCU Result 0."); + + return 0; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"ModifyExternalNRCellCU Exception {ex.Message}."); + return -1; + } + } + + public async Task DeleteRelations(Cell FirstCell, Cell SecondCell) + { + try + { + if (FirstCell == null || SecondCell == null) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations FirstCell or SecondCell null."); + return 0; + } + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = FirstCell.Name, + MobileStandard = (CellMobileStandard)FirstCell.MobileStandard, + LocalId = FirstCell.CellId.ToString(), + MoId = FirstCell.MoId, + ssbFrequency = FirstCell.ssbFrequency, + ZTEgNBId = FirstCell.NodeBId.ToString(), + ZTEpLMNId = FirstCell.mcc+ FirstCell.mnc, + ZTEManagedElement = FirstCell.ManagedElement, + ZTESubNetwork = FirstCell.SubNetwork + }; + var relationCellModel = new CellModel + { + Name = SecondCell.Name, + MobileStandard = (CellMobileStandard)SecondCell.MobileStandard, + LocalId = SecondCell.CellId.ToString(), + MoId = SecondCell.MoId, + ssbFrequency = SecondCell.ssbFrequency, + ZTEgNBId = SecondCell.NodeBId.ToString(), + ZTEpLMNId = SecondCell.mcc+ SecondCell.mnc, + ZTEManagedElement = SecondCell.ManagedElement, + ZTESubNetwork = SecondCell.SubNetwork + }; + //DeviceControlLogger.Logger.Info($"DeleteRelationsFirstCell:{cellModel.Name} SecondCell:{relationCellModel.Name}."); + await client.RemoveNRCellRelation(cellModel, relationCellModel); + //DeviceControlLogger.Logger.Info($"DeleteRelations FirstCell:{cellModel.Name} SecondCell:{relationCellModel.Name} Result:0."); + return 0; + } + catch (Exception ex) + { + //DeviceControlLogger.Logger.Info($"DeleteRelations Exception:{ex.Message}."); + return -1; + } + } + + public async Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency) + { + int rtn = 0; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + await client.ModifyIntraFReselection(netype.ITBBU, cellModel, sIntraSearchP); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyIntraFReselection Result 0."); + return 0; + } + catch (Exception ex) + { + rtn = GetErrorCode(12); + //DeviceControlLogger.Logger.Info($"{cell.Name} ModifyIntraFReselection Exception:{ex.Message}."); + return rtn; + } + } + + public async Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait) + { + int rtn = 0; + try + { + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + + if (cell.MobileStandard == CellMobileStandardEnum.NR) + { + await client.ModifyCarrier(netype.ITBBU, cellModel, earfcnDL); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency {cell.Name} ModifyCarrier Result 0."); + return 0; + } + else + { + await client.ModifyFDDCarrier(netype.ITBBU, cellModel, Convert.ToDouble(earfcnDL), Convert.ToDouble(earfcnUL)); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency {cell.Name} ModifyLTECarrier Result 0."); + return 0; + } + } + catch (Exception ex) + { + rtn = GetErrorCode(8); + //DeviceControlLogger.Logger.Info($"SetCarrierFrequency {cell.Name} Exception:{ex.Message}."); + return rtn; + } + } + + /// + /// 获取终端异常代码 + /// + /// + /// + public int GetErrorCode(int errorCode) + { + int.TryParse(ErrorCodeHelper.GetDeviceErrorCode(DeviceTypeEnum.BaseStationTester, errorCode), out int code); + return code; + } + + public async Task PCCHConfig_defaultPagingCycle(Cell cell, string defaultPagingCycle) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPCCHConfig_defaultPagingCycle(netype.ITBBU, cellModel, defaultPagingCycle); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PCCHConfig_defaultPagingCycle,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PCCHConfig_defaultPagingCycle error.", ex); + } + return rtn; + } + + public async Task PagingLTE_defaultPagingCycle(Cell cell, string defaultPagingCycle) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPagingLTE_defaultPagingCycle(netype.ITBBU, cellModel, defaultPagingCycle); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PagingLTE_defaultPagingCycle,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PagingLTE_defaultPagingCycle error.", ex); + } + return rtn; + } + + public async Task PDCP_profile(Cell cell, string drb5qi, bool profile0x0001 = false, bool profile0x0002 = false, bool profile0x0004 = false) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPDCP_profile(netype.ITBBU, cellModel, drb5qi, profile0x0001, profile0x0002, profile0x0004); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_profile,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_profile error.", ex); + } + return rtn; + } + + public async Task PDCPLTE_profile(Cell cell, string qCI, bool profile1 = false, bool profile2 = false, bool profile4 = false, bool profile6 = false) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPDCPLTE_profile(netype.ITBBU, cellModel, qCI, profile1, profile2, profile4, profile6); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCPLTE_profile,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCPLTE_profile error.", ex); + } + return rtn; + } + + public async Task NRPhysicalCellDU_ulCceRatio4Coreset0(Cell cell, string ulCceRatio4Coreset0) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyNRPhysicalCellDU_ulCceRatio4Coreset0(netype.ITBBU, cellModel, ulCceRatio4Coreset0); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_ulCceRatio4Coreset0,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_ulCceRatio4Coreset0 error.", ex); + } + return rtn; + } + + public async Task PHR_prdPhrTimer(Cell cell, string prdPhrTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPHR_prdPhrTimer(netype.ITBBU, cellModel, prdPhrTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PHR_prdPhrTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PHR_prdPhrTimer error.", ex); + } + return rtn; + } + + public async Task PHR_phtPhrTimer(Cell cell, string phtPhrTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPHR_phtPhrTimer(netype.ITBBU, cellModel, phtPhrTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PHR_phtPhrTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PHR_phtPhrTimer error.", ex); + } + return rtn; + } + + public async Task SRSConfig_srsPeriod(Cell cell, string srsPeriod) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftySRSConfig_srsPeriod(netype.ITBBU, cellModel, srsPeriod); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SRSConfig_srsPeriod,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SRSConfig_srsPeriod error.", ex); + } + return rtn; + } + + public async Task PhyChannelFDDLTE_srsEnable(Cell cell, string srsEnable) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPhyChannelFDDLTE_srsEnable(netype.ITBBU, cellModel, srsEnable); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PhyChannelFDDLTE_srsEnable,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PhyChannelFDDLTE_srsEnable error.", ex); + } + return rtn; + } + + public async Task PowerControlDLFDDLTE_paForDTCH(Cell cell, string paForDTCH) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPowerControlDLFDDLTE_paForDTCH(netype.ITBBU, cellModel, paForDTCH); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PowerControlDLFDDLTE_paForDTCH,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PowerControlDLFDDLTE_paForDTCH error.", ex); + } + return rtn; + } + + public async Task PagingLTE_modificationPeriodCoeff(Cell cell, string modificationPeriodCoeff) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPagingLTE_modificationPeriodCoeff(netype.ITBBU, cellModel, modificationPeriodCoeff); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PagingLTE_modificationPeriodCoeff,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PagingLTE_modificationPeriodCoeff error.", ex); + } + return rtn; + } + + public async Task RachConfigGeneric_preambleTransMax(Cell cell, string preambleTransMax) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyRachConfigGeneric_preambleTransMax(netype.ITBBU, cellModel, preambleTransMax); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} RachConfigGeneric_preambleTransMax,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} RachConfigGeneric_preambleTransMax error.", ex); + } + return rtn; + } + + public async Task PrachFDDLTE_preambleTransMax(Cell cell, string preambleTransMax) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPrachFDDLTE_preambleTransMax(netype.ITBBU, cellModel, preambleTransMax); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PrachFDDLTE_preambleTransMax,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PrachFDDLTE_preambleTransMax error.", ex); + } + return rtn; + } + + public async Task PDCP_snSizeUl(Cell cell, string snSizeUl) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPDCP_snSizeUl(netype.ITBBU, cellModel, snSizeUl); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_snSizeUl,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_snSizeUl error.", ex); + } + return rtn; + } + + public async Task PDCP_snSizeDl(Cell cell, string snSizeDl) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPDCP_snSizeDl(netype.ITBBU, cellModel, snSizeDl); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_snSizeDl,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_snSizeDl error.", ex); + } + return rtn; + } + + public async Task QoSServiceClassLTE_sequenNumLenth(Cell cell, string sequenNumLenth) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyQoSServiceClassLTE_sequenNumLenth(netype.ITBBU, cellModel, sequenNumLenth); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_sequenNumLenth,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_sequenNumLenth error.", ex); + } + return rtn; + } + + public async Task QoSServiceClassLTE_spsIntervalUL(Cell cell, string spsIntervalUL) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyQoSServiceClassLTE_spsIntervalUL(netype.ITBBU, cellModel, spsIntervalUL); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_spsIntervalUL,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_spsIntervalUL error.", ex); + } + return rtn; + } + + public async Task QoSServiceClassLTE_spsIntervalDL(Cell cell, string spsIntervalDL) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyQoSServiceClassLTE_spsIntervalDL(netype.ITBBU, cellModel, spsIntervalDL); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_spsIntervalDL,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_spsIntervalDL error.", ex); + } + return rtn; + } + + public async Task PhyChannelFDDLTE_swchTTIBundling(Cell cell, string swchTTIBundling) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPhyChannelFDDLTE_swchTTIBundling(netype.ITBBU, cellModel, swchTTIBundling); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PhyChannelFDDLTE_swchTTIBundling,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PhyChannelFDDLTE_swchTTIBundling error.", ex); + } + return rtn; + } + + public async Task VoLTEConfigCellFDDLTE_ttiBHarqNum(Cell cell, string ttiBHarqNum) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyVoLTEConfigCellFDDLTE_ttiBHarqNum(netype.ITBBU, cellModel, ttiBHarqNum); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} VoLTEConfigCellFDDLTE_ttiBHarqNum,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} VoLTEConfigCellFDDLTE_ttiBHarqNum error.", ex); + } + return rtn; + } + + public async Task PDCP_rlcMode(Cell cell, string rlcMode) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyPDCP_rlcMode(netype.ITBBU, cellModel, rlcMode); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_rlcMode,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} PDCP_rlcMode error.", ex); + } + return rtn; + } + + public async Task RLC_snFieldLengthUM(Cell cell, string snFieldLengthUM) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyRLC_snFieldLengthUM(netype.ITBBU, cellModel, snFieldLengthUM); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} RLC_snFieldLengthUM,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} RLC_snFieldLengthUM error.", ex); + } + return rtn; + } + + public async Task RLC_snFieldLengthAM(Cell cell, string snFieldLengthAM) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyRLC_snFieldLengthAM(netype.ITBBU, cellModel, snFieldLengthAM); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} RLC_snFieldLengthAM,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} RLC_snFieldLengthAM error.", ex); + } + return rtn; + } + + public async Task QoSServiceClassLTE_rlcMode(Cell cell, string rlcMode) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyQoSServiceClassLTE_rlcMode(netype.ITBBU, cellModel, rlcMode); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_rlcMode,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_rlcMode error.", ex); + } + return rtn; + } + + public async Task QoSServiceClassLTE_sequenceNumType(Cell cell, string sequenceNumType) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyQoSServiceClassLTE_sequenceNumType(netype.ITBBU, cellModel, sequenceNumType); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_sequenceNumType,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} QoSServiceClassLTE_sequenceNumType error.", ex); + } + return rtn; + } + + public async Task SADRXCycle_drxLongCycle(Cell cell, string drxLongCycle) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftySADRXCycle_drxLongCycle(netype.ITBBU, cellModel, drxLongCycle); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SADRXCycle_drxLongCycle,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SADRXCycle_drxLongCycle error.", ex); + } + return rtn; + } + + public async Task SADRXCycle_drxValid(Cell cell, string drxValid) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftySADRXCycle_drxValid(netype.ITBBU, cellModel, drxValid); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SADRXCycle_drxValid,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SADRXCycle_drxValid error.", ex); + } + return rtn; + } + + public async Task ServiceDrxFDDLTE_longDrxCyc(Cell cell, string longDrxCyc) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyServiceDrxFDDLTE_longDrxCyc(netype.ITBBU, cellModel, longDrxCyc); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceDrxFDDLTE_longDrxCyc,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceDrxFDDLTE_longDrxCyc error.", ex); + } + return rtn; + } + + public async Task ServiceDrxFDDLTE_perQCIDrxSwch(Cell cell, string perQCIDrxSwch) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyServiceDrxFDDLTE_perQCIDrxSwch(netype.ITBBU, cellModel, perQCIDrxSwch); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceDrxFDDLTE_perQCIDrxSwch,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceDrxFDDLTE_perQCIDrxSwch error.", ex); + } + return rtn; + } + + public async Task MACCellGroupConfig_prdBsrTimer(Cell cell, string prdBsrTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyMACCellGroupConfig_prdBsrTimer(netype.ITBBU, cellModel, prdBsrTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} MACCellGroupConfig_prdBsrTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} MACCellGroupConfig_prdBsrTimer error.", ex); + } + return rtn; + } + + public async Task ServiceMACFDDLTE_prdBsrTimer(Cell cell, string prdBsrTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyServiceMACFDDLTE_prdBsrTimer(netype.ITBBU, cellModel, prdBsrTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceMACFDDLTE_prdBsrTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceMACFDDLTE_prdBsrTimer error.", ex); + } + return rtn; + } + + public async Task ServiceMACFDDLTE_retxBsrTimer(Cell cell, string retxBsrTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyServiceMACFDDLTE_retxBsrTimer(netype.ITBBU, cellModel, retxBsrTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceMACFDDLTE_retxBsrTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} ServiceMACFDDLTE_retxBsrTimer error.", ex); + } + return rtn; + } + + + public async Task NRPhysicalCellDU_FNRparamSuite(Cell cell, string FNRparamSuite) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + // rtn = await client.ModiftyNRPhysicalCellDU_FNRparamSuite(netype.ITBBU, cellModel, FNRparamSuite); + rtn = 0; + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_FNRparamSuite,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_FNRparamSuite error.", ex); + } + return rtn; + } + public async Task SSBlock_smtc1PrdAndOffset(Cell cell, string smtc1PrdAndOffset) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftySSBlock_smtc1PrdAndOffset(netype.ITBBU, cellModel, smtc1PrdAndOffset); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SSBlock_smtc1PrdAndOffset,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SSBlock_smtc1PrdAndOffset error.", ex); + } + return rtn; + } + public async Task SSBlock_duration(Cell cell, string duration) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftySSBlock_duration(netype.ITBBU, cellModel, duration); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SSBlock_duration,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SSBlock_duration error.", ex); + } + return rtn; + } + public async Task NRPhysicalCellDU_nTimingAdvanceOffset(Cell cell, string nTimingAdvanceOffset) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyNRPhysicalCellDU_nTimingAdvanceOffset(netype.ITBBU, cellModel, nTimingAdvanceOffset); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_nTimingAdvanceOffset,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} NRPhysicalCellDU_nTimingAdvanceOffset error.", ex); + } + return rtn; + } + public async Task InactiveCfgForServ_ueinactiveTimer(Cell cell, string ueinactiveTimer) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + + rtn = await client.ModiftyInactiveCfgForServ_ueInactiveTimer(netype.ITBBU, cellModel, ueinactiveTimer); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} InactiveCfgForServ_inactiveTimer,result:{rtn}."); + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} InactiveCfgForServ_inactiveTimer error.", ex); + } + return rtn; + } + + public async Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + CellParameter cellParameter = new CellParameter(); + cellParameter.PCI = CarrierPCI; + cellParameter.ULssbFrequency = earfcnUL; + cellParameter.DLssbFrequency = earfcnDL; + await client.ModifyParameter(netype.ITBBU, cellModel, cellParameter); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequencyAndPCI"); + rtn = 0; + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequencyAndPCI error.", ex); + } + return rtn; + } + + public async Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait) + { + int rtn; + try + { + using var client = await GetClient(); + await client.CreateToken(); + await client.RefreshToken(); + + var cellModel = new CellModel + { + Name = cell.Name, + MobileStandard = (CellMobileStandard)cell.MobileStandard, + LocalId = cell.CellId.ToString(), + MoId = cell.MoId, + ssbFrequency = cell.ssbFrequency, + ZTEgNBId = cell.NodeBId.ToString(), + ZTEpLMNId = cell.mcc+cell.mnc, + ZTEManagedElement = cell.ManagedElement, + ZTESubNetwork = cell.SubNetwork + }; + CellParameter cellParameter = new CellParameter(); + cellParameter.PCI = CarrierPCI; + cellParameter.ULssbFrequency = earfcnUL; + cellParameter.DLssbFrequency = earfcnDL; + await client.ModifyParameter(netype.ITBBU, cellModel, cellParameter); + + //if (Common.IsCatchDeviceControlLog) + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequencyAndPCI"); + rtn = 0; + } + catch (Exception ex) + { + rtn = -1; + //DeviceControlLogger.Logger.Info($"{cell.Name} SetCarrierFrequencyAndPCI error.", ex); + } + return rtn; + } + + public int BeforTest() + { + throw new NotImplementedException(); + } + + public int AfterTest() + { + throw new NotImplementedException(); + } + + public int Initial() + { + return _rtn; + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs deleted file mode 100644 index 90f8afb8..00000000 --- a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs +++ /dev/null @@ -1,36 +0,0 @@ -using MTNet.Application.IDAL; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MTNet.Application.DriverLibrary.BaseStation; - -public class ZTEBaseStationTester : IBaseStationTester -{ - public int Connect() - { - throw new NotImplementedException(); - } - - public int Close() - { - throw new NotImplementedException(); - } - - public int BeforTest() - { - throw new NotImplementedException(); - } - - public int AfterTest() - { - throw new NotImplementedException(); - } - - public void Dispose() - { - throw new NotImplementedException(); - } -} diff --git a/Admin.NET/MTNet.Application/Entity/Cell.cs b/Admin.NET/MTNet.Application/Entity/Cell.cs index d58963d3..442921b6 100644 --- a/Admin.NET/MTNet.Application/Entity/Cell.cs +++ b/Admin.NET/MTNet.Application/Entity/Cell.cs @@ -1,5 +1,7 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -8,7 +10,7 @@ namespace MTNet.Application.Entity; [DeviceTable] [SugarTable(null, "小区信息表")] -public class Cell : EntityBase +public class Cell : EntityBase { /// /// 基站配置参数ID @@ -58,6 +60,134 @@ public class Cell : EntityBase [SugarColumn(ColumnDescription = "厂家类型")] public BaseStationTesterTypeEnum FactoryType { get; set; } + /// + /// 子网ID + /// + [SugarColumn(ColumnDescription = "子网ID")] + public string? SubNetwork { get; set; } + + /// + /// 网元ID + /// + [SugarColumn(ColumnDescription = "网元ID")] + public string? ManagedElement { get; set; } + + /// + /// 网元名称 + /// + [SugarColumn(ColumnDescription = "网元名称")] + public string? NetworkElementName { get; set; } + /// + /// 下行带宽 + /// + [SugarColumn(ColumnDescription = "下行带宽")] + public string? DlBandwidth { set; get; } + /// + /// 上行带宽 + /// + [SugarColumn(ColumnDescription = "上行带宽")] + public string? UlBandwidth { set; get; } + + + /// + /// 移动国家码 + /// + [SugarColumn(ColumnDescription = "移动国家码")] + public string? mcc { get; set; } + /// + /// 移动网络码 + /// + [SugarColumn(ColumnDescription = "移动网络码")] + public string? mnc { set; get; } + /// + /// 频带 + /// + [SugarColumn(ColumnDescription = "频带")] + public string? Freqband { set; get; } + /// + /// 移动制式 + /// + [SugarColumn(ColumnDescription = "移动制式")] + public CellMobileStandardEnum MobileStandard { get; set; } + + /// + /// ssb频点 + /// + [SugarColumn(ColumnDescription = "ssb频点")] + public string? ssbFrequency { get; set; } + + /// + /// 对象标识 + /// + [SugarColumn(ColumnDescription = "对象标识")] + public string? MoId { get; set; } + /// + /// Idconfiguration + /// + [SugarColumn(ColumnDescription = "Id配置信息")] + public string? Idconfiguration { get; set; } + /// + /// IPAddres + /// + [SugarColumn(ColumnDescription = "IP地址")] + public string? IPAddress { get; set; } + /// + /// 端口 + /// + [SugarColumn(ColumnDescription = "端口")] + public int Port { get; set; } + /// + /// NCI + /// + [SugarColumn(ColumnDescription = "NCI")] + public string? NCI { get; set; } + /// + /// DUId + /// + [SugarColumn(ColumnDescription = "DUId")] + public string? NRCellDUId { get; set; } + /// + /// CUId + /// + [SugarColumn(ColumnDescription = "CUId")] + public string? NRCellCUId { get; set; } + /// + /// DUFunction + /// + [SugarColumn(ColumnDescription = "DUFunction")] + public string? GNBDUFunction { get; set; } + /// + /// SectorCarrier + /// + [SugarColumn(ColumnDescription = "SectorCarrier")] + public string? NRSectorCarrier { get; set; } + /// + /// 频点关系 + /// + [SugarColumn(ColumnDescription = "FreqRelationInfo")] + public string? FreqRelationInfo{ get; set; } + [NotMapped] + [SugarColumn(IsIgnore = true)] + public List? NRFreqRelationList { + get { + List result = new List(); + if (!string.IsNullOrEmpty(FreqRelationInfo)) { + var li=JsonConvert.DeserializeObject>(FreqRelationInfo); + foreach (var item in li) + { + result.Add(item); + } + } + return result; + }set { } + } + + + public string GetZTENElement() + { + return "SubNetwork=" + SubNetwork + ",ManagedElement=" + ManagedElement; + } + public override string ToString() { return $"{NodeBId}-{CellId}"; diff --git a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs index 941b96f8..ebb2f9a0 100644 --- a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs +++ b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs @@ -51,9 +51,12 @@ public enum DeviceTypeEnum [Description("网络类型枚举")] public enum NetworkTypeEnum { GSM, WCDMA, LTE, NR, WLAN, BT } +[Description("移动制式枚举")] +public enum CellMobileStandardEnum { LTE,TDDLTE, FDDLTE,NR, TDDNR,FDDNR,SUL, SDL } +[Description("小区状态枚举")] +public enum CellStatusEnum{Locked,Unlocked} [Description("通讯类型枚举")] public enum CommunicationTypeEnum { Serial_Port, Socket, GPIB, USB, HTTP, SSH } - [Description("基站型号枚举")] public enum BaseStationTesterTypeEnum { ZTE, Nokia, Huawei, Ericsson, Virtual } [Description("信道仿真器型号枚举")] diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStation/IEricssonBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IEricssonBaseStationTester.cs new file mode 100644 index 00000000..76883047 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IEricssonBaseStationTester.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IEricssonBaseStationTester : IBaseStationTester +{ +} diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStation/IHuaweiBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IHuaweiBaseStationTester.cs new file mode 100644 index 00000000..5b768954 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IHuaweiBaseStationTester.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IHuaweiBaseStationTester : IBaseStationTester +{ +} diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStation/INokiaBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStation/INokiaBaseStationTester.cs new file mode 100644 index 00000000..b13dcee4 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStation/INokiaBaseStationTester.cs @@ -0,0 +1,39 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface INokiaBaseStationTester : IBaseStationTester +{ + /// + /// 诺基亚闭塞小区 + /// + /// + /// + /// + /// + Task NokiaLock(string IPAddres, int Port, string distName); + /// + /// 诺基亚解闭塞小区 + /// + /// + /// + /// + /// + Task NokiaUnLock(string IPAddres, int Port, string distName); + /// + /// 修改诺基亚小区参数 + /// + /// + /// + /// 小区dn + /// 参数名称 + /// 修改值 + /// + int NokiaModifySCF(string IPAddres, int Port, string DistName, string ParameterName, string ModifyValue); + Task ModifyPaging(Cell cell, string drxDefaultPaging); +} diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStation/IVirtualBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IVirtualBaseStationTester.cs new file mode 100644 index 00000000..fda88286 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IVirtualBaseStationTester.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IVirtualBaseStationTester : IBaseStationTester +{ +} diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStation/IZTEBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IZTEBaseStationTester.cs new file mode 100644 index 00000000..be349097 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStation/IZTEBaseStationTester.cs @@ -0,0 +1,83 @@ +using MTNet.Application.DriverLibrary.BaseStation.ZTE.Manage.Models.EasyApi; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IZTEBaseStationTester : IBaseStationTester +{ + /// + /// 修改小区参数 + /// + /// 小区 + /// 修改的小区参数 + /// + Task ModifyBSParameter(Cell cell, CellParameter cellParameter); + /// + /// 中兴外部NR邻接小区nRPCI + /// + /// + /// + /// + /// + Task ModifyExternalNRCellCU(Cell cell, Cell relationCell, string nRPCI); + #region ZTE + + Task PCCHConfig_defaultPagingCycle(Cell cell, string defaultPagingCycle); + Task PagingLTE_defaultPagingCycle(Cell cell, string defaultPagingCycle); + + Task PDCP_profile(Cell cell, string drb5qi, bool profile0x0001 = false, bool profile0x0002 = false, bool profile0x0004 = false); + Task PDCPLTE_profile(Cell cell, string qCI, bool profile1 = false, bool profile2 = false, bool profile4 = false, bool profile6 = false); + + Task NRPhysicalCellDU_ulCceRatio4Coreset0(Cell cell, string ulCceRatio4Coreset0); + + Task PHR_prdPhrTimer(Cell cell, string prdPhrTimer); + Task PHR_phtPhrTimer(Cell cell, string phtPhrTimer); + + Task SRSConfig_srsPeriod(Cell cell, string srsPeriod); + Task PhyChannelFDDLTE_srsEnable(Cell cell, string srsEnable); + + Task PowerControlDLFDDLTE_paForDTCH(Cell cell, string paForDTCH); + + Task PagingLTE_modificationPeriodCoeff(Cell cell, string modificationPeriodCoeff); + + Task RachConfigGeneric_preambleTransMax(Cell cell, string preambleTransMax); + Task PrachFDDLTE_preambleTransMax(Cell cell, string preambleTransMax); + + Task PDCP_snSizeUl(Cell cell, string snSizeUl); + Task PDCP_snSizeDl(Cell cell, string snSizeDl); + Task QoSServiceClassLTE_sequenNumLenth(Cell cell, string sequenNumLenth); + + Task QoSServiceClassLTE_spsIntervalUL(Cell cell, string spsIntervalUL); + Task QoSServiceClassLTE_spsIntervalDL(Cell cell, string spsIntervalDL); + + Task PhyChannelFDDLTE_swchTTIBundling(Cell cell, string swchTTIBundling); + Task VoLTEConfigCellFDDLTE_ttiBHarqNum(Cell cell, string ttiBHarqNum); + + Task PDCP_rlcMode(Cell cell, string rlcMode); + Task RLC_snFieldLengthUM(Cell cell, string snFieldLengthUM); + Task RLC_snFieldLengthAM(Cell cell, string snFieldLengthAM); + Task QoSServiceClassLTE_rlcMode(Cell cell, string rlcMode); + Task QoSServiceClassLTE_sequenceNumType(Cell cell, string sequenceNumType); + + Task SADRXCycle_drxLongCycle(Cell cell, string drxLongCycle); + Task SADRXCycle_drxValid(Cell cell, string drxValid); + Task ServiceDrxFDDLTE_longDrxCyc(Cell cell, string longDrxCyc); + Task ServiceDrxFDDLTE_perQCIDrxSwch(Cell cell, string perQCIDrxSwch); + + Task MACCellGroupConfig_prdBsrTimer(Cell cell, string prdBsrTimer); + Task ServiceMACFDDLTE_prdBsrTimer(Cell cell, string prdBsrTimer); + Task ServiceMACFDDLTE_retxBsrTimer(Cell cell, string retxBsrTimer); + + Task NRPhysicalCellDU_nTimingAdvanceOffset(Cell cell, string value); + Task InactiveCfgForServ_ueinactiveTimer(Cell cell, string value); + Task SSBlock_duration(Cell cell, string value); + Task SSBlock_smtc1PrdAndOffset(Cell cell, string value); + Task NRPhysicalCellDU_FNRparamSuite(Cell cell, string value); + + #endregion +} diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs index eab3c841..6a065e08 100644 --- a/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs @@ -1,4 +1,5 @@ -using System; +using MTNet.Application.Entity; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,4 +9,191 @@ namespace MTNet.Application.IDAL; public interface IBaseStationTester : IDeviceBase { + + int Initial(); + + /// + /// 修改上下行频点+PCI + /// + /// + /// + /// + /// + /// 用到的小区 + /// + /// + Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, List cells, bool wait); + /// + /// 修改上下行频点+PCI + /// + /// + /// + /// + /// + /// + /// + Task SetCarrierFrequencyAndPCI(Cell cell, string earfcnDL, string earfcnUL, string CarrierPCI, bool wait); + + + /// + /// 获取小区数据 + /// + /// + Task> GetCells(); + + /// + /// 小区状态闭塞解闭塞 + /// + /// 小区 + /// True闭塞 false解闭塞 + /// + Task SetCellState(Cell cell, bool state); + + /// + /// 修改小区带宽 + /// + /// + /// + /// 下行带宽 + /// + /// + Task SetBandwidth(Cell cell, double BandWidth, double BandWidthUl, bool wait); + + /// + /// 修改小区PCI + /// + /// + /// + /// + Task SetCarrierPCI(Cell cell, string CarrierPCI, bool wait); + Task SetCarrierPCI(List<(Cell, string)> cellPcis, bool wait); + + /// + /// 修改载波中心频点 + /// + /// + /// + /// + Task SetCarrierFrequency(Cell cell, string Frequency, bool wait); + /// + /// 修改频点 + /// + /// + /// 下行频点 + /// 上行频点 + /// + /// + Task SetCarrierFrequency(Cell cell, string earfcnDL, string earfcnUL, bool wait); + + /// + /// 修改最小接入电平(例:qRxLevMin为:-70,qRxLevMinOffsetCell为:8。最小接入电平计算 -70 + 8 =-62*2 最小接入电平为-124) + /// + /// + /// 小区选择所需的最小RSRP接收电平 + /// 小区选择所需的最小接收电平偏移量 + /// + Task SetCellSelection(Cell cell, string qRxLevMin, string qRxLevMinOffsetCell); + /// + /// 修改最小接入电平 + /// + /// + /// 最终修改结果除2向下取整 + /// + Task SetCellSelection(Cell cell, double LevelValue); + + /// + /// 修改A1门限 + /// + /// + /// + /// + Task SetA1Threshold(Cell cell, int rsrpThresholdA1, int hysteresisA1); + /// + /// a2门限 + /// + /// + /// A2事件判决的RSRP绝对门限 + /// 事件测量判决迟滞 + /// + Task SetA2Threshold(Cell cell, int rsrpThresholdA2, int hysteresisA2); + /// + /// a3门限 + /// + /// + /// A3事件偏移 + /// 事件测量判决迟滞 + /// + Task SetA3Threshold(Cell cell, double eventOffset, int hysteresisA3); + /// + /// a4 + /// + /// + /// A4/A5事件邻区判决的RSRP绝对门限 + /// 事件测量判决迟滞 + /// + Task SetA4Threshold(Cell cell, int rsrpThresholdA4, int hysteresisA4); + /// + /// a5 + /// + /// + /// A5事件服务小区判决的RSRP绝对门限 + /// A4/A5事件邻区判决的RSRP绝对门限 + /// 事件测量判决迟滞 + /// /// 诺基亚4G A5门限 目标频点 + /// + Task SetA5Threshold(Cell cell, int rsrpThreshold, int A5Thrd1Rsrp, int hysteresisA5, int LNHOIF_eutraCarrierInfo); + /// + /// 修改B1门限 + /// + /// + /// + /// + /// + Task SetB1Threshold(Cell cell, int value1); + /// + /// 修改B2门限 + /// + /// + /// + /// + /// + Task SetB2Threshold(Cell cell, int value1, int value2); + /// + /// 创建邻区 + /// + /// 服务小区 + /// 邻小区 + /// + Task CreateRelations(Cell FirstCell, Cell SecondCell); + /// + /// 删除邻区 + /// + /// 服务小区 + /// 邻小区 + /// + Task DeleteRelations(Cell FirstCell, Cell SecondCell); + /// + /// 小区重选优先级 + /// + /// + /// 该参数是同频小区重选的优先级。该参数配置越小,表示同频频点邻区的重选优先级越低 + /// + Task ModifyCellResel(Cell cell, int cellReselectionPriority); + /// + /// 用户非激活定时器 + /// + /// + /// + /// 该参数是基站侧检测终端是否有用户数据的定时器时长 + /// 1s,2s,3s,5s,7s,10s,15s,20s,25s,30s,40s,50s,1m,1m20s,1m40s,2m,2m30s,3m,3m30s,4m,5m,6m,7m,8m,9m,10m,12m,14m,17m,20m,24m,28m,33m,38m,44m,50m,1h,1h30m,2h,2h30m,3h,3h30m,4h,5h,6h,8h,10h,13h,16h,20h,1d,1d12h,2d,2d12h,3d,4d,5d,6d,7d,10d,14d,19d,24d,30d + /// + Task ModifyInactiveParameter(Cell cell, int inactiveTimer); + /// + /// 小区重选起测RSRP门限 + /// + /// + /// + /// True同频 False异频 + /// + Task ModifyIntraFReselection(Cell cell, double sIntraSearchP, bool SameFrequency); } diff --git a/Admin.NET/MTNet.Application/IDAL/Utils/Algorithms.cs b/Admin.NET/MTNet.Application/IDAL/Utils/Algorithms.cs new file mode 100644 index 00000000..81055e9c --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/Utils/Algorithms.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL.Utils +{ + public class Algorithms + { + #region 通用算法 + + /// + /// 删除字节数组中的零字节 + /// + /// + /// + public static byte[] Decode(byte[] packet) + { + byte[] temp; + if (packet.Length > 0) + { + if (packet.Where(x => x == 0).Count() == packet.Length) + { + return Array.Empty(); + } + + var i = packet.Length - 1; + while (packet[i] == 0) + { + --i; + } + temp = new byte[i + 1]; + Array.Copy(packet, temp, i + 1); + } + else + { + temp = new byte[0]; + } + return temp; + } + + /// + /// 字节数组转字符串 + /// + /// + /// + public static string ConvertByteArrayToString(byte[] bytes) + { + string str = string.Empty; + + for (int i = 0; i < bytes.Length; i++) + { + str += bytes[i].ToString("X2") + " "; + } + return str; + } + + #endregion + + #region 坐标相关类算法 + #endregion + } +} diff --git a/Admin.NET/MTNet.Application/IDAL/Utils/EnumHelper.cs b/Admin.NET/MTNet.Application/IDAL/Utils/EnumHelper.cs new file mode 100644 index 00000000..48fe3a08 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/Utils/EnumHelper.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL.Utils +{ + /// + /// 枚举帮助类 + /// + public static class EnumHelper + { + /// + /// 获取枚举项的字符串集合 + /// + /// 枚举类型 + /// + public static List GetEnumContents() where T : Enum + { + return Enum.GetNames(typeof(T)).ToList(); + } + + /// + /// 获取枚举所有项的描述集合 + /// + /// + /// + public static List GetEnumDescriptions() where T : Enum + { + return Enum.GetValues(typeof(T)).Cast().Select(x => x.GetDescription()).ToList(); + } + + ///// + ///// 获取枚举值的描述(需要添加[Description]特性) + ///// + ///// + ///// + //public static string GetDescription(this Enum value) + //{ + // Type type = value.GetType(); + // string name = Enum.GetName(type, value); + // if (name != null) + // { + // FieldInfo field = type.GetField(name); + // if (field != null) + // { + // DescriptionAttribute attr = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) as DescriptionAttribute; + // if (attr != null) + // { + // return attr.Description; + // } + // } + // } + // return null; + //} + + /// + /// 获取枚举值的分类(需要添加[Category]特性) + /// + /// + /// + public static string GetCategory(this Enum value) + { + Type type = value.GetType(); + string name = Enum.GetName(type, value); + if (name != null) + { + FieldInfo field = type.GetField(name); + if (field != null) + { + CategoryAttribute attr = Attribute.GetCustomAttribute(field, typeof(CategoryAttribute)) as CategoryAttribute; + if (attr != null) + { + return attr.Category; + } + } + } + return null; + } + + /// + /// 获取枚举值的分类索引(需要添加[CategoryIndex]特性) + /// + /// + /// + public static int GetCategoryIndex(this Enum value) + { + Type type = value.GetType(); + string name = Enum.GetName(type, value); + if (name != null) + { + FieldInfo field = type.GetField(name); + if (field != null) + { + CategoryIndexAttribute attr = Attribute.GetCustomAttribute(field, typeof(CategoryIndexAttribute)) as CategoryIndexAttribute; + if (attr != null) + { + return attr.Index; + } + } + } + return -1; + } + + /// + /// 获取枚举值的分类索引(需要添加[CategoryIndex]特性) + /// + /// + /// + public static string GetCommand(this Enum value) + { + Type type = value.GetType(); + string name = Enum.GetName(type, value); + if (name != null) + { + FieldInfo field = type.GetField(name); + if (field != null) + { + CommandAttribute attr = Attribute.GetCustomAttribute(field, typeof(CommandAttribute)) as CommandAttribute; + if (attr != null) + { + return attr.Command; + } + } + } + return string.Empty; + } + + /// + /// 将描述转成枚举 + /// + /// + /// + /// + public static T EnumConvertByDescription(string desc) + { + var fields = typeof(T).GetFields(BindingFlags.Static | BindingFlags.Public); + var field = fields.FirstOrDefault(w => (w.GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute)?.Description == desc); + if (field == null) + return default(T); + return (T)Enum.Parse(typeof(T), field.Name); + } + + /// + /// 通过名称转换成枚举 + /// + /// + /// 枚举的名称 + /// + public static T ConvertToEnum(string enumStr) + { + var fields = typeof(T).GetFields(BindingFlags.Static | BindingFlags.Public); + var field = fields.FirstOrDefault(w => w.Name == enumStr); + if (field == null) + return default(T); + return (T)Enum.Parse(typeof(T), enumStr); + } + + /// + /// 将描述转成枚举 + /// + /// 类型 + /// + /// + public static object EnumConvertByDescription(Type type, string desc) + { + var fields = type.GetFields(BindingFlags.Static | BindingFlags.Public); + var field = fields.FirstOrDefault(w => (w.GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute)?.Description == desc); + if (field == null) + return null; + return Enum.Parse(type, field.Name); + } + } +} diff --git a/Admin.NET/MTNet.Application/IDAL/Utils/ErrorCodeHelper.cs b/Admin.NET/MTNet.Application/IDAL/Utils/ErrorCodeHelper.cs new file mode 100644 index 00000000..d27a3029 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/Utils/ErrorCodeHelper.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL.Utils +{ + /// + /// 异常代码帮助类 + /// + public class ErrorCodeHelper + { + /// + /// 获取系统异常代码 + /// + /// + /// + public static string GetSysErrorCode(int errorCode) + { + return GetErrorCode(110, 100, errorCode); + } + + /// + /// 获取设备异常代码 + /// + /// + /// + /// + public static string GetDeviceErrorCode(DeviceTypeEnum deviceType, int errorCode) + { + int errorCode2 = 0; + switch (deviceType) + { + case DeviceTypeEnum.BaseStationTester: + errorCode2 = 100; + break; + case DeviceTypeEnum.ChannelEmulator: + errorCode2 = 200; + break; + case DeviceTypeEnum.PhaseShifter: + errorCode2 = 300; + break; + case DeviceTypeEnum.ProgrammableAttenuator: + errorCode2 = 400; + break; + //case DeviceTypeEnum.SwitchBox: + // errorCode2 = 500; + // break; + case DeviceTypeEnum.Turntable: + errorCode2 = 600; + break; + case DeviceTypeEnum.UserEquipment: + errorCode2 = 700; + break; + default: + break; + } + return GetErrorCode(120, errorCode2, errorCode); + } + + /// + /// 获取操作异常代码 + /// + /// + /// + public static string GetOperatorErrorCode(int errorCode) + { + return GetErrorCode(130, 100, errorCode); + } + + /// + /// 获取异常代码 + /// + /// 一级异常代码 + /// 二级异常代码 + /// 三级异常代码 + /// + public static string GetErrorCode(int errorCode1, int errorCode2, int errorCode3) + { + return $"-{errorCode1:D3}{errorCode2:D3}{errorCode3:D3}"; + } + } +} diff --git a/Admin.NET/MTNet.Application/IDAL/Utils/IEnumerableHelper.cs b/Admin.NET/MTNet.Application/IDAL/Utils/IEnumerableHelper.cs new file mode 100644 index 00000000..4d57e1fc --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/Utils/IEnumerableHelper.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL.Utils +{ + public static class IEnumerableHelper + { + /// + /// List 转 DataTable + /// + /// + /// + /// + public static DataTable ToDataTable(this List list) + { + DataTable dataTable = new DataTable(); + + // 获取第一个对象的属性作为列名 + PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(typeof(T)); + foreach (PropertyDescriptor prop in properties) + { + dataTable.Columns.Add(prop.Name, prop.PropertyType); + } + + // 将List中的对象转换为DataRow并添加到DataTable中 + foreach (T item in list) + { + DataRow row = dataTable.NewRow(); + foreach (PropertyDescriptor prop in properties) + { + row[prop.Name] = prop.GetValue(item) ?? DBNull.Value; + } + dataTable.Rows.Add(row); + } + + return dataTable; + } + + /// + /// 检查集合是否为空 + /// + public static IEnumerable Safe(this IEnumerable source) + { + if (source == null) + { + yield break; + } + + foreach (var item in source) + { + yield return item; + } + } + + //if (myList.Safe().Any()) + // { + // //执行逻辑 + // } + + /// + /// 判断是否为List + /// + /// + /// + public static bool IsCollection(System.Reflection.PropertyInfo property) + { + return property.PropertyType.IsGenericType && property.PropertyType.GetGenericTypeDefinition() == typeof(List<>); + } + + /// + /// 检查给定的 Type 是否可以被赋值给 IEnumerable 类型(即是否实现了 IEnumerable 或其派生接口),同时排除了 string 类型。 + /// + /// + /// + public static bool IsCollection(Type type) + { + return typeof(IEnumerable).IsAssignableFrom(type) && type != typeof(string); + } + + public static IEnumerable GetEnumerableItems(object collection) + { + if (collection is IEnumerable enumerable) + { + foreach (object item in enumerable) + { + yield return item; + } + } + else + { + throw new ArgumentException("The provided object is not an enumerable."); + } + } + } +} diff --git a/Admin.NET/MTNet.Application/IDAL/Utils/TaskHelper.cs b/Admin.NET/MTNet.Application/IDAL/Utils/TaskHelper.cs new file mode 100644 index 00000000..5a8daa79 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/Utils/TaskHelper.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL.Utils +{ + public static class TaskHelper + { + // 有返回值 + public static async Task TimeoutAfter(this Task task, TimeSpan timeout) + { + using (var timeoutCancellationTokenSource = new CancellationTokenSource()) + { + var completedTask = await Task.WhenAny(task, Task.Delay(timeout, timeoutCancellationTokenSource.Token)); + if (completedTask == task) + { + timeoutCancellationTokenSource.Cancel(); + return await task; // Very important in order to propagate exceptions + } + else + { + throw new TimeoutException("The operation has timed out."); + } + } + } + + // 无返回值 + public static async Task TimeoutAfter(this Task task, TimeSpan timeout) + { + using (var timeoutCancellationTokenSource = new CancellationTokenSource()) + { + var completedTask = await Task.WhenAny(task, Task.Delay(timeout, timeoutCancellationTokenSource.Token)); + if (completedTask == task) + { + timeoutCancellationTokenSource.Cancel(); + await task; // Very important in order to propagate exceptions + } + else + { + throw new TimeoutException("The operation has timed out."); + } + } + } + } +} diff --git a/Admin.NET/MTNet.Application/Job/CellJob.cs b/Admin.NET/MTNet.Application/Job/CellJob.cs index 99713fed..33bd2ed1 100644 --- a/Admin.NET/MTNet.Application/Job/CellJob.cs +++ b/Admin.NET/MTNet.Application/Job/CellJob.cs @@ -1,6 +1,13 @@ -using Furion.Schedule; +using Admin.NET.Core; +using Furion.Schedule; using Microsoft.Extensions.Logging; +using MTNet.Application.DriverLibrary.BaseStation.Ericsson; +using MTNet.Application.DriverLibrary.BaseStation.Huawei; +using MTNet.Application.DriverLibrary.BaseStation.Nokia; +using MTNet.Application.DriverLibrary.BaseStation.Virtual; +using MTNet.Application.DriverLibrary.BaseStation.ZTE; using MTNet.Application.Entity; +using MTNet.Application.IDAL; using MTNet.Application.Service; using System; using System.Collections.Generic; @@ -19,16 +26,17 @@ public class CellJob : IJob { private readonly IServiceScopeFactory _scopeFactory; private readonly ILogger _logger; - - public CellJob(IServiceScopeFactory scopeFactory, ILoggerFactory loggerFactory) + private readonly SqlSugarRepository _deviceRep; + public CellJob(IServiceScopeFactory scopeFactory, SqlSugarRepository deviceRep, ILoggerFactory loggerFactory) { + _deviceRep = deviceRep; _scopeFactory = scopeFactory; _logger = loggerFactory.CreateLogger(nameof(CellJob)); } public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) { - var cellList = GetCellList(); + var cellList =await GetCellList(); using var serviceScope = _scopeFactory.CreateScope(); @@ -46,36 +54,77 @@ public class CellJob : IJob _logger.LogInformation(msg); } } - /// /// 从各基站获取小区列表 /// /// - public List GetCellList() + public async Task> GetCellList() { - List cellList = new() - { - new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-13", NodeBId = 9494, CellId = 13, PCI = 13, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-3", NodeBId = 9494, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-4", NodeBId = 9494, CellId = 4, PCI = 4, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-3", NodeBId = 9090, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-7", NodeBId = 9090, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-5", NodeBId = 9191, CellId = 5, PCI = 5, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-7", NodeBId = 9191, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-10", NodeBId = 9191, CellId = 10, PCI = 10, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-15", NodeBId = 9191, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"96-7", NodeBId = 96, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"96-8", NodeBId = 96, CellId = 8, PCI = 8, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"96-9", NodeBId = 96, CellId = 9, PCI = 9, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"141-181", NodeBId = 141, CellId = 181, PCI = 181, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-12", NodeBId = 520001, CellId = 12, PCI = 12, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-92", NodeBId = 520001, CellId = 92, PCI = 92, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000003, Name = $"50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, - new AddCellInput() { DeviceId = 1300000000004, Name = $"50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, - }; - return cellList; + List cells=new List(); + IBaseStationTester baseStationTester = null; + var basestationlist=_deviceRep.AsQueryable().Where(x=>x.DeviceTypeConfig==DeviceTypeEnum.BaseStationTester).ToList(); + foreach (var bs in basestationlist) { + var config = new DeviceAddrConfig() { AddrConfig = bs.AddrConfig, PortConfig = bs.PortConfig, UserName = bs.UserName, Password = bs.Password }; + var deviceid = bs.Id; + switch (bs.DeviceModelConfig) { + case (int)BaseStationTesterTypeEnum.Huawei: + baseStationTester = new HuaweiBaseStationTester(config); + break; + case (int)BaseStationTesterTypeEnum.ZTE: + baseStationTester = new ZTEBaseStationTester(config); + break; + case (int)BaseStationTesterTypeEnum.Nokia: + baseStationTester = new NokiaBaseStationTester(config); + break; + case (int)BaseStationTesterTypeEnum.Ericsson: + baseStationTester = new EricssonBaseStationTester(config); + break; + case (int)BaseStationTesterTypeEnum.Virtual: + baseStationTester = new VirtualBaseStationTester(config); + break; + default: + break; + } + baseStationTester.Connect(); + baseStationTester.Initial(); + var cellbase=await baseStationTester.GetCells(); + foreach (var item in cellbase) + { + item.DeviceId = deviceid; + cells.Add(item); + } + } + return cells; + + + + + + + + //List cellList = new() + //{ + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-13", NodeBId = 9494, CellId = 13, PCI = 13, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-3", NodeBId = 9494, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-4", NodeBId = 9494, CellId = 4, PCI = 4, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-3", NodeBId = 9090, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-7", NodeBId = 9090, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-5", NodeBId = 9191, CellId = 5, PCI = 5, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-7", NodeBId = 9191, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-10", NodeBId = 9191, CellId = 10, PCI = 10, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-15", NodeBId = 9191, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"96-7", NodeBId = 96, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"96-8", NodeBId = 96, CellId = 8, PCI = 8, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"96-9", NodeBId = 96, CellId = 9, PCI = 9, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"141-181", NodeBId = 141, CellId = 181, PCI = 181, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-12", NodeBId = 520001, CellId = 12, PCI = 12, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-92", NodeBId = 520001, CellId = 92, PCI = 92, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + // new AddCellInput() { DeviceId = 1300000000003, Name = $"50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, + // new AddCellInput() { DeviceId = 1300000000004, Name = $"50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, + //}; + //return cellList; } } diff --git a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs index bb0b56ad..30560573 100644 --- a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs @@ -26,7 +26,7 @@ public class DeviceSeedData : ISqlSugarEntitySeedData new DeviceAddrConfig { Name = "Nokia74", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new DeviceAddrConfig { Name = "Nokia79", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new DeviceAddrConfig { Name = "Huawei", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Huawei, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { Name = "Ericsson", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Ericsson, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Ericsson", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Ericsson, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.168.131", PortConfig = 8881, UserName = "181.18.3.3", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new DeviceAddrConfig { Name = "VBS", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //信道仿真器 diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs index 375685f0..8f3b268b 100644 --- a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -150,7 +150,7 @@ public class BaseStationService : IDynamicApiController, ITransient /// [DisplayName("增加小区")] [ApiDescriptionSettings(Name = "Add"), HttpPost] - public async Task Add(AddCellInput input) + public async Task Add(Cell input) { var entity = input.Adapt(); var dtNow = DateTime.Now; diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs index 54d22f88..9edef8d6 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs @@ -38,7 +38,6 @@ public class AddCellInput /// /// 基站ID - /// public int NodeBId { get; set; } /// @@ -65,6 +64,93 @@ public class AddCellInput /// 厂家类型 /// public BaseStationTesterTypeEnum FactoryType { get; set; } + + /// + /// 子网ID + /// + public string? SubNetwork { get; set; } + + /// + /// 网元ID + /// + public string? ManagedElement { get; set; } + + /// + /// 网元名称 + /// + public string? NetworkElementName { get; set; } + /// + /// 下行带宽 + /// + public string? DlBandwidth { set; get; } + /// + /// 上行带宽 + /// + public string? UlBandwidth { set; get; } + + + /// + /// 移动国家码 + /// + public string? mcc { get; set; } + /// + /// 移动网络码 + /// + public string? mnc { set; get; } + /// + /// 频带 + /// + public string? Freqband { set; get; } + /// + /// 移动制式 + /// + public CellMobileStandardEnum MobileStandard { get; set; } + + /// + /// ssb频点 + /// + public string? ssbFrequency { get; set; } + + /// + /// 对象标识 + /// + public string? MoId { get; set; } + /// + /// Idconfiguration + /// + public string? Idconfiguration { get; set; } + /// + /// IPAddres + /// + public string? IPAddress { get; set; } + /// + /// 端口 + /// + public int Port { get; set; } + /// + /// NCI + /// + public string? NCI { get; set; } + /// + /// DUId + /// + public string? NRCellDUId { get; set; } + /// + /// CUId + /// + public string? NRCellCUId { get; set; } + /// + /// DUFunction + /// + public string? GNBDUFunction { get; set; } + /// + /// SectorCarrier + /// + public string? NRSectorCarrier { get; set; } + /// + /// 频点关系 + /// + public string? FreqRelationInfo { get; set; } } public class UpdateCellInput : AddCellInput -- Gitee