You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB
C#

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace IoTSharp.Gateway.Modbus.Data
{
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
[JsonConverter(typeof(StringEnumConverter))]
public enum FunCode
{
ReadCoils =1,
ReadDiscreteInputs=2,
ReadMultipleHoldingRegisters = 3,
ReadInputRegisters=4,
WriteSingleCoil=5,
WriteSingleHoldingRegister=6,
WriteMultipleCoils=15,
WriteMultipleHoldingRegisters=16
}
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
[JsonConverter(typeof(StringEnumConverter))]
public enum DataType
{
Boolean,
String,
Long,
Double,
DateTime
}
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
[JsonConverter(typeof(StringEnumConverter))]
public enum DataCatalog
{
AttributeData,
TelemetryData,
}
}