Skip to content

Commit

Permalink
Add "response" attributes to all commands with responses in XML. (#14754
Browse files Browse the repository at this point in the history
)

We don't want to rely on name-based heuristics, and can start removing
them after this.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Feb 22, 2022
1 parent 75c8ffd commit 5c348ee
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ limitations under the License.
<define>DIAGNOSTIC_LOGS_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<command source="client" code="0x00" name="RetrieveLogsRequest" optional="false" cli="chip logs retrieve">
<command source="client" code="0x00" name="RetrieveLogsRequest" response="RetrieveLogsResponse" optional="false" cli="chip logs retrieve">
<description>Retrieving diagnostic logs from a Node</description>
<arg name="intent" type="LogsIntent"/>
<arg name="requestedProtocol" type="LogsTransferProtocol"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ limitations under the License.
<attribute side="server" code="0x01" define="BASICCOMMISSIONINGINFO" type="BasicCommissioningInfo" writable="false" optional="false">BasicCommissioningInfo</attribute>
<attribute side="server" code="0x02" define="REGULATORYCONFIG" type="ENUM8" writable="false" optional="true">RegulatoryConfig</attribute>
<attribute side="server" code="0x03" define="LOCATIONCAPABILITY" type="ENUM8" writable="false" optional="true">LocationCapability</attribute>
<command source="client" code="0x00" name="ArmFailSafe" optional="false" cli="chip fabric_commissioning armfailsafe">
<command source="client" code="0x00" name="ArmFailSafe" response="ArmFailSafeResponse" optional="false" cli="chip fabric_commissioning armfailsafe">
<description>Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock</description>
<arg name="expiryLengthSeconds" type="INT16U"/>
<arg name="breadcrumb" type="INT64U"/>
Expand All @@ -54,7 +54,7 @@ limitations under the License.
<arg name="errorCode" type="CommissioningError"/>
<arg name="debugText" type="CHAR_STRING"/>
</command>
<command source="client" code="0x02" name="SetRegulatoryConfig" optional="true" cli="chip fabric_commissioning setregulatoryconfig">
<command source="client" code="0x02" name="SetRegulatoryConfig" response="SetRegulatoryConfigResponse" optional="true" cli="chip fabric_commissioning setregulatoryconfig">
<description>Add or update the regulatory configuration</description>
<arg name="location" type="RegulatoryLocationType"/>
<arg name="countryCode" type="CHAR_STRING"/>
Expand All @@ -66,7 +66,7 @@ limitations under the License.
<arg name="errorCode" type="CommissioningError"/>
<arg name="debugText" type="CHAR_STRING"/>
</command>
<command source="client" code="0x04" name="CommissioningComplete" optional="false" cli="chip fabric_commissioning commissioningcomplete">
<command source="client" code="0x04" name="CommissioningComplete" response="CommissioningCompleteResponse" optional="false" cli="chip fabric_commissioning commissioningcomplete">
<description>Signals the Commissionee that the Commissioner has successfully completed all steps of commissioning</description>
</command>
<command source="server" code="0x05" name="CommissioningCompleteResponse" optional="false" cli="chip fabric_commissioning commissioningcompleteresponse">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ limitations under the License.
<arg name="groupKeySet" type="GroupKeySet"/>
</command>

<command source="client" code="0x01" name="KeySetRead" optional="false" cli="zcl GroupKeyManagement KeySetRead">
<command source="client" code="0x01" name="KeySetRead" response="KeySetReadResponse" optional="false" cli="zcl GroupKeyManagement KeySetRead">
<description>Revoke a Root Key from a Group</description>
<arg name="groupKeySetID" type="INT16U"/>
</command>
Expand All @@ -83,7 +83,7 @@ limitations under the License.
<arg name="groupKeySetID" type="INT16U"/>
</command>

<command source="client" code="0x04" name="KeySetReadAllIndices" optional="false" cli="zcl GroupKeyManagement KeySetReadAllIndices">
<command source="client" code="0x04" name="KeySetReadAllIndices" response="KeySetReadAllIndicesResponse" optional="false" cli="zcl GroupKeyManagement KeySetReadAllIndices">
<description>Revoke a Root Key from a Group</description>
<arg name="groupKeySetIDs" type="INT16U" array="true"/>
</command>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ limitations under the License.
</description>
<arg name="identifyTime" type="INT16U"/>
</command>
<command source="client" code="0x01" name="IdentifyQuery" optional="false">
<command source="client" code="0x01" name="IdentifyQuery" response="IdentifyQueryResponse" optional="false">
<description>
Command description for IdentifyQuery
</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ limitations under the License.
<attribute side="server" code="0x0004" define="TRUSTED_ROOTS" type="ARRAY" entryType="OCTET_STRING" length="400" writable="false" optional="false">TrustedRootCertificates</attribute>
<attribute side="server" code="0x0005" define="CURRENT_FABRIC_INDEX" type="fabric_idx" writable="false" optional="false">CurrentFabricIndex</attribute>

