diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..94f480de94e1d767531580401cbf13844868e82b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml index 7d5b952477546c481702039851e4acc9303a4673..7a47249a9d7b67d237cbc34f96e188e7810d5187 100644 --- a/.gitee/ISSUE_TEMPLATE/bug.yml +++ b/.gitee/ISSUE_TEMPLATE/bug.yml @@ -1,6 +1,6 @@ name: 🐞 Bug 反馈 -description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有一个组件存在问题,或者某些地方看起来不对劲。 -title: "bug: " +description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有模块/组件存在问题、某些地方看起来不对劲。 +title: "🐞 " labels: [bug] assignees: - Argo @@ -55,16 +55,16 @@ body: 声明:请勿以其他任何方式提供复现工程,不符合要求的提交,一律视为无效问题,不予处理。 validations: required: true -- type: textarea - id: version +- type: dropdown + id: netVersion attributes: - label: .NET Version - description: | - Run `dotnet --version` - placeholder: | - [这里粘贴执行结果] + label: .NET Version + description: Run `dotnet --version` + options: + - .NET 6.0 + - .NET 8.0 validations: - required: false + required: true - type: dropdown id: version attributes: @@ -72,5 +72,6 @@ body: description: 你当前正在使用的版本/分支? options: - next (默认) - validations: - required: true \ No newline at end of file + - next-beta + validations: + required: true \ No newline at end of file diff --git a/.gitee/ISSUE_TEMPLATE/feature.yml b/.gitee/ISSUE_TEMPLATE/feature.yml index 40916bcca555290c3853e4261c5cb18ee4152437..1e370f02dcbfd5121a8c68aa3e8011a1827764ff 100644 --- a/.gitee/ISSUE_TEMPLATE/feature.yml +++ b/.gitee/ISSUE_TEMPLATE/feature.yml @@ -1,22 +1,22 @@ name: 💡 功能建议 description: 对本项目提出一个功能建议 -title: "[功能建议]: " +title: "💡 [功能建议]: " labels: ["enhancement"] body: - type: input attributes: - label: 相关组件名称 + label: 相关模块/组件名称 placeholder: | - [现有组件填写组件名称,新组件请帮忙想一个组件名称。] + [现有组件则填写模块/组件名称,新模块/组件请帮忙想一个模块/组件名称。] validations: required: false - type: textarea id: related-problem attributes: - label: 开发过程中现有的模块或组件无法实现的功能 - description: 请清晰的描述现有模块或组件使用场景,以及开发中遇到的难处。 + label: 开发过程中现有的模块/组件无法实现的功能 + description: 请清晰的描述现有模块/组件使用场景,以及开发中遇到的难处。 placeholder: | - 如果是现有的模块或组件,请先仔细阅读文档或在QQ群内提问,确定想要的功能无法实现后再提交。 + 如果是现有的模块/组件,请先仔细阅读文档或在QQ群内提问,确定想要的功能无法实现后再提交。 validations: required: false - type: textarea diff --git a/Admin.NET/.editorconfig b/Admin.NET/.editorconfig index aab71a9f8368ff71a991e385035be40a3e08acb6..e1c1be388ffbf34b82db491438909d4a22aa1741 100644 --- a/Admin.NET/.editorconfig +++ b/Admin.NET/.editorconfig @@ -175,4 +175,5 @@ tab_width = 4 dotnet_style_operator_placement_when_wrapping = beginning_of_line # Add copyright file header -file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! \ No newline at end of file +# file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! +file_header_template = \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Application/GlobalUsings.cs b/Admin.NET/Admin.NET.Application/GlobalUsings.cs index a91dba88f7f6b15e4907f5d472d6bb95ceb00282..c7663610393e0338d317cc2bf631b88f49bc948f 100644 --- a/Admin.NET/Admin.NET.Application/GlobalUsings.cs +++ b/Admin.NET/Admin.NET.Application/GlobalUsings.cs @@ -6,20 +6,10 @@ global using Admin.NET.Core; global using Furion; -global using Furion.DatabaseAccessor; -global using Furion.DependencyInjection; global using Furion.DynamicApiController; -global using Furion.FriendlyException; -global using Mapster; global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Mvc; global using Microsoft.Extensions.DependencyInjection; -global using Magicodes.ExporterAndImporter.Core; -global using Magicodes.ExporterAndImporter.Excel; -global using SqlSugar; global using System; global using System.Collections.Generic; -global using System.ComponentModel; -global using System.ComponentModel.DataAnnotations; -global using System.Threading.Tasks; -global using System.Linq; \ No newline at end of file +global using System.Threading.Tasks; \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index aa8bf644b9ac85a1cd504f42bb965c408ca28935..565a3e4fa80f382a260dad2652a18b52e6a26703 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -17,31 +17,33 @@ - - - - + + + + + - - - - + + + + - - - + + - - - - + + + + + + @@ -50,19 +52,19 @@ - - - + + + - - + + - - - + + + diff --git a/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs b/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd8a9b7745d410f759eecc9e5c6d020a0e4308e8 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Admin.NET.Core; + +/// +/// 指定属性对应的的指令 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class CommandAttribute : Attribute +{ + public string Command { get; set; } + + public CommandAttribute(string command) + { + Command = command; + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs b/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..e58d08a45da7f88ddf33846f0996a0b7f78b8070 --- /dev/null +++ b/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs @@ -0,0 +1,92 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace Admin.NET.Core; + +/// +/// 通用接口参数验证特性类 +/// +[AttributeUsage(AttributeTargets.Property)] +public class CommonValidationAttribute : ValidationAttribute +{ + private readonly Dictionary _conditions; + private static readonly Dictionary CompiledConditions = new(); + + /// + /// + /// 条件对参数,长度必须为偶数
+ /// 奇数字符串参数:动态条件
+ /// 偶数字符串参数:提示消息 + /// + /// + /// + /// public class ModelInput { + /// + /// + /// public string A { get; set; } + /// + /// + /// [CommonValidation( + /// "A == 1 && B == null", "当 A == 1时,B不能为空", + /// "C == 2 && B == null", "当 C == 2时,B不能为空" + /// )] + /// public string B { get; set; } + /// } + /// + /// + public CommonValidationAttribute(params string[] conditionPairs) + { + if (conditionPairs.Length % 2 != 0) throw new ArgumentException("条件对必须以偶数个字符串的形式提供。"); + + var conditions = new Dictionary(); + for (int i = 0; i < conditionPairs.Length; i += 2) + conditions.Add(conditionPairs[i], conditionPairs[i + 1]); + + _conditions = conditions; + } + + protected override ValidationResult IsValid(object value, ValidationContext validationContext) + { + foreach (var (expr, errorMessage) in _conditions) + { + var conditionKey = $"{validationContext.ObjectType.FullName}.{expr}"; + if (!CompiledConditions.TryGetValue(conditionKey, out var condition)) + { + condition = CreateCondition(validationContext.ObjectType, expr); + CompiledConditions[conditionKey] = condition; + } + + if ((bool)condition.DynamicInvoke(validationContext.ObjectInstance)!) + { + return new ValidationResult(errorMessage ?? $"[{validationContext.MemberName}]校验失败"); + } + } + + return ValidationResult.Success; + } + + private Delegate CreateCondition(Type modelType, string expression) + { + try + { + // 创建参数表达式 + var parameter = Expression.Parameter(typeof(object), "x"); + + // 构建 Lambda 表达式 + var lambda = DynamicExpressionParser.ParseLambda(new[] { Expression.Parameter(modelType, "x") }, typeof(bool), expression); + + // 创建新的 Lambda 表达式,接受 object 参数并调用编译后的表达式 + var invokeExpression = Expression.Invoke(lambda, Expression.Convert(parameter, modelType)); + var finalLambda = Expression.Lambda>(invokeExpression, parameter); + + return finalLambda.Compile(); + } + catch (Exception ex) + { + throw new ArgumentException($"无法解析表达式 '{expression}': {ex.Message}", ex); + } + } +} \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs index f0d256544506328428abe982a1f127a48e5d824d..e7f3a6efad12d5a5e382e50ac6e0c7c5937ec5ea 100644 --- a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs +++ b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs @@ -15,7 +15,7 @@ public class ClaimConst /// 应用Id /// public const string AppId = "AppId"; - + /// /// 用户Id /// diff --git a/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs b/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs index cdcdce6d7f5e261e4ac46b845e59bd235833a8fe..1662f3e1912a1c7bfe89e9e27227d7868fa064b9 100644 --- a/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs +++ b/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs @@ -70,7 +70,7 @@ public class ConfigConst /// 域登录验证 /// public const string SysDomainLogin = "sys_domain_login"; - + /// /// 租户域名隔离登录验证 /// diff --git a/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs b/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs index 4caf784930ab87adb728a2d4f415ffa9d3386d20..ea6ed8c21fb5adae171677556b8eac05718b2d2b 100644 --- a/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs +++ b/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs @@ -25,7 +25,7 @@ public class SqlSugarConst /// 默认表主键 /// public const string PrimaryKey = "Id"; - + /// /// 默认租户Id /// @@ -35,7 +35,7 @@ public class SqlSugarConst /// 默认租户Id /// public const long DefaultTenantId = 1300000000001; - + /// /// 默认租户域名 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs b/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs index aed86c6e92c7386844ccc6ac48cbca637797969b..42af689bed4690b903e051862109e15fa2075b65 100644 --- a/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs +++ b/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs @@ -14,6 +14,7 @@ public abstract class EntityBaseId /// /// 雪花Id /// + [Description("Id."), Category("Common Parameters"), DisplayName("Id"), Browsable(false), ReadOnly(true)] [SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsPrimaryKey = true, IsIdentity = false)] public virtual long Id { get; set; } } @@ -39,8 +40,8 @@ public abstract class EntityBase : EntityBaseId, IDeletedFilter /// /// 创建者Id /// - [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)] [OwnerUser] + [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)] public virtual long? CreateUserId { get; set; } ///// @@ -92,8 +93,8 @@ public abstract class EntityBaseData : EntityBase, IOrgIdFilter /// /// 创建者部门Id /// - [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)] [OwnerOrg] + [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)] public virtual long? CreateOrgId { get; set; } /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysApp.cs b/Admin.NET/Admin.NET.Core/Entity/SysApp.cs index 9b4f212a1f38ebdc51595aef81a0076a7035df6f..fc79f2c61d63332501a778fe340b0609044a1627 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysApp.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysApp.cs @@ -18,49 +18,49 @@ public partial class SysApp : EntityBase /// [SugarColumn(ColumnDescription = "名称", Length = 32), Required, MaxLength(32)] public virtual string Name { get; set; } - + /// /// 图标 /// [SugarColumn(ColumnDescription = "图标", Length = 256), Required, MaxLength(256)] public virtual string? Logo { get; set; } - + /// /// 标题 /// [SugarColumn(ColumnDescription = "标题", Length = 32), MaxLength(32)] public string Title { get; set; } - + /// /// 副标题 /// [SugarColumn(ColumnDescription = "副标题", Length = 32), MaxLength(32)] public string ViceTitle { get; set; } - + /// /// 副描述 /// [SugarColumn(ColumnDescription = "副描述", Length = 64), MaxLength(64)] public string? ViceDesc { get; set; } - + /// /// 水印 /// [SugarColumn(ColumnDescription = "水印", Length = 32), MaxLength(32)] public string? Watermark { get; set; } - + /// /// 版权信息 /// [SugarColumn(ColumnDescription = "版权信息", Length = 64), MaxLength(64)] public string? Copyright { get; set; } - + /// /// ICP备案号 /// [SugarColumn(ColumnDescription = "ICP备案号", Length = 32), MaxLength(32)] public string? Icp { get; set; } - + /// /// 排序 /// @@ -73,7 +73,7 @@ public partial class SysApp : EntityBase /// [SugarColumn(ColumnDescription = "备注", Length = 256), MaxLength(256)] public string? Remark { get; set; } - + /// /// 应用租户 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs index 20905948302bc840c2d3c8cb4e7bd69671923a8c..09990e5622ddc8af6eb64b2971952e96f75b0803 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs @@ -84,7 +84,7 @@ public partial class SysCodeGen : EntityBase [SugarColumn(ColumnDescription = "业务名", Length = 128)] [MaxLength(128)] public string? BusName { get; set; } - + /// /// 表唯一字段配置 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs b/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs index c23e4bf2d34385b0293c0668c22e69ed126e3186..75e6fb87866a3eb3b19ae5a533ef352565823aaf 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs @@ -25,7 +25,7 @@ public partial class SysCodeGenConfig : EntityBase [SugarColumn(ColumnDescription = "字段名称", Length = 128)] [Required, MaxLength(128)] public virtual string ColumnName { get; set; } - + /// /// 主键 /// @@ -52,7 +52,7 @@ public partial class SysCodeGenConfig : EntityBase [SugarColumn(ColumnDescription = "字段描述", Length = 128)] [MaxLength(128)] public string? ColumnComment { get; set; } - + /// /// 数据库中类型(物理类型) /// @@ -115,7 +115,7 @@ public partial class SysCodeGenConfig : EntityBase [SugarColumn(ColumnDescription = "外键显示字段.NET类型", Length = 64)] [MaxLength(64)] public string? FkColumnNetType { get; set; } - + /// /// 父级字段 /// @@ -129,14 +129,14 @@ public partial class SysCodeGenConfig : EntityBase [SugarColumn(ColumnDescription = "字典编码", Length = 64)] [MaxLength(64)] public string? DictTypeCode { get; set; } - + /// /// 查询方式 /// [SugarColumn(ColumnDescription = "查询方式", Length = 16)] [MaxLength(16)] public string? QueryType { get; set; } - + /// /// 是否是查询条件 /// @@ -178,7 +178,7 @@ public partial class SysCodeGenConfig : EntityBase [SugarColumn(ColumnDescription = "增改", Length = 8)] [MaxLength(8)] public string? WhetherAddUpdate { get; set; } - + /// /// 导入 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs index 09179a48d4c3ec0d930fa218dc56bb4241b63b4c..e587154862ec2484c399ecab6bf0220e66632ed1 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs @@ -12,7 +12,7 @@ namespace Admin.NET.Core; [SugarTable(null, "系统字典值表")] [SysTable] [SugarIndex("index_{table}_C", nameof(Value), OrderByType.Asc)] -public partial class SysDictData : EntityBase +public partial class SysDictData : EntityTenant { /// /// 字典类型Id @@ -34,6 +34,16 @@ public partial class SysDictData : EntityBase [Required, MaxLength(256)] public virtual string Value { get; set; } + /// + /// 编码 + /// + /// + /// 即将移除的字段,直接移除该字段并不会从数据库中删除,且该字段之前是必填的,容易导致不能为null的异常,建议先保留,后期再移除 + /// + [Obsolete("即将移除的字段, 已引用的建议尽快移除")] + [SugarColumn(ColumnDescription = "编码", Length = 256)] + public virtual string? Code { get; set; } + /// /// 名称 /// @@ -86,7 +96,7 @@ public partial class SysDictData : EntityBase /// [SugarColumn(ColumnDescription = "状态")] public StatusEnum Status { get; set; } = StatusEnum.Enable; - + /// /// 字典类型 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs b/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs index df1d3d2ae5eab66d5cfcb6fff44feacb1cd24ee0..d79ed611a0f489c08a7e67aad3a8c8f203dfb01b 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs @@ -13,7 +13,7 @@ namespace Admin.NET.Core; [SysTable] [SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)] [SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)] -public partial class SysDictType : EntityBase +public partial class SysDictType : EntityTenant { /// /// 名称 diff --git a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs index a8d629b70c94bc73131a050b946dc82a412e59a7..0b6ce8f4752416a61ced4b67989db8c799b01f61 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs @@ -1,4 +1,4 @@ -// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 // // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 // @@ -36,7 +36,7 @@ public class SysLdap : EntityTenant /// /// 绑定DN(有管理权限制的用户) /// - [SugarColumn(ColumnDescription = "绑定DN", Length = 32)] + [SugarColumn(ColumnDescription = "绑定DN", Length = 128)] [Required] public virtual string BindDn { get; set; } diff --git a/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs b/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs index 95894bc2da13366a1bd417de2b56b6dee5dc9989..a89a776a89225f3e4a7bc8efc7333fa40fdb4a24 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs @@ -130,5 +130,5 @@ public partial class SysMenu : EntityBase /// 菜单子项 /// [SugarColumn(IsIgnore = true)] - public List Children { get; set; } = new (); + public List Children { get; set; } = new(); } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs index d20f060c6a497845039eb31cd4fbf295f794d739..1712688bc6f5891dfba34cf507a50d12499fe8c3 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs @@ -47,4 +47,10 @@ public partial class SysPos : EntityTenant /// [SugarColumn(ColumnDescription = "状态")] public StatusEnum Status { get; set; } = StatusEnum.Enable; + + /// + /// 在职人员 + /// + [SugarColumn(IsIgnore = true)] + public List UserList { get; set; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs index 943e5d6e694f63406056feee7293287f2c6e499a..a601a3c02013385e1f88f39444f27b87e0c9adfe 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs @@ -18,7 +18,7 @@ public partial class SysTenant : EntityBase /// [SugarColumn(ColumnDescription = "应用Id")] public long AppId { get; set; } - + /// /// 用户Id /// @@ -88,7 +88,7 @@ public partial class SysTenant : EntityBase /// [SugarColumn(ColumnDescription = "状态")] public StatusEnum Status { get; set; } = StatusEnum.Enable; - + /// /// 应用 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs b/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs index 282dadd20bd9a548d1dac99e8453f5d92defa5c2..26fd866fc1737fdc447325e5c72b586228b43208 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs @@ -65,6 +65,7 @@ public class SysUserLdap : EntityTenantId /// [SugarColumn(ColumnDescription = "检查账户是否已过期")] public bool AccountExpiresFlag { get; set; } = false; + /// /// 密码设置是否永不过期 /// diff --git a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs index 71f005a8a612bbeb7e9888901974e0a0c6dc8d93..631500d883acad4edb6474dd1f2dbdde6ccd18df 100644 --- a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs +++ b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs @@ -222,7 +222,7 @@ public enum ErrorCodeEnum /// [ErrorCodeItemMetadata("开放接口绑定租户禁止删除")] D1031, - + /// /// 手机号已存在 /// @@ -324,13 +324,13 @@ public enum ErrorCodeEnum /// [ErrorCodeItemMetadata("字典状态错误")] D3005, - + /// /// 字典编码不能以Enum结尾 /// [ErrorCodeItemMetadata("字典编码不能以Enum结尾")] D3006, - + /// /// 禁止修改枚举类型的字典编码 /// @@ -552,7 +552,7 @@ public enum ErrorCodeEnum /// [ErrorCodeItemMetadata("租户从库配置错误")] D1302, - + /// /// 已存在同名的租户域名 /// @@ -654,19 +654,19 @@ public enum ErrorCodeEnum /// [ErrorCodeItemMetadata("已存在同名功能或同名程序及插件")] D1900, - + /// /// 禁止删除存在关联租户的应用 /// [ErrorCodeItemMetadata("禁止删除存在关联租户的应用")] A1001, - + /// /// 禁止删除存在关联菜单的应用 /// [ErrorCodeItemMetadata("禁止删除存在关联菜单的应用")] A1002, - + /// /// 找不到系统应用 /// diff --git a/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs index 38f2a2dcdcb2d225cc2cc109375b3310cdcbd80c..091263532bba006103d9ae73da78d93a2a418662 100644 --- a/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs +++ b/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs @@ -15,7 +15,7 @@ public enum MenuTypeEnum /// /// 目录 /// - + [Description("目录"), Theme("warning")] Dir = 1, diff --git a/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs b/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs index 0372eb0c869d2cb7a7f1384a1217b1e74ae076b3..5c28f6c6cd71f12205ad362ca847fff0251a50d3 100644 --- a/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs +++ b/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs @@ -13,27 +13,27 @@ namespace Admin.NET.Core; /// /// RabbitMQ自定义事件源存储器 /// -public class RabbitMQEventSourceStore : IEventSourceStorer +public class RabbitMQEventSourceStore : IEventSourceStorer, IDisposable { /// /// 内存通道事件源存储器 /// - private readonly Channel _channel; + private Channel _channelEventSource; /// - /// 通道对象 + /// 路由键 /// - private readonly IModel _model; + private string _routeKey; /// /// 连接对象 /// - private readonly IConnection _connection; + private IConnection _connection; /// - /// 路由键 + /// 通道对象 /// - private readonly string _routeKey; + private IChannel _channel; /// /// 构造函数 @@ -43,30 +43,41 @@ public class RabbitMQEventSourceStore : IEventSourceStorer /// 存储器最多能够处理多少消息,超过该容量进入等待写入 public RabbitMQEventSourceStore(ConnectionFactory factory, string routeKey, int capacity) { - // 配置通道,设置超出默认容量后进入等待 + InitEventSourceStore(factory, routeKey, capacity).GetAwaiter().GetResult(); + } + + /// + /// 初始化事件源存储器 + /// + /// 连接工厂 + /// 路由键 + /// 存储器最多能够处理多少消息,超过该容量进入等待写入 + private async Task InitEventSourceStore(ConnectionFactory factory, string routeKey, int capacity) + { + // 配置通道(超出默认容量后进入等待) var boundedChannelOptions = new BoundedChannelOptions(capacity) { FullMode = BoundedChannelFullMode.Wait }; - // 创建有限容量通道 - _channel = Channel.CreateBounded(boundedChannelOptions); + _channelEventSource = Channel.CreateBounded(boundedChannelOptions); // 创建连接 - _connection = factory.CreateConnection(); + _connection = await factory.CreateConnectionAsync(); + // 路由键名 _routeKey = routeKey; // 创建通道 - _model = _connection.CreateModel(); + _channel = await _connection.CreateChannelAsync(); // 声明路由队列 - _model.QueueDeclare(routeKey, false, false, false, null); + await _channel.QueueDeclareAsync(routeKey, false, false, false, null); // 创建消息订阅者 - var consumer = new EventingBasicConsumer(_model); + var consumer = new AsyncEventingBasicConsumer(_channel); // 订阅消息并写入内存 Channel - consumer.Received += (ch, ea) => + consumer.ReceivedAsync += async (ch, ea) => { // 读取原始消息 var stringEventSource = Encoding.UTF8.GetString(ea.Body.ToArray()); @@ -75,14 +86,14 @@ public class RabbitMQEventSourceStore : IEventSourceStorer var eventSource = JSON.Deserialize(stringEventSource); // 写入内存管道存储器 - _channel.Writer.WriteAsync(eventSource); + await _channelEventSource.Writer.WriteAsync(eventSource); // 确认该消息已被消费 - _model.BasicAck(ea.DeliveryTag, false); + await _channel.BasicAckAsync(ea.DeliveryTag, false); }; // 启动消费者且设置为手动应答消息 - _model.BasicConsume(routeKey, false, consumer); + await _channel.BasicConsumeAsync(routeKey, false, consumer); } /// @@ -101,12 +112,15 @@ public class RabbitMQEventSourceStore : IEventSourceStorer { // 序列化及发布 var data = Encoding.UTF8.GetBytes(JSON.Serialize(source)); - _model.BasicPublish("", _routeKey, null, data); + var props = new BasicProperties(); + props.ContentType = "text/plain"; + props.DeliveryMode = DeliveryModes.Persistent; + await _channel.BasicPublishAsync("", _routeKey, false, props, data); } else { // 处理动态订阅 - await _channel.Writer.WriteAsync(eventSource, cancellationToken); + await _channelEventSource.Writer.WriteAsync(eventSource, cancellationToken); } } @@ -117,7 +131,7 @@ public class RabbitMQEventSourceStore : IEventSourceStorer /// 事件源对象 public async ValueTask ReadAsync(CancellationToken cancellationToken) { - var eventSource = await _channel.Reader.ReadAsync(cancellationToken); + var eventSource = await _channelEventSource.Reader.ReadAsync(cancellationToken); return eventSource; } @@ -126,7 +140,7 @@ public class RabbitMQEventSourceStore : IEventSourceStorer /// public void Dispose() { - _model.Dispose(); + _channel.Dispose(); _connection.Dispose(); } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs b/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs index e7faf5a6902e8d629fe368f6442fc69499bedfff..aa2bd6e14a13c8c9c5c34fcb2acdc1797bd6106e 100644 --- a/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs +++ b/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs @@ -174,6 +174,26 @@ public static class EnumExtension return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Theme; } + /// + /// 获取枚举的Category + /// + /// + /// + public static string GetCategory(this object value) + { + return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Category; + } + + /// + /// 获取枚举的Command + /// + /// + /// + public static string GetCommand(this object value) + { + return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Command; + } + /// /// 将枚举转成枚举信息集合 /// diff --git a/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs b/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs index 760c3e385639bca170f1892aa681a676d308d2fa..699422403b211f371263df46864f8ea329787e0c 100644 --- a/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs +++ b/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs @@ -14,14 +14,11 @@ public static class SqlSugarFilterExtension /// /// /// - private static List GetPropertyNames(this Type type) - where T : Attribute + private static List GetPropertyNames(this Type type) where T : Attribute { - var allProperties = type.GetProperties(); - - var properties = allProperties.Where(x => x.CustomAttributes.Any(a => a.AttributeType == typeof(T))); - - return properties.Select(x => x.Name).ToList(); + return type.GetProperties() + .Where(p => p.CustomAttributes.Any(x => x.AttributeType == typeof(T))) + .Select(x => x.Name).ToList(); } /// @@ -34,28 +31,28 @@ public static class SqlSugarFilterExtension public static LambdaExpression GetConditionExpression(this Type type, List owners) where T : Attribute { var fieldNames = type.GetPropertyNames(); - ParameterExpression parameter = Expression.Parameter(type, "c"); + Expression right = Expression.Constant(false); - fieldNames.ForEach(fieldName => + ConstantExpression ownersCollection = Expression.Constant(owners); + foreach (var fieldName in fieldNames) { - owners.ForEach(owner => - { - var property = type.GetProperty(fieldName); - Expression temp = Expression.Property(parameter, property); - - // 如果属性是可为空的类型,则转换为其基础类型 - var propertyType = property.PropertyType; - if (Nullable.GetUnderlyingType(propertyType) != null) - { - temp = Expression.Convert(temp, Nullable.GetUnderlyingType(propertyType)); - } - - Expression left = Expression.Equal(temp, Expression.Constant(owner)); - right = Expression.OrElse(left, right); - }); - }); - var finalExpression = Expression.Lambda(right, new ParameterExpression[] { parameter }); - return finalExpression; + var property = type.GetProperty(fieldName); + Expression memberExp = Expression.Property(parameter, property!); + + // 如果属性是可为空的类型,则转换为其基础类型 + var baseType = Nullable.GetUnderlyingType(property.PropertyType); + if (baseType != null) memberExp = Expression.Convert(memberExp, baseType); + + // 调用ownersCollection.Contains方法,检查是否包含属性值 + right = Expression.OrElse(Expression.Call( + typeof(Enumerable), + nameof(Enumerable.Contains), + new[] { memberExp.Type }, + ownersCollection, + memberExp + ), right); + } + return Expression.Lambda(right, parameter); } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs b/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs index f6f4b87ed977311b6b69ae1add7ddea0c19dca2a..407bbde5cf3b988bce50429ae81093019571487f 100644 --- a/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs +++ b/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs @@ -4,8 +4,6 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -using System.Security.Cryptography; - namespace Admin.NET.Core; /// @@ -29,10 +27,10 @@ public class EnumToDictJob : IJob var originColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"【{DateTime.Now}】系统枚举转换字典"); - + using var serviceScope = _scopeFactory.CreateScope(); var db = serviceScope.ServiceProvider.GetRequiredService().CopyNew(); - + var sysEnumService = serviceScope.ServiceProvider.GetRequiredService(); var sysDictTypeList = GetDictByEnumType(sysEnumService.GetEnumTypeList()); @@ -43,7 +41,7 @@ public class EnumToDictJob : IJob sysDictTypeList = sysDictTypeList.Where(x => x.Code.EndsWith("Enum")).ToList(); await SyncEnumToDictInfoAsync(db, sysDictTypeList); - + Console.ForegroundColor = ConsoleColor.Yellow; try { @@ -54,16 +52,17 @@ public class EnumToDictJob : IJob .ToStorageAsync(); await storageable1.BulkCopyAsync(); await storageable1.BulkUpdateAsync(); - + Console.WriteLine($"【{DateTime.Now}】系统枚举类转字典类型数据: 插入{storageable1.InsertList.Count}条, 更新{storageable1.UpdateList.Count}条, 共{storageable1.TotalList.Count}条。"); + var config = App.GetOptions().ConnectionConfigs.FirstOrDefault(u => SqlSugarConst.MainConfigId.Equals(u.ConfigId)); var storageable2 = await db.Storageable(sysDictTypeList.SelectMany(x => x.Children).ToList()) .WhereColumns(it => new { it.DictTypeId, it.Value }) .SplitUpdate(it => it.Any()) .SplitInsert(_ => true) .ToStorageAsync(); await storageable2.BulkCopyAsync(); - await storageable2.BulkUpdateAsync(nameof(SysDictData.Label), nameof(SysDictData.Value), nameof(SysDictData.Name)); + await storageable2.BulkUpdateAsync(nameof(SysDictData.Label), nameof(SysDictData.Value), nameof(SysDictData.Name), (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(nameof(SysDictData.TenantId)) : nameof(SysDictData.TenantId))); Console.WriteLine($"【{DateTime.Now}】系统枚举项转字典值数据: 插入{storageable2.InsertList.Count}条, 更新{storageable2.UpdateList.Count}条, 共{storageable2.TotalList.Count}条。"); @@ -82,19 +81,24 @@ public class EnumToDictJob : IJob } /// - /// 用于同步枚举转字典旧数据, 后期可删除 + /// 用于同步枚举转字典数据 /// /// /// - [Obsolete] private async Task SyncEnumToDictInfoAsync(SqlSugarClient db, List list) { var codeList = list.Select(x => x.Code).ToList(); - foreach (var dbDictType in await db.Queryable().Where(x => codeList.Contains(x.Code)).ToListAsync() ?? new()) + foreach (var dbDictType in await db.Queryable().ClearFilter().Where(x => codeList.Contains(x.Code)).ToListAsync() ?? new()) { var enumDictType = list.First(x => x.Code == dbDictType.Code); - if (enumDictType.Id == dbDictType.Id) continue; - + if (enumDictType.Id == dbDictType.Id) + { + // 字典值表字段改变后每条字典值记录会多出一条,此处用于删除多余的字典值数据 + var dataValueList = enumDictType.Children.Select(e => e.Value).ToList(); + await db.Deleteable().Where(x => x.DictTypeId == dbDictType.Id && !dataValueList.Contains(x.Value)).ExecuteCommandAsync(); + continue; + } + // 数据不一致则删除 await db.Deleteable().Where(x => x.DictTypeId == dbDictType.Id).ExecuteCommandAsync(); await db.Deleteable().Where(x => x.Id == dbDictType.Id).ExecuteCommandAsync(); @@ -118,7 +122,8 @@ public class EnumToDictJob : IJob Id = 900000000000 + CommonUtil.GetFixedHashCode(type.TypeName), Code = type.TypeName, Name = type.TypeDescribe, - Remark = type.TypeRemark + Remark = type.TypeRemark, + TenantId = SqlSugarConst.DefaultTenantId }; dictType.Children = type.EnumEntities.Select(x => new SysDictData { @@ -129,6 +134,7 @@ public class EnumToDictJob : IJob Value = x.Value.ToString(), OrderNo = x.Value + OrderOffset, TagType = x.Theme != "" ? x.Theme : DefaultTagType, + TenantId = SqlSugarConst.DefaultTenantId }).ToList(); list.Add(dictType); } diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs index 9ef9c9091c61112c382d79631a70c041f1befe36..aa90191e896c85067e892623f79fe12c4264ecbd 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs @@ -18,6 +18,6 @@ public class SysAppMenuSeedData : ISqlSugarEntitySeedData public IEnumerable HasData() { long id = 1300000000001; - return new SysMenuSeedData().HasData().Select(m => new SysAppMenu { Id=id++, AppId=SqlSugarConst.DefaultAppId, MenuId=m.Id }); + return new SysMenuSeedData().HasData().Select(m => new SysAppMenu { Id = id++, AppId = SqlSugarConst.DefaultAppId, MenuId = m.Id }); } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs index a16f34af8e62fa35167dce5886c85414b7433ceb..53edcee60dc9ac80f11019e6a504e33f09f7d591 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs @@ -19,7 +19,8 @@ public class SysAppSeedData : ISqlSugarEntitySeedData { return new[] { - new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + //new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="OTALL_Mirror", ViceTitle="MTNet", ViceDesc="自动化测试 V3.0", Watermark="OTALL_Mirror", Copyright="Copyright \u00a9 2021-present MTNet All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs index 9fa2dbe67eab22a12c48673b3a9695c40cfa66ec..1920d24a94f9b8c67e7f514b17d87e698ff079fd 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs @@ -19,61 +19,61 @@ public class SysDictDataSeedData : ISqlSugarEntitySeedData { return new[] { - new SysDictData{ Id=1300000000101, DictTypeId=1300000000101, Label="输入框", Value="Input", OrderNo=100, Remark="输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000102, DictTypeId=1300000000101, Label="字典选择器", Value="DictSelector", OrderNo=100, Remark="字典选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000103, DictTypeId=1300000000101, Label="常量选择器", Value="ConstSelector", OrderNo=100, Remark="常量选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000104, DictTypeId=1300000000101, Label="枚举选择器", Value="EnumSelector", OrderNo=100, Remark="枚举选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000105, DictTypeId=1300000000101, Label="树选择器", Value="ApiTreeSelector", OrderNo=100, Remark="树选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000106, DictTypeId=1300000000101, Label="外键", Value="ForeignKey", OrderNo=100, Remark="外键", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000107, DictTypeId=1300000000101, Label="数字输入框", Value="InputNumber", OrderNo=100, Remark="数字输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000108, DictTypeId=1300000000101, Label="时间选择", Value="DatePicker", OrderNo=100, Remark="时间选择", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000109, DictTypeId=1300000000101, Label="文本域", Value="InputTextArea", OrderNo=100, Remark="文本域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000110, DictTypeId=1300000000101, Label="上传", Value="Upload", OrderNo=100, Remark="上传", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000111, DictTypeId=1300000000101, Label="开关", Value="Switch", OrderNo=100, Remark="开关", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysDictData{ Id=1300000000101, DictTypeId=1300000000101, Label="输入框", Value="Input", OrderNo=100, Remark="输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000102, DictTypeId=1300000000101, Label="字典选择器", Value="DictSelector", OrderNo=100, Remark="字典选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000103, DictTypeId=1300000000101, Label="常量选择器", Value="ConstSelector", OrderNo=100, Remark="常量选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000104, DictTypeId=1300000000101, Label="枚举选择器", Value="EnumSelector", OrderNo=100, Remark="枚举选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000105, DictTypeId=1300000000101, Label="树选择器", Value="ApiTreeSelector", OrderNo=100, Remark="树选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000106, DictTypeId=1300000000101, Label="外键", Value="ForeignKey", OrderNo=100, Remark="外键", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000107, DictTypeId=1300000000101, Label="数字输入框", Value="InputNumber", OrderNo=100, Remark="数字输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000108, DictTypeId=1300000000101, Label="时间选择", Value="DatePicker", OrderNo=100, Remark="时间选择", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000109, DictTypeId=1300000000101, Label="文本域", Value="InputTextArea", OrderNo=100, Remark="文本域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000110, DictTypeId=1300000000101, Label="上传", Value="Upload", OrderNo=100, Remark="上传", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000111, DictTypeId=1300000000101, Label="开关", Value="Switch", OrderNo=100, Remark="开关", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000201, DictTypeId=1300000000102, Label="等于", Value="==", OrderNo=1, Remark="等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000202, DictTypeId=1300000000102, Label="模糊", Value="like", OrderNo=1, Remark="模糊", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000203, DictTypeId=1300000000102, Label="大于", Value=">", OrderNo=1, Remark="大于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000204, DictTypeId=1300000000102, Label="小于", Value="<", OrderNo=1, Remark="小于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000205, DictTypeId=1300000000102, Label="不等于", Value="!=", OrderNo=1, Remark="不等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000206, DictTypeId=1300000000102, Label="大于等于", Value=">=", OrderNo=1, Remark="大于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000207, DictTypeId=1300000000102, Label="小于等于", Value="<=", OrderNo=1, Remark="小于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000208, DictTypeId=1300000000102, Label="不为空", Value="isNotNull", OrderNo=1, Remark="不为空", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000209, DictTypeId=1300000000102, Label="时间范围", Value="~", OrderNo=1, Remark="时间范围", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysDictData{ Id=1300000000201, DictTypeId=1300000000102, Label="等于", Value="==", OrderNo=1, Remark="等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000202, DictTypeId=1300000000102, Label="模糊", Value="like", OrderNo=1, Remark="模糊", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000203, DictTypeId=1300000000102, Label="大于", Value=">", OrderNo=1, Remark="大于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000204, DictTypeId=1300000000102, Label="小于", Value="<", OrderNo=1, Remark="小于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000205, DictTypeId=1300000000102, Label="不等于", Value="!=", OrderNo=1, Remark="不等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000206, DictTypeId=1300000000102, Label="大于等于", Value=">=", OrderNo=1, Remark="大于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000207, DictTypeId=1300000000102, Label="小于等于", Value="<=", OrderNo=1, Remark="小于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000208, DictTypeId=1300000000102, Label="不为空", Value="isNotNull", OrderNo=1, Remark="不为空", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000209, DictTypeId=1300000000102, Label="时间范围", Value="~", OrderNo=1, Remark="时间范围", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000301, DictTypeId=1300000000103, Label="long", Value="long", OrderNo=1, Remark="long", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000302, DictTypeId=1300000000103, Label="string", Value="string", OrderNo=1, Remark="string", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000303, DictTypeId=1300000000103, Label="DateTime", Value="DateTime", OrderNo=1, Remark="DateTime", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000304, DictTypeId=1300000000103, Label="bool", Value="bool", OrderNo=1, Remark="bool", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000305, DictTypeId=1300000000103, Label="int", Value="int", OrderNo=1, Remark="int", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000306, DictTypeId=1300000000103, Label="double", Value="double", OrderNo=1, Remark="double", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000307, DictTypeId=1300000000103, Label="float", Value="float", OrderNo=1, Remark="float", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000308, DictTypeId=1300000000103, Label="decimal", Value="decimal", OrderNo=1, Remark="decimal", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000309, DictTypeId=1300000000103, Label="Guid", Value="Guid", OrderNo=1, Remark="Guid", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000310, DictTypeId=1300000000103, Label="DateTimeOffset", Value="DateTimeOffset", OrderNo=1, Remark="DateTimeOffset", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysDictData{ Id=1300000000301, DictTypeId=1300000000103, Label="long", Value="long", OrderNo=1, Remark="long", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000302, DictTypeId=1300000000103, Label="string", Value="string", OrderNo=1, Remark="string", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000303, DictTypeId=1300000000103, Label="DateTime", Value="DateTime", OrderNo=1, Remark="DateTime", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000304, DictTypeId=1300000000103, Label="bool", Value="bool", OrderNo=1, Remark="bool", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000305, DictTypeId=1300000000103, Label="int", Value="int", OrderNo=1, Remark="int", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000306, DictTypeId=1300000000103, Label="double", Value="double", OrderNo=1, Remark="double", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000307, DictTypeId=1300000000103, Label="float", Value="float", OrderNo=1, Remark="float", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000308, DictTypeId=1300000000103, Label="decimal", Value="decimal", OrderNo=1, Remark="decimal", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000309, DictTypeId=1300000000103, Label="Guid", Value="Guid", OrderNo=1, Remark="Guid", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000310, DictTypeId=1300000000103, Label="DateTimeOffset", Value="DateTimeOffset", OrderNo=1, Remark="DateTimeOffset", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000401, DictTypeId=1300000000104, Label="下载压缩包", Value="100", OrderNo=1, Remark="下载压缩包", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000402, DictTypeId=1300000000104, Label="下载压缩包(前端)", Value="111", OrderNo=2, Remark="下载压缩包(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000403, DictTypeId=1300000000104, Label="下载压缩包(后端)", Value="121", OrderNo=3, Remark="下载压缩包(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000404, DictTypeId=1300000000104, Label="生成到本项目", Value="200", OrderNo=4, Remark="生成到本项目", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000405, DictTypeId=1300000000104, Label="生成到本项目(前端)", Value="211", OrderNo=5, Remark="生成到本项目(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000406, DictTypeId=1300000000104, Label="生成到本项目(后端)", Value="221", OrderNo=6, Remark="生成到本项目(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysDictData{ Id=1300000000401, DictTypeId=1300000000104, Label="下载压缩包", Value="100", OrderNo=1, Remark="下载压缩包", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000402, DictTypeId=1300000000104, Label="下载压缩包(前端)", Value="111", OrderNo=2, Remark="下载压缩包(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000403, DictTypeId=1300000000104, Label="下载压缩包(后端)", Value="121", OrderNo=3, Remark="下载压缩包(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000404, DictTypeId=1300000000104, Label="生成到本项目", Value="200", OrderNo=4, Remark="生成到本项目", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000405, DictTypeId=1300000000104, Label="生成到本项目(前端)", Value="211", OrderNo=5, Remark="生成到本项目(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000406, DictTypeId=1300000000104, Label="生成到本项目(后端)", Value="221", OrderNo=6, Remark="生成到本项目(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000501, DictTypeId=1300000000105, Label="EntityBaseId【基础实体Id】", Value="EntityBaseId", OrderNo=1, Remark="【基础实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000502, DictTypeId=1300000000105, Label="EntityBase【基础实体】", Value="EntityBase", OrderNo=1, Remark="【基础实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000503, DictTypeId=1300000000105, Label="EntityTenantId【租户实体Id】", Value="EntityTenantId", OrderNo=1, Remark="【租户实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000504, DictTypeId=1300000000105, Label="EntityTenant【租户实体】", Value="EntityTenant", OrderNo=1, Remark="【租户实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000505, DictTypeId=1300000000105, Label="EntityBaseData【业务实体】", Value="EntityBaseData", OrderNo=1, Remark="【业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictData{ Id=1300000000506, DictTypeId=1300000000105, Label="EntityTenantBaseData【租户业务实体】", Value="EntityTenantBaseData", OrderNo=1, Remark="【租户业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysDictData{ Id=1300000000501, DictTypeId=1300000000105, Label="EntityBaseId【基础实体Id】", Value="EntityBaseId", OrderNo=1, Remark="【基础实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000502, DictTypeId=1300000000105, Label="EntityBase【基础实体】", Value="EntityBase", OrderNo=1, Remark="【基础实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000503, DictTypeId=1300000000105, Label="EntityTenantId【租户实体Id】", Value="EntityTenantId", OrderNo=1, Remark="【租户实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000504, DictTypeId=1300000000105, Label="EntityTenant【租户实体】", Value="EntityTenant", OrderNo=1, Remark="【租户实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000505, DictTypeId=1300000000105, Label="EntityBaseData【业务实体】", Value="EntityBaseData", OrderNo=1, Remark="【业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000506, DictTypeId=1300000000105, Label="EntityTenantBaseData【租户业务实体】", Value="EntityTenantBaseData", OrderNo=1, Remark="【租户业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000601, DictTypeId=1300000000106, Label="不需要", Value="off", OrderNo=100, Remark="不需要打印支持", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, - new SysDictData{ Id=1300000000602, DictTypeId=1300000000106, Label="绑定打印模版", Value="custom", OrderNo=101, Remark="绑定打印模版", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, + new SysDictData{ Id=1300000000601, DictTypeId=1300000000106, Label="不需要", Value="off", OrderNo=100, Remark="不需要打印支持", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000602, DictTypeId=1300000000106, Label="绑定打印模版", Value="custom", OrderNo=101, Remark="绑定打印模版", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, - new SysDictData{ Id=1300000000701, DictTypeId=1300000000201, Label="集团", Value="101", OrderNo=100, Remark="集团", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, - new SysDictData{ Id=1300000000702, DictTypeId=1300000000201, Label="公司", Value="201", OrderNo=101, Remark="公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, - new SysDictData{ Id=1300000000703, DictTypeId=1300000000201, Label="部门", Value="301", OrderNo=102, Remark="部门", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, - new SysDictData{ Id=1300000000704, DictTypeId=1300000000201, Label="区域", Value="401", OrderNo=103, Remark="区域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, - new SysDictData{ Id=1300000000705, DictTypeId=1300000000201, Label="组", Value="501", OrderNo=104, Remark="组", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, + new SysDictData{ Id=1300000000701, DictTypeId=1300000000201, Label="集团", Value="101", OrderNo=100, Remark="集团", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000702, DictTypeId=1300000000201, Label="公司", Value="201", OrderNo=101, Remark="公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000703, DictTypeId=1300000000201, Label="部门", Value="301", OrderNo=102, Remark="部门", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000704, DictTypeId=1300000000201, Label="区域", Value="401", OrderNo=103, Remark="区域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictData{ Id=1300000000705, DictTypeId=1300000000201, Label="组", Value="501", OrderNo=104, Remark="组", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs index 9117084d7e74a886c5818576f346219246e5b706..837fb99599ed1852f1792f9e1a3bed84063e5e6e 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs @@ -19,13 +19,13 @@ public class SysDictTypeSeedData : ISqlSugarEntitySeedData { return new[] { - new SysDictType{ Id=1300000000101, Name="代码生成控件类型", Code="code_gen_effect_type", OrderNo=100, Remark="代码生成控件类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictType{ Id=1300000000102, Name="代码生成查询类型", Code="code_gen_query_type", OrderNo=101, Remark="代码生成查询类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictType{ Id=1300000000103, Name="代码生成.NET类型", Code="code_gen_net_type", OrderNo=102, Remark="代码生成.NET类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=103, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=104, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysDictType{ Id=1300000000106, Name="代码生成打印类型", Code="code_gen_print_type", OrderNo=105, Remark="代码生成打印类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, - new SysDictType{ Id=1300000000201, Name="机构类型", Code="org_type", OrderNo=201, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, + new SysDictType{ Id=1300000000101, Name="代码生成控件类型", Code="code_gen_effect_type", OrderNo=100, Remark="代码生成控件类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000102, Name="代码生成查询类型", Code="code_gen_query_type", OrderNo=101, Remark="代码生成查询类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000103, Name="代码生成.NET类型", Code="code_gen_net_type", OrderNo=102, Remark="代码生成.NET类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=103, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=104, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000106, Name="代码生成打印类型", Code="code_gen_print_type", OrderNo=105, Remark="代码生成打印类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, + new SysDictType{ Id=1300000000201, Name="机构类型", Code="org_type", OrderNo=201, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs index c1e5415b685fa159b99252842b77a9f5cbc7c3f9..0a7bab9aaebd29f8ad1b0324f428de0d5b744301 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs @@ -24,6 +24,43 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1300000000121, Pid=1300000000101, Title="站内信", Path="/dashboard/notice", Name="notice", Component="/home/notice/index", Icon="ele-Bell", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=101 }, // 建议此处Id范围之间放置具体业务应用菜单 + new SysMenu{ Id=1300000000201, Pid=0, Title="终端测试", Path="/test", Name="test", Component="Layout", Icon="ele-Platform", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=1000 }, + + new SysMenu{ Id=1300000000211, Pid=1300000000201, Title="设备管理", Path="/test/device", Name="device", Component="/test/device/index", Icon="ele-Coordinate", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000212, Pid=1300000000211, Title="查询", Permission="device:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000213, Pid=1300000000211, Title="编辑", Permission="device:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000214, Pid=1300000000211, Title="增加", Permission="device:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000215, Pid=1300000000211, Title="删除", Permission="device:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000221, Pid=1300000000201, Title="映射管理", Path="/test/mapping", Name="mapping", Component="/test/mapping/index", Icon="ele-SetUp", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=110 }, + new SysMenu{ Id=1300000000222, Pid=1300000000221, Title="查询", Permission="mapping:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000223, Pid=1300000000221, Title="编辑", Permission="mapping:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000224, Pid=1300000000221, Title="增加", Permission="mapping:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000225, Pid=1300000000221, Title="删除", Permission="mapping:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000231, Pid=1300000000201, Title="模板管理", Path="/test/template", Name="template", Component="/test/template/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=120 }, + new SysMenu{ Id=1300000000232, Pid=1300000000231, Title="查询", Permission="template:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000233, Pid=1300000000231, Title="编辑", Permission="template:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000234, Pid=1300000000231, Title="增加", Permission="template:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000235, Pid=1300000000231, Title="删除", Permission="template:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000241, Pid=1300000000201, Title="任务管理", Path="/test/task", Name="task", Component="/test/task/index", Icon="ele-List", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 }, + new SysMenu{ Id=1300000000242, Pid=1300000000241, Title="查询", Permission="task:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000243, Pid=1300000000241, Title="编辑", Permission="task:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000244, Pid=1300000000241, Title="增加", Permission="task:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000245, Pid=1300000000241, Title="删除", Permission="task:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000251, Pid=1300000000201, Title="测试监控", Path="/test/testing", Name="testing", Component="/test/testing/index", Icon="ele-Loading", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 }, + new SysMenu{ Id=1300000000252, Pid=1300000000251, Title="查询", Permission="testing:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000253, Pid=1300000000251, Title="编辑", Permission="testing:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000254, Pid=1300000000251, Title="增加", Permission="testing:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000255, Pid=1300000000251, Title="删除", Permission="testing:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000261, Pid=1300000000201, Title="报表统计", Path="/test/report", Name="report", Component="/test/report/index", Icon="ele-PieChart", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=150 }, + new SysMenu{ Id=1300000000262, Pid=1300000000261, Title="查询", Permission="report:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000263, Pid=1300000000261, Title="编辑", Permission="report:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000264, Pid=1300000000261, Title="增加", Permission="report:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1300000000265, Pid=1300000000261, Title="删除", Permission="report:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000101, Pid=0, Title="系统管理", Path="/system", Name="system", Component="Layout", Icon="ele-Setting", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=10000 }, @@ -98,7 +135,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1310000001315, Pid=1310000001311, Title="删除", Permission="sysApp:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000001316, Pid=1310000001311, Title="授权菜单", Permission="sysApp:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000001317, Pid=1310000001311, Title="切换应用", Permission="sysApp:changeApp", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, - + new SysMenu{ Id=1310000000311, Pid=1310000000301, Title="租户管理", Path="/platform/tenant", Name="sysTenant", Component="/system/tenant/index", Icon="ele-School", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000312, Pid=1310000000311, Title="查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000313, Pid=1310000000311, Title="编辑", Permission="sysTenant:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs index a9c1d30e1a725d10653a83e385ae730d80732e85..b43ba6caa88e2e20044b71e82e5da8d99d58b6da 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs @@ -145,6 +145,44 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData new SysRoleMenu{ Id=1300000000404, RoleId=1300000000101, MenuId=1310000000713 }, new SysRoleMenu{ Id=1300000000405, RoleId=1300000000101, MenuId=1310000000714 }, new SysRoleMenu{ Id=1300000000455, RoleId=1300000000101, MenuId=1310000000801 }, + ////// 终端测试 + new SysRoleMenu{ Id=1300000000901, RoleId=1300000000101, MenuId=1300000000201 }, + // 设备管理 + new SysRoleMenu{ Id=1300000000911, RoleId=1300000000101, MenuId=1300000000211 }, + new SysRoleMenu{ Id=1300000000912, RoleId=1300000000101, MenuId=1300000000212 }, + new SysRoleMenu{ Id=1300000000913, RoleId=1300000000101, MenuId=1300000000213 }, + new SysRoleMenu{ Id=1300000000914, RoleId=1300000000101, MenuId=1300000000214 }, + new SysRoleMenu{ Id=1300000000915, RoleId=1300000000101, MenuId=1300000000215 }, + // 映射管理 + new SysRoleMenu{ Id=1300000000921, RoleId=1300000000101, MenuId=1300000000221 }, + new SysRoleMenu{ Id=1300000000922, RoleId=1300000000101, MenuId=1300000000222 }, + new SysRoleMenu{ Id=1300000000923, RoleId=1300000000101, MenuId=1300000000223 }, + new SysRoleMenu{ Id=1300000000924, RoleId=1300000000101, MenuId=1300000000224 }, + new SysRoleMenu{ Id=1300000000925, RoleId=1300000000101, MenuId=1300000000225 }, + // 模板配置 + new SysRoleMenu{ Id=1300000000931, RoleId=1300000000101, MenuId=1300000000231 }, + new SysRoleMenu{ Id=1300000000932, RoleId=1300000000101, MenuId=1300000000232 }, + new SysRoleMenu{ Id=1300000000933, RoleId=1300000000101, MenuId=1300000000233 }, + new SysRoleMenu{ Id=1300000000934, RoleId=1300000000101, MenuId=1300000000234 }, + new SysRoleMenu{ Id=1300000000935, RoleId=1300000000101, MenuId=1300000000235 }, + // 任务管理 + new SysRoleMenu{ Id=1300000000941, RoleId=1300000000101, MenuId=1300000000241 }, + new SysRoleMenu{ Id=1300000000942, RoleId=1300000000101, MenuId=1300000000242 }, + new SysRoleMenu{ Id=1300000000943, RoleId=1300000000101, MenuId=1300000000243 }, + new SysRoleMenu{ Id=1300000000944, RoleId=1300000000101, MenuId=1300000000244 }, + new SysRoleMenu{ Id=1300000000945, RoleId=1300000000101, MenuId=1300000000245 }, + // 测试监控 + new SysRoleMenu{ Id=1300000000951, RoleId=1300000000101, MenuId=1300000000251 }, + new SysRoleMenu{ Id=1300000000952, RoleId=1300000000101, MenuId=1310000000252 }, + new SysRoleMenu{ Id=1300000000953, RoleId=1300000000101, MenuId=1300000000253 }, + new SysRoleMenu{ Id=1300000000954, RoleId=1300000000101, MenuId=1300000000254 }, + new SysRoleMenu{ Id=1300000000955, RoleId=1300000000101, MenuId=1300000000255 }, + // 报表统计 + new SysRoleMenu{ Id=1300000000961, RoleId=1300000000101, MenuId=1300000000261 }, + new SysRoleMenu{ Id=1300000000962, RoleId=1300000000101, MenuId=1300000000262 }, + new SysRoleMenu{ Id=1300000000963, RoleId=1300000000101, MenuId=1300000000263 }, + new SysRoleMenu{ Id=1300000000964, RoleId=1300000000101, MenuId=1300000000264 }, + new SysRoleMenu{ Id=1300000000965, RoleId=1300000000101, MenuId=1300000000265 }, // 其他角色默认菜单 // 数据面板【1300000000102】 diff --git a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs index 3aba33c54d0cdf2e188032a89051e02eb655b5b5..b7ca928c5406f07d89761ec3f46748ae12e26c24 100644 --- a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs @@ -1,7 +1,7 @@ // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 -// +// // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 -// +// // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! namespace Admin.NET.Core.Service; @@ -15,56 +15,56 @@ public class SysAppBaseInput /// 主键Id /// public virtual long? Id { get; set; } - + /// /// 名称 /// [Required(ErrorMessage = "名称不能为空")] public virtual string Name { get; set; } - + /// /// 标题 /// [Required(ErrorMessage = "标题不能为空")] public virtual string Title { get; set; } - + /// /// 副标题 /// [Required(ErrorMessage = "副标题不能为空")] public virtual string ViceTitle { get; set; } - + /// /// 副描述 /// public virtual string? ViceDesc { get; set; } - + /// /// 水印 /// public virtual string? Watermark { get; set; } - + /// /// 版权信息 /// public virtual string? Copyright { get; set; } - + /// /// ICP备案号 /// public virtual string? Icp { get; set; } - + /// /// 排序 /// [Required(ErrorMessage = "排序不能为空")] public virtual int? OrderNo { get; set; } - + /// /// 备注 /// public virtual string? Remark { get; set; } - + /// /// 图标 /// @@ -81,43 +81,43 @@ public class AddSysAppInput /// [Required(ErrorMessage = "Logo不能为空")] public string Logo { get; set; } - + /// /// 名称 /// [Required(ErrorMessage = "名称不能为空")] public string Name { get; set; } - + /// /// 标题 /// [Required(ErrorMessage = "标题不能为空")] public string Title { get; set; } - + /// /// 副标题 /// [Required(ErrorMessage = "副标题不能为空")] public string ViceTitle { get; set; } - + /// /// 副描述 /// [Required(ErrorMessage = "副描述不能为空")] public string ViceDesc { get; set; } - + /// /// 水印 /// [Required(ErrorMessage = "水印不能为空")] public string Watermark { get; set; } - + /// /// 版权信息 /// [Required(ErrorMessage = "版权信息不能为空")] public string Copyright { get; set; } - + /// /// ICP备案号 /// @@ -129,7 +129,7 @@ public class AddSysAppInput /// [Required(ErrorMessage = "排序不能为空")] public int OrderNo { get; set; } = 100; - + /// /// 备注 /// @@ -144,7 +144,7 @@ public class UpdateSysAppInput : AddSysAppInput { /// /// 主键Id - /// + /// [Required(ErrorMessage = "主键Id不能为空")] public long Id { get; set; } } diff --git a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs index 207f8f99675441413f93419540d7237280328fb1..e152912fd03629f695fbd4284ccb5cf580bbb5b7 100644 --- a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs @@ -1,7 +1,7 @@ // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 -// +// // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 -// +// // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! namespace Admin.NET.Core.Service; @@ -14,88 +14,88 @@ public class SysAppOutput /// /// 主键Id /// - public long Id { get; set; } - + public long Id { get; set; } + /// /// 名称 /// public string Name { get; set; } - + /// /// 图标 /// public string? Logo { get; set; } - + /// /// 标题 /// public string Title { get; set; } - + /// /// 副标题 /// - public string ViceTitle { get; set; } - + public string ViceTitle { get; set; } + /// /// 副描述 /// - public string? ViceDesc { get; set; } - + public string? ViceDesc { get; set; } + /// /// 水印 /// - public string? Watermark { get; set; } - + public string? Watermark { get; set; } + /// /// 版权信息 /// - public string? Copyright { get; set; } - + public string? Copyright { get; set; } + /// /// ICP备案号 /// - public string? Icp { get; set; } - + public string? Icp { get; set; } + /// /// 排序 /// - public int OrderNo { get; set; } - + public int OrderNo { get; set; } + /// /// 备注 /// - public string? Remark { get; set; } - + public string? Remark { get; set; } + /// /// 创建时间 /// - public DateTime? CreateTime { get; set; } - + public DateTime? CreateTime { get; set; } + /// /// 更新时间 /// - public DateTime? UpdateTime { get; set; } - + public DateTime? UpdateTime { get; set; } + /// /// 创建者Id /// - public long? CreateUserId { get; set; } - + public long? CreateUserId { get; set; } + /// /// 创建者姓名 /// - public string? CreateUserName { get; set; } - + public string? CreateUserName { get; set; } + /// /// 修改者Id /// - public long? UpdateUserId { get; set; } - + public long? UpdateUserId { get; set; } + /// /// 修改者姓名 /// - public string? UpdateUserName { get; set; } - + public string? UpdateUserName { get; set; } + /// /// 软删除 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs b/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs index cd37ec3528de7c8fa9ddd1af8370e3206b3c3da1..b0fa772b0c5a0c950fe3b0dbda7513439fb16c2d 100644 --- a/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs @@ -1,7 +1,7 @@ // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 -// +// // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 -// +// // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! namespace Admin.NET.Core.Service; @@ -36,12 +36,12 @@ public class SysAppService : IDynamicApiController, ITransient { input.Keyword = input.Keyword?.Trim(); var query = _sysAppRep.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) || - u.Title.Contains(input.Keyword) || u.ViceTitle.Contains(input.Keyword) || + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) || + u.Title.Contains(input.Keyword) || u.ViceTitle.Contains(input.Keyword) || u.ViceDesc.Contains(input.Keyword) || u.Remark.Contains(input.Keyword)) .OrderBy(u => new { u.OrderNo, u.Id }) .Select(); - return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); } /// @@ -67,7 +67,7 @@ public class SysAppService : IDynamicApiController, ITransient public async Task Update(UpdateSysAppInput input) { _ = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); - + var entity = input.Adapt(); await _sysAppRep.AsUpdateable(entity).ExecuteCommandAsync(); } @@ -82,16 +82,16 @@ public class SysAppService : IDynamicApiController, ITransient public async Task Delete(BaseIdInput input) { var entity = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); - + // 禁止删除存在关联租户的应用 if (await _sysAppRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); - + // 禁止删除存在关联菜单的应用 if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); - + await _sysAppRep.DeleteAsync(entity); } - + /// /// 获取授权菜单 🔖 /// @@ -100,11 +100,11 @@ public class SysAppService : IDynamicApiController, ITransient [UnitOfWork] [DisplayName("获取授权菜单")] [ApiDescriptionSettings(Name = "GrantMenu"), HttpGet] - public async Task> GrantMenu([FromQuery]long id) + public async Task> GrantMenu([FromQuery] long id) { - return await _sysAppMenuRep.AsQueryable().Where(u => u.AppId == id).Select(u => u.MenuId).ToListAsync(); + return await _sysAppMenuRep.AsQueryable().Where(u => u.AppId == id).Select(u => u.MenuId).ToListAsync(); } - + /// /// 授权菜单 🔖 /// @@ -116,11 +116,11 @@ public class SysAppService : IDynamicApiController, ITransient public async Task GrantMenu(UpdateAppMenuInput input) { input.MenuIdList ??= new(); - + await _sysAppMenuRep.DeleteAsync(u => u.AppId == input.Id); - + var list = input.MenuIdList.Select(id => new SysAppMenu { AppId = input.Id, MenuId = id }).ToList(); - + await _sysAppMenuRep.InsertRangeAsync(list); // 清除应用下其他模块越权的授权数据,包括角色菜单,用户收藏菜单 @@ -130,7 +130,7 @@ public class SysAppService : IDynamicApiController, ITransient await _sysAppRep.Context.Deleteable().Where(u => roleIds.Contains(u.RoleId) && !input.MenuIdList.Contains(u.MenuId)).ExecuteCommandAsync(); await _sysAppRep.Context.Deleteable().Where(u => userIds.Contains(u.UserId) && !input.MenuIdList.Contains(u.MenuId)).ExecuteCommandAsync(); } - + /// /// 获取切换应用数据 🔖 /// @@ -159,7 +159,7 @@ public class SysAppService : IDynamicApiController, ITransient }) }; } - + /// /// 切换应用 🔖 /// @@ -172,10 +172,10 @@ public class SysAppService : IDynamicApiController, ITransient { _ = await _sysAppRep.Context.Queryable().FirstAsync(u => u.Id == input.TenantId) ?? throw Oops.Oh(ErrorCodeEnum.Z1003); _ = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); - + var user = await _sysAppRep.Context.Queryable().FirstAsync(u => u.Id == _userManager.UserId); user.TenantId = input.TenantId; - + return await _sysAuthService.CreateToken(user, input.Id); } diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs index 0d0a74692f27f489e15b55f3352d032f7d8cedd9..b03828ce7a4a2610ab1c00b6f4828ad58ddbda98 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs @@ -24,7 +24,7 @@ public class LoginInput /// 123456 [Required(ErrorMessage = "密码不能为空"), MinLength(3, ErrorMessage = "密码不能少于3个字符")] public string Password { get; set; } - + /// /// 租户域名 /// @@ -58,7 +58,7 @@ public class LoginPhoneInput /// 123456 [Required(ErrorMessage = "验证码不能为空"), MinLength(4, ErrorMessage = "验证码不能少于4个字符")] public string Code { get; set; } - + /// /// 租户域名 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index 73ee10311a387e1fe610f1493e097358e8024391..b6a863f1cf0f7d80c48952b55ce2e3de2b7d8a9a 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -66,7 +66,7 @@ public class SysAuthService : IDynamicApiController, ITransient // 判断是否开启验证码,其校验验证码 if (await _sysConfigService.GetConfigValue(ConfigConst.SysCaptcha) && !_captcha.Validate(input.CodeId.ToString(), input.Code)) throw Oops.Oh(ErrorCodeEnum.D0008); - + // 获取登录租户和用户 var (tenant, user) = await GetLoginUserAndTenant(input.Host, account: input.Account); @@ -95,7 +95,7 @@ public class SysAuthService : IDynamicApiController, ITransient return await CreateToken(user, tenant.AppId); } - + /// /// 获取登录租户和用户 /// @@ -104,20 +104,20 @@ public class SysAuthService : IDynamicApiController, ITransient /// /// [NonAction] - public async Task<(SysTenant tenant, SysUser user)> GetLoginUserAndTenant(string host, string account=null, string phone=null) + public async Task<(SysTenant tenant, SysUser user)> GetLoginUserAndTenant(string host, string account = null, string phone = null) { // 是否租户隔离登录验证 var isTenantHostLogin = await _sysConfigService.GetConfigValue(ConfigConst.SysTenantHostLogin); - + SysUser user; SysTenant tenant; - + // 租户隔离登录 if (isTenantHostLogin) { // 若租户域名为空或为本地域名,则取默认租户域名 if (string.IsNullOrWhiteSpace(host) || host.StartsWith("localhost")) host = SqlSugarConst.DefaultTenantHost; - + // 租户是否存在或已禁用 tenant = await _sysUserRep.ChangeRepository>().GetFirstAsync(u => u.Host == host.ToLower()); if (tenant?.Status != StatusEnum.Enable) throw Oops.Oh(ErrorCodeEnum.Z1003); @@ -129,7 +129,7 @@ public class SysAuthService : IDynamicApiController, ITransient .WhereIF(!string.IsNullOrWhiteSpace(phone), u => u.Phone.Equals(phone)) .FirstAsync(); _ = user ?? throw Oops.Oh(ErrorCodeEnum.D0009); - + // 若登录的是超级管理员,则引用当前绑定的租户,这样登陆后操作的租户数据会与该租户关联 if (user.AccountType == AccountTypeEnum.SuperAdmin) user.TenantId = tenant.Id; } @@ -141,7 +141,7 @@ public class SysAuthService : IDynamicApiController, ITransient .WhereIF(!string.IsNullOrWhiteSpace(phone), u => u.Phone.Equals(phone)) .FirstAsync(); _ = user ?? throw Oops.Oh(ErrorCodeEnum.D0009); - + // 租户是否存在或已禁用 tenant = await _sysUserRep.ChangeRepository>().GetFirstAsync(u => u.Id == user.TenantId); if (tenant?.Status != StatusEnum.Enable) throw Oops.Oh(ErrorCodeEnum.Z1003); @@ -227,7 +227,7 @@ public class SysAuthService : IDynamicApiController, ITransient { // 校验短信验证码 App.GetRequiredService().VerifyCode(new SmsVerifyCodeInput { Phone = input.Phone, Code = input.Code }); - + // 获取登录租户和用户 var (tenant, user) = await GetLoginUserAndTenant(input.Host, phone: input.Phone); diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs index 8bf69270b7d5f74aba03dba5732590c36f145d59..170deb44aabc8a2ae8603504a412e39c0be85a07 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs @@ -190,7 +190,8 @@ public class SysLdapService : IDynamicApiController, ITransient try { ldapConn.Connect(sysLdap.Host, sysLdap.Port); - ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, sysLdap.BindPass); + string bindPass = CryptogramUtil.Decrypt(sysLdap.BindPass); + ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, bindPass); var ldapSearchResults = ldapConn.Search(sysLdap.BaseDn, LdapConnection.ScopeOne, "(objectClass=*)", null, false); var userLdapList = new List(); while (ldapSearchResults.HasMore()) @@ -216,7 +217,7 @@ public class SysLdapService : IDynamicApiController, ITransient { var sysUserLdap = CreateSysUserLdap(attrs, sysLdap.BindAttrAccount, sysLdap.BindAttrEmployeeId, deptCode); sysUserLdap.Dn = ldapEntry.Dn; - sysUserLdap.TenantId=sysLdap.TenantId; + sysUserLdap.TenantId = sysLdap.TenantId; userLdapList.Add(sysUserLdap); } } @@ -265,16 +266,16 @@ public class SysLdapService : IDynamicApiController, ITransient { var userLdap = new SysUserLdap { - Account = !attrs.ContainsKey(bindAttrAccount) ? null : attrs.GetAttribute(bindAttrAccount)?.StringValue, - EmployeeId = !attrs.ContainsKey(bindAttrEmployeeId) ? null : attrs.GetAttribute(bindAttrEmployeeId)?.StringValue, + Account = attrs.ContainsKey(bindAttrAccount) ? attrs.GetAttribute(bindAttrAccount)?.StringValue : null, + EmployeeId = attrs.ContainsKey(bindAttrEmployeeId) ? attrs.GetAttribute(bindAttrEmployeeId)?.StringValue : null, DeptCode = deptCode, - UserName = !attrs.ContainsKey("name") ? null : attrs.GetAttribute("name")?.StringValue, - Mail = !attrs.ContainsKey("mail") ? null : attrs.GetAttribute("mail")?.StringValue + UserName = attrs.ContainsKey("name") ? attrs.GetAttribute("name")?.StringValue : null, + Mail = attrs.ContainsKey("mail") ? attrs.GetAttribute("mail")?.StringValue : null }; - var pwdLastSet = !attrs.ContainsKey("pwdLastSet") ? null : attrs.GetAttribute("pwdLastSet")?.StringValue; - if (!pwdLastSet!.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet)); - var userAccountControl = !attrs.ContainsKey("userAccountControl") ? null : attrs.GetAttribute("userAccountControl")?.StringValue; - if ((Convert.ToInt32(userAccountControl) & 0x2) == 0x2) // 检查账户是否已过期(通过检查userAccountControl属性的特定位) + var pwdLastSet = attrs.ContainsKey("pwdLastSet") ? attrs.GetAttribute("pwdLastSet")?.StringValue : null; + if (pwdLastSet != null && !pwdLastSet.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet)); + var userAccountControl = attrs.ContainsKey("userAccountControl") ? attrs.GetAttribute("userAccountControl")?.StringValue : null; + if ((Convert.ToInt32(userAccountControl) & 0x2) == 0x2) // 检查账户是否已过期(通过检查userAccountControl属性的特定位) userLdap.AccountExpiresFlag = true; if ((Convert.ToInt32(userAccountControl) & 0x10000) == 0x10000) // 检查账户密码设置是否永不过期 userLdap.DontExpiresFlag = true; @@ -427,9 +428,9 @@ public class SysLdapService : IDynamicApiController, ITransient { Pid = org.Id, Id = YitIdHelper.NextId(), - Code = !attrs.ContainsKey(sysLdap.BindAttrCode) ? null : new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString(), + Code = attrs.ContainsKey(sysLdap.BindAttrCode) ? new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString() : null, Level = org.Level + 1, - Name = !attrs.ContainsKey(sysLdap.BindAttrAccount) ? null : attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue, + Name = attrs.ContainsKey(sysLdap.BindAttrAccount) ? attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue : null, OrderNo = listOrgs.Count + 1, }; } diff --git a/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs b/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs index eaab128e39f08b78485d176b77c44ea8ab3f2efa..52dbbe2a3ff6ba6e7acc31c6a82703932410e87b 100644 --- a/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs @@ -4,7 +4,6 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -using NewLife.Reflection; using Newtonsoft.Json; namespace Admin.NET.Core.Service; @@ -139,7 +138,7 @@ public class SysCacheService : IDynamicApiController, ISingleton private static string Key(string cacheName, object[] obs) { if (obs.OfType().Any()) throw new Exception("缓存参数类型不能能是:TimeSpan类型"); - StringBuilder sb = new (cacheName + ":"); + StringBuilder sb = new(cacheName + ":"); foreach (var a in obs) sb.Append($"<{KeySingle(a)}>"); return sb.ToString(); } @@ -311,6 +310,7 @@ public class SysCacheService : IDynamicApiController, ISingleton var hash = GetHashMap(key); hash.Add(hashKey, value); } + /// /// 添加或更新一条HASH /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs index d679f60dedd9319f12bead1ddd0244959401f98c..4425c3b8d7ead038fbab59d6d9cd5ba3354fecb5 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs @@ -23,7 +23,7 @@ public class CustomViewEngine : ViewEngineModel public string NameSpace { get; set; } public string ClassName { get; set; } - + public string LowerClassName { get; set; } public string ProjectLastName { get; set; } @@ -33,39 +33,39 @@ public class CustomViewEngine : ViewEngineModel public string PrintType { get; set; } public string PrintName { get; set; } - + public bool HasLikeQuery { get; set; } - + public bool HasJoinTable { get; set; } - + public bool HasEnumField { get; set; } - + public bool HasDictField { get; set; } - + public bool HasConstField { get; set; } - + public bool HasSetStatus => TableField.Any(IsStatus); - + public List TableField { get; set; } - + public List ImportFieldList { get; set; } - + public List UploadFieldList { get; set; } public List QueryWhetherList { get; set; } - + public List ApiTreeFieldList { get; set; } - + public List DropdownFieldList { get; set; } - + public List AddUpdateFieldList { get; set; } - + public List PrimaryKeyFieldList { get; set; } - + public List TableUniqueConfigList { get; set; } public List IgnoreUpdateFieldList => TableField.Where(u => u.WhetherAddUpdate == "N" && u.ColumnKey != "True" && u.WhetherCommon != "Y").ToList(); - + /// /// 格式化主键查询条件 /// 例: PrimaryKeysFormat(" || ", "u.{0} == input.{0}") @@ -77,12 +77,13 @@ public class CustomViewEngine : ViewEngineModel /// 字段首字母小写 /// public string PrimaryKeysFormat(string separator, string format, bool lowerFirstLetter = false) => string.Join(separator, PrimaryKeyFieldList.Select(u => string.Format(format, lowerFirstLetter ? u.LowerPropertyName : u.PropertyName))); - + /// /// 注入的服务 /// /// - public Dictionary InjectServiceMap { + public Dictionary InjectServiceMap + { get { var injectMap = new Dictionary(); @@ -92,33 +93,33 @@ public class CustomViewEngine : ViewEngineModel return injectMap; } } - + /// /// 服务构造参数 /// - public string InjectServiceArgs => InjectServiceMap.Count > 0 ? ", " +string.Join(", ", InjectServiceMap.Select(kv => $"{kv.Key} {kv.Value}")) : ""; - + public string InjectServiceArgs => InjectServiceMap.Count > 0 ? ", " + string.Join(", ", InjectServiceMap.Select(kv => $"{kv.Key} {kv.Value}")) : ""; + /// /// 判断字段是否为状态字段 /// /// /// public bool IsStatus(CodeGenConfig column) => column.PropertyName == nameof(SysUser.Status) && column.NetType == nameof(StatusEnum); - + /// /// 获取首字母小写字符串 /// /// /// public string ToLowerFirstLetter(string text) => string.IsNullOrWhiteSpace(text) ? text : text[..1].ToLower() + text[1..]; - + /// /// 将基本字段类型转为可空类型 /// /// /// public string GetNullableNetType(string netType) => Regex.IsMatch(netType, "(.*?Enum|bool|char|int|long|double|float|decimal)[?]?") ? netType.TrimEnd('?') + "?" : netType; - + /// /// 获取前端表格列定义的属性 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs index d370a7d32d45a60d7cf63cbb9fff4e7aec918858..6ae4b6e1765ab34f089429fa79f5f306c69f4d75 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs @@ -25,7 +25,7 @@ public class CodeGenConfig /// 数据库字段名 /// public string ColumnName { get; set; } - + /// /// 主外键 /// @@ -55,12 +55,12 @@ public class CodeGenConfig /// .NET类型 /// public string NetType { get; set; } - + /// /// 数据库中类型(物理类型) /// public string DataType { get; set; } - + /// /// 可空.NET类型 /// @@ -95,14 +95,14 @@ public class CodeGenConfig /// 外键链接字段 /// public string FkLinkColumnName { get; set; } - + /// /// 外键显示字段 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public string FkDisplayColumns { get; set; } - + /// /// 外键显示字段 /// @@ -117,17 +117,17 @@ public class CodeGenConfig /// 外键显示字段.NET类型 /// public string FkColumnNetType { get; set; } - + /// /// 父级字段 /// public string PidColumn { get; set; } - + /// /// 字典code /// public string DictTypeCode { get; set; } - + /// /// 查询方式 /// @@ -162,7 +162,7 @@ public class CodeGenConfig /// 增改 /// public string WhetherAddUpdate { get; set; } - + /// /// 导入 /// @@ -172,7 +172,7 @@ public class CodeGenConfig /// 是否是通用字段 /// public string WhetherCommon { get; set; } - + /// /// 排序 /// @@ -182,7 +182,7 @@ public class CodeGenConfig /// 是否是选择器控件 /// public bool IsSelectorEffectType => Regex.IsMatch(EffectType ?? "", "Selector$|ForeignKey", RegexOptions.IgnoreCase); - + /// /// 去掉尾部Id的属性名 /// @@ -217,7 +217,7 @@ public class CodeGenConfig return displayPropertyName[..1].ToLower() + displayPropertyName[1..]; } } - + /// /// 获取外键显示值语句 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs index d29e8d5982ed311e4d3d509257d62d87aba4866f..f57fa4d0ad36aca44c5bd0c8f387ae30560085b8 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs @@ -70,19 +70,19 @@ public class CodeGenInput : BasePageInput /// 功能名(数据库表名称) /// public virtual string TableComment { get; set; } - + /// /// 表唯一字段 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public virtual string TableUniqueConfig { get; set; } - + /// /// 表唯一字段列表 /// public virtual List TableUniqueList { get; set; } - + /// /// 菜单应用分类(应用编码) /// @@ -144,7 +144,7 @@ public class AddCodeGenInput : CodeGenInput /// [Required(ErrorMessage = "作者姓名不能为空")] public override string AuthorName { get; set; } - + ///// ///// 类名 ///// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs index fe8b56b6625585cddd098b2259173f568bc4fe4b..c4bb5e2201c0428819c42ca13dde18ad441c3347 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs @@ -45,7 +45,7 @@ public class ColumnOuput /// .NET字段类型 /// public string NetType { get; set; } - + /// /// 字典编码 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs index 9e119e16b89f64ed3b64734d5610999cd9e29ace..0cac927b7baa3f970e05bab07dbcdf708f63c649 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs @@ -1,7 +1,7 @@ // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 -// +// // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 -// +// // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! namespace Admin.NET.Core.Service; @@ -15,12 +15,12 @@ public class TableUniqueConfigItem /// 字段列表 /// public List Columns { get; set; } - + /// /// 描述信息 /// public string Message { get; set; } - + /// /// 格式化查询条件 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs index 795a15635b526c93119c95a68babc0dd1baec6dc..f3b96848a0ed28560741cbe973cc9523eec791e2 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs @@ -131,7 +131,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient codeGenConfig.QueryType = GetDefaultQueryType(codeGenConfig); // QueryTypeEnum.eq.ToString(); codeGenConfig.OrderNo = orderNo; codeGenConfigs.Add(codeGenConfig); - + if (!string.IsNullOrWhiteSpace(tableColumn.DictTypeCode)) { codeGenConfig.QueryType = "=="; diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs index aedd713b0b12b8a324248c19bb09627b3b481071..75291bf34910585530e891d041d6aa7179aa4dcb 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs @@ -15,7 +15,7 @@ namespace Admin.NET.Core.Service; public class SysCodeGenService : IDynamicApiController, ITransient { private readonly ISqlSugarClient _db; - + private readonly SysCodeGenConfigService _codeGenConfigService; private readonly CodeGenOptions _codeGenOptions; private readonly IViewEngine _viewEngine; @@ -152,6 +152,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient var tableOutputList = new List(); foreach (var item in entityInfos) { + var tbConfigId = item.Type.GetCustomAttribute()?.configId as string ?? SqlSugarConst.MainConfigId; + if (item.Type.IsDefined(typeof(LogTableAttribute))) tbConfigId = SqlSugarConst.LogConfigId; + if (tbConfigId != configId) continue; + var table = dbTableInfos.FirstOrDefault(u => string.Equals(u.Name, (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName), StringComparison.CurrentCultureIgnoreCase)); if (table == null) continue; tableOutputList.Add(new TableOutput @@ -365,14 +369,14 @@ public class SysCodeGenService : IDynamicApiController, ITransient } if (input.GenerateMenu) await AddMenu(input.TableName, input.BusName, input.MenuPid ?? 0, input.MenuIcon, input.PagePath, tableFieldList); - + // 非ZIP压缩返回空 if (!input.GenerateType.StartsWith('1')) return null; - + // 判断是否存在同名称文件 string downloadPath = zipPath + ".zip"; if (File.Exists(downloadPath)) File.Delete(downloadPath); - + // 创建zip文件并返回下载地址 ZipFile.CreateFromDirectory(zipPath, downloadPath); return new { url = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host.Value}/codeGen/{input.TableName}.zip" }; @@ -383,7 +387,6 @@ public class SysCodeGenService : IDynamicApiController, ITransient /// /// [DisplayName("获取代码生成预览")] - // ReSharper disable once MemberCanBePrivate.Global public async Task> Preview(SysCodeGen input) { var (_, result) = await RenderTemplateAsync(input); @@ -413,7 +416,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient ProjectLastName = input.NameSpace!.Split('.').Last(), LowerClassName = input.TableName![..1].ToLower() + input.TableName[1..], TableUniqueConfigList = input.TableUniqueList ?? new(), - + TableField = tableFieldList, QueryWhetherList = tableFieldList.Where(u => u.WhetherQuery == "Y").ToList(), ImportFieldList = tableFieldList.Where(u => u.WhetherImport == "Y").ToList(), @@ -422,7 +425,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient AddUpdateFieldList = tableFieldList.Where(u => u.WhetherAddUpdate == "Y").ToList(), ApiTreeFieldList = tableFieldList.Where(u => u.EffectType == "ApiTreeSelector").ToList(), DropdownFieldList = tableFieldList.Where(u => u.EffectType is "ForeignKey" or "ApiTreeSelector").ToList(), - + HasJoinTable = joinTableList.Count > 0, HasDictField = tableFieldList.Any(u => u.EffectType == "DictSelector"), HasEnumField = tableFieldList.Any(u => u.EffectType == "EnumSelector"), @@ -445,7 +448,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient builder.AddAssemblyReferenceByName("System.Text.RegularExpressions"); builder.AddAssemblyReferenceByName("System.Collections"); builder.AddAssemblyReferenceByName("System.Linq"); - + builder.AddUsing("System.Text.RegularExpressions"); builder.AddUsing("System.Collections.Generic"); builder.AddUsing("System.Linq"); @@ -474,11 +477,11 @@ public class SysCodeGenService : IDynamicApiController, ITransient var parentMenuPath = ""; var appId = _userManager.AppId; var appMenuList = new List(); - var lowerClassName = className[..1].ToLower() + className[1..]; + var lowerClassName = className[..1].ToLower() + className[1..]; if (pid == 0) { // 新增目录,并记录Id - var dirMenu = new SysMenu { Pid=0, Title=title, Type=MenuTypeEnum.Dir, Icon="robot", Path="/" + className.ToLower(), Component="Layout" }; + var dirMenu = new SysMenu { Pid = 0, Title = title, Type = MenuTypeEnum.Dir, Icon = "robot", Path = "/" + className.ToLower(), Component = "Layout" }; pid = (await _db.Insertable(dirMenu).ExecuteReturnEntityAsync()).Id; appMenuList.Add(new SysAppMenu { AppId = appId, MenuId = pid }); } @@ -487,9 +490,9 @@ public class SysCodeGenService : IDynamicApiController, ITransient var parentMenu = await _db.Queryable().FirstAsync(u => u.Id == pid) ?? throw Oops.Oh(ErrorCodeEnum.D1505); parentMenuPath = parentMenu.Path; } - + // 新增菜单,并记录Id - var rootMenu = new SysMenu { Pid=pid, Title=title, Type=MenuTypeEnum.Menu, Icon=menuIcon, Path=$"{parentMenuPath}/{className.ToLower()}", Component=$"/{pagePath}/{lowerClassName}/index" }; + var rootMenu = new SysMenu { Pid = pid, Title = title, Type = MenuTypeEnum.Menu, Icon = menuIcon, Path = $"{parentMenuPath}/{className.ToLower()}", Component = $"/{pagePath}/{lowerClassName}/index" }; pid = (await _db.Insertable(rootMenu).ExecuteReturnEntityAsync()).Id; appMenuList.Add(new SysAppMenu { AppId = appId, MenuId = pid }); @@ -509,13 +512,13 @@ public class SysCodeGenService : IDynamicApiController, ITransient }; if (tableFieldList.Any(u => u.EffectType is "ForeignKey" or "ApiTreeSelector" && (u.WhetherAddUpdate == "Y" || u.WhetherQuery == "Y"))) - menuList.Add(new SysMenu { Title="下拉列表数据", Permission=$"{lowerClassName}:dropdownData", Pid=pid, Type=MenuTypeEnum.Btn, OrderNo=orderNo+=10}); - + menuList.Add(new SysMenu { Title = "下拉列表数据", Permission = $"{lowerClassName}:dropdownData", Pid = pid, Type = MenuTypeEnum.Btn, OrderNo = orderNo += 10 }); + foreach (var column in tableFieldList.Where(u => u.EffectType == "Upload")) - menuList.Add(new SysMenu { Title=$"上传{column.ColumnComment}", Permission=$"{lowerClassName}:upload{column.PropertyName}", Pid=pid, Type=MenuTypeEnum.Btn, OrderNo=orderNo+=10}); - + menuList.Add(new SysMenu { Title = $"上传{column.ColumnComment}", Permission = $"{lowerClassName}:upload{column.PropertyName}", Pid = pid, Type = MenuTypeEnum.Btn, OrderNo = orderNo += 10 }); + await _db.Insertable(menuList).ExecuteCommandAsync(); - + // 新增应用菜单关联 appMenuList.AddRange(menuList.Select(u => new SysAppMenu { AppId = appId, MenuId = u.Id })); await _db.Insertable(appMenuList).ExecuteCommandAsync(); diff --git a/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs b/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs index 51a5d02574b9b0a4e13abab2165bfda452dc83d3..535f17d0f5b8d2baa94a58ca78587fffb648a1b2 100644 --- a/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs @@ -94,7 +94,7 @@ public class SysConfigService : IDynamicApiController, ITransient public async Task DeleteConfig(DeleteConfigInput input) { var config = await _sysConfigRep.GetFirstAsync(u => u.Id == input.Id); - + // 禁止删除系统参数 if (config.SysFlag == YesNoEnum.Y) throw Oops.Oh(ErrorCodeEnum.D9001); @@ -115,7 +115,7 @@ public class SysConfigService : IDynamicApiController, ITransient foreach (var id in ids) { var config = await _sysConfigRep.GetFirstAsync(u => u.Id == id); - + // 禁止删除系统参数 if (config.SysFlag == YesNoEnum.Y) continue; @@ -225,7 +225,7 @@ public class SysConfigService : IDynamicApiController, ITransient { var info = await _sysConfigRep.GetFirstAsync(c => c.Code == Config.Code); if (info == null) continue; - + await _sysConfigRep.AsUpdateable().SetColumns(u => u.Value == Config.Value).Where(u => u.Code == Config.Code).ExecuteCommandAsync(); Remove(info); } @@ -248,7 +248,7 @@ public class SysConfigService : IDynamicApiController, ITransient // var sysCopyright = await GetConfigValue(ConfigConst.SysWebCopyright); // var sysIcp = await GetConfigValue(ConfigConst.SysWebIcp); var app = await App.GetRequiredService().GetCurrentAppInfo(); - + var sysIcpUrl = await GetConfigValue(ConfigConst.SysWebIcpUrl); var sysSecondVer = await GetConfigValue(ConfigConst.SysSecondVer); var sysCaptcha = await GetConfigValue(ConfigConst.SysCaptcha); @@ -297,7 +297,7 @@ public class SysConfigService : IDynamicApiController, ITransient // 删除已存在文件 if (File.Exists(oldSysLogoAbsoluteFilePath)) File.Delete(oldSysLogoAbsoluteFilePath); - + // 创建文件夹 var absoluteFileDir = Path.GetDirectoryName(absoluteFilePath); if (!Directory.Exists(absoluteFileDir)) Directory.CreateDirectory(absoluteFileDir); @@ -317,7 +317,7 @@ public class SysConfigService : IDynamicApiController, ITransient app.Icp = input.SysIcp; await _sysConfigRep.Context.Updateable(app).ExecuteCommandAsync(); - + await UpdateConfigValue(ConfigConst.SysWebIcpUrl, input.SysIcpUrl); await UpdateConfigValue(ConfigConst.SysSecondVer, (input.SysSecondVer ?? false).ToString()); await UpdateConfigValue(ConfigConst.SysCaptcha, (input.SysCaptcha ?? true).ToString()); @@ -329,6 +329,5 @@ public class SysConfigService : IDynamicApiController, ITransient _sysCacheService.Remove($"{CacheConst.KeyConfig}Remark:{config.Code}"); _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.GroupCode}:GroupWithCache"); _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}"); - } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs b/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs index 88359d698e80f9d98ad95763279508d5d38b2f2a..6b5f4e8d49cd0f5ca711a23cfb64ba789da3ba9b 100644 --- a/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs +++ b/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs @@ -342,7 +342,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient // 再使用第一个主键排序 query = query.OrderBy(dbColumnInfos.First(u => u.IsPrimarykey).DbColumnName); var records = ((IEnumerable)await query.ToListAsync()).ToDynamicList(); - + // 过滤已存在的数据 if (input.FilterExistingData && records.Any()) { @@ -372,14 +372,14 @@ public class SysDatabaseService : IDynamicApiController, ITransient { string fullName = seedDataTypes[i].FullName; if ((fullName == doNotFilterFullName1) || (fullName == doNotFilterFullName2)) continue; - + // 删除重复数据 var instance = Activator.CreateInstance(seedDataTypes[i]); var hasDataMethod = seedDataTypes[i].GetMethod("HasData"); var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast(); if (seedData == null) continue; - List recordsToRemove = new (); + List recordsToRemove = new(); foreach (var record in records) { object recordId = pkInfo.GetValue(record); @@ -425,7 +425,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient // jsonIgnoreInfo.Add(record); // } // } - + // 获取所有字段信息 var propertyList = entityType.GetProperties().Where(x => false == (x.GetCustomAttribute()?.IsIgnore ?? false)).ToList(); for (var i = 0; i < propertyList.Count; i++) @@ -480,7 +480,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient builder.AddUsing("System.Collections.Generic"); builder.AddUsing("System.Linq"); }); - + var targetPath = GetSeedDataTargetPath(input); await File.WriteAllTextAsync(targetPath, tResult, Encoding.UTF8); } diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs index 74d08326af521dd0343cab155d42b438369c80cd..59c266c226f55e50d9ca324f1e01019d265a42c7 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictDataInput.cs @@ -21,6 +21,11 @@ public class PageDictDataInput : BasePageInput /// 字典文本 /// public string Label { get; set; } + + /// + /// 租户Id + /// + public long TenantId { get; set; } } public class AddDictDataInput : SysDictData diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs index f311da170767327b1dd0ceab6bb447e0fabd4132..93a7c0a7499eb9935a4b0b1612519ec4e95c28f4 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs @@ -21,6 +21,11 @@ public class PageDictTypeInput : BasePageInput /// 编码 /// public string Code { get; set; } + + /// + /// 租户Id + /// + public long TenantId { get; set; } } public class AddDictTypeInput : SysDictType diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs index 10554b95c5c474da8314a96513044b116e210f82..5e337582d6aad9d6858b1a91f63d0fd0c72d3e19 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs @@ -14,12 +14,15 @@ public class SysDictDataService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _sysDictDataRep; private readonly SysCacheService _sysCacheService; + private readonly UserManager _userManager; public SysDictDataService(SqlSugarRepository sysDictDataRep, - SysCacheService sysCacheService) + SysCacheService sysCacheService, + UserManager userManager) { _sysDictDataRep = sysDictDataRep; _sysCacheService = sysCacheService; + _userManager = userManager; } /// @@ -30,9 +33,12 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("获取字典值分页列表")] public async Task> Page(PageDictDataInput input) { + var ids = GetTenantIdList(); return await _sysDictDataRep.AsQueryable() .Where(u => u.DictTypeId == input.DictTypeId) + .WhereIF(!_userManager.SuperAdmin, u => ids.Contains(u.TenantId.Value)) .WhereIF(!string.IsNullOrEmpty(input.Label?.Trim()), u => u.Value.Contains(input.Label)) + .WhereIF(_userManager.SuperAdmin && input.TenantId > 0, u => u.TenantId == input.TenantId) .OrderBy(u => new { u.OrderNo, Code = u.Value }) .ToPagedListAsync(input.Page, input.PageSize); } @@ -56,10 +62,10 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("增加字典值")] public async Task AddDictData(AddDictDataInput input) { - var isExist = await _sysDictDataRep.IsAnyAsync(u => u.Value == input.Value && u.DictTypeId == input.DictTypeId); + var isExist = await _sysDictDataRep.AsQueryable().ClearFilter().AnyAsync(u => u.Value == input.Value && u.DictTypeId == input.DictTypeId); if (isExist) throw Oops.Oh(ErrorCodeEnum.D3003); - var dictTypeCode = await _sysDictDataRep.AsQueryable().Where(u => u.DictTypeId == input.DictTypeId).Select(u => u.DictType.Code).FirstAsync(); + var dictTypeCode = await _sysDictDataRep.AsQueryable().ClearFilter().Where(u => u.DictTypeId == input.DictTypeId).Select(u => u.DictType.Code).FirstAsync(); _sysCacheService.Remove($"{CacheConst.KeyDict}{dictTypeCode}"); await _sysDictDataRep.InsertAsync(input.Adapt()); @@ -75,13 +81,13 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("更新字典值")] public async Task UpdateDictData(UpdateDictDataInput input) { - var isExist = await _sysDictDataRep.IsAnyAsync(u => u.Id == input.Id); + var isExist = await _sysDictDataRep.AsQueryable().ClearFilter().AnyAsync(u => u.Id == input.Id); if (!isExist) throw Oops.Oh(ErrorCodeEnum.D3004); - isExist = await _sysDictDataRep.IsAnyAsync(u => u.Value == input.Value && u.DictTypeId == input.DictTypeId && u.Id != input.Id); + isExist = await _sysDictDataRep.AsQueryable().ClearFilter().AnyAsync(u => u.Value == input.Value && u.DictTypeId == input.DictTypeId && u.Id != input.Id); if (isExist) throw Oops.Oh(ErrorCodeEnum.D3003); - var dictTypeCode = await _sysDictDataRep.AsQueryable().Where(u => u.DictTypeId == input.DictTypeId).Select(u => u.DictType.Code).FirstAsync(); + var dictTypeCode = await _sysDictDataRep.AsQueryable().ClearFilter().Where(u => u.DictTypeId == input.DictTypeId).Select(u => u.DictType.Code).FirstAsync(); _sysCacheService.Remove($"{CacheConst.KeyDict}{dictTypeCode}"); await _sysDictDataRep.UpdateAsync(input.Adapt()); @@ -97,9 +103,9 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("删除字典值")] public async Task DeleteDictData(DeleteDictDataInput input) { - var dictData = await _sysDictDataRep.GetByIdAsync(input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D3004); + var dictData = await GetSysDictDataQueryable().FirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D3004); - var dictTypeCode = await _sysDictDataRep.AsQueryable().Where(u => u.DictTypeId == dictData.Id).Select(u => u.DictType.Code).FirstAsync(); + var dictTypeCode = await GetSysDictDataQueryable().Where(u => u.DictTypeId == dictData.Id).Select(u => u.DictType.Code).FirstAsync(); _sysCacheService.Remove($"{CacheConst.KeyDict}{dictTypeCode}"); await _sysDictDataRep.DeleteAsync(dictData); @@ -125,9 +131,9 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("修改字典值状态")] public async Task SetStatus(DictDataInput input) { - var dictData = await _sysDictDataRep.GetByIdAsync(input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D3004); + var dictData = await _sysDictDataRep.AsQueryable().FirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D3004); - var dictTypeCode = await _sysDictDataRep.AsQueryable().Where(u => u.DictTypeId == dictData.Id).Select(u => u.DictType.Code).FirstAsync(); + var dictTypeCode = await _sysDictDataRep.AsQueryable().ClearFilter().Where(u => u.DictTypeId == dictData.Id).Select(u => u.DictType.Code).FirstAsync(); _sysCacheService.Remove($"{CacheConst.KeyDict}{dictTypeCode}"); dictData.Status = input.Status; @@ -142,13 +148,12 @@ public class SysDictDataService : IDynamicApiController, ITransient [NonAction] public async Task> GetDictDataListByDictTypeId(long dictTypeId) { - var dictType = await _sysDictDataRep.ChangeRepository>().GetByIdAsync(dictTypeId); + var dictType = await App.GetService().GetDetail(new DictTypeInput { Id = dictTypeId }); var dictDataList = _sysCacheService.Get>($"{CacheConst.KeyDict}{dictTypeId}"); if (dictDataList == null) { - dictDataList = await _sysDictDataRep.AsQueryable() - .Where(u => u.DictTypeId == dictTypeId).OrderBy(u => new { u.OrderNo, Code = u.Value }).ToListAsync(); + dictDataList = await GetSysDictDataQueryable().Where(u => u.DictTypeId == dictTypeId).OrderBy(u => new { u.OrderNo, Code = u.Value }).ToListAsync(); _sysCacheService.Set($"{CacheConst.KeyDict}{dictType.Code}", dictDataList); } return dictDataList; @@ -165,9 +170,11 @@ public class SysDictDataService : IDynamicApiController, ITransient var dictDataList = _sysCacheService.Get>($"{CacheConst.KeyDict}{code}"); if (dictDataList == null) { - dictDataList = await _sysDictDataRep.Context.Queryable() + var ids = GetTenantIdList(); + dictDataList = await _sysDictDataRep.Context.Queryable().ClearFilter() .LeftJoin((u, a) => u.Id == a.DictTypeId) .Where((u, a) => u.Code == code && u.Status == StatusEnum.Enable && a.Status == StatusEnum.Enable) + .WhereIF(!_userManager.SuperAdmin, (u, a) => ids.Contains(u.TenantId.Value) && ids.Contains(a.TenantId.Value)) .OrderBy((u, a) => new { a.OrderNo, Code = a.Value }) .Select((u, a) => a).ToListAsync(); _sysCacheService.Set($"{CacheConst.KeyDict}{code}", dictDataList); @@ -183,14 +190,34 @@ public class SysDictDataService : IDynamicApiController, ITransient [DisplayName("根据查询条件获取字典值集合")] public async Task> GetDataList([FromQuery] QueryDictDataInput input) { + var ids = GetTenantIdList(); return await _sysDictDataRep.Context.Queryable() .LeftJoin((u, a) => u.Id == a.DictTypeId) .Where((u, a) => u.Code == input.Code) .WhereIF(input.Status.HasValue, (u, a) => a.Status == (StatusEnum)input.Status.Value) + .WhereIF(!_userManager.SuperAdmin, (u, a) => ids.Contains(u.TenantId.Value) && ids.Contains(a.TenantId.Value)) .OrderBy((u, a) => new { a.OrderNo, Code = a.Value }) .Select((u, a) => a).ToListAsync(); } + /// + /// 获取租户Id列表 + /// + /// + [NonAction] + public List GetTenantIdList() => App.GetService().GetTenantIdList(); + + /// + /// 获取SysDictData表查询实例 + /// + /// + [NonAction] + public ISugarQueryable GetSysDictDataQueryable() + { + var ids = GetTenantIdList(); + return _sysDictDataRep.AsQueryable().ClearFilter().WhereIF(!_userManager.SuperAdmin, u => ids.Contains(u.TenantId.Value)); + } + /// /// 根据字典类型Id删除字典值 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs index 391575e314ffbd25d9e12576eaab8e33844e9c06..e33b2a0792f5902db465b4f47297ad729733cc98 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs @@ -15,14 +15,17 @@ public class SysDictTypeService : IDynamicApiController, ITransient private readonly SqlSugarRepository _sysDictTypeRep; private readonly SysDictDataService _sysDictDataService; private readonly SysCacheService _sysCacheService; + private readonly UserManager _userManager; public SysDictTypeService(SqlSugarRepository sysDictTypeRep, SysDictDataService sysDictDataService, - SysCacheService sysCacheService) + SysCacheService sysCacheService, + UserManager userManager) { _sysDictTypeRep = sysDictTypeRep; _sysDictDataService = sysDictDataService; _sysCacheService = sysCacheService; + _userManager = userManager; } /// @@ -33,6 +36,8 @@ public class SysDictTypeService : IDynamicApiController, ITransient public async Task> Page(PageDictTypeInput input) { return await _sysDictTypeRep.AsQueryable() + .WhereIF(!_userManager.SuperAdmin, u => !SqlFunc.EndsWith(SqlFunc.ToLower(u.Code), nameof(Enum).ToLower())) + .WhereIF(_userManager.SuperAdmin && input.TenantId > 0, u => u.TenantId == input.TenantId) .WhereIF(!string.IsNullOrEmpty(input.Code?.Trim()), u => u.Code.Contains(input.Code)) .WhereIF(!string.IsNullOrEmpty(input.Name?.Trim()), u => u.Name.Contains(input.Name)) .OrderBy(u => new { u.OrderNo, u.Code }) @@ -46,7 +51,7 @@ public class SysDictTypeService : IDynamicApiController, ITransient [DisplayName("获取字典类型列表")] public async Task> GetList() { - return await _sysDictTypeRep.AsQueryable().OrderBy(u => new { u.OrderNo, u.Code }).ToListAsync(); + return await GetSysDictDataQueryable().OrderBy(u => new { u.OrderNo, u.Code }).ToListAsync(); } /// @@ -54,11 +59,10 @@ public class SysDictTypeService : IDynamicApiController, ITransient /// /// /// - [UnitOfWork] [DisplayName("获取字典类型-值列表")] public async Task> GetDataList([FromQuery] GetDataDictTypeInput input) { - var dictType = await _sysDictTypeRep.GetFirstAsync(u => u.Code == input.Code) ?? throw Oops.Oh(ErrorCodeEnum.D3000); + var dictType = await GetSysDictDataQueryable().FirstAsync(u => u.Code == input.Code) ?? throw Oops.Oh(ErrorCodeEnum.D3000); return await _sysDictDataService.GetDictDataListByDictTypeId(dictType.Id); } @@ -71,9 +75,9 @@ public class SysDictTypeService : IDynamicApiController, ITransient [DisplayName("添加字典类型")] public async Task AddDictType(AddDictTypeInput input) { - if (input.Code.ToLower().EndsWith("enum")) throw Oops.Oh(ErrorCodeEnum.D3006); - - var isExist = await _sysDictTypeRep.IsAnyAsync(u => u.Code == input.Code); + if (input.Code.ToLower().EndsWith(nameof(Enum).ToLower())) throw Oops.Oh(ErrorCodeEnum.D3006); + + var isExist = await _sysDictTypeRep.AsQueryable().ClearFilter().AnyAsync(u => u.Code == input.Code); if (isExist) throw Oops.Oh(ErrorCodeEnum.D3001); await _sysDictTypeRep.InsertAsync(input.Adapt()); @@ -91,10 +95,10 @@ public class SysDictTypeService : IDynamicApiController, ITransient { var dict = await _sysDictTypeRep.GetFirstAsync(x => x.Id == input.Id); if (dict == null) throw Oops.Oh(ErrorCodeEnum.D3000); - - if (dict.Code.ToLower().EndsWith("enum") && input.Code != dict.Code) throw Oops.Oh(ErrorCodeEnum.D3007); - var isExist = await _sysDictTypeRep.IsAnyAsync(u => u.Code == input.Code && u.Id != input.Id); + if (dict.Code.ToLower().EndsWith(nameof(Enum).ToLower()) && input.Code != dict.Code) throw Oops.Oh(ErrorCodeEnum.D3007); + + var isExist = await _sysDictTypeRep.AsQueryable().ClearFilter().AnyAsync(u => u.Code == input.Code && u.Id != input.Id); if (isExist) throw Oops.Oh(ErrorCodeEnum.D3001); _sysCacheService.Remove($"{CacheConst.KeyDict}{input.Code}"); @@ -153,11 +157,34 @@ public class SysDictTypeService : IDynamicApiController, ITransient [DisplayName("获取所有字典集合")] public async Task GetAllDictList() { - var ds = await _sysDictTypeRep.AsQueryable() + var ds = await GetSysDictDataQueryable() .InnerJoin((u, a) => u.Id == a.DictTypeId) - .Where((u, a) => u.IsDelete == false && a.IsDelete == false) + .Where((u, a) => u.IsDelete == false && a.Status == StatusEnum.Enable) .Select((u, a) => new { TypeCode = u.Code, a.Label, a.Value, a.Name, a.TagType, a.StyleSetting, a.ClassSetting, a.ExtData, a.Remark, a.OrderNo, a.Status }) .ToListAsync(); return ds.OrderBy(u => u.OrderNo).GroupBy(u => u.TypeCode).ToDictionary(u => u.Key, u => u); } + + /// + /// 获取SysDictData表查询实例 + /// + /// + [NonAction] + public ISugarQueryable GetSysDictDataQueryable() + { + var ids = GetTenantIdList(); + return _sysDictTypeRep.AsQueryable().ClearFilter().WhereIF(!_userManager.SuperAdmin, u => ids.Contains(u.TenantId.Value)); + } + + /// + /// 获取租户Id列表 + /// + /// + [NonAction] + public List GetTenantIdList() + { + List tenantIdList = new() { SqlSugarConst.DefaultTenantId }; + if (_userManager.TenantId > 0) tenantIdList.Add(_userManager.TenantId); + return tenantIdList; + } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/File/Dto/FileInput.cs b/Admin.NET/Admin.NET.Core/Service/File/Dto/FileInput.cs index 5f99c0ed75f27dd1bf025d37045b581cbfa19e73..7dfce45c6f1e816c95c2e613dcd71b3d81cf4d98 100644 --- a/Admin.NET/Admin.NET.Core/Service/File/Dto/FileInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/File/Dto/FileInput.cs @@ -65,7 +65,7 @@ public class UploadFileInput /// 允许格式:.jpeg.jpg.png.bmp.gif.tif /// public string AllowSuffix { get; set; } - + /// /// 文件类型 /// @@ -81,7 +81,7 @@ public class UploadFileFromBase64Input /// 文件名 /// public string? FileName { get; set; } - + /// /// 文件内容 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs b/Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs index 3d24be9c2e3ab33b6502be8bcb931b5621ada323..4c2967f1adc4bc5f5ece81e9b70c654bc655d7ec 100644 --- a/Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs @@ -109,7 +109,7 @@ public class SysJobService : IDynamicApiController, ITransient throw new NotSupportedException(); } - _schedulerFactory.AddJob( JobBuilder.Create(jobType).LoadFrom(input.Adapt() ).SetJobType(jobType)); + _schedulerFactory.AddJob(JobBuilder.Create(jobType).LoadFrom(input.Adapt()).SetJobType(jobType)); // 延迟一下等待持久化写入,再执行其他字段的更新 await Task.Delay(500); diff --git a/Admin.NET/Admin.NET.Core/Service/Menu/Dto/MenuInput.cs b/Admin.NET/Admin.NET.Core/Service/Menu/Dto/MenuInput.cs index 9d28e580cc8c1bc3fe23cb0b79f38b6abd98b41e..e8fb62e2b1e9738c4d1438b78df48607d333f9c6 100644 --- a/Admin.NET/Admin.NET.Core/Service/Menu/Dto/MenuInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Menu/Dto/MenuInput.cs @@ -17,12 +17,12 @@ public class MenuInput /// 菜单类型(1目录 2菜单 3按钮) /// public MenuTypeEnum? Type { get; set; } - + /// /// 获取所有菜单 /// public bool All { get; set; } - + /// /// 应用Id /// diff --git a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs index 472117987cfd2962f09b09c9b26bf025800d53aa..33b1e25091ebdb4d73d6602de907f06ce89d9e73 100644 --- a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs @@ -52,15 +52,31 @@ public class SysMenuService : IDynamicApiController, ITransient .OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0); return menuList.Adapt>(); } - var menuIdList = await GetMenuIdList(); var menuTree = await _sysMenuRep.AsQueryable() .InnerJoin((u, am) => am.AppId == _userManager.AppId && u.Id == am.MenuId) - .Where(u => u.Type != MenuTypeEnum.Btn && u.Status == StatusEnum.Enable) + .Where(u => u.Status == StatusEnum.Enable) .OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0, menuIdList.Select(d => (object)d).ToArray()); + DeleteBtnFromMenuTree(menuTree); return menuTree.Adapt>(); } + /// + /// 删除登录菜单树里面的按钮 + /// + private static void DeleteBtnFromMenuTree(List menuList) + { + if (menuList == null) return; + for (var i = menuList.Count - 1; i >= 0; i--) + { + var menu = menuList[i]; + if (menu.Type == MenuTypeEnum.Btn) + menuList.Remove(menu); + else if (menu.Children.Count > 0) + DeleteBtnFromMenuTree(menu.Children); + } + } + /// /// 获取菜单列表 🔖 /// @@ -187,10 +203,10 @@ public class SysMenuService : IDynamicApiController, ITransient // 级联删除角色菜单数据 await _sysRoleMenuService.DeleteRoleMenuByMenuIdList(menuIdList); - + // 级联删除用户收藏菜单 await _sysUserMenuService.DeleteMenuList(menuIdList); - + // 删除应用菜单关联 await _sysAppMenuRep.AsDeleteable().Where(u => menuIdList.Contains(u.MenuId)).ExecuteCommandAsync(); diff --git a/Admin.NET/Admin.NET.Core/Service/Message/SysEmailService.cs b/Admin.NET/Admin.NET.Core/Service/Message/SysEmailService.cs index 6d8ac8d5b7dfc69c4ca6b371ee557dab66783893..e3f653ec385a48016e0523ecc1d98a39e74f5907 100644 --- a/Admin.NET/Admin.NET.Core/Service/Message/SysEmailService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Message/SysEmailService.cs @@ -37,13 +37,13 @@ public class SysEmailService : IDynamicApiController, ITransient var webTitle = await _sysConfigService.GetConfigValue(ConfigConst.SysWebTitle); title = string.IsNullOrWhiteSpace(title) ? $"{webTitle} 系统邮件" : title; var message = new MimeMessage(); - + message.From.Add(new MailboxAddress(_emailOptions.DefaultFromEmail, _emailOptions.DefaultFromEmail)); - + message.To.Add(string.IsNullOrWhiteSpace(toEmail) ? new MailboxAddress(_emailOptions.DefaultToEmail, _emailOptions.DefaultToEmail) : new MailboxAddress(toEmail, toEmail)); - + message.Subject = title; message.Body = new TextPart("html") { diff --git a/Admin.NET/Admin.NET.Core/Service/Message/SysSmsService.cs b/Admin.NET/Admin.NET.Core/Service/Message/SysSmsService.cs index 44a887dacd879e8f6b311109f3895d24a14c0039..84f8dac5f93856be782903dc7a539b7ff142ffbd 100644 --- a/Admin.NET/Admin.NET.Core/Service/Message/SysSmsService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Message/SysSmsService.cs @@ -53,9 +53,9 @@ public class SysSmsService : IDynamicApiController, ITransient public bool VerifyCode(SmsVerifyCodeInput input) { var verifyCode = _sysCacheService.Get($"{CacheConst.KeyPhoneVerCode}{input.Phone}"); - + if (string.IsNullOrWhiteSpace(verifyCode)) throw Oops.Oh("验证码不存在或已失效,请重新获取!"); - + if (verifyCode != input.Code) throw Oops.Oh("验证码错误!"); return true; diff --git a/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs b/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs index 068c9aed7374028543f14cda0f16935027268dc7..627b1e71cd9b8cd3b4b72d612ef285d97562e414 100644 --- a/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Notice/SysNoticeService.cs @@ -91,9 +91,9 @@ public class SysNoticeService : IDynamicApiController, ITransient public async Task DeleteNotice(DeleteNoticeInput input) { var sysNotice = await _sysNoticeRep.GetByIdAsync(input.Id); - + if (sysNotice.CreateUserId != _userManager.UserId) throw Oops.Oh(ErrorCodeEnum.D7003); - + if (sysNotice.Status == NoticeStatusEnum.PUBLIC) throw Oops.Oh(ErrorCodeEnum.D7001); await _sysNoticeRep.DeleteAsync(u => u.Id == input.Id); diff --git a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs index 9591dc09e6969867209aacf56e8bd3574141f865..66e8ffe15f5ac4fcac1e60c7657d9af0b766faa7 100644 --- a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs @@ -300,19 +300,19 @@ public class SysOrgService : IDynamicApiController, ITransient // 本人创建机构集合 var orgList0 = await _sysOrgRep.AsQueryable().Where(u => u.CreateUserId == userId).Select(u => u.Id).ToListAsync(); - + // 扩展机构集合 var orgList1 = await _sysUserExtOrgService.GetUserExtOrgList(userId); - + // 角色机构集合 var orgList2 = await GetUserRoleOrgIdList(userId, userOrgId); - + // 机构并集 orgIdList = orgList1.Select(u => u.OrgId).Union(orgList2).Union(orgList0).ToList(); - + // 当前所属机构 if (!orgIdList.Contains(userOrgId)) orgIdList.Add(userOrgId); - + _sysCacheService.Set($"{CacheConst.KeyUserOrg}{userId}", orgIdList, TimeSpan.FromDays(7)); // 存缓存 return orgIdList; } @@ -326,7 +326,7 @@ public class SysOrgService : IDynamicApiController, ITransient private async Task> GetUserRoleOrgIdList(long userId, long userOrgId) { var roleList = await _sysUserRoleService.GetUserRoleList(userId); - + if (roleList.Count < 1) return new(); // 空机构Id集合 return await GetUserOrgIdList(roleList, userId, userOrgId); diff --git a/Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs b/Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs index af0aeca7e2faa046bdc361abac6acaeb3edd5fb7..827ec69fb53e6746cda85bb2a852aba2f1bd4353 100644 --- a/Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs @@ -36,7 +36,15 @@ public class SysPosService : IDynamicApiController, ITransient return await _sysPosRep.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code)) - .OrderBy(u => new { u.OrderNo, u.Id }).ToListAsync(); + .OrderBy(u => new { u.OrderNo, u.Id }) + .Mapper(u => + { + u.UserList = _sysPosRep.Context.Queryable() + .Where(a => a.PosId == u.Id || SqlFunc.Subqueryable() + .Where(t => a.Id == t.UserId && t.PosId == u.Id).Any()) + .ToList(); + }) + .ToListAsync(); } /// diff --git a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs index f98f366d68f1e12f46fd8896abea82c4d62f7f11..d4d781aa7225ddc12562fefa299af321a2b55022 100644 --- a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs @@ -4,8 +4,8 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -using AngleSharp; -using AngleSharp.Html.Dom; +using NewLife.Http; +using NewLife.Serialization; namespace Admin.NET.Core.Service; @@ -145,119 +145,203 @@ public class SysRegionService : IDynamicApiController, ITransient { var syncLevel = await _sysConfigService.GetConfigValue(ConfigConst.SysRegionSyncLevel); if (syncLevel is < 1 or > 5) syncLevel = 3;//默认区县级 - var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader()); - var dom = await context.OpenAsync(_url); - - // 省级 - var itemList = dom.QuerySelectorAll("table.provincetable tr.provincetr td a"); - if (itemList.Length == 0) throw Oops.Oh(ErrorCodeEnum.R2005); await _sysRegionRep.DeleteAsync(u => u.Id > 0); - foreach (var element in itemList) + await SyncByMap(syncLevel); + + // var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader()); + // var dom = await context.OpenAsync(_url); + // + // // 省级列表 + // var itemList = dom.QuerySelectorAll("table.provincetable tr.provincetr td a"); + // if (itemList.Length == 0) throw Oops.Oh(ErrorCodeEnum.R2005); + // + // await _sysRegionRep.DeleteAsync(u => u.Id > 0); + // + // foreach (var element in itemList) + // { + // var item = (IHtmlAnchorElement)element; + // var list = new List(); + // + // var region = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = 0, + // Name = item.TextContent, + // Remark = item.Href, + // Level = 1, + // }; + // list.Add(region); + // + // // 市级 + // if (!string.IsNullOrEmpty(item.Href)) + // { + // var dom1 = await context.OpenAsync(item.Href); + // var itemList1 = dom1.QuerySelectorAll("table.citytable tr.citytr td a"); + // for (var i1 = 0; i1 < itemList1.Length; i1 += 2) + // { + // var item1 = (IHtmlAnchorElement)itemList1[i1 + 1]; + // var region1 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region.Id, + // Name = item1.TextContent, + // Code = itemList1[i1].TextContent, + // Remark = item1.Href, + // Level = 2, + // }; + // + // // 若URL中查询的一级行政区域缺少Code则通过二级区域填充 + // if (list.Count == 1 && !string.IsNullOrEmpty(region1.Code)) + // region.Code = region1.Code.Substring(0, 2).PadRight(region1.Code.Length, '0'); + // + // // 同步层级为“1-省级”退出 + // if (syncLevel < 2) break; + // + // list.Add(region1); + // + // // 区县级 + // if (string.IsNullOrEmpty(item1.Href) || syncLevel <= 2) continue; + // + // var dom2 = await context.OpenAsync(item1.Href); + // var itemList2 = dom2.QuerySelectorAll("table.countytable tr.countytr td a"); + // for (var i2 = 0; i2 < itemList2.Length; i2 += 2) + // { + // var item2 = (IHtmlAnchorElement)itemList2[i2 + 1]; + // var region2 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region1.Id, + // Name = item2.TextContent, + // Code = itemList2[i2].TextContent, + // Remark = item2.Href, + // Level = 3, + // }; + // list.Add(region2); + // + // // 街道级 + // if (string.IsNullOrEmpty(item2.Href) || syncLevel <= 3) continue; + // + // var dom3 = await context.OpenAsync(item2.Href); + // var itemList3 = dom3.QuerySelectorAll("table.towntable tr.towntr td a"); + // for (var i3 = 0; i3 < itemList3.Length; i3 += 2) + // { + // var item3 = (IHtmlAnchorElement)itemList3[i3 + 1]; + // var region3 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region2.Id, + // Name = item3.TextContent, + // Code = itemList3[i3].TextContent, + // Remark = item3.Href, + // Level = 4, + // }; + // list.Add(region3); + // + // // 村级 + // if (string.IsNullOrEmpty(item3.Href) || syncLevel <= 4) continue; + // + // var dom4 = await context.OpenAsync(item3.Href); + // var itemList4 = dom4.QuerySelectorAll("table.villagetable tr.villagetr td"); + // for (var i4 = 0; i4 < itemList4.Length; i4 += 3) + // { + // list.Add(new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region3.Id, + // Name = itemList4[i4 + 2].TextContent, + // Code = itemList4[i4].TextContent, + // CityCode = itemList4[i4 + 1].TextContent, + // Level = 5, + // }); + // } + // } + // } + // } + // } + // + // //按省份同步快速写入提升同步效率,全部一次性写入容易出现从统计局获取数据失败 + // await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); + // } + } + + /// + /// 从统计局地图页面同步 + /// + /// + private async Task SyncByMap(int syncLevel) + { + var client = new HttpClient(); + client.DefaultRequestHeaders.Add("Referer", "http://xzqh.mca.gov.cn/map"); + var html = await client.GetStringAsync("http://xzqh.mca.gov.cn/map"); + + var municipalityList = new List { "北京", "天津", "上海", "重庆" }; + var provList = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value.ToJsonEntity>>(); + foreach (var dict1 in provList) { - var item = (IHtmlAnchorElement)element; var list = new List(); - - var region = new SysRegion + var provName = dict1.GetValueOrDefault("shengji"); + var province = new SysRegion { Id = YitIdHelper.NextId(), - Pid = 0, - Name = item.TextContent, - Remark = item.Href, + Name = Regex.Replace(provName, "[((].*?[))]", ""), + Code = dict1.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict1.GetValueOrDefault("quhao"), Level = 1, + Pid = 0, }; - list.Add(region); + if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name += "(省)"; + list.Add(province); + + if (syncLevel <= 1) continue; - // 市级 - if (!string.IsNullOrEmpty(item.Href)) + var prefList = await GetSelectList(provName); + foreach (var dict2 in prefList) { - var dom1 = await context.OpenAsync(item.Href); - var itemList1 = dom1.QuerySelectorAll("table.citytable tr.citytr td a"); - for (var i1 = 0; i1 < itemList1.Length; i1 += 2) + var prefName = dict2.GetValueOrDefault("diji"); + var city = new SysRegion + { + Id = YitIdHelper.NextId(), + Code = dict2.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict2.GetValueOrDefault("quhao"), + Pid = province.Id, + Name = prefName, + Level = 2 + }; + if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)"; + list.Add(city); + + if (syncLevel <= 2) continue; + + var countyList = await GetSelectList(provName, prefName); + foreach (var dict3 in countyList) { - var item1 = (IHtmlAnchorElement)itemList1[i1 + 1]; - var region1 = new SysRegion + var countyName = dict3.GetValueOrDefault("xianji"); + var county = new SysRegion { Id = YitIdHelper.NextId(), - Pid = region.Id, - Name = item1.TextContent, - Code = itemList1[i1].TextContent, - Remark = item1.Href, - Level = 2, + Code = dict3.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict3.GetValueOrDefault("quhao"), + Name = countyName, + Pid = city.Id, + Level = 3 }; - - // 若URL中查询的一级行政区域缺少Code则通过二级区域填充 - if (list.Count == 1 && !string.IsNullOrEmpty(region1.Code)) - region.Code = region1.Code.Substring(0, 2).PadRight(region1.Code.Length, '0'); - - // 同步层级为“1-省级”退出 - if (syncLevel < 2) break; - - list.Add(region1); - - // 区县级 - if (string.IsNullOrEmpty(item1.Href) || syncLevel <= 2) continue; - - var dom2 = await context.OpenAsync(item1.Href); - var itemList2 = dom2.QuerySelectorAll("table.countytable tr.countytr td a"); - for (var i2 = 0; i2 < itemList2.Length; i2 += 2) - { - var item2 = (IHtmlAnchorElement)itemList2[i2 + 1]; - var region2 = new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region1.Id, - Name = item2.TextContent, - Code = itemList2[i2].TextContent, - Remark = item2.Href, - Level = 3, - }; - list.Add(region2); - - // 街道级 - if (string.IsNullOrEmpty(item2.Href) || syncLevel <= 3) continue; - - var dom3 = await context.OpenAsync(item2.Href); - var itemList3 = dom3.QuerySelectorAll("table.towntable tr.towntr td a"); - for (var i3 = 0; i3 < itemList3.Length; i3 += 2) - { - var item3 = (IHtmlAnchorElement)itemList3[i3 + 1]; - var region3 = new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region2.Id, - Name = item3.TextContent, - Code = itemList3[i3].TextContent, - Remark = item3.Href, - Level = 4, - }; - list.Add(region3); - - // 村级 - if (string.IsNullOrEmpty(item3.Href) || syncLevel <= 4) continue; - - var dom4 = await context.OpenAsync(item3.Href); - var itemList4 = dom4.QuerySelectorAll("table.villagetable tr.villagetr td"); - for (var i4 = 0; i4 < itemList4.Length; i4 += 3) - { - list.Add(new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region3.Id, - Name = itemList4[i4 + 2].TextContent, - Code = itemList4[i4].TextContent, - CityCode = itemList4[i4 + 1].TextContent, - Level = 5, - }); - } - } - } + list.Add(county); } } - //按省份同步快速写入提升同步效率,全部一次性写入容易出现从统计局获取数据失败 await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); } + + // 获取选择数据 + async Task>> GetSelectList(string prov, string prefecture = null) + { + var data = ""; + if (!string.IsNullOrWhiteSpace(prov)) data += $"shengji={prov}"; + if (!string.IsNullOrWhiteSpace(prefecture)) data += $"&diji={prefecture}"; + var json = await client.PostFormAsync("http://xzqh.mca.gov.cn/selectJson", data); + return json.ToJsonEntity>>(); + } } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs index 393f229f7e7b586918a06b6f2ce3f2e87123eb22..e5d8e3d18095e39689340a4ca1e07be679e264a7 100644 --- a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs @@ -192,19 +192,19 @@ public class SysRoleService : IDynamicApiController, ITransient case (int)DataScopeEnum.All: throw Oops.Oh(ErrorCodeEnum.D1016); // 若数据范围自定义,则判断授权数据范围是否有权限 case (int)DataScopeEnum.Define: - { - var grantOrgIdList = input.OrgIdList; - if (grantOrgIdList.Count > 0) { - var orgIdList = await _sysOrgService.GetUserOrgIdList(); - if (orgIdList.Count < 1) - throw Oops.Oh(ErrorCodeEnum.D1016); - if (!grantOrgIdList.All(u => orgIdList.Any(c => c == u))) - throw Oops.Oh(ErrorCodeEnum.D1016); + var grantOrgIdList = input.OrgIdList; + if (grantOrgIdList.Count > 0) + { + var orgIdList = await _sysOrgService.GetUserOrgIdList(); + if (orgIdList.Count < 1) + throw Oops.Oh(ErrorCodeEnum.D1016); + if (!grantOrgIdList.All(u => orgIdList.Any(c => c == u))) + throw Oops.Oh(ErrorCodeEnum.D1016); + } + + break; } - - break; - } } } role.DataScope = (DataScopeEnum)dataScope; diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs index c89735feb8a2892b9279936e6b3af1b473734332..baccd1667b53077aad1ccd3b779462571ed01d5d 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs @@ -34,7 +34,7 @@ public class AddTenantInput : TenantOutput /// [Required(ErrorMessage = "应用不能为空")] public new long? AppId { get; set; } - + /// /// 租户名称 /// @@ -46,7 +46,7 @@ public class AddTenantInput : TenantOutput /// [Required(ErrorMessage = "租管账号不能为空"), MinLength(3, ErrorMessage = "租管账号不能少于3个字符")] public override string AdminAccount { get; set; } - + /// /// 租户域名 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantOutput.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantOutput.cs index 1b2626af8b6c823777edbd1fa89f0e2c3a88ad4a..aa532837545582303777b8aca2970362466d5d25 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantOutput.cs @@ -12,7 +12,7 @@ public class TenantOutput : SysTenant /// 租户名称 /// public virtual string Name { get; set; } - + /// /// 关联应用名称 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs index 3745628d90aee80aae6428ceaebf9685208e9ced..fc7cb4e976a39561b4bce047db7140fdf48a087a 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs @@ -117,7 +117,7 @@ public class SysTenantService : IDynamicApiController, ITransient { var isExist = await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name); if (isExist) throw Oops.Oh(ErrorCodeEnum.D1300); - + input.Host = input.Host.ToLower(); isExist = await _sysTenantRep.IsAnyAsync(u => u.Host == input.Host); if (isExist) throw Oops.Oh(ErrorCodeEnum.D1303); @@ -180,20 +180,21 @@ public class SysTenantService : IDynamicApiController, ITransient var tenantName = tenant.Name; // 初始化机构 - var newOrg = new SysOrg { TenantId=tenantId, Pid=0, Name=tenantName, Code=tenantName, Remark=tenantName, }; + var newOrg = new SysOrg { TenantId = tenantId, Pid = 0, Name = tenantName, Code = tenantName, Remark = tenantName, }; await _sysOrgRep.InsertAsync(newOrg); // 初始化角色 - var newRole = new SysRole { TenantId=tenantId, Name="租管-" + tenantName, Code=CommonConst.SysAdminRole, DataScope=DataScopeEnum.All, Remark=tenantName }; + var newRole = new SysRole { TenantId = tenantId, Name = "租管-" + tenantName, Code = CommonConst.SysAdminRole, DataScope = DataScopeEnum.All, Remark = tenantName }; await _sysRoleRep.InsertAsync(newRole); // 初始化职位 - var newPos = new SysPos { TenantId=tenantId, Name="租管-" + tenantName, Code=tenantName, Remark=tenantName }; + var newPos = new SysPos { TenantId = tenantId, Name = "租管-" + tenantName, Code = tenantName, Remark = tenantName }; await _sysPosRep.InsertAsync(newPos); // 初始化系统账号 var password = await _sysConfigService.GetConfigValue(ConfigConst.SysPassword); - var newUser = new SysUser { + var newUser = new SysUser + { TenantId = tenantId, Account = tenant.AdminAccount, Password = CryptogramUtil.Encrypt(password), @@ -219,7 +220,7 @@ public class SysTenantService : IDynamicApiController, ITransient // 默认租户管理员角色菜单集合 var menuIdList = new List { 1300000000111,1300000000121, // 工作台 1310000000111,1310000000112,1310000000113,1310000000114,1310000000115,1310000000116,1310000000117,1310000000118,1310000000119,1310000000120,1310000000121, // 账号 - 1310000000131,1310000000132,1310000000133,1310000000134,1310000000135,1310000000136,1310000000137,1310000000138, // 角色 + 1310000000131,1310000000132,1310000000133,1310000000134,1310000000135,1310000000136,1310000000137,1310000000138, 1310000000322, // 角色 1310000000141,1310000000142,1310000000143,1310000000144,1310000000145, // 机构 1310000000151,1310000000152,1310000000153,1310000000154,1310000000155,1310000000156, // 职位 1310000000161,1310000000162,1310000000163,1310000000164,1310000000165, // 个人中心 @@ -284,7 +285,7 @@ public class SysTenantService : IDynamicApiController, ITransient input.Host = input.Host.ToLower(); isExist = await _sysTenantRep.IsAnyAsync(u => u.Host == input.Host && u.Id != input.Id); if (isExist) throw Oops.Oh(ErrorCodeEnum.D1303); - + isExist = await _sysUserRep.AsQueryable().ClearFilter().AnyAsync(u => u.AccountType == AccountTypeEnum.SuperAdmin && u.Account == input.AdminAccount && u.Id != input.UserId); if (isExist) throw Oops.Oh(ErrorCodeEnum.D1301); @@ -378,11 +379,11 @@ public class SysTenantService : IDynamicApiController, ITransient _sysTenantRep.AsTenant().RemoveConnection(tenantId); var tenantList = await _sysTenantRep.GetListAsync(); - + // 对租户库连接进行SM2加密 foreach (var tenant in tenantList.Where(tenant => !string.IsNullOrWhiteSpace(tenant.Connection))) tenant.Connection = CryptogramUtil.SM2Encrypt(tenant.Connection); - + _sysCacheService.Set(CacheConst.KeyTenant, tenantList); } diff --git a/Admin.NET/Admin.NET.Core/Service/User/SysUserMenuService.cs b/Admin.NET/Admin.NET.Core/Service/User/SysUserMenuService.cs index 30b0b93549b2bab1a113aed027a5114db1320ed3..b09b912cf77fc43a85ca3250ba3bf0dab292e18e 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/SysUserMenuService.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/SysUserMenuService.cs @@ -77,7 +77,7 @@ public class SysUserMenuService : IDynamicApiController, ITransient return await _sysUserMenuRep.AsQueryable() .Where(u => u.UserId == _userManager.UserId).Select(u => u.MenuId).ToListAsync(); } - + /// /// 删除指定用户的收藏菜单 /// diff --git a/Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs b/Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs index 9330b2bb24aca8c36e1c76d56cdc82bfbd2adfa8..c2ae4ac596c13f264b67f8dec36db4cabe6bbb0d 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs @@ -103,7 +103,7 @@ public class SysUserService : IDynamicApiController, ITransient // 是否租户隔离登录验证 var isTenantHostLogin = await _sysConfigService.GetConfigValue(ConfigConst.SysTenantHostLogin); var query = _sysUserRep.AsQueryable().ClearFilter().WhereIF(isTenantHostLogin, u => u.TenantId == _userManager.TenantId || u.AccountType == AccountTypeEnum.SuperAdmin); - + if (await query.AnyAsync(u => u.Account == input.Account)) throw Oops.Oh(ErrorCodeEnum.D1003); if (!string.IsNullOrWhiteSpace(input.Phone) && await query.AnyAsync(u => u.Phone == input.Phone)) throw Oops.Oh(ErrorCodeEnum.D1032); @@ -140,7 +140,7 @@ public class SysUserService : IDynamicApiController, ITransient var isTenantHostLogin = await _sysConfigService.GetConfigValue(ConfigConst.SysTenantHostLogin); var query = _sysUserRep.AsQueryable().ClearFilter().Where(u => u.Id != input.Id) .WhereIF(isTenantHostLogin, u => u.TenantId == _userManager.TenantId || u.AccountType == AccountTypeEnum.SuperAdmin); - + if (await query.AnyAsync(u => u.Account == input.Account)) throw Oops.Oh(ErrorCodeEnum.D1003); if (!string.IsNullOrWhiteSpace(input.Phone) && await query.AnyAsync(u => u.Phone == input.Phone)) throw Oops.Oh(ErrorCodeEnum.D1032); @@ -211,7 +211,7 @@ public class SysUserService : IDynamicApiController, ITransient // 删除域账号 await _sysUserLdapService.DeleteUserLdapByUserId(input.Id); - + // 删除用户收藏菜单 await _sysUserMenuService.DeleteUserMenuList(input.Id); diff --git a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs index 01dad59b506d68ae0eebc07a9fe7120b45c50c3b..b282f5d0fa1ac02e000a5631ef32c8ef78d2948f 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs @@ -12,7 +12,7 @@ namespace Admin.NET.Core; public class UserManager : IScoped { private readonly IHttpContextAccessor _httpContextAccessor; - + /// /// 应用ID /// diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs index 502c52f152fbc8eff8a29fc95dda9317143c3e5f..ffe5d4bef5b848a0f8d953b7a06357b4c49242ef 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs @@ -149,34 +149,35 @@ public static class SqlSugarSetup Console.ForegroundColor = originColor; App.PrintToMiniProfiler("SqlSugar", "Info", log); }; - db.Aop.OnError = ex => - { - if (ex.Parametres == null) return; - var log = $"【{DateTime.Now}——错误SQL】\r\n{UtilMethods.GetNativeSql(ex.Sql, (SugarParameter[])ex.Parametres)}\r\n"; - Log.Error(log, ex); - App.PrintToMiniProfiler("SqlSugar", "Error", log); - }; - db.Aop.OnLogExecuted = (sql, pars) => - { - //// 若参数值超过100个字符则进行截取 - //foreach (var par in pars) - //{ - // if (par.DbType != System.Data.DbType.String || par.Value == null) continue; - // if (par.Value.ToString().Length > 100) - // par.Value = string.Concat(par.Value.ToString()[..100], "......"); - //} - - // 执行时间超过5秒时 - if (!(db.Ado.SqlExecutionTime.TotalSeconds > 5)) return; - - var fileName = db.Ado.SqlStackTrace.FirstFileName; // 文件名 - var fileLine = db.Ado.SqlStackTrace.FirstLine; // 行号 - var firstMethodName = db.Ado.SqlStackTrace.FirstMethodName; // 方法名 - var log = $"【{DateTime.Now}——超时SQL】\r\n【所在文件名】:{fileName}\r\n【代码行数】:{fileLine}\r\n【方法名】:{firstMethodName}\r\n" + $"【SQL语句】:{UtilMethods.GetNativeSql(sql, pars)}"; - Log.Warning(log); - App.PrintToMiniProfiler("SqlSugar", "Slow", log); - }; } + db.Aop.OnError = ex => + { + if (ex.Parametres == null) return; + var log = $"【{DateTime.Now}——错误SQL】\r\n{UtilMethods.GetNativeSql(ex.Sql, (SugarParameter[])ex.Parametres)}\r\n"; + Log.Error(log, ex); + App.PrintToMiniProfiler("SqlSugar", "Error", log); + }; + db.Aop.OnLogExecuted = (sql, pars) => + { + //// 若参数值超过100个字符则进行截取 + //foreach (var par in pars) + //{ + // if (par.DbType != System.Data.DbType.String || par.Value == null) continue; + // if (par.Value.ToString().Length > 100) + // par.Value = string.Concat(par.Value.ToString()[..100], "......"); + //} + + // 执行时间超过5秒时 + if (!(db.Ado.SqlExecutionTime.TotalSeconds > 5)) return; + + var fileName = db.Ado.SqlStackTrace.FirstFileName; // 文件名 + var fileLine = db.Ado.SqlStackTrace.FirstLine; // 行号 + var firstMethodName = db.Ado.SqlStackTrace.FirstMethodName; // 方法名 + var log = $"【{DateTime.Now}——超时SQL】\r\n【所在文件名】:{fileName}\r\n【代码行数】:{fileLine}\r\n【方法名】:{firstMethodName}\r\n" + $"【SQL语句】:{UtilMethods.GetNativeSql(sql, pars)}"; + Log.Warning(log); + App.PrintToMiniProfiler("SqlSugar", "Slow", log); + }; + // 数据审计 db.Aop.DataExecuting = (_, entityInfo) => { @@ -376,18 +377,18 @@ public static class SqlSugarSetup /// private static void InitSeedData(SqlSugarScope db, DbConnectionConfig config) { - SqlSugarScopeProvider dbProvider = db.GetConnectionScope(config.ConfigId); + SqlSugarScopeProvider dbProvider = db.GetConnectionScope(config.ConfigId); _isHandlingSeedData = true; - + Log.Information($"初始化种子数据 {config.DbType} - {config.ConfigId}"); var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.GetInterfaces().Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>)))) .WhereIF(config.SeedSettings.EnableIncreSeed, u => u.IsDefined(typeof(IncreSeedAttribute), false)) .OrderBy(u => u.GetCustomAttributes(typeof(SeedDataAttribute), false).Length > 0 ? ((SeedDataAttribute)u.GetCustomAttributes(typeof(SeedDataAttribute), false)[0]).Order : 0).ToList(); - - int count = 0, sum = seedDataTypes.Count; - foreach (var seedType in seedDataTypes) - { - var entityType = seedType.GetInterfaces().First().GetGenericArguments().First(); + + int count = 0, sum = seedDataTypes.Count; + foreach (var seedType in seedDataTypes) + { + var entityType = seedType.GetInterfaces().First().GetGenericArguments().First(); if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId) // 默认库(有系统表特性、没有日志表和租户表特性) { if (entityType.GetCustomAttribute() == null && (entityType.GetCustomAttribute() != null || entityType.GetCustomAttribute() != null)) continue; @@ -401,17 +402,17 @@ public static class SqlSugarSetup var att = entityType.GetCustomAttribute(); // 自定义的库 if (att == null || att.configId.ToString() != config.ConfigId.ToString()) continue; } - - var instance = Activator.CreateInstance(seedType); - var hasDataMethod = seedType.GetMethod("HasData"); - var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast(); + + var instance = Activator.CreateInstance(seedType); + var hasDataMethod = seedType.GetMethod("HasData"); + var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast(); if (seedData == null) continue; - - var entityInfo = dbProvider.EntityMaintenance.GetEntityInfo(entityType); - Console.WriteLine($"添加数据 {entityInfo.DbTableName} ({config.ConfigId} - {++count}/{sum},数据量:{seedData.Count()})"); - + + var entityInfo = dbProvider.EntityMaintenance.GetEntityInfo(entityType); + Console.WriteLine($"添加数据 {entityInfo.DbTableName} ({config.ConfigId} - {++count}/{sum},数据量:{seedData.Count()})"); + // 若实体包含Id字段,则设置为当前租户Id递增1 - if (entityInfo.Columns.Any(u => u.PropertyName == nameof(EntityBaseId.Id))) + if (entityInfo.Columns.Any(u => u.PropertyName == nameof(EntityBaseId.Id))) { var seedId = config.ConfigId.ToLong(); foreach (var sd in seedData) @@ -420,8 +421,8 @@ public static class SqlSugarSetup if (id != null && (id.ToString() == "0" || string.IsNullOrWhiteSpace(id.ToString()))) sd.GetType().GetProperty(nameof(EntityBaseId.Id))!.SetValue(sd, ++seedId); } - } - + } + if (entityType.GetCustomAttribute(true) != null) { //拆分表的操作需要实体类型,而通过反射很难实现 @@ -436,7 +437,7 @@ public static class SqlSugarSetup { // 按主键进行批量增加和更新 var storage = dbProvider.StorageableByObject(seedData.ToList()).ToStorage(); - + // 先修改再插入,否则会更新修改时间字段 if (seedType.GetCustomAttribute() == null) // 有忽略更新种子特性时则不更新 { diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarTypeProvider.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarTypeProvider.cs index 3c1b0f96d8090ec31b7eff237178e868f66fe272..21654263fb114a782f3f6d0ca3152228f2e1620f 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarTypeProvider.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarTypeProvider.cs @@ -1,4 +1,10 @@ -using System.Linq.Dynamic.Core.CustomTypeProviders; +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using System.Linq.Dynamic.Core.CustomTypeProviders; namespace Admin.NET.Core; @@ -7,7 +13,7 @@ namespace Admin.NET.Core; /// public class SqlSugarTypeProvider : DefaultDynamicLinqCustomTypeProvider { - public SqlSugarTypeProvider( bool cacheCustomTypes = true) : base(ParsingConfig.Default, cacheCustomTypes) + public SqlSugarTypeProvider(bool cacheCustomTypes = true) : base(ParsingConfig.Default, cacheCustomTypes) { } diff --git a/Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs b/Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs index d21880ef186b8ebb0b15fedfb2f6f95a363181de..2649972d96d76848e8e6b019d386d041ade81ba7 100644 --- a/Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs +++ b/Admin.NET/Admin.NET.Core/Utils/CodeGenUtil.cs @@ -67,20 +67,20 @@ public static class CodeGenUtil switch (dataType.ToLower()) { case "interval year to month": return "int"; - + case "interval day to second": return "TimeSpan"; - + case "smallint": return "Int16"; - + case "int": case "integer": return "int"; - + case "long": return "long"; - + case "float": return "float"; - + case "decimal": return "decimal"; - + case "number": if (length == null) return "decimal"; return scale switch diff --git a/Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs b/Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs index 1097186ecd815c611a1350303efa6cb86335f6b6..1bf8a45ee8b25ffb73d805840430e6759183d253 100644 --- a/Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs +++ b/Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs @@ -39,7 +39,7 @@ public static class CommonUtil return Math.Abs(hash1 + (hash2 * 1566083941)); } } - + /// /// 生成百分数 /// @@ -215,7 +215,7 @@ public static class CommonUtil IImporter importer = new ExcelImporter(); var res = await importer.Import(file.OpenReadStream()); var message = string.Empty; - + if (!res.HasError) return res.Data; if (res.Exception != null) diff --git a/Admin.NET/Admin.NET.Core/Utils/ComputerUtil.cs b/Admin.NET/Admin.NET.Core/Utils/ComputerUtil.cs index fa6d7078d1607f13ff1fca51eda2083dbd8c272f..6c74f2362970982690ba8c3298fc522005114a2a 100644 --- a/Admin.NET/Admin.NET.Core/Utils/ComputerUtil.cs +++ b/Admin.NET/Admin.NET.Core/Utils/ComputerUtil.cs @@ -348,7 +348,7 @@ public class MemoryMetricsClient var metrics = new MemoryMetrics(); var memory = output.Split(' ', (char)StringSplitOptions.RemoveEmptyEntries); if (memory.Length != 2) return metrics; - + metrics.Total = double.Parse(memory[0]) / 1024; metrics.Free = double.Parse(memory[1]) / 1024; metrics.Used = metrics.Total - metrics.Free; diff --git a/Admin.NET/Admin.NET.Core/Utils/ExcelHelper.cs b/Admin.NET/Admin.NET.Core/Utils/ExcelHelper.cs index cce9754a1f0572d87c46bef1e1549a14f0d4a94c..cc55aa1298dc2db4e6fb46bada38f3783a93fccd 100644 --- a/Admin.NET/Admin.NET.Core/Utils/ExcelHelper.cs +++ b/Admin.NET/Admin.NET.Core/Utils/ExcelHelper.cs @@ -112,7 +112,7 @@ public class ExcelHelper if (dict != null) {// 填充字典值value为下列列表 dataList = App.GetService().GetDataList(new GetDataDictTypeInput - { Code = dict.DictTypeCode }).Result?.Select(x => x.Label).ToList(); + { Code = dict.DictTypeCode }).Result?.Select(x => x.Label).ToList(); } } } diff --git a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj index c7b6eeb3e408b7e130bbf79a25b685b4283c9210..e8dc5093ed590f86eb5b16936de698a783e2c7c4 100644 --- a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj +++ b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj @@ -11,11 +11,11 @@ - + - + diff --git a/Admin.NET/Admin.NET.Web.Entry/Views/Home/Index.cshtml b/Admin.NET/Admin.NET.Web.Entry/Views/Home/Index.cshtml index 0d3e9ef23b9b1d6eac5b9c080ea6e2c7f4f8f8ce..bc502bc9f13f523602acf463a97ccee6e5515daf 100644 --- a/Admin.NET/Admin.NET.Web.Entry/Views/Home/Index.cshtml +++ b/Admin.NET/Admin.NET.Web.Entry/Views/Home/Index.cshtml @@ -4,9 +4,4 @@
-
-

star fork GitHub stars GitHub forks GitHub license nuget

-
-

@ViewBag.Description

-

API 接口      源码地址

\ No newline at end of file diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm index 9985c735f275f1cb0ba2df8a505cb6f80393f0da..953f583ae5f296a19352307a604b5021c45eb894 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm @@ -249,6 +249,17 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient @:{ @:var list = (await Page(input)).Items?.Adapt>() ?? new(); @:if (input.SelectKeyList?.Count > 0) list = list.Where(x => input.SelectKeyList.Contains(x.@(Model.PrimaryKeyFieldList.First().PropertyName))).ToList(); + var dictFields = Model.TableField.Where(x => x.WhetherImport == "Y" && x.EffectType == "DictSelector") ?? default; + foreach (var column in dictFields) { + @:var @(column.LowerPropertyName)DictMap = _sysDictTypeService.GetDataList(new GetDataDictTypeInput { Code = "@(column.DictTypeCode)" }).Result.ToDictionary(x => x.Value, x => x.Label); + } + if (dictFields.Count() > 0) { + @:list.ForEach(e => { + foreach (var column in dictFields) { + @:e.@(column.ExtendedPropertyName) = @(column.LowerPropertyName)DictMap.GetValueOrDefault(e.@(column.PropertyName) ?? "", e.@(column.PropertyName)); + } + @:}); + } @:return ExcelHelper.ExportTemplate(list, "@(Model.BusName)导出记录"); @:} @: @@ -287,7 +298,7 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient @:{ var dictTableField = Model.TableField.Where(x => x.WhetherImport == "Y" && x.EffectType == "DictSelector") ?? default; foreach (var column in dictTableField){ - @:var @(column.LowerPropertyName)DictMap = _sysDictTypeService.GetDataList(new GetDataDictTypeInput { Code = "@(column.DictTypeCode)" }).Result.ToDictionary(x => x.Label, x => x.Value); + @:var @(column.LowerPropertyName)DictMap = _sysDictTypeService.GetDataList(new GetDataDictTypeInput { Code = "@(column.DictTypeCode)" }).Result.ToDictionary(x => x.Label!, x => x.Value); } @:var stream = ExcelHelper.ImportData(file, (list, markerErrorAction) => @@ -312,7 +323,7 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient @:// 映射字典值 @:foreach(var item in pageItems) { foreach (var column in dictTableField) { - @:if (item.@(column.PropertyName) == null) continue; + @:if (string.IsNullOrWhiteSpace(item.@(column.ExtendedPropertyName))) continue; @:item.@(column.PropertyName) = @(column.LowerPropertyName)DictMap.GetValueOrDefault(item.@(column.ExtendedPropertyName)); @:if (item.@(column.PropertyName) == null) item.Error = "@(column.ColumnComment)字典映射失败"; } diff --git a/Admin.NET/Admin.NET.sln b/Admin.NET/Admin.NET.sln index 838d1032fcc828e2e58d6540da3368d7512454f1..7b4932812478ce54e1de2a84e5205a37196e9485 100644 --- a/Admin.NET/Admin.NET.sln +++ b/Admin.NET/Admin.NET.sln @@ -28,6 +28,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.ApprovalFl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.K3Cloud", "Plugins\Admin.NET.Plugin.K3Cloud\Admin.NET.Plugin.K3Cloud.csproj", "{72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MTNet.Application", "MTNet.Application\MTNet.Application.csproj", "{2210EC07-3D71-43C2-8777-BA29C6C03B42}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -70,6 +72,10 @@ Global {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Debug|Any CPU.Build.0 = Debug|Any CPU {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Release|Any CPU.ActiveCfg = Release|Any CPU {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Release|Any CPU.Build.0 = Release|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs b/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..1021b03ba88b2abc0f4a705a006cd1cb70b1aede --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性的分组索引 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)] +public class CategoryIndexAttribute : Attribute +{ + public int Index { get; set; } + + public CategoryIndexAttribute(int index) + { + this.Index = index; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs b/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..049daefa62f76fd07a4718089470fab2b66daa3e --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记对象的属性对应表格的哪一列 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class ColumnAttribute : Attribute +{ + public int Index { get; set; } + + public ColumnAttribute(int index) + { + Index = index; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs b/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..1802380e4cdf4c2d90ed7a01153fe63c0069c686 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 设备表特性 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] +public class DeviceTableAttribute : Attribute +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs b/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1bdeda5c98d20136b8ec79cced84eb397bd0c93 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性是否为集合 +/// 配合前端弹出Dialog时使用 +/// +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class IsListAttribute : Attribute +{ + public bool IsList { get; set; } + + public IsListAttribute(bool isList) + { + this.IsList = isList; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs b/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..15c8a4cc5974c26fd721bd10299b7b9d84e12698 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性是否为路径 +/// 配合前端弹出Dialog时使用 +/// +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class IsPathAttribute : Attribute +{ + public bool IsPath { get; set; } + + public IsPathAttribute(bool isPath) + { + this.IsPath = isPath; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs b/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..af5ad24f73ddf4e6df3997c54c3c3ed2e19c9169 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class PropertySorter : ExpandableObjectConverter +{ + #region Methods + public override bool GetPropertiesSupported(ITypeDescriptorContext context) + { + return true; + } + + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) + { + // + // This override returns a list of properties in order + // + PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(value, attributes); + ArrayList orderedProperties = new ArrayList(); + foreach (PropertyDescriptor pd in pdc) + { + Attribute attribute = pd.Attributes[typeof(PropertyOrderAttribute)]; + if (attribute != null) + { + // + // If the attribute is found, then create an pair object to hold it + // + PropertyOrderAttribute poa = (PropertyOrderAttribute)attribute; + orderedProperties.Add(new PropertyOrderPair(pd.Name, poa.Order)); + } + else + { + // + // If no order attribute is specifed then given it an order of 0 + // + orderedProperties.Add(new PropertyOrderPair(pd.Name, 0)); + } + } + // + // Perform the actual order using the value PropertyOrderPair classes + // implementation of IComparable to sort + // + orderedProperties.Sort(); + // + // Build a string list of the ordered names + // + ArrayList propertyNames = new ArrayList(); + foreach (PropertyOrderPair pop in orderedProperties) + { + propertyNames.Add(pop.Name.ToString()); + } + // + // Pass in the ordered list for the PropertyDescriptorCollection to sort by + // + return pdc.Sort((string[])propertyNames.ToArray(typeof(string))); + } + #endregion +} + +#region Helper Class - PropertyOrderAttribute +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Module)] +public class PropertyOrderAttribute : Attribute +{ + // + // Simple attribute to allow the order of a property to be specified + // + private int _order; + public PropertyOrderAttribute(int order) + { + _order = order; + } + + public int Order + { + get + { + return _order; + } + } +} +#endregion + +#region Helper Class - PropertyOrderPair +public class PropertyOrderPair : IComparable +{ + private int _order; + private string _name; + public string Name + { + get + { + return _name; + } + } + public int Order + { + get + { + return _order; + } + } + + public PropertyOrderPair(string name, int order) + { + _order = order; + _name = name; + } + + public int CompareTo(object obj) + { + // + // Sort the pair objects by ordering by order value + // Equal values get the same rank + // + int otherOrder = ((PropertyOrderPair)obj)._order; + if (otherOrder == _order) + { + // + // If order not specified, sort by name + // + string otherName = ((PropertyOrderPair)obj)._name; + return string.Compare(_name, otherName); + } + else if (otherOrder > _order) + { + return -1; + } + return 1; + } +} +#endregion diff --git a/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs b/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..726c226ad482adbe4f23f99c4a7ed1e2f435d66e --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 测试表特性 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] +public class TestTableAttribute : Attribute +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/BLL/UserDefineTestCase.cs b/Admin.NET/MTNet.Application/BLL/UserDefineTestCase.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c1bda7f9a662f3de9e21ab20aafbbab7c16c956 --- /dev/null +++ b/Admin.NET/MTNet.Application/BLL/UserDefineTestCase.cs @@ -0,0 +1,124 @@ +using Minio.DataModel; +using MTNet.Application.Entity; +using MTNet.Application.IBLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.BLL; + +public class UserDefineTestCase : ITestEngine +{ + public UserDefineTestCase() + { + + } + + public override async Task TestProcess() + { + try + { + startTime = DateTime.Now; + SendMessageToUI("Start Test···", TestMessageEnum.Progress); + SendMessageToUI("Check Parameters...", TestMessageEnum.Progress); + CheckTestParameters(); + + TestResult = new TestResult + { + TestConfig = new TestTemplate() + }; + FinalTestData.Result.Clear(); + + if (WaitHandle()) + { + return; + } + + WhatToDoBeforeTest(); + SendMessageToUI("Initial All Devices Finished···", TestMessageEnum.Progress); + + //2)检查此时的链接状态,等待终端建立链接。 + WhatToDoBerforBuildConnection(); + + await Task.CompletedTask; + + } + catch (TaskCanceledException) + { + } + catch (OperationCanceledException) + { + } + catch (Exception ex) + { + SendMessageToUI($"Test Abnormal,{ex.Message}···", TestMessageEnum.Error); + } + finally + { + Status = TestStatusEnum.Finished; + + //8)计算测试时间 + this.TestResult.TestStartTime = startTime.ToString("yyyy-MM-dd HH:mm:ss.fff"); + stopTime = DateTime.Now; + this.TestResult.TestEndTime = stopTime.ToString("yyyy-MM-dd HH:mm:ss.fff"); + TimeSpan costTime = stopTime - startTime; + this.TestResult.TestCostTime = costTime.ToString(); + SendMessageToUI("Measurement Completed! Device Start Reset···", TestMessageEnum.Progress); + DeviceInitAferTest(); + + //9)测试结束后方法,户要是生成测试结果等 + SendMessageToUI("Measurement Completed! Start Data Preprocessing···", TestMessageEnum.Progress); + WhatToDoAfterTest(); + if (string.IsNullOrEmpty(CurrentItem.Name)) + { + DateTime dt = DateTime.Now; + FileName = $"CQT_{dt.Year}{dt.Month}{dt.Day}_{dt.Hour}{dt.Minute}{dt.Second}_{Settings.TestType}"; + } + else + { + DateTime dt = DateTime.Now; + FileName = $"CQT_{dt.Year}{dt.Month}{dt.Day}_{dt.Hour}{dt.Minute}{dt.Second}_{CurrentItem.Name}"; + } + + // 测试结束后提示保存测试结果等 + SendMessageToUI("Device Reset Finished! Device Close Connection···", TestMessageEnum.Progress); + CloseAllTheDevice(); + SendMessageToUI($"Automatically Save The Result {FileName}···", TestMessageEnum.Progress); + } + } + + public override void CheckTestParameters() + { + } + + public override bool CheckConnection() + { + return true; + } + + public override void WhatToDoBeforeTest() + { + SendMessageToUI("Devices Connect···", TestMessageEnum.Progress); + base.ConnectAllTheDevice(); + SendMessageToUI("Devices Initial···", TestMessageEnum.Progress); + base.DeviceInitBeforTest(); + } + + public override void WhatToDoBerforBuildConnection() + { + } + + public override void WhatToDoInTheLoop() + { + } + + public override void WhatToDoAfterTest() + { + } + + public override void WhatTodoAfterDisconnect() + { + } +} diff --git a/Admin.NET/MTNet.Application/Configuration/APIJSON.json b/Admin.NET/MTNet.Application/Configuration/APIJSON.json new file mode 100644 index 0000000000000000000000000000000000000000..5baf2316526dd938fe68ca5fadcdf217999b521f --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/APIJSON.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "APIJSON": { + "Roles": [ + { + "RoleName": "Role1", // 权限名称 唯一 + "Select": { // 查询 + "Table": [ "*" ], // 可操作的表 + "Column": [ "*" ], // 可操作的字段 + "Filter": [] + }, + "Insert": { // 添加 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "*", "tb.*" ] + }, + "Update": { // 修改 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "tb.*", "tb.*" ] + }, + "Delete": { // 删除 + "Table": [ "table1", "table2", "table3" ] + } + }, + { + "RoleName": "Role2", + "Select": { + "Table": [ "table1" ], + "Column": [ "tb.*" ] + } + } + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/App.json b/Admin.NET/MTNet.Application/Configuration/App.json new file mode 100644 index 0000000000000000000000000000000000000000..93d5050de9039b259988340e418bf7a5cc6ed330 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/App.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Urls": "http://*:5005", // 配置默认端口 + // "https_port": 44325, + + "AllowedHosts": "*", + + "AppSettings": { + "InjectSpecificationDocument": true, // 生产环境是否开启Swagger + "ExternalAssemblies": [ "plugins" ] // 插件目录 + }, + "DynamicApiControllerSettings": { + //"DefaultRoutePrefix": "api", // 默认路由前缀 + "CamelCaseSeparator": "", // 驼峰命名分隔符 + "SplitCamelCase": false, // 切割骆驼(驼峰)/帕斯卡命名 + "LowercaseRoute": false, // 小写路由格式 + "AsLowerCamelCase": true, // 小驼峰命名(首字母小写) + "KeepVerb": false, // 保留动作方法请求谓词 + "KeepName": false // 保持原有名称不处理 + }, + "FriendlyExceptionSettings": { + "DefaultErrorMessage": "系统异常,请联系管理员", + "ThrowBah": true, // 是否将 Oops.Oh 默认抛出为业务异常 + "LogError": false // 是否输出异常日志 + }, + "LocalizationSettings": { + "SupportedCultures": [ "zh-CN", "en" ], // 语言列表 + "DefaultCulture": "zh-CN", // 默认语言 + "DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言) + }, + "CorsAccessorSettings": { + //"PolicyName": "App.Cors.Policy", + //"WithOrigins": [ "http://localhost:5005", "https://gitee.com" ], + "WithExposedHeaders": [ "Content-Disposition", "X-Pagination", "access-token", "x-access-token" ], // 如果前端不代理且是axios请求 + "SignalRSupport": true // 启用 SignalR 跨域支持 + }, + "SnowId": { + "WorkerId": 1, // 机器码 全局唯一 + "WorkerIdBitLength": 6, // 机器码位长 默认值6,取值范围 [1, 19] + "SeqBitLength": 6, // 序列数位长 默认值6,取值范围 [3, 21](建议不小于4,值越大性能越高、Id位数也更长) + "WorkerPrefix": "adminnet_" // 缓存前缀 + }, + "Cryptogram": { + "StrongPassword": false, // 是否开启密码强度验证 + "PasswordStrengthValidation": "(?=^.{6,16}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", // 密码强度验证正则表达式,必须须包含大小写字母、数字和特殊字符的组合,长度在6-16之间 + "PasswordStrengthValidationMsg": "密码必须包含大小写字母、数字和特殊字符的组合,长度在6-16之间", // 密码强度验证消息提示 + "CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4 + // 新业务系统记得改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取。记得同步修改前端公钥配置:VITE_SM_PUBLIC_KEY + "PublicKey": "0484C7466D950E120E5ECE5DD85D0C90EAA85081A3A2BD7C57AE6DC822EFCCBD66620C67B0103FC8DD280E36C3B282977B722AAEC3C56518EDCEBAFB72C5A05312", // 公钥 + "PrivateKey": "8EDB615B1D48B8BE188FC0F18EC08A41DF50EA731FA28BF409E6552809E3A111" // 私钥 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Cache.json b/Admin.NET/MTNet.Application/Configuration/Cache.json new file mode 100644 index 0000000000000000000000000000000000000000..47bf2a2b91393ab8adf2df7a7d53229a5524db1e --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Cache.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Cache": { + "Prefix": "adminnet_", // 全局缓存前缀 + "CacheType": "Memory", // Memory、Redis + "Redis": { + "Configuration": "server=127.0.0.1:6379;password=;db=5;", // Redis连接字符串 + "Prefix": "adminnet_", // Redis前缀(目前没用) + "MaxMessageSize": "1048576", // 最大消息大小 默认1024 * 1024 + "AutoDetect": false // 自动检测集群节点 阿里云的Redis分布式集群使用代理模式,需要设置为false关闭自动检测;如果不用代理地址,就配置多个节点地址并打开自动检测 + } + }, + "Cluster": { // 集群配置 + "Enabled": false, // 启用集群:前提开启Redis缓存模式 + "ServerId": "adminnet", // 服务器标识 + "ServerIp": "", // 服务器IP + "SignalR": { + "RedisConfiguration": "127.0.0.1:6379,ssl=false,password=,defaultDatabase=5", + "ChannelPrefix": "signalrPrefix_" + }, + "DataProtecteKey": "AdminNet:DataProtection-Keys", + "IsSentinel": false, // 是否哨兵模式 + "SentinelConfig": { + "DefaultDb": "4", + "EndPoints": [ // 哨兵端口 + // "10.10.0.124:26380" + ], + "MainPrefix": "adminNet:", + "Password": "123456", + "SentinelPassword": "adminNet", + "ServiceName": "adminNet", + "SignalRChannelPrefix": "signalR:" + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Captcha.json b/Admin.NET/MTNet.Application/Configuration/Captcha.json new file mode 100644 index 0000000000000000000000000000000000000000..69d3c68b943012139cd79c95ada5233b324f062a --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Captcha.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // Lazy.Captcha.Core 组件详细文档(https://api.gitee.com/pojianbing/lazy-captcha/) + "CaptchaOptions": { + "CaptchaType": 10, // 验证码类型0、1、2、3、4、5、6、7、8、9、10、11 + "CodeLength": 1, // 验证码长度, 要放在CaptchaType设置后 当类型为算术表达式时,长度代表操作的个数, 例如2 + "ExpirySeconds": 60, // 验证码过期秒数 + "IgnoreCase": true, // 比较时是否忽略大小写 + "StoreageKeyPrefix": "", // 存储键前缀 + "ImageOption": { + "Animation": true, // 是否启用动画 + "FontSize": 36, // 字体大小 + "Width": 150, // 验证码宽度 + "Height": 50, // 验证码高度 + "BubbleMinRadius": 5, // 气泡最小半径 + "BubbleMaxRadius": 10, // 气泡最大半径 + "BubbleCount": 3, // 气泡数量 + "BubbleThickness": 1.0, // 气泡边沿厚度 + "InterferenceLineCount": 3, // 干扰线数量 + "FontFamily": "kaiti", // 包含actionj,epilog,fresnel,headache,lexo,prefix,progbot,ransom,robot,scandal,kaiti + "FrameDelay": 300, // 每帧延迟,Animation=true时有效, 默认300 + "BackgroundColor": "#ffffff", // 格式: rgb, rgba, rrggbb, or rrggbbaa format to match web syntax, 默认#fff + "ForegroundColors": "", // 颜色格式同BackgroundColor,多个颜色逗号分割,随机选取。不填,空值,则使用默认颜色集 + "Quality": 100, // 图片质量(质量越高图片越大,gif调整无效可能会更大) + "TextBold": true // 粗体 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/CodeGen.json b/Admin.NET/MTNet.Application/Configuration/CodeGen.json new file mode 100644 index 0000000000000000000000000000000000000000..275087a8c72355a34b0596d7cae6001665333f84 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/CodeGen.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 代码生成配置项-程序集名称集合 + "CodeGen": { + "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ], + "BaseEntityNames": [ "EntityTenantId", "EntityTenant", "EntityTenantBaseData", "EntityBaseData", "EntityBase", "EntityBaseId" ], + "EntityBaseColumn": { + "EntityTenantId": [ "Id", "TenantId" ], + "EntityTenant": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "TenantId" ], + "EntityTenantBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName", "TenantId" ], + "EntityBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName" ], + "EntityBase": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete" ], + "EntityBaseId": [ "Id" ] + //"BaseId": [ "Id" ] + }, + "FrontRootPath": "Web", // 前端项目根目录 + "BackendApplicationNamespaces": [ "Admin.NET.Application", "Admin.NET.Application2" ] // 后端生成到的项目 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Database.json b/Admin.NET/MTNet.Application/Configuration/Database.json new file mode 100644 index 0000000000000000000000000000000000000000..2ab38755409c9efb98f2b87c2fdd3649446b737b --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Database.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 详细数据库配置见SqlSugar官网(第一个为默认库),极力推荐 PostgreSQL 数据库 + // 数据库连接字符串参考地址:https://www.connectionstrings.com/ + "DbConnection": { + "EnableConsoleSql": false, // 启用控制台打印SQL + "ConnectionConfigs": [ + { + //"ConfigId": "1300000000001", // 默认库标识-禁止修改 + "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom + "ConnectionString": "DataSource=./Admin.NET.db", // Sqlite 库连接字符串 + //"ConnectionString": "PORT=5432;DATABASE=xxx;HOST=localhost;PASSWORD=xxx;USER ID=xxx", // PostgreSQL 库连接字符串 + //"ConnectionString": "Server=localhost;Database=mtnet;Uid=root;Pwd=123456;SslMode=None;", // MySql 库连接字符串", + //"ConnectionString": "User Id=xxx; Password=xxx; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))", // Oracle 库连接字符串 + //"ConnectionString": "Server=localhost;Database=xxx;User Id=xxx;Password=xxx;Encrypt=True;TrustServerCertificate=True;", // SqlServer 库连接字符串 + + //"SlaveConnectionConfigs": [ // 读写分离/主从 + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET1.db" + // }, + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET2.db" + // } + //], + "DbSettings": { + "EnableInitDb": true, // 启用库初始化 + "EnableDiffLog": false, // 启用库表差异日志 + "EnableUnderLine": false, // 启用驼峰转下划线 + "EnableConnStringEncrypt": false // 启用数据库连接串加密 + }, + "TableSettings": { + "EnableInitTable": true, // 启用表初始化 + "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + }, + "SeedSettings": { + "EnableInitSeed": true, // 启用种子初始化 + "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + } + } + //// 日志独立数据库配置 + //{ + // "ConfigId": "1300000000002", // 日志库标识-禁止修改 + // "DbType": "Sqlite", + // "ConnectionString": "DataSource=./Admin.NET.Log.db", // 库连接字符串 + // "DbSettings": { + // "EnableInitDb": true, // 启用库初始化 + // "EnableDiffLog": false, // 启用库表差异日志 + // "EnableUnderLine": false // 启用驼峰转下划线 + // }, + // "TableSettings": { + // "EnableInitTable": true, // 启用表初始化 + // "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + // }, + // "SeedSettings": { + // "EnableInitSeed": false, // 启用种子初始化 + // "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + // } + //}, + //// 其他数据库配置(可以配置多个) + //{ + // "ConfigId": "test", // 库标识 + // "DbType": "Sqlite", // 库类型 + // "ConnectionString": "DataSource=./Admin.NET.Test.db", // 库连接字符串 + // "DbSettings": { + // "EnableInitDb": true, // 启用库初始化 + // "EnableDiffLog": false, // 启用库表差异日志 + // "EnableUnderLine": false // 启用驼峰转下划线 + // }, + // "TableSettings": { + // "EnableInitTable": true, // 启用表初始化 + // "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + // }, + // "SeedSettings": { + // "EnableInitSeed": true, // 启用种子初始化 + // "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + // } + //} + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Email.json b/Admin.NET/MTNet.Application/Configuration/Email.json new file mode 100644 index 0000000000000000000000000000000000000000..bc53ba9369896cd27a83c6b04e1269ca34caba39 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Email.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Email": { + "Host": "smtp.163.com", // 主机 + "Port": 465, // 端口 465、994、25 + "EnableSsl": true, // 启用SSL + "DefaultFromEmail": "xxx@163.com", // 默认发件者邮箱 + "DefaultToEmail": "xxx@qq.com", // 默认接收人邮箱 + "UserName": "xxx@163.com", // 邮箱账号 + "Password": "", // 邮箱授权码 + "DefaultFromName": "Admin.NET 通用权限开发平台" // 默认邮件标题 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Enum.json b/Admin.NET/MTNet.Application/Configuration/Enum.json new file mode 100644 index 0000000000000000000000000000000000000000..4e12d22cd6929cd75bd8d5cffff4074703d3b90f --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Enum.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 枚举实体所在程序集名称集合 + "Enum": { + "EntityAssemblyNames": [ "Admin.", "MTNet." ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/EventBus.json b/Admin.NET/MTNet.Application/Configuration/EventBus.json new file mode 100644 index 0000000000000000000000000000000000000000..520123e87f02cc259ad9f52e6a14de6053801ab3 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/EventBus.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "EventBus": { + "RabbitMQ": { + "UserName": "adminnet", + "Password": "adminnet++123456", + "HostName": "127.0.0.1", + "Port": 5672 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/JWT.json b/Admin.NET/MTNet.Application/Configuration/JWT.json new file mode 100644 index 0000000000000000000000000000000000000000..72c7dc59008687ed054605e43ce95485cd501d63 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/JWT.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "JWTSettings": { + "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true + "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16 + "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true + "ValidIssuer": "Admin.NET", // 签发方,string 类型 + "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true + "ValidAudience": "Admin.NET", // 签收方,string 类型 + "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true + //"ExpiredTime": 20, // 过期时间,long 类型,单位分钟,默认20分钟,最大支持 13 年 + "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认5秒 + "Algorithm": "HS256", // 加密算法,string 类型,默认 HS256 + "RequireExpirationTime": true // 验证过期时间,设置 false 将永不过期 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Limit.json b/Admin.NET/MTNet.Application/Configuration/Limit.json new file mode 100644 index 0000000000000000000000000000000000000000..d23bbca1fe9af3be2b6ada6742313ff6ae6d30ba --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Limit.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // IP限流配置 + "IpRateLimiting": { + // 例如:设置每分钟5次访问限流 + // 当False时:每个接口都加入计数,不管你访问哪个接口,只要在一分钟内累计够5次,将禁止访问。 + // 当True 时:当一分钟请求了5次GetData接口,则该接口将在时间段内禁止访问,但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟,互不干扰。 + "EnableEndpointRateLimiting": true, + // 如果StackBlockedRequests设置为false,拒绝的API调用不会添加到调用次数计数器上。比如:如果客户端每秒发出3个请求并且您设置了每秒一个调用的限制, + // 则每分钟或每天计数器等其他限制将仅记录第一个调用,即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示(分钟,小时等),则必须设置 + "StackBlockedRequests": false, + // 在RealIpHeader使用时,你的Kestrel服务器背后是一个反向代理,如果你的代理服务器使用不同的页眉然后提取客户端IP X-Real-IP使用此选项来设置它。 + "RealIpHeader": "X-Real-IP", + // 将ClientIdHeader被用于提取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配,则不应用速率限制。 + "ClientIdHeader": "X-ClientId", + // IP白名单:支持Ipv4和Ipv6 + "IpWhitelist": [], + // 端点白名单 + "EndpointWhitelist": [], + // 客户端白名单 + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问过于频繁,请稍后重试!禁止违法行为否则110 👮\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + // 返回状态码 + "HttpStatusCode": 429, + // API规则,结尾一定要带* + "GeneralRules": [ + // 1秒钟只能调用1000次 + { + "Endpoint": "*", + "Period": "1s", + "Limit": 1000 + }, + // 1分钟只能调用60000次 + { + "Endpoint": "*", + "Period": "1m", + "Limit": 60000 + } + //// 1小时只能调用3600000次 + //{ + // "Endpoint": "*", + // "Period": "1h", + // "Limit": 3600000 + //}, + //// 1天只能调用86400000次 + //{ + // "Endpoint": "*", + // "Period": "1d", + // "Limit": 86400000 + //} + ] + }, + // IP 黑名单 + "IpRateLimitPolicies": { + "IpRules": [ + { + "Ip": "0.0.0.0", // IP可用:"::1/10" + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 0 // 设置为0就是1次都不能请求,完全屏蔽 + } + ] + } + ] + }, + // 客户端限流配置 + "ClientRateLimiting": { + "EnableEndpointRateLimiting": true, + "ClientIdHeader": "X-ClientId", + "EndpointWhitelist": [], + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问人数过多,请稍后重试!\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + "HttpStatusCode": 429, + "GeneralRules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + }, + "ClientRateLimitPolicies": { + "ClientRules": [ + { + "ClientId": "", + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Logging.json b/Admin.NET/MTNet.Application/Configuration/Logging.json new file mode 100644 index 0000000000000000000000000000000000000000..f3a10bb997b3529c653a14d2c5c7056f3876c041 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Logging.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.EntityFrameworkCore": "Information", + "AspNetCoreRateLimit": "None" + }, + "File": { + "Enabled": false, // 启用文件日志 + "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件 + "Append": true, // 追加覆盖 + // "MinimumLevel": "Information", // 日志级别 + "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024 + "MaxRollingFiles": 30 // 只保留30个文件 + }, + "Database": { + "Enabled": true, // 启用数据库日志 + "MinimumLevel": "Information" + }, + "ElasticSearch": { + "Enabled": false, // 启用ES日志 + "AuthType": "Basic", // ES认证类型,可选 Basic、ApiKey、Base64ApiKey + "User": "admin", // Basic认证的用户名,使用Basic认证类型时必填 + "Password": "123456", // Basic认证的密码,使用Basic认证类型时必填 + "ApiId": "", // 使用ApiKey认证类型时必填 + "ApiKey": "", // 使用ApiKey认证类型时必填 + "Base64ApiKey": "TmtrOEszNEJuQ0NyaWlydGtROFk6SG1RZ0w3YzBTc2lCanJTYlV3aXNzZw==", // 使用Base64ApiKey认证类型时必填 + "Fingerprint": "37:08:6A:C6:06:CC:9A:43:CF:ED:25:A2:1C:A4:69:57:90:31:2C:06:CA:61:56:39:6A:9C:46:11:BD:22:51:DA", // ES使用Https时的证书指纹 + "ServerUris": [ "http://192.168.1.100:9200" ], // 地址 + "DefaultIndex": "adminnet" // 索引 + }, + "Monitor": { + "GlobalEnabled": true, // 启用全局拦截日志 + "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效 + "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效 + "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别 + "WithReturnValue": true, // 是否包含返回值,默认true + "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出 + "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All) + "JsonIndented": false, // 是否格式化Json + "UseUtcTimestamp": false, // 时间格式UTC、LOCAL + "ConsoleLog": true // 是否显示控制台日志 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/OAuth.json b/Admin.NET/MTNet.Application/Configuration/OAuth.json new file mode 100644 index 0000000000000000000000000000000000000000..f2f28aa19841d594cdf83b0ab1cc10973aefae67 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/OAuth.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "OAuth": { + "Weixin": { + "ClientId": "xxx", + "ClientSecret": "xxx" + }, + "Gitee": { + "ClientId": "xxx", + "ClientSecret": "xxx" + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/SMS.json b/Admin.NET/MTNet.Application/Configuration/SMS.json new file mode 100644 index 0000000000000000000000000000000000000000..58a697db16d089a7897a61399159bc8a1b8f716c --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/SMS.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SMS": { + "Aliyun": { + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_291005708", + "Content": "您的验证码为:${code},请勿泄露于他人!" + }, + { + "Id": "1", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_462801755", + "Content": "注册成功,感谢您的注册,请妥善保管您的账户信息" + } + ] + }, + "Tencentyun": { + "SdkAppId": "", + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "", + "Content": "" + } + ] + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Swagger.json b/Admin.NET/MTNet.Application/Configuration/Swagger.json new file mode 100644 index 0000000000000000000000000000000000000000..b8179caaac7af7e9414666c0c01fb62588fc306a --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Swagger.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SpecificationDocumentSettings": { + "DocumentTitle": "Admin.NET 通用权限开发平台", + "GroupOpenApiInfos": [ + { + "Group": "Default", + "Title": "Admin.NET 通用权限开发平台", + "Description": "让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。", + "Version": "1.0.0", + "Order": 1000 + }, + { + "Group": "All Groups", + "Title": "所有接口", + "Description": "让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。", + "Version": "1.0.0", + "Order": 0 + } + ], + "DefaultGroupName": "Default", // 默认分组名 + "DocExpansionState": "List", // List、Full、None + "EnableAllGroups": true, + "LoginInfo": { + "Enabled": true, // 是否开启Swagger登录 + "CheckUrl": "/api/swagger/checkUrl", + "SubmitUrl": "/api/swagger/submitUrl" + }, + "EnumToNumber": true // 枚举类型生成值类型 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Upload.json b/Admin.NET/MTNet.Application/Configuration/Upload.json new file mode 100644 index 0000000000000000000000000000000000000000..601f8f294ee76ab6d79a6847b687b00737d16cf9 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Upload.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Upload": { + "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录 + "MaxSize": 51200, // 文件最大限制KB:1024*50 + "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "video/mp4", "application/wps-office.docx", "application/wps-office.xlsx", "application/wps-office.pptx", "application/vnd.android.package-archive" ], + "EnableMd5": false // 启用文件MDF5验证-防止重复上传 + }, + "OSSProvider": { + "Enabled": false, + "Provider": "Minio", // OSS提供者 Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud + "Endpoint": "xxx.xxx.xxx.xxx:8090", // 节点/API地址(在腾讯云OSS中表示AppId) + "Region": "xxx.xxx.xxx.xxx", // 地域 + "AccessKey": "", + "SecretKey": "", + "IsEnableHttps": false, // 是否启用HTTPS + "IsEnableCache": true, // 是否启用缓存 + "Bucket": "admin.net", + "CustomHost": "" // 自定义Host:拼接外链的Host,若空则使用Endpoint拼接 + }, + "SSHProvider": { + "Enabled": false, + "Host": "127.0.0.1", + "Port": 8222, + "Username": "sshuser", + "Password": "Password.1" + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Wechat.json b/Admin.NET/MTNet.Application/Configuration/Wechat.json new file mode 100644 index 0000000000000000000000000000000000000000..f591e84dd8ac77a743b6f6f9af2466923b7f85f3 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Wechat.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Wechat": { + // 公众号 + "WechatAppId": "", + "WechatAppSecret": "", + "WechatToken": "", // 微信公众号服务器配置中的令牌(Token) + "WechatEncodingAESKey": "", // 微信公众号服务器配置中的消息加解密密钥(EncodingAESKey) + // 小程序 + "WxOpenAppId": "", + "WxOpenAppSecret": "", + "WxToken": "", // 小程序消息推送中的令牌(Token) + "WxEncodingAESKey": "", // 小程序消息推送中的消息加解密密钥(EncodingAESKey) + "QRImagePath": "" //小程序生成带参数二维码保存位置(绝对路径 eg: D:\\Web\\wwwroot\\upload\\QRImage) + }, + // 微信支付 + "WechatPay": { + "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId + "MerchantId": "", // 商户平台的商户号 + "MerchantV3Secret": "", // 商户平台的APIv3密钥 + "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号 + "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容) + }, + // 支付回调 + "PayCallBack": { + "WechatPayUrl": "https://xxx/api/sysWechatPay/payCallBack", // 微信支付回调 + "WechatRefundUrl": "", // 微信退款回调 + "AlipayUrl": "", // 支付宝支付回调 + "AlipayRefundUrl": "" // 支付宝退款回调 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs b/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1b49ec268b53ad50423239a26f4e1445fd67a06 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/ConnectInstBase.cs @@ -0,0 +1,543 @@ +using MTNet.Application.DAL; +using MTNet.Application.Entity; +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 0000000000000000000000000000000000000000..c757b26579201fb5624cc5f90581c5181c15ebb4 --- /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 0000000000000000000000000000000000000000..9cfb7807a366693c0c2ccd5bf3272cbb2d59c882 --- /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 0000000000000000000000000000000000000000..ad534d4073dd9b552e827cf632428b7a8215d2f3 --- /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 0000000000000000000000000000000000000000..d86970556e867ae119532a3a762c02e987cb7aa4 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketClientInstBase.cs @@ -0,0 +1,445 @@ +using MTNet.Application.DAL; +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 0000000000000000000000000000000000000000..a0a76898a0616531f9e0d33aeed985683ecd7070 --- /dev/null +++ b/Admin.NET/MTNet.Application/ConnectBase/Socket/SocketServerInstBase.cs @@ -0,0 +1,346 @@ +using MTNet.Application.DAL; +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 0000000000000000000000000000000000000000..525cd3807467d6da39d07e57f86ac4411d27e706 --- /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 0000000000000000000000000000000000000000..3a8fab7cc202b484cbd83719c93bd323650fd7be --- /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 0000000000000000000000000000000000000000..272a8fc839eb5584496830e1cfe0d877ab7c9583 --- /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/Const/ApplicationConst.cs b/Admin.NET/MTNet.Application/Const/ApplicationConst.cs new file mode 100644 index 0000000000000000000000000000000000000000..783f03915daed81e1baddebd0227730180c4f3a4 --- /dev/null +++ b/Admin.NET/MTNet.Application/Const/ApplicationConst.cs @@ -0,0 +1,18 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace MTNet.Application; + +/// +/// 业务应用相关常量 +/// +public class ApplicationConst +{ + /// + /// API分组名称 + /// + public const string GroupName = "MTNet业务应用"; +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DAL/Algorithms.cs b/Admin.NET/MTNet.Application/DAL/Algorithms.cs new file mode 100644 index 0000000000000000000000000000000000000000..894740d183045aa6fda0e490ac66940b44259140 --- /dev/null +++ b/Admin.NET/MTNet.Application/DAL/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.DAL +{ + 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/DAL/IEnumerableHelper.cs b/Admin.NET/MTNet.Application/DAL/IEnumerableHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..a49e48ac736ac862851af535564dfac3fb999f5d --- /dev/null +++ b/Admin.NET/MTNet.Application/DAL/IEnumerableHelper.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DAL; + +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; + } + } + + /// + /// 判断是否为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/DAL/PropertyDescriptorExtensions.cs b/Admin.NET/MTNet.Application/DAL/PropertyDescriptorExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc8f6c9b15cd4df306542d16262a829aa3d9f6bd --- /dev/null +++ b/Admin.NET/MTNet.Application/DAL/PropertyDescriptorExtensions.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DAL; + +public static class PropertyDescriptorExtensions +{ + /// + /// 判断属性是否为集合 + /// + /// + /// + public static bool IsCollectionOrEnumerable(this PropertyDescriptor property) + { + // 获取属性类型 + Type propertyType = property.PropertyType; + + // 检查是否为数组 + if (propertyType.IsArray) + return true; + + // 检查是否实现了 IEnumerable 接口 + return typeof(IEnumerable).IsAssignableFrom(propertyType) && + !typeof(string).IsAssignableFrom(propertyType); // 排除字符串,因为字符串也实现了 IEnumerable + } + + /// + /// 获取集合中对象的类型 + /// + /// + /// + public static Type GetCollectionItemType(this PropertyDescriptor property) + { + Type propertyType = property.PropertyType; + + // 如果是数组,直接返回元素类型 + if (propertyType.IsArray) + return propertyType.GetElementType(); + + // 检查是否是泛型集合 + if (propertyType.IsGenericType && typeof(IEnumerable).IsAssignableFrom(propertyType)) + { + Type[] genericArguments = propertyType.GetGenericArguments(); + if (genericArguments.Length > 0) + return genericArguments[0]; + } + + // 对于非泛型 IEnumerable,无法确定具体的元素类型 + return null; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DAL/StringExtensions.cs b/Admin.NET/MTNet.Application/DAL/StringExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..7eaf1b5c53bb47c82eeb4e4b7a1a46bdaf932000 --- /dev/null +++ b/Admin.NET/MTNet.Application/DAL/StringExtensions.cs @@ -0,0 +1,87 @@ +using Newtonsoft.Json.Serialization; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MTNet.Application.Entity; + +namespace MTNet.Application.DAL; + +public static class StringExtensions +{ + /// + /// 驼峰命名转换 + /// + /// + /// + public static string ToCustomCamelCase(this string input) + { + if (string.IsNullOrEmpty(input)) + return input; + + var result = new StringBuilder(); + int upperCount = 0; + + // 计算开头连续的大写字母数量 + for (int i = 0; i < input.Length; i++) + { + if (char.IsUpper(input[i])) + { + upperCount++; + } + else + { + break; + } + } + if (upperCount == input.Length)//全大写 + { + return input.ToLower(); + } + + // 如果有连续的大写字母,则将前 n-1 个转换为小写 + for (int i = 0; i < input.Length; i++) + { + if (i < upperCount - 1 && upperCount > 1) + { + result.Append(char.ToLower(input[i])); + } + else + { + if (i == 0)//首字母始终小写 + result.Append(char.ToLower(input[i])); + else + result.Append(input[i]); + } + } + + return result.ToString(); + } + + /// + /// json转实体 + /// + /// + /// + /// 是否忽略大小写 + /// + public static T JsonToEntity(this string input, bool isIgnore = true) + { + if (isIgnore) + { + var settings = new JsonSerializerSettings + { + ContractResolver = new CamelCasePropertyNamesContractResolver(), // 处理驼峰命名 + ObjectCreationHandling = ObjectCreationHandling.Auto, + NullValueHandling = NullValueHandling.Ignore + }; + return JsonConvert.DeserializeObject(input, settings); + } + else + { + return JsonConvert.DeserializeObject(input); + } + } +} diff --git a/Admin.NET/MTNet.Application/DAL/TaskHelper.cs b/Admin.NET/MTNet.Application/DAL/TaskHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..97732d6688fbc53402d2e1b2d6f3834dbe74715d --- /dev/null +++ b/Admin.NET/MTNet.Application/DAL/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.DAL +{ + 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/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs new file mode 100644 index 0000000000000000000000000000000000000000..98ae910ce72b2e4425e1ed0327e974a930f7731c --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Ericsson/EricssonBaseStationTester.cs @@ -0,0 +1,5268 @@ +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.DAL; +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), + DeviceId = AddrConfig.Id + }; + 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), + DeviceId = AddrConfig.Id + }; + 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 + + + + #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 0000000000000000000000000000000000000000..d76a0082f15edc65c2e267d90d3d18dde2945e87 --- /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 0000000000000000000000000000000000000000..210b85f79118b508a9133ce2eca7dbbca6c3ca80 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Huawei/HuaweiBaseStationTester.cs @@ -0,0 +1,12781 @@ + +using MTNet.Application.ConnectBase; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +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; + cell.DeviceId = AddrConfig.Id; + 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.DeviceId = AddrConfig.Id; + //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.DeviceId = AddrConfig.Id; + //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.DeviceId = AddrConfig.Id; + //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 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 0000000000000000000000000000000000000000..abf70d9533098b92f7f67bab26c9a8dc080f962f --- /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 0000000000000000000000000000000000000000..f62ee07ecddc987fd2787ea3e4eae6ebbc8268fd --- /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 0000000000000000000000000000000000000000..f7194452629860e4a62ee54b88e68fc3f3c414ef --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/Nokia/NokiaBaseStationTester.cs @@ -0,0 +1,3049 @@ + +using MTNet.Application.ConnectBase; +using MTNet.Application.DAL; +using MTNet.Application.DriverLibrary.BaseStation.Nokia.Model; +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +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 = $"{Nokiaconfiguration2[1]}-{itemNr.globalCellId}", + 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, + DeviceId = AddrConfig.Id + }; + 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 = $"{Nokiaconfiguration2[1]}-{itemLte.globalCellId}", + 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, + DeviceId = AddrConfig.Id + }; + 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 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 0000000000000000000000000000000000000000..1a0a7f31de47bf3894282d64cd4e0ea4b3f726b4 --- /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 0000000000000000000000000000000000000000..227db3788de20c059c378f7efb0462438809ce8d --- /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 0000000000000000000000000000000000000000..d2392434bd35538f61a6c1935a08163df901702d --- /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 0000000000000000000000000000000000000000..2d3609f13891d7be529d131dcf74ae5a2eb27a95 --- /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 0000000000000000000000000000000000000000..5fc209c36ed9903e6d436f35d1ca2ad585c3875d --- /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 0000000000000000000000000000000000000000..f05ac77e2a0cf02bae7cada1f75d2590ce487bbe --- /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 0000000000000000000000000000000000000000..93cfb014f68eda9b6582bd5ad90af0cc39d41bf9 --- /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 0000000000000000000000000000000000000000..0ba40612e86758074735c2481b19175b8ed6b4a8 --- /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 0000000000000000000000000000000000000000..0b925426d483638d3d51ef66360bb4ed0b92ab1c --- /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 0000000000000000000000000000000000000000..7ea13ea038fca3d0c08a04d280bac241233b84f1 --- /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 0000000000000000000000000000000000000000..2645775061fd5c21fbf256366932a71614106e25 --- /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 0000000000000000000000000000000000000000..f2718dddb40ccb3f039eca8737c0e456a397ac04 --- /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 0000000000000000000000000000000000000000..8f54de53d519ae2cf7125ed523b43b581d5587ed --- /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 0000000000000000000000000000000000000000..3d82cf88dc4ec6e6c0d0e0864d051f3b2b1fbe94 --- /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 0000000000000000000000000000000000000000..cdda40e9b7c82bd95fdf60e962b75a471b8d0875 --- /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 0000000000000000000000000000000000000000..ca27e1383b2f0906064ec84ddb1b0e6ec5a005e0 --- /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 0000000000000000000000000000000000000000..a5d6cfd17cb0c100f3e2d0a1189b39b11b255a9f --- /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 0000000000000000000000000000000000000000..ccda2fd9938f174b11116331352f5dca49afeb81 --- /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 0000000000000000000000000000000000000000..003f3b04fbc617b48db448f85b60d996ca2c9aca --- /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 0000000000000000000000000000000000000000..9c2c455b69147a792e3035c8948ac02246ea6a30 --- /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 0000000000000000000000000000000000000000..f4182cadfa979a04e2e4986166aee8b20e1fc647 --- /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 0000000000000000000000000000000000000000..f8036e4eb280117e2cbdc73360ab6c10d5afc989 --- /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 0000000000000000000000000000000000000000..a88a01ad8f07de63723abdba3209c1560a26cbbf --- /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 0000000000000000000000000000000000000000..2ab6656e0e4c5eb6e40e4b0685de448b5fc60a65 --- /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 0000000000000000000000000000000000000000..aeed5f2a01e5059deda416d3d54789eaf98c604e --- /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 0000000000000000000000000000000000000000..14abc364844f2b862295a3f4eeaaeb79d8444cc5 --- /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 0000000000000000000000000000000000000000..3e9c3054be954dc5d1dcb72ef05bab2364325bb5 --- /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 0000000000000000000000000000000000000000..3a86a24edcf53cc49d8ddddde75d66417427e9b9 --- /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 0000000000000000000000000000000000000000..bded65c6256aaf87ffa61561b7108b69af16deef --- /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 0000000000000000000000000000000000000000..96ebcad5b39a41b64c6e21b69a48e7ef91fb4ef1 --- /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 0000000000000000000000000000000000000000..6a0c79859f72b28236325b9895e5062eaf0900d3 --- /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 0000000000000000000000000000000000000000..d0eefbb13b4e39a7301961075cb9f8477647fa05 --- /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 0000000000000000000000000000000000000000..cc3ab84bfb9edf42774822574a3ada2f77c0440b --- /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 0000000000000000000000000000000000000000..870fe743d613072eb03c64d9f6f5306f49fa71b1 --- /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 0000000000000000000000000000000000000000..d8355def8073d81dfa12a7905e36c832ef09608b --- /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 0000000000000000000000000000000000000000..9ee2919e621fb85779b9b87aabaddf494107acd6 --- /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 0000000000000000000000000000000000000000..0e3fc6c7c534514b0922e8159754339f32fd4772 --- /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 0000000000000000000000000000000000000000..e69342590af00c5a66f6925be348d1ddb2fc21f1 --- /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 0000000000000000000000000000000000000000..e3258371410125d0af436c02af5765ec068070e2 --- /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 0000000000000000000000000000000000000000..d61d8e1469acf4c964aabdb762069e05e49a2384 --- /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 0000000000000000000000000000000000000000..d9ca3c376c1ea3ee9de55faa2c371d2d8e69a11a --- /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 0000000000000000000000000000000000000000..28332fc659e4e4c234e33688eed80d7f66596339 --- /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 0000000000000000000000000000000000000000..3dc2e07d2fcc4d90d25d1c94d6b1401c20769de6 --- /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 0000000000000000000000000000000000000000..e1729f6edb32efc549adb1773ff381256fb9f052 --- /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 0000000000000000000000000000000000000000..12e64324c785d8bf09c25fcfd06b7d10155f740c --- /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 0000000000000000000000000000000000000000..bd3c278af4a53c1f86624b4a9ce012276ca920d9 --- /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 0000000000000000000000000000000000000000..8c6d1f2b739280f6c031b0f4588c83a90c241391 --- /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 0000000000000000000000000000000000000000..85a2574b23bcdd17547bd4834db195f183913168 --- /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 0000000000000000000000000000000000000000..672ffb85a276234f53b1dfbf38be8d6b8dee071a --- /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 0000000000000000000000000000000000000000..671c906511c02fd7ec7fbefc8634ea8b7f53aa02 --- /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 0000000000000000000000000000000000000000..cb1c2fc30d2e7bb2402f37d86aea8fbed3a34f22 --- /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 0000000000000000000000000000000000000000..d5b014d331cbcdebe014491d70c8ab0edb097901 --- /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 0000000000000000000000000000000000000000..c9f8dd083c5a4cee75ecea170ee5998c52b78e16 --- /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 0000000000000000000000000000000000000000..39794c361b4c8c9a3138e17cc03d6458d9587fcd --- /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 0000000000000000000000000000000000000000..2b556d211b23ff47229494cf6580f7e2018d2f4c --- /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 0000000000000000000000000000000000000000..77a30ca14ba6ab14f18909e50bbac8ed6169a9d3 --- /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 0000000000000000000000000000000000000000..0ba7047c5b823edd219dfc6611dce7da0891882f --- /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 0000000000000000000000000000000000000000..a6e92202a165d0a06458e60210df7415069321da --- /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 0000000000000000000000000000000000000000..1a8b593fb7ee6482ec5c654b593ff10512bce2f2 --- /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 0000000000000000000000000000000000000000..aa61763aeca8c9b9835d96cea0bd8d105497d0c0 --- /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 0000000000000000000000000000000000000000..291bb6e3287e44a54d113c18e487906d9582b7a4 --- /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 0000000000000000000000000000000000000000..96d4222af49caf6ee25f94b3eb1a86d55bbd13e4 --- /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 0000000000000000000000000000000000000000..6c0206b0af36c3831a226bd2709c56e020e635c3 --- /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 0000000000000000000000000000000000000000..95a2432fe4cb24425752ccadeab71294ce687fab --- /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 0000000000000000000000000000000000000000..d07e445d42620092a766bd556a41771b3f90cf10 --- /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 0000000000000000000000000000000000000000..1d8b1ec3d2a5c069d9623c917680730a8d2febe4 --- /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 0000000000000000000000000000000000000000..243658640f2bf76cb9009bacf20a6a6d3da4ea35 --- /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 0000000000000000000000000000000000000000..5a89413b013ad70ab9a7b9f36f5764e8d737ddfe --- /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 0000000000000000000000000000000000000000..2bb33ce11bac5bf29159bb7aa184226c072f5ee4 --- /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 0000000000000000000000000000000000000000..9439d50f2d6d20f059b4bdf397858a7df70aa3b8 --- /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 0000000000000000000000000000000000000000..71b47678f9ad827b16b6d825e388b5c35a7a7602 --- /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 0000000000000000000000000000000000000000..f3ff709c725e671e6b14f70f9204937ab0e4393d --- /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 0000000000000000000000000000000000000000..53c1fa8ccd894e22f8577b14bfab920f7392ac94 --- /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 0000000000000000000000000000000000000000..a146efca9d84b9b62f8633ec51529246311369db --- /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 0000000000000000000000000000000000000000..1846ac160393863c993b4bb7c87a62cbb3c42e81 --- /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 0000000000000000000000000000000000000000..9ae87e65de7e88d398300950a2a6fa624c73768c --- /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 0000000000000000000000000000000000000000..7b8e87f5b1ae0a48d366988c3478529ac5760c21 --- /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 0000000000000000000000000000000000000000..02adc654ea94fe2c8f1c67649da6e148d7f7ac4f --- /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 0000000000000000000000000000000000000000..2976b0b6a73e30373ef1010d9dd27b72aa6e2013 --- /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 0000000000000000000000000000000000000000..4fbddca6673ef39b05f729766c39576f939a4415 --- /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 0000000000000000000000000000000000000000..fd838fcde491da2a6a83065e2ab06c3c27d8cfce --- /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 0000000000000000000000000000000000000000..cd1c7220a3549332be9ddc87f551569afdb50427 --- /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 0000000000000000000000000000000000000000..f6b50969ac8799658d2751475baf70300731972d --- /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 0000000000000000000000000000000000000000..d40080cacdeb6783bec31a99d5ceaaf0cc00443b --- /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 0000000000000000000000000000000000000000..06b633dce1f2ade6558fd943e1294eda2546b5b2 --- /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 0000000000000000000000000000000000000000..0d395787d8076cda45521fb7b6a5b29e2226dc42 --- /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 0000000000000000000000000000000000000000..84d9a1efe62b66cd20c59e32dccd3826a5def806 --- /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 0000000000000000000000000000000000000000..58b20d1303ca1664721e50b1254610c32bf779a1 --- /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 0000000000000000000000000000000000000000..d6cc9c0ba2686030308dd01002c922d234aba5d0 --- /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 0000000000000000000000000000000000000000..20d91016104851552490b94ff0f7010ea527424d --- /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 0000000000000000000000000000000000000000..11afbc12e9276e4654f7c21d2e4b55bfbb02286b --- /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 0000000000000000000000000000000000000000..fe576ef4aa4283e880675b26ca09935f25243164 --- /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 0000000000000000000000000000000000000000..15c53dc1022895c219657ddb35049fc8e9315c24 --- /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 0000000000000000000000000000000000000000..d53e0e88a0dfccc8b8e50008bb4529560efe4053 --- /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 0000000000000000000000000000000000000000..f32f5ad9f7b1f203dd6b40ae6851a69d5eca3703 --- /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 0000000000000000000000000000000000000000..b7d516875a66f493326b56d4903071832b085077 --- /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 0000000000000000000000000000000000000000..b96395f2eda8e319bc0469680cd19e52200e198b --- /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 0000000000000000000000000000000000000000..1d9949d69ff4a62e963dec19984d8556ef90c920 --- /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 0000000000000000000000000000000000000000..812f3e0038faf37278fd8c8dde40c77b51d3e1ef --- /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 0000000000000000000000000000000000000000..5034034a42be28437cf7c6a409760afcc158c824 --- /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 0000000000000000000000000000000000000000..d288d21a0ceebe794fdfd9dd156adc98f89eed22 --- /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 0000000000000000000000000000000000000000..d492ac1c8b54c4b98ef39dd4f3732ad9ff7899b0 --- /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 0000000000000000000000000000000000000000..5a50f2fb525402081f8b1aeff904e729af820ace --- /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 0000000000000000000000000000000000000000..615b08a1935726723a5ec353db693ab1660b5820 --- /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 0000000000000000000000000000000000000000..b93dbd4e3f72a1901b4d87706e36c1a05853ed24 --- /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 0000000000000000000000000000000000000000..9cdf8200a3c67b0d954d64a7f68a165136b64ffd --- /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 0000000000000000000000000000000000000000..5d4a787c366acf23e6d4ba1e302d71a2c30c9885 --- /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 0000000000000000000000000000000000000000..d649216d70b123dc904ec2072dc926c15ca93962 --- /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 0000000000000000000000000000000000000000..a7ce97fba8e35e35b26e6cc1a7f7978a380b699e --- /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 0000000000000000000000000000000000000000..afcd429a8dfc8e457d4b6ceb3805add766531606 --- /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 0000000000000000000000000000000000000000..1bf22951fdef594f40935c16e49b3f61e55d0b42 --- /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 0000000000000000000000000000000000000000..aba3d4b895fcdbc630b270e70835b75788bb2901 --- /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 0000000000000000000000000000000000000000..3d6cd0059dc7507fa8e82bffacbed5120e8f78aa --- /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 0000000000000000000000000000000000000000..064fe4138b20b9678841e987c12a141555577ed0 --- /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 0000000000000000000000000000000000000000..ac4cf91ccd2d67180356880634046c48f77d431f --- /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 0000000000000000000000000000000000000000..e475597301577b41611e82b94080382bf7e35a0d --- /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 0000000000000000000000000000000000000000..7e41bfbcc9c89250792fc5e40b8fc50b1fb2d026 --- /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 0000000000000000000000000000000000000000..d7bab83d9fabd3917cb609085c824b6e643300a5 --- /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 0000000000000000000000000000000000000000..1b035bf5502ee54bbb90d93a4a20ef153a27c347 --- /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 0000000000000000000000000000000000000000..3c14c87578a41a44cc61625e2c1c66e548e1c731 --- /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 0000000000000000000000000000000000000000..df1569f5664ec7b596b081d343116c6c1d83c57d --- /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 0000000000000000000000000000000000000000..334f8c8881a155158527fb545a4448f140f98ed3 --- /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 0000000000000000000000000000000000000000..72a52a0b61e79dc0d4414c3b863b947417640f2f --- /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 0000000000000000000000000000000000000000..f62df200ce25733cc301a1eae98feb4f77c8d61b --- /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 0000000000000000000000000000000000000000..b4a21487e1b84422b7b5cd2678ba5a946582ff16 --- /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 0000000000000000000000000000000000000000..3d70500882bdecedb1529e014687855c187d08c1 --- /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 0000000000000000000000000000000000000000..18efa7422c5b79123b323e90766fd3446c53b029 --- /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 0000000000000000000000000000000000000000..519164864c407f84f7c43a2a751f5f0afdf8043d --- /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 0000000000000000000000000000000000000000..ef5bdb55a503c41e39418c68aafa36407f4dd19d --- /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 0000000000000000000000000000000000000000..5df25d5c6ee07f8972d593fd9fd5a4b9cd47341f --- /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 0000000000000000000000000000000000000000..72b8f1cdf0abc39b01dd7c0147f8b1dd33c296a1 --- /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 0000000000000000000000000000000000000000..f80fa9a2f3f309100da5f73592b580b8a1946582 --- /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 0000000000000000000000000000000000000000..ac4a33504cd8e6640fe1eccf85482323703507b4 --- /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 0000000000000000000000000000000000000000..ed5135fbcf21caca1776eec55b2e2beb8af5202a --- /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 0000000000000000000000000000000000000000..fad4309c19a5b69c81864e13c6a12f130e9d0144 --- /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 0000000000000000000000000000000000000000..b159c93e120f41cb3dc0cb5e960b0301354f9adc --- /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 0000000000000000000000000000000000000000..02dea5c9c29360c0ef879af061c66b07d05c10ac --- /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 0000000000000000000000000000000000000000..8c1e5683f90b83af98421d69e127219cf1cbf2c4 --- /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 0000000000000000000000000000000000000000..c60e41697df45df524aa9ca981443412015f2786 --- /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 0000000000000000000000000000000000000000..6ccbd517a67d08899c3d06e07477cd9a651fbc27 --- /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 0000000000000000000000000000000000000000..e7fa9c6e82d2212753a42a8c1ea1e804be622c0c --- /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 0000000000000000000000000000000000000000..8e3ec7e595f145f1328b095f85ad224f4bd888be --- /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 0000000000000000000000000000000000000000..e384788cf903b5dc532f9b36ed77619fe3112655 --- /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 0000000000000000000000000000000000000000..90437530b040768e42073dd177e5f2a65b34a0d1 --- /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 0000000000000000000000000000000000000000..dfb31da6a8cf64f4e5fedcca078ac9aa02a2567f --- /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 0000000000000000000000000000000000000000..ee3668072d31b5ec0459eeddbae9c8228e6c48b8 --- /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 0000000000000000000000000000000000000000..b65ca81f4b246de06f1779da409e44483971f585 --- /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 0000000000000000000000000000000000000000..ca6f0c178196dea2e062e24efabe8ee5efc084e5 --- /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 0000000000000000000000000000000000000000..52c72177267724ac1741561cf48ed490d1857f27 --- /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 0000000000000000000000000000000000000000..d6332f5548aa557c6ee21cfbcbe3768c414e0115 --- /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 0000000000000000000000000000000000000000..58855f3342ae333859facf6c5fe39f35469f2d90 --- /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 0000000000000000000000000000000000000000..3a35f22d281ddedaab4bf45b7de8a3d7e936b5d9 --- /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 0000000000000000000000000000000000000000..982eb708333bc6772b7f242748ea0463271a5402 --- /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 0000000000000000000000000000000000000000..b0e18a06354f09c7290354d6ff3166e6c2015db7 --- /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 0000000000000000000000000000000000000000..acb10ac25903968dd1d6f0fe0b9f30b6daab9584 --- /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 0000000000000000000000000000000000000000..06fbd5a11dc576bb92adedbf800abbf0df4acc31 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTE/ZTEBaseStationTester.cs @@ -0,0 +1,2830 @@ +using MTNet.Application.ConnectBase; +using MTNet.Application.DAL; +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 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), + DeviceId = AddrConfig.Id + }; + 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), + DeviceId = AddrConfig.Id + }; + 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), + DeviceId = AddrConfig.Id + }; + 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 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/ChannelEnulator/KeysightChannelEnulator.cs b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/KeysightChannelEnulator.cs new file mode 100644 index 0000000000000000000000000000000000000000..932415f0642bdfbd656c7f70707ac1e58130886e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/KeysightChannelEnulator.cs @@ -0,0 +1,45 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class KeysightChannelEnulator : IChannelEmulator +{ + public KeysightChannelEnulator(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/SpirentVertexChannelEmulator.cs b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/SpirentVertexChannelEmulator.cs new file mode 100644 index 0000000000000000000000000000000000000000..017cd719729636b4f8d39b48b2726650abb493cf --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/SpirentVertexChannelEmulator.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class SpirentVertexChannelEmulator : IChannelEmulator +{ + public SpirentVertexChannelEmulator(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/VirtualChannelEnulator.cs b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/VirtualChannelEnulator.cs new file mode 100644 index 0000000000000000000000000000000000000000..834d81bfa4b834bacf6039190c104c5f38761705 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/ChannelEnulator/VirtualChannelEnulator.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualChannelEnulator : IChannelEmulator +{ + public VirtualChannelEnulator(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/HBTEPhaseShifter.cs b/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/HBTEPhaseShifter.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd6dc0631dbd5fdbac4990d3f350aa758fbc47d6 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/HBTEPhaseShifter.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class HBTEPhaseShifter : IPhaseShifter +{ + public HBTEPhaseShifter(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/VirtualPhaseShifter.cs b/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/VirtualPhaseShifter.cs new file mode 100644 index 0000000000000000000000000000000000000000..e7faed602b6b39e7cafd8a23f6cd9b28c2888b9e --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/PhaseShifter/VirtualPhaseShifter.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualPhaseShifter : IPhaseShifter +{ + public VirtualPhaseShifter(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/HBTEProgrammableAttenuator.cs b/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/HBTEProgrammableAttenuator.cs new file mode 100644 index 0000000000000000000000000000000000000000..32b55d0f5b36032fb9ff23a3d5c242f71e27b15b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/HBTEProgrammableAttenuator.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class HBTEProgrammableAttenuator : IProgrammableAttenuator +{ + public HBTEProgrammableAttenuator(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/VirtualProgrammableAttenuator.cs b/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/VirtualProgrammableAttenuator.cs new file mode 100644 index 0000000000000000000000000000000000000000..8fba02b771105b7e0c7adeda6370f7cae716a7c2 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/ProgrammableAttenuator/VirtualProgrammableAttenuator.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualProgrammableAttenuator : IProgrammableAttenuator +{ + public VirtualProgrammableAttenuator(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/SparkRoadMeasuring.cs b/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/SparkRoadMeasuring.cs new file mode 100644 index 0000000000000000000000000000000000000000..a80badd9c0e4f12f5b1c445c9bc1096f8be38b1d --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/SparkRoadMeasuring.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class SparkRoadMeasuring : IRoadMeasuring +{ + public SparkRoadMeasuring(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/VirtualRoadMeasuring.cs b/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/VirtualRoadMeasuring.cs new file mode 100644 index 0000000000000000000000000000000000000000..938661dc3c71266fc578e2d4270857a5ad327848 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/RoadMeasuring/VirtualRoadMeasuring.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualRoadMeasuring : IRoadMeasuring +{ + public VirtualRoadMeasuring(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/Turntable/HBTETurntable.cs b/Admin.NET/MTNet.Application/DriverLibrary/Turntable/HBTETurntable.cs new file mode 100644 index 0000000000000000000000000000000000000000..d4ddfe6e863411f10fee3ffa9409ee4eec41cb1b --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/Turntable/HBTETurntable.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class HBTETurntable : ITurntable +{ + public HBTETurntable(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/Turntable/VirtualTurntable.cs b/Admin.NET/MTNet.Application/DriverLibrary/Turntable/VirtualTurntable.cs new file mode 100644 index 0000000000000000000000000000000000000000..e8de75de960417f17bbe7d72ddb3865a1bcd09e3 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/Turntable/VirtualTurntable.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualTurntable : ITurntable +{ + public VirtualTurntable(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} diff --git a/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/AndroidUserEquipment.cs b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/AndroidUserEquipment.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e498dfdc49b3a00a3dc8efd20f8a6eaa9bfcf20 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/AndroidUserEquipment.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class AndroidUserEquipment : IUserEquipment +{ + public AndroidUserEquipment(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/TboxUserEquipment.cs b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/TboxUserEquipment.cs new file mode 100644 index 0000000000000000000000000000000000000000..1bf53d6fd8271e4c08bc08ca91efe20b9eaa5079 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/TboxUserEquipment.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class TboxUserEquipment : IUserEquipment +{ + public TboxUserEquipment(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/VirtualUserEquipment.cs b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/VirtualUserEquipment.cs new file mode 100644 index 0000000000000000000000000000000000000000..fbdb42a71f5403ee529837d6afef869142052dfc --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/UserEquipment/VirtualUserEquipment.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary; + +public class VirtualUserEquipment : IUserEquipment +{ + public VirtualUserEquipment(DeviceAddrConfig addrConfig) + { + + } + + public int Connect() + { + int rtn = 0; + return rtn; + } + + public int Close() + { + int rtn = 0; + return rtn; + } + + public int BeforTest() + { + int rtn = 0; + return rtn; + } + + public int AfterTest() + { + int rtn = 0; + return rtn; + } + + public void Dispose() + { + + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Cell.cs b/Admin.NET/MTNet.Application/Entity/Cell.cs new file mode 100644 index 0000000000000000000000000000000000000000..442921b61b53786e9ce0972cf5b5c69ad4e4c10b --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Cell.cs @@ -0,0 +1,195 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "小区信息表")] +public class Cell : EntityBase +{ + /// + /// 基站配置参数ID + /// + [SugarColumn(ColumnDescription = "设备ID")] + public long DeviceId { get; set; } + + /// + /// 小区名称 + /// + [SugarColumn(ColumnDescription = "名称", Length = 32), Required, MaxLength(32)] + public string? Name { get; set; } + + /// + /// 基站ID + /// + [SugarColumn(ColumnDescription = "基站ID")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [SugarColumn(ColumnDescription = "小区ID")] + public int CellId { get; set; } + + /// + /// PCI + /// + [SugarColumn(ColumnDescription = "PCI")] + public int PCI { get; set; } + + /// + /// 小区状态 + /// + [SugarColumn(ColumnDescription = "小区状态")] + public int Status { get; set; } + + /// + /// 网络类型 + /// + [SugarColumn(ColumnDescription = "网络类型")] + public NetworkTypeEnum NetworkType { get; set; } + + /// + /// 厂家类型 + /// + [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/Entity/Device Parameters/AxisParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/AxisParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..68389474d761b02f6eb66885f4a4d18458638ef0 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/AxisParameters.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingAxis", "转台轴设备参数表")] +public class AxisParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "父Id")] + [Description("Set parent id."), Category("Common Parameters"), PropertyOrder(1), DisplayName("Parent Id"), Browsable(false)] + public long ParentId { get; set; } + + [SugarColumn(ColumnDescription = "轴号")] + [Description("Set axis number."), Category("Common Parameters"), PropertyOrder(2), DisplayName("Axis Number"), Browsable(true)] + public int AxisNum { get; set; } + + [SugarColumn(ColumnDescription = "轴类型")] + [Description("Set axis type."), Category("Common Parameters"), PropertyOrder(3), DisplayName("Axis Type"), Browsable(true)] + public AxisTypeEnum AxisType { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/CEParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/CEParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..476341c6228586fc98cfcef9353aeeda912e2d5d --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/CEParameters.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingCE", "信道模拟器设备参数表")] +public class CEParameters : DeviceSettings +{ + #region Channel Model Parameters + + [SugarColumn(ColumnDescription = "信道文件路径")] + [Description("Set the loaded IQ Playback file path for the given Vertex unit."), Category("IQ Playback Parameters"), DisplayName("IQ Playback File Path"), ReadOnly(false), IsPath(true)] + public string FilePath { get; set; } = @"D:\N78\ASC_OutputResults\n78.smu"; + + #endregion + + #region General Parameters + + [Description("Set Parameters."), Category("General Parameters"), DisplayName("Set Parameters"), ReadOnly(false)] + public bool SetParamters { get; set; } = false; + + [Description("Set the speed of the channel emulator.(Km/h)"), Category("General Parameters"), DisplayName("Speed (Km/h)"), ReadOnly(false)] + public double Speed { get; set; } = 100; + + #endregion + + #region DowLinkParameters 一般是线下行后上行,例如下行4*4 上行4*4模型 Input channel 对应dl 1,dl 2,dl 3, dl 4,ul 1,ul 2,ul 3,ul 4;output channel 1~8对应dl1~dl4, + + [Description("Set the center frequency of the channel emulator.(MHz)"), Category("Downlink Parameters"), DisplayName("DL Center Frequency (MHz)"), ReadOnly(false)] + public double CenterFrequencyInMHz_DL { get; set; } = 2000; + + [Description("Set the average input levle of the channel emulator.(dBm)"), Category("Downlink Parameters"), DisplayName("DL Average Input Level (dBm)"), ReadOnly(false), Browsable(true)] + public double AverageInputLevel_DL { get; set; } = -10; + + [Description("Set the crest factor of the channel emulator.(dB)"), Category("Downlink Parameters"), DisplayName("DL Crest Factor (dB)"), ReadOnly(false), Browsable(true)] + public double CrestFactor_DL { get; set; } = 10; + + [Description("Set the output gain of the channel emulator.(dB)"), Category("Downlink Parameters"), DisplayName("DL Output Gain (dB)"), ReadOnly(false), Browsable(true)] + public double OutputGain_DL { get; set; } = 0; + + #endregion + + #region UplinkParameters + + [Description("Set the center frequency of the channel emulator.(MHz)"), Category("Uplink Parameters"), DisplayName("UL Center Frequency (MHz)"), ReadOnly(false)] + public double CenterFrequencyInMHz_UL { get; set; } = 2000; + + [Description("Set the average input levle of the channel emulator.(dBm)"), Category("Uplink Parameters"), DisplayName("UL Average Input Level (dBm)"), ReadOnly(false), Browsable(true)] + public double AverageInputLevel_UL { get; set; } = -10; + + [Description("Set the crest factor of the channel emulator.(dB)"), Category("Uplink Parameters"), DisplayName("UL Crest Factor (dB)"), ReadOnly(false), Browsable(true)] + public double CrestFactor_UL { get; set; } = 10; + + [Description("Set the output gain of the channel emulator.(dB)"), Category("Uplink Parameters"), DisplayName("UL Output Gain (dB)"), ReadOnly(false), Browsable(true)] + public double OutputGain_UL { get; set; } = 0; + + #endregion + +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/CellParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/CellParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e22451d781c01c5110ed91ec8e06de2a70b5fe7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/CellParameters.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingCell", "小区设备参数表")] +public class CellParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "基站Id")] + [Description("Set NodeB id."), Category("Common Parameters"), DisplayName("NodeB Id"), Browsable(true), ReadOnly(true)] + public int NodeBId { get; set; } + + [SugarColumn(ColumnDescription = "小区Id")] + [Description("Set cell id."), Category("Common Parameters"), DisplayName("Cell Id"), Browsable(true), ReadOnly(true)] + public int CellId { get; set; } + + [SugarColumn(ColumnDescription = "PCI")] + [Description("Set PCI."), Category("Common Parameters"), DisplayName("PCI"), Browsable(true)] + public int PCI { get; set; } + + [SugarColumn(ColumnDescription = "SetBandwidth")] + [Description("Is set Bandwidth."), Category("Common Parameters"), DisplayName("Set Bandwidth"), Browsable(true)] + public bool SetBandwidth { get; set; } + + [SugarColumn(ColumnDescription = "Bandwidth")] + [Description("Set Bandwidth."), Category("Common Parameters"), DisplayName("Bandwidth"), Browsable(true)] + public double Bandwidth { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/DeviceSettings.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/DeviceSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..4f9301e1a096ccc9032b9a7233c032a16c702204 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/DeviceSettings.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +public abstract class DeviceSettings : EntityBaseId +{ + [SugarColumn(ColumnDescription = "模板Id")] + [Description("Template Id."), Category("Common Parameters"), DisplayName("Template Id"), Browsable(false), ReadOnly(true)] + public long TemplateId { get; set; } + + [SugarColumn(ColumnDescription = "设备Id")] + [Description("Set device id."), Category("Common Parameters"), DisplayName("Device Id"), Browsable(false), ReadOnly(true)] + public long DeviceId { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/PAParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/PAParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..7aea96a02e1387e0a90a741b475a3d9239623845 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/PAParameters.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingPA", "程控设备参数表")] +public class PAParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "输入端口数量")] + [Description("Set input port num."), Category("Common Parameters"), PropertyOrder(1), DisplayName("Input Port Num"), Browsable(true)] + public int InputPortCount { get; set; } = 32; + + [SugarColumn(ColumnDescription = "输入端口数量")] + [Description("Set output port num."), Category("Common Parameters"), PropertyOrder(2), DisplayName("Output Port Num"), Browsable(true)] + public int OutputPortCount { get; set; } = 16; + + [SugarColumn(ColumnDescription = "输入端口数量")] + [Description("Set max attenuator value [dB]."), Category("Common Parameters"), PropertyOrder(3), DisplayName("Max Attenuator Value [dB]"), Browsable(true)] + public double MaxAttenuator { get; set; } = 63; +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/PSParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/PSParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..36c50eae302b315e5d2fe1bcdb377a62f2688aaf --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/PSParameters.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingPS", "移相器设备参数表")] +public class PSParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "输入端口数量")] + [Description("Set input port num."), Category("Common Parameters"), PropertyOrder(1), DisplayName("Input Port Num"), Browsable(true)] + public int InputPortCount { get; set; } = 64; + + [SugarColumn(ColumnDescription = "输入端口数量")] + [Description("Set output port num."), Category("Common Parameters"), PropertyOrder(2), DisplayName("Output Port Num"), Browsable(true)] + public int OutputPortCount { get; set; } = 4; + + [SugarColumn(ColumnDescription = "Phase文件路径")] + [Description("Set phase data file path."), Category("Common Parameters"), PropertyOrder(3), DisplayName("Phase Data"), ReadOnly(false), Browsable(true), IsPath(true)] + public string PhaseDataFilePath { get; set; } = "64x4-Phase.csv"; + + [SugarColumn(ColumnDescription = "Atten文件路径")] + [Description("Set atten data file path."), Category("Common Parameters"), PropertyOrder(4), DisplayName("Atten Data"), ReadOnly(false), Browsable(true), IsPath(true)] + public string AttenDataFilePath { get; set; } = "64x4-Att.csv"; +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/RMParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/RMParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e16f9d87fa0a6edc94554b818141ad8fad80fc2 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/RMParameters.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingRM", "无线路测设备参数表")] +public class RMParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "终端列表")] + [Navigate(NavigateType.OneToMany, nameof(UEParameters.Id))] + [Description("Set test ue list."), Category("UE Parameters"), DisplayName("UE List"), Browsable(true)] + public List UEList { get; set; } = new List(); +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/TTParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/TTParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4ac9536098f2705e228c61a1bbfae420611d3ff --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/TTParameters.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingTT", "转台设备参数表")] +public class TTParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "轴列表")] + [Navigate(NavigateType.OneToMany, nameof(AxisParameters.Id))] + [Description("Set test axis list."), Category("Axis Parameters"), DisplayName("Axis List"), Browsable(true)] + public List AxisList { get; set; } = new List(); +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Parameters/UEParameters.cs b/Admin.NET/MTNet.Application/Entity/Device Parameters/UEParameters.cs new file mode 100644 index 0000000000000000000000000000000000000000..67dc8608c2cac9c535a686140a11242d960c38d6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Parameters/UEParameters.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("DeviceSettingUE", "终端设备参数表")] +public class UEParameters : DeviceSettings +{ + [SugarColumn(ColumnDescription = "父Id")] + [Description("Set parent id."), Category("Common Parameters"), PropertyOrder(1), DisplayName("Parent Id"), Browsable(false)] + public long ParentId { get; set; } + + [SugarColumn(ColumnDescription = "终端Id")] + [Description("Set ue id."), Category("Common Parameters"), PropertyOrder(2), DisplayName("UE Id"), Browsable(true)] + public string UEId { get; set; } = string.Empty; + + [SugarColumn(ColumnDescription = "电话号码")] + [Description("Set phone number."), Category("Common Parameters"), PropertyOrder(3), DisplayName("Phone Number"), Browsable(true)] + public string PhoneNumber { get; set; } = string.Empty; + + [SugarColumn(ColumnDescription = "IP地址")] + [Description("Set ip address."), Category("Common Parameters"), PropertyOrder(4), DisplayName("Device IP Address"), Browsable(true)] + public string Address { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CEDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CEDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..0bf0d70d9becf592fc934b7995029351f2d8a35e --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CEDevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class CEDevice +{ + public DeviceAddrConfig Config { get; set; } + + public CEParameters Parameters { get; set; } + + public IChannelEmulator Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CellDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CellDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..d5d219ad02e1805a677e391310a8c45f6f894e78 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/CellDevice.cs @@ -0,0 +1,20 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class CellDevice +{ + public DeviceAddrConfig Config { get; set; } + + public Cell Cell { get; set; } + + public CellParameters Parameters { get; set; } + + public IBaseStationTester Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PADevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PADevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..e762fae8a5efaaa5847bb0526630e322062cd2e6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PADevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class PADevice +{ + public DeviceAddrConfig Config { get; set; } + + public PAParameters Parameters { get; set; } + + public IProgrammableAttenuator Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PSDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PSDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..056294c17bca701914fab1a4c5709b00269e34a4 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/PSDevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class PSDevice +{ + public DeviceAddrConfig Config { get; set; } + + public PSParameters Parameters { get; set; } + + public IPhaseShifter Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/RMDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/RMDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..31943ecbf5bda1579ea5af4281ab14b31a898b6b --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/RMDevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class RMDevice +{ + public DeviceAddrConfig Config { get; set; } + + public RMParameters Parameters { get; set; } + + public IRoadMeasuring Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/TTDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/TTDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..b2c4245829448a6c117c2e5b018a13454ba76330 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/TTDevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class TTDevice +{ + public DeviceAddrConfig Config { get; set; } + + public TTParameters Parameters { get; set; } + + public ITurntable Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Device Test Parameters/UEDevice.cs b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/UEDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..29d2ae31e765951b6ba7b836048c494e83e88615 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Device Test Parameters/UEDevice.cs @@ -0,0 +1,18 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class UEDevice +{ + public DeviceAddrConfig Config { get; set; } + + public UEParameters Parameters { get; set; } + + public IUserEquipment Device { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8b383759f38f8e42586597b5c5f8f466f504a54 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[Serializable] +public class AxisInfo +{ + /// + /// 轴号 + /// + public int AxisNum { get; set; } + + /// + /// 轴名称 + /// + public string AxisName { get; set; } + + /// + /// 轴移动类型 + /// + public AxisMoveTypeEnum MoveType { get; set; } = AxisMoveTypeEnum.Position; + + /// + /// 轴归零功能 + /// + public bool GoHome { get; set; } + + /// + /// 轴置零功能 + /// + public bool SetZero { get; set; } + + /// + /// 当前轴最小角度值 + /// + public double MinAngle { get; set; } + + /// + /// 当前轴最大角度值 + /// + public double MaxAngle { get; set; } + + /// + /// 当前轴最小移动速度 + /// + public double MinMoveSpeed { get; set; } + + /// + /// 当前轴最大移动速度 + /// + public double MaxMoveSpeed { get; set; } + + /// + /// 轴当前位置 + /// + public double CurrentAngle { get; set; } + + ///// + ///// 轴目标位置 + ///// + //public double TargetAngle { get; set; } + + /// + /// 轴当前速度 + /// + public double CurrentSpeed { get; set; } + + ///// + ///// 要设置的轴速度 + ///// + //public double Speed { get; set; } +} + +/// +/// 轴移动类型 +/// 达位运动,步进运动 +/// +[Description("轴移动类型枚举")] +public enum AxisMoveTypeEnum { Position, Step } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..72ac30dbf4440b8b8b91b373b48765eca15ac483 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(BaseStationTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class BaseStationTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public BaseStationTesterAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.BaseStationTester; + } + + BaseStationTesterTypeEnum _deviceModelConfig = BaseStationTesterTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public BaseStationTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..fbb58c04fc3e6baafbb7081d878a3687c86953d2 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ChannelEmulatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ChannelEmulatorAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ChannelEmulatorAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator; + } + + ChannelEmulatorTypeEnum _deviceModelConfig = ChannelEmulatorTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ChannelEmulatorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..223455770af2e77cc109d0b8781a2092abaf9645 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(CommunicationTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class CommunicationTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public CommunicationTesterAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.CommunicationTester; + } + + CommunicationTesterTypeEnum _deviceModelConfig = CommunicationTesterTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public CommunicationTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..fec53308913d3fe6b6d662cefd28b424b0683d8e --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[Serializable] +[DeviceTable] +[SugarTable(null, "设备信息表")] +public class DeviceAddrConfig : EntityBase +{ + [SugarColumn(ColumnDescription = "设备名称", Length = 32), Required, MaxLength(32)] + [Description("Set the name of the device,and it cannot be repeated."), Category("Basic Parameters"), DisplayName("Device Name"), Browsable(true)] + public string Name { get; set; } = ""; + + [SugarColumn(ColumnDescription = "设备类型")] + [Description("Set the type of the device."), Category("Basic Parameters"), DisplayName("Device Type")] + public virtual DeviceTypeEnum DeviceTypeConfig { get; set; } = DeviceTypeEnum.BaseStationTester; + + [SugarColumn(ColumnDescription = "设备型号")] + [Description("Set the model of the device."), Category("Basic Parameters"), DisplayName("Device Model"), Browsable(true)] + public int DeviceModelConfig { get; set; } = 0; + + [SugarColumn(ColumnDescription = "通讯类型")] + [Description("Set the communication type of the device."), Category("Communication Parameters"), DisplayName("Communication Type"), Browsable(true)] + public CommunicationTypeEnum CommunicationTypeConfig { get; set; } = CommunicationTypeEnum.Socket; + + [SugarColumn(ColumnDescription = "IP地址", Length = 32), Required, MaxLength(32)] + [Description("Communication address setting. IP address or serial port number (for example: COM3)"), Category("Communication Parameters"), DisplayName("Communication Address"), Browsable(true)] + public string AddrConfig { get; set; } = ""; + + [SugarColumn(ColumnDescription = "端口号")] + [Description("Set the port number of the device.It is enabled when the 'Whether to use visa protocol?' parameter is set to false and the communication type is set to 'socket'."), Category("Communication Parameters"), DisplayName("Port"), Browsable(true)] + public int PortConfig { get; set; } = 0; + + [SugarColumn(ColumnDescription = "用户名", Length = 32), Required, MaxLength(32)] + [Description("Communication user name setting."), Category("Communication Parameters"), DisplayName("Communication UserName"), Browsable(true)] + public string? UserName { get; set; } = ""; + + [SugarColumn(ColumnDescription = "密码", Length = 32), Required, MaxLength(32)] + [Description("Communication password setting."), Category("Communication Parameters"), DisplayName("Communication Password"), Browsable(true)] + public string? Password { get; set; } = ""; + + [SugarColumn(ColumnDescription = "管理员用户名", Length = 32), Required, MaxLength(32)] + [Description("Communication admin user name setting."), Category("Communication Parameters"), DisplayName("Communication Admin UserName"), Browsable(true)] + public string? AdminUserName { get; set; } = ""; + + [SugarColumn(ColumnDescription = "管理员密码", Length = 32), Required, MaxLength(32)] + [Description("Communication admin password setting."), Category("Communication Parameters"), DisplayName("Communication Admin Password"), Browsable(true)] + public string? AdminPassword { get; set; } = ""; + + [SugarColumn(ColumnDescription = "连接地址", Length = 32), Required, MaxLength(32)] + [Description("The actual communication address.It is automatically generated."), Category("Communication Parameters"), DisplayName("Actual Communication Address"), Browsable(false)] + public string? RealAddrConfig { get; set; } = ""; + + [SugarColumn(ColumnDescription = "VISA协议")] + [Description("Whether to use visa protocol?"), Category("Communication Parameters"), DisplayName("Whether to use visa protocol?"), Browsable(true)] + public bool UseVisaProgrammerConfig { get; set; } = false; + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..a76006074d15c10c89109f4d048e1e9bac644f31 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; +[SerializableAttribute] +public class DevicesConfig +{ + public DevicesConfig() + { + + } + + List _turntableListConfig = new List(); + [Description("Turntable List"), Category("Turntable List Configuration"), DisplayName("Turntable List")] + public List TurntableListConfig { get => _turntableListConfig; set => _turntableListConfig = value; } + + List _highSpeedSwitchBoxListConfig = new List(); + [Description("High Speed Switch Box List"), Category("High Speed Switch Box List Configutation"), DisplayName("High Speed Switch Box List")] + public List HighSpeedSwitchBoxListConfig { get => _highSpeedSwitchBoxListConfig; set => _highSpeedSwitchBoxListConfig = value; } + + List _scannerListConfig = new List(); + [Description("Scanner List"), Category("Scanner List Configuration"), DisplayName("Scanner List")] + public List ScannerListConfig { get => _scannerListConfig; set => _scannerListConfig = value; } + + List _switchBoxListConfig = new List(); + [Description("Switch Box List"), Category("Switch Box List Configutation"), DisplayName("Switch Box List")] + public List SwitchBoxListConfig { get => _switchBoxListConfig; set => _switchBoxListConfig = value; } + + List _spectrumAnalyzerListConfig = new List(); + [Description("Spectrum Analyzer List"), Category("Spectrum Analyzer List Configuration"), DisplayName("Spectrum Analyzer List")] + public List SpectrumAnalyzerListConfig { get => _spectrumAnalyzerListConfig; set => _spectrumAnalyzerListConfig = value; } + + List _networkAnalyzerListConfig = new List(); + [Description("Network Analyzer List"), Category("Network Analyzer List Configuration"), DisplayName("Network Analyzer List")] + public List NetworkAnalyzerListConfig { get => _networkAnalyzerListConfig; set => _networkAnalyzerListConfig = value; } + + List _baseStationTesterListConfig = new List(); + [Description("Base Station List"), Category("Base Station List Configutation"), DisplayName("Base Station List")] + public List BaseStationTesterListConfig { get => _baseStationTesterListConfig; set => _baseStationTesterListConfig = value; } + + List _channelEmulatorListConfig = new List(); + [Description("Channal Emulator List"), Category("Channal Emulator List Configuration"), DisplayName("Channal Emulator List")] + public List ChannelEmulatorListConfig { get => _channelEmulatorListConfig; set => _channelEmulatorListConfig = value; } + + List _communicationTesterListConfig = new List(); + [Description("Communication Tester List"), Category("Communication Tester List Configuration"), DisplayName("Communication Tester List")] + public List CommunicationTesterListConfig { get => _communicationTesterListConfig; set => _communicationTesterListConfig = value; } + + List _specialEquipmentListConfig = new List(); + [Description("Special Equipment List"), Category("Special Equipment List Configuration"), DisplayName("Special Equipment List")] + public List SpecialEquipmentListConfig { get => _specialEquipmentListConfig; set => _specialEquipmentListConfig = value; } + + List _ueEquipmentListConfig = new List(); + [Description("UE List"), Category("UE List Configuration"), DisplayName("UE List")] + public List UEEquipmentListConfig { get => _ueEquipmentListConfig; set => _ueEquipmentListConfig = value; } + + List _ueMonitorListConfig = new List(); + [Description("UE Monitor List"), Category("UE Monitor List Configuration"), DisplayName("UE Monitor List")] + public List UEMonitorListConfig { get => _ueMonitorListConfig; set => _ueMonitorListConfig = value; } + + List _signalGeneratorListConfig = new List(); + [Description("Signal Generator List"), Category("Signal Generator List Configuration"), DisplayName("Signal Generator List")] + public List SignalGeneratorListConfig { get => _signalGeneratorListConfig; set => _signalGeneratorListConfig = value; } + + List _programmableAttenuatorListConfig = new List(); + [Description("Programmable Attenuator List"), Category("Programmable Attenuator List Configuration"), DisplayName("Programmable Attenuator List")] + public List ProgrammableAttenuatorListConfig { get => _programmableAttenuatorListConfig; set => _programmableAttenuatorListConfig = value; } + + List _phaseShifterListConfig = new List(); + [Description("Phase Shifter List"), Category("Phase Shifter List Configuration"), DisplayName("Phase Shifter List")] + public List PhaseShifterListConfig { get => _phaseShifterListConfig; set => _phaseShifterListConfig = value; } + + List _wirelessRoadMeasuringInstrumentListConfig = new List(); + [Description("Wireless Road Measuring Instrument List"), Category("Wireless Road Measuring Instrument List Configuration"), DisplayName("Wireless Road Measuring Instrument List")] + public List WirelessRoadMeasuringInstrumentListConfig { get => _wirelessRoadMeasuringInstrumentListConfig; set => _wirelessRoadMeasuringInstrumentListConfig = value; } + + List _powerConsumptionTesterListConfig = new List(); + [Description("Power Consumption Tester List"), Category("Power Consumption Tester List Configuration"), DisplayName("Power Consumption Tester List")] + public List PowerConsumptionTesterListConfig { get => _powerConsumptionTesterListConfig; set => _powerConsumptionTesterListConfig = value; } + + List _networkDamageTesterListConfig = new List(); + [Description("Network Damage Tester List"), Category("Network Damage Tester List Configuration"), DisplayName("Network Damage Tester List")] + public List NetworkDamageTesterListConfig { get => _networkDamageTesterListConfig; set => _networkDamageTesterListConfig = value; } + + List _interferenceGeneratorListConfig = new List(); + [Description("Interference Generator List"), Category("Interference Generator List Configuration"), DisplayName("Interference Generator List")] + public List InterferenceGeneratorListConfig { get => _interferenceGeneratorListConfig; set => _interferenceGeneratorListConfig = value; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..150edd2778a92fc4c219e2956519c77dfd09baff --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(HighSpeedSwitchBoxAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class HighSpeedSwitchBoxAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public HighSpeedSwitchBoxAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox; + } + + HighSpeedSwitchBoxTypeEnum _deviceModelConfig = HighSpeedSwitchBoxTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public HighSpeedSwitchBoxTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..624b7a94c7678996fd491f5bf98dfadd710f390a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(InterferenceGeneratorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class InterferenceGeneratorAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public InterferenceGeneratorAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator; + } + + InterferenceGeneratorTypeEnum _deviceModelConfig = InterferenceGeneratorTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public InterferenceGeneratorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..0550dd38db56c999a07e118e616bcdaa413d8b3a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(NetworkAnalyzerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class NetworkAnalyzerAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public NetworkAnalyzerAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer; + } + + NetworkAnalyzerTypeEnum _deviceModelConfig = NetworkAnalyzerTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public NetworkAnalyzerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..359c5a3629a9bdd540544deaaa4402bf1378e4d1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(NetworkDamageTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class NetworkDamageTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public NetworkDamageTesterAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester; + } + + NetworkDamageTesterTypeEnum _deviceModelConfig = NetworkDamageTesterTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public NetworkDamageTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..616e39914f3d1c94a940588d2d065be070e6be90 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ProgrammableAttenuatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class PhaseShifterAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public PhaseShifterAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.PhaseShifter; + } + + PhaseShifterTypeEnum _deviceModelConfig = PhaseShifterTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public PhaseShifterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..7437966946ad1a727ea6a59168c005221e813e08 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(PowerConsumptionTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class PowerConsumptionTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public PowerConsumptionTesterAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester; + } + + PowerConsumptionTesterTypeEnum _deviceModelConfig = PowerConsumptionTesterTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public PowerConsumptionTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..1dfb90220de5cbc3751379f1aecdb469ad7a6789 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ProgrammableAttenuatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ProgrammableAttenuatorAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ProgrammableAttenuatorAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator; + } + + ProgrammableAttenuatorTypeEnum _deviceModelConfig = ProgrammableAttenuatorTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ProgrammableAttenuatorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..db271271b3713e6174f84126087ece37ecf0f00d --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ScannerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ScannerAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ScannerAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.Scanner; + } + + ScannerTypeEnum _deviceModelConfig = ScannerTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ScannerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..3b83d30496f8c617e8d461f2340041dcdb760d1c --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SignalGeneratorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SignalGeneratorAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SignalGeneratorAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.SignalGenerator; + } + + SignalGeneratorTypeEnum _deviceModelConfig = SignalGeneratorTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SignalGeneratorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..48117109e6db940f1b66d54e439e7b7288e2bfe7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SpecialEquipmentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SpecialEquipmentAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SpecialEquipmentAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment; + } + + SpecialEquipmentTypeEnum _deviceModelConfig = SpecialEquipmentTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SpecialEquipmentTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..b4e985913df08793651274720cdb7e52eb217ee8 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SpectrumAnalyzerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SpectrumAnalyzerAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SpectrumAnalyzerAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer; + } + + SpectrumAnalyzerTypeEnum _deviceModelConfig = SpectrumAnalyzerTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SpectrumAnalyzerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..c19f16d6311179ccba9be95749463f5d0edd57e1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SwitchBoxAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SwitchBoxAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SwitchBoxAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.SwitchBox; + } + + SwitchBoxTypeEnum _deviceModelConfig = SwitchBoxTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SwitchBoxTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..0fcb5a9c427a8c99c5e5886e4e1a50f95e26b67f --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(TurntableAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class TurntableAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public TurntableAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.Turntable; + } + + TurntableTypeEnum _deviceModelConfig = TurntableTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public TurntableTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + [Description("Axis information set added for position box."), Category("Communication Parameters"), DisplayName("Axis Information Collection"), Browsable(false)] + public List AxisInfoListConfig { get; set; } = new List(); + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..f2f80b627648ee076e2ff9996ab2fe26dcfb491a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(UEMonitorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class UEMonitorAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public UEMonitorAddrConfig() + { + //this.DeviceTypeConfig = DeviceTypeEnum.UeMonitor; + } + + UeMonitorTypeEnum _deviceModelConfig = UeMonitorTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public UeMonitorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..9a85949145882c118e484f967b75d8d7198cda3a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(UserEquipmentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class UserEquipmentAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public UserEquipmentAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.UserEquipment; + } + + UserEquipmentTypeEnum _deviceModelConfig = UserEquipmentTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public UserEquipmentTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + [Description("Communication root password setting."), Category("Communication Parameters"), DisplayName("Communication Root Password"), Browsable(true)] + public string RootPassword { get; set; } = ""; + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..7103a22a0a311ab025a66cb2fc53e27292246c38 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(WirelessRoadMeasuringInstrumentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class WirelessRoadMeasuringInstrumentAddrConfig : DeviceAddrConfig +{ + public override DeviceTypeEnum DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public WirelessRoadMeasuringInstrumentAddrConfig() + { + this.DeviceTypeConfig = DeviceTypeEnum.RoadMeasuring; + } + + RoadMeasuringTypeEnum _deviceModelConfig = RoadMeasuringTypeEnum.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public RoadMeasuringTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", Name.ToString()); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/PAMapping.cs b/Admin.NET/MTNet.Application/Entity/PAMapping.cs new file mode 100644 index 0000000000000000000000000000000000000000..70cb3ccb15751f2a14bb41c08e5258956e87da2f --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/PAMapping.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "程控映射表")] +public class PAMapping : EntityBase +{ + /// + /// 基站厂家 + /// + [SugarColumn(ColumnDescription = "基站厂家", Length = 32), Required, MaxLength(32)] + public string? BaseStationFactory { get; set; } = ""; + + /// + /// AAU频段 + /// + [SugarColumn(ColumnDescription = "AAU频段", Length = 32), Required, MaxLength(32)] + public string? AAUFrequencyBand { get; set; } = ""; + + /// + /// AAU频段编号 + /// + [SugarColumn(ColumnDescription = "AAU频段ID", Length = 32), Required, MaxLength(32)] + public string? AAUFrequencyBandId { get; set; } = ""; + + /// + /// 基站ID + /// + [SugarColumn(ColumnDescription = "基站ID")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [SugarColumn(ColumnDescription = "小区ID")] + public int CellId { get; set; } + + /// + /// 屏蔽房 + /// + [SugarColumn(ColumnDescription = "屏蔽房", Length = 32), Required, MaxLength(32)] + public string ShieldRoom { get; set; } = ""; + + /// + /// 程控IP + /// + [SugarColumn(ColumnDescription = "程控IP", Length = 32), Required, MaxLength(32)] + public string Address { get; set; } = ""; + + /// + /// 输入端口 + /// + [SugarColumn(ColumnDescription = "输入端口")] + public int InputPort { get; set; } + + /// + /// 输出端口 + /// + [SugarColumn(ColumnDescription = "输出端口")] + public int OutputPort { get; set; } + + /// + /// 初始功率 + /// + [SugarColumn(ColumnDescription = "初始功率")] + public double InitialPower { get; set; } + + public override string ToString() + { + return $"{NodeBId}-{CellId},{Address},{InputPort},{OutputPort}"; + } +} diff --git a/Admin.NET/MTNet.Application/Entity/ParametersInfo.cs b/Admin.NET/MTNet.Application/Entity/ParametersInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..46a04f02b46e3806c8e905d5be8338d15b9fd73d --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/ParametersInfo.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +public class ParametersInfo +{ + public string Name { get; set; } = string.Empty; + + public string Label { get; set; } = string.Empty; + + public List Items { get; set; } = new List(); +} + +public class ParameterInfoItem +{ + /// + /// 序号 + /// + public int Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 界面显示 + /// + public string Label { get; set; } + + /// + /// 描述信息 + /// + public string Description { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 分组 + /// + public string Category { get; set; } + + /// + /// 默认值 + /// + public object DefaultValue { get; set; } + + /// + /// 是否可见 + /// + public bool IsBrowsable { get; set; } + + /// + /// 是否只读 + /// + public bool IsReadOnly { get; set; } + + /// + /// 是否为路径 + /// 配合前端弹出Dialog时使用 + /// + public bool IsPath { get; set; } + + /// + /// 是否为集合 + /// 配合前端弹出Dialog时使用 + /// + public bool IsList { get; set; } + + /// + /// 其他,例如当前类型为枚举时,保存枚举的类型 + /// + public object Other { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Platform Event Args Define/MeasurementEventArgs.cs b/Admin.NET/MTNet.Application/Entity/Platform Event Args Define/MeasurementEventArgs.cs new file mode 100644 index 0000000000000000000000000000000000000000..afb235500984b53d312bce2e1f2c8bb2ac55e6b3 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Platform Event Args Define/MeasurementEventArgs.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 测试完成或出现测试异常时触发的就事件 +/// +public class MeasurementEventArgs : EventArgs +{ + public string FileName { get; set; } + + /// + /// 测试状态 + /// + public TestStatusEnum CurrentStatus { get; set; } + + /// + /// 测试结果,目前以字符串代替,待测试结果定义后可替换为测试结果 + /// + public TestResult CurrentResult { get; set; } + + public MeasurementEventArgs(string fileName, TestStatusEnum currentStatus, TestResult currentResult) + { + FileName = fileName; + CurrentStatus = currentStatus; + CurrentResult = currentResult ?? throw new ArgumentNullException(nameof(currentResult)); + } +} + +/// +/// 获取单元数据 +/// +public class MetaTestDataEventArgs : EventArgs +{ + /// + /// 测试单元数据 + /// + public MetaTestData MetaData { get; set; } = new MetaTestData(); + + /// + /// 当前位置 + /// + public CoordinatePosition CP { get; set; } = new CoordinatePosition(); + + /// + /// 当前进度 + /// + public double Process { get; set; } + + public MetaTestDataEventArgs(CoordinatePosition cp, MetaTestData mtd, double process) + { + CP = cp; + MetaData = mtd; + Process = process; + } +} +/// +/// 获取迹线数据 +/// +public class TraceDataEventArgs : EventArgs +{ + private string _traceName = "trace"; + public string TraceName { get; set; } + + /// + /// 迹线X轴数据 + /// + public List XValueList { get; set; } = new List(); + + /// + /// 迹线X轴数据 + /// + public List YValueList { get; set; } = new List(); + + public TraceDataEventArgs(string traceName, List xValueList, List yValueList) + { + XValueList = xValueList; + YValueList = yValueList; + } +} + +/// +/// 获取单个测试任务结果事件 +/// +public class TestDataEventArgs : EventArgs +{ + /// + /// 测试数据 + /// + public TestData TestData { get; set; } + + public TestDataEventArgs(TestData testData) + { + TestData = testData; + } +} + +/// +/// 测试失败事件,需要保存测试数据 +/// +public class TestFailedEventArgs : EventArgs +{ + /// + /// 测试失败原因 + /// + public string Reason { get; set; } + + /// + /// 当前测试结果,暂时用字符串代替 + /// + public TestData CurrentResult { get; set; } + + public TestFailedEventArgs(string reason, TestData currentResult) + { + Reason = reason; + CurrentResult = currentResult; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/CaculatedData.cs b/Admin.NET/MTNet.Application/Entity/Result Define/CaculatedData.cs new file mode 100644 index 0000000000000000000000000000000000000000..320f7455248448b3429f1a16ae61d742aacbfe0f --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/CaculatedData.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 经过计算的测试结果 +/// +public class CaculatedData +{ + public List MetaCaculateDataList { get; set; } = new List(); +} + +/// +/// 经过计算的测试结果 +/// +public class MetaCalculatedData +{ + /// + /// 结果名称,在无源测试中是频率信息,而在射频测试中可能是信道名称 + /// + public string ResultName { get; set; } = string.Empty; + + /// + /// 计算的详细数据 + /// + public List MetaDetailDataList { get; set; } = new List(); +} + +/// +/// 经过计算的测试结果 +/// +public class CaculateMetaDetailData +{ + public CaculateDataType DataType { get; set; } = CaculateDataType.Gain; + + public double Value { get; set; } = -99999; +} + +public enum CaculateDataType { Gain, PeakGain, TRP, TIS, Directivity, Efficiency } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/CoordinatePosition.cs b/Admin.NET/MTNet.Application/Entity/Result Define/CoordinatePosition.cs new file mode 100644 index 0000000000000000000000000000000000000000..671a0b2c9a12b96ba2bf174f1aa42fb27840c5f6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/CoordinatePosition.cs @@ -0,0 +1,188 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 坐标类,用于定义旋转装置的位置 +/// +public class CoordinatePosition : IEquatable +{ + public CoordinatePosition() + { + + } + + public CoordinatePosition(List positionList) + { + _coordinate = positionList; + } + + /// + /// 根据坐标系定义的坐标位置 + /// + List _coordinate = new List(); + public List Coordinate { get => _coordinate; set => _coordinate = value; } + + /// + /// 根据转台、扫描架、开关箱等定义的原始位置 + /// + List _primevalCoordinate = new List(); + public List PrimevalCoordinate { get => _primevalCoordinate; set => _primevalCoordinate = value; } + + /// + /// 确定指定的对象是否等于当前对象 + /// + /// + /// + public override bool Equals(object obj) + { + return base.Equals(obj); + } + + /// + /// 根据坐标系定义的的位置转换为字符串的方法 + /// + /// 位置坐标 + public string GetCoordinateString() + { + string tempString = ""; + foreach (var item in Coordinate) + { + tempString += item.GetPositionString() + "\n"; + } + return tempString; + } + + /// + /// 根据实际设备状态定义的原始位置转换为字符串的方法 + /// + /// + public string GetPrimevalCoordinateString() + { + string tempString = ""; + foreach (var item in PrimevalCoordinate) + { + tempString += item.GetPositionString() + "\n"; + } + return tempString; + } + + /// + /// 根据坐标系定义的的位置转换为坐标值的方法,多个值之间用","分隔 + /// + /// 坐标位置 + public string GetCoordinateValue() + { + string tempString = ""; + foreach (var item in Coordinate) + { + tempString += item.Location + ","; + } + return tempString; + } + + public string GetCoordinateNameAndValueString() + { + string tempString = ""; + foreach (var item in Coordinate) + { + tempString += item.PositionerType.ToString() + ":" + item.Location + ","; + } + return tempString.Remove(tempString.Length - 1, 1); + } + + /// + /// 根据实际设备定义的的位置转换为坐标值的方法,多个值之间用","分隔 + /// + /// 坐标位置 + public string GetPrimevalCoordinateValue() + { + string tempString = ""; + foreach (var item in PrimevalCoordinate) + { + tempString += item.Location + ","; + } + return tempString; + } + + /// + /// 返回坐标系位置的哈希代码 + /// + /// + public override int GetHashCode() + { + int tempHashCode = this.GetCoordinateValue().GetHashCode(); + return tempHashCode; + } + + /// + /// 坐标系转换为字符串 + /// + /// + public override string ToString() + { + return this.GetCoordinateString(); + } + + /// + /// 比较两个坐标位置是否完全相同 + /// + /// + /// + bool IEquatable.Equals(CoordinatePosition other) + { + return this == other; + } + + /// + /// 坐标系等于运算符 + /// + /// 坐标位置1 + /// 坐标位置2 + /// + public static bool operator ==(CoordinatePosition p1, CoordinatePosition p2) + { + if (object.ReferenceEquals(p1, p2)) + return true; + else if ((object)p1 == null || (object)p2 == null) + { + return false; + } + + if ((p1.Coordinate.Count != p2.Coordinate.Count) || (p1.PrimevalCoordinate.Count != p2.PrimevalCoordinate.Count)) + return false; + else + { + for (int i = 0; i < p1.Coordinate.Count; i++) + { + if (p1.Coordinate[i].Location != p2.Coordinate[i].Location) + { + return false; + } + } + for (int i = 0; i < p1.PrimevalCoordinate.Count; i++) + { + if (p1.PrimevalCoordinate[i].Location != p2.PrimevalCoordinate[i].Location) + { + return false; + } + } + return true; + } + } + + /// + /// 坐标系不等于运算符 + /// + /// 坐标位置1 + /// 坐标位置2 + /// + public static bool operator !=(CoordinatePosition p1, CoordinatePosition p2) + { + return !(p1 == p2); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/MetaTestData.cs b/Admin.NET/MTNet.Application/Entity/Result Define/MetaTestData.cs new file mode 100644 index 0000000000000000000000000000000000000000..1cebf7cc33cff859b9bf2e6ece889bf92cd3913a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/MetaTestData.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 测试结果的元数据,最小结果,此数据应为一个case所能获取的最小数据,如果只有一组x,y值,则list的count为1 +/// 在描述中的所谓横纵坐标,其实是指绘制到一个二维图中的显示方式,如trp测试中,我们认为横坐标是频点,纵坐标是 +/// 功率;在tis测试中,横坐标是功率,纵坐标是误码率;在无源、校准测试中,横坐标是频率,纵坐标就是S21幅度值。 +/// 无源测试时,横坐标是频率,纵坐标可能对应了更多S21幅度、S21相位信息,需要继承此类做更多开发。 +/// +public class MetaTestData +{ + public MetaTestData() + { + + } + + public MetaTestData(List xValues, List yValues) + { + + } + + public MetaTestData(List xValues_Double, List yValues_Double) + { + + } + + /// + /// 横坐标是一组数据,比如无源测试中的频率列表 + /// + public List XValues { get; set; } = new List(); + + /// + /// 纵坐标是一组数据,配合Xvalues使用,一组数据对应的值 如无源测试的数据结构 + /// + public List YValues { get; set; } = new List(); + + /// + /// 横坐标是一组数据,比如无源测试中的频率列表 + /// + public List XValues_Double { get; set; } = new List(); + + /// + /// 纵坐标是一组数据,配合Xvalues使用,一组数据对应的值 如无源测试的数据结构 + /// + public List YValues_Double { get; set; } = new List(); +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/Position.cs b/Admin.NET/MTNet.Application/Entity/Result Define/Position.cs new file mode 100644 index 0000000000000000000000000000000000000000..24646382793e809994d9283ca2a2059e60515258 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/Position.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 位置类,用来定义旋转装置box的当前位置 +/// +public class Position : IComparable +{ + /// + /// 坐标轴名称,用于显示或记录 + /// + AxisTypeEnum positionerType = AxisTypeEnum.Theta; + public AxisTypeEnum PositionerType { get => positionerType; set => positionerType = value; } + + /// + /// 实际位置值 + /// + double location = -9999999; + public double Location { get => location; set => location = value; } + + /// + /// 构造函数 + /// + /// 坐标轴名称 + /// 坐标位置 + public Position(AxisTypeEnum positionerType, double location) + { + PositionerType = positionerType; + Location = location; + } + + /// + /// 位置信息转换为字符串 + /// + /// 坐标轴名称+" " +坐标位置 + public string GetPositionString() + { + return PositionerType.ToString() + " " + Location.ToString(); + } + + /// + /// 比较两个位置 + /// + /// + /// + public int CompareTo(Position posobj) + { + if (posobj == null) + throw new NullReferenceException("待比较的位置不能为空"); + if (this.PositionerType == posobj.PositionerType) + { + return this.Location.CompareTo(posobj.Location); + } + else + { + return -1; + } + } + + /// + /// 比较两个位置 + /// + /// + /// + int IComparable.CompareTo(object obj) + { + Position temp = obj as Position; + return this.CompareTo(temp); + } + + /// + /// 坐标位置等于运算 + /// + /// 位置1 + /// 位置2 + /// + public static bool operator ==(Position p1, Position p2) + { + if (object.ReferenceEquals(p1, p2)) + return true; + else if ((object)p1 == null || (object)p2 == null) + { + return false; + } + + return p1.Location == p2.Location && p1.PositionerType == p2.PositionerType; + } + + /// + /// 坐标位置不等于运算 + /// + /// 位置1 + /// 位置2 + /// + public static bool operator !=(Position p1, Position p2) + { + return !(p1 == p2); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/TestMessage.cs b/Admin.NET/MTNet.Application/Entity/Result Define/TestMessage.cs new file mode 100644 index 0000000000000000000000000000000000000000..c99df421405bfa442ac70a4c760d7e378de7af4c --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/TestMessage.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 测试消息 +/// 保存测试过程中的输出信息集合 +/// +public class TestMessage +{ + public List MetaTestMessageList { get; set; } = new List(); +} + +/// +/// 测试消息 +/// 单条测试消息 +/// +public class MateTestMessage +{ + /// + /// 消息创建时间 + /// + public DateTime Time { get; set; } = DateTime.Now; + + /// + /// 消息内容 + /// + public string Message { get; set; } = string.Empty; + + /// + /// 消息类型 + /// + public TestMessageEnum Type { get; set; } = TestMessageEnum.Progress; + + /// + /// 是否发送到UI + /// + public bool SendToUI { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Result Define/TestResult.cs b/Admin.NET/MTNet.Application/Entity/Result Define/TestResult.cs new file mode 100644 index 0000000000000000000000000000000000000000..b0875d0518f9ee93cda15953e92c62eb1852c3ef --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Result Define/TestResult.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinMessageCustomSendRequest.Types; + +namespace MTNet.Application.Entity; + +/// +/// 测试结果类,包含测试数据和测试配置 +/// +public class TestResult +{ + /// + /// 需要序列化的结构必须有无参数的校准文件 + /// + public TestResult() + { + + } + + public TestResult(TestData rawTestData, TestData finalTestData, TestTemplate testConfigs, TestData calibrationData) + { + RawTestData = rawTestData ?? throw new ArgumentNullException(nameof(rawTestData)); + FinalTestData = finalTestData ?? throw new ArgumentNullException(nameof(finalTestData)); + TestConfig = testConfigs ?? throw new ArgumentNullException(nameof(testConfigs)); + CalibrationData = calibrationData ?? throw new ArgumentNullException(nameof(calibrationData)); + } + + /// + /// 测试项的配置文件 + /// + public TestTemplate TestConfig { get; set; } = new TestTemplate(); + + /// + /// 测试消息 + /// + public TestMessage TestMessage { get; set; } = new TestMessage(); + + /// + /// 测试原始结果 + /// + public TestData RawTestData { get; set; } = new TestData(); + + /// + /// 最终的测试结果 + /// + public TestData FinalTestData { get; set; } = new TestData(); + + /// + /// 校准数据,未必会用到。 + /// + public TestData CalibrationData { get; set; } = new TestData(); + + /// + /// 计算的最终结果 + /// + public CaculatedData CaculatedResult { get; set; } = new CaculatedData(); + + /// + /// 测试开始时间 + /// + public string TestStartTime { get; set; } = DateTime.Now.ToString("s"); + + /// + /// 测试结束时间 + /// + public string TestEndTime { get; set; } = DateTime.Now.ToString("s"); + + /// + /// 测试时长 + /// + public string TestCostTime { get; set; } = DateTime.Now.ToString("s"); +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Test Case Parameters/BSTestCaseSettings.cs b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/BSTestCaseSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..cfe94c1b7fdef159f8ee2c02b16dd95b6c8aabcd --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/BSTestCaseSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("TestSettingBS", "基站测试例参数表")] +public class BSTestCaseSettings : TestSetting +{ + [Description("Set the enable."), Category("Basic Parameters"), DisplayName("Enable"), Browsable(false)] + public bool Enable { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/Test Case Parameters/PeakRateTestCaseSettings.cs b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/PeakRateTestCaseSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..bba4a60272bd5c08fd2f9c915b48b4349caa196f --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/PeakRateTestCaseSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("TestSettingPeakRate", "峰值速率测试例参数表")] +public class PeakRateTestCaseSettings : TestSetting +{ + [Description("Set runtime(unit:s)."), Category("Basic Parameters"), DisplayName("Run Time(s)"), Browsable(true)] + public int Runtime { get; set; } = 30; +} diff --git a/Admin.NET/MTNet.Application/Entity/Test Case Parameters/TestSetting.cs b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/TestSetting.cs new file mode 100644 index 0000000000000000000000000000000000000000..47b2075c843f9aa9d1f5d9460e7d5f2a65ca83cd --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/TestSetting.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +public abstract class TestSetting : EntityBaseId +{ + [Description("Set the test template id."), Category("Basic Parameters"), DisplayName("Template Id"), Browsable(false)] + public long TemplateId { get; set; } + + //[Description("Set the test case name."), Category("Basic Parameters"), DisplayName("Test Case Name"), Browsable(false)] + //public string Name { get; set; } = string.Empty; + + //[Description("Set the test case type."), Category("Basic Parameters"), DisplayName("Test Case Type"), Browsable(false)] + //public TestTypeEnum TestType { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UETestCaseSettings.cs b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UETestCaseSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..3e35e8a6b5797de09776ced229edb51d1301dc72 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UETestCaseSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("TestSettingUE", "终端测试例参数表")] +public class UETestCaseSettings : TestSetting +{ + [Description("Set the value."), Category("Basic Parameters"), DisplayName("Value"), Browsable(true)] + public double Value { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UserDefineTestCaseSettings.cs b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UserDefineTestCaseSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..54d5a06ccb14ed9717e95c6f97c501f03df87f2a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Test Case Parameters/UserDefineTestCaseSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable("TestSettingUserDefine", "用户自定义测试例参数表")] +public class UserDefineTestCaseSettings : TestSetting +{ + [Description("Set the num."), Category("Basic Parameters"), DisplayName("Num"), Browsable(true)] + public int Num { get; set; } = 1; +} diff --git a/Admin.NET/MTNet.Application/Entity/TestAction.cs b/Admin.NET/MTNet.Application/Entity/TestAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..a617a7fb2405d85d58e5e1c142d80dc32cc6fa97 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestAction.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试动作表")] +public class TestAction : EntityBaseId +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 测试进度类型 + /// + [SugarColumn(ColumnDescription = "测试进度类型")] + public TestStepTypeEnum StepType { get; set; } + + /// + /// 设备类型 + /// + [SugarColumn(ColumnDescription = "设备类型")] + public DeviceTypeEnum DeviceType { get; set; } + + /// + /// 动作类型 + /// + [SugarColumn(ColumnDescription = "动作类型")] + public int ActionType { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnDescription = "排序")] + public int OrderNo { get; set; } = 100; + + /// + /// 备注 + /// + [SugarColumn(ColumnDescription = "备注", Length = 2048)] + [MaxLength(2048)] + public string? Remark { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestCell.cs b/Admin.NET/MTNet.Application/Entity/TestCell.cs new file mode 100644 index 0000000000000000000000000000000000000000..4389ba5fad5cfa92bb57f9e6c53eec0b07849fb9 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestCell.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试小区表")] +public class TestCell : EntityBaseId +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 基站Id + /// + [SugarColumn(ColumnDescription = "基站Id")] + public int NodeBId { get; set; } + + /// + /// 小区Id + /// + [SugarColumn(ColumnDescription = "小区Id")] + public int CellId { get; set; } + + /// + /// 小区参数 + /// + [SugarColumn(ColumnDescription = "小区参数")] + public CellParameters? Parameter { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestData.cs b/Admin.NET/MTNet.Application/Entity/TestData.cs new file mode 100644 index 0000000000000000000000000000000000000000..924888b25bd706de216d07fcbde6198e0345d447 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestData.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +/// +/// 测试原始数据,可以根据CoordinatePosition坐标来索引具体位置的测试结果 +/// 在测试过程中,测试结果分为两大类,校准结果和测试结果,都统一用TestData来保存。 +/// 区分测试结果根据caseconfig来确认,不再此区分。 +/// 线缆校准数据与位置信息无关具体的数据频率为metatestdata的xvalues幅度和相位为yvalues。 +/// 系统校准数据可能只有一维坐标关系, +/// 在其他测试项中可能会采取三维坐标加极化的数据结构 +/// 因此,坐标基本上是三维的分别为第一维度(positioncoordinate[0]),也就是最大的维度为Theta +/// 第二维度(positioncoordinate[1])Phi(theta\phi的名称并不一定是对的,但三维的序列一定是正确的) +/// 第三维度(positioncoordinate[2])是极化维度H、V。 +/// 在标准OTA的TRP、TIS测试过程中,分为两张折线图,分别叫做H、V(名称可能会更改),折线图基本一致,只是分别对应了第三维 +/// 的H和V的数据。以H图为例,折线的横坐标为phi角度,因此横坐标的范围一般为(0-360度,因此此图形可以向二维极坐标图转化) +/// 纵坐标为对应的值,H图中会有几条线,取决于case测试的频点数目,以高中低三个频点为例(也可能只有一个频点), +/// h图中会有三条曲线,名称分别为高中低频点的频率,频率的数值从metatestdata的xvalue中得到, +/// xvalues的数量为3,存储的值应分别为高中低三个频率,对应的具体的测试值数据从yvalues当中得到, +/// yvalues的count也应为3,每测得一个metatestdata,h图的每条折线都应增加一个点。当第二维度遍历完成 +/// 即第一维度发生变化后,清空所有的测试结果图,重复上述绘制步骤。 +/// +public class TestData +{ + /// + /// 测试数据 + /// + public Dictionary Result { get; set; } = new Dictionary(); + + /// + /// 根据坐标位置获取数据 + /// + /// + /// + MetaTestData GetDataByCoordinate(CoordinatePosition pc) + { + return Result[pc]; + } + + /// + /// 获取某一个坐标轴下的数据列表 + /// + /// + /// + public List GetListDataByPosition(Position ps) + { + List tempList = new List(); + foreach (var item in Result) + { + foreach (var coordinateitem in item.Key.Coordinate) + { + if (coordinateitem == ps) + { + tempList.Add(item.Value); + } + } + } + return tempList; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/TestDevice.cs b/Admin.NET/MTNet.Application/Entity/TestDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..20109f70e014294abfb38ef4eeb47e929903cefb --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestDevice.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试设备表")] +public class TestDevice : EntityBaseId +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 设备Id + /// + [SugarColumn(ColumnDescription = "设备Id")] + public long DeviceId { get; set; } + + /// + /// 设备参数 + /// + [SugarColumn(ColumnDescription = "设备参数")] + public DeviceSettings? Parameter { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestSeries.cs b/Admin.NET/MTNet.Application/Entity/TestSeries.cs new file mode 100644 index 0000000000000000000000000000000000000000..0bd9deb8f48a3d09ccb645bed3872faa5b53ff62 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestSeries.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试任务表")] +public class TestSeries : EntityBaseId +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 任务名称 + /// + [SugarColumn(ColumnDescription = "任务名称", Length = 32), Required, MaxLength(32)] + public string Name { get; set; } = string.Empty; + + /// + /// 测试进度 + /// + [SugarColumn(ColumnDescription = "测试进度")] + public double Progress { get; set; } + + /// + /// 测试状态 + /// + [SugarColumn(ColumnDescription = "测试状态")] + public TestStatusEnum Status { get; set; } = TestStatusEnum.NoStarted; + + /// + /// 当前次数 + /// + [SugarColumn(ColumnDescription = "当前次数")] + public int CurrentNum { get; set; } + + /// + /// 测试次数 + /// + [SugarColumn(ColumnDescription = "测试次数")] + public int TotalNum { get; set; } = 1; + + /// + /// 开始时间 + /// + [SugarColumn(ColumnDescription = "开始时间")] + public DateTime StartTime { get; set; } + + /// + /// 结束时间 + /// + [SugarColumn(ColumnDescription = "结束时间")] + public DateTime EndTime { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnDescription = "排序")] + public int OrderNo { get; set; } = 100; +} diff --git a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs new file mode 100644 index 0000000000000000000000000000000000000000..81454d1aad5ec07a331c09ac8c750625b2a1e217 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试模板表")] +public class TestTemplate : EntityBase +{ + /// + /// 模板名称 + /// + [SugarColumn(ColumnDescription = "模板名称", Length = 32), Required, MaxLength(32)] + public string Name { get; set; } = string.Empty; + + /// + /// 测试类型 + /// + [SugarColumn(ColumnDescription = "测试类型")] + public TestTypeEnum TestType { get; set; } + + /// + /// 设备集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestDevice.TemplateId))] + public List? Devices { get; set; } + + /// + /// 小区集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestCell.TemplateId))] + public List? Cells { get; set; } + + /// + /// 动作集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestAction.TemplateId))] + public List? Actions { get; set; } + + [SugarColumn(ColumnDescription = "测试参数")] + public TestSetting? TestConfig { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/AxisTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/AxisTypeEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..555e5fff57a9e3a6f0c827c9a26fa5cb5cbe544e --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/AxisTypeEnum.cs @@ -0,0 +1,9 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public enum AxisTypeEnum { Angle, CIR, Time, Path, Theta, Phi, Polarization, Pitch } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..7fccf3a904decb7486342ec23af58cdea5116698 --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("测试步骤枚举")] +public enum TestStepTypeEnum +{ + [Description("连接")] + Connect, + [Description("初始化")] + Initial, + [Description("测试前")] + BeforTest, + [Description("测试中")] + Testing, + [Description("测试后")] + AfterTest, + [Description("关闭")] + Close, +} + +public enum BaseStationActionEnum +{ + [Description("闭塞")] + Lock, + [Description("解闭塞")] + Unlock, + [Description("修改PCI")] + PCI, + [Description("修改带宽")] + Bandwidth, +} diff --git a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f6f4252f52596ec1bc2d6a6fe07cb5b901d347c --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("设备类型枚举")] +public enum DeviceTypeEnum +{ + [Description("基站")] + BaseStationTester, + [Description("信道仿真器")] + ChannelEmulator, + //[Description("综合测试仪")] + //CommunicationTester, + //[Description("网络分析仪")] + //NetworkAnalyzer, + //[Description("信号源")] + //SignalGenerator, + //[Description("特殊设备")] + //SpecialEquipment, + //[Description("频谱分析仪")] + //SpectrumAnalyzer, + [Description("无线路测仪")] + RoadMeasuring, + //[Description("功率测试仪")] + //PowerConsumptionTester, + //[Description("网络损伤仪")] + //NetworkDamageTester, + //[Description("干扰发生器")] + //InterferenceGenerator, + [Description("转台")] + Turntable, + //[Description("扫描架")] + //Scanner, + //[Description("开关箱")] + //SwitchBox, + //[Description("高速开关箱")] + //HighSpeedSwitchBox, + [Description("移相器")] + PhaseShifter, + [Description("程控矩阵")] + ProgrammableAttenuator, + [Description("终端")] + UserEquipment, + //[Description("终端模拟器")] + //UeMonitor, +} + +[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("信道仿真器型号枚举")] +public enum ChannelEmulatorTypeEnum { Keyseight_F64, Spirent_Vertex, Virtual } +[Description("综合测试仪型号枚举")] +public enum CommunicationTesterTypeEnum { MT8000A_NR, SP9500_NR, Virtual } +[Description("网络分析仪型号枚举")] +public enum NetworkAnalyzerTypeEnum { E5071C, N5230C, N5225A, M9804A, ZNA, ZNB, ZND, Ceyear3672, Virtual } +[Description("信号源型号枚举")] +public enum SignalGeneratorTypeEnum { E4438C, N5182A, SMW200A, M9384B, E8267D, SMBV100B, ZSA_S6000, Virtual } +[Description("特殊设备型号枚举")] +public enum SpecialEquipmentTypeEnum { Virtual } +[Description("频谱分析仪型号枚举")] +public enum SpectrumAnalyzerTypeEnum { N9040B, FSW, ZSA_F6000, Virtual } +[Description("无线路测仪型号枚举")] +public enum RoadMeasuringTypeEnum { Spark, Virtual } +[Description("功率测试仪型号枚举")] +public enum PowerConsumptionTesterTypeEnum { UDP3305S, Virtual } +[Description("网络损伤仪型号枚举")] +public enum NetworkDamageTesterTypeEnum { Spirent, Virtual } +[Description("干扰发生器型号枚举")] +public enum InterferenceGeneratorTypeEnum { Virtual } +[Description("转台型号枚举")] +public enum TurntableTypeEnum { HBTE, HansRobot, Maturo, Virtual } +[Description("扫描架型号枚举")] +public enum ScannerTypeEnum { Virtual } +[Description("开关箱型号枚举")] +public enum SwitchBoxTypeEnum { Virtual } +[Description("高速开关箱型号枚举")] +public enum HighSpeedSwitchBoxTypeEnum { Virtual } +[Description("移相器型号枚举")] +public enum PhaseShifterTypeEnum { HBTE, Virtual } +[Description("程控矩阵型号枚举")] +public enum ProgrammableAttenuatorTypeEnum { HBTE, TopYoung, Virtual } +[Description("终端型号枚举")] +public enum UserEquipmentTypeEnum { Android, Tbox, Virtual } +[Description("终端模拟器型号枚举")] +public enum UeMonitorTypeEnum { DoToutch, E500, Virtual } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestMessageEnum.cs b/Admin.NET/MTNet.Application/Enum/TestMessageEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..40f0f0b7d5cef99a4e11a66e64e5feef4e08e8cc --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/TestMessageEnum.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public enum TestMessageEnum +{ + #region 测试相关 + [Description("测试信息")] + Progress, + [Description("转台位置")] + Position, + [Description("测试数据")] + Data, + [Description("测试例信息")] + CaseInfo, + [Description("测试状态")] + Status, + [Description("总测试任务进度")] + TotalTaskProgress, + [Description("当前测试任务进度")] + CurrentTaskProgress, + [Description("测试时间")] + Time, + [Description("测试异常")] + Error, + #endregion + #region 转台脚本 + [Description("操作信息")] + OperationInfo, + [Description("脚本信息")] + ScriptInfo, + [Description("步骤信息")] + StepInfo, + [Description("转台在线数量")] + OnlineNum, + [Description("转台位置信息")] + TurntablePosition, + #endregion + #region 地图相关 + [Description("所有点信息")] + AllPoints, + [Description("Marker点信息")] + MarkerPoint, + [Description("Marker点位置")] + MarkerPosition, + #endregion + #region 其他 + [Description("连接心跳")] + HeartBeat, + [Description("客户端消息")] + ClientMessage, + [Description("图表数据")] + Chart, + [Description("终端信息")] + CellInfo, + [Description("弹窗信息")] + Dialog, + #endregion +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestOperatorEnum.cs b/Admin.NET/MTNet.Application/Enum/TestOperatorEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..a2572ac702480f18d43f7e9cb1e44f622fbc2d6d --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/TestOperatorEnum.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 操作枚举 +/// +public enum TestOperatorEnum +{ + isStop, + isContinue, + isStart, + isPause, + noOperator +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestStatusEnum.cs b/Admin.NET/MTNet.Application/Enum/TestStatusEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..fc0df73c69904fb31cd89046256b3a45045adad3 --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/TestStatusEnum.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("测试状态枚举")] +public enum TestStatusEnum +{ + [Description("未开始")] + NoStarted, + [Description("已停止")] + Stopped, + [Description("测试中")] + Running, + [Description("暂停")] + Pausing, + [Description("完成")] + Finished, + [Description("失败")] + Failed +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs new file mode 100644 index 0000000000000000000000000000000000000000..b5e26849b80e10bf14ca66b80bece5f2a69ca917 --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("测试类型枚举")] +public enum TestTypeEnum +{ + #region 校准测试 + [Description("线缆测量"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + LossMeasurementTestCase, + [Description("系统校准-网分"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + NetworkAnalyzerCalibrationTestCase, + [Description("系统校准-频谱仪"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + SpectrumAnalyzerCalibrationTestCase, + #endregion + + #region 5G无线接入网功能测试 + [Description("无线网:100MHz载波带宽、30kHz子载波间隔测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase, + [Description("无线网:30MHz载波带宽、15kHz子载波间隔测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase, + [Description("无线网:下行PDSCH自适应调制与编码测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationAdaptiveModulationCoding_PDSCHTestCase, + [Description("无线网:上行PUSCH自适应调制与编码测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationAdaptiveModulationCoding_PUSCHTestCase, + [Description("无线网:系统广播信息的调度和传输(源自AMF或OAM)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationSystemInformationBroadcastTestCase, + [Description("无线网:gNB内的同频切换测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationSameFrequencySwitching_Intra_gNBTestCase, + [Description("无线网:基于3GPP CDL信道模型不同运动速度下的吞吐量测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase, + [Description("无线网:基于3GPP CDL信道模型不同噪声、不同信号下的拉远测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase, + #endregion + + #region 5G无线网射频测试 + [Description("无线网:发射机测试-发射功率测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOutputPowerTestCase, + [Description("无线网:发射机测试-总功率动态范围测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTotalPowerDynamicRangeTestCase, + [Description("无线网:发射机测试-关断功率和过渡时间测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase, + [Description("无线网:发射机测试-频率误差测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterFrequencyErrorTestCase, + [Description("无线网:发射机测试-EVM测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterEVMTestCase, + [Description("无线网:发射机测试-MIMO定时误差(TAE)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTAETestCase, + [Description("无线网:发射机测试-占用带宽(OBW)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOBWTestCase, + [Description("无线网:发射机测试-邻道抑制比ACLR测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterACLRTestCase, + [Description("无线网:发射机测试-频谱模板SEM/OBUE测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOBUETestCase, + [Description("无线网:发射机测试-关键频段的频谱杂散测试"), Category("5G无线接入网功能测试"), Browsable(true)] + BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase, + [Description("无线网:接收机测试-接收机灵敏度测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverSensitivityTestCase, + [Description("无线网:接收机测试-动态范围测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverDynamicRangeTestCase, + [Description("无线网:接收机测试-邻道选择性(ACS)测试"), Category("5G无线接入网功能测试"), Browsable(true)] + BaseStationReceiverACSTestCase, + [Description("无线网:接收机测试-阻塞测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverBlockageTestCase, + [Description("无线网:接收机测试-信道内选择性测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverChannelSelectivityTestCase, + #endregion + + #region 5G无线网性能测试 + [Description("无线网:多用户接入(模拟至少1000UE)测试"), Category("5G无线接入网性能测试"), CategoryIndex(2), Browsable(true)] + BaseStationMultiUserAccessTestCase, + #endregion + + #region 5G终端功能测试 + [Description("终端:100MHz载波带宽、30kHz子载波间隔测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase, + [Description("终端:30MHz载波带宽、15kHz子载波间隔测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase, + [Description("终端:Step2随机接入测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStep2RandomAccessTestCase, + [Description("终端:Step4随机接入测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStep4RandomAccessTestCase, + [Description("终端:加密/解密测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEEncryptionAndDecryptionTestCase, + [Description("终端:完整性保护测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEIntegrityTestCase, + [Description("终端:gNB内的同频切换测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UESameFrequencySwithing_Intra_gNBTestCase, + [Description("终端:VoNR用户呼叫VoNR用户测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEVoiceCallBetweenVONRsTestCase, + [Description("终端:基于3GPP CDL信道模型终端吞吐量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UE3GPPCDChannelModelThroughputTestCase, + [Description("终端:基于3GPP 标准的终端OTA拉远测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UE3GPPStretchTestCase, + [Description("终端:最大发射功率测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEMaximumTransmittingPowerTestCase, + [Description("终端:发射功率回退测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UETransmitPowerRolledBackTestCase, + [Description("终端:发射信号质量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UETransmittedSignalQualityTestCase, + [Description("终端:待机功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStandbyPowerConsumptionTestCase, + [Description("终端:数据业务功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEDataTrafficPowerConsumptionTestCase, + #endregion + + #region 5G终端性能测试 + [Description("终端:终端峰值速率测试"), Category("5G终端性能测试"), CategoryIndex(4), Browsable(true)] + UEPeakRateTestCase, + #endregion + + [Description("终端:用户自定义测试"), Category("自定义测试"), CategoryIndex(5), Browsable(true)] + UEUserDefineTestCase, +} diff --git a/Admin.NET/MTNet.Application/GlobalUsings.cs b/Admin.NET/MTNet.Application/GlobalUsings.cs new file mode 100644 index 0000000000000000000000000000000000000000..7dd67391af32e5c30ad9f50321fb6059694322ec --- /dev/null +++ b/Admin.NET/MTNet.Application/GlobalUsings.cs @@ -0,0 +1,22 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +global using Admin.NET.Core; +global using Furion; +global using Furion.DependencyInjection; +global using Furion.DynamicApiController; +global using Furion.FriendlyException; +global using Mapster; +global using Microsoft.AspNetCore.Authorization; +global using Microsoft.AspNetCore.Mvc; +global using Microsoft.Extensions.DependencyInjection; +global using SqlSugar; +global using System; +global using System.Collections.Generic; +global using System.ComponentModel; +global using System.ComponentModel.DataAnnotations; +global using System.Threading.Tasks; +global using System.Linq; \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IBLL/ITestEngine.cs b/Admin.NET/MTNet.Application/IBLL/ITestEngine.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e03de5141a3a7de1a1cc2d69b6b6d523120a268 --- /dev/null +++ b/Admin.NET/MTNet.Application/IBLL/ITestEngine.cs @@ -0,0 +1,384 @@ +using MTNet.Application.Entity; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Subjects; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IBLL; + +public abstract class ITestEngine +{ + private Subject ErrorOb = new Subject(); + public IObservable ErrorRx => ErrorOb; + + /// + /// 原始单元数据 + /// + public MetaTestData RawCurrentMTD { get; set; } = new MetaTestData(); + + /// + /// 最终单元数据 + /// + public MetaTestData FinalCurrentMTD { get; set; } = new MetaTestData(); + + /// + /// 当前位置,通过设置获取 + /// + public CoordinatePosition CurrentCP { get; set; } = new CoordinatePosition(); + + /// + /// 通过查询获取当前位置 + /// + public CoordinatePosition CurrentCPByCheck { get; set; } = new CoordinatePosition(); + + /// + /// 测试结果 + /// + public TestResult TestResult { get; set; } = new TestResult(); + + /// + /// 最终测试数据 + /// + public TestData FinalTestData { get; set; } = new TestData(); + + /// + /// 当前测试例的SeriesItem + /// + public TestSeries CurrentItem { get; set; } = new TestSeries(); + + /// + /// 测试参数配置 + /// + public TestTemplate Settings { get; set; } = new TestTemplate(); + + /// + /// 测试状态 + /// + public TestStatusEnum Status { get; set; } = TestStatusEnum.NoStarted; + + /// + /// 用户操作 + /// + public TestOperatorEnum Operator { get; set; } = TestOperatorEnum.noOperator; + + /// + /// 文件名称 + /// + public string FileName { get; set; } = string.Empty; + + protected DateTime startTime; + protected DateTime stopTime; + + public List _cellList = new List(); + public List _ceList = new List(); + public List _rmList = new List(); + public List _ttList = new List(); + public List _psList = new List(); + public List _paList = new List(); + public List _ueList = new List(); + + public ITestEngine() + { + + } + + #region 测试流程 + + public virtual async Task TestProcess() + { + await Task.Delay(1000); + } + + #endregion + + /// + /// 检查测试参数,先做预留,可以不用实现 + /// + public abstract void CheckTestParameters(); + + /// + /// 此方法主要检查连接是否中断,以及中断后的处理机制. + /// + /// + public abstract bool CheckConnection(); + + /// + /// 在测试之前调用的方法,供不同的测试case实现,主要包括设备连接,设备初始化,测试前状态检查等. + /// + public abstract void WhatToDoBeforeTest(); + + public abstract void WhatToDoBerforBuildConnection(); + + /// + /// 获取每个位置的单元数据。此方法只需要将需要修改的数据变更,保存到列表里调用add方法 + /// + /// 当前位置 + /// 需要修改的元数据 + public abstract void WhatToDoInTheLoop(); + + /// + /// 测试完成后的工作,供后期扩展。主要包括测试数据预处理,测试设备复位 + /// + public abstract void WhatToDoAfterTest(); + + /// + /// DUT与测试设备通讯掉线后需要执行的操作 + /// + public abstract void WhatTodoAfterDisconnect(); + + /// + /// 连接所有仪表 + /// + public virtual void ConnectAllTheDevice() + { + + } + + /// + /// 初始化所有仪表,将转台扫描架等移动到初始位置。 + /// + public virtual void DeviceInitBeforTest() + { + + } + + /// + /// 测试完后设备复位 + /// + public virtual void DeviceInitAferTest() + { + + } + + /// + /// 断开所有连接 + /// + public virtual void CloseAllTheDevice() + { + + } + + protected Thread workThread; + CancellationTokenSource tokenSource; + protected CancellationToken token; + ManualResetEvent resetEvent; + + /// + /// 开始测试 + /// + public virtual void Start() + { + if (this.Status == TestStatusEnum.NoStarted || this.Status == TestStatusEnum.Stopped || this.Status == TestStatusEnum.Finished || this.Status == TestStatusEnum.Failed) + { + tokenSource = new CancellationTokenSource(); + token = tokenSource.Token; + resetEvent = new ManualResetEvent(true); + + workThread = new Thread(async () => + { + for (int i = 1; i <= CurrentItem.TotalNum; i++)//根据用户设置的循环次数进行多次循环测试 + { + try + { + CurrentItem.CurrentNum = i; + + if (WaitHandle()) + { + return; + } + + await TestProcess(); + } + catch (TaskCanceledException) { } + catch (OperationCanceledException) { } + catch (Exception ex) + { + ErrorOb.OnNext(ex); + } + finally + { + AfterTestFinished(new MeasurementEventArgs(FileName, TestStatusEnum.Finished, TestResult)); + + TestResult = new TestResult(); + RawCurrentMTD = new MetaTestData(); + } + } + AfterLoopTestFinished(new MeasurementEventArgs(FileName, TestStatusEnum.Finished, TestResult));//当前测试例循环次数结束后,再通知执行下一个测试任务 + }); + + workThread.Start(); + Status = TestStatusEnum.Running; + Operator = TestOperatorEnum.noOperator; + } + } + + /// + /// 暂停测试,此处只改变操作状态 + /// + public virtual void Pause() + { + if (Status == TestStatusEnum.Running) + { + Status = TestStatusEnum.Pausing; + Operator = TestOperatorEnum.isPause; + } + } + + /// + /// 停止测试,暂时不用 + /// + public virtual void Stop() + { + if (Status == TestStatusEnum.Running) + { + Status = TestStatusEnum.Stopped; + Operator = TestOperatorEnum.isStop; + } + else if (Status == TestStatusEnum.Pausing) + { + Status = TestStatusEnum.Stopped; + Operator = TestOperatorEnum.isStop; + resetEvent.Set(); + } + } + + /// + /// 继续测试,暂时不用 + /// + public virtual void Continue() + { + if (Status == TestStatusEnum.Pausing) + { + Status = TestStatusEnum.Running; + Operator = TestOperatorEnum.isContinue; + resetEvent.Set(); + } + } + + /// + /// 安全停止方法,读取到停止标志后再启动停止 + /// + /// + protected bool WaitHandle() + { + //如果当前时间不在测试时间区间内,则不再进行循环测试,直接退出 + if (DateTime.Now < CurrentItem.StartTime || DateTime.Now > CurrentItem.EndTime) + { + //SendMessageToUI($"test case {CurrentItem.Name} time is {CurrentItem.TestStartTime} - {CurrentItem.TestEndTime}", TestMessageEnum.Dialog, true); + Stop(); + } + if (Operator == TestOperatorEnum.isPause) + { + Operator = TestOperatorEnum.noOperator; + resetEvent.Reset(); + } + else if (Operator == TestOperatorEnum.isContinue) + { + Operator = TestOperatorEnum.noOperator; + resetEvent.Set(); + } + else if (Operator == TestOperatorEnum.isStop) + { + tokenSource.Cancel(); + return true; + } + resetEvent.WaitOne();//读到暂停标志后进行线程阻塞 + return false; + } + + /// + /// 测试过程的信息 + /// + public event Action<(string, TestMessageEnum)> SendStatusMessage; + protected virtual void OnSendStatusMessage(string message, TestMessageEnum messageType = TestMessageEnum.Progress, bool sendToUI = true) + { + if (messageType == TestMessageEnum.Progress || messageType == TestMessageEnum.Data) + message = $"{DateTime.Now} {message}"; + + if (sendToUI) + SendStatusMessage?.Invoke((message, messageType)); + + if (messageType == TestMessageEnum.CellInfo || messageType == TestMessageEnum.Chart) + return; + + Console.WriteLine(message); + } + public virtual void SendMessageToUI(string message, TestMessageEnum messageType, bool sendToUI = true) + { + TestResult.TestMessage.MetaTestMessageList ??= new List(); + TestResult.TestMessage.MetaTestMessageList.Add(new MateTestMessage { Message = message, Type = messageType, SendToUI = sendToUI }); + + OnSendStatusMessage(message, messageType, sendToUI); + } + + /// + /// 发送当前位置 + /// + public event Action SendCoordinate; + protected virtual void OnSendCoordinate(string coordinate, bool needShow) + { + SendCoordinate?.Invoke(coordinate, needShow); + } + + /// + /// 当获取元数据时的事件 + /// + public event EventHandler MetaTestDataAdded; + protected virtual void OnMetaTestDataAdded(MetaTestDataEventArgs e) + { + MetaTestDataAdded?.Invoke(this, e); + } + public virtual void AddMetaTestData(CoordinatePosition cp, MetaTestData mtd, double process) + { + if (mtd != null) + { + OnMetaTestDataAdded(new MetaTestDataEventArgs(cp, mtd, process)); + } + } + + /// + /// 整个测试结果完成时触发的事件 + /// + public event EventHandler TestDataAdded; + protected virtual void OnTestDataAdded(TestDataEventArgs e) + { + TestDataAdded?.Invoke(this, e); + } + public virtual void AddTestData(TestData td) + { + if (td != null) + { + OnTestDataAdded(new TestDataEventArgs(td)); + } + } + + /// + /// 测试失败触发事件 + /// + public event EventHandler TestFailed; + protected virtual void AfterTestFailed(TestFailedEventArgs e) + { + TestFailed?.Invoke(this, e); + } + + /// + /// 测试完成后结果数据传递 + /// + public event EventHandler TestFinished; + protected virtual void AfterTestFinished(MeasurementEventArgs e) + { + TestFinished?.Invoke(this, e); + } + + /// + /// 循环测试完成后结果数据传递 + /// + public event EventHandler LoopTestFinished; + protected virtual void AfterLoopTestFinished(MeasurementEventArgs e) + { + LoopTestFinished?.Invoke(this, e); + } +} \ No newline at end of file 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 0000000000000000000000000000000000000000..76883047ab13e3e1d5ce1b293aa97af988e2a785 --- /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 0000000000000000000000000000000000000000..5b768954dd28820698fd9d66f4ffdd3c31a62106 --- /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 0000000000000000000000000000000000000000..b13dcee41c4c97fefb37e6632d89a59fe92b112d --- /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 0000000000000000000000000000000000000000..fda882861677fb7b72ae8debf7fc04205a0cc981 --- /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 0000000000000000000000000000000000000000..be3490972e9d9eea048197297ea7da04e6d01538 --- /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 new file mode 100644 index 0000000000000000000000000000000000000000..6a065e08c9dd85f22368c808d1d2451f935193a9 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs @@ -0,0 +1,199 @@ +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 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/IChannelEmulator.cs b/Admin.NET/MTNet.Application/IDAL/IChannelEmulator.cs new file mode 100644 index 0000000000000000000000000000000000000000..132adf3d91d1ed4a928508d0c3653fc4922f2a52 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IChannelEmulator.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 IChannelEmulator : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs b/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs new file mode 100644 index 0000000000000000000000000000000000000000..e0522df822526561c25c7ddef2b79d1f7ed72861 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IDeviceBase : IDisposable +{ + /// + /// 连接 + /// + /// 如果返回值小于0表示失败 + int Connect(); + + /// + /// 断开 + /// + /// 如果返回值小于0表示失败 + int Close(); + + /// + /// 测试开始前的操作 + /// + /// 如果返回值小于0表示失败 + int BeforTest(); + + /// + /// 测试结束后的操作 + /// + /// 如果返回值小于0表示失败 + int AfterTest(); +} diff --git a/Admin.NET/MTNet.Application/IDAL/IPhaseShifter.cs b/Admin.NET/MTNet.Application/IDAL/IPhaseShifter.cs new file mode 100644 index 0000000000000000000000000000000000000000..a2a5faf493eefd3faf8d4ca670279f1324f3049b --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IPhaseShifter.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 IPhaseShifter : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IDAL/IProgrammableAttenuator.cs b/Admin.NET/MTNet.Application/IDAL/IProgrammableAttenuator.cs new file mode 100644 index 0000000000000000000000000000000000000000..4085617e085c5bb15fb5df27c8b6824a41558b67 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IProgrammableAttenuator.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 IProgrammableAttenuator : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IDAL/IRoadMeasuring.cs b/Admin.NET/MTNet.Application/IDAL/IRoadMeasuring.cs new file mode 100644 index 0000000000000000000000000000000000000000..d8c34d935df4951166deeb581d12f1859593d093 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IRoadMeasuring.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 IRoadMeasuring : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IDAL/ITurntable.cs b/Admin.NET/MTNet.Application/IDAL/ITurntable.cs new file mode 100644 index 0000000000000000000000000000000000000000..8592ba523590efe513d4fb659ad388891000a207 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/ITurntable.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 ITurntable : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/IDAL/IUserEquipment.cs b/Admin.NET/MTNet.Application/IDAL/IUserEquipment.cs new file mode 100644 index 0000000000000000000000000000000000000000..063943ae17e7e718485563ba55a91116524db47a --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IUserEquipment.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 IUserEquipment : IDeviceBase +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Job/CellJob.cs b/Admin.NET/MTNet.Application/Job/CellJob.cs new file mode 100644 index 0000000000000000000000000000000000000000..c8f2cfe83b0e2979d1e53724003a8347ca11ecee --- /dev/null +++ b/Admin.NET/MTNet.Application/Job/CellJob.cs @@ -0,0 +1,102 @@ +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; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 查询基站小区作业任务 +/// +[JobDetail("job_cell", Description = "查询基站小区", GroupName = "default", Concurrent = false)] +[PeriodSeconds(60 * 60, TriggerId = "trigger_cell", Description = "查询基站小区", MaxNumberOfRuns = 1, RunOnStart = true)] +public class CellJob : IJob +{ + private readonly IServiceScopeFactory _scopeFactory; + private readonly ILogger _logger; + 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 = await GetCellList(); + + using var serviceScope = _scopeFactory.CreateScope(); + + var baseStationService = serviceScope.ServiceProvider.GetRequiredService(); + var db = serviceScope.ServiceProvider.GetRequiredService().CopyNew(); + await db.Deleteable().Where(u => u.CreateTime < DateTime.Now).ExecuteCommandAsync(stoppingToken); // 删除小区信息 + + foreach (var cell in cellList) + { + var id = await baseStationService.Add(cell); + + string msg = $"【{DateTime.Now}】写入小区信息成功,Id {id} [{cell.Name}]"; + + // 自定义日志 + _logger.LogInformation(msg); + } + } + + /// + /// 从各基站获取小区列表 + /// + /// + public async Task> GetCellList() + { + List cells = new List(); + IBaseStationTester baseStationTester = null; + var bsList = _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).ToList(); + foreach (var config in bsList) + { + switch ((BaseStationTesterTypeEnum)config.DeviceModelConfig) + { + case BaseStationTesterTypeEnum.Huawei: + baseStationTester = new HuaweiBaseStationTester(config); + break; + case BaseStationTesterTypeEnum.ZTE: + baseStationTester = new ZTEBaseStationTester(config); + break; + case BaseStationTesterTypeEnum.Nokia: + baseStationTester = new NokiaBaseStationTester(config); + break; + case BaseStationTesterTypeEnum.Ericsson: + baseStationTester = new EricssonBaseStationTester(config); + break; + case BaseStationTesterTypeEnum.Virtual: + baseStationTester = new VirtualBaseStationTester(config); + break; + default: + baseStationTester = new VirtualBaseStationTester(config); + break; + } + + baseStationTester.Connect(); + baseStationTester.Initial(); + + var list = await baseStationTester.GetCells(); + cells.AddRange(list); + _logger.LogInformation($"{DateTime.Now} {config.Name} get cells {list?.Count}"); + + baseStationTester.Close(); + } + return cells; + } +} diff --git a/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs b/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs new file mode 100644 index 0000000000000000000000000000000000000000..fcd35cba1ecaa39a0a27a661d308858459456e58 --- /dev/null +++ b/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs @@ -0,0 +1,38 @@ +using Furion.Schedule; +using Microsoft.Extensions.Logging; +using MTNet.Application.Entity; +using MTNet.Application.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 上报数据作业任务 +/// +[JobDetail("job_reported_data", Description = "上报数据", GroupName = "default", Concurrent = false)] +[PeriodSeconds(60, TriggerId = "trigger_reported_data", Description = "上报数据", RunOnStart = true)] +public class ReportedDataJob : IJob +{ + private readonly IServiceScopeFactory _scopeFactory; + private readonly ILogger _logger; + + public ReportedDataJob(IServiceScopeFactory scopeFactory, ILoggerFactory loggerFactory) + { + _scopeFactory = scopeFactory; + _logger = loggerFactory.CreateLogger(nameof(ReportedDataJob)); + } + + public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) + { + string msg = $"【{DateTime.Now}】数据上报成功"; + + // 自定义日志 + _logger.LogInformation(msg); + + await Task.CompletedTask; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/MTNet.Application.csproj b/Admin.NET/MTNet.Application/MTNet.Application.csproj new file mode 100644 index 0000000000000000000000000000000000000000..a750daa718354f97884af0a8cb1bebad1cf0719c --- /dev/null +++ b/Admin.NET/MTNet.Application/MTNet.Application.csproj @@ -0,0 +1,124 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + + + + + + + + + diff --git a/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs b/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs new file mode 100644 index 0000000000000000000000000000000000000000..7a4761e35b34b61fa172eb53e51b6f9c7996d502 --- /dev/null +++ b/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs @@ -0,0 +1,28 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace MTNet.Application; + +/// +/// 示例开放接口 +/// +[ApiDescriptionSettings("开放接口", Name = "Demo", Order = 100)] +[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class DemoOpenApi : IDynamicApiController +{ + private readonly UserManager _userManager; + + public DemoOpenApi(UserManager userManager) + { + _userManager = userManager; + } + + [HttpGet("helloWord")] + public Task HelloWord() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs new file mode 100644 index 0000000000000000000000000000000000000000..aaf08ab5701588588b2afa982119f3a34bfc3ec8 --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs @@ -0,0 +1,48 @@ +using MTNet.Application.Entity; +using MTNet.Application.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 小区表种子数据 +/// +public class CellSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + new Cell { DeviceId = 1300000000002, Name = "9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-13", NodeBId = 9494, CellId = 13, PCI = 13, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-3", NodeBId = 9494, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-4", NodeBId = 9494, CellId = 4, PCI = 4, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9090-3", NodeBId = 9090, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9090-7", NodeBId = 9090, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-5", NodeBId = 9191, CellId = 5, PCI = 5, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-7", NodeBId = 9191, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-10", NodeBId = 9191, CellId = 10, PCI = 10, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-15", NodeBId = 9191, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-7", NodeBId = 96, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-8", NodeBId = 96, CellId = 8, PCI = 8, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-9", NodeBId = 96, CellId = 9, PCI = 9, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "141-181", NodeBId = 141, CellId = 181, PCI = 181, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "520001-12", NodeBId = 520001, CellId = 12, PCI = 12, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "520001-92", NodeBId = 520001, CellId = 92, PCI = 92, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000003, Name = "50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000004, Name = "50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000003, Name = "50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000004, Name = "50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs new file mode 100644 index 0000000000000000000000000000000000000000..ceacbb0c8018ac3ffe883c5eb65b7598594fc714 --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs @@ -0,0 +1,122 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using MTNet.Application.Entity; + +namespace MTNet.Application; + +/// +/// 系统应用表种子数据 +/// +public class DeviceSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + //基站 + new DeviceAddrConfig { Name = "ZTE", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.ZTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + 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 = 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") }, + + //信道仿真器 + new DeviceAddrConfig { Name = "F64", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Keyseight_F64, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Vertex", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Spirent_Vertex, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VCE", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////综合测试仪 + //new DeviceAddrConfig { Name = "MT8000A", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.MT8000A_NR, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VCT", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////网络分析仪 + //new DeviceAddrConfig { Name = "E5071C", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.E5071C, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VNA", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////信号源 + //new DeviceAddrConfig { Name = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.ZSA_S6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VSG", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////特殊设备 + //new DeviceAddrConfig { Name = "VSE", DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////频谱分析仪 + //new DeviceAddrConfig { Name = "N9040B", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.N9040B, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "FSW", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.FSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.ZSA_F6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //无线路测仪 + new DeviceAddrConfig { Name = "Spark", DeviceTypeConfig = DeviceTypeEnum.RoadMeasuring, DeviceModelConfig = (int)RoadMeasuringTypeEnum.Spark, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 30999, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VRM", DeviceTypeConfig = DeviceTypeEnum.RoadMeasuring, DeviceModelConfig = (int)RoadMeasuringTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////功率测试仪 + //new DeviceAddrConfig { Name = "UDP3305S", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.UDP3305S, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VPC", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////网络损伤仪 + //new DeviceAddrConfig { Name = "Spirent", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Spirent, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VND", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////干扰发生器 + //new DeviceAddrConfig { Name = "VIG", DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //转台 + new DeviceAddrConfig { Name = "HBTE252", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE253", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE254", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HansRobot", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HansRobot, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Maturo", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Maturo, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VTT", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////扫描架 + //new DeviceAddrConfig { Name = "VSC", DeviceTypeConfig = DeviceTypeEnum.Scanner, DeviceModelConfig = (int)ScannerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////开关箱 + //new DeviceAddrConfig { Name = "VSB", DeviceTypeConfig = DeviceTypeEnum.SwitchBox, DeviceModelConfig = (int)SwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////高速开关箱 + //new DeviceAddrConfig { Name = "VHS", DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //移相器 + new DeviceAddrConfig { Name = "HBTE", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSG", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //程控矩阵 + new DeviceAddrConfig { Name = "PA130", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA131", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA132", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA133", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA134", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA135", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA136", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA137", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA245", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA246", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA247", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA248", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA249", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA250", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.250", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VPA", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //终端 + new DeviceAddrConfig { Name = "Android", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Android, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Tbox", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Tbox, CommunicationTypeConfig = CommunicationTypeEnum.SSH, AddrConfig = "192.168.1.100", PortConfig = 22, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VUE", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + ////终端模拟器 + //new DeviceAddrConfig { Name = "DoToutch", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.DoToutch, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "E500", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.E500, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //new DeviceAddrConfig { Name = "VUM", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd8ed15fb908bc0a5d192dedfd9eb97807b869be --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs @@ -0,0 +1,121 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.SeedData; + +/// +/// 程控映射表种子数据 +/// +public class PAMappingSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + //屏蔽房2 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-13 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9292-17 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-7 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 7, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 21, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 10, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 21, OutputPort = 2, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-5 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-15 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-7 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 7, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -75, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-8 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 8, ShieldRoom = "2", Address = "192.168.1.247", InputPort = 8, OutputPort = 2, InitialPower = -74, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-9 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 9, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //141-181 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 3, OutputPort = 2, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 3, OutputPort = 2, InitialPower = -70, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //屏蔽房3 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //屏蔽房6 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-13 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9292-17 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-3 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-4 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9090-3 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9090-7 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //520001-12 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //520009-92 + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.130", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.131", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.132", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.133", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs new file mode 100644 index 0000000000000000000000000000000000000000..074a259a5fe67f14e5fa8b248fda6083a578898b --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -0,0 +1,211 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 基站接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "BaseStation", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class BaseStationService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _deviceRep; + private readonly SqlSugarRepository _cellRep; + private readonly UserManager _userManager; + + public BaseStationService(SqlSugarRepository deviceRep, SqlSugarRepository cellRep, UserManager userManager) + { + _deviceRep = deviceRep; + _cellRep = cellRep; + _userManager = userManager; + } + + /// + /// 查询小区列表 🔖 + /// + /// + [DisplayName("查询小区列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _cellRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询小区列表 🔖 + /// + /// + /// + [DisplayName("查询小区列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _cellRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.Name.Contains(keyword) + || u.NodeBId.ToString().Contains(keyword) + || u.CellId.ToString().Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 获取小区树列表 🔖 + /// + /// + [DisplayName("获取小区树列表")] + [ApiDescriptionSettings(Name = "GetTreeList"), HttpPost] + public async Task> GetTreeList() + { + List treeList = new List(); + var bsList = await _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).ToListAsync(); + if (bsList?.Any() == true) + { + var cellList = await _cellRep.AsQueryable().ToListAsync(); + foreach (var bs in bsList) + { + var children = cellList?.Where(x => x.DeviceId == bs.Id).ToList(); + if (children?.Any() == true) + { + treeList.Add(new CellTree { Name = bs.Name, Children = children }); + } + } + } + return treeList; + } + + /// + /// 获取指定基站的小区树列表 🔖 + /// + /// + [DisplayName("获取指定基站的小区树列表")] + [ApiDescriptionSettings(Name = "GetTreeListById"), HttpPost] + public async Task> GetTreeListById(List deviceIdList) + { + List treeList = new List(); + + List list = deviceIdList + .Where(item => item.HasValue) // 过滤掉null (即没有值的项) + .Select(item => item.Value) // 将每个可空long转换为非空long + .ToList(); + + if (list?.Any() != true) + return treeList; + + var bsList = await _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).WhereIF(list?.Any() == true, x => list.Contains(x.Id)).ToListAsync(); + if (bsList?.Any() == true) + { + var cellList = await _cellRep.AsQueryable().ToListAsync(); + foreach (var bs in bsList) + { + var children = cellList?.Where(x => x.DeviceId == bs.Id).ToList(); + if (children?.Any() == true) + { + treeList.Add(new CellTree { Name = bs.Name, Children = children }); + } + } + } + return treeList; + } + + /// + /// 分页查询小区 🔖 + /// + /// + /// + [DisplayName("分页查询小区")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(CellInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _cellRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.NodeBId.ToString().Contains(input.Keyword) + || u.CellId.ToString().Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + if (input?.DeviceId != null) + { + query = query.Where(x => (int)x.DeviceId == input.DeviceId); + } + if (input?.NodeBId != null && input?.CellId != null) + { + query = query.Where(x => x.NodeBId == input.NodeBId && x.CellId == input.CellId); + } + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加小区 🔖 + /// + /// + /// + [DisplayName("增加小区")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(Cell input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _cellRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新小区 🔖 + /// + /// + /// + [DisplayName("更新小区")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateCellInput input) + { + _ = await _cellRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _cellRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除小区 🔖 + /// + /// + /// + [DisplayName("删除小区")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _cellRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _cellRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs new file mode 100644 index 0000000000000000000000000000000000000000..8af741d0a9d054ef6e68e3fb5e387bbeada06913 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -0,0 +1,179 @@ +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Device", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class DeviceService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _deviceRep; + private readonly SysEnumService _enumService; + private readonly UserManager _userManager; + + public DeviceService(SqlSugarRepository deviceRep, SysEnumService enumService, UserManager userManager) + { + _deviceRep = deviceRep; + _enumService = enumService; + _userManager = userManager; + } + + /// + /// 查询设备列表 🔖 + /// + /// + [DisplayName("查询设备列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _deviceRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询设备列表 🔖 + /// + /// + /// + [DisplayName("查询设备列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _deviceRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.Name.Contains(keyword) + || u.DeviceTypeConfig.ToString().Contains(keyword) + || u.AddrConfig.Contains(keyword) + || u.UserName.Contains(keyword) + || u.Password.Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 获取设备树列表 🔖 + /// + /// + [DisplayName("获取设备树列表")] + [ApiDescriptionSettings(Name = "GetTreeList"), HttpPost] + public async Task> GetTreeList() + { + List treeList = new List(); + + var deviceTypeList = _enumService.GetEnumDataList(new EnumInput() { EnumName = nameof(DeviceTypeEnum) }); + var deviceList = await _deviceRep.AsQueryable().ToListAsync(); + if (deviceTypeList?.Any() == true) + { + foreach (var type in deviceTypeList) + { + var children = deviceList?.Where(x => (int)x.DeviceTypeConfig == type.Value).ToList(); + if (children?.Any() == true) + { + treeList.Add(new DeviceTree { Name = type.Describe, Children = children }); + } + } + } + return treeList; + } + + /// + /// 分页查询设备 🔖 + /// + /// + /// + [DisplayName("分页查询设备")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(DeviceInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _deviceRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.DeviceTypeConfig.ToString().Contains(input.Keyword) + || u.AddrConfig.Contains(input.Keyword) + || u.UserName.Contains(input.Keyword) + || u.Password.Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + if (input.Value != null) + { + query = query.Where(x => (int)x.DeviceTypeConfig == input.Value); + } + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加设备 🔖 + /// + /// + /// + [DisplayName("增加设备")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddDeviceInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _deviceRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新设备 🔖 + /// + /// + /// + [DisplayName("更新设备")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateDeviceInput input) + { + _ = await _deviceRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _deviceRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除设备 🔖 + /// + /// + /// + [DisplayName("删除设备")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _deviceRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _deviceRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..9edef8d6d7b1cb29eb4d3eb001d3186bc3de77e4 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs @@ -0,0 +1,163 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class CellInput : BasePageInput +{ + /// + /// 基站配置参数ID + /// + public long? DeviceId { get; set; } + + /// + /// 基站ID + /// + public int? NodeBId { get; set; } + + /// + /// 小区ID + /// + public int? CellId { get; set; } +} + +public class AddCellInput +{ + /// + /// 基站配置参数ID + /// + public long DeviceId { get; set; } + + /// + /// 小区名称 + /// + public string? Name { get; set; } + + /// + /// 基站ID + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + public int CellId { get; set; } + + /// + /// PCI + /// + public int PCI { get; set; } + + /// + /// 小区状态 + /// + public int Status { get; set; } + + /// + /// 网络类型 + /// + public NetworkTypeEnum NetworkType { get; set; } + + /// + /// 厂家类型 + /// + 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 +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..bb1a099a090882e355be570946ac02c27dc0d234 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs @@ -0,0 +1,28 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class CellOutput +{ +} + +/// +/// 小区树形图实体 +/// +public class CellTree +{ + /// + /// 设备名称 + /// + public string Name { get; set; } + + /// + /// 小区集合 + /// + public List Children { get; set; } = new List(); +} diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f289b54baa3d04c1f2152bb920a016ca5acc76c --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class DeviceInput : BasePageInput +{ + /// + /// 设备类型 + /// + public int? Value { get; set; } +} + +public class AddDeviceInput +{ + [Required(ErrorMessage = "设备名称不能为空")] + public string DeviceNameConfig { get; set; } = ""; + + [Required(ErrorMessage = "设备类型不能为空")] + public virtual DeviceTypeEnum DeviceTypeConfig { get; set; } = DeviceTypeEnum.BaseStationTester; + + [Required(ErrorMessage = "设备型号不能为空")] + public int DeviceModelConfig { get; set; } = 0; + + [Required(ErrorMessage = "通讯方式不能为空")] + public CommunicationTypeEnum CommunicationTypeConfig { get; set; } = CommunicationTypeEnum.Socket; + + [Required(ErrorMessage = "IP地址不能为空")] + public string AddrConfig { get; set; } = ""; + + [Required(ErrorMessage = "端口号不能为空")] + public int PortConfig { get; set; } = 0; + + public string? UserName { get; set; } = ""; + + public string? Password { get; set; } = ""; + + public string? AdminUserName { get; set; } = ""; + + public string? AdminPassword { get; set; } = ""; + + public string? RealAddrConfig { get; set; } = ""; + + public bool UseVisaProgrammerConfig { get; set; } = false; + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} + +public class UpdateDeviceInput : AddDeviceInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..e1c3a9b7ab683073ab10b1ce81b25c3b371b3566 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs @@ -0,0 +1,28 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class DeviceOutput +{ +} + +/// +/// 设备树形图实体 +/// +public class DeviceTree +{ + /// + /// 设备类型 + /// + public string Name { get; set; } + + /// + /// 设备集合 + /// + public List Children { get; set; } = new List(); +} diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d6fc274ed32bd95c483b95cec8a18c57b5bfb6c --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class PAMappingInput : BasePageInput +{ + /// + /// 屏蔽房 + /// + public string? ShieldRoom { get; set; } + + /// + /// 基站ID + /// + public int? NodeBId { get; set; } + + /// + /// 小区ID + /// + public int? CellId { get; set; } +} + +public class AddPAMappingInput +{ + /// + /// 基站厂家 + /// + public string? BaseStationFactory { get; set; } = ""; + + /// + /// AAU频段 + /// + public string? AAUFrequencyBand { get; set; } = ""; + + /// + /// AAU频段编号 + /// + public string? AAUFrequencyBandId { get; set; } = ""; + + /// + /// 基站ID + /// + [Required(ErrorMessage = "基站ID不能为空")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [Required(ErrorMessage = "小区ID不能为空")] + public int CellId { get; set; } + + /// + /// 屏蔽房 + /// + [Required(ErrorMessage = "屏蔽房不能为空")] + public string ShieldRoom { get; set; } = ""; + + /// + /// 程控IP + /// + [Required(ErrorMessage = "程控IP不能为空")] + public string Address { get; set; } = ""; + + /// + /// 输入端口 + /// + [Required(ErrorMessage = "输入端口不能为空")] + public int InputPort { get; set; } + + /// + /// 输出端口 + /// + [Required(ErrorMessage = "输出端口不能为空")] + public int OutputPort { get; set; } + + /// + /// 初始功率 + /// + [Required(ErrorMessage = "初始功率不能为空")] + public double InitialPower { get; set; } +} + +public class UpdatePAMappingInput : AddPAMappingInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs new file mode 100644 index 0000000000000000000000000000000000000000..5ae4bbe93c53712a4ca27333b892eb6a2d9acf30 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs @@ -0,0 +1,166 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinGetCurrentAutoReplyInfoResponse.Types.KeywordAutoReplyRule.Types; + +namespace MTNet.Application.Service; + +/// +/// 程控映射表接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Mapping", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class PAMappingService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _mappingRep; + private readonly UserManager _userManager; + + public PAMappingService(SqlSugarRepository mappingRep, UserManager userManager) + { + _mappingRep = mappingRep; + _userManager = userManager; + } + + /// + /// 查询映射列表 🔖 + /// + /// + [DisplayName("查询映射列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _mappingRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询映射列表 🔖 + /// + /// + /// + [DisplayName("查询映射列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _mappingRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.BaseStationFactory.Contains(keyword) + || u.AAUFrequencyBand.Contains(keyword) + || u.AAUFrequencyBandId.Contains(keyword) + || u.NodeBId.ToString().Contains(keyword) + || u.CellId.ToString().Contains(keyword) + || u.ShieldRoom.Contains(keyword) + || u.Address.Contains(keyword) + || u.InputPort.ToString().Contains(keyword) + || u.OutputPort.ToString().Contains(keyword) + || u.InitialPower.ToString().Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 分页查询设备 🔖 + /// + /// + /// + [DisplayName("分页查询设备")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(PAMappingInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _mappingRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.BaseStationFactory.Contains(input.Keyword) + || u.AAUFrequencyBand.Contains(input.Keyword) + || u.AAUFrequencyBandId.Contains(input.Keyword) + || u.NodeBId.ToString().Contains(input.Keyword) + || u.CellId.ToString().Contains(input.Keyword) + || u.ShieldRoom.Contains(input.Keyword) + || u.Address.Contains(input.Keyword) + || u.InputPort.ToString().Contains(input.Keyword) + || u.OutputPort.ToString().Contains(input.Keyword) + || u.InitialPower.ToString().Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + + if (!string.IsNullOrEmpty(input?.ShieldRoom)) + { + query = query.Where(x => x.ShieldRoom == input.ShieldRoom); + } + if (input?.NodeBId != null && input?.CellId != null) + { + query = query.Where(x => x.NodeBId == input.NodeBId && x.CellId == input.CellId); + } + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加映射数据 🔖 + /// + /// + /// + [DisplayName("增加映射数据")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddPAMappingInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _mappingRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新映射数据 🔖 + /// + /// + /// + [DisplayName("更新映射数据")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdatePAMappingInput input) + { + _ = await _mappingRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _mappingRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除映射数据 🔖 + /// + /// + /// + [DisplayName("删除映射数据")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _mappingRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _mappingRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Report/ReportService.cs b/Admin.NET/MTNet.Application/Service/Report/ReportService.cs new file mode 100644 index 0000000000000000000000000000000000000000..edf0015deae11b611459d416ea02bb4fd2dc0838 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Report/ReportService.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 报表接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Report", Order = 100)] +//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class ReportService : IDynamicApiController +{ + private readonly UserManager _userManager; + + public ReportService(UserManager userManager) + { + _userManager = userManager; + } + + [ApiDescriptionSettings(Name = "page"), HttpGet] + [DisplayName("获取报表列表")] + public Task GetReportList() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs b/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e24b98c990c543643566646189cff90f553fedf --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class SettingInput +{ +} diff --git a/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs b/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs new file mode 100644 index 0000000000000000000000000000000000000000..16ff08c9eb521a2742fcebdc1a0649f5c3dcb175 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs @@ -0,0 +1,998 @@ +using AngleSharp.Dom; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 系统设置接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Setting", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class SettingService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _templateRep; + private readonly SqlSugarRepository _deviceRep; + private readonly SqlSugarRepository _cellRep; + private readonly SqlSugarRepository _bsTestCaseSettingRep; + private readonly SqlSugarRepository _ueTestCaseSettingRep; + private readonly SqlSugarRepository _peakRateTestCaseSettingRep; + private readonly SqlSugarRepository _userDefineTestCaseSettingRep; + private readonly SqlSugarRepository _cellParametersRep; + private readonly SqlSugarRepository _axisParametersRep; + private readonly SqlSugarRepository _ceParametersRep; + private readonly SqlSugarRepository _rmParametersRep; + private readonly SqlSugarRepository _ttParametersRep; + private readonly SqlSugarRepository _psParametersRep; + private readonly SqlSugarRepository _paParametersRep; + private readonly SqlSugarRepository _ueParametersRep; + private readonly UserManager _userManager; + + public SettingService(SqlSugarRepository templateRep, + SqlSugarRepository deviceRep, + SqlSugarRepository cellRep, + SqlSugarRepository bsTestCaseSetingRep, + SqlSugarRepository ueTestCaseSetingRep, + SqlSugarRepository peakRateTestCaseSettingRep, + SqlSugarRepository userDefineTestCaseSettingRep, + SqlSugarRepository cellParametersRep, + SqlSugarRepository axisParametersRep, + SqlSugarRepository ceParametersRep, + SqlSugarRepository rmParametersRep, + SqlSugarRepository ttParametersRep, + SqlSugarRepository psParametersRep, + SqlSugarRepository paParametersRep, + SqlSugarRepository ueParametersRep, + UserManager userManager) + { + _templateRep = templateRep; + _deviceRep = deviceRep; + _cellRep = cellRep; + _bsTestCaseSettingRep = bsTestCaseSetingRep; + _ueTestCaseSettingRep = ueTestCaseSetingRep; + _peakRateTestCaseSettingRep = peakRateTestCaseSettingRep; + _userDefineTestCaseSettingRep = userDefineTestCaseSettingRep; + _cellParametersRep = cellParametersRep; + _axisParametersRep = axisParametersRep; + _ceParametersRep = ceParametersRep; + _rmParametersRep = rmParametersRep; + _ttParametersRep = ttParametersRep; + _psParametersRep = psParametersRep; + _paParametersRep = paParametersRep; + _ueParametersRep = ueParametersRep; + _userManager = userManager; + } + + /// + /// 获取测试参数 + /// + /// + /// + [NonAction] + public async Task GetTestSettingByTemplateId(long templateId) + { + object setting = new object(); + var template = await _templateRep.GetFirstAsync(u => u.Id == templateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + switch (template.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + setting = await _bsTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + setting = await _ueTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + setting = await _peakRateTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + setting = await _userDefineTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + default: + break; + } + return setting; + } + + /// + /// 获取测试参数 + /// + /// + /// + [NonAction] + public async Task GetTestSetting(long templateId) + { + TestSetting setting = null; + var template = await _templateRep.GetFirstAsync(u => u.Id == templateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + switch (template.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + setting = await _bsTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + setting = await _ueTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + setting = await _peakRateTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + setting = await _userDefineTestCaseSettingRep.GetFirstAsync(u => u.TemplateId == templateId); + } + break; + default: + break; + } + return setting; + } + + /// + /// 获取测试参数详情 + /// + /// + /// + [NonAction] + public async Task GetTestSettingDetailByTemplateId(long templateId) + { + var template = await _templateRep.GetFirstAsync(u => u.Id == templateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + string name = string.Empty; + switch (template.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + name = nameof(BSTestCaseSettings); + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + name = nameof(UETestCaseSettings); + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + name = nameof(PeakRateTestCaseSettings); + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + name = nameof(UserDefineTestCaseSettings); + } + break; + default: + break; + } + + var info = new ParametersInfo(); + if (string.IsNullOrWhiteSpace(name))//没有参数定义的设备直接返回空实体 + { + return info; + } + + var items = GetParametersItems(name); + info = new ParametersInfo { Label = "Test Case Parameters", Name = template.TestType.GetDescription(), Items = items }; + return info; + } + + /// + /// 添加测试参数 + /// + /// + /// + [NonAction] + public async Task AddTestSetting(TestTemplate template) + { + long id = 0; + switch (template.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + var setting = new BSTestCaseSettings() { TemplateId = template.Id }; + id = await _bsTestCaseSettingRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + var setting = new UETestCaseSettings() { TemplateId = template.Id }; + id = await _ueTestCaseSettingRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + var setting = new PeakRateTestCaseSettings() { TemplateId = template.Id }; + id = await _peakRateTestCaseSettingRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + var setting = new UserDefineTestCaseSettings() { TemplateId = template.Id }; + id = await _userDefineTestCaseSettingRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + default: + break; + } + return id; + } + + /// + /// 更新测试参数 + /// + /// + /// + [NonAction] + public async Task UpdateTestSetting(UpdateTestCaseTemplateInput input) + { + _ = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + bool bFlag = false; + switch (input.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + var setting = input.TestConfig.ToString().JsonToEntity(); + bFlag = await _bsTestCaseSettingRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + var setting = input.TestConfig.ToString().JsonToEntity(); + bFlag = await _ueTestCaseSettingRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + var setting = input.TestConfig.ToString().JsonToEntity(); + bFlag = await _peakRateTestCaseSettingRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + var setting = input.TestConfig.ToString().JsonToEntity(); + bFlag = await _userDefineTestCaseSettingRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + default: + break; + } + return bFlag; + } + + /// + /// 删除测试参数 + /// + /// + /// + [NonAction] + public async Task DeleteTestSettingByTemplateId(long templateId) + { + var bsList = await _bsTestCaseSettingRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (bsList?.Any() == true) + await _bsTestCaseSettingRep.DeleteAsync(bsList); + + var ueList = await _ueTestCaseSettingRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (ueList?.Any() == true) + await _ueTestCaseSettingRep.DeleteAsync(ueList); + + var peakRateList = await _peakRateTestCaseSettingRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (peakRateList?.Any() == true) + await _peakRateTestCaseSettingRep.DeleteAsync(peakRateList); + + var userDefineList = await _userDefineTestCaseSettingRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (userDefineList?.Any() == true) + await _userDefineTestCaseSettingRep.DeleteAsync(userDefineList); + } + + /// + /// 获取设备参数 + /// + /// + /// + /// + [NonAction] + public async Task GetDeviceSettingByTemplateId(TestDevice device) + { + var entity = await _deviceRep.GetFirstAsync(u => u.Id == device.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + object setting = new object(); + switch (entity.DeviceTypeConfig) + { + case DeviceTypeEnum.ChannelEmulator: + { + setting = await _ceParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + var rm = await _rmParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + if (rm != null) + rm.UEList = await _ueParametersRep.AsQueryable().Where(x => x.ParentId == rm.Id).ToListAsync(); + setting = rm; + } + break; + case DeviceTypeEnum.Turntable: + { + var tt = await _ttParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + if (tt != null) + tt.AxisList = await _axisParametersRep.AsQueryable().Where(x => x.ParentId == tt.Id).ToListAsync(); + setting = tt; + } + break; + case DeviceTypeEnum.PhaseShifter: + { + setting = await _psParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + setting = await _paParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.UserEquipment: + { + setting = await _ueParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + default: + break; + } + return setting; + } + + /// + /// 获取原始设备参数 + /// + /// + /// + /// + [NonAction] + public async Task GetDeviceSetting(TestDevice device) + { + var entity = await _deviceRep.GetFirstAsync(u => u.Id == device.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + DeviceSettings setting = null; + switch (entity.DeviceTypeConfig) + { + case DeviceTypeEnum.ChannelEmulator: + { + setting = await _ceParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + var rm = await _rmParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + rm.UEList = await _ueParametersRep.AsQueryable().Where(x => x.ParentId == rm.Id).ToListAsync(); + setting = rm; + } + break; + case DeviceTypeEnum.Turntable: + { + var tt = await _ttParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + tt.AxisList = await _axisParametersRep.AsQueryable().Where(x => x.ParentId == tt.Id).ToListAsync(); + setting = tt; + } + break; + case DeviceTypeEnum.PhaseShifter: + { + setting = await _psParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + setting = await _paParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + case DeviceTypeEnum.UserEquipment: + { + setting = await _ueParametersRep.GetFirstAsync(u => u.TemplateId == device.TemplateId && u.DeviceId == entity.Id); + } + break; + default: + break; + } + return setting; + } + + /// + /// 获取设备参数详情 + /// + /// + /// + [NonAction] + public async Task GetDeviceSettingDetailByDeviceId(long deviceId) + { + var device = await _deviceRep.GetFirstAsync(u => u.Id == deviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + string name = string.Empty; + switch (device.DeviceTypeConfig) + { + case DeviceTypeEnum.ChannelEmulator: + { + name = nameof(CEParameters); + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + name = nameof(RMParameters); + } + break; + case DeviceTypeEnum.Turntable: + { + name = nameof(TTParameters); + } + break; + case DeviceTypeEnum.PhaseShifter: + { + name = nameof(PSParameters); + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + name = nameof(PAParameters); + } + break; + case DeviceTypeEnum.UserEquipment: + { + name = nameof(UEParameters); + } + break; + default: + break; + } + + var info = new ParametersInfo(); + if (string.IsNullOrWhiteSpace(name))//没有参数定义的设备直接返回空实体 + { + return info; + } + + var items = GetParametersItems(name); + info = new ParametersInfo { Label = $"{device.Name} Parameters", Name = device.DeviceTypeConfig.GetDescription(), Items = items }; + return info; + } + + /// + /// 添加设备参数 + /// + /// + /// + [NonAction] + public async Task AddDeviceSetting(TestDevice device) + { + var entity = await _deviceRep.GetFirstAsync(u => u.Id == device.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + long id = 0; + switch (entity.DeviceTypeConfig) + { + case DeviceTypeEnum.ChannelEmulator: + { + //可以根据device model属性二次细分 + var setting = new CEParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _ceParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + var setting = new RMParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _rmParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case DeviceTypeEnum.Turntable: + { + var setting = new TTParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _ttParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case DeviceTypeEnum.PhaseShifter: + { + var setting = new PSParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _psParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + var setting = new PAParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _paParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + case DeviceTypeEnum.UserEquipment: + { + var setting = new UEParameters() { TemplateId = device.TemplateId, DeviceId = entity.Id }; + id = await _ueParametersRep.InsertAsync(setting) ? setting.Id : 0; + } + break; + default: + break; + } + return id; + } + + /// + /// 更新设备参数 🔖 + /// + /// + /// + [NonAction] + public async Task UpdateDeviceSetting(UpdateTestDeviceInput input) + { + var device = await _deviceRep.GetFirstAsync(u => u.Id == input.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + bool bFlag = false; + switch (device.DeviceTypeConfig) + { + case DeviceTypeEnum.ChannelEmulator: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _ceParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _rmParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + + var query = await _ueParametersRep.AsQueryable().Where(x => x.ParentId == setting.Id).ToListAsync(); + if (query.Safe().Any()) + { + await _ueParametersRep.DeleteAsync(query); + } + + if (setting.UEList.Safe().Any()) + { + setting.UEList.ForEach(x => + { + x.ParentId = setting.Id; + x.TemplateId = setting.TemplateId; + x.DeviceId = setting.DeviceId; + }); + await _ueParametersRep.InsertRangeAsync(setting.UEList); + } + } + break; + case DeviceTypeEnum.Turntable: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _ttParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + + var query = await _axisParametersRep.AsQueryable().Where(x => x.ParentId == setting.Id).ToListAsync(); + if (query.Safe().Any()) + { + await _axisParametersRep.DeleteAsync(query); + } + + if (setting.AxisList.Safe().Any()) + { + setting.AxisList.ForEach(x => + { + x.ParentId = setting.Id; + x.TemplateId = setting.TemplateId; + x.DeviceId = setting.DeviceId; + }); + await _axisParametersRep.InsertRangeAsync(setting.AxisList); + } + } + break; + case DeviceTypeEnum.PhaseShifter: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _psParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _paParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + case DeviceTypeEnum.UserEquipment: + { + var setting = input.Parameter.ToString().JsonToEntity(); + bFlag = await _ueParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + } + break; + default: + break; + } + return bFlag; + } + + /// + /// 删除设备参数 + /// + /// + /// + [NonAction] + public async Task DeleteDeviceSettingByTemplateId(long templateId) + { + var ceList = await _ceParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (ceList.Safe().Any()) + await _ceParametersRep.DeleteAsync(ceList); + + var rmList = await _rmParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (rmList.Safe().Any()) + await _rmParametersRep.DeleteAsync(rmList); + + var ttList = await _ttParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (ttList.Safe().Any()) + await _ttParametersRep.DeleteAsync(ttList); + + var psList = await _psParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (psList.Safe().Any()) + await _psParametersRep.DeleteAsync(psList); + + var paList = await _paParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (paList.Safe().Any()) + await _paParametersRep.DeleteAsync(paList); + + var ueList = await _ueParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (ueList.Safe().Any()) + await _ueParametersRep.DeleteAsync(ueList); + } + + /// + /// 获取小区参数 + /// + /// + /// + /// + [NonAction] + public async Task GetCellSettingByTemplateId(TestCell cell) + { + var entity = await _cellParametersRep.GetFirstAsync(u => u.TemplateId == cell.TemplateId && u.NodeBId == cell.NodeBId && u.CellId == cell.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + object setting = await _cellParametersRep.GetFirstAsync(u => u.TemplateId == cell.TemplateId && u.NodeBId == cell.NodeBId && u.CellId == cell.CellId); + return setting; + } + + /// + /// 获取原始小区参数 + /// + /// + /// + /// + [NonAction] + public async Task GetCellSetting(TestCell cell) + { + var entity = await _cellParametersRep.GetFirstAsync(u => u.TemplateId == cell.TemplateId && u.NodeBId == cell.NodeBId && u.CellId == cell.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var setting = await _cellParametersRep.GetFirstAsync(u => u.TemplateId == cell.TemplateId && u.NodeBId == cell.NodeBId && u.CellId == cell.CellId); + return setting; + } + + /// + /// 获取小区参数详情 + /// + /// + /// + [NonAction] + public async Task GetCellSettingDetailByDeviceId(TestCell cell) + { + var entity = await _cellRep.GetFirstAsync(u => u.NodeBId == cell.NodeBId && u.CellId == cell.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var items = GetParametersItems(nameof(CellParameters)); + var info = new ParametersInfo { Label = $"{entity.Name} Parameters", Name = entity.Name, Items = items }; + return info; + } + + /// + /// 添加小区参数 + /// + /// + /// + [NonAction] + public async Task AddCellSetting(TestCell cell) + { + var entity = await _cellRep.GetFirstAsync(u => u.NodeBId == cell.NodeBId && u.CellId == cell.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var setting = new CellParameters() { TemplateId = cell.TemplateId, NodeBId = cell.NodeBId, CellId = cell.CellId }; + long id = await _cellParametersRep.InsertAsync(setting) ? setting.Id : 0; + return id; + } + + /// + /// 更新小区参数 🔖 + /// + /// + /// + [NonAction] + public async Task UpdateCellSetting(UpdateTestCellInput input) + { + var entity = await _cellParametersRep.GetFirstAsync(u => u.TemplateId == input.TemplateId && u.NodeBId == input.NodeBId && u.CellId == input.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var setting = input.Parameter.ToString().JsonToEntity(); + bool bFlag = await _cellParametersRep.AsUpdateable(setting).ExecuteCommandAsync() > 0; + return bFlag; + } + + /// + /// 删除小区参数 + /// + /// + /// + [NonAction] + public async Task DeleteCellSettingByTemplateId(long templateId) + { + var cellList = await _cellParametersRep.AsQueryable().Where(u => u.TemplateId == templateId).ToListAsync(); + if (cellList?.Any() == true) + await _cellParametersRep.DeleteAsync(cellList); + } + + /// + /// 获取指定类型对象的属性参数 + /// + /// + /// + [NonAction] + private List GetParametersItems(string typeName) + { + var items = new List(); + try + { + Assembly assembly = Assembly.Load("MTNet.Application"); + Type[] types = assembly.GetTypes();// 获取程序集中所有公共类型 + var type = types.Where(x => x.Name.EndsWith(typeName)).ToArray().First();//过滤出所有测试例配置 + + if (!type.IsAbstract && !type.IsInterface) // 确保类型不是抽象或接口 + { + object instance = Activator.CreateInstance(type); // 创建类型实例 + + PropertyDescriptorCollection props = TypeDescriptor.GetProperties(instance); + for (int i = 0; i < props.Count; i++) + { + //int order = props[i].Attributes[typeof(PropertyOrderAttribute)] != null ? ((PropertyOrderAttribute)props[i].Attributes[typeof(PropertyOrderAttribute)]).Order : -999; + var item = new ParameterInfoItem + { + Id = props[i].Attributes[typeof(PropertyOrderAttribute)] != null ? ((PropertyOrderAttribute)props[i].Attributes[typeof(PropertyOrderAttribute)]).Order : i, + Name = props[i].Name.ToCustomCamelCase(), + Label = props[i].DisplayName, + Description = props[i].Description, + Type = props[i].PropertyType.IsEnum ? typeof(Enum).ToString() : props[i].PropertyType.ToString(), + Category = props[i].Category, + DefaultValue = props[i].GetValue(instance), + IsBrowsable = props[i].IsBrowsable, + IsReadOnly = props[i].IsReadOnly, + IsPath = props[i].Attributes[typeof(IsPathAttribute)] != null ? ((IsPathAttribute)props[i].Attributes[typeof(IsPathAttribute)]).IsPath : false, + IsList = props[i].IsCollectionOrEnumerable(), + Other = props[i].PropertyType.IsEnum ? props[i].PropertyType.GetFields(BindingFlags.Static | BindingFlags.Public).Select(x => x.Name) : null + }; + + if (item.IsList) + { + Type itemType = props[i].GetCollectionItemType(); + if (itemType != null) + { + item.Other = GetParametersItems(itemType.Name); + } + } + + items.Add(item); + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + return items; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesInput.cs b/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..c01e94970c77930e51adee536fd0ad9a58a4f76a --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesInput.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class TestSeriesInput +{ + /// + /// 模板Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 任务名称 + /// + [Required(ErrorMessage = "测试名称不能为空")] + public string Name { get; set; } = string.Empty; + + /// + /// 测试次数 + /// + [Range(1, 9999, ErrorMessage = "测试次数超过范围限制 [1-9999]")] + public int TotalNum { get; set; } = 1; + + /// + /// 开始时间 + /// + public DateTime StartTime { get; set; } + + /// + /// 结束时间 + /// + public DateTime EndTime { get; set; } +} + +public class UpdateTestSeriesInput : TestSeriesInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesOutput.cs b/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..57b2e5a3e24f36667658db47a435f77f879a048a --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Task/Dto/TestSeriesOutput.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class TestSeriesOutput : EntityBaseId +{ + /// + /// 模板Id + /// + public long TemplateId { get; set; } + + /// + /// 任务名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 测试进度 + /// + public double Progress { get; set; } + + /// + /// 测试状态 + /// + public TestStatusEnum Status { get; set; } = TestStatusEnum.NoStarted; + + /// + /// 测试次数 + /// + public int TotalNum { get; set; } = 1; + + /// + /// 开始时间 + /// + public DateTime StartTime { get; set; } + + /// + /// 结束时间 + /// + public DateTime EndTime { get; set; } +} + +public class TaskTemplateOutput : EntityBaseId +{ + /// + /// 测试类型 + /// + public TestTypeEnum TestType { get; set; } + + /// + /// 模板名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 分组名称 + /// + public string GroupName { get; set; } = string.Empty; +} diff --git a/Admin.NET/MTNet.Application/Service/Task/TaskService.cs b/Admin.NET/MTNet.Application/Service/Task/TaskService.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f988d4505d2510ff7852547a7004723a2586b06 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Task/TaskService.cs @@ -0,0 +1,230 @@ +using Furion.DatabaseAccessor; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试任务接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Task", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TaskService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _templateRep; + private readonly SqlSugarRepository _seriesRep; + private readonly UserManager _userManager; + + public TaskService(SqlSugarRepository templateRep, SqlSugarRepository seriesRep, UserManager userManager) + { + _templateRep = templateRep; + _seriesRep = seriesRep; + _userManager = userManager; + } + + /// + /// 分页查询测试模板 🔖 + /// + /// + /// + [DisplayName("分页查询测试模板")] + [ApiDescriptionSettings(Name = "TemplatePage"), HttpPost] + public async Task> TemplatePage(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _templateRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.TestType.GetDescription().Contains(input.Keyword)) + .Select() + .Mapper(u => + { + u.GroupName = u.TestType.GetCategory(); + }) + .OrderBy(u => u.Id); + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 分页查询测试任务 🔖 + /// + /// + /// + [DisplayName("分页查询测试任务")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _seriesRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword)) + .OrderBy(u => new { u.OrderNo, u.Id }) + .Select(); + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加测试任务 🔖 + /// + /// + /// + [DisplayName("增加测试任务")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(TestSeriesInput input) + { + var entity = await _templateRep.GetFirstAsync(u => u.Id == input.TemplateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var dtNow = DateTime.Now; + var series = new TestSeries() + { + TemplateId = input.TemplateId, + Name = entity.Name, + StartTime = dtNow, + EndTime = dtNow.AddDays(1) + }; + + long id = await _seriesRep.InsertAsync(series) ? entity.Id : 0; + await ResetTestSeriesOrderNo(); + return id; + } + + /// + /// 更新测试模板 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("更新测试任务")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateTestSeriesInput input) + { + _ = await _seriesRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + _ = await _templateRep.GetFirstAsync(u => u.Id == input.TemplateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + await _seriesRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除测试任务 🔖 + /// + /// + /// + [DisplayName("删除测试任务")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _seriesRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + await _seriesRep.DeleteAsync(entity); + } + + /// + /// 上移测试任务 🔖 + /// + /// + /// + [DisplayName("上移测试任务")] + [ApiDescriptionSettings(Name = "Up"), HttpPost] + public async Task Up(BaseIdInput input) + { + var list = await _seriesRep.AsQueryable() + .OrderBy(u => new { u.OrderNo, u.Id }) + .ToListAsync(); + + if (!list.Safe().Any()) + return; + + var entity = list.First(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + int index = list.IndexOf(entity); + if (index <= 0) + return; + + list.Remove(entity); + list.Insert(index - 1, entity); + + await ResetTestSeriesOrderNo(list); + } + + /// + /// 下移测试任务 🔖 + /// + /// + /// + [DisplayName("下移测试任务")] + [ApiDescriptionSettings(Name = "Down"), HttpPost] + public async Task Down(BaseIdInput input) + { + var list = await _seriesRep.AsQueryable() + .OrderBy(u => new { u.OrderNo, u.Id }) + .ToListAsync(); + + if (!list.Safe().Any()) + return; + + var entity = list.First(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + int index = list.IndexOf(entity); + if (index + 1 >= list.Count) + return; + + list.Remove(entity); + list.Insert(index + 1, entity); + + await ResetTestSeriesOrderNo(list); + } + + /// + /// 清空测试任务 🔖 + /// + /// + [DisplayName("清空测试任务")] + [ApiDescriptionSettings(Name = "Clear"), HttpPost] + public async Task Clear() + { + var list = await _seriesRep.AsQueryable().ToListAsync(); + await _seriesRep.DeleteAsync(list); + } + + /// + /// 获取测试任务列表 + /// + /// + [NonAction] + public async Task> GetList() + { + var query = await _seriesRep.AsQueryable() + .OrderBy(u => new { u.OrderNo, u.Id }) + .ToListAsync(); + + return query; + } + + /// + /// 重置排序 + /// + /// + /// + [NonAction] + public async Task ResetTestSeriesOrderNo(List list = null) + { + if (!list.Safe().Any()) + list = await _seriesRep.AsQueryable() + .OrderBy(u => new { u.OrderNo, u.Id }) + .ToListAsync(); + + if (!list.Safe().Any()) + return; + + for (int i = 0; i < list.Count; i++) + { + list[i].OrderNo = 100 + i; + } + await _seriesRep.UpdateRangeAsync(list); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..3107863501530105b8d82eadc60846061ead598b --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs @@ -0,0 +1,51 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestCaseTemplate +{ + /// + /// 测试例名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 测试例类型 + /// + public TestTypeEnum TestType { get; set; } + + /// + /// 设备集合 + /// + public List Devices { get; set; } + + /// + /// 小区集合 + /// + public List Cells { get; set; } + + /// + /// 动作集合 + /// + public List Actions { get; set; } +} + +public class UpdateTestCaseTemplateInput : AddTestCaseTemplate +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + /// + /// 测试参数 + /// + [Required(ErrorMessage = "测试参数不能为空")] + public object? TestConfig { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateOutput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..38bb2c6d3fc38b30ce737d504814325ed87a9122 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateOutput.cs @@ -0,0 +1,46 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class TemplateOutput : EntityBase +{ + /// + /// 测试例名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 测试例类型 + /// + public TestTypeEnum TestType { get; set; } + + /// + /// 设备集合 + /// + public List? Devices { get; set; } + + /// + /// 小区集合 + /// + public List? Cells { get; set; } + + /// + /// 动作集合 + /// + public List? Actions { get; set; } + + /// + /// 测试参数 + /// + public object? TestConfig { get; set; } + + /// + /// 测试参数详情 + /// + public ParametersInfo? TestConfigDetail { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestActionInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestActionInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..c178e1693bc19d565d14c3173fc815d2f4f024d6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestActionInput.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestActionInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 测试进度类型 + /// + public TestStepTypeEnum TestProcessType { get; set; } + + /// + /// 设备类型 + /// + public DeviceTypeEnum DeviceType { get; set; } + + /// + /// 动作类型 + /// + public int ActionType { get; set; } + + /// + /// 排序 + /// + public int OrderNo { get; set; } = 100; + + /// + /// 备注 + /// + [MaxLength(2048)] + public string? Remark { get; set; } +} + +public class UpdateTestActionInput : AddTestActionInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..48c2e1212001d53984faee757d573dc71ee9730e --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestCellInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 基站Id + /// + [Required(ErrorMessage = "基站Id不能为空")] + public int NodeBId { get; set; } + + /// + /// 小区Id + /// + [Required(ErrorMessage = "小区Id不能为空")] + public int CellId { get; set; } +} + +public class UpdateTestCellInput : AddTestCellInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + /// + /// 小区参数 + /// + [Required(ErrorMessage = "小区参数不能为空")] + public object Parameter { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellOutput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..a3e2e582dafd79d9d5fbf55c699eebd8927b8962 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellOutput.cs @@ -0,0 +1,36 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class TestCellOutput : EntityBaseId +{ + /// + /// 模板Id + /// + public long TemplateId { get; set; } + + /// + /// 基站ID + /// + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + public int CellId { get; set; } + + /// + /// 小区参数 + /// + public object? Parameter { get; set; } + + /// + /// 小区参数详情 + /// + public ParametersInfo? ParameterDetail { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceInput.cs new file mode 100644 index 0000000000000000000000000000000000000000..ea115cbd0ebe94baffc22b568d3844de7c94bc2a --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceInput.cs @@ -0,0 +1,53 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestDeviceInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 设备Id + /// + [Required(ErrorMessage = "设备Id不能为空")] + public long DeviceId { get; set; } +} + +public class UpdateTestDeviceInput : AddTestDeviceInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + /// + /// 设备参数 + /// + [Required(ErrorMessage = "设备参数不能为空")] + public object Parameter { get; set; } +} + +public class TemplateDeviceParaInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 设备Id + /// + [Required(ErrorMessage = "设备Id不能为空")] + public long DeviceId { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceOutput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceOutput.cs new file mode 100644 index 0000000000000000000000000000000000000000..f33835471b7435e0f3e45e12ec28b17337ca91ed --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceOutput.cs @@ -0,0 +1,36 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class TestDeviceOutput : EntityBaseId +{ + /// + /// 模板Id + /// + public long TemplateId { get; set; } + + /// + /// 设备Id + /// + public long DeviceId { get; set; } + + /// + /// 设备名称 + /// + public string? Name { get; set; } + + /// + /// 设备参数 + /// + public object? Parameter { get; set; } + + /// + /// 设备参数详情 + /// + public ParametersInfo? ParameterDetail { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs new file mode 100644 index 0000000000000000000000000000000000000000..c43531f668d2088ba468249a5d3a44ec674af5c5 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -0,0 +1,250 @@ +using Admin.NET.Core.Service; +using Furion.DatabaseAccessor; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Template", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TemplateService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _templateRep; + private readonly SqlSugarRepository _deviceRep; + private readonly TestDeviceService _deviceService; + private readonly TestCellService _cellService; + private readonly TestActionService _actionService; + private readonly SettingService _settingService; + private readonly SysEnumService _enumService; + private readonly UserManager _userManager; + + public TemplateService(SqlSugarRepository templateRep, SqlSugarRepository deviceRep, TestDeviceService deviceService, TestCellService cellService, TestActionService actionService, SettingService settingService, SysEnumService enumService, UserManager userManager) + { + _templateRep = templateRep; + _deviceRep = deviceRep; + _deviceService = deviceService; + _cellService = cellService; + _actionService = actionService; + _settingService = settingService; + _enumService = enumService; + _userManager = userManager; + } + + /// + /// 获取测试模板列表 🔖 + /// + /// + [UnitOfWork] + [DisplayName("获取测试模板列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = await _templateRep.AsQueryable() + .OrderBy(u => u.Id) + .Select() + .ToListAsync(); + + query.ForEach(async x => + { + x.TestConfig = await _settingService.GetTestSettingByTemplateId(x.Id); + x.TestConfigDetail = await _settingService.GetTestSettingDetailByTemplateId(x.Id); + x.Devices = await _deviceService.GetListByTemplateId(x.Id); + x.Cells = await _cellService.GetListByTemplateId(x.Id); + x.Actions = await _actionService.GetListByTemplateId(x.Id); + }); + + return query; + } + + /// + /// 获取原始测试模板列表 🔖 + /// + /// + [NonAction] + public async Task> GetTemplateList() + { + var query = await _templateRep.AsQueryable() + .OrderBy(u => u.Id) + .ToListAsync(); + + query.ForEach(async x => + { + x.TestConfig = await _settingService.GetTestSetting(x.Id); + x.Devices = await _deviceService.GetList(x.Id); + x.Cells = await _cellService.GetList(x.Id); + x.Actions = await _actionService.GetListByTemplateId(x.Id); + }); + + return query; + } + + /// + /// 分页查询测试模板 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("分页查询测试模板")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _templateRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.TestType.GetDescription().Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + var pageList = await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + pageList.Items.ForEach(async x => + { + x.TestConfig = await _settingService.GetTestSettingByTemplateId(x.Id); + x.TestConfigDetail = await _settingService.GetTestSettingDetailByTemplateId(x.Id); + x.Devices = await _deviceService.GetListByTemplateId(x.Id); + x.Cells = await _cellService.GetListByTemplateId(x.Id); + x.Actions = await _actionService.GetListByTemplateId(x.Id); + }); + return pageList; + } + + /// + /// 增加测试模板 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("增加测试模板")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddTestCaseTemplate input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + var id = await _templateRep.InsertAsync(entity) ? entity.Id : 0; + if (id > 0) + { + var settingId = await _settingService.AddTestSetting(entity); + + input.Devices.ForEach(x => x.TemplateId = id); + var deviceFlag = await _deviceService.AddList(input.Devices); + + input.Cells.ForEach(x => x.TemplateId = id); + var cellFlag = await _cellService.AddList(input.Cells); + + input.Actions.ForEach(x => x.TemplateId = id); + var actionFlag = await _actionService.AddList(input.Actions); + } + + return id; + } + + /// + /// 更新测试模板 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("更新测试模板")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateTestCaseTemplateInput input) + { + _ = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + input.TestConfig = null; + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + var count = await _templateRep.AsUpdateable(entity).ExecuteCommandAsync(); + if (count > 0) + { + await _settingService.DeleteTestSettingByTemplateId(input.Id); + var testSettingId = await _settingService.AddTestSetting(entity); + + await _deviceService.DeleteListByTemplateId(input.Id); + input.Devices.ForEach(x => x.TemplateId = input.Id); + var deviceFlag = await _deviceService.AddList(input.Devices); + + await _cellService.DeleteListByTemplateId(input.Id); + input.Cells.ForEach(x => x.TemplateId = input.Id); + var cellFlag = await _cellService.AddList(input.Cells); + + await _actionService.DeleteListByTemplateId(input.Id); + input.Actions.ForEach(x => x.TemplateId = input.Id); + var actionFlag = await _actionService.AddList(input.Actions); + } + } + + /// + /// 更新测试模板参数 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("更新测试模板参数")] + [ApiDescriptionSettings(Name = "UpdateTestSetting"), HttpPost] + public async Task UpdateTestSetting(UpdateTestCaseTemplateInput input) + { + await _settingService.UpdateTestSetting(input); + } + + /// + /// 更新测试模板设备参数 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("更新测试模板设备参数")] + [ApiDescriptionSettings(Name = "UpdateDevice"), HttpPost] + public async Task UpdateDevice(UpdateTestDeviceInput input) + { + await _settingService.UpdateDeviceSetting(input); + } + + /// + /// 更新测试模板小区参数 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("更新测试模板小区参数")] + [ApiDescriptionSettings(Name = "UpdateCell"), HttpPost] + public async Task UpdateCell(UpdateTestCellInput input) + { + await _settingService.UpdateCellSetting(input); + } + + /// + /// 删除测试模板 🔖 + /// + /// + /// + [UnitOfWork] + [DisplayName("删除测试模板")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + await _templateRep.DeleteAsync(entity); + await _settingService.DeleteTestSettingByTemplateId(input.Id); + await _deviceService.DeleteListByTemplateId(input.Id); + await _cellService.DeleteListByTemplateId(input.Id); + await _actionService.DeleteListByTemplateId(input.Id); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs new file mode 100644 index 0000000000000000000000000000000000000000..ce2c09021110694eaa6a1a8fe331af02b6125046 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs @@ -0,0 +1,77 @@ +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板动作接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestAction", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestActionService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testActionRep; + private readonly UserManager _userManager; + + public TestActionService(SqlSugarRepository testActionRep, UserManager userManager) + { + _testActionRep = testActionRep; + _userManager = userManager; + } + + /// + /// 增加模板动作 🔖 + /// + /// + /// + [NonAction] + public async Task Add(AddTestActionInput input) + { + var entity = input.Adapt(); + return await _testActionRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板动作集合 🔖 + /// + /// + /// + [NonAction] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + return await _testActionRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板动作集合 + /// + /// + /// + [NonAction] + public async Task> GetListByTemplateId(long templateId) + { + var actionList = await _testActionRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { u.OrderNo, Code = u.Id }) + .ToListAsync(); + return actionList; + } + + /// + /// 删除模板动作集合 + /// + /// + /// + [NonAction] + public async Task DeleteListByTemplateId(long templateId) + { + await _testActionRep.DeleteAsync(u => u.TemplateId == templateId); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs b/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs new file mode 100644 index 0000000000000000000000000000000000000000..538aab224ba1a3c496ad9b30f8bb4e39c312a649 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs @@ -0,0 +1,110 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestCell", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestCellService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testCellRep; + private readonly SettingService _settingService; + private readonly UserManager _userManager; + + public TestCellService(SqlSugarRepository testCellRep, SettingService settingService, UserManager userManager) + { + _testCellRep = testCellRep; + _settingService = settingService; + _userManager = userManager; + } + + /// + /// 增加模板小区 🔖 + /// + /// + /// + [NonAction] + public async Task Add(AddTestCellInput input) + { + var entity = input.Adapt(); + await _settingService.AddCellSetting(entity); + return await _testCellRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板小区集合 🔖 + /// + /// + /// + [NonAction] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + entityList.ForEach(async x => await _settingService.AddCellSetting(x)); + return await _testCellRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板小区集合 + /// + /// + /// + [NonAction] + public async Task> GetListByTemplateId(long templateId) + { + var cellList = await _testCellRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .Select(u => new TestCellOutput { Id = u.Id, TemplateId = u.TemplateId, NodeBId = u.NodeBId, CellId = u.CellId }) + .ToListAsync(); + + cellList.ForEach(async x => + { + x.Parameter = await _settingService.GetCellSettingByTemplateId(x.Adapt()); + x.ParameterDetail = await _settingService.GetCellSettingDetailByDeviceId(x.Adapt()); + }); + + return cellList; + } + + /// + /// 获取原始模板小区集合 + /// + /// + /// + [NonAction] + public async Task> GetList(long templateId) + { + var cellList = await _testCellRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .ToListAsync(); + + cellList.ForEach(async x => + { + x.Parameter = await _settingService.GetCellSetting(x); + }); + + return cellList; + } + + /// + /// 删除模板小区集合 + /// + /// + /// + [NonAction] + public async Task DeleteListByTemplateId(long templateId) + { + await _testCellRep.DeleteAsync(u => u.TemplateId == templateId); + await _settingService.DeleteCellSettingByTemplateId(templateId); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3f744aba0cf8a1591be5da5282bed2da9ce0f15 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs @@ -0,0 +1,112 @@ +using Admin.NET.Core.Service; +using AngleSharp.Dom; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestDevice", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestDeviceService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testDeviceRep; + private readonly SettingService _settingService; + private readonly UserManager _userManager; + + public TestDeviceService(SqlSugarRepository testDeviceRep, SettingService settingService, UserManager userManager) + { + _testDeviceRep = testDeviceRep; + _settingService = settingService; + _userManager = userManager; + } + + /// + /// 增加模板设备 🔖 + /// + /// + /// + [NonAction] + public async Task Add(AddTestDeviceInput input) + { + var entity = input.Adapt(); + await _settingService.AddDeviceSetting(entity); + return await _testDeviceRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板设备集合 🔖 + /// + /// + /// + [NonAction] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + entityList.ForEach(async x => await _settingService.AddDeviceSetting(x)); + return await _testDeviceRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板设备集合 + /// + /// + /// + [NonAction] + public async Task> GetListByTemplateId(long templateId) + { + var deviceList = await _testDeviceRep.AsQueryable() + .LeftJoin((u, a) => u.DeviceId == a.Id) + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .Select((u, a) => new TestDeviceOutput { Id = u.Id, TemplateId = u.TemplateId, DeviceId = u.DeviceId, Name = a.Name }) + .ToListAsync(); + + deviceList.ForEach(async x => + { + x.Parameter = await _settingService.GetDeviceSettingByTemplateId(x.Adapt()); + x.ParameterDetail = await _settingService.GetDeviceSettingDetailByDeviceId(x.DeviceId); + }); + return deviceList; + } + + /// + /// 获取原始模板设备集合 + /// + /// + /// + [NonAction] + public async Task> GetList(long templateId) + { + var deviceList = await _testDeviceRep.AsQueryable() + .LeftJoin((u, a) => u.DeviceId == a.Id) + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .ToListAsync(); + + deviceList.ForEach(async x => + { + x.Parameter = await _settingService.GetDeviceSetting(x); + }); + return deviceList; + } + + /// + /// 删除模板设备集合 + /// + /// + /// + [NonAction] + public async Task DeleteListByTemplateId(long templateId) + { + await _testDeviceRep.DeleteAsync(u => u.TemplateId == templateId); + await _settingService.DeleteDeviceSettingByTemplateId(templateId); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Testing/DeviceCreator.cs b/Admin.NET/MTNet.Application/Service/Testing/DeviceCreator.cs new file mode 100644 index 0000000000000000000000000000000000000000..b247ed3484a9c444d4f10c4061d3f70cf9370f46 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Testing/DeviceCreator.cs @@ -0,0 +1,133 @@ +using MTNet.Application.DriverLibrary; +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 System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class DeviceCreator +{ + public static IBaseStationTester GetCurrentBaseStationTester(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((BaseStationTesterTypeEnum)device.DeviceModelConfig) + { + case BaseStationTesterTypeEnum.ZTE: + return new ZTEBaseStationTester(device); + case BaseStationTesterTypeEnum.Nokia: + return new NokiaBaseStationTester(device); + case BaseStationTesterTypeEnum.Huawei: + return new HuaweiBaseStationTester(device); + case BaseStationTesterTypeEnum.Ericsson: + return new EricssonBaseStationTester(device); + case BaseStationTesterTypeEnum.Virtual: + return new VirtualBaseStationTester(device); + default: + return new VirtualBaseStationTester(device); + } + } + + public static IChannelEmulator GetCurrentChannelEmulator(DeviceAddrConfig device) + { + device.RealAddrConfig = $"TCPIP0::{device.AddrConfig}::{device.PortConfig}::SOCKET"; + device.UseVisaProgrammerConfig = true; + switch ((ChannelEmulatorTypeEnum)device.DeviceModelConfig) + { + case ChannelEmulatorTypeEnum.Keyseight_F64: + return new KeysightChannelEnulator(device); + case ChannelEmulatorTypeEnum.Spirent_Vertex: + return new SpirentVertexChannelEmulator(device); + case ChannelEmulatorTypeEnum.Virtual: + return new VirtualChannelEnulator(device); + default: + return new VirtualChannelEnulator(device); + } + } + + public static IRoadMeasuring GetCurrentRoadMeasuring(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((RoadMeasuringTypeEnum)device.DeviceModelConfig) + { + case RoadMeasuringTypeEnum.Spark: + return new SparkRoadMeasuring(device); + case RoadMeasuringTypeEnum.Virtual: + return new VirtualRoadMeasuring(device); + default: + return new VirtualRoadMeasuring(device); + } + } + + public static ITurntable GetCurrentTurntable(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((TurntableTypeEnum)device.DeviceModelConfig) + { + case TurntableTypeEnum.HBTE: + return new HBTETurntable(device); + case TurntableTypeEnum.Virtual: + return new VirtualTurntable(device); + default: + return new VirtualTurntable(device); + } + } + + public static IPhaseShifter GetCurrentPhaseShifter(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((PhaseShifterTypeEnum)device.DeviceModelConfig) + { + case PhaseShifterTypeEnum.HBTE: + return new HBTEPhaseShifter(device); + case PhaseShifterTypeEnum.Virtual: + return new VirtualPhaseShifter(device); + default: + return new VirtualPhaseShifter(device); + } + } + + public static IProgrammableAttenuator GetCurrentProgrammableAttenuator(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((ProgrammableAttenuatorTypeEnum)device.DeviceModelConfig) + { + case ProgrammableAttenuatorTypeEnum.HBTE: + return new HBTEProgrammableAttenuator(device); + case ProgrammableAttenuatorTypeEnum.Virtual: + return new VirtualProgrammableAttenuator(device); + default: + return new VirtualProgrammableAttenuator(device); + } + } + + public static IUserEquipment GetCurrentUserEquipment(DeviceAddrConfig device) + { + device.RealAddrConfig = device.AddrConfig; + device.UseVisaProgrammerConfig = false; + switch ((UserEquipmentTypeEnum)device.DeviceModelConfig) + { + case UserEquipmentTypeEnum.Android: + return new AndroidUserEquipment(device); + case UserEquipmentTypeEnum.Tbox: + return new TboxUserEquipment(device); + case UserEquipmentTypeEnum.Virtual: + return new VirtualUserEquipment(device); + default: + return new VirtualUserEquipment(device); + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Testing/TestCaseCreator.cs b/Admin.NET/MTNet.Application/Service/Testing/TestCaseCreator.cs new file mode 100644 index 0000000000000000000000000000000000000000..1acba6e14769f1c9a6373ff5755ccd5ba02eb418 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Testing/TestCaseCreator.cs @@ -0,0 +1,208 @@ +using AngleSharp.Dom; +using MTNet.Application.BLL; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using MTNet.Application.IBLL; +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 抽象工厂类,用来获取测试项的实例。 +/// 目前先使用简单工厂实现 +/// +public abstract class TestCaseCreator +{ + public TestTemplate Template { get; set; } = new TestTemplate(); + + protected TestCaseCreator() + { + } + + public static ITestEngine GetTestCase(List devices, List cells, TestTemplate template, TestSeries series) + { + ITestEngine? newCase = null; + switch (template.TestType) + { + case TestTypeEnum.LossMeasurementTestCase: + case TestTypeEnum.NetworkAnalyzerCalibrationTestCase: + case TestTypeEnum.SpectrumAnalyzerCalibrationTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PDSCHTestCase: + case TestTypeEnum.BaseStationAdaptiveModulationCoding_PUSCHTestCase: + case TestTypeEnum.BaseStationSystemInformationBroadcastTestCase: + case TestTypeEnum.BaseStationSameFrequencySwitching_Intra_gNBTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase: + case TestTypeEnum.BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase: + case TestTypeEnum.BaseStationTransmitterOutputPowerTestCase: + case TestTypeEnum.BaseStationTransmitterTotalPowerDynamicRangeTestCase: + case TestTypeEnum.BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase: + case TestTypeEnum.BaseStationTransmitterFrequencyErrorTestCase: + case TestTypeEnum.BaseStationTransmitterEVMTestCase: + case TestTypeEnum.BaseStationTransmitterTAETestCase: + case TestTypeEnum.BaseStationTransmitterOBWTestCase: + case TestTypeEnum.BaseStationTransmitterACLRTestCase: + case TestTypeEnum.BaseStationTransmitterOBUETestCase: + case TestTypeEnum.BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase: + case TestTypeEnum.BaseStationReceiverSensitivityTestCase: + case TestTypeEnum.BaseStationReceiverDynamicRangeTestCase: + case TestTypeEnum.BaseStationReceiverACSTestCase: + case TestTypeEnum.BaseStationReceiverBlockageTestCase: + case TestTypeEnum.BaseStationReceiverChannelSelectivityTestCase: + case TestTypeEnum.BaseStationMultiUserAccessTestCase: + { + newCase = new UserDefineTestCaseCreator().Factory(); + } + break; + case TestTypeEnum.UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase: + case TestTypeEnum.UEStep2RandomAccessTestCase: + case TestTypeEnum.UEStep4RandomAccessTestCase: + case TestTypeEnum.UEEncryptionAndDecryptionTestCase: + case TestTypeEnum.UEIntegrityTestCase: + case TestTypeEnum.UESameFrequencySwithing_Intra_gNBTestCase: + case TestTypeEnum.UEVoiceCallBetweenVONRsTestCase: + case TestTypeEnum.UE3GPPCDChannelModelThroughputTestCase: + case TestTypeEnum.UE3GPPStretchTestCase: + case TestTypeEnum.UEMaximumTransmittingPowerTestCase: + case TestTypeEnum.UETransmitPowerRolledBackTestCase: + case TestTypeEnum.UETransmittedSignalQualityTestCase: + case TestTypeEnum.UEStandbyPowerConsumptionTestCase: + case TestTypeEnum.UEDataTrafficPowerConsumptionTestCase: + { + newCase = new UserDefineTestCaseCreator().Factory(); + } + break; + case TestTypeEnum.UEPeakRateTestCase: + { + newCase = new UserDefineTestCaseCreator().Factory(); + } + break; + case TestTypeEnum.UEUserDefineTestCase: + { + newCase = new UserDefineTestCaseCreator().Factory(); + } + break; + default: + break; + } + + if (newCase != null) + GetTestDevice(devices, cells, template, newCase); + + return newCase; + } + + private static void GetTestDevice(List devices, List cells, TestTemplate template, ITestEngine newCase) + { + var cellList = new List(); + var ceList = new List(); + var rmList = new List(); + var ttList = new List(); + var psList = new List(); + var paList = new List(); + var ueList = new List(); + + if (template?.Cells.Safe().Any() == true) + { + foreach (var item in template.Cells) + { + var cell = cells.FirstOrDefault(x => x.NodeBId == item.NodeBId && x.CellId == item.CellId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + var addr = devices.FirstOrDefault(x => x.Id == cell.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + var cellDevice = new CellDevice { Config = addr, Cell = cell, Parameters = item.Parameter, Device = DeviceCreator.GetCurrentBaseStationTester(addr) }; + cellList.Add(cellDevice); + } + } + + if (template?.Devices.Safe().Any() == true) + { + foreach (var item in template.Devices) + { + var addr = devices.FirstOrDefault(x => x.Id == item.DeviceId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + switch (addr.DeviceTypeConfig) + { + case DeviceTypeEnum.BaseStationTester: + { + } + break; + case DeviceTypeEnum.ChannelEmulator: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as CEParameters; + var ce = new CEDevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentChannelEmulator(addr) }; + ceList.Add(ce); + } + break; + case DeviceTypeEnum.RoadMeasuring: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as RMParameters; + var rm = new RMDevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentRoadMeasuring(addr) }; + rmList.Add(rm); + } + break; + case DeviceTypeEnum.Turntable: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as TTParameters; + var tt = new TTDevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentTurntable(addr) }; + ttList.Add(tt); + } + break; + case DeviceTypeEnum.PhaseShifter: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as PSParameters; + var ps = new PSDevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentPhaseShifter(addr) }; + psList.Add(ps); + } + break; + case DeviceTypeEnum.ProgrammableAttenuator: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as PAParameters; + var pa = new PADevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentProgrammableAttenuator(addr) }; + paList.Add(pa); + } + break; + case DeviceTypeEnum.UserEquipment: + { + var para = template.Devices.FirstOrDefault(x => x.DeviceId == addr.Id)?.Parameter as UEParameters; + var ue = new UEDevice { Config = addr, Parameters = para, Device = DeviceCreator.GetCurrentUserEquipment(addr) }; + ueList.Add(ue); + } + break; + default: + break; + } + } + } + + if (newCase != null) + { + newCase._cellList = cellList; + newCase._ceList = ceList; + newCase._rmList = rmList; + newCase._ttList = ttList; + newCase._psList = psList; + newCase._paList = paList; + newCase._ueList = ueList; + } + } + + public abstract ITestEngine Factory(); +} + +public class UserDefineTestCaseCreator : TestCaseCreator +{ + public UserDefineTestCaseCreator() : + base() + { + + } + public override ITestEngine Factory() + { + return new UserDefineTestCase(); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Testing/TestTask.cs b/Admin.NET/MTNet.Application/Service/Testing/TestTask.cs new file mode 100644 index 0000000000000000000000000000000000000000..2310492b00af016b343f8c7dcd7cc2c975f287cf --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Testing/TestTask.cs @@ -0,0 +1,178 @@ +using MTNet.Application.Entity; +using MTNet.Application.IBLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Subjects; +using System.Reactive; +using System.Text; +using System.Threading.Tasks; +using System.Reactive.Linq; + +namespace MTNet.Application.Service; + +public class TestTask : IDisposable +{ + public ITestEngine TestEngine { get; private set; } + public TestSeries Item { get; private set; } + + public TestStatusEnum Status => TestEngine == null ? TestStatusEnum.NoStarted : TestEngine.Status; + + IDisposable disFinished = null; + IDisposable disLoopFinished = null; + IDisposable disMetaTestDataAdded = null; + + public IObservable ErrorRx => TestEngine?.ErrorRx; + + private Subject<(string, TestMessageEnum)> MessageOb = new Subject<(string, TestMessageEnum)>(); + public IObservable<(string, TestMessageEnum)> MessageRx => MessageOb; + + private Subject> FinishedOb = new Subject>(); + public IObservable> FinishedRx => FinishedOb; + + private Subject> LoopFinishedOb = new Subject>(); + public IObservable> LoopFinishedRx => LoopFinishedOb; + + private Subject> MetaTestDataAddedOb = new Subject>(); + public IObservable> MetaTestDataAddedRx => MetaTestDataAddedOb; + + public TestTask() + { + FinishedOb.Subscribe(_ => UpdateStatus()); + } + + /// + /// Setup case task test engine + /// + /// Init case task failed! + /// + /// + public void SetupEngine(List devices, List cells, TestTemplate template, TestSeries series) + { + try + { + Item = series ?? throw new ArgumentNullException(nameof(series)); + + TestEngine = TestCaseCreator.GetTestCase(devices, cells, template, series); + if (TestEngine == null) + throw new InvalidOperationException("Init case task failed!"); + + disFinished = Observable.FromEventPattern, MeasurementEventArgs>( + handler => TestEngine.TestFinished += handler, + handler => TestEngine.TestFinished -= handler) // Got IObservable here! + .Subscribe(FinishedOb); + + disLoopFinished = Observable.FromEventPattern, MeasurementEventArgs>( + handler => TestEngine.LoopTestFinished += handler, + handler => TestEngine.LoopTestFinished -= handler) // Got IObservable here! + .Subscribe(LoopFinishedOb); + + disMetaTestDataAdded = Observable.FromEventPattern, MetaTestDataEventArgs>( + handler => TestEngine.MetaTestDataAdded += handler, + handler => TestEngine.MetaTestDataAdded -= handler) // Got IObservable here! + .Subscribe(MetaTestDataAddedOb); + + TestEngine.ErrorRx.Subscribe(ex => + { + UpdateStatus(); + //AppView.MainUI.MessageBox(ex.Message, "Task Exception"); + }); + + TestEngine.SendStatusMessage += m => MessageOb.OnNext(m); + TestEngine.CurrentItem = Item; + } + catch (Exception ex) + { + MessageOb.OnNext(($"{ex.GetType()}: {ex.Message}", TestMessageEnum.Error)); + throw; + } + finally + { + UpdateStatus(); + } + } + public void Start() + { + try + { + TestEngine?.Start(); + if (TestEngine != null) + Item.Status = TestEngine.Status; + } + catch (Exception ex) + { + if (TestEngine != null) + Item.Status = TestEngine.Status; + MessageOb.OnNext(($"{ex.GetType()}: {ex.Message}", TestMessageEnum.Error)); + //throw; + } + finally + { + UpdateStatus(); + } + } + + public void Stop() + { + try + { + TestEngine?.Stop(); + if (TestEngine != null) + Item.Status = TestEngine.Status; + } + catch (Exception ex) + { + if (TestEngine != null) + Item.Status = TestEngine.Status; + MessageOb.OnNext(($"{ex.GetType()}: {ex.Message}", TestMessageEnum.Error)); + //throw; + } + finally + { + UpdateStatus(); + } + } + + public void PauseOrContinue() + { + try + { + if (TestEngine != null) + { + if (TestEngine.Status == TestStatusEnum.Running) + TestEngine.Pause(); + else + TestEngine.Continue(); + Item.Status = TestEngine.Status; + } + } + catch (Exception ex) + { + if (TestEngine != null) + Item.Status = TestEngine.Status; + MessageOb.OnNext(($"{ex.GetType()}: {ex.Message}", TestMessageEnum.Error)); + //throw; + } + finally + { + UpdateStatus(); + } + } + + private void UpdateStatus() + { + Item.Status = TestEngine?.Status ?? TestStatusEnum.NoStarted; + } + + private void ClearBind() + { + disFinished?.Dispose(); + disLoopFinished?.Dispose(); + disMetaTestDataAdded?.Dispose(); + } + + public void Dispose() + { + ClearBind(); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs b/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs new file mode 100644 index 0000000000000000000000000000000000000000..c639d9495589e4b7a01fb62b02d6de2e148bbb53 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs @@ -0,0 +1,311 @@ +using AngleSharp.Dom; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.DAL; +using MTNet.Application.Entity; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive.Linq; +using System.Reactive.Subjects; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试监控接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Testing", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestingService : IDynamicApiController, IScoped +{ + private readonly SqlSugarRepository _templateRep; + private readonly TemplateService _templateService; + private readonly DeviceService _deviceService; + private readonly BaseStationService _cellService; + private readonly TaskService _taskService; + private readonly SettingService _settingService; + private readonly UserManager _userManager; + + public TestingService(SqlSugarRepository templateRep, TemplateService templateService, DeviceService deviceService, BaseStationService cellService, TaskService taskService, SettingService settingService, UserManager userManager) + { + _templateRep = templateRep; + _templateService = templateService; + _deviceService = deviceService; + _cellService = cellService; + _taskService = taskService; + _settingService = settingService; + _userManager = userManager; + } + + private bool _running = false; + private DateTime _startTime; + + private TestStatusEnum _status; + + private List _seriesList = new List(); + private TestSeries _series; + private TestTask _task; + private int _taskIndex = 0; + + private CancellationTokenSource _tokenSource; + + private Subject _statusOb = new Subject(); + private Subject _processOb = new Subject(); + private Subject _timerMsgOb = new Subject(); + private Subject<(TestSeries, TestTask)> _seriesTaskOb = new Subject<(TestSeries, TestTask)>(); + + private IDisposable _disProcess; + private IDisposable _disTimer; + + /// + /// 开始测试 🔖 + /// + /// + [DisplayName("开始测试")] + [ApiDescriptionSettings(Name = "Start"), HttpPost] + public async Task Start() + { + if (_running) + return; + + _running = true; + + _seriesList = await _taskService.GetList(); + + _disProcess?.Dispose(); + _disProcess = null; + _disProcess = Observable.Interval(TimeSpan.FromSeconds(0.9)).Subscribe(_ => + { + if (!_seriesList.Safe().Any() || _taskIndex >= _seriesList.Count) + _processOb.OnNext(1); + + double maxProcess = _seriesList.Count; + double currentProcess = _taskIndex * 1; + _processOb.OnNext(maxProcess == 0 ? 0 : currentProcess / maxProcess); + }); + + _startTime = DateTime.Now; + _disTimer = Observable.Interval(TimeSpan.FromSeconds(1)).Subscribe((Action)(_ => + { + string time = (DateTime.Now - _startTime).ToString("hh':'mm':'ss"); + object info = new { Name = _series?.Name, Status = _status.GetDescription(), Time = time, }; + string jsonText = JsonConvert.SerializeObject(info); + _timerMsgOb.OnNext(jsonText); + })); + + _tokenSource = new CancellationTokenSource(); + var thread = new Thread(new ThreadStart(async () => + { + try + { + _taskIndex = 0; + _status = TestStatusEnum.Running; + LoopCall(); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + //SystemLogger.Logger.Error("QueueStart error.", ex); + } + })); + thread.Start(); + } + + /// + /// 停止测试 🔖 + /// + /// + [DisplayName("停止测试")] + [ApiDescriptionSettings(Name = "Stop"), HttpPost] + public async Task Stop() + { + if (_status == TestStatusEnum.Stopped) + return; + + _tokenSource.Cancel(); + _status = TestStatusEnum.Stopped; + + //此延时是防止手动停止后下面两个定时器立刻销毁导致状态不刷新的问题 + await Task.Delay(1000); + + _disTimer?.Dispose(); + _disTimer = null; + + _disProcess?.Dispose(); + _disProcess = null; + + _running = false; + } + + /// + /// 暂停测试 🔖 + /// + /// + [DisplayName("暂停测试")] + [ApiDescriptionSettings(Name = "Pause"), HttpPost] + public async Task Pause() + { + } + + /// + /// 继续测试 🔖 + /// + /// + [DisplayName("继续测试")] + [ApiDescriptionSettings(Name = "Continue"), HttpPost] + public async Task Continue() + { + } + + [NonAction] + private void LoopCall(MeasurementEventArgs e = null) + { + try + { + _tokenSource?.Token.ThrowIfCancellationRequested(); + + var item = GetNextTask(); + _series = item.series; + _task = item.task; + + if (item.series == null || item.task == null) + return; + + _tokenSource?.Token.ThrowIfCancellationRequested(); + + item.task?.ErrorRx?.Subscribe(ex => + { + SendMessageToClient(ex.Message, TestMessageEnum.Error); + //SystemLogger.Logger.Error("task error.", ex); + + if (_tokenSource?.Token.IsCancellationRequested == false) + _tokenSource?.Cancel(); + + _task?.Stop(); + _task = null; + _series = null; + }); + + item.task?.MessageRx.Subscribe(message => SendMessageToClient(message.Item1, message.Item2)); + //item.task?.FinishedRx.Subscribe(val => LoopCall(val.EventArgs)); + item.task?.LoopFinishedRx.Subscribe(val => LoopCall(val.EventArgs)); + + //SendMessageToClient("0", MessageType.CurrentTaskProgress); + _startTime = DateTime.Now; + + var devices = _deviceService.GetList().Result.ToList(); + var cells = _cellService.GetList().Result.ToList(); + var templates = _templateService.GetTemplateList().Result.ToList(); + var template = templates.FirstOrDefault(u => u.Id == item.series.TemplateId) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + item.task.SetupEngine(devices, cells, template, item.series); + _seriesTaskOb.OnNext(item);//获取完测试例对象之后,发送caseInfo 信息 + + item.task.Start(); + } + catch (TaskCanceledException) + { + _task?.Stop(); + _task = null; + _series = null; + } + catch (OperationCanceledException) + { + _task?.Stop(); + _task = null; + _series = null; + } + catch (Exception ex) + { + if (_tokenSource?.Token.IsCancellationRequested == false) + _tokenSource?.Cancel(); + + _task?.Stop(); + _task = null; + _series = null; + + //SystemLogger.Logger.Error("task error.", ex); + } + finally + { + if (_series == null || _task == null) + { + _status = TestStatusEnum.Stopped; + _running = false; + + //此延时是防止测试完下面两个定时器立刻销毁导致进度走不完的问题 + Thread.Sleep(1000); + + _disTimer?.Dispose(); + _disTimer = null; + + _disProcess?.Dispose(); + _disProcess = null; + + //_webSocketService.CloseAllAsync(); + } + } + } + + [NonAction] + public (TestSeries series, TestTask task) GetNextTask() + { + TestSeries series = null; + TestTask task = null; + + try + { + if (_task == null) + { + if (!_seriesList.Safe().Any()) + return (null, null); + + series = _seriesList?.FirstOrDefault(); + task = new TestTask(); + } + else if (_task.Status == TestStatusEnum.Pausing || _task.Status == TestStatusEnum.Running) + { + return (_task.Item, _task); + } + else + { + if (_seriesList == null) + return (series, task); + + int index = _seriesList.IndexOf(_task.Item); + if (index == -1) + { + if (_seriesList.Count <= _taskIndex + 1) + return (null, null); + } + + _taskIndex++; + + if (_taskIndex >= _seriesList.Count) return (null, null); + + series = _seriesList.ElementAt(_taskIndex); + task = new TestTask(); + } + + task.FinishedRx.Subscribe(e => + { + //_seriesStorageService.SaveResult(e.EventArgs); + }); + } + catch (Exception) + { + throw; + } + return (series, task); + } + + [NonAction] + public void SendMessageToClient(string message, TestMessageEnum type) + { + //_webSocketService.SendAllAsync(new Models.WebSocketMessage { Type = type, Data = message }); + Console.WriteLine(message); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Startup.cs b/Admin.NET/MTNet.Application/Startup.cs new file mode 100644 index 0000000000000000000000000000000000000000..a3b892d1abfae8878a7be1726080e3b2efa177bd --- /dev/null +++ b/Admin.NET/MTNet.Application/Startup.cs @@ -0,0 +1,22 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; + +namespace MTNet.Application; + +[AppStartup(100)] +public class Startup : AppStartup +{ + public void ConfigureServices(IServiceCollection services) + { + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + } +} \ No newline at end of file diff --git a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj index 1ce0c90582f77cdd1e1799bef2f0d3d8fba777e4..d3def6fc6233a7c7bb8a43d691f39aada6e14200 100644 --- a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj +++ b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj @@ -24,8 +24,8 @@ - - + + diff --git a/Web/.env.development b/Web/.env.development index ff6ad0026b66a3603f21262c23351d018147d826..77917bbd60d4c1d19cba9a0c207cd20d5ccb55de 100644 --- a/Web/.env.development +++ b/Web/.env.development @@ -2,4 +2,4 @@ ENV = development # 本地环境接口地址 -VITE_API_URL = http://localhost:5005 \ No newline at end of file +VITE_API_URL = http://192.168.168.186:5005 \ No newline at end of file diff --git a/Web/package.json b/Web/package.json index 286a873845ee84b9fab234f5495e74ce07e3c035..f3bcd7f9b043e59c6185ce0e04381f4c30c60600 100644 --- a/Web/package.json +++ b/Web/package.json @@ -66,7 +66,7 @@ "vue-grid-layout": "3.0.0-beta1", "vue-i18n": "^10.0.5", "vue-json-pretty": "^2.4.0", - "vue-plugin-hiprint": "^0.0.58-fix ", + "vue-plugin-hiprint": "^0.0.58-fix", "vue-router": "^4.5.0", "vue-signature-pad": "^3.0.2", "vue3-tree-org": "^4.2.2", diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index d9e78c99027e8010b97676e573f3bb13c61dc744..d765f5d6f59807e9de6ee17ce7b3602663505379 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -54,4 +54,8 @@ export * from './apis/sys-wechat-api'; export * from './apis/sys-wechat-pay-api'; export * from './apis/sys-wechat-user-api'; export * from './apis/sys-wx-open-api'; - +/**----------------------------------------- */ +export * from './apis/test-device-api'; +export * from './apis/test-mapping-api'; +export * from './apis/test-template-api'; +export * from './apis/test-task-api'; diff --git a/Web/src/api-services/apis/test-device-api.ts b/Web/src/api-services/apis/test-device-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..f6241dd4feccc9cb90bcb7a0aded2f02e5d58e89 --- /dev/null +++ b/Web/src/api-services/apis/test-device-api.ts @@ -0,0 +1,720 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestDeviceApi - axios parameter creator + * @export + */ +export const TestDeviceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDevicePagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestDeviceApi - functional programming interface + * @export + */ +export const TestDeviceApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDevicePagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestDeviceApi - factory interface + * @export + */ +export const TestDeviceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDevicePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestDeviceApi - object-oriented interface + * @export + * @class TestDeviceApi + * @extends {BaseAPI} + */ +export class TestDeviceApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDevicePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/apis/test-mapping-api.ts b/Web/src/api-services/apis/test-mapping-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad116524c39d758ceb427889fd5570eab3a15566 --- /dev/null +++ b/Web/src/api-services/apis/test-mapping-api.ts @@ -0,0 +1,796 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestMappingApi - axios parameter creator + * @export + */ +export const TestMappingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingPagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingTreeListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/baseStation/getTreeList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestMappingApi - functional programming interface + * @export + */ +export const TestMappingApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingTreeListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestMappingApi - factory interface + * @export + */ +export const TestMappingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingTreeListGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestMappingApi - object-oriented interface + * @export + * @class TestMappingApi + * @extends {BaseAPI} + */ +export class TestMappingApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingTreeListGet(options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/apis/test-task-api.ts b/Web/src/api-services/apis/test-task-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..48cb27f870f634829abb83b268d8880acfdccb10 --- /dev/null +++ b/Web/src/api-services/apis/test-task-api.ts @@ -0,0 +1,729 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestTaskApi - axios parameter creator + * @export + */ +export const TestTaskApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询测试模板 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplatePagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/templatePage`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskPagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 上移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskUpPost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/up`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 下移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskDownPost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/down`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 清除 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTaskClearPost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/task/clear`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestTaskApi - functional programming interface + * @export + */ +export const TestTaskApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询测试模板 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTemplatePagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 上移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskUpPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskUpPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 下移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskDownPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskDownPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 清除 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskClearPost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTaskApiAxiosParamCreator(configuration).apiTestTaskClearPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestTaskApi - factory interface + * @export + */ +export const TestTaskApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询测试模板 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTemplatePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 上移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskUpPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskUpPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 下移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskDownPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskDownPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 清除 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTaskClearPost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(configuration).apiTestTaskClearPost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestTaskApi - object-oriented interface + * @export + * @class TestTaskApi + * @extends {BaseAPI} + */ +export class TestTaskApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询测试模板 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTemplatePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 上移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskUpPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskUpPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 下移 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskDownPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskDownPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 清除 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTaskApi + */ + public async apiTestTaskClearPost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTaskApiFp(this.configuration).apiTestTaskClearPost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/apis/test-template-api.ts b/Web/src/api-services/apis/test-template-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..7f97061b76370ded3ab47b36a4eebd12de65cb00 --- /dev/null +++ b/Web/src/api-services/apis/test-template-api.ts @@ -0,0 +1,1128 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestTemplateApi - axios parameter creator + * @export + */ +export const TestTemplateApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplatePagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + + /** + * + * @summary 获取设备树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateTreeListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/getTreeList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateCellListPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/baseStation/getTreeListById`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新测试模板参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateParameterUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/updateTestSetting`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新设备集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateDeviceUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/updateDevice`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新小区集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateCellUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/updateCell`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestTemplateApi - functional programming interface + * @export + */ +export const TestTemplateApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplatePagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateTreeListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateCellListPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新测试模板参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateParameterUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateParameterUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新设备集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateDeviceUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新小区集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateCellUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestTemplateApi - factory interface + * @export + */ +export const TestTemplateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplatePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateTreeListGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateCellListPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新测试模板参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateParameterUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateParameterUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新设备集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateDeviceUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新小区集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateCellUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestTemplateApi - object-oriented interface + * @export + * @class TestTemplateApi + * @extends {BaseAPI} + */ +export class TestTemplateApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplatePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateTreeListGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateCellListPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新测试模板参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateParameterUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateParameterUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新设备集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateDeviceUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新小区集合参数 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateCellUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateCellUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/api-services/models/add-dict-data-input.ts b/Web/src/api-services/models/add-dict-data-input.ts index 51b5ce8580f9223bf15aae3b35dd2fdadbd73a5a..0b332c8b6e4d7ee3e9ccabcceee821de7156350d 100644 --- a/Web/src/api-services/models/add-dict-data-input.ts +++ b/Web/src/api-services/models/add-dict-data-input.ts @@ -66,6 +66,12 @@ export interface AddDictDataInput { * @memberof AddDictDataInput */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof AddDictDataInput + */ + tenantId?: number | null; /** * 字典类型Id * @type {number} @@ -84,6 +90,12 @@ export interface AddDictDataInput { * @memberof AddDictDataInput */ value: string; + /** + * 编码 + * @type {string} + * @memberof AddDictDataInput + */ + code?: string | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/add-dict-type-input.ts b/Web/src/api-services/models/add-dict-type-input.ts index bcff48a934e86174a4dc0020646a3e1896fea981..663a0d9b846a48ffc8cf1bf7ca38225da99a4947 100644 --- a/Web/src/api-services/models/add-dict-type-input.ts +++ b/Web/src/api-services/models/add-dict-type-input.ts @@ -67,6 +67,12 @@ export interface AddDictTypeInput { * @memberof AddDictTypeInput */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof AddDictTypeInput + */ + tenantId?: number | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/add-pos-input.ts b/Web/src/api-services/models/add-pos-input.ts index 88a1fa225cacba89751ca4ca5bde9bb6e1b0e7ef..ff5fd0176c8af0e8c0e60d3630bf0f799ebcaa03 100644 --- a/Web/src/api-services/models/add-pos-input.ts +++ b/Web/src/api-services/models/add-pos-input.ts @@ -12,6 +12,7 @@ * Do not edit the class manually. */ import { StatusEnum } from './status-enum'; +import { SysUser } from './sys-user'; /** * * @export @@ -96,6 +97,12 @@ export interface AddPosInput { * @memberof AddPosInput */ status?: StatusEnum; + /** + * 在职人员 + * @type {Array} + * @memberof AddPosInput + */ + userList?: Array | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/db-type.ts b/Web/src/api-services/models/db-type.ts index 9aeafe77e2f9b3c9dcb9bdd31f9462e9cba9c8c2..91349794504662c4afe1356cab08d92d6b97c029 100644 --- a/Web/src/api-services/models/db-type.ts +++ b/Web/src/api-services/models/db-type.ts @@ -45,6 +45,7 @@ export enum DbType { NUMBER_25 = 25, NUMBER_26 = 26, NUMBER_27 = 27, + NUMBER_28 = 28, NUMBER_900 = 900 } diff --git a/Web/src/api-services/models/info-save-input.ts b/Web/src/api-services/models/info-save-input.ts index c8a8c70af30cad68f8f67db473de005956fb5e58..e7367556fd6cb6c701eb3306595bdc96797b8e71 100644 --- a/Web/src/api-services/models/info-save-input.ts +++ b/Web/src/api-services/models/info-save-input.ts @@ -34,43 +34,43 @@ export interface InfoSaveInput { * @type {string} * @memberof InfoSaveInput */ - sysTitle?: string | null; + sysTitle: string; /** * 系统副标题 * @type {string} * @memberof InfoSaveInput */ - sysViceTitle?: string | null; + sysViceTitle: string; /** * 系统描述 * @type {string} * @memberof InfoSaveInput */ - sysViceDesc?: string | null; + sysViceDesc: string; /** * 水印内容 * @type {string} * @memberof InfoSaveInput */ - sysWatermark?: string | null; + sysWatermark: string; /** * 版权说明 * @type {string} * @memberof InfoSaveInput */ - sysCopyright?: string | null; + sysCopyright: string; /** * ICP备案号 * @type {string} * @memberof InfoSaveInput */ - sysIcp?: string | null; + sysIcp: string; /** * ICP地址 * @type {string} * @memberof InfoSaveInput */ - sysIcpUrl?: string | null; + sysIcpUrl: string; /** * 登录二次验证 * @type {boolean} diff --git a/Web/src/api-services/models/page-dict-data-input.ts b/Web/src/api-services/models/page-dict-data-input.ts index 92b1ddc7082ad6d4e251198223c28539c0c764a0..24d095db001ec131a56d6a4c2832aa4dd87127e1 100644 --- a/Web/src/api-services/models/page-dict-data-input.ts +++ b/Web/src/api-services/models/page-dict-data-input.ts @@ -74,15 +74,15 @@ export interface PageDictDataInput { */ dictTypeId?: number; /** - * 值 + * 字典文本 * @type {string} * @memberof PageDictDataInput */ - value?: string | null; + label?: string | null; /** - * 编码 - * @type {string} + * 租户Id + * @type {number} * @memberof PageDictDataInput */ - code?: string | null; + tenantId?: number; } diff --git a/Web/src/api-services/models/page-dict-type-input.ts b/Web/src/api-services/models/page-dict-type-input.ts index ea5db24400363a215a46fda5bea89234bce09896..44d77b3a600eb0f9f2e72ccf828ce3db324429d7 100644 --- a/Web/src/api-services/models/page-dict-type-input.ts +++ b/Web/src/api-services/models/page-dict-type-input.ts @@ -79,4 +79,10 @@ export interface PageDictTypeInput { * @memberof PageDictTypeInput */ code?: string | null; + /** + * 租户Id + * @type {number} + * @memberof PageDictTypeInput + */ + tenantId?: number; } diff --git a/Web/src/api-services/models/sys-dict-data.ts b/Web/src/api-services/models/sys-dict-data.ts index 6ecab2428c4efcebe168d5a3036c83c22a095c50..e19f56d2244f06c7210f271cc807a88b80b71621 100644 --- a/Web/src/api-services/models/sys-dict-data.ts +++ b/Web/src/api-services/models/sys-dict-data.ts @@ -66,12 +66,24 @@ export interface SysDictData { * @memberof SysDictData */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof SysDictData + */ + tenantId?: number | null; /** * 字典类型Id * @type {number} * @memberof SysDictData */ dictTypeId?: number; + /** + * 显示文本 + * @type {string} + * @memberof SysDictData + */ + label: string; /** * 值 * @type {string} @@ -83,7 +95,7 @@ export interface SysDictData { * @type {string} * @memberof SysDictData */ - code: string; + code?: string | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/sys-dict-type.ts b/Web/src/api-services/models/sys-dict-type.ts index 25ecd91cd8ed039d61a20d8913d784e242a90451..703078fb5474099044e81b3c8fe21e8938d46a8a 100644 --- a/Web/src/api-services/models/sys-dict-type.ts +++ b/Web/src/api-services/models/sys-dict-type.ts @@ -67,6 +67,12 @@ export interface SysDictType { * @memberof SysDictType */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof SysDictType + */ + tenantId?: number | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/sys-log-diff.ts b/Web/src/api-services/models/sys-log-diff.ts index 562788b777a6c239b304f447e4108063fc15b516..bd5a7a3690fddb804980721439104fb61f4da2b2 100644 --- a/Web/src/api-services/models/sys-log-diff.ts +++ b/Web/src/api-services/models/sys-log-diff.ts @@ -65,6 +65,12 @@ export interface SysLogDiff { * @memberof SysLogDiff */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof SysLogDiff + */ + tenantId?: number | null; /** * 差异数据 * @type {string} diff --git a/Web/src/api-services/models/sys-pos.ts b/Web/src/api-services/models/sys-pos.ts index 36492687e01e32cd933b2f402e6e34b7515de87a..f88ce2b49029a04ebc9d9cc76269bc6adbde05ab 100644 --- a/Web/src/api-services/models/sys-pos.ts +++ b/Web/src/api-services/models/sys-pos.ts @@ -12,6 +12,7 @@ * Do not edit the class manually. */ import { StatusEnum } from './status-enum'; +import { SysUser } from './sys-user'; /** * 系统职位表 * @export @@ -102,4 +103,10 @@ export interface SysPos { * @memberof SysPos */ status?: StatusEnum; + /** + * 在职人员 + * @type {Array} + * @memberof SysPos + */ + userList?: Array | null; } diff --git a/Web/src/api-services/models/sys-user-ldap.ts b/Web/src/api-services/models/sys-user-ldap.ts index eb5ba0bb7b899924644da3fa0ab9d98f66d08287..32872b784f6dbe32b8d538b6b62723fe00c42c8a 100644 --- a/Web/src/api-services/models/sys-user-ldap.ts +++ b/Web/src/api-services/models/sys-user-ldap.ts @@ -23,48 +23,6 @@ export interface SysUserLdap { * @memberof SysUserLdap */ id?: number; - /** - * 创建时间 - * @type {Date} - * @memberof SysUserLdap - */ - createTime?: Date; - /** - * 更新时间 - * @type {Date} - * @memberof SysUserLdap - */ - updateTime?: Date | null; - /** - * 创建者Id - * @type {number} - * @memberof SysUserLdap - */ - createUserId?: number | null; - /** - * 创建者姓名 - * @type {string} - * @memberof SysUserLdap - */ - createUserName?: string | null; - /** - * 修改者Id - * @type {number} - * @memberof SysUserLdap - */ - updateUserId?: number | null; - /** - * 修改者姓名 - * @type {string} - * @memberof SysUserLdap - */ - updateUserName?: string | null; - /** - * 软删除 - * @type {boolean} - * @memberof SysUserLdap - */ - isDelete?: boolean; /** * 租户Id * @type {number} diff --git a/Web/src/api-services/models/update-dict-data-input.ts b/Web/src/api-services/models/update-dict-data-input.ts index 1f43bbd9a63343885e6d769320f6754025ea5ded..384361eac25b7b9e4f011af9a16b7771c07760fe 100644 --- a/Web/src/api-services/models/update-dict-data-input.ts +++ b/Web/src/api-services/models/update-dict-data-input.ts @@ -66,6 +66,12 @@ export interface UpdateDictDataInput { * @memberof UpdateDictDataInput */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof UpdateDictDataInput + */ + tenantId?: number | null; /** * 字典类型Id * @type {number} @@ -84,6 +90,12 @@ export interface UpdateDictDataInput { * @memberof UpdateDictDataInput */ value: string; + /** + * 编码 + * @type {string} + * @memberof UpdateDictDataInput + */ + code?: string | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/update-dict-type-input.ts b/Web/src/api-services/models/update-dict-type-input.ts index 25755dd6ad1e46a4fe44b349ba34148744ae8ecb..27446cb6b4bc060010acfd5190db466619f85896 100644 --- a/Web/src/api-services/models/update-dict-type-input.ts +++ b/Web/src/api-services/models/update-dict-type-input.ts @@ -67,6 +67,12 @@ export interface UpdateDictTypeInput { * @memberof UpdateDictTypeInput */ isDelete?: boolean; + /** + * 租户Id + * @type {number} + * @memberof UpdateDictTypeInput + */ + tenantId?: number | null; /** * 名称 * @type {string} diff --git a/Web/src/api-services/models/update-pos-input.ts b/Web/src/api-services/models/update-pos-input.ts index 5064ea5a5771ce1ec02ee60b06db935903a1e9ba..7264488093e1a1c9e97eff1bef003dc832cf39be 100644 --- a/Web/src/api-services/models/update-pos-input.ts +++ b/Web/src/api-services/models/update-pos-input.ts @@ -12,6 +12,7 @@ * Do not edit the class manually. */ import { StatusEnum } from './status-enum'; +import { SysUser } from './sys-user'; /** * * @export @@ -96,6 +97,12 @@ export interface UpdatePosInput { * @memberof UpdatePosInput */ status?: StatusEnum; + /** + * 在职人员 + * @type {Array} + * @memberof UpdatePosInput + */ + userList?: Array | null; /** * 名称 * @type {string} diff --git a/Web/src/components/scEcharts/index.vue b/Web/src/components/scEcharts/index.vue index d81a7af891393d0e4dffe5dbadcf3eba5b27dba1..6a1155d06e35f3d5d61d1cb5738a551a3a54d9c6 100644 --- a/Web/src/components/scEcharts/index.vue +++ b/Web/src/components/scEcharts/index.vue @@ -31,7 +31,9 @@ export default { option: { deep: true, handler(v) { - unwarp(this.myChart).setOption(v); + this.$nextTick(() => { + unwarp(this.myChart).setOption(v); + }); }, }, }, diff --git a/Web/src/components/sysDict/sysDict.vue b/Web/src/components/sysDict/sysDict.vue index a41ad254786cfca6ace611d0bf49233532a60e71..69ff3e5869057f3467c2e4aea223aa0389f330c3 100644 --- a/Web/src/components/sysDict/sysDict.vue +++ b/Web/src/components/sysDict/sysDict.vue @@ -1,5 +1,6 @@ + diff --git a/Web/src/views/system/user/component/editUser.vue b/Web/src/views/system/user/component/editUser.vue index 3f9e263a0cf490e2a99bf8048fd825df83174ed7..d4469f12356b366437122deddc7d6834b9c5c199 100644 --- a/Web/src/views/system/user/component/editUser.vue +++ b/Web/src/views/system/user/component/editUser.vue @@ -31,20 +31,14 @@ - - - - - - - - + @@ -130,12 +124,15 @@ + + + - + @@ -150,7 +147,7 @@ - + @@ -175,7 +172,7 @@ - + diff --git a/Web/src/views/system/user/index.vue b/Web/src/views/system/user/index.vue index a2595636e5eb187457c3fc0bc6cb69749937fc88..7e6909730433f32d3b7d7df54bd29d9c87619fd1 100644 --- a/Web/src/views/system/user/index.vue +++ b/Web/src/views/system/user/index.vue @@ -4,7 +4,7 @@ - + @@ -58,7 +58,7 @@ --> diff --git a/Web/src/views/test/device/component/editDevice.vue b/Web/src/views/test/device/component/editDevice.vue new file mode 100644 index 0000000000000000000000000000000000000000..a787743e61f33e95d3a7b67ea804d1ade9ed7138 --- /dev/null +++ b/Web/src/views/test/device/component/editDevice.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/Web/src/views/test/device/component/orgTree.vue b/Web/src/views/test/device/component/orgTree.vue new file mode 100644 index 0000000000000000000000000000000000000000..5d70061898fb5a274288341b072181bf0b0f0865 --- /dev/null +++ b/Web/src/views/test/device/component/orgTree.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..4737a631e1d38af5d1c31f27c76e16f5a8e379f6 --- /dev/null +++ b/Web/src/views/test/device/index.vue @@ -0,0 +1,205 @@ + + + diff --git a/Web/src/views/test/mapping/component/editMapping.vue b/Web/src/views/test/mapping/component/editMapping.vue new file mode 100644 index 0000000000000000000000000000000000000000..e347bda9617ea69951713a218af7b8f0122598f4 --- /dev/null +++ b/Web/src/views/test/mapping/component/editMapping.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/Web/src/views/test/mapping/component/mappingTree.vue b/Web/src/views/test/mapping/component/mappingTree.vue new file mode 100644 index 0000000000000000000000000000000000000000..0608642259c8329a0f58d1aa6893348e259e5414 --- /dev/null +++ b/Web/src/views/test/mapping/component/mappingTree.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/Web/src/views/test/mapping/index.vue b/Web/src/views/test/mapping/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..fa592412f6830a0b34eeba4694e0f33737a9dcb2 --- /dev/null +++ b/Web/src/views/test/mapping/index.vue @@ -0,0 +1,176 @@ + + + diff --git a/Web/src/views/test/report/index.vue b/Web/src/views/test/report/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..1242e05c9ad8037d78c7b15249a234b0b598303e --- /dev/null +++ b/Web/src/views/test/report/index.vue @@ -0,0 +1,8 @@ + + + + diff --git a/Web/src/views/test/task/component/editTask.vue b/Web/src/views/test/task/component/editTask.vue new file mode 100644 index 0000000000000000000000000000000000000000..4905769df489b7072d339df104bc15960d803aab --- /dev/null +++ b/Web/src/views/test/task/component/editTask.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/Web/src/views/test/task/component/orgTree.vue b/Web/src/views/test/task/component/orgTree.vue new file mode 100644 index 0000000000000000000000000000000000000000..d7ec9adf58fd651b3de283379ec27ec418221e68 --- /dev/null +++ b/Web/src/views/test/task/component/orgTree.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/Web/src/views/test/task/index.vue b/Web/src/views/test/task/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..387ecf5a1bc1a729d4a4607aaefc0eaf50a06aed --- /dev/null +++ b/Web/src/views/test/task/index.vue @@ -0,0 +1,171 @@ + + + diff --git a/Web/src/views/test/template/component/deviceDetailConfig.vue b/Web/src/views/test/template/component/deviceDetailConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..46a3f20a7d1f9f3838fc406b359e87f5807649f0 --- /dev/null +++ b/Web/src/views/test/template/component/deviceDetailConfig.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/Web/src/views/test/template/component/editTemplate.vue b/Web/src/views/test/template/component/editTemplate.vue new file mode 100644 index 0000000000000000000000000000000000000000..a4fedc0c0b0acfd1968bc8e5137123145d2a48eb --- /dev/null +++ b/Web/src/views/test/template/component/editTemplate.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/Web/src/views/test/template/component/testTypeConfig.vue b/Web/src/views/test/template/component/testTypeConfig.vue new file mode 100644 index 0000000000000000000000000000000000000000..b95e349eabbfc2b8244e6688ba8426e6b0cc8738 --- /dev/null +++ b/Web/src/views/test/template/component/testTypeConfig.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/Web/src/views/test/template/index.vue b/Web/src/views/test/template/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..13409d21be397ba0aa159cab38f6b60a50390dc3 --- /dev/null +++ b/Web/src/views/test/template/index.vue @@ -0,0 +1,192 @@ + + + + diff --git a/Web/src/views/test/testing/index.vue b/Web/src/views/test/testing/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..87c361d79ac39e417f2a7f0382f368afcfa31d9b --- /dev/null +++ b/Web/src/views/test/testing/index.vue @@ -0,0 +1,8 @@ + + + +