Search in sources :

Example 1 with TbLwM2MReadCompositeCallback

use of org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeCallback in project thingsboard by thingsboard.

the class DefaultLwM2MRpcRequestHandler method sendReadCompositeRequest.

private void sendReadCompositeRequest(LwM2mClient client, TransportProtos.ToDeviceRpcRequestMsg requestMsg, ContentFormat contentFormatComposite) {
    String[] versionedIds = getIdsFromParameters(client, requestMsg);
    TbLwM2MReadCompositeRequest request = TbLwM2MReadCompositeRequest.builder().versionedIds(versionedIds).timeout(clientContext.getRequestTimeout(client)).build();
    var mainCallback = new TbLwM2MReadCompositeCallback(uplinkHandler, logService, client, versionedIds);
    var rpcCallback = new RpcReadResponseCompositeCallback(transportService, client, requestMsg, mainCallback);
    downlinkHandler.sendReadCompositeRequest(client, request, rpcCallback, contentFormatComposite);
}
Also used : TbLwM2MReadCompositeRequest(org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeRequest) RpcReadResponseCompositeCallback(org.thingsboard.server.transport.lwm2m.server.rpc.composite.RpcReadResponseCompositeCallback) TbLwM2MReadCompositeCallback(org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeCallback)

Aggregations

TbLwM2MReadCompositeCallback (org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeCallback)1 TbLwM2MReadCompositeRequest (org.thingsboard.server.transport.lwm2m.server.downlink.composite.TbLwM2MReadCompositeRequest)1 RpcReadResponseCompositeCallback (org.thingsboard.server.transport.lwm2m.server.rpc.composite.RpcReadResponseCompositeCallback)1