Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
namespace RobotNet10.RobotApp.Client.Shared.Devices;
/// <summary>
/// DTO cho Modbus value (register)
/// </summary>
public struct ModbusValue
{
public ushort Address { get; set; }
public ushort Index { get; set; }
public ushort Value { get; set; }
public string Name { get; set; }
}
/// <summary>
/// DTO cho Modbus bool value (coil/discrete input)
/// </summary>
public struct ModbusBoolValue
{
public ushort Address { get; set; }
public ushort Index { get; set; }
public bool Value { get; set; }
public string Name { get; set; }
}
/// <summary>
/// DTO cho Modbus range data
/// </summary>
public struct ModbusRangeData
{
public ushort StartAddress { get; set; }
public ushort Quantity { get; set; }
public string Name { get; set; }
public string[] ChildrenNames { get; set; }
public ModbusValue[] Values { get; set; }
public ModbusBoolValue[] BoolValues { get; set; }
}
/// <summary>
/// DTO cho ModbusTCP data
/// </summary>
public struct ModbusTcpData
{
public string IpAddress { get; set; }
public int Port { get; set; }
public byte SlaveId { get; set; }
public bool IsConnected { get; set; }
public ModbusRangeData[] HoldingRegisters { get; set; }
public ModbusRangeData[] InputRegisters { get; set; }
public ModbusRangeData[] Coils { get; set; }
public ModbusRangeData[] DiscreteInputs { get; set; }
}