50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using Aurora.Api;
|
|
using Aurora.Api.DataType;
|
|
using Aurora.Api.Devices;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.IO.Ports;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AuroraLight
|
|
{
|
|
public class LightConfig : IDeviceConfig
|
|
{
|
|
[DisplayName("Simulation Mode (this device)")]
|
|
public bool IsSimul { get; set; } = false;
|
|
|
|
public IConnConfig ConnConfig { get; set; }
|
|
public LightConfig()
|
|
{
|
|
ConnConfig = new SerialConnConfig() {
|
|
PortNum = 1,
|
|
BaudRate = 19200,
|
|
Parity = Parity.None,
|
|
StopBits = StopBits.One,
|
|
DataBits = 8,
|
|
ReadTimeout = 500
|
|
};
|
|
}
|
|
|
|
public static LightConfig GetDefaultConfig()
|
|
{
|
|
var config = new LightConfig();
|
|
config.IsSimul = false;
|
|
config.ConnConfig = new SerialConnConfig() {
|
|
PortNum = 1,
|
|
BaudRate = 19200,
|
|
Parity = Parity.None,
|
|
StopBits = StopBits.One,
|
|
DataBits = 8,
|
|
ReadTimeout = 500
|
|
};
|
|
|
|
return config;
|
|
}
|
|
}
|
|
}
|
|
|