public final class TapNLinkVarByteArray extends TapNLinkVar
Constructor and Description |
---|
TapNLinkVarByteArray(short id,
java.lang.String name,
int periodms,
int size)
Creates a new Java object to manage the specified byte array variable that is
configured in the tap.
|
Modifier and Type | Method and Description |
---|---|
short |
getSize()
Returns the length of the variable array.
|
java.lang.String |
getString()
Returns the value of the variable, formatted as an ASCII string.
|
byte[] |
getValue()
Returns the value of the variable, as a byte array
If the read action failed, the last retrieved value is returned.
|
byte[] |
getValue(boolean generateException)
Returns the value of the variable, as a byte array
If generateException is true, a TapNLinkException will be thrown if the read action fails.
|
void |
setValue(byte[] array)
Sets the variable with the given byte array.
|
void |
setValue(byte[] array,
boolean generateException)
Sets the variable with the given byte array.
|
public TapNLinkVarByteArray(short id, java.lang.String name, int periodms, int size)
id
- the id of the variable in the tapname
- the name of the variableperiodms
- the period at which the variable is monitoredsize
- the size of the arraypublic final void setValue(byte[] array)
array
- the new value of the variablepublic final void setValue(byte[] array, boolean generateException)
array
- the new value of the variablegenerateException
- public final byte[] getValue()
public final byte[] getValue(boolean generateException)
generateException
- public final java.lang.String getString()
public final short getSize()