Exception: Modbus::ModbusError
- Inherits:
-
StandardError
- Object
- StandardError
- Modbus::ModbusError
- Defined in:
- lib/modbus/exceptions.rb
Direct Known Subclasses
Acknowledge, GatewayPathUnavailable, GatewayTargetDeviceFailedToRespond, IllegalDataAddress, IllegalDataValue, IllegalFunction, MemoryParityError, ServerDeviceBusy, ServerDeviceFailure
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(msg) ⇒ ModbusError
constructor
A new instance of ModbusError.
Constructor Details
#initialize(msg) ⇒ ModbusError
Returns a new instance of ModbusError.
12 13 14 15 |
# File 'lib/modbus/exceptions.rb', line 12 def initialize(msg) super @code = self.class::CODE end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/modbus/exceptions.rb', line 10 def code @code end |