Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow chip-repl to know how many InvokeResponseMessages were recieved #31781

Prev Previous commit
Next Next commit
Restyled by clang-format
  • Loading branch information
restyled-commits authored and tehampson committed Jan 30, 2024
commit 9d581fb3437af8f3c8629b49f184a5565fc5bb4a
16 changes: 8 additions & 8 deletions src/controller/python/chip/clusters/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ namespace chip {
namespace python {

using OnCommandSenderResponseCallback = void (*)(PyObject appContext, chip::EndpointId endpointId, chip::ClusterId clusterId,
chip::CommandId commandId, size_t index,
std::underlying_type_t<Protocols::InteractionModel::Status> status,
chip::ClusterStatus clusterStatus, const uint8_t * payload, uint32_t length);
chip::CommandId commandId, size_t index,
std::underlying_type_t<Protocols::InteractionModel::Status> status,
chip::ClusterStatus clusterStatus, const uint8_t * payload, uint32_t length);
using OnCommandSenderErrorCallback = void (*)(PyObject appContext,
std::underlying_type_t<Protocols::InteractionModel::Status> status,
chip::ClusterStatus clusterStatus, PyChipError chiperror);
std::underlying_type_t<Protocols::InteractionModel::Status> status,
chip::ClusterStatus clusterStatus, PyChipError chiperror);
using OnCommandSenderDoneCallback = void (*)(PyObject appContext);
using TestOnlyOnCommandSenderDoneCallback = void (*)(PyObject appContext, python::TestOnlyPyOnDoneInfo testOnlyDoneInfo);

Expand Down Expand Up @@ -233,7 +233,7 @@ PyChipError SendBatchCommandsInternal(void * appContext, DeviceProxy * device, u
config.SetRemoteMaxPathsPerInvoke(remoteSessionParameters.GetMaxPathsPerInvoke());
}

bool isBatchedCommands = true;
bool isBatchedCommands = true;
bool callTestOnlyOnDone = testOnlyOverrides != nullptr;
std::unique_ptr<CommandSenderCallback> callback =
std::make_unique<CommandSenderCallback>(appContext, isBatchedCommands, callTestOnlyOnDone);
Expand Down Expand Up @@ -348,7 +348,7 @@ PyChipError pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * de

VerifyOrReturnError(device->GetSecureSession().HasValue(), ToPyChipError(CHIP_ERROR_MISSING_SECURE_SESSION));

bool isBatchedCommands = false;
bool isBatchedCommands = false;
bool callTestOnlyOnDone = false;
std::unique_ptr<CommandSenderCallback> callback =
std::make_unique<CommandSenderCallback>(appContext, isBatchedCommands, callTestOnlyOnDone);
Expand Down Expand Up @@ -425,7 +425,7 @@ PyChipError pychip_CommandSender_TestOnlySendCommandTimedRequestNoTimedInvoke(

VerifyOrReturnError(device->GetSecureSession().HasValue(), ToPyChipError(CHIP_ERROR_MISSING_SECURE_SESSION));

bool isBatchedCommands = false;
bool isBatchedCommands = false;
bool callTestOnlyOnDone = false;
std::unique_ptr<CommandSenderCallback> callback =
std::make_unique<CommandSenderCallback>(appContext, isBatchedCommands, callTestOnlyOnDone);
Expand Down
Loading