58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using Aurora.Api;
|
|
using Aurora.Api.Devices;
|
|
using PropertyTools.DataAnnotations;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using static AuroraTriggerBoard.Trigger;
|
|
|
|
namespace AuroraTriggerBoard
|
|
{
|
|
public class TriggerV3Config : IDeviceConfig
|
|
{
|
|
[DisplayName("Simulation Mode (this device)")]
|
|
public bool IsSimul { get; set; } = false;
|
|
|
|
public IConnConfig ConnConfig { get; set; }
|
|
public bool EncEnable { get; set; } = false;
|
|
public EncoderDirection EncDir { get; set; } = EncoderDirection.Forward;
|
|
public int RunMode { get; set; } = 0;
|
|
public bool Inputpol { get; set; } = false;
|
|
public bool Triggerpol { get; set; } = false;
|
|
public bool Strobepol { get; set; } = false;
|
|
public int StartDelay { get; set; } = 0;
|
|
public int triggerwidth { get; set; } = 0;
|
|
public int triggercnt { get; set; } = 0;
|
|
public int triggerpulse { get; set; } = 0;
|
|
public int StrobeStartDelay { get; set; } = 0;
|
|
public int StrobeWidth { get; set; } = 0;
|
|
public int StrobeCnt { get; set; } = 0;
|
|
public int StrobePulse { get; set; } = 0;
|
|
|
|
public TriggerV3Config()
|
|
{
|
|
ConnConfig = new SerialConnConfig() {
|
|
BaudRate = 9600,
|
|
DataBits = 8,
|
|
Parity = System.IO.Ports.Parity.None,
|
|
StopBits = System.IO.Ports.StopBits.One
|
|
};
|
|
}
|
|
|
|
public static TriggerV3Config GetDefaultConfig()
|
|
{
|
|
var config = new TriggerV3Config();
|
|
config.ConnConfig = new SerialConnConfig() {
|
|
BaudRate = 9600,
|
|
DataBits = 8,
|
|
Parity = System.IO.Ports.Parity.None,
|
|
StopBits = System.IO.Ports.StopBits.One
|
|
};
|
|
|
|
return config;
|
|
}
|
|
}
|
|
}
|