Innovenergy_trunk/csharp/Lib/Devices/EmuMeter/EmuMeterDevice.cs

21 lines
598 B
C#
Raw Normal View History

2023-05-06 13:41:39 +00:00
using InnovEnergy.Lib.Protocols.Modbus.Channels;
2023-02-16 12:57:06 +00:00
using InnovEnergy.Lib.Protocols.Modbus.Clients;
2023-05-06 13:41:39 +00:00
using InnovEnergy.Lib.Protocols.Modbus.Slaves;
2023-02-16 12:57:06 +00:00
namespace InnovEnergy.Lib.Devices.EmuMeter;
2023-05-06 13:41:39 +00:00
public class EmuMeterDevice: ModbusDevice<EmuMeterRegisters>
2023-02-16 12:57:06 +00:00
{
2023-05-06 13:41:39 +00:00
public EmuMeterDevice(String hostname, UInt16 port = 502, Byte slaveId = 1) : this(new TcpChannel(hostname, port), slaveId)
2023-02-16 12:57:06 +00:00
{
}
2023-05-06 13:41:39 +00:00
public EmuMeterDevice(Channel channel, Byte slaveId = 1) : base(new ModbusTcpClient(channel, slaveId))
2023-02-16 12:57:06 +00:00
{
}
2023-03-01 12:35:33 +00:00
2023-05-06 13:41:39 +00:00
public EmuMeterDevice(ModbusClient client) : base(client)
2023-02-16 12:57:06 +00:00
{
}
}