|
| 1 | +# |
| 2 | +# Copyright (c) 2023 Project CHIP Authors |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an 'AS IS' BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +from ..pseudo_cluster import PseudoCluster |
| 17 | + |
| 18 | +_DEFINITION = '''<?xml version="1.0"?> |
| 19 | +<configurator> |
| 20 | +<cluster> |
| 21 | + <name>DiscoveryCommands</name> |
| 22 | + <code>0xFFF1FD05</code> |
| 23 | +
|
| 24 | + <command source="client" code="0" name="FindCommissionable" response="FindResponse"> |
| 25 | + </command> |
| 26 | +
|
| 27 | + <command source="client" code="1" name="FindCommissionableByShortDiscriminator" response="FindResponse"> |
| 28 | + <arg name="value" type="int16u"/> |
| 29 | + </command> |
| 30 | +
|
| 31 | + <command source="client" code="2" name="FindCommissionableByLongDiscriminator" response="FindResponse"> |
| 32 | + <arg name="value" type="int16u"/> |
| 33 | + </command> |
| 34 | +
|
| 35 | + <command source="client" code="3" name="FindCommissionableByCommissioningMode" response="FindResponse"> |
| 36 | + </command> |
| 37 | +
|
| 38 | + <command source="client" code="4" name="FindCommissionableByVendorId" response="FindResponse"> |
| 39 | + <arg name="value" type="vendor_id"/> |
| 40 | + </command> |
| 41 | +
|
| 42 | + <command source="client" code="5" name="FindCommissionableByDeviceType" response="FindResponse"> |
| 43 | + <arg name="value" type="devtype_id"/> |
| 44 | + </command> |
| 45 | +
|
| 46 | + <command source="client" code="6" name="FindCommissioner" response="FindCommissionerResponse"> |
| 47 | + </command> |
| 48 | +
|
| 49 | + <command source="client" code="7" name="FindCommissionerByVendorId" response="FindCommissionerResponse"> |
| 50 | + <arg name="value" type="vendor_id"/> |
| 51 | + </command> |
| 52 | +
|
| 53 | + <command source="client" code="8" name="FindCommissionerByDeviceType" response="FindCommissionerResponse"> |
| 54 | + <arg name="value" type="devtype_id"/> |
| 55 | + </command> |
| 56 | +
|
| 57 | + <command source="server" code="9" name="FindResponse"> |
| 58 | + <arg name="hostName" type="char_string"/> |
| 59 | + <arg name="instanceName" type="char_string"/> |
| 60 | + <arg name="longDiscriminator" type="int16u"/> |
| 61 | + <arg name="shortDiscriminator" type="int16u"/> |
| 62 | + <arg name="vendorId" type="vendor_id"/> |
| 63 | + <arg name="productId" type="int16u"/> |
| 64 | + <arg name="commissioningMode" type="int8u"/> |
| 65 | + <arg name="deviceType" type="devtype_id"/> |
| 66 | + <arg name="deviceName" type="char_string"/> |
| 67 | + <arg name="rotatingId" type="octet_string"/> |
| 68 | + <arg name="rotatingIdLen" type="int64u"/> |
| 69 | + <arg name="pairingHint" type="int16u"/> |
| 70 | + <arg name="pairingInstruction" type="char_string"/> |
| 71 | + <arg name="supportsTcp" type="boolean"/> |
| 72 | + <arg name="numIPs" type="int8u"/> |
| 73 | + <arg name="port" type="int16u"/> |
| 74 | + <arg name="mrpRetryIntervalIdle" type="int32u" optional="true"/> |
| 75 | + <arg name="mrpRetryIntervalActive" type="int32u" optional="true"/> |
| 76 | + </command> |
| 77 | +</cluster> |
| 78 | +</configurator> |
| 79 | +''' |
| 80 | + |
| 81 | + |
| 82 | +class DiscoveryCommands(PseudoCluster): |
| 83 | + name = 'DiscoveryCommands' |
| 84 | + definition = _DEFINITION |
0 commit comments