2023-05-23 23:54:28 +08:00
|
|
|
|
#region copyright
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
|
|
|
|
|
|
// 此代码版权(除特别声明外的代码)归作者本人Diego所有
|
|
|
|
|
|
// 源代码使用协议遵循本仓库的开源协议及附加协议
|
2023-07-16 17:48:22 +08:00
|
|
|
|
// Gitee源代码仓库:https://gitee.com/diego2098/ThingsGateway
|
2023-05-23 23:54:28 +08:00
|
|
|
|
// Github源代码仓库:https://github.com/kimdiego2098/ThingsGateway
|
2023-07-16 17:48:22 +08:00
|
|
|
|
// 使用文档:https://diego2098.gitee.io/thingsgateway-docs/
|
2023-05-23 23:54:28 +08:00
|
|
|
|
// QQ群:605534569
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2023-08-07 15:09:53 +08:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
2023-05-23 23:54:28 +08:00
|
|
|
|
namespace ThingsGateway.Foundation.Adapter.OPCDA;
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// OPCDA连接配置项
|
|
|
|
|
|
/// </summary>
|
2023-03-09 11:19:48 +08:00
|
|
|
|
public class OPCNode
|
|
|
|
|
|
{
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否订阅
|
|
|
|
|
|
/// </summary>
|
2023-09-30 23:05:53 +08:00
|
|
|
|
[Description("订阅")]
|
2023-06-07 18:03:57 +08:00
|
|
|
|
public bool ActiveSubscribe { get; set; } = true;
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 内部检测重连间隔/min
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("重连间隔/min")]
|
|
|
|
|
|
public int CheckRate { get; set; } = 30;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 死区
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("死区")]
|
2023-06-07 18:03:57 +08:00
|
|
|
|
public float DeadBand { get; set; } = 0;
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分组大小
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("分组大小")]
|
2023-06-07 18:03:57 +08:00
|
|
|
|
public int GroupSize { get; set; } = 500;
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// OPCIP
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("OPCIP")]
|
2023-05-25 00:11:00 +08:00
|
|
|
|
public string OPCIP { get; set; } = "localhost";
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// OPCNAME
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("OPCNAME")]
|
2023-05-25 00:11:00 +08:00
|
|
|
|
public string OPCName { get; set; } = "Kepware.KEPServerEX.V6";
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 订阅间隔
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Description("订阅间隔")]
|
2023-03-09 11:19:48 +08:00
|
|
|
|
public int UpdateRate { get; set; } = 1000;
|
2023-08-07 15:09:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2023-03-09 11:19:48 +08:00
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
2023-08-07 15:09:53 +08:00
|
|
|
|
return $"{(string.IsNullOrEmpty(OPCIP) ? "localhost" : OPCIP)}:{OPCName}";
|
2023-03-09 11:19:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|