Skip to content

Commit 6a337e5

Browse files
Update ClusterCommand
1 parent e1b5467 commit 6a337e5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/chip-tool/commands/clusters/ClusterCommand.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "DataModelLogger.h"
2222
#include "ModelCommand.h"
2323
#include <app/tests/suites/commands/interaction_model/InteractionModel.h>
24+
#include <lib/core/ClusterEnums.h>
2425

2526
class ClusterCommand : public InteractionModelCommands, public ModelCommand, public chip::app::CommandSender::Callback
2627
{
@@ -70,6 +71,7 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub
7071
ReturnErrorOnFailure(InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value));
7172
mScopedNodeId = chip::ScopedNodeId(value.checkInNodeID, device->GetSecureSession().Value()->GetFabricIndex());
7273
mMonitoredSubject = value.monitoredSubject;
74+
mClientType = value.clientType;
7375
memcpy(mICDSymmetricKey, value.key.data(), value.key.size());
7476
return CHIP_NO_ERROR;
7577
}
@@ -148,6 +150,7 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub
148150
clientInfo.peer_node = mScopedNodeId;
149151
clientInfo.monitored_subject = mMonitoredSubject;
150152
clientInfo.start_icd_counter = value.ICDCounter;
153+
clientInfo.client_type = mClientType;
151154

152155
StoreICDEntryWithKey(clientInfo, chip::ByteSpan(mICDSymmetricKey));
153156
}
@@ -258,8 +261,10 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub
258261
chip::ClusterId mClusterId;
259262
chip::CommandId mCommandId;
260263
chip::ScopedNodeId mScopedNodeId;
261-
uint64_t mMonitoredSubject = static_cast<uint64_t>(0);
264+
uint64_t mMonitoredSubject = static_cast<uint64_t>(0);
265+
chip::app::Clusters::IcdManagement::ClientTypeEnum mClientType = chip::app::Clusters::IcdManagement::ClientTypeEnum::kPermanent;
262266
uint8_t mICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length];
267+
263268
CHIP_ERROR mError = CHIP_NO_ERROR;
264269
CustomArgument mPayload;
265270
};

0 commit comments

Comments
 (0)