| | |
| | | |
| | | if (devicePro == null) |
| | | { |
| | | throw new Exception("未找到协议信息"); |
| | | throw new Exception("未找到协议信息:" + deviceChildCode); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <exception cref="Exception"></exception> |
| | | public T ReadCustomer<T>(string deviceChildCode, string deviceProParamType) where T : IDataTransfer, new() |
| | | { |
| | | if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络"); |
| | | if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络:" + DeviceName); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == deviceProParamType && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | |
| | | if (devicePro == null) |
| | | { |
| | | throw new Exception("未找到协议信息"); |
| | | throw new Exception("未找到协议信息:" + deviceChildCode); |
| | | } |
| | | else |
| | | { |