2026-01-26 14:51:28 +09:00

56 lines
1.6 KiB
C#

using Aurora.Api;
using Aurora.Api.Devices;
using Aurora.View;
using PropertyTools.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AuroraACS
{
public class AddrInfo : NotifyPropertyChangedBase
{
private int _Value;
public int Port { get; set; }
public int Bit { get; set; }
public string Name { get; set; }
public int StableTime { get; set; } = 0; // OnDelay, OffDelay
public int AlarmCode { get; set; }
public int Timeout { get; set; } = 5000;
[Browsable(false)]
public int Value {
get => _Value; set => SetProperty(ref _Value, value);
}
}
public enum eIOType
{
Internal,
BeckHoff
}
public class ACSIOConfig : IDeviceConfig
{
public IConnConfig ConnConfig { get; set; }
public eIOType Type { get; set; }
[VisibleBy("Type", eIOType.BeckHoff)]
public string InputIOName { get; set; } = "ECAT_IN";
[VisibleBy("Type", eIOType.BeckHoff)]
public string OutputIOName { get; set; } = "ECAT_OUT";
public int IO_COUNT { get; set; } = 16;
public int IO_INPUT_BOARD_NUM { get; set; } = 4;
public int IO_OUTPUT_BOARD_NUM { get; set; } = 4;
public List<AddrInfo> InputList { get; set; } = new List<AddrInfo>();
public List<AddrInfo> OutputList { get; set; } = new List<AddrInfo>();
public ACSIOConfig()
{
ConnConfig = null;
}
}
}