Add project for Adam6360D
This commit is contained in:
parent
4c76475eac
commit
b68542db27
|
@ -0,0 +1,18 @@
|
||||||
|
using InnovEnergy.Lib.Protocols.Modbus.Channels;
|
||||||
|
using InnovEnergy.Lib.Protocols.Modbus.Clients;
|
||||||
|
using InnovEnergy.Lib.Protocols.Modbus.Slaves;
|
||||||
|
|
||||||
|
namespace InnovEnergy.Lib.Devices.Adam6060;
|
||||||
|
|
||||||
|
public class Adam6360DDevice : ModbusDevice<Adam6360DRegisters>
|
||||||
|
{
|
||||||
|
|
||||||
|
public Adam6360DDevice(String hostname, Byte slaveId, UInt16 port = 502) :
|
||||||
|
this(new TcpChannel(hostname, port), slaveId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Adam6360DDevice(Channel channel, Byte slaveId) : base(new ModbusTcpClient(channel, slaveId))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using InnovEnergy.Lib.Protocols.Modbus.Reflection.Attributes;
|
||||||
|
|
||||||
|
namespace InnovEnergy.Lib.Devices.Adam6060;
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Local")]
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
public class Adam6360DRegisters
|
||||||
|
{
|
||||||
|
[DiscreteInput(1)] public Boolean DigitalInput0 { get; private set; }
|
||||||
|
[DiscreteInput(2)] public Boolean DigitalInput1 { get; private set; }
|
||||||
|
[DiscreteInput(3)] public Boolean DigitalInput2 { get; private set; }
|
||||||
|
[DiscreteInput(4)] public Boolean DigitalInput3 { get; private set; }
|
||||||
|
[DiscreteInput(5)] public Boolean DigitalInput4 { get; private set; }
|
||||||
|
[DiscreteInput(6)] public Boolean DigitalInput5 { get; private set; }
|
||||||
|
[DiscreteInput(7)] public Boolean DigitalInput6 { get; private set; }
|
||||||
|
[DiscreteInput(8)] public Boolean DigitalInput7 { get; private set; }
|
||||||
|
[DiscreteInput(9)] public Boolean DigitalInput8 { get; private set; }
|
||||||
|
[DiscreteInput(10)] public Boolean DigitalInput9 { get; private set; }
|
||||||
|
[DiscreteInput(11)] public Boolean DigitalInput10 { get; private set; }
|
||||||
|
[DiscreteInput(12)] public Boolean DigitalInput11 { get; private set; }
|
||||||
|
[DiscreteInput(13)] public Boolean DigitalInput12 { get; private set; }
|
||||||
|
|
||||||
|
[Coil(33)] public Boolean Relay0 { get; set; }
|
||||||
|
[Coil(34)] public Boolean Relay1 { get; set; }
|
||||||
|
[Coil(35)] public Boolean Relay2 { get; set; }
|
||||||
|
[Coil(36)] public Boolean Relay3 { get; set; }
|
||||||
|
[Coil(37)] public Boolean Relay4 { get; set; }
|
||||||
|
[Coil(38)] public Boolean Relay5 { get; set; }
|
||||||
|
[Coil(39)] public Boolean Relay6 { get; set; }
|
||||||
|
[Coil(40)] public Boolean Relay7 { get; set; }
|
||||||
|
}
|
Loading…
Reference in New Issue