50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
using Aurora.Api;
|
|
using PropertyTools.DataAnnotations;
|
|
|
|
namespace AuroraIO
|
|
{
|
|
internal class IOUnitConnConfig : IConnConfig
|
|
{
|
|
[InputFilePath]
|
|
public string IOInterfaceMapDI { get; set; } = "";
|
|
[InputFilePath]
|
|
public string IOInterfaceMapDO { get; set; } = "";
|
|
[InputFilePath]
|
|
public string IOInterfaceMapAI { get; set; } = "";
|
|
[InputFilePath]
|
|
public string IOInterfaceMapAO { get; set; } = "";
|
|
|
|
}
|
|
public class IOUnitConfig : IDeviceConfig
|
|
{
|
|
[DisplayName("Simulation Mode (this device)")]
|
|
public bool IsDeviceSimul { get; set; }
|
|
[SelectorStyle(SelectorStyle.ComboBox)]
|
|
public eIOBoardType BoardType { get; set; }
|
|
|
|
[Category("PAIX")]
|
|
[VisibleBy("BoardType", eIOBoardType.PAIX)]
|
|
public string DIDOIP { get; set; } = "192.168.0.11";
|
|
[Category("MappingFile")]
|
|
public IConnConfig ConnConfig { get; set; }
|
|
|
|
#region ACS Config
|
|
[VisibleBy("BoardType", eIOBoardType.ACS)]
|
|
public int InputBoardCount { get; set; } = 4;
|
|
[VisibleBy("BoardType", eIOBoardType.ACS)]
|
|
public int OutputBoardCount { get; set; } = 4;
|
|
[VisibleBy("BoardType", eIOBoardType.ACS)]
|
|
public int BoardPortCount { get; set; } = 8;
|
|
[VisibleBy("BoardType", eIOBoardType.ACS)]
|
|
public string InputIOName { get; set; } = "IN";
|
|
[VisibleBy("BoardType", eIOBoardType.ACS)]
|
|
public string OutputIOName { get; set; } = "OUT";
|
|
#endregion
|
|
|
|
public IOUnitConfig()
|
|
{
|
|
ConnConfig = new IOUnitConnConfig();
|
|
}
|
|
}
|
|
}
|