Skip to content

Commit

Permalink
Pass largepayload flag into CommandSender in IM test app. (#33976)
Browse files Browse the repository at this point in the history
Use the session information from DeviceProxy to construct
CommandSender for large payload if session supports it.

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
pidarped and andy31415 committed Jun 19, 2024
1 parent 71e0eb9 commit c30f32f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ class InteractionModelCommands
chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId,
(chip::app::CommandPathFlags::kEndpointIdValid) };
auto commandSender = std::make_unique<chip::app::CommandSender>(
mCallback, device->GetExchangeManager(), mTimedInteractionTimeoutMs.HasValue(), mSuppressResponse.ValueOr(false));
mCallback, device->GetExchangeManager(), mTimedInteractionTimeoutMs.HasValue(), mSuppressResponse.ValueOr(false),
device->GetSecureSession().Value()->AllowsLargePayload());

VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY);

chip::app::CommandSender::AddRequestDataParameters addRequestDataParams(mTimedInteractionTimeoutMs);
Expand Down

0 comments on commit c30f32f

Please sign in to comment.