using Mirle.Component.MPLC.DataBlocks;
using System.Collections.Generic;
namespace Mirle.Component.MPLC
{
///
/// 控制器資訊
///
public class PLCHostInfo
{
///
/// 建構式
///
/// 控制器編號
/// 控制器站點編號
/// 區塊資訊
public PLCHostInfo(string hostID, int actLogicalStationNo, IEnumerable blockInfos)
{
HostID = hostID;
IPAddress = string.Empty;
TcpPort = 0;
ActLogicalStationNo = actLogicalStationNo;
BlockInfos = blockInfos;
}
///
/// 建構式
///
/// 控制器編號
/// 網路位址
/// 通訊埠口
/// 區塊資訊
public PLCHostInfo(string hostID, string ipAddress, int tcpPort, IEnumerable blockInfos)
{
HostID = hostID;
IPAddress = ipAddress;
TcpPort = tcpPort;
ActLogicalStationNo = 0;
BlockInfos = blockInfos;
}
///
/// 控制器編號
///
public string HostID { get; }
///
/// 網路位址
///
public string IPAddress { get; }
///
/// 通訊埠口
///
public int TcpPort { get; }
///
/// 控制器站點編號
///
public int ActLogicalStationNo { get; }
///
/// 區塊資訊
///
public IEnumerable BlockInfos { get; }
}
}