TargetService¶
Method | LWM2M request | Description |
---|---|---|
clearComStats | POST /target/com-stats | Clear communication stats |
connect | POST /target/connect | Connect to target |
disconnect | POST /target/disconnect | Disconnect from target |
getComStats | GET /target/com-stats | Get communication stats |
getCoreType | GET /target/core-type | Get core type |
getDebugAccess | GET /target/debug-access | Debug access |
getFirmwareVersion | GET /target/firmware-version | Get firmware version |
getMaxVoltage | GET /target/max-voltage | Get max voltage |
getMinVoltage | GET /target/min-voltage | Get min voltage |
getModbusSubProtocol | GET /target/modbus/sub-protocol | Get current sub protocol |
getPageSize | GET /target/page-size | Get page size |
getProtocol | GET /target/protocol | Get target protocol |
getProtocolList | GET /target/protocol/list | List available target protocols |
getRegAccess | GET /target/reg-access | Register access |
getUARTSettings | GET /target/uart/settings | Données de config du protocole (baudrate MODBus, chainage JTAG, etc.) Taille variable, fixée au premier write après le reset factory. |
getVcc | GET /target/vcc | Get vcc |
modbusRead | GET /target/modbus/read | Generic modbus read |
modbusWrite | GET /target/modbus/write | Generic modbus write |
postAdpAction | POST /target/adp/action | Perform actions to ADP target. |
postDebugAccess | POST /target/debug-access | ??? |
postModbusSubProtocol | POST /target/modbus/sub-protocol | Set current sub protocol |
postRegAccess | POST /target/reg-access | ??? |
postResetKeep | POST /target/reset-keep | Reset target |
putCoreType | PUT /target/core-type | Write core type |
putFirmwareVersion | PUT /target/firmware-version | Write firmware version |
putMaxVoltage | PUT /target/max-voltage | Write max voltage value |
putMinVoltage | PUT /target/min-voltage | Write min voltage value |
putPageSize | PUT /target/page-size | Write page size |
putProtocol | PUT /target/protocol | Write target protocol |
read | GET /target/transparent/read | Read data transparent mode |
readAddress | GET /target/memaccess | Read memory on target |
readBytes | GET /target/transparent/read-bytes | Read data transparent mode with limit |
reset | POST /target/reset | Reset target |
sendReceive | GET /target/transparent/send-receive | Transparent send |
setUARTSettings | POST /target/uart/settings | Temporary update configuration |
writeAddress | POST /target/memaccess | Write into memory on target |
writeUARTSettings | PUT /target/uart/settings | Update configuration |
clearComStats¶
clearComStats()
Clear communication stats
Example¶
let myService = new TargetService(); try{ let call = myService.clearComStats(); let value = (await call).body(); console.log(`clearComStats: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.clearComStats(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#clearComStats"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
connect¶
connect()
Connect to target
Example¶
let myService = new TargetService(); try{ let call = myService.connect(); let value = (await call).body(); console.log(`connect: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.connect(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#connect"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
disconnect¶
disconnect()
Disconnect from target
Example¶
let myService = new TargetService(); try{ let call = myService.disconnect(); let value = (await call).body(); console.log(`disconnect: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.disconnect(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#disconnect"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
getComStats¶
TargetComStats getComStats()
Get communication stats
Get Nb of failed communications and number of successful communications with Target
Example¶
let myService = new TargetService(); try{ let call = myService.getComStats(); let value = (await call).body(); console.log(`getComStats: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<TargetComStats> call = myService.getComStats(); Response<TargetComStats> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getComStats"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Authorization¶
No authorization required
getCoreType¶
TargetCoreType getCoreType()
Get core type
Example¶
let myService = new TargetService(); try{ let call = myService.getCoreType(); let value = (await call).body(); console.log(`getCoreType: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<TargetCoreType> call = myService.getCoreType(); Response<TargetCoreType> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getCoreType"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Authorization¶
No authorization required
getDebugAccess¶
getDebugAccess()
Debug access
Access registres de contrôle (SWD=>APDP) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2)
Example¶
let myService = new TargetService(); try{ let call = myService.getDebugAccess(); let value = (await call).body(); console.log(`getDebugAccess: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.getDebugAccess(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getDebugAccess"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
getFirmwareVersion¶
String getFirmwareVersion()
Get firmware version
Example¶
let myService = new TargetService(); try{ let call = myService.getFirmwareVersion(); let value = (await call).body(); console.log(`getFirmwareVersion: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<String> call = myService.getFirmwareVersion(); Response<String> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getFirmwareVersion"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
String
Authorization¶
No authorization required
getMaxVoltage¶
Integer getMaxVoltage()
Get max voltage
Example¶
let myService = new TargetService(); try{ let call = myService.getMaxVoltage(); let value = (await call).body(); console.log(`getMaxVoltage: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Integer> call = myService.getMaxVoltage(); Response<Integer> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getMaxVoltage"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Integer
Authorization¶
No authorization required
getMinVoltage¶
Integer getMinVoltage()
Get min voltage
Example¶
let myService = new TargetService(); try{ let call = myService.getMinVoltage(); let value = (await call).body(); console.log(`getMinVoltage: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Integer> call = myService.getMinVoltage(); Response<Integer> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getMinVoltage"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Integer
Authorization¶
No authorization required
getModbusSubProtocol¶
byte[] getModbusSubProtocol()
Get current sub protocol
Example¶
let myService = new TargetService(); try{ let call = myService.getModbusSubProtocol(); let value = (await call).body(); console.log(`getModbusSubProtocol: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<byte[]> call = myService.getModbusSubProtocol(); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getModbusSubProtocol"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
byte[]
Authorization¶
No authorization required
getPageSize¶
Integer getPageSize()
Get page size
Alignement page (TAR)
Example¶
let myService = new TargetService(); try{ let call = myService.getPageSize(); let value = (await call).body(); console.log(`getPageSize: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Integer> call = myService.getPageSize(); Response<Integer> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getPageSize"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Integer
Authorization¶
No authorization required
getProtocol¶
TargetProtocol getProtocol()
Get target protocol
Example¶
let myService = new TargetService(); try{ let call = myService.getProtocol(); let value = (await call).body(); console.log(`getProtocol: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<TargetProtocol> call = myService.getProtocol(); Response<TargetProtocol> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getProtocol"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Authorization¶
No authorization required
getProtocolList¶
ListTargetProtocol getProtocolList()
List available target protocols
Example¶
let myService = new TargetService(); try{ let call = myService.getProtocolList(); let value = (await call).body(); console.log(`getProtocolList: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<ListTargetProtocol> call = myService.getProtocolList(); Response<ListTargetProtocol> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getProtocolList"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Authorization¶
No authorization required
getRegAccess¶
getRegAccess()
Register access
Access registres (Cortex=>R0...R15) de la cible. Accès conditionné par les ACLs du Bundle Debug (-2)
Example¶
let myService = new TargetService(); try{ let call = myService.getRegAccess(); let value = (await call).body(); console.log(`getRegAccess: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.getRegAccess(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getRegAccess"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
getUARTSettings¶
UartSettings getUARTSettings()
Données de config du protocole (baudrate MODBus, chainage JTAG, etc.) Taille variable, fixée au premier write après le reset factory.
Example¶
let myService = new TargetService(); try{ let call = myService.getUARTSettings(); let value = (await call).body(); console.log(`getUARTSettings: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<UartSettings> call = myService.getUARTSettings(); Response<UartSettings> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getUARTSettings"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Authorization¶
No authorization required
getVcc¶
Integer getVcc()
Get vcc
Lit la valeur de la tension de la cible
Example¶
let myService = new TargetService(); try{ let call = myService.getVcc(); let value = (await call).body(); console.log(`getVcc: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Integer> call = myService.getVcc(); Response<Integer> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#getVcc"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
Integer
Authorization¶
No authorization required
modbusRead¶
byte[] modbusRead(data)
Generic modbus read
Example¶
let myService = new TargetService(); let data = new MemoryInfo(); // MemoryInfo | try{ let call = myService.modbusRead(data); let value = (await call).body(); console.log(`modbusRead: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); MemoryInfo data = new MemoryInfo(); // MemoryInfo | try { Call<byte[]> call = myService.modbusRead(data); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#modbusRead"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | MemoryInfo(MemoryInfo.md) |
Return type¶
byte[]
Authorization¶
No authorization required
modbusWrite¶
modbusWrite(data)
Generic modbus write
Example¶
let myService = new TargetService(); let data = new MemoryWriteInfo(); // MemoryWriteInfo | try{ let call = myService.modbusWrite(data); let value = (await call).body(); console.log(`modbusWrite: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); MemoryWriteInfo data = new MemoryWriteInfo(); // MemoryWriteInfo | try { Call<Void> call = myService.modbusWrite(data); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#modbusWrite"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | MemoryWriteInfo(MemoryWriteInfo.md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required
postAdpAction¶
postAdpAction(data)
Perform actions to ADP target.
Example¶
let myService = new TargetService(); let data = BINARY_DATA_HERE; // byte[] | try{ let call = myService.postAdpAction(data); let value = (await call).body(); console.log(`postAdpAction: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); byte[] data = BINARY_DATA_HERE; // byte[] | try { Call<Void> call = myService.postAdpAction(data); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#postAdpAction"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | byte[](byte[].md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required
postDebugAccess¶
postDebugAccess()
???
Example¶
let myService = new TargetService(); try{ let call = myService.postDebugAccess(); let value = (await call).body(); console.log(`postDebugAccess: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.postDebugAccess(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#postDebugAccess"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
postModbusSubProtocol¶
postModbusSubProtocol(data)
Set current sub protocol
Example¶
let myService = new TargetService(); let data = BINARY_DATA_HERE; // byte[] | try{ let call = myService.postModbusSubProtocol(data); let value = (await call).body(); console.log(`postModbusSubProtocol: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); byte[] data = BINARY_DATA_HERE; // byte[] | try { Call<Void> call = myService.postModbusSubProtocol(data); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#postModbusSubProtocol"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | byte[](byte[].md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required
postRegAccess¶
postRegAccess()
???
Example¶
let myService = new TargetService(); try{ let call = myService.postRegAccess(); let value = (await call).body(); console.log(`postRegAccess: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.postRegAccess(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#postRegAccess"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
postResetKeep¶
postResetKeep()
Reset target
Reset de la cible (RST=0) et maintient en Reset. Le relachement se fait par Reset (plus haut). Accès conditionné par les ACLs du Bundle réservé Debug (-2) si il existe, sinon Admin seulement
Example¶
let myService = new TargetService(); try{ let call = myService.postResetKeep(); let value = (await call).body(); console.log(`postResetKeep: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.postResetKeep(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#postResetKeep"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
putCoreType¶
putCoreType(value)
Write core type
Example¶
let myService = new TargetService(); let value = new TargetCoreType(); // TargetCoreType | Write core type try{ let call = myService.putCoreType(value); let value = (await call).body(); console.log(`putCoreType: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); TargetCoreType value = new TargetCoreType(); // TargetCoreType | Write core type try { Call<Void> call = myService.putCoreType(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putCoreType"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | TargetCoreType(TargetCoreType.md) | Write core type |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putFirmwareVersion¶
putFirmwareVersion(value)
Write firmware version
Example¶
let myService = new TargetService(); let value = 56; // Integer | try{ let call = myService.putFirmwareVersion(value); let value = (await call).body(); console.log(`putFirmwareVersion: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); Integer value = 56; // Integer | try { Call<Void> call = myService.putFirmwareVersion(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putFirmwareVersion"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | Integer |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putMaxVoltage¶
putMaxVoltage(value)
Write max voltage value
Example¶
let myService = new TargetService(); let value = 56; // Integer | try{ let call = myService.putMaxVoltage(value); let value = (await call).body(); console.log(`putMaxVoltage: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); Integer value = 56; // Integer | try { Call<Void> call = myService.putMaxVoltage(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putMaxVoltage"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | Integer |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putMinVoltage¶
putMinVoltage(value)
Write min voltage value
Example¶
let myService = new TargetService(); let value = 56; // Integer | try{ let call = myService.putMinVoltage(value); let value = (await call).body(); console.log(`putMinVoltage: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); Integer value = 56; // Integer | try { Call<Void> call = myService.putMinVoltage(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putMinVoltage"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | Integer |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putPageSize¶
putPageSize(value)
Write page size
Example¶
let myService = new TargetService(); let value = 56; // Integer | try{ let call = myService.putPageSize(value); let value = (await call).body(); console.log(`putPageSize: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); Integer value = 56; // Integer | try { Call<Void> call = myService.putPageSize(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putPageSize"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | Integer |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putProtocol¶
putProtocol(targetProtocol)
Write target protocol
Example¶
let myService = new TargetService(); let targetProtocol = new TargetProtocol(); // TargetProtocol | TargetProtocol object to set try{ let call = myService.putProtocol(targetProtocol); let value = (await call).body(); console.log(`putProtocol: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); TargetProtocol targetProtocol = new TargetProtocol(); // TargetProtocol | TargetProtocol object to set try { Call<Void> call = myService.putProtocol(targetProtocol); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#putProtocol"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
targetProtocol | TargetProtocol(TargetProtocol.md) | TargetProtocol object to set |
Return type¶
null (empty response body)
Authorization¶
No authorization required
read¶
byte[] read()
Read data transparent mode
Lecture de données de la target en mode transparent ou semi-transparent si il y en a, sans attente.
Example¶
let myService = new TargetService(); try{ let call = myService.read(); let value = (await call).body(); console.log(`read: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<byte[]> call = myService.read(); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#read"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
byte[]
Authorization¶
No authorization required
readAddress¶
byte[] readAddress(value)
Read memory on target
Example¶
let myService = new TargetService(); let value = new MemoryInfo(); // MemoryInfo | try{ let call = myService.readAddress(value); let value = (await call).body(); console.log(`readAddress: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); MemoryInfo value = new MemoryInfo(); // MemoryInfo | try { Call<byte[]> call = myService.readAddress(value); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#readAddress"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | MemoryInfo(MemoryInfo.md) |
Return type¶
byte[]
Authorization¶
No authorization required
readBytes¶
byte[] readBytes(nbBytes)
Read data transparent mode with limit
Lecture de données de la target en mode transparent ou semi-transparent si il y en a, sans attente.
Example¶
let myService = new TargetService(); let nbBytes = 56; // Integer | try{ let call = myService.readBytes(nbBytes); let value = (await call).body(); console.log(`readBytes: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); Integer nbBytes = 56; // Integer | try { Call<byte[]> call = myService.readBytes(nbBytes); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#readBytes"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
nbBytes | Integer |
Return type¶
byte[]
Authorization¶
No authorization required
reset¶
reset()
Reset target
Reset de la cible. (Reset =0, wait, Reset = 1) utilisé pour relacher le reset après utilisation de ResetKeep. Accès conditionné par les ACLs du Bundle Debug (-2)
Example¶
let myService = new TargetService(); try{ let call = myService.reset(); let value = (await call).body(); console.log(`reset: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); try { Call<Void> call = myService.reset(); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#reset"); e.printStackTrace(); }
Parameters¶
This endpoint does not need any parameter.
Return type¶
null (empty response body)
Authorization¶
No authorization required
sendReceive¶
byte[] sendReceive(data)
Transparent send
Envoi commande à la target et renvoi de la réponse de la target en mode transparent ou semi-transparent
Example¶
let myService = new TargetService(); let data = BINARY_DATA_HERE; // byte[] | try{ let call = myService.sendReceive(data); let value = (await call).body(); console.log(`sendReceive: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); byte[] data = BINARY_DATA_HERE; // byte[] | try { Call<byte[]> call = myService.sendReceive(data); Response<byte[]> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#sendReceive"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
data | byte[](byte[].md) |
Return type¶
byte[]
Authorization¶
No authorization required
setUARTSettings¶
setUARTSettings(value)
Temporary update configuration
Execute permet de changer la valeur (mais pas la taille) courante de manière temporaire. Elle sera réinitialisée au reset d'après la valeur configurée.
Example¶
let myService = new TargetService(); let value = new UartSettings(); // UartSettings | try{ let call = myService.setUARTSettings(value); let value = (await call).body(); console.log(`setUARTSettings: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); UartSettings value = new UartSettings(); // UartSettings | try { Call<Void> call = myService.setUARTSettings(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#setUARTSettings"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | UartSettings(UartSettings.md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required
writeAddress¶
writeAddress(value)
Write into memory on target
Example¶
let myService = new TargetService(); let value = new MemoryWriteInfo(); // MemoryWriteInfo | try{ let call = myService.writeAddress(value); let value = (await call).body(); console.log(`writeAddress: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); MemoryWriteInfo value = new MemoryWriteInfo(); // MemoryWriteInfo | try { Call<Void> call = myService.writeAddress(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#writeAddress"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | MemoryWriteInfo(MemoryWriteInfo.md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required
writeUARTSettings¶
writeUARTSettings(value)
Update configuration
Put permet de changer la valeur (mais pas la taille) courante de manière permanente
Example¶
let myService = new TargetService(); let value = new UartSettings(); // UartSettings | try{ let call = myService.writeUARTSettings(value); let value = (await call).body(); console.log(`writeUARTSettings: ${value}`); } catch (ex){ // No response from device / response error (ie: device is not connected or request timeout) console.error(ex); }
import com.iotize.android.device.device.api.service.definition.TargetService; ServiceFactory serviceFactory = ...; TargetService myService = serviceFactory.create(TargetService.class); UartSettings value = new UartSettings(); // UartSettings | try { Call<Void> call = myService.writeUARTSettings(value); Response<Void> response = call.execute(); if (response.isSuccessful()){ System.out.println(response.body()); } else{ System.out.println(DeviceResponseError.createErrorMessage(response)); } } catch (ApiException e) { System.err.println("Exception when calling TargetService#writeUARTSettings"); e.printStackTrace(); }
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | UartSettings(UartSettings.md) |
Return type¶
null (empty response body)
Authorization¶
No authorization required