| # Copyright (c) 2021 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: |
| 111.2.7. [TC-DRLK-2.7] Verification for the following Commands - Set Year |
| Schedule, Get Year Schedule, Get Year Day Schedule Response and Clear Year |
| Day Schedule[DUT-Server] |
| |
| PICS: |
| - DRLK.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Door Lock" |
| endpoint: 1 |
| |
| tests: |
| - label: "Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: "Create new user" |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| |
| - label: "Read the user back and verify its fields" |
| command: "GetUser" |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| - name: "Credentials" |
| value: null |
| - name: "CreatorFabricIndex" |
| value: 1 |
| - name: "LastModifiedFabricIndex" |
| value: 1 |
| - name: "NextUserIndex" |
| value: null |
| |
| - label: "TH reads NumberOfYearDay SchedulesSupportedPerUser attribute" |
| PICS: DRLK.S.F0a && DRLK.S.A0015 |
| command: "readAttribute" |
| attribute: "NumberOfYearDaySchedulesSupportedPerUser" |
| response: |
| saveAs: NumberOfYearDaySchedulesSupportedPerUser |
| constraints: |
| minValue: 0 |
| maxValue: 255 |
| |
| - label: "TH reads NumberOfTotalUsers Supported attribute" |
| PICS: DRLK.S.F08 && DRLK.S.A0011 |
| command: "readAttribute" |
| attribute: "NumberOfTotalUsersSupported" |
| response: |
| saveAs: NumberOfTotalUsersSupported |
| constraints: |
| minValue: 0 |
| maxValue: 65534 |
| |
| - label: "TH sends Set Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0e.Rsp |
| command: "SetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "LocalStartTime" |
| value: 960 |
| - name: "LocalEndTime" |
| value: 1980 |
| |
| #issue #18591 |
| - label: "TH sends Get Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx |
| command: "GetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x0 |
| - name: "LocalStartTime" |
| value: 960 |
| - name: "LocalEndTime" |
| value: 1980 |
| constraints: |
| minValue: 961 |
| |
| - label: "TH send Set Year Day Schedule Command to DUT" |
| PICS: DRLK.S.C0e.Rsp |
| command: "SetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 15 |
| - name: "LocalStartTime" |
| value: 1020 |
| - name: "LocalEndTime" |
| value: 2040 |
| response: |
| error: INVALID_COMMAND |
| |
| - label: "TH sends Get Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx |
| command: "GetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 15 |
| response: |
| values: |
| - name: "YearDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 15 |
| - name: "Status" |
| value: 0x85 |
| - name: "LocalStartTime" |
| constraints: |
| hasValue: false |
| - name: "LocalEndTime" |
| constraints: |
| hasValue: false |
| |
| - label: "Create a user with userIndex as 5" |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "UserIndex" |
| value: 5 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| |
| - label: "TH sends Get Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx |
| command: "GetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: NumberOfYearDaySchedulesSupportedPerUser |
| - name: "UserIndex" |
| value: 5 |
| response: |
| values: |
| - name: "YearDayIndex" |
| value: NumberOfYearDaySchedulesSupportedPerUser |
| - name: "UserIndex" |
| value: 5 |
| - name: "Status" |
| value: 0x8B |
| - name: "LocalStartTime" |
| constraints: |
| hasValue: false |
| - name: "LocalEndTime" |
| constraints: |
| hasValue: false |
| |
| - label: "TH sends Clear Year Day Schedule to DUT" |
| PICS: DRLK.S.C10.Rsp |
| command: "ClearYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| |
| - label: "TH sends Get Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp |
| command: "GetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x8B |
| - name: "LocalStartTime" |
| constraints: |
| hasValue: false |
| - name: "LocalEndTime" |
| constraints: |
| hasValue: false |
| |
| - label: "TH sends Set Year Day Schedule Command to DUT" |
| PICS: DRLK.S.C0e.Rsp |
| command: "SetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "LocalStartTime" |
| value: 1080 |
| - name: "LocalEndTime" |
| value: 2100 |
| |
| - label: "TH sends Get Year Day Schedule Command to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx |
| command: "GetYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x00 |
| - name: "LocalStartTime" |
| value: 1080 |
| - name: "LocalEndTime" |
| value: 2100 |
| constraints: |
| minValue: 1081 |
| |
| - label: "TH sends Clear Year Day Schedule to DUT" |
| PICS: DRLK.S.F0a && DRLK.S.C10.Rsp |
| command: "ClearYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 0 |
| response: |
| error: INVALID_COMMAND |
| |
| - label: "Clear a year day schedule for the first user" |
| PICS: DRLK.S.F0a && DRLK.S.C10.Rsp |
| command: "ClearYearDaySchedule" |
| arguments: |
| values: |
| - name: "YearDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| |
| - label: "Cleanup the created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |