Skip to content

DataLogService

Method LWM2M request Description
dequeueOnePacket GET /1031//11
alias: /data-log/dequeue-packet
Dequeue one packet
flush POST /1031//4
alias: /data-log/flush
Flush data log packets
getMaxPacketCount GET /1024//23
alias: /data-log/max-packet-count
Get the maximum number of packet
getOptions GET /1031//2
alias: /data-log/options
Get data log options
getPacketCount GET /1031//10
alias: /data-log/packet-count
Get number of pending data-log packet
isRunning GET /1031//0
alias: /data-log/run
Returns true is data log acquisition is running
putCryptoKey PUT /1031//3
alias: /data-log/crypto-key
Write data log crypto key
putOptions PUT /1031//2
alias: /data-log/options
Write data log option
run POST /1031//0
alias: /data-log/run
Run data-log acquisition
stop POST /1031//1
alias: /data-log/stop
Stop data-log acquisition

dequeueOnePacket

Minimal Tap Firmware version: >= 1.0

Dequeue one packet

Dequeue one packet in the FIFO list (Firt In First Out) of data-log packets

Example

let myService = new DataLogService();

try{
    let call = myService.dequeueOnePacket();
    let value = (await call).body();
    console.log(`dequeueOnePacket: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<SinglePacket> call = myService.dequeueOnePacket();
    Response<SinglePacket> 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 DataLogService#dequeueOnePacket");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<SinglePacket> = try tap.service.dataLog.dequeueOnePacket();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

SinglePacket

Authorization

No authorization required

flush

Minimal Tap Firmware version: >= 1.0

Flush data log packets

Reinitialisation : efface tous les paquets de la mémoire de l'IoTize. Seulement en état Stop ? Stop implicite avant le flush ? Run implicite après le flush ?

Example

let myService = new DataLogService();

try{
    let call = myService.flush();
    let value = (await call).body();
    console.log(`flush: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Void> call = myService.flush();
    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 DataLogService#flush");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.dataLog.flush();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

getMaxPacketCount

Minimal Tap Firmware version: >= 1.0

Get the maximum number of packet

Example

let myService = new DataLogService();

try{
    let call = myService.getMaxPacketCount();
    let value = (await call).body();
    console.log(`getMaxPacketCount: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Integer> call = myService.getMaxPacketCount();
    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 DataLogService#getMaxPacketCount");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Integer> = try tap.service.dataLog.getMaxPacketCount();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Integer

Authorization

No authorization required

getOptions

Minimal Tap Firmware version: >= 1.0

Get data log options

Example

let myService = new DataLogService();

try{
    let call = myService.getOptions();
    let value = (await call).body();
    console.log(`getOptions: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<DataLogOption> call = myService.getOptions();
    Response<DataLogOption> 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 DataLogService#getOptions");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<DataLogOption> = try tap.service.dataLog.getOptions();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

DataLogOption

Authorization

No authorization required

getPacketCount

Minimal Tap Firmware version: >= 1.0

Get number of pending data-log packet

Get the number of data log packet available

Example

let myService = new DataLogService();

try{
    let call = myService.getPacketCount();
    let value = (await call).body();
    console.log(`getPacketCount: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Integer> call = myService.getPacketCount();
    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 DataLogService#getPacketCount");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Integer> = try tap.service.dataLog.getPacketCount();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Integer

Authorization

No authorization required

isRunning

Minimal Tap Firmware version: >= 1.0

Returns true is data log acquisition is running

Example

let myService = new DataLogService();

try{
    let call = myService.isRunning();
    let value = (await call).body();
    console.log(`isRunning: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Boolean> call = myService.isRunning();
    Response<Boolean> 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 DataLogService#isRunning");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Boolean> = try tap.service.dataLog.isRunning();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

Boolean

Authorization

No authorization required

putCryptoKey

Minimal Tap Firmware version: >= 1.0

Write data log crypto key

Hash du password Dataloggin. Utilisé (combiné à d'autres choses) pour crypter le paquet avant de le stocker dans l'OutBox.

Example

let myService = new DataLogService();
let value = BINARY_DATA_HERE; // Bytes | 

try{
    let call = myService.putCryptoKey(value);
    let value = (await call).body();
    console.log(`putCryptoKey: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


Bytes value = BINARY_DATA_HERE; // Bytes | 
try {
    Call<Void> call = myService.putCryptoKey(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 DataLogService#putCryptoKey");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.dataLog.putCryptoKey(value);
print("Response:" + response.body())

Parameters

Name Type Description Notes
value BytesBytes

Return type

null (empty response body)

Authorization

No authorization required

putOptions

Minimal Tap Firmware version: >= 1.0

Write data log option

Example

let myService = new DataLogService();
let value = ; // DataLogOption | 

try{
    let call = myService.putOptions(value);
    let value = (await call).body();
    console.log(`putOptions: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


DataLogOption value = ; // DataLogOption | 
try {
    Call<Void> call = myService.putOptions(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 DataLogService#putOptions");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.dataLog.putOptions(value);
print("Response:" + response.body())

Parameters

Name Type Description Notes
value DataLogOptionDataLogOption

Return type

null (empty response body)

Authorization

No authorization required

run

Minimal Tap Firmware version: >= 1.0

Run data-log acquisition

Start data log packet acquisition

Example

let myService = new DataLogService();

try{
    let call = myService.run();
    let value = (await call).body();
    console.log(`run: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Void> call = myService.run();
    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 DataLogService#run");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.dataLog.run();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required

stop

Minimal Tap Firmware version: >= 1.0

Stop data-log acquisition

Stop data log packet acquisition

Example

let myService = new DataLogService();

try{
    let call = myService.stop();
    let value = (await call).body();
    console.log(`stop: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import .DataLogService;

ServiceFactory serviceFactory = ...;
DataLogService myService = serviceFactory.create(DataLogService.class);


try {
    Call<Void> call = myService.stop();
    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 DataLogService#stop");
    e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...

let ApiResponse<Any> = try tap.service.dataLog.stop();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

No authorization required