An exception that provides the exception code that will be sent in response to an invalid Modbus request.
Inheritance
System.Object
System.Exception
InvalidModbusRequestException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Message
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: NModbus
Assembly: NModbus.dll
Syntax
public class InvalidModbusRequestException : Exception, ISerializable, _Exception
Constructors
| Improve this Doc View SourceInvalidModbusRequestException(Byte)
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 |
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception