BundleService¶
Method | LWM2M request | Description |
---|---|---|
create | POST /1028/{bundleId}/65535 alias: /bundle/{bundleId}/create |
Write variable bundle id |
getAcl | GET /1028/{bundleId}/0 alias: /bundle/{bundleId}/acl |
Get acls |
getDataLogPeriod | GET /1028/{bundleId}/2 alias: /bundle/{bundleId}/data-log-period |
Get data log period |
getName | GET /1028/{bundleId}/4 alias: /bundle/{bundleId}/name |
Read bundle name |
getValues | GET /1028/{bundleId}/1 alias: /bundle/{bundleId}/values |
Get bundle values |
putAcl | PUT /1028/{bundleId}/0 alias: /bundle/{bundleId}/acl |
Write acls |
putDataLogPeriod | PUT /1028/{bundleId}/2 alias: /bundle/{bundleId}/data-log-period |
Write data-log period |
putName | PUT /1028/{bundleId}/4 alias: /bundle/{bundleId}/name |
Write bundle name |
create¶
Minimal Tap Firmware version: >= 1.0
Write variable bundle id
Create a bundle with id bundleId
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
try {
let call = myService.create(bundleId);
let value = (await call).body();
console.log(`create: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
try {
Call<Void> call = myService.create(bundleId);
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 BundleService#create");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.bundle.create(bundleId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id |
Return type¶
null (empty response body)
Authorization¶
No authorization required
getAcl¶
Minimal Tap Firmware version: >= 1.0
Get acls
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
let groupId = 56; // Integer | Group id. You must add 0x4100 to the group id.
try {
let call = myService.getAcl(bundleId, groupId);
let value = (await call).body();
console.log(`getAcl: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
Integer groupId = 56; // Integer | Group id. You must add 0x4100 to the group id.
try {
Call<Void> call = myService.getAcl(bundleId, groupId);
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 BundleService#getAcl");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.bundle.getAcl(bundleId, groupId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id | |
groupId | Integer | Group id. You must add 0x4100 to the group id. |
Return type¶
null (empty response body)
Authorization¶
No authorization required
getDataLogPeriod¶
Minimal Tap Firmware version: >= 1.0
Get data log period
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?)
try {
let call = myService.getDataLogPeriod(bundleId);
let value = (await call).body();
console.log(`getDataLogPeriod: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?)
try {
Call<Integer> call = myService.getDataLogPeriod(bundleId);
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 BundleService#getDataLogPeriod");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Integer> = try tap.service.bundle.getDataLogPeriod(bundleId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?) |
Return type¶
Authorization¶
No authorization required
getName¶
Minimal Tap Firmware version: >= 1.0
Read bundle name
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
try {
let call = myService.getName(bundleId);
let value = (await call).body();
console.log(`getName: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
try {
Call<String> call = myService.getName(bundleId);
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 BundleService#getName");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<String> = try tap.service.bundle.getName(bundleId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id |
Return type¶
Authorization¶
No authorization required
getValues¶
Minimal Tap Firmware version: >= 1.0
Get bundle values
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
try {
let call = myService.getValues(bundleId);
let value = (await call).body();
console.log(`getValues: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
try {
Call<Bytes> call = myService.getValues(bundleId);
Response<Bytes> 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 BundleService#getValues");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Bytes> = try tap.service.bundle.getValues(bundleId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id |
Return type¶
Authorization¶
No authorization required
putAcl¶
Minimal Tap Firmware version: >= 1.0
Write acls
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Group id
let rights = ; // ReadWriteRights | Rights
try{
let call = myService.putAcl(bundleId, rights);
let value = (await call).body();
console.log(`putAcl: ${value}`);
}
catch (ex){
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Group id
ReadWriteRights rights = ; // ReadWriteRights | Rights
try {
Call<Void> call = myService.putAcl(bundleId, rights);
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 BundleService#putAcl");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.bundle.putAcl(bundleId, rights);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Group id | |
rights | ReadWriteRightsReadWriteRights | Rights |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putDataLogPeriod¶
Minimal Tap Firmware version: >= 1.0
Write data-log period
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
let value = 56; // Integer |
try {
let call = myService.putDataLogPeriod(bundleId, value);
let value = (await call).body();
console.log(`putDataLogPeriod: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
Integer value = 56; // Integer |
try {
Call<Void> call = myService.putDataLogPeriod(bundleId, 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 BundleService#putDataLogPeriod");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.bundle.putDataLogPeriod(bundleId, value);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id | |
value | Integer |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putName¶
Minimal Tap Firmware version: >= 1.0
Write bundle name
Example¶
let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
let name = name_example; // String | Name
try {
let call = myService.putName(bundleId, name);
let value = (await call).body();
console.log(`putName: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .BundleService;
ServiceFactory serviceFactory = ...;
BundleService myService = serviceFactory.create(BundleService.class);
Integer bundleId = 56; // Integer | Bundle id
String name = name_example; // String | Name
try {
Call<Void> call = myService.putName(bundleId, name);
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 BundleService#putName");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.bundle.putName(bundleId, name);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
bundleId | Integer | Bundle id | |
name | String | Name |
Return type¶
null (empty response body)
Authorization¶
No authorization required