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:
@version@ (@date@)
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

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

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

Returns:
the content as unsigned short (int).

toShort

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

Returns:
the content as short.

toBytes

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

Returns:
a byte[] with length 2.


Copyright © 2010. All Rights Reserved.