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()
IAsyncOnNotifyAPIstopMonitoring in interface IAsyncOnNotifyAPIpublic void startMonitoring()
IAsyncOnNotifyAPIstartMonitoring in interface IAsyncOnNotifyAPIpublic int ShowToast(java.lang.String toast)
IAsyncOnNotifyAPIShowToast in interface IAsyncOnNotifyAPItoast - String to display.public void setContext(android.content.Context mContext)
public int IsConnected()
IAsyncOnNotifyAPIIsConnected in interface IAsyncOnNotifyAPIpublic java.lang.String GetLastErrorMsg()
IAsyncOnNotifyAPIGetLastErrorMsg in interface IAsyncOnNotifyAPIpublic void ClearLastErrorMsg()
IAsyncOnNotifyAPIClearLastErrorMsg in interface IAsyncOnNotifyAPIpublic boolean IsFatalError()
IsFatalError in interface IAsyncOnNotifyAPIpublic int Login(java.lang.String login,
java.lang.String pwd)
Login in interface IAsyncOnNotifyAPIlogin - : user identifierpwd - : user passwordpublic int Logout()
IAsyncOnNotifyAPILogout in interface IAsyncOnNotifyAPIpublic int GetCurrentProfileID()
GetCurrentProfileID in interface IAsyncOnNotifyAPIpublic int GetProfileName(int ID)
GetProfileName in interface IAsyncOnNotifyAPIpublic int StartRefresh()
StartRefresh in interface IAsyncOnNotifyAPIpublic int StopRefresh()
StopRefresh in interface IAsyncOnNotifyAPIpublic int RegisterComVar(int ID,
int format,
int number,
int freq)
IAsyncOnNotifyAPIRegisterComVar in interface IAsyncOnNotifyAPIID - : 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 IAsyncOnNotifyAPIID - : IoTize variable identifier as defined by the configuration.public int UnRegisterAll()
UnRegisterAll in interface IAsyncOnNotifyAPIpublic int RegisterVar(java.lang.String varName,
int ID,
int index)
RegisterVar in interface IAsyncOnNotifyAPIID - : 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 IAsyncOnNotifyAPIvarName - : 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)
IAsyncOnNotifyAPISetVar in interface IAsyncOnNotifyAPIID - : 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 IAsyncOnNotifyAPIID - : IoTize variable identifier as defined by the configuration.value - : value to be written.public int GetVar(java.lang.String name)
IAsyncOnNotifyAPIGetVar in interface IAsyncOnNotifyAPIname - : name of the variable.public int GetCurrentHostProtocol()
GetCurrentHostProtocol in interface IAsyncOnNotifyAPIpublic int GetHostProtocols()
GetHostProtocols in interface IAsyncOnNotifyAPIpublic int GetTargetProtocols()
GetTargetProtocols in interface IAsyncOnNotifyAPIpublic int GetCurrentTargetProtocol()
GetCurrentTargetProtocol in interface IAsyncOnNotifyAPIpublic int ConnectTarget()
ConnectTarget in interface IAsyncOnNotifyAPIpublic int DisconnectTarget()
DisconnectTarget in interface IAsyncOnNotifyAPIpublic int ResetTarget()
IAsyncOnNotifyAPIResetTarget in interface IAsyncOnNotifyAPIpublic int GetTargetName()
IAsyncOnNotifyAPIGetTargetName in interface IAsyncOnNotifyAPIpublic int GetTargetConfigVersion()
IAsyncOnNotifyAPIGetTargetConfigVersion in interface IAsyncOnNotifyAPIpublic int GetTargetFirmwareVersion()
GetTargetFirmwareVersion in interface IAsyncOnNotifyAPIpublic int ResetIoTize()
IAsyncOnNotifyAPIResetIoTize in interface IAsyncOnNotifyAPIpublic int DatalogRun()
DatalogRun in interface IAsyncOnNotifyAPIpublic int DatalogStop()
DatalogStop in interface IAsyncOnNotifyAPIpublic int GetIoTizeDatalogIsRunning()
GetIoTizeDatalogIsRunning in interface IAsyncOnNotifyAPIpublic int GetIoTizeErrorCode()
IAsyncOnNotifyAPIGetIoTizeErrorCode in interface IAsyncOnNotifyAPIpublic int ResetIoTizeErrorCode()
IAsyncOnNotifyAPIResetIoTizeErrorCode in interface IAsyncOnNotifyAPIpublic int GetIoTizeSerialNumber()
IAsyncOnNotifyAPIGetIoTizeSerialNumber in interface IAsyncOnNotifyAPIpublic int GetIoTizeLocalPublicPwd()
GetIoTizeLocalPublicPwd in interface IAsyncOnNotifyAPIpublic int GetIoTizeModuleType()
IAsyncOnNotifyAPIGetIoTizeModuleType in interface IAsyncOnNotifyAPIpublic int GetIoTizeModuleManufacturer()
IAsyncOnNotifyAPIGetIoTizeModuleManufacturer in interface IAsyncOnNotifyAPIpublic int GetIoTizeFirmwareVersion()
IAsyncOnNotifyAPIGetIoTizeFirmwareVersion in interface IAsyncOnNotifyAPIpublic int GetIoTizeMemoryFree()
IAsyncOnNotifyAPIGetIoTizeMemoryFree in interface IAsyncOnNotifyAPIpublic 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)