| | |
| | | return res?.IsSuccess == true; |
| | | } |
| | | |
| | | public bool ReadDIInt(string address, out int? res, out string msg) |
| | | public bool ReadDIInt(string address, out int res, out string msg) |
| | | { |
| | | var result = client?.ReadInt32($"x=2;{address}"); |
| | | msg = result?.Message; |
| | | res = result?.Content; |
| | | res = result?.Content ?? 0; |
| | | return result?.IsSuccess == true; |
| | | } |
| | | |
| | | public bool ReadDOInt(string address, out int? res, out string msg) |
| | | public bool ReadDOInt(string address, out int res, out string msg) |
| | | { |
| | | var result = client?.ReadInt32(address); |
| | | msg = result?.Message; |
| | | res = result?.Content; |
| | | res = result?.Content ?? 0; |
| | | return result?.IsSuccess == true; |
| | | } |
| | | |