Esempio n. 1
0
 /// <summary>
 /// 생성자
 /// </summary>
 /// <param name="innerException">내부 예외</param>
 /// <param name="request">Modbus 요청</param>
 public ModbusCommException(Exception innerException, ModbusRequest request) : base(null, innerException)
 {
     Code          = ModbusCommErrorCode.NotDefined;
     ReceivedBytes = new byte[0];
     Request       = request;
 }
Esempio n. 2
0
 /// <summary>
 /// 생성자
 /// </summary>
 /// <param name="errorCode">Modbus 통신 오류 코드</param>
 /// <param name="receivedMessage">받은 메시지</param>
 /// <param name="innerException">내부 예외</param>
 /// <param name="request">Modbus 요청</param>
 public ModbusCommException(ModbusCommErrorCode errorCode, IEnumerable <byte> receivedMessage, Exception innerException, ModbusRequest request) : base(null, innerException)
 {
     Code          = errorCode;
     ReceivedBytes = receivedMessage?.ToArray() ?? new byte[0];
     Request       = request;
 }
Esempio n. 3
0
 /// <summary>
 /// 생성자
 /// </summary>
 /// <param name="request">Modbus 요청</param>
 protected ModbusResponse(ModbusRequest request)
 {
     Request = request ?? throw new ArgumentNullException(nameof(request));
 }