Commit a44bc1ba93589e5df89a900adc8e63c9f026f4d4
1 parent
f1f41851
added SendPendingRPC transport msg
Showing
2 changed files
with
22 additions
and
13 deletions
@@ -322,29 +322,34 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor { | @@ -322,29 +322,34 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor { | ||
322 | void process(TbActorCtx context, TransportToDeviceActorMsgWrapper wrapper) { | 322 | void process(TbActorCtx context, TransportToDeviceActorMsgWrapper wrapper) { |
323 | TransportToDeviceActorMsg msg = wrapper.getMsg(); | 323 | TransportToDeviceActorMsg msg = wrapper.getMsg(); |
324 | TbCallback callback = wrapper.getCallback(); | 324 | TbCallback callback = wrapper.getCallback(); |
325 | + var sessionInfo = msg.getSessionInfo(); | ||
326 | + | ||
325 | if (msg.hasSessionEvent()) { | 327 | if (msg.hasSessionEvent()) { |
326 | - processSessionStateMsgs(msg.getSessionInfo(), msg.getSessionEvent()); | 328 | + processSessionStateMsgs(sessionInfo, msg.getSessionEvent()); |
327 | } | 329 | } |
328 | if (msg.hasSubscribeToAttributes()) { | 330 | if (msg.hasSubscribeToAttributes()) { |
329 | - processSubscriptionCommands(context, msg.getSessionInfo(), msg.getSubscribeToAttributes()); | 331 | + processSubscriptionCommands(context, sessionInfo, msg.getSubscribeToAttributes()); |
330 | } | 332 | } |
331 | if (msg.hasSubscribeToRPC()) { | 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 | if (msg.hasGetAttributes()) { | 339 | if (msg.hasGetAttributes()) { |
335 | - handleGetAttributesRequest(context, msg.getSessionInfo(), msg.getGetAttributes()); | 340 | + handleGetAttributesRequest(context, sessionInfo, msg.getGetAttributes()); |
336 | } | 341 | } |
337 | if (msg.hasToDeviceRPCCallResponse()) { | 342 | if (msg.hasToDeviceRPCCallResponse()) { |
338 | - processRpcResponses(context, msg.getSessionInfo(), msg.getToDeviceRPCCallResponse()); | 343 | + processRpcResponses(context, sessionInfo, msg.getToDeviceRPCCallResponse()); |
339 | } | 344 | } |
340 | if (msg.hasSubscriptionInfo()) { | 345 | if (msg.hasSubscriptionInfo()) { |
341 | - handleSessionActivity(context, msg.getSessionInfo(), msg.getSubscriptionInfo()); | 346 | + handleSessionActivity(context, sessionInfo, msg.getSubscriptionInfo()); |
342 | } | 347 | } |
343 | if (msg.hasClaimDevice()) { | 348 | if (msg.hasClaimDevice()) { |
344 | - handleClaimDeviceMsg(context, msg.getSessionInfo(), msg.getClaimDevice()); | 349 | + handleClaimDeviceMsg(context, sessionInfo, msg.getClaimDevice()); |
345 | } | 350 | } |
346 | if (msg.hasPersistedRpcResponseMsg()) { | 351 | if (msg.hasPersistedRpcResponseMsg()) { |
347 | - processPersistedRpcResponses(context, msg.getSessionInfo(), msg.getPersistedRpcResponseMsg()); | 352 | + processPersistedRpcResponses(context, sessionInfo, msg.getPersistedRpcResponseMsg()); |
348 | } | 353 | } |
349 | callback.onSuccess(); | 354 | callback.onSuccess(); |
350 | } | 355 | } |
@@ -318,6 +318,9 @@ message SubscribeToRPCMsg { | @@ -318,6 +318,9 @@ message SubscribeToRPCMsg { | ||
318 | SessionType sessionType = 2; | 318 | SessionType sessionType = 2; |
319 | } | 319 | } |
320 | 320 | ||
321 | +message SendPendingRPCMsg { | ||
322 | +} | ||
323 | + | ||
321 | message ToDeviceRpcRequestMsg { | 324 | message ToDeviceRpcRequestMsg { |
322 | int32 requestId = 1; | 325 | int32 requestId = 1; |
323 | string methodName = 2; | 326 | string methodName = 2; |
@@ -440,11 +443,12 @@ message TransportToDeviceActorMsg { | @@ -440,11 +443,12 @@ message TransportToDeviceActorMsg { | ||
440 | GetAttributeRequestMsg getAttributes = 3; | 443 | GetAttributeRequestMsg getAttributes = 3; |
441 | SubscribeToAttributeUpdatesMsg subscribeToAttributes = 4; | 444 | SubscribeToAttributeUpdatesMsg subscribeToAttributes = 4; |
442 | SubscribeToRPCMsg subscribeToRPC = 5; | 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 | message TransportToRuleEngineMsg { | 454 | message TransportToRuleEngineMsg { |