From e6cdc3e0562c3a8b99f947d5d11f1a01d1a34983 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 25 Apr 2024 09:45:53 -0400 Subject: [PATCH] More comments --- src/app/interaction-model/InvokeResponder.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/interaction-model/InvokeResponder.h b/src/app/interaction-model/InvokeResponder.h index 54055f878ffd04..266f92422b465f 100644 --- a/src/app/interaction-model/InvokeResponder.h +++ b/src/app/interaction-model/InvokeResponder.h @@ -259,11 +259,19 @@ class InvokeReply // reply with no data CHIP_ERROR Reply(StatusIB status) { return this->Reply().Complete(status); } - // Send a reply "NOW" to the given invoke + // Enqueue the content of the reply at this point in time (rather than Async sending it). + // + // Implementations will often batch several replies into one packet for batch commands, + // so it will be implementation-specific on when the actual reply packet is + // sent. virtual AutoCompleteInvokeResponder Reply() = 0; // Reply "later" to the command. This allows async processing. A reply will be forced // when the returned InvokeReply is destroyed. + // + // NOTE: Each InvokeReply is associated with a separate `CommandDataIB` within batch + // commands. When replying asynchronously, each InvokeReply will set the response + // data for the given commandpath/ref only. virtual std::unique_ptr ReplyAsync(BitFlags flags) = 0; };