@Localizer["Sys.BatchEditConfirm"]
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml
index 528140f..3c606e5 100644
--- a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml
+++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Create.cshtml
@@ -10,6 +10,7 @@
+
diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml
index 5d8a4ce..f71ed93 100644
--- a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml
+++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Details.cshtml
@@ -2,16 +2,17 @@
@inject IStringLocalizer Localizer;
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml
index 82f3c63..a425d32 100644
--- a/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml
+++ b/IoTGateway/Areas/BasicData/Views/DeviceVariable/Edit.cshtml
@@ -10,6 +10,7 @@
+
diff --git a/IoTGateway/iotgateway.db b/IoTGateway/iotgateway.db
index 6059c2e..4f4e88c 100644
Binary files a/IoTGateway/iotgateway.db and b/IoTGateway/iotgateway.db differ
diff --git a/Plugins/Drivers/DriverModbusMaster/ModbusMaster.cs b/Plugins/Drivers/DriverModbusMaster/ModbusMaster.cs
index f2e3a99..0eaf7e8 100644
--- a/Plugins/Drivers/DriverModbusMaster/ModbusMaster.cs
+++ b/Plugins/Drivers/DriverModbusMaster/ModbusMaster.cs
@@ -348,7 +348,7 @@ namespace DriverModbusMaster
else if (funCode == 4)
rawBuffers = _master.ReadInputRegisters(SlaveAddress, startAddress, count);
- var retBuffers = ChangeBuffersOrder(rawBuffers, ioarg.Endian);
+ var retBuffers = ChangeBuffersOrder(rawBuffers, ioarg.EndianType);
if (ioarg.ValueType == DataTypeEnum.AsciiString)
retBuffers = rawBuffers;
diff --git a/Plugins/Plugin/DeviceThread.cs b/Plugins/Plugin/DeviceThread.cs
index 70496bb..b0d1526 100644
--- a/Plugins/Plugin/DeviceThread.cs
+++ b/Plugins/Plugin/DeviceThread.cs
@@ -87,7 +87,8 @@ namespace Plugin
{
ID = item.ID,
Address = item.DeviceAddress,
- ValueType = item.DataType
+ ValueType = item.DataType,
+ EndianType = item.EndianType
};
var method = Methods.Where(x => x.Name == item.Method).FirstOrDefault();
if (method == null)
diff --git a/Plugins/PluginInterface/DriverAddressIoArgModel.cs b/Plugins/PluginInterface/DriverAddressIoArgModel.cs
index 21d4c02..8a5d00a 100644
--- a/Plugins/PluginInterface/DriverAddressIoArgModel.cs
+++ b/Plugins/PluginInterface/DriverAddressIoArgModel.cs
@@ -13,10 +13,10 @@ namespace PluginInterface
public object Value { get; set; }
public DataTypeEnum ValueType { get; set; }
- public EndianEnum Endian { get; set; }
+ public EndianEnum EndianType { get; set; }
public override string ToString()
{
- return $"变量ID:{ID},Address:{Address},Value:{Value},ValueType:{ValueType},Endian{Endian}";
+ return $"变量ID:{ID},Address:{Address},Value:{Value},ValueType:{ValueType},Endian:{EndianType}";
}
}
}
diff --git a/Plugins/PluginInterface/EndianEnum.cs b/Plugins/PluginInterface/EndianEnum.cs
index cd33efc..c510e9e 100644
--- a/Plugins/PluginInterface/EndianEnum.cs
+++ b/Plugins/PluginInterface/EndianEnum.cs
@@ -1,19 +1,14 @@
using System.ComponentModel.DataAnnotations;
using System.Xml.Linq;
-namespace PluginInterface
-{
+namespace PluginInterface
+{
public enum EndianEnum
{
- [Display(Name = "无")]
- None,
- [Display(Name = "大端")]
- BigEndian,
- [Display(Name = "小端")]
- LittleEndian,
- [Display(Name = "大端交换")]
- BigEndianSwap,
- [Display(Name = "小端交换")]
- LittleEndianSwap
- }
+ [Display(Name = "无")] None = 0,
+ [Display(Name = "大端")] BigEndian,
+ [Display(Name = "小端")] LittleEndian,
+ [Display(Name = "大端交换")] BigEndianSwap,
+ [Display(Name = "小端交换")] LittleEndianSwap
+ }
}