File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
Modules/Wu.CommTool.Modules.ModbusRtu/Models Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ public partial class MrtuData : ObservableObject
26
26
/// 寄存器地址 起始地址 单位:word
27
27
/// </summary>
28
28
[ ObservableProperty ]
29
- private int registerAddr ;
29
+ private ushort registerAddr ;
30
30
31
- /// 寄存器地址16进制
32
- /// </summary>
33
- [ ObservableProperty ]
34
- private int registerAddrHex ;
31
+ ///// 寄存器地址16进制
32
+ ///// </summary>
33
+ // [ObservableProperty]
34
+ // private ushort registerAddrHex;
35
35
36
36
/// <summary>
37
37
/// 寄存器地址 最后一个地址 单位:word
Original file line number Diff line number Diff line change @@ -229,16 +229,15 @@ public void UpdateState()
229
229
var onlineCount = MrtuDatas . Where ( x => x . State == true ) . Count ( ) ;
230
230
if ( onlineCount == MrtuDatas . Count )
231
231
{
232
- DeviceState = DeviceState . Online ;
232
+ DeviceState = DeviceState . Online ; //全部在线
233
233
}
234
234
else if ( onlineCount == 0 )
235
235
{
236
- DeviceState = DeviceState . Offline ;
236
+ DeviceState = DeviceState . Offline ; //全部离线
237
237
}
238
238
else if ( onlineCount < MrtuDatas . Count )
239
239
{
240
- DeviceState = DeviceState . Warning ; //警告 存在通讯失败的测点
240
+ DeviceState = DeviceState . Warning ; //存在离线的测点
241
241
}
242
-
243
242
}
244
243
}
Original file line number Diff line number Diff line change @@ -544,7 +544,6 @@ private void ReceiveFrame()
544
544
}
545
545
}
546
546
547
- //TODO Dispose
548
547
public void Dispose ( )
549
548
{
550
549
You can’t perform that action at this time.
0 commit comments