net.wimpi.modbus
Class ModbusSlaveException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.wimpi.modbus.ModbusException
              extended by net.wimpi.modbus.ModbusSlaveException
All Implemented Interfaces:
Serializable

public class ModbusSlaveException
extends ModbusException

Class that implements a ModbusSlaveException. Instances of this exception are thrown when the slave returns a Modbus exception.

Version:
@version@ (@date@)
Author:
Dieter Wimberger
See Also:
Serialized Form

Constructor Summary
ModbusSlaveException(int TYPE)
          Constructs a new ModbusSlaveException instance with the given type.
Types are defined according to the protocol specification in net.wimpi.modbus.Modbus.
 
Method Summary
 String getMessage()
           
 int getType()
          Returns the type of this ModbusSlaveException.
 boolean isType(int TYPE)
          Tests if this ModbusSlaveException is of a given type.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModbusSlaveException

public ModbusSlaveException(int TYPE)
Constructs a new ModbusSlaveException instance with the given type.
Types are defined according to the protocol specification in net.wimpi.modbus.Modbus.

Parameters:
TYPE - the type of exception that occured.
See Also:
Modbus
Method Detail

getType

public int getType()
Returns the type of this ModbusSlaveException.
Types are defined according to the protocol specification in net.wimpi.modbus.Modbus.

Returns:
the type of this ModbusSlaveException.
See Also:
Modbus

isType

public boolean isType(int TYPE)
Tests if this ModbusSlaveException is of a given type.
Types are defined according to the protocol specification in net.wimpi.modbus.Modbus.

Parameters:
TYPE - the type to test this ModbusSlaveException type against.
Returns:
true if this ModbusSlaveException is of the given type, false otherwise.
See Also:
Modbus

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable


Copyright © 2010. All Rights Reserved.