|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wimpi.modbus.procimg.AbstractRegister
public abstract class AbstractRegister
Abstract class for a register.
Constructor Summary | |
---|---|
AbstractRegister()
|
Method Summary | |
---|---|
int |
getValue()
Returns the value of this InputRegister. |
void |
setValue(byte[] bytes)
Sets the content of this register from the given raw bytes. |
void |
setValue(int v)
Sets the content of this Register from the given unsigned 16-bit value (unsigned short). |
void |
setValue(short s)
Sets the content of this register from the given signed 16-bit value (short). |
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). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractRegister()
Method Detail |
---|
public int getValue()
InputRegister
getValue
in interface InputRegister
public final int toUnsignedShort()
InputRegister
toUnsignedShort
in interface InputRegister
public final void setValue(int v)
Register
setValue
in interface Register
v
- the value as unsigned short (int).public final short toShort()
InputRegister
toShort
in interface InputRegister
public final void setValue(short s)
Register
setValue
in interface Register
s
- the value as short.public byte[] toBytes()
InputRegister
toBytes
in interface InputRegister
public final void setValue(byte[] bytes)
Register
setValue
in interface Register
bytes
- the raw data as byte[].
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |