File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,16 @@ Status CommandHandler::OnInvokeCommandRequest(CommandHandlerExchangeInterface &
113
113
return status;
114
114
}
115
115
116
+ CHIP_ERROR CommandHandler::TryAddResponseData (const ConcreteCommandPath & path, CommandId commandId, EncoderToTLV & encoder)
117
+ {
118
+ ConcreteCommandPath responseCommandPath = { path.mEndpointId , path.mClusterId , commandId };
119
+ ReturnErrorOnFailure (TryAddResponseDataPreEncode (path, responseCommandPath));
120
+ TLV::TLVWriter * writer = GetCommandDataIBTLVWriter ();
121
+ VerifyOrReturnError (writer != nullptr , CHIP_ERROR_INCORRECT_STATE);
122
+ ReturnErrorOnFailure (encoder.Encode (*writer, TLV::ContextTag (CommandDataIB::Tag::kFields )));
123
+ return FinishCommand (/* aEndDataStruct = */ false );
124
+ }
125
+
116
126
CHIP_ERROR CommandHandler::ValidateInvokeRequestMessageAndBuildRegistry (InvokeRequestMessage::Parser & invokeRequestMessage)
117
127
{
118
128
CHIP_ERROR err = CHIP_NO_ERROR;
Original file line number Diff line number Diff line change @@ -696,11 +696,11 @@ class CommandHandler
696
696
* Callers should snapshot as needed before calling this function, and roll back
697
697
* as needed afterward.
698
698
*
699
- * @param [in] aRequestCommandPath the concrete path of the command we are
700
- * responding to.
701
- * @param [in] aData the data for the response.
699
+ * @param [in] path the concrete path of the command we are responding to
700
+ * @param [in] commandId the id of the command to encode
701
+ * @param [in] encoder the data to encode for the given commandId
702
702
*/
703
- CHIP_ERROR TryAddResponseData (const ConcreteCommandPath & aRequestCommandPath , CommandId commandId, EncoderToTLV & encoder);
703
+ CHIP_ERROR TryAddResponseData (const ConcreteCommandPath & path , CommandId commandId, EncoderToTLV & encoder);
704
704
705
705
void SetExchangeInterface (CommandHandlerExchangeInterface * commandResponder);
706
706
You can’t perform that action at this time.
0 commit comments