<command source="client" code="0x00" name="AttestationRequest" optional="false">
<command source="client" code="0x00" name="AttestationRequest" response="AttestationResponse" optional="false">
<description>Sender is requesting attestation information from the receiver.</description>
<arg name="AttestationNonce" type="OCTET_STRING"/>
</command>
Expand All @@ -74,7 +74,7 @@ limitations under the License.
<arg name="Signature" type="OCTET_STRING"/>
</command>

<command source="client" code="0x02" name="CertificateChainRequest" optional="false">
<command source="client" code="0x02" name="CertificateChainRequest" response="CertificateChainResponse" optional="false">
<description>Sender is requesting a device attestation certificate from the receiver.</description>
<arg name="CertificateType" type="INT8U"/>
</command>
Expand All @@ -84,7 +84,7 @@ limitations under the License.
<arg name="Certificate" type="OCTET_STRING"/>
</command>

<command source="client" code="0x04" name="OpCSRRequest" optional="false">
<command source="client" code="0x04" name="OpCSRRequest" response="OpCSRResponse" optional="false">
<description>Sender is requesting a certificate signing request (CSR) from the receiver.</description>
<arg name="CSRNonce" type="OCTET_STRING"/>
</command>
Expand Down
12 changes: 6 additions & 6 deletions src/app/zap-templates/zcl/data-model/chip/test-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ limitations under the License.
</description>
</command>

<command source="client" code="0x02" name="TestSpecific" optional="false">
<command source="client" code="0x02" name="TestSpecific" response="TestSpecificResponse" optional="false">
<description>
Simple command without any parameters and with a specific response
</description>
Expand All @@ -222,22 +222,22 @@ limitations under the License.
</description>
</command>

<command source="client" code="0x04" name="TestAddArguments" optional="false">
<command source="client" code="0x04" name="TestAddArguments" response="TestAddArgumentsResponse" optional="false">
<description>
Command that takes two arguments and returns their sum.
</description>
<arg name="arg1" type="INT8U"/>
<arg name="arg2" type="INT8U"/>
</command>

<command source="client" code="0x05" name="TestSimpleArgumentRequest" optional="false">
<command source="client" code="0x05" name="TestSimpleArgumentRequest" response="TestSimpleArgumentResponse" optional="false">
<description>
Command that takes an argument which is bool
</description>
<arg name="arg1" type="BOOLEAN"/>
</command>

<command source="client" code="0x06" name="TestStructArrayArgumentRequest" optional="false">
<command source="client" code="0x06" name="TestStructArrayArgumentRequest" response="TestStructArrayArgumentResponse" optional="false">
<description>
Command that takes various arguments that are arrays, including an array of structs which have a list member.
</description>
Expand Down Expand Up @@ -305,15 +305,15 @@ limitations under the License.
<arg name="arg1" type="NestedStructList" array="true"/>
</command>

<command source="client" code="0x0D" name="TestListInt8UReverseRequest" optional="false">
<command source="client" code="0x0D" name="TestListInt8UReverseRequest" response="TestListInt8UReverseResponse" optional="false">
<description>
Command that takes an argument which is a list of INT8U and expects a
response that reverses the list.
</description>
<arg name="arg1" type="INT8U" array="true"/>
</command>

