| # Copyright (c) 2023 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| name: 133.1.1. [TC-TIMESYNC-1.1] Global attributes with server as DUT |
| |
| PICS: |
| - TIMESYNC.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Time Synchronization" |
| endpoint: 0 |
| |
| tests: |
| - label: |
| "Step 1: Commission DUT to TH (can be skipped if done in a preceding |
| test)." |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| ########################## |
| # TS 2: Cluster revision |
| ########################## |
| - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." |
| command: "readAttribute" |
| attribute: "ClusterRevision" |
| response: |
| value: 2 |
| |
| ########################## |
| # TS 3: Feature map |
| ########################## |
| # TZ |
| - label: "Step 3: TH reads from the DUT the FeatureMap attribute." |
| PICS: TIMESYNC.S.F00 |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksSet: [0x1] |
| |
| - label: |
| "Step 3b: Given !TIMESYNC.S.F00(TZ) ensure featuremap has the correct |
| bit clear" |
| PICS: "!TIMESYNC.S.F00" |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksClear: [0x1] |
| # NTPC |
| - label: |
| "Step 3c: Given TIMESYNC.S.F01(NTPC) ensure featuremap has the correct |
| bit set" |
| PICS: TIMESYNC.S.F01 |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksSet: [0x2] |
| |
| - label: |
| "Step 3d: Given !TIMESYNC.S.F01(NTPC) ensure featuremap has the |
| correct bit clear" |
| PICS: "!TIMESYNC.S.F01" |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksClear: [0x2] |
| |
| # NTPS |
| - label: |
| "Step 3e: Given TIMESYNC.S.F02(NTPS) ensure featuremap has the correct |
| bit set" |
| PICS: TIMESYNC.S.F02 |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksSet: [0x4] |
| |
| - label: |
| "Step 3f: Given !TIMESYNC.S.F02(NTPS) ensure featuremap has the |
| correct bit clear" |
| PICS: "!TIMESYNC.S.F02" |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksClear: [0x4] |
| |
| # TSC |
| - label: |
| "Step 3g: Given TIMESYNC.S.F03(TSC) ensure featuremap has the correct |
| bit set" |
| PICS: TIMESYNC.S.F03 |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksSet: [0x8] |
| |
| - label: |
| "Step 3h: Given !TIMESYNC.S.F03(TSC) ensure featuremap has the correct |
| bit clear" |
| PICS: "!TIMESYNC.S.F03" |
| command: "readAttribute" |
| attribute: "FeatureMap" |
| response: |
| constraints: |
| type: bitmap32 |
| hasMasksClear: [0x8] |
| |
| ########################## |
| # TS 3: Feature map |
| ########################## |
| # Mandatory entries |
| - label: "Step 4a: TH reads from the DUT the AttributeList attribute." |
| PICS: PICS_EVENT_LIST_ENABLED |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: |
| [ |
| 0x0000, |
| 0x0001, |
| 0xFFF8, |
| 0xFFF9, |
| 0xFFFA, |
| 0xFFFB, |
| 0xFFFC, |
| 0xFFFD, |
| ] |
| |
| - label: "Step 4b: TH reads from the DUT the AttributeList attribute." |
| PICS: "!PICS_EVENT_LIST_ENABLED" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0000, 0x0001, 0xFFF8, 0xFFF9, 0xFFFB, 0xFFFC, 0xFFFD] |
| |
| # Optional |
| - label: "Step 4c: Check for optional attribute TimeSource in AttributeList" |
| PICS: TIMESYNC.S.A0002 |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0002] |
| |
| - label: |
| "Step 4d: Check for optional attribute TimeSource not in AttributeList" |
| PICS: "!TIMESYNC.S.A0002" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| excludes: [0x0002] |
| |
| # Feature TZ |
| - label: "Step 4e: Check for TZ feature-based attributes in AttributeList" |
| PICS: TIMESYNC.S.F00 |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0005, 0x0006, 0x0007, 0x0008, 0x000A, 0x000B] |
| |
| - label: |
| "Step 4f: Check for TZ feature-based attributes not in AttributeList" |
| PICS: "!TIMESYNC.S.F00" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| excludes: [0x0005, 0x0006, 0x0007, 0x0008, 0x000A, 0x000B] |
| |
| # Feature NTPC |
| - label: "Step 4g: Check for NTPC feature-based attributes in AttributeList" |
| PICS: TIMESYNC.S.F01 |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0004, 0x000C] |
| |
| - label: |
| "Step 4h: Check for NTPC feature-based attributes not in AttributeList" |
| PICS: "!TIMESYNC.S.F01" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| excludes: [0x0004, 0x000C] |
| |
| # Feature NTPS |
| - label: "Step 4i: Check for NTPS feature-based attributes in AttributeList" |
| PICS: TIMESYNC.S.F02 |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0009] |
| |
| - label: |
| "Step 4j: Check for NTPS feature-based attributes not in AttributeList" |
| PICS: "!TIMESYNC.S.F02" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| excludes: [0x0009] |
| |
| # Feature TSC |
| - label: "Step 4k: Check for TSC feature-based attributes in AttributeList" |
| PICS: TIMESYNC.S.F03 |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| contains: [0x0003] |
| |
| - label: |
| "Step 4l: Check for TSC feature-based attributes not in AttributeList" |
| PICS: "!TIMESYNC.S.F03" |
| command: "readAttribute" |
| attribute: "AttributeList" |
| response: |
| constraints: |
| excludes: [0x0003] |
| |
| # Note - additional exclusions not handled here |
| |
| ########################## |
| # TS 5: Event list - NOTE: disabled |
| ########################## |
| # mandatory |
| - label: "Step 5a: TH reads from the DUT the EventList attribute." |
| PICS: PICS_EVENT_LIST_ENABLED |
| command: "readAttribute" |
| attribute: "EventList" |
| response: |
| constraints: |
| contains: [0x03] |
| |
| #Feature TZ |
| - label: "Step 5b: Check for TZ feature-based events in EventList" |
| PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00 |
| command: "readAttribute" |
| attribute: "EventList" |
| response: |
| constraints: |
| contains: [0x00, 0x01, 0x02] |
| |
| - label: "Step 5c: Check for TZ feature-based events not in EventList" |
| PICS: "PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00" |
| command: "readAttribute" |
| attribute: "EventList" |
| response: |
| constraints: |
| excludes: [0x00, 0x01, 0x02] |
| |
| #Feature TSC |
| - label: "Step 5d: Check for TSC feature-based events in EventList" |
| PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03 |
| command: "readAttribute" |
| attribute: "EventList" |
| response: |
| constraints: |
| contains: [0x04] |
| |
| - label: "Step 5e: Check for TSC feature-based events not in EventList" |
| PICS: "PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03" |
| command: "readAttribute" |
| attribute: "EventList" |
| response: |
| constraints: |
| excludes: [0x04] |
| |
| # Note - additional exclusions not handled here |
| |
| ########################## |
| # TS 6: AcceptedCommandList |
| ########################## |
| # mandatory |
| - label: "Step 6a: TH reads from the DUT the AcceptedCommandList attribute." |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| contains: [0x00] |
| |
| # Feature TZ |
| - label: |
| "Step 6b: Check for TZ feature-based commands in AcceptedCommandList" |
| PICS: TIMESYNC.S.F00 |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| contains: [0x02, 0x04] |
| |
| - label: |
| "Step 6c: Check for TZ feature-based commands in not |
| AcceptedCommandList" |
| PICS: "!TIMESYNC.S.F00" |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| excludes: [0x02, 0x04] |
| |
| # Feature NTPC |
| - label: |
| "Step 6d: Check for NTPC feature-based commands in AcceptedCommandList" |
| PICS: TIMESYNC.S.F01 |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| contains: [0x05] |
| |
| - label: |
| "Step 6e: Check for NTPC feature-based commands in not |
| AcceptedCommandList" |
| PICS: "!TIMESYNC.S.F01" |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| excludes: [0x05] |
| |
| # Feature TSC |
| - label: |
| "Step 6f: Check for TSC feature-based commands in AcceptedCommandList" |
| PICS: TIMESYNC.S.F03 |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| contains: [0x01] |
| |
| - label: |
| "Step 6g: Check for TSC feature-based commands in not |
| AcceptedCommandList" |
| PICS: "!TIMESYNC.S.F03" |
| command: "readAttribute" |
| attribute: "AcceptedCommandList" |
| response: |
| constraints: |
| excludes: [0x01] |
| |
| # NOTE: exclusions not checked |
| |
| ########################## |
| # TS 7: GeneratedCommandList |
| ########################## |
| # Feature TZ |
| - label: "Step 7a: TH reads from the DUT the GeneratedCommandList attribute" |
| PICS: TIMESYNC.S.F00 |
| command: "readAttribute" |
| attribute: "GeneratedCommandList" |
| response: |
| constraints: |
| contains: [0x03] |
| |
| - label: |
| "Step 7b: Check for TZ feature-based commands in not |
| GeneratedCommandList" |
| PICS: "!TIMESYNC.S.F00" |
| command: "readAttribute" |
| attribute: "GeneratedCommandList" |
| response: |
| constraints: |
| excludes: [0x03] |