Files
KinginfoGateway/src/Foundation/ThingsGateway.Foundation/Channel/IChannelOptions.cs
2025-07-23 16:34:02 +08:00

139 lines
3.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ------------------------------------------------------------------------------
// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
// 此代码版权除特别声明外的代码归作者本人Diego所有
// 源代码使用协议遵循本仓库的开源协议及附加协议
// Gitee源代码仓库https://gitee.com/diego2098/ThingsGateway
// Github源代码仓库https://github.com/kimdiego2098/ThingsGateway
// 使用文档https://thingsgateway.cn/
// QQ群605534569
// ------------------------------------------------------------------------------
using System.IO.Ports;
using ThingsGateway.NewLife;
namespace ThingsGateway.Foundation;
public interface IChannelOptions
{
/// <summary>
/// 通道类型
/// </summary>
ChannelTypeEnum ChannelType { get; set; }
#region
/// <summary>
/// 远程ip
/// </summary>
string RemoteUrl { get; set; }
/// <summary>
/// 本地绑定ip分号分隔例如192.168.1.1:502;192.168.1.2:502表示绑定192.168.1.1:502和192.168.1.2:502
/// </summary>
string BindUrl { get; set; }
#endregion
#region
/// <summary>
/// COM
/// </summary>
string PortName { get; set; }
/// <summary>
/// 波特率
/// </summary>
int BaudRate { get; set; }
/// <summary>
/// 数据位
/// </summary>
int DataBits { get; set; }
/// <summary>
/// 校验位
/// </summary>
Parity Parity { get; set; }
/// <summary>
/// 停止位
/// </summary>
StopBits StopBits { get; set; }
/// <summary>
/// DtrEnable
/// </summary>
bool DtrEnable { get; set; }
/// <summary>
/// RtsEnable
/// </summary>
bool RtsEnable { get; set; }
/// <summary>
/// StreamAsync
/// </summary>
bool StreamAsync { get; set; }
#endregion
/// <summary>
/// 最大并发数量
/// </summary>
int MaxConcurrentCount { get; set; }
/// <summary>
/// 组包缓存时间
/// </summary>
int CacheTimeout { get; set; }
/// <summary>
/// 连接超时时间
/// </summary>
int ConnectTimeout { get; set; }
/// <summary>
/// 通道并发控制锁
/// </summary>
WaitLock WaitLock { get; }
TouchSocketConfig Config { get; set; }
/// <summary>
/// 最大连接数
/// </summary>
int MaxClientCount { get; set; }
/// <summary>
/// 客户端连接滑动过期时间(TCP服务通道时)
/// </summary>
int CheckClearTime { get; set; }
/// <summary>
/// 心跳检测
/// </summary>
string Heartbeat { get; set; }
/// <summary>
/// 心跳检测是否hex
/// </summary>
bool HeartbeatHex { get; set; }
#region dtu终端
/// <summary>
/// 心跳时间
/// </summary>
public int HeartbeatTime { get; set; }
/// <summary>
/// 默认Dtu注册包
/// </summary>
public string DtuId { get; set; }
/// <summary>
/// 默认Dtu注册包是否hex
/// </summary>
bool DtuIdHex { get; set; }
#endregion
public DtuSeviceType DtuSeviceType { get; set; }
}