Skip to content

Commit

Permalink
Update gen/ folders
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Jun 23, 2021
1 parent ae2e3e2 commit 493e82d
Show file tree
Hide file tree
Showing 21 changed files with 3,889 additions and 2,227 deletions.
823 changes: 397 additions & 426 deletions examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h

Large diffs are not rendered by default.

374 changes: 184 additions & 190 deletions examples/bridge-app/bridge-common/gen/endpoint_config.h

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions examples/chip-tool/commands/clusters/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,7 @@ class ReadBarrierControlClusterRevision : public ModelCommand
| * ProductLabel | 0x000E |
| * SerialNumber | 0x000F |
| * LocalConfigDisabled | 0x0010 |
| * Reachable | 0x0011 |
| * ClusterRevision | 0xFFFD |
\*----------------------------------------------------------------------------*/

Expand Down Expand Up @@ -3054,6 +3055,40 @@ class WriteBasicLocalConfigDisabled : public ModelCommand
uint8_t mValue;
};

/*
* Attribute Reachable
*/
class ReadBasicReachable : public ModelCommand
{
public:
ReadBasicReachable() : ModelCommand("read")
{
AddArgument("attr-name", "reachable");
ModelCommand::AddArguments();
}

~ReadBasicReachable()
{
delete onSuccessCallback;
delete onFailureCallback;
}

CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override
{
ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu16, endpointId);

chip::Controller::BasicCluster cluster;
cluster.Associate(device, endpointId);
return cluster.ReadAttributeReachable(onSuccessCallback->Cancel(), onFailureCallback->Cancel());
}

private:
chip::Callback::Callback<BooleanAttributeCallback> * onSuccessCallback =
new chip::Callback::Callback<BooleanAttributeCallback>(OnBooleanAttributeResponse, this);
chip::Callback::Callback<DefaultFailureCallback> * onFailureCallback =
new chip::Callback::Callback<DefaultFailureCallback>(OnDefaultFailureResponse, this);
};

/*
* Attribute ClusterRevision
*/
Expand Down Expand Up @@ -20710,6 +20745,7 @@ void registerClusterBasic(Commands & commands)
make_unique<ReadBasicSerialNumber>(),
make_unique<ReadBasicLocalConfigDisabled>(),
make_unique<WriteBasicLocalConfigDisabled>(),
make_unique<ReadBasicReachable>(),
make_unique<ReadBasicClusterRevision>(),
};

Expand Down
Loading

0 comments on commit 493e82d

Please sign in to comment.