Commit a44bc1ba93589e5df89a900adc8e63c9f026f4d4

Authored by YevhenBondarenko
1 parent f1f41851

added SendPendingRPC transport msg

... ... @@ -322,29 +322,34 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor {
322 322 void process(TbActorCtx context, TransportToDeviceActorMsgWrapper wrapper) {
323 323 TransportToDeviceActorMsg msg = wrapper.getMsg();
324 324 TbCallback callback = wrapper.getCallback();
  325 + var sessionInfo = msg.getSessionInfo();
  326 +
325 327 if (msg.hasSessionEvent()) {
326   - processSessionStateMsgs(msg.getSessionInfo(), msg.getSessionEvent());
  328 + processSessionStateMsgs(sessionInfo, msg.getSessionEvent());
327 329 }
328 330 if (msg.hasSubscribeToAttributes()) {
329   - processSubscriptionCommands(context, msg.getSessionInfo(), msg.getSubscribeToAttributes());
  331 + processSubscriptionCommands(context, sessionInfo, msg.getSubscribeToAttributes());
330 332 }
331 333 if (msg.hasSubscribeToRPC()) {
332   - processSubscriptionCommands(context, msg.getSessionInfo(), msg.getSubscribeToRPC());
  334 + processSubscriptionCommands(context, sessionInfo, msg.getSubscribeToRPC());
  335 + }
  336 + if (msg.hasSendPendingRPC()) {
  337 + sendPendingRequests(context, getSessionId(sessionInfo), sessionInfo);
333 338 }
334 339 if (msg.hasGetAttributes()) {
335   - handleGetAttributesRequest(context, msg.getSessionInfo(), msg.getGetAttributes());
  340 + handleGetAttributesRequest(context, sessionInfo, msg.getGetAttributes());
336 341 }
337 342 if (msg.hasToDeviceRPCCallResponse()) {
338   - processRpcResponses(context, msg.getSessionInfo(), msg.getToDeviceRPCCallResponse());
  343 + processRpcResponses(context, sessionInfo, msg.getToDeviceRPCCallResponse());
339 344 }
340 345 if (msg.hasSubscriptionInfo()) {
341   - handleSessionActivity(context, msg.getSessionInfo(), msg.getSubscriptionInfo());
  346 + handleSessionActivity(context, sessionInfo, msg.getSubscriptionInfo());
342 347 }
343 348 if (msg.hasClaimDevice()) {
344   - handleClaimDeviceMsg(context, msg.getSessionInfo(), msg.getClaimDevice());
  349 + handleClaimDeviceMsg(context, sessionInfo, msg.getClaimDevice());
345 350 }
346 351 if (msg.hasPersistedRpcResponseMsg()) {
347   - processPersistedRpcResponses(context, msg.getSessionInfo(), msg.getPersistedRpcResponseMsg());
  352 + processPersistedRpcResponses(context, sessionInfo, msg.getPersistedRpcResponseMsg());
348 353 }
349 354 callback.onSuccess();
350 355 }
... ...
... ... @@ -318,6 +318,9 @@ message SubscribeToRPCMsg {
318 318 SessionType sessionType = 2;
319 319 }
320 320
  321 +message SendPendingRPCMsg {
  322 +}
  323 +
321 324 message ToDeviceRpcRequestMsg {
322 325 int32 requestId = 1;
323 326 string methodName = 2;
... ... @@ -440,11 +443,12 @@ message TransportToDeviceActorMsg {
440 443 GetAttributeRequestMsg getAttributes = 3;
441 444 SubscribeToAttributeUpdatesMsg subscribeToAttributes = 4;
442 445 SubscribeToRPCMsg subscribeToRPC = 5;
443   - ToDeviceRpcResponseMsg toDeviceRPCCallResponse = 6;
444   - SubscriptionInfoProto subscriptionInfo = 7;
445   - ClaimDeviceMsg claimDevice = 8;
446   - ProvisionDeviceRequestMsg provisionDevice = 9;
447   - ToDevicePersistedRpcResponseMsg persistedRpcResponseMsg = 10;
  446 + SendPendingRPCMsg sendPendingRPC = 6;
  447 + ToDeviceRpcResponseMsg toDeviceRPCCallResponse = 7;
  448 + SubscriptionInfoProto subscriptionInfo = 8;
  449 + ClaimDeviceMsg claimDevice = 9;
  450 + ProvisionDeviceRequestMsg provisionDevice = 10;
  451 + ToDevicePersistedRpcResponseMsg persistedRpcResponseMsg = 11;
448 452 }
449 453
450 454 message TransportToRuleEngineMsg {
... ...