public abstract class AbstractRegister extends Object implements Register
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
m_Register
The word (byte[2]) holding the register content.
|
| Constructor and Description |
|---|
AbstractRegister() |
| Modifier and Type | Method and Description |
|---|---|
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).
|
protected byte[] m_Register
public int getValue()
InputRegistergetValue in interface InputRegisterpublic final int toUnsignedShort()
InputRegistertoUnsignedShort in interface InputRegisterpublic final void setValue(int v)
Registerpublic final short toShort()
InputRegistertoShort in interface InputRegisterpublic final void setValue(short s)
Registerpublic byte[] toBytes()
InputRegistertoBytes in interface InputRegisterCopyright © 2017. All rights reserved.