JvmService¶
Method | LwM2M request | Description |
---|---|---|
getCodeSize | get /1024//73 alias: /jvm/code-size |
Get JVM reserved code size |
putCodeSize | put /1024//73 alias: /jvm/code-size |
Write JVM reserved code size |
appendCode | put /1024//74 alias: /jvm/code |
Append JVM code. If body length is 0, it will clear code stored in Tap. |
clearCode | put /1024//74 alias: /jvm/clear-code |
Clear code stored in Tap. |
getProfileId | get /1024//66 alias: /jvm/profile-id |
Get user id that gives rights to the JVM code |
putProfileId | put /1024//66 alias: /jvm/profile-id |
Write user id that gives right to the JVM code |
getLogAndReset | get /1024//120 alias: /jvm/log-and-reset |
Read and reset JVM log |
putLogAndReset | put /1024//120 alias: /jvm/log-and-reset |
Clear JVM log |
getLog | get /1024//121 alias: /jvm/log |
Read JVM log |
putLog | put /1024//121 alias: /jvm/log |
Write JVM log |
getErrorCode | get /3//14 alias: /jvm/error-code |
Get jvm last error code |
postErrorCode | post /3//14 alias: /jvm/error-code |
Set jvm last error code |
getCodeSize¶
Minimal Tap Firmware version: 1.90
Get JVM reserved code size
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.jvm.getCodeSize();
const value = response.body();
console.log(`getCodeSize: ${value}`);
putCodeSize¶
Minimal Tap Firmware version: 1.90
Write JVM reserved code size
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | number |
Returns¶
Nothing
Authorization¶
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.configurator.setupConfigMode();
const value = ...;
const response = await tap.service.jvm.putCodeSize(value);
const value = response.body();
console.log(`putCodeSize: ${value}`);
appendCode¶
Minimal Tap Firmware version: 1.90
Append JVM code. If body length is 0, it will clear code stored in Tap.
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
value | Uint8Array |
Returns¶
Nothing
Authorization¶
- Authorized profile: supervisor
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.login("supervisor", "your password");
await tap.configurator.setupConfigMode();
const value = ...;
const response = await tap.service.jvm.appendCode(value);
const value = response.body();
console.log(`appendCode: ${value}`);
clearCode¶
Minimal Tap Firmware version: 1.90
Clear code stored in Tap.
Parameters¶
This endpoint does not need any parameter.
Returns¶
Nothing
Authorization¶
- Authorized profile: supervisor
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.login("supervisor", "your password");
await tap.configurator.setupConfigMode();
const response = await tap.service.jvm.clearCode();
const value = response.body();
console.log(`clearCode: ${value}`);
getProfileId¶
Minimal Tap Firmware version: 1.0
Get user id that gives rights to the JVM code
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint16)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.jvm.getProfileId();
const value = response.body();
console.log(`getProfileId: ${value}`);
putProfileId¶
Minimal Tap Firmware version: 1.0
Write user id that gives right to the JVM code
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
key | number | optional |
Returns¶
Nothing
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const key = ...;
const response = await tap.service.jvm.putProfileId(key);
const value = response.body();
console.log(`putProfileId: ${value}`);
getLogAndReset¶
Minimal Tap Firmware version: 2.11
Read and reset JVM log
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.jvm.getLogAndReset();
const value = response.body();
console.log(`getLogAndReset: ${value}`);
putLogAndReset¶
Minimal Tap Firmware version: 2.11
Clear JVM log
Parameters¶
This endpoint does not need any parameter.
Returns¶
Nothing
Authorization¶
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.configurator.setupConfigMode();
const response = await tap.service.jvm.putLogAndReset();
const value = response.body();
console.log(`putLogAndReset: ${value}`);
getLog¶
Minimal Tap Firmware version: 2.11
Read JVM log
Parameters¶
This endpoint does not need any parameter.
Returns¶
string
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.jvm.getLog();
const value = response.body();
console.log(`getLog: ${value}`);
putLog¶
Minimal Tap Firmware version: 2.11
Write JVM log
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
appName | string |
Returns¶
Nothing
Authorization¶
- Configuration mode is required to perform this request.
Example¶
import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';
const tap: Tap = ...;
await tap.configurator.setupConfigMode();
const appName = ...;
const response = await tap.service.jvm.putLog(appName);
const value = response.body();
console.log(`putLog: ${value}`);
getErrorCode¶
Minimal Tap Firmware version: 2.11
Get jvm last error code
Parameters¶
This endpoint does not need any parameter.
Returns¶
number (uint32)
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const response = await tap.service.jvm.getErrorCode();
const value = response.body();
console.log(`getErrorCode: ${value}`);
postErrorCode¶
Minimal Tap Firmware version: 2.11
Set jvm last error code
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
errorCode | number | optional |
Returns¶
Nothing
Example¶
import { Tap } from "@iotize/tap";
const tap: Tap = ...;
const errorCode = ...;
const response = await tap.service.jvm.postErrorCode(errorCode);
const value = response.body();
console.log(`postErrorCode: ${value}`);