|
| 1 | +# Copyright (c) 2024 Project CHIP Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: "[TC-TBRM-2.3] Change dataset configuration of Thread Border Router" |
| 16 | + |
| 17 | +PICS: |
| 18 | + - TBRM.S |
| 19 | + - TBRM.S.F00 |
| 20 | + |
| 21 | +config: |
| 22 | + nodeId: 0x12344321 |
| 23 | + cluster: Thread Border Router Management |
| 24 | + endpoint: 1 |
| 25 | + PIXIT.TBRM.THREAD_ACTIVE_DATASET: |
| 26 | + type: octet_string |
| 27 | + defaultValue: "hex:0e080000000000010000000300001235060004001fffe002082ad51c02fe8f64f20708fddb8af85255f93a051083e2b9b2cc609b00125adbf823ea2ab20102c4d904100a133626c411d7de02a570ca3c3d80470c0402a0f7f8031054687265616441637469766554657374" |
| 28 | + PIXIT.TBRM.THREAD_PENDING_DATASET: |
| 29 | + type: octet_string |
| 30 | + defaultValue: "hex:0e08000000000002000033080000000000010000340400004e2035060004001fffe002082ad51c02fe8f64f20708fddb8af85255f93a051083e2b9b2cc609b00125adbf823ea2ab20102c4d904100a133626c411d7de02a570ca3c3d80470c0402a0f7f8030d54687265616450656e64696e67000300000c" |
| 31 | + # Active Timestamp ----^^^^^^^^^^^^^^^^ |
| 32 | + # Pending Timestamp -----------------------^^^^^^^^^^^^^^^^ |
| 33 | + # Delay Timer -------------------------------------------------^^^^^^^^ == 20000ms Note: waitForReport has a hard-coded 30 second timeout |
| 34 | + |
| 35 | +tests: |
| 36 | + - label: "Wait for the commissioned device to be retrieved" |
| 37 | + cluster: DelayCommands |
| 38 | + command: WaitForCommissionee |
| 39 | + arguments: |
| 40 | + values: |
| 41 | + - name: nodeId |
| 42 | + value: nodeId |
| 43 | + # Step 1 |
| 44 | + - label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" |
| 45 | + command: readAttribute |
| 46 | + attribute: ActiveDatasetTimestamp |
| 47 | + response: |
| 48 | + saveAs: initialActiveTimestamp |
| 49 | + constraints: |
| 50 | + type: int64u |
| 51 | + |
| 52 | + - label: "If the ActiveDatasetTimestamp attribute not null, go to step 4" |
| 53 | + cluster: EqualityCommands |
| 54 | + command: UnsignedNumberEquals |
| 55 | + arguments: |
| 56 | + values: |
| 57 | + - name: Value1 |
| 58 | + value: initialActiveTimestamp |
| 59 | + - name: Value2 |
| 60 | + value: null |
| 61 | + response: |
| 62 | + - values: |
| 63 | + - name: Equals |
| 64 | + saveAs: noActiveDataset |
| 65 | + |
| 66 | + # Step 2 |
| 67 | + - label: "TH sends ArmFailSafe command to the DUT" |
| 68 | + runIf: noActiveDataset |
| 69 | + cluster: General Commissioning |
| 70 | + command: ArmFailSafe |
| 71 | + endpoint: 0 |
| 72 | + arguments: |
| 73 | + values: |
| 74 | + - name: ExpiryLengthSeconds |
| 75 | + value: 60 |
| 76 | + - name: Breadcrumb |
| 77 | + value: 1 |
| 78 | + |
| 79 | + # Step 3 |
| 80 | + - label: "TH sends a valid ActiveDatasetRequest command to the DUT" |
| 81 | + runIf: noActiveDataset |
| 82 | + command: SetActiveDatasetRequest |
| 83 | + arguments: |
| 84 | + values: |
| 85 | + - name: ActiveDataset |
| 86 | + value: PIXIT.TBRM.THREAD_ACTIVE_DATASET |
| 87 | + |
| 88 | + # Step 4 |
| 89 | + - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" |
| 90 | + command: readAttribute |
| 91 | + attribute: PendingDatasetTimestamp |
| 92 | + response: |
| 93 | + saveAs: initialPendingTimestamp |
| 94 | + constraints: |
| 95 | + type: int64u |
| 96 | + |
| 97 | + # Step 5 |
| 98 | + - label: "TH sends a SetPendingDatasetRequest command to the DUT" |
| 99 | + command: SetPendingDatasetRequest |
| 100 | + arguments: |
| 101 | + values: |
| 102 | + - name: PendingDataset |
| 103 | + value: PIXIT.TBRM.THREAD_PENDING_DATASET |
| 104 | + |
| 105 | + # Step 6 |
| 106 | + - label: "TH sends a GetPendingDatasetRequest command to the DUT" |
| 107 | + command: GetPendingDatasetRequest |
| 108 | + response: |
| 109 | + values: |
| 110 | + - name: Dataset |
| 111 | + constraints: |
| 112 | + type: octet_string |
| 113 | + # TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET but ignoring the Delay Timer element if present |
| 114 | + |
| 115 | + # Step 7 |
| 116 | + - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" |
| 117 | + command: readAttribute |
| 118 | + attribute: PendingDatasetTimestamp |
| 119 | + response: |
| 120 | + constraints: |
| 121 | + type: int64u |
| 122 | + notValue: initialPendingTimestamp |
| 123 | + |
| 124 | + # Step 8 |
| 125 | + - label: |
| 126 | + "TH subscribes to the ActiveDatasetTimestamp attribute from the DUT" |
| 127 | + command: subscribeAttribute |
| 128 | + attribute: ActiveDatasetTimestamp |
| 129 | + minInterval: 1 |
| 130 | + maxInterval: 70 |
| 131 | + response: |
| 132 | + constraints: |
| 133 | + type: int64u |
| 134 | + hasValue: true # not null |
| 135 | + |
| 136 | + - label: "TH waits for an ActiveDatasetTimestamp report" |
| 137 | + command: waitForReport |
| 138 | + attribute: ActiveDatasetTimestamp |
| 139 | + # TODO: waitForReport uses a hard-coded timeout of 30s, should be configurable? |
| 140 | + response: |
| 141 | + constraints: |
| 142 | + hasValue: true |
| 143 | + |
| 144 | + # Step 9 |
| 145 | + - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" |
| 146 | + command: readAttribute |
| 147 | + attribute: PendingDatasetTimestamp |
| 148 | + response: |
| 149 | + value: null |
| 150 | + |
| 151 | + # Step 10 |
| 152 | + - label: "TH sends a valid GetActiveDatasetRequest command to the DUT" |
| 153 | + command: GetActiveDatasetRequest |
| 154 | + response: |
| 155 | + values: |
| 156 | + - name: Dataset |
| 157 | + # TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET without the Delay Timer and Pending Timestamp elements |
| 158 | + constraints: |
| 159 | + type: octet_string |
| 160 | + |
| 161 | + # Step 11 |
| 162 | + - label: "TH reads the InterfaceEnabled attribute from the DUT" |
| 163 | + command: readAttribute |
| 164 | + attribute: InterfaceEnabled |
| 165 | + response: |
| 166 | + value: true |
0 commit comments