jamod at SF

net.wimpi.modbus.procimg
Interface InputRegister

All Known Subinterfaces:
Register
All Known Implementing Classes:
AbstractRegister, ObservableRegister, SimpleInputRegister, SimpleRegister, SynchronizedAbstractRegister

public interface InputRegister

Interface defining an input register.

This register is read only from the slave side.

Version:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger

Method Summary
 int getValue()
          Returns the value of this InputRegister.
 byte[] toBytes()
          Returns the content of this Register as bytes.
 short toShort()
          Returns the content of this Register as signed 16-bit value (short).
 int toUnsignedShort()
          Returns the content of this Register as unsigned 16-bit value (unsigned short).
 

Method Detail

getValue

public int getValue()
Returns the value of this InputRegister. The value is stored as int but should be treated like a 16-bit word.

Returns:
the value as int.

toUnsignedShort

public int toUnsignedShort()
Returns the content of this Register as unsigned 16-bit value (unsigned short).

Returns:
the content as unsigned short (int).

toShort

public short toShort()
Returns the content of this Register as signed 16-bit value (short).

Returns:
the content as short.

toBytes

public byte[] toBytes()
Returns the content of this Register as bytes.

Returns:
a byte[] with length 2.

jamod at SF

Copyright © 2002-2004 jamod development team.