Skip to content

Commit

Permalink
Apply PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Nov 16, 2021
1 parent c71b92e commit 9317ec0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/chip-tool/templates/partials/test_cluster.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class {{filename}}: public TestCommand
{{else}}
chip::Controller::{{asUpperCamelCase cluster}}ClusterTest cluster;
{{#if isGroupCommand}}
cluster.Associate(groupId, mDevice);
cluster.AssociateWithGroup(mDevice, groupId);
{{else}}
cluster.Associate(mDevice, endpoint);
{{/if}}
Expand Down
5 changes: 3 additions & 2 deletions src/controller/CHIPCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ CHIP_ERROR ClusterBase::Associate(DeviceProxy * device, EndpointId endpoint)
return err;
}

CHIP_ERROR ClusterBase::Associate(GroupId groupId, DeviceProxy * device)
CHIP_ERROR ClusterBase::AssociateWithGroup(DeviceProxy * device, GroupId groupId)
{
// TODO Update this function to work in all possible conditions Issue #11850

CHIP_ERROR err = CHIP_NO_ERROR;
// TODO: Check if the device supports mCluster at the requested endpoint

mDevice = device;
if (mDevice->GetSecureSession().HasValue())
Expand Down
2 changes: 1 addition & 1 deletion src/controller/CHIPCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DLL_EXPORT ClusterBase
virtual ~ClusterBase() {}

CHIP_ERROR Associate(DeviceProxy * device, EndpointId endpoint);
CHIP_ERROR Associate(GroupId groupId, DeviceProxy * device);
CHIP_ERROR AssociateWithGroup(DeviceProxy * device, GroupId groupId);

void Dissociate();

Expand Down

0 comments on commit 9317ec0

Please sign in to comment.