<command source="client" code="0x0E" name="TestEnumsRequest" optional="false">
<command source="client" code="0x0E" name="TestEnumsRequest" response="TestEnumsResponse" optional="false">
<description>
Command that sends a vendor id and an enum. The server is expected to
echo them back.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ limitations under the License.
<arg name="modeForSequence" type="ModeForSequence"/>
<arg name="payload" type="INT8U" array="true"/>
</command>
<command source="client" code="0x02" name="GetWeeklySchedule" optional="true">
<command source="client" code="0x02" name="GetWeeklySchedule" response="GetWeeklyScheduleResponse" optional="true">
<description>
Command description for GetWeeklySchedule
</description>
Expand All @@ -98,7 +98,7 @@ limitations under the License.
The Clear Weekly Schedule command is used to clear the weekly schedule.
</description>
</command>
<command source="client" code="0x04" name="GetRelayStatusLog" optional="true">
<command source="client" code="0x04" name="GetRelayStatusLog" response="GetRelayStatusLogResponse" optional="true">
<description>
The Get Relay Status Log command is used to query the thermostat internal relay status log.
</description>
Expand Down
22 changes: 11 additions & 11 deletions src/app/zap-templates/zcl/data-model/silabs/general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,26 @@ limitations under the License.
<globalAttribute side="either" code="0xFFFD" value="3"/>
<attribute side="server" code="0x0000" define="GROUP_NAME_SUPPORT" type="BITMAP8" min="0x00" max="0x80" writable="false" optional="false">name support</attribute>
<!-- NAME_SUPPORT -->
<command source="client" code="0x00" name="AddGroup" optional="false" cli="zcl groups add">
<command source="client" code="0x00" name="AddGroup" response="AddGroupResponse" optional="false" cli="zcl groups add">
<description>
Command description for AddGroup
</description>
<arg name="groupId" type="INT16U"/>
<arg name="groupName" type="CHAR_STRING"/>
</command>
<command source="client" code="0x01" name="ViewGroup" optional="false" cli="zcl groups view">
<command source="client" code="0x01" name="ViewGroup" response="ViewGroupResponse" optional="false" cli="zcl groups view">
<description>
Command description for ViewGroup
</description>
<arg name="groupId" type="INT16U"/>
</command>
<command source="client" code="0x02" name="GetGroupMembership" cliFunctionName="zclGroupsGetCommand" optional="false" cli="zcl groups get">
<command source="client" code="0x02" name="GetGroupMembership" response="GetGroupMembershipResponse" cliFunctionName="zclGroupsGetCommand" optional="false" cli="zcl groups get">
<description>
Command description for GetGroupMembership
</description>
<arg name="groupList" type="INT16U" array="true"/>
</command>
<command source="client" code="0x03" name="RemoveGroup" optional="false" cli="zcl groups remove">
<command source="client" code="0x03" name="RemoveGroup" response="RemoveGroupResponse" optional="false" cli="zcl groups remove">
<description>
Command description for RemoveGroup
</description>
Expand Down Expand Up @@ -268,7 +268,7 @@ limitations under the License.
<attribute side="server" code="0x0004" define="SCENE_NAME_SUPPORT" type="BITMAP8" min="0x00" max="0x80" writable="false" optional="false">name support</attribute>
<!-- NAME_SUPPORT -->
<attribute side="server" code="0x0005" define="LAST_CONFIGURED_BY" type="NODE_ID" writable="false" optional="true">last configured by</attribute>
<command source="client" code="0x00" name="AddScene" optional="false" cli="zcl scenes add">
<command source="client" code="0x00" name="AddScene" response="AddSceneResponse" optional="false" cli="zcl scenes add">
<description>
Add a scene to the scene table. Extension field sets are supported, and are inputed as arrays of the form [[cluster ID] [length] [value0...n] ...]
</description>
Expand All @@ -278,27 +278,27 @@ limitations under the License.
<arg name="sceneName" type="CHAR_STRING"/>
<arg name="extensionFieldSets" type="SceneExtensionFieldSet" array="true"/>
</command>
<command source="client" code="0x01" name="ViewScene" optional="false" cli="zcl scenes view">
<command source="client" code="0x01" name="ViewScene" response="ViewSceneResponse" optional="false" cli="zcl scenes view">
<description>
Command description for ViewScene
</description>
<arg name="groupId" type="INT16U"/>
<arg name="sceneId" type="INT8U"/>
</command>
<command source="client" code="0x02" name="RemoveScene" optional="false" cli="zcl scenes remove">
<command source="client" code="0x02" name="RemoveScene" response="RemoveSceneResponse" optional="false" cli="zcl scenes remove">
<description>
Command description for RemoveScene
</description>
<arg name="groupId" type="INT16U"/>
<arg name="sceneId" type="INT8U"/>
</command>
<command source="client" code="0x03" name="RemoveAllScenes" optional="false" cli="zcl scenes rmall">
<command source="client" code="0x03" name="RemoveAllScenes" response="RemoveAllScenesResponse" optional="false" cli="zcl scenes rmall">
<description>
Command description for RemoveAllScenes
</description>
<arg name="groupId" type="INT16U"/>
</command>
<command source="client" code="0x04" name="StoreScene" optional="false" cli="zcl scenes store">
<command source="client" code="0x04" name="StoreScene" response="StoreSceneResponse" optional="false" cli="zcl scenes store">
<description>
Command description for StoreScene
</description>
Expand All @@ -313,7 +313,7 @@ limitations under the License.
<arg name="sceneId" type="INT8U"/>
<arg name="transitionTime" type="INT16U" introducedIn="zcl-7.0-07-5123-07" optional="1"/>
</command>
<command source="client" code="0x06" name="GetSceneMembership" optional="false" cli="zcl scenes get">
<command source="client" code="0x06" name="GetSceneMembership" response="GetSceneMembershipResponse" optional="false" cli="zcl scenes get">
<description>
Command description for GetSceneMembership
</description>
Expand Down Expand Up @@ -491,7 +491,7 @@ limitations under the License.
Command description for ResetAllAlarms
</description>
</command>
<command source="client" code="0x02" name="GetAlarm" optional="true">
<command source="client" code="0x02" name="GetAlarm" response="GetAlarmResponse" optional="true">
<description>
Command description for GetAlarm
</description>
Expand Down
Loading

0 comments on commit 5c348ee

Please sign in to comment.