using Aurora.Api; using Aurora.Api.DataType; using Aurora.Api.Devices; using System.ComponentModel; using System.IO.Ports; namespace AuroraPowerMeter { public class PowerMeterConfig : IDeviceConfig { public IConnConfig ConnConfig { get; set; } public PowerMeterConfig() { ConnConfig = new SerialConnConfig() { BaudRate = 9600, DataBits = 8, StopBits = StopBits.One, Parity = Parity.None, PortNum = 1, NewLine = "\n", ReadTimeout = 5000, WriteTimeout = 1000 }; } public static PowerMeterConfig GetDefaultConfig() { var config = new PowerMeterConfig(); config.ConnConfig = new SerialConnConfig() { BaudRate = 9600, DataBits = 8, StopBits = StopBits.One, Parity = Parity.None, PortNum = 1, NewLine = "\n", ReadTimeout = 5000, WriteTimeout = 1000 }; return config; } public static PowerMeterConfig GetGentecIntegraConfig() { var config = new PowerMeterConfig(); config.ConnConfig = new SerialConnConfig() { BaudRate = 115200, DataBits = 8, StopBits = StopBits.One, Parity = Parity.None, PortNum = 1, NewLine = "\n", ReadTimeout = 5000, WriteTimeout = 1000 }; return config; } } }