public class VariableWatcher
extends android.os.AsyncTask<java.lang.Void,java.lang.Void,java.lang.Void>
Constructor and Description |
---|
VariableWatcher(Variable variable,
IoTizeClient IoTizeClient) |
Modifier and Type | Method and Description |
---|---|
boolean |
addVirtualVariable(VirtualVariable var)
Register a new HMI variable to monitor.
|
void |
forceRefresh() |
long |
getAcqNextTime() |
long |
getLastSendTime() |
Command |
getRequest() |
java.nio.ByteBuffer |
getValue()
Get the current value of the variable.
|
Variable |
getVariable() |
java.util.HashMap<java.lang.String,VirtualVariable> |
getVirtualVaraibles() |
VirtualVariable |
getVirtualVariable(java.lang.String name)
Search HMI variable with name as parameter.
|
java.lang.Integer |
hasChanged(java.nio.ByteBuffer data)
Check if the IoTize variable has changed of value.
|
boolean |
isForced() |
java.util.ArrayList<VirtualVariable> |
newValues(byte[] value) |
java.util.ArrayList<VirtualVariable> |
newValues(java.nio.ByteBuffer data)
Check all the HMI variables registered if they have changed.
|
boolean |
removeVirtualVariable(java.lang.String name)
Unregister a HMI variable.
|
void |
setAcqNextTime() |
void |
setLastSendTime() |
void |
unForceRefresh() |
public VariableWatcher(Variable variable, IoTizeClient IoTizeClient)
public Variable getVariable()
public Command getRequest()
public java.util.HashMap<java.lang.String,VirtualVariable> getVirtualVaraibles()
public VirtualVariable getVirtualVariable(java.lang.String name)
name
- : name of the variable to search.public boolean addVirtualVariable(VirtualVariable var)
var
- : new variable to register.public boolean removeVirtualVariable(java.lang.String name)
name
- : name of the variable to unregister.public java.util.ArrayList<VirtualVariable> newValues(byte[] value)
public java.util.ArrayList<VirtualVariable> newValues(java.nio.ByteBuffer data)
data
- : data received.public java.nio.ByteBuffer getValue()
public java.lang.Integer hasChanged(java.nio.ByteBuffer data)
data
- : data received.public long getAcqNextTime()
public void setAcqNextTime()
public long getLastSendTime()
public void setLastSendTime()
public void forceRefresh()
public void unForceRefresh()
public boolean isForced()