Skip to content

SinglePacketService

Method LWM2M request Description
bspe POST /1024//83
alias: /single-packet/bspe
Execute (after validation) a big Single Packet previously sent to the TAP using BSPP.
getInfo GET /1024//81
alias: /single-packet-store/info
Get information concerning Single Packet Store Status
writePartialSinglePacket POST /1024//82
alias: /single-packet/part
Send a partial Single Packet to the TAP.
writeSmallSinglePacket POST /1024//80
alias: /single-packet/write
Send a complete Small Single Packet to the TAP. Size of the packet < 120 bytes

bspe

Minimal Tap Firmware version: >= 1.13

Execute (after validation) a big Single Packet previously sent to the TAP using BSPP.

Execute (after validation) a big Single Packet previously sent to the TAP using BSPP. Stored packet is erased after packet is executed. (even if failed to execute) This command contains some control information (size, hash, CRC, salt, etc.) TBD

Example

let myService = new SinglePacketService();
let data = 56; // Integer |

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

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


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

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

Parameters

Name Type Description Notes
data Integer [optional]

Return type

null (empty response body)

Authorization

No authorization required

getInfo

Minimal Tap Firmware version: >= 1.13

Get information concerning Single Packet Store Status

Get information concerning Single Packet Store Status : Does this TAP provide the Single Packet Store ? (SPS) Is the store empty, full or halfway ? Details about the the execution of the last executes SP ?

Example

let myService = new SinglePacketService();

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

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


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

let ApiResponse<SinglePacketStoreInfo> = try tap.service.singlePacket.getInfo();
print("Response:" + response.body())

Parameters

This endpoint does not need any parameter.

Return type

SinglePacketStoreInfo

Authorization

No authorization required

writePartialSinglePacket

Minimal Tap Firmware version: >= 1.13

Send a partial Single Packet to the TAP.

Size of the packet = 130 bytes : 2 bytes offset, 128 bytes packet part. Stored packet is erased when packet part 0 is received.

Example

let myService = new SinglePacketService();
let data = ; // SinglePacketPart |

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

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


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

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

Parameters

Name Type Description Notes
data SinglePacketPartSinglePacketPart [optional]

Return type

null (empty response body)

Authorization

No authorization required

writeSmallSinglePacket

Minimal Tap Firmware version: >= 1.13

Send a complete Small Single Packet to the TAP. Size of the packet < 120 bytes

Example

let myService = new SinglePacketService();
let data = BINARY_DATA_HERE; // Bytes |

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

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


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

let ApiResponse<Bytes> = try tap.service.singlePacket.writeSmallSinglePacket(data);
print("Response:" + response.body())

Parameters

Name Type Description Notes
data BytesBytes [optional]

Return type

Bytes

Authorization

No authorization required