Files
gidrolock-configurator/Model.cs
2025-06-24 10:09:11 +03:00

49 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
namespace Gidrolock_Modbus_Scanner
{
public class Device
{
public string name;
public byte id;
public string modelName;
public Entry firmware;
public Entry baudRate;
public Entry valveStatus;
public Entry alarmStatus;
public bool hasCleaningMode;
public Entry cleaningMode;
public bool hasBattery;
public Entry batteryCharge;
public Entry batteryUsed; // питание от баттареи/электросети для устройств с баттареями
public int wiredSensors;
public bool hasScenarioSensor;
public Entry sensorAlarm;
public List<Entry> wspPlusMode; // Premium Plus only for now
public List<Entry> wiredLineBreak;
public Entry radioStatus;
}
public struct Entry
{
public RegisterType registerType;
public ushort address;
public ushort length;
public Entry(RegisterType registerType, ushort address, ushort length = 1)
{
this.registerType = registerType;
this.address = address;
this.length = length;
}
}
public enum RegisterType { Coil = 1, Discrete = 2, Holding = 3, Input = 4}
}