Skip to content

Commit

Permalink
Align naming in General Commissioning cluster XML with the spec. (#24241
Browse files Browse the repository at this point in the history
)

* Align naming in General Commissioning cluster XML with the spec.

* Regenerate generated files.
  • Loading branch information
bzbarsky-apple authored Jan 4, 2023
1 parent 7195bd8 commit 23e5fb2
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 86 deletions.
6 changes: 3 additions & 3 deletions src/app/tests/suites/TestArmFailSafe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ tests:
command: "ArmFailSafe"
arguments:
values:
- name: "expiryLengthSeconds"
- name: "ExpiryLengthSeconds"
value: 0
- name: "breadcrumb"
- name: "Breadcrumb"
value: 0
response:
values:
- name: "errorCode"
- name: "ErrorCode"
value: 0

- label: "Reads NodeLabel mandatory attribute of target device"
Expand Down
36 changes: 18 additions & 18 deletions src/app/tests/suites/TestGeneralCommissioning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ tests:
command: "CommissioningComplete"
response:
values:
- name: errorCode
- name: ErrorCode
value: 3 # NoFailSafe

- label: "Check Breadcrumb was not touched by invalid CommissioningComplete"
Expand All @@ -115,13 +115,13 @@ tests:
command: "ArmFailSafe"
arguments:
values:
- name: expiryLengthSeconds
- name: ExpiryLengthSeconds
value: 10
- name: breadcrumb
- name: Breadcrumb
value: 5000
response:
values:
- name: errorCode
- name: ErrorCode
value: 4 # BusyWithOtherAdmin

- label:
Expand Down Expand Up @@ -162,13 +162,13 @@ tests:
command: "ArmFailSafe"
arguments:
values:
- name: expiryLengthSeconds
- name: ExpiryLengthSeconds
value: 500
- name: breadcrumb
- name: Breadcrumb
value: 2
response:
values:
- name: errorCode
- name: ErrorCode
value: 0 # OK

- label: "Check Breadcrumb was properly set by ArmFailSafe"
Expand All @@ -182,13 +182,13 @@ tests:
identity: "beta"
arguments:
values:
- name: expiryLengthSeconds
- name: ExpiryLengthSeconds
value: 10
- name: breadcrumb
- name: Breadcrumb
value: 5000
response:
values:
- name: errorCode
- name: ErrorCode
value: 4 # BusyWithOtherAdmin

- label:
Expand All @@ -204,7 +204,7 @@ tests:
identity: "beta"
response:
values:
- name: errorCode
- name: ErrorCode
value: 2 # InvalidAuthentication

- label:
Expand All @@ -219,7 +219,7 @@ tests:
command: "CommissioningComplete"
response:
values:
- name: errorCode
- name: ErrorCode
value: 0 # Ok

- label: "Check Breadcrumb was reset to 0 by CommissioningComplete"
Expand All @@ -232,13 +232,13 @@ tests:
command: "ArmFailSafe"
arguments:
values:
- name: expiryLengthSeconds
- name: ExpiryLengthSeconds
value: 500
- name: breadcrumb
- name: Breadcrumb
value: 3
response:
values:
- name: errorCode
- name: ErrorCode
value: 0 # OK

- label: "Check Breadcrumb was set by arming fail-safe again"
Expand All @@ -251,13 +251,13 @@ tests:
command: "ArmFailSafe"
arguments:
values:
- name: expiryLengthSeconds
- name: ExpiryLengthSeconds
value: 0
- name: breadcrumb
- name: Breadcrumb
value: 4
response:
values:
- name: errorCode
- name: ErrorCode
value: 0 # OK

- label: "Check Breadcrumb was reset by expiring the fail-safe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
<domain name="CHIP"/>
<enum name="CommissioningError" type="ENUM8">
<cluster code="0x0030"/>
<item name="Ok" value="0x0"/>
<item name="OK" value="0x0"/>
<item name="ValueOutsideRange" value="0x1"/>
<item name="InvalidAuthentication" value="0x2"/>
<item name="NoFailSafe" value="0x3"/>
Expand Down Expand Up @@ -53,35 +53,35 @@ limitations under the License.

<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"/>
<arg name="ExpiryLengthSeconds" type="INT16U"/>
<arg name="Breadcrumb" type="INT64U"/>
<access op="invoke" privilege="administer"/>
</command>
<command source="server" code="0x01" name="ArmFailSafeResponse" optional="false" cli="chip fabric_commissioning armfailsaferesponse">
<description>Success/failure response for ArmFailSafe command</description>
<arg name="errorCode" type="CommissioningError"/>
<arg name="debugText" type="CHAR_STRING"/>
<arg name="ErrorCode" type="CommissioningError"/>
<arg name="DebugText" type="CHAR_STRING"/>
</command>
<command source="client" code="0x02" name="SetRegulatoryConfig" response="SetRegulatoryConfigResponse" cli="chip fabric_commissioning setregulatoryconfig">
<description>Set the regulatory configuration to be used during commissioning</description>
<arg name="NewRegulatoryConfig" type="RegulatoryLocationType"/>
<arg name="countryCode" type="CHAR_STRING"/>
<arg name="breadcrumb" type="INT64U"/>
<arg name="CountryCode" type="CHAR_STRING"/>
<arg name="Breadcrumb" type="INT64U"/>
<access op="invoke" privilege="administer"/>
</command>
<command source="server" code="0x03" name="SetRegulatoryConfigResponse" cli="chip fabric_commissioning setregulatoryconfigresponse">
<description>Success/failure response for SetRegulatoryConfig command</description>
<arg name="errorCode" type="CommissioningError"/>
<arg name="debugText" type="CHAR_STRING"/>
<arg name="ErrorCode" type="CommissioningError"/>
<arg name="DebugText" type="CHAR_STRING"/>
</command>
<command source="client" code="0x04" name="CommissioningComplete" response="CommissioningCompleteResponse" isFabricScoped="true" optional="false" cli="chip fabric_commissioning commissioningcomplete">
<description>Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period.</description>
<access op="invoke" privilege="administer"/>
</command>
<command source="server" code="0x05" name="CommissioningCompleteResponse" optional="false" cli="chip fabric_commissioning commissioningcompleteresponse">
<description>Indicates to client whether CommissioningComplete command succeeded</description>
<arg name="errorCode" type="CommissioningError"/>
<arg name="debugText" type="CHAR_STRING"/>
<arg name="ErrorCode" type="CommissioningError"/>
<arg name="DebugText" type="CHAR_STRING"/>
</command>
</cluster>
</configurator>
50 changes: 25 additions & 25 deletions src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp

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

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

11 changes: 11 additions & 0 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5119,6 +5119,9 @@
- ValueA
- ValueB
- ValueC
GeneralCommissioning:
CommissioningError:
- OK
bitmaps:
UnitTesting:
- Bitmap8MaskMap
Expand Down Expand Up @@ -5204,6 +5207,10 @@
Switch:
MultiPressComplete:
- newPosition
enum values:
GeneralCommissioning:
CommissioningError:
- Ok
apis:
- Timed Invoke for server to client commands
- Deprecated global attribute names
Expand Down Expand Up @@ -5267,3 +5274,7 @@
Descriptor:
DeviceTypeStruct:
deviceType: type
enum values:
GeneralCommissioning:
CommissioningError:
OK: Ok
5 changes: 4 additions & 1 deletion src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

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

8 changes: 4 additions & 4 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 23e5fb2

Please sign in to comment.