41 lines
997 B
C#
41 lines
997 B
C#
using Aurora.Api;
|
|
using Aurora.Api.Devices;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO.Ports;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AuroraTestDevice.Devices
|
|
{
|
|
public class TestDeviceConfig : IDeviceConfig
|
|
{
|
|
public IConnConfig ConnConfig { get; set; }
|
|
|
|
public bool IsSimul { get; set; }
|
|
public TestDeviceConfig()
|
|
{
|
|
ConnConfig = new SerialConnConfig()
|
|
{
|
|
PortNum = 13,
|
|
BaudRate = 38400,
|
|
Parity = Parity.None,
|
|
StopBits = StopBits.One,
|
|
DataBits = 8,
|
|
NewLine = "\n", // binary 통신이아니라 문자열 통신 / NewLine이 없으면 통신 응답이 없음
|
|
ReadTimeout = 1000
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
public static TestDeviceConfig GetDeviceConfig()
|
|
{
|
|
return new TestDeviceConfig();
|
|
|
|
}
|
|
}
|
|
}
|