24 lines
538 B
C#
24 lines
538 B
C#
using InnovEnergy.Lib.Protocols.Modbus.Channels;
|
|
using InnovEnergy.Lib.Protocols.Modbus.Clients;
|
|
using InnovEnergy.Lib.Units;
|
|
using InnovEnergy.Lib.Utils;
|
|
|
|
namespace InnovEnergy.Lib.Devices.EmuMeter;
|
|
|
|
public static class Program
|
|
{
|
|
public static Task Main(string[] args)
|
|
{
|
|
var ch = new TcpChannel("localhost", 5004);
|
|
var cl = new ModbusTcpClient(ch, 1);
|
|
var d = new EmuMeterDevice(cl);
|
|
|
|
while (true)
|
|
{
|
|
var x = d.Read();
|
|
x.ToCsv().WriteLine();
|
|
}
|
|
|
|
|
|
}
|
|
} |