Skip to content

Commit

Permalink
Add missing parts in Bridged Device Basic Info cluster (#14620)
Browse files Browse the repository at this point in the history
* Add missing parts in Bridged Device Basic Info cluster

* Address review comments

* Run codegen
  • Loading branch information
yufengwangca authored Feb 2, 2022
1 parent 17c1afa commit 3c8d272
Show file tree
Hide file tree
Showing 17 changed files with 528 additions and 396 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,20 @@ server cluster BridgedActions = 37 {
}

server cluster BridgedDeviceBasic = 57 {
critical event StartUp = 0 {
INT32U softwareVersion = 0;
}

critical event ShutDown = 1 {
}

info event Leave = 2 {
}

info event ReachableChanged = 3 {
boolean reachableNewValue = 0;
}

readonly attribute char_string<32> vendorName = 1;
readonly attribute int16u vendorID = 2;
readonly attribute char_string<32> productName = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,13 @@ client cluster Groups = 4 {
request struct ViewGroupRequest {
INT16U groupId = 0;
}

command AddGroup(AddGroupRequest): AddGroupResponse = 0;
command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
command RemoveAllGroups(): DefaultSuccess = 4;
command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
}

client cluster Identify = 3 {
Expand Down Expand Up @@ -986,6 +993,10 @@ client cluster OnOff = 6 {
readonly global attribute attrib_id attributeList[] = 65531;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

command Off(): DefaultSuccess = 0;
command On(): DefaultSuccess = 1;
command Toggle(): DefaultSuccess = 2;
}

server cluster OperationalCredentials = 62 {
Expand Down Expand Up @@ -1192,6 +1203,14 @@ client cluster Scenes = 5 {
CHAR_STRING sceneName = 4;
SceneExtensionFieldSet extensionFieldSets[] = 5;
}

command AddScene(AddSceneRequest): AddSceneResponse = 0;
command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
command StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
}

server cluster SoftwareDiagnostics = 52 {
Expand Down
19 changes: 14 additions & 5 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ server cluster Binding = 30 {
}

server cluster BridgedDeviceBasic = 57 {
critical event StartUp = 0 {
INT32U softwareVersion = 0;
}

critical event ShutDown = 1 {
}

info event Leave = 2 {
}

info event ReachableChanged = 3 {
boolean reachableNewValue = 0;
}

readonly attribute char_string<32> vendorName = 1;
readonly attribute int16u vendorID = 2;
readonly attribute char_string<32> productName = 3;
Expand All @@ -250,11 +264,6 @@ server cluster BridgedDeviceBasic = 57 {
readonly attribute char_string<32> serialNumber = 15;
readonly attribute boolean reachable = 17;
readonly global attribute int16u clusterRevision = 65533;

command Leave(): DefaultSuccess = 2;
command ReachableChanged(): DefaultSuccess = 3;
command ShutDown(): DefaultSuccess = 1;
command StartUp(): DefaultSuccess = 0;
}

client cluster Channel = 1284 {
Expand Down
29 changes: 15 additions & 14 deletions src/app/zap-templates/zcl/data-model/chip/bridged-device-basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,22 @@ limitations under the License.
<attribute side="server" code="13" define="PRODUCT_URL" type="long_char_string" length="256" optional="true">ProductURL</attribute>
<attribute side="server" code="14" define="PRODUCT_LABEL" type="char_string" length="64" optional="true">ProductLabel</attribute>
<attribute side="server" code="15" define="SERIAL_NUMBER" type="char_string" length="32" optional="true">SerialNumber</attribute>
<attribute side="server" code="17" define="REACHABLE" type="boolean" default="1" >Reachable</attribute>
<attribute side="server" code="17" define="REACHABLE" type="boolean" default="1" optional="false">Reachable</attribute>
<attribute side="server" code="18" define="UNIQUE_ID" type="char_string" length="32" optional="true">UniqueID</attribute>

<command source="server" code="0x00" name="StartUp" optional="true">
<description>The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process.</description>
</command>
<command source="server" code="0x01" name="ShutDown" optional="true">
<description>The ShutDown event SHOULD be emitted by a Node prior to any orderly shutdown sequence on a best-effort basis.</description>
</command>
<command source="server" code="0x02" name="Leave" optional="true">
<description>The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric.</description>
</command>
<command source="server" code="0x03" name="ReachableChanged" optional="false">
<description>The Leave event SHOULD be emitted by a Node when the Reachable attribute changes.</description>
</command>

<event side="server" code="0x00" name="StartUp" priority="critical" optional="true">
<description>The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process.</description>
<field id="0" name="SoftwareVersion" type="INT32U"/>
</event>
<event side="server" code="0x01" name="ShutDown" priority="critical" optional="true">
<description>The ShutDown event SHOULD be emitted by a Node prior to any orderly shutdown sequence on a best-effort basis.</description>
</event>
<event side="server" code="0x02" name="Leave" priority="info" optional="true">
<description>The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric.</description>
</event>
<event side="server" code="0x03" name="ReachableChanged" priority="info" optional="false">
<description>This event (when supported) SHALL be generated when there is a change in the Reachable attribute.</description>
<field id="0" name="ReachableNewValue" type="boolean"/>
</event>
</cluster>
</configurator>
14 changes: 14 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,20 @@ client cluster BridgedActions = 37 {
}

client cluster BridgedDeviceBasic = 57 {
critical event StartUp = 0 {
INT32U softwareVersion = 0;
}

critical event ShutDown = 1 {
}

info event Leave = 2 {
}

info event ReachableChanged = 3 {
boolean reachableNewValue = 0;
}

readonly attribute char_string<32> vendorName = 1;
readonly attribute int16u vendorID = 2;
readonly attribute char_string<32> productName = 3;
Expand Down
126 changes: 73 additions & 53 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions zzz_generated/app-common/app-common/zap-generated/callback.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3c8d272

Please sign in to comment.