Class InvalidModbusRequestException
An exception that provides the exception code that will be sent in response to an invalid Modbus request.
Inheritance
Implements
Inherited Members
Namespace: NModbus
Assembly: NModbus.dll
Syntax
public class InvalidModbusRequestException : Exception, ISerializable, _Exception
Constructors
| Improve this Doc View SourceInvalidModbusRequestException(Byte)
Initializes a new instance of the InvalidModbusRequestException class with a specified Modbus exception code.
Declaration
public InvalidModbusRequestException(byte exceptionCode)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | exceptionCode | The Modbus exception code to provide to the slave. |
InvalidModbusRequestException(Byte, Exception)
Initializes a new instance of the InvalidModbusRequestException class with a specified Modbus exception code and a reference to the inner exception that is the cause of this exception.
Declaration
public InvalidModbusRequestException(byte exceptionCode, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | exceptionCode | The Modbus exception code to provide to the slave. |
System.Exception | innerException | The exception that is the cause of the current exception. If the |
InvalidModbusRequestException(String, Byte)
Initializes a new instance of the InvalidModbusRequestException class with a specified error message and Modbus exception code.
Declaration
public InvalidModbusRequestException(string message, byte exceptionCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
System.Byte | exceptionCode | The Modbus exception code to provide to the slave. |
InvalidModbusRequestException(String, Byte, Exception)
Initializes a new instance of the InvalidModbusRequestException class with a specified Modbus exception code and a reference to the inner exception that is the cause of this exception.
Declaration
public InvalidModbusRequestException(string message, byte exceptionCode, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
System.Byte | exceptionCode | The Modbus exception code to provide to the slave. |
System.Exception | innerException | The exception that is the cause of the current exception. If the |
Properties
| Improve this Doc View SourceExceptionCode
Gets the Modbus exception code to provide to the slave.
Declaration
public byte ExceptionCode { get; }
Property Value
Type | Description |
---|---|
System.Byte |