net.sourceforge.jmodbus
Class ModbusTCPMaster

java.lang.Object
  |
  +--net.sourceforge.jmodbus.Modbus
        |
        +--net.sourceforge.jmodbus.ModbusMaster
              |
              +--net.sourceforge.jmodbus.ModbusTCPMaster

public class ModbusTCPMaster
extends ModbusMaster

Class to implement a Modbus TCP Master device. This class only defines what type of transport if to be used, all the work in generating and sending requests is performed by the methods in the ModbusMaster class.


Fields inherited from class net.sourceforge.jmodbus.Modbus
ADDRESS_MAX, COIL_OFF, COIL_ON, debug, EXCEPTION_MODIFIER, ILLEGAL_DATA_ADDRESS, ILLEGAL_DATA_VALUE, ILLEGAL_FUNCTION, ILLEGAL_RESPONSE_LENGTH, MAX_MESSAGE_LENGTH, READ_COILS, READ_EXCEPTION_STATUS, READ_INPUT_DISCRETES, READ_INPUT_REGISTERS, READ_MULTIPLE_REGISTERS, transport, UINT16_MAX, UINT16_MIN, UINT8_MAX, UINT8_MIN, WRITE_COIL, WRITE_MULTIPLE_REGISTERS, WRITE_SINGLE_REGISTER
 
Constructor Summary
ModbusTCPMaster(java.lang.String host, int port)
          Constructor that uses the TCP transport.
 
Methods inherited from class net.sourceforge.jmodbus.ModbusMaster
readInputRegisters, readInputRegisters, readMultipleRegisters, readMultipleRegisters, writeMultipleRegisters, writeMultipleRegisters
 
Methods inherited from class net.sourceforge.jmodbus.Modbus
receiveFrame, sendFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModbusTCPMaster

public ModbusTCPMaster(java.lang.String host,
                       int port)
Constructor that uses the TCP transport. A socket will be opened to the specified host, on the specified port.
Parameters:
host - The string name of the host to connect to.
port - The port number to connect to on eht specified host.