Skip to content

DataLogService

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

getMaxPacketCount

Minimal Tap Firmware version: 1.0

Get the maximum number of packet

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.datalog.getMaxPacketCount();
const value = response.body();
console.log(`getMaxPacketCount: ${value}`);

isRunning

Minimal Tap Firmware version: 1.0

Get datalog running status

Parameters

This endpoint does not need any parameter.

Returns

boolean

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.isRunning();
const value = response.body();
console.log(`isRunning: ${value}`);

run

Minimal Tap Firmware version: 1.0

Run data-log acquisition

Parameters

This endpoint does not need any parameter.

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.run();
const value = response.body();
console.log(`run: ${value}`);

stop

Minimal Tap Firmware version: 1.0

Stop data-log acquisition

Parameters

This endpoint does not need any parameter.

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.stop();
const value = response.body();
console.log(`stop: ${value}`);

getOptions

Minimal Tap Firmware version: 1.0

Get data log options

Parameters

This endpoint does not need any parameter.

Returns

DataLogOption

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.getOptions();
const value = response.body();
console.log(`getOptions: ${value}`);

putOptions

Minimal Tap Firmware version: 1.0

Write data log option

Parameters

Name Type Description Notes
value DataLogOption

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.datalog.putOptions(value);
const value = response.body();
console.log(`putOptions: ${value}`);

putCryptoKey

Minimal Tap Firmware version: 1.0

Write data log crypto key

Parameters

Name Type Description Notes
value Uint8Array

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.datalog.putCryptoKey(value);
const value = response.body();
console.log(`putCryptoKey: ${value}`);

flush

Minimal Tap Firmware version: 1.0

Flush data log packets

Parameters

This endpoint does not need any parameter.

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.flush();
const value = response.body();
console.log(`flush: ${value}`);

getPacketCount

Minimal Tap Firmware version: 1.0

Get number of pending data-log packet

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.datalog.getPacketCount();
const value = response.body();
console.log(`getPacketCount: ${value}`);

dequeueOnePacket

Minimal Tap Firmware version: 1.0

Dequeue one packet

Parameters

This endpoint does not need any parameter.

Returns

SinglePacket

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.datalog.dequeueOnePacket();
const value = response.body();
console.log(`dequeueOnePacket: ${value}`);