public class AsyncOnNotifyAPI extends java.lang.Object implements IAsyncOnNotifyAPI
First verion of Tap Manager Javascript API
Expose method getX() and result will be available in a global callback method called onNotifyGetX()
Constructor and Description |
---|
AsyncOnNotifyAPI(IIoTizeWebView webView,
IoTizeDevice device)
Instantiate the interface and set the context
|
Modifier and Type | Method and Description |
---|---|
void |
ClearLastErrorMsg()
Clear the last error message.
|
int |
ConnectTarget()
Open the communication between IoTize and target board.
|
int |
DatalogRun() |
int |
DatalogStop() |
int |
DisconnectTarget()
Close the communication between IoTize and target board.
|
int |
GetCurrentHostProtocol()
Get the current protocol communication between smartphone and IoTize.
|
int |
GetCurrentProfileID()
Get current profile ID
|
int |
GetCurrentTargetProtocol()
Get the current protocol communication between target and IoTize.
|
int |
GetHostProtocols()
Retrieve the IoTize host protocols capabilities.
|
int |
GetIoTizeDatalogIsRunning() |
int |
GetIoTizeErrorCode()
Get the IoTized saved error code.
|
int |
GetIoTizeFirmwareVersion()
Retrieve the IoTize firmware version.
|
int |
GetIoTizeLocalPublicPwd() |
int |
GetIoTizeMemoryFree()
Retrieve the IoTize memory free size.
|
int |
GetIoTizeModuleManufacturer()
Retrieve the IoTize module manufacturer.
|
int |
GetIoTizeModuleType()
Retrieve the IoTize module type.
|
int |
GetIoTizeSerialNumber()
Retrieve the IoTize Serial Number.
|
java.lang.String |
GetLastErrorMsg()
Get the last error message encountered.
|
int |
GetProfileName(int ID) |
int |
GetTargetConfigVersion()
Retrieve the target configuration version.
|
int |
GetTargetFirmwareVersion()
Retrieve the target firmware version.
|
int |
GetTargetName()
Retrieve the configured target name.
|
int |
GetTargetProtocols()
Retrieve the IoTize target protocols capabilities.
|
int |
GetVar(java.lang.String name)
Request for a variable value.
|
int |
IsConnected()
Check if IoTize connected to smartphone.
|
boolean |
IsFatalError()
Is the last error a fatal error ?
|
int |
Login(java.lang.String login,
java.lang.String pwd)
User Login
|
int |
Logout()
Logout command to IoTize.
|
void |
notifyCommandResult(Command command,
Response result,
BodyConverter decoder,
java.lang.String methodName,
java.lang.String variableHMIName) |
void |
notifyError(java.lang.String cmd,
int ret) |
int |
RegisterComVar(int ID,
int format,
int number,
int freq)
Register a communication variable.
|
int |
RegisterVar(java.lang.String varName,
int ID,
int index)
Register a variable.
|
int |
ResetIoTize()
Reboot the IoTize module.
|
int |
ResetIoTizeErrorCode()
Reset the IoTize saved error code.
|
int |
ResetTarget()
Reset the target board.
|
int |
SetArrayVar(int ID,
java.lang.String[] value)
Write a array type variable to the target.
|
void |
setContext(android.content.Context mContext) |
int |
SetVar(int ID,
byte[] value) |
int |
SetVar(int ID,
java.lang.Integer value)
Write a variable to the target.
|
int |
SetVar(int ID,
java.lang.Integer[] value) |
int |
SetVar(int ID,
java.lang.String value)
Write a variable to the target.
|
int |
ShowToast(java.lang.String toast)
Show a toast from the web page.
|
void |
startMonitoring()
Start monitoring (this will start refresh and variable acquisition)
|
int |
StartRefresh()
Enables the data refresh.
|
void |
stopMonitoring()
Stop monitoring (this will stop refresh and variable acquisition)
|
int |
StopRefresh()
Disables the data refresh.
|
int |
UnRegisterAll()
UnRegister all communication and HMI variables.
|
int |
UnRegisterComVar(int ID)
UnRegister a communication variable.
|
int |
UnRegisterVar(java.lang.String varName)
UnRegister a variable.
|
public AsyncOnNotifyAPI(IIoTizeWebView webView, IoTizeDevice device)
webView
- iotize webviewdevice
- iotize device objectpublic void stopMonitoring()
IAsyncOnNotifyAPI
stopMonitoring
in interface IAsyncOnNotifyAPI
public void startMonitoring()
IAsyncOnNotifyAPI
startMonitoring
in interface IAsyncOnNotifyAPI
public int ShowToast(java.lang.String toast)
IAsyncOnNotifyAPI
ShowToast
in interface IAsyncOnNotifyAPI
toast
- String to display.public void setContext(android.content.Context mContext)
public int IsConnected()
IAsyncOnNotifyAPI
IsConnected
in interface IAsyncOnNotifyAPI
public java.lang.String GetLastErrorMsg()
IAsyncOnNotifyAPI
GetLastErrorMsg
in interface IAsyncOnNotifyAPI
public void ClearLastErrorMsg()
IAsyncOnNotifyAPI
ClearLastErrorMsg
in interface IAsyncOnNotifyAPI
public boolean IsFatalError()
IsFatalError
in interface IAsyncOnNotifyAPI
public int Login(java.lang.String login, java.lang.String pwd)
Login
in interface IAsyncOnNotifyAPI
login
- : user identifierpwd
- : user passwordpublic int Logout()
IAsyncOnNotifyAPI
Logout
in interface IAsyncOnNotifyAPI
public int GetCurrentProfileID()
GetCurrentProfileID
in interface IAsyncOnNotifyAPI
public int GetProfileName(int ID)
GetProfileName
in interface IAsyncOnNotifyAPI
public int StartRefresh()
StartRefresh
in interface IAsyncOnNotifyAPI
public int StopRefresh()
StopRefresh
in interface IAsyncOnNotifyAPI
public int RegisterComVar(int ID, int format, int number, int freq)
IAsyncOnNotifyAPI
RegisterComVar
in interface IAsyncOnNotifyAPI
ID
- : IoTize variable identifier as defined by the configuration.format
- : type of variable ( 1= byte, 2 = 16 bits half word, 3 = 32 bits word).number
- : number of variable (variable is an array if number greater than 1).freq
- : acquisition frequency (0 = no acquisition, 1 = every time, else frequency in 100 ms).public int UnRegisterComVar(int ID)
UnRegisterComVar
in interface IAsyncOnNotifyAPI
ID
- : IoTize variable identifier as defined by the configuration.public int UnRegisterAll()
UnRegisterAll
in interface IAsyncOnNotifyAPI
public int RegisterVar(java.lang.String varName, int ID, int index)
RegisterVar
in interface IAsyncOnNotifyAPI
ID
- : IoTize variable identifier as defined by the configuration.index
- : index of the HMI variable in the IoTize variable:
0 if only one variable,
i if one item of an array,
-1 if all the array.varName
- : name of the variable.public int UnRegisterVar(java.lang.String varName)
UnRegisterVar
in interface IAsyncOnNotifyAPI
varName
- : name of the variable.public int SetVar(int ID, byte[] value)
public int SetVar(int ID, java.lang.Integer[] value)
public int SetVar(int ID, java.lang.Integer value)
ID
- : IoTize variable identifier as defined by the configuration.value
- : value to be written.public int SetVar(int ID, java.lang.String value)
IAsyncOnNotifyAPI
SetVar
in interface IAsyncOnNotifyAPI
ID
- : IoTize variable identifier as defined by the configuration.value
- : value to be written.public int SetArrayVar(int ID, java.lang.String[] value)
SetArrayVar
in interface IAsyncOnNotifyAPI
ID
- : IoTize variable identifier as defined by the configuration.value
- : value to be written.public int GetVar(java.lang.String name)
IAsyncOnNotifyAPI
GetVar
in interface IAsyncOnNotifyAPI
name
- : name of the variable.public int GetCurrentHostProtocol()
GetCurrentHostProtocol
in interface IAsyncOnNotifyAPI
public int GetHostProtocols()
GetHostProtocols
in interface IAsyncOnNotifyAPI
public int GetTargetProtocols()
GetTargetProtocols
in interface IAsyncOnNotifyAPI
public int GetCurrentTargetProtocol()
GetCurrentTargetProtocol
in interface IAsyncOnNotifyAPI
public int ConnectTarget()
ConnectTarget
in interface IAsyncOnNotifyAPI
public int DisconnectTarget()
DisconnectTarget
in interface IAsyncOnNotifyAPI
public int ResetTarget()
IAsyncOnNotifyAPI
ResetTarget
in interface IAsyncOnNotifyAPI
public int GetTargetName()
IAsyncOnNotifyAPI
GetTargetName
in interface IAsyncOnNotifyAPI
public int GetTargetConfigVersion()
IAsyncOnNotifyAPI
GetTargetConfigVersion
in interface IAsyncOnNotifyAPI
public int GetTargetFirmwareVersion()
GetTargetFirmwareVersion
in interface IAsyncOnNotifyAPI
public int ResetIoTize()
IAsyncOnNotifyAPI
ResetIoTize
in interface IAsyncOnNotifyAPI
public int DatalogRun()
DatalogRun
in interface IAsyncOnNotifyAPI
public int DatalogStop()
DatalogStop
in interface IAsyncOnNotifyAPI
public int GetIoTizeDatalogIsRunning()
GetIoTizeDatalogIsRunning
in interface IAsyncOnNotifyAPI
public int GetIoTizeErrorCode()
IAsyncOnNotifyAPI
GetIoTizeErrorCode
in interface IAsyncOnNotifyAPI
public int ResetIoTizeErrorCode()
IAsyncOnNotifyAPI
ResetIoTizeErrorCode
in interface IAsyncOnNotifyAPI
public int GetIoTizeSerialNumber()
IAsyncOnNotifyAPI
GetIoTizeSerialNumber
in interface IAsyncOnNotifyAPI
public int GetIoTizeLocalPublicPwd()
GetIoTizeLocalPublicPwd
in interface IAsyncOnNotifyAPI
public int GetIoTizeModuleType()
IAsyncOnNotifyAPI
GetIoTizeModuleType
in interface IAsyncOnNotifyAPI
public int GetIoTizeModuleManufacturer()
IAsyncOnNotifyAPI
GetIoTizeModuleManufacturer
in interface IAsyncOnNotifyAPI
public int GetIoTizeFirmwareVersion()
IAsyncOnNotifyAPI
GetIoTizeFirmwareVersion
in interface IAsyncOnNotifyAPI
public int GetIoTizeMemoryFree()
IAsyncOnNotifyAPI
GetIoTizeMemoryFree
in interface IAsyncOnNotifyAPI
public void notifyError(java.lang.String cmd, int ret)
public void notifyCommandResult(@NonNull Command command, @NonNull Response result, @Nullable BodyConverter decoder, @NonNull java.lang.String methodName, @Nullable java.lang.String variableHMIName)