| # 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.5. [TC-DRLK-2.5] Verification for the following Commands - Set Week |
| Day Schedule, Get Week Day Schedule , Get Week Day Schedule Response, Clear |
| Week Day Schedule [DUT-Server] |
| |
| PICS: |
| - DRLK.S |
| - DRLK.S.F08 |
| |
| 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: "Precondition: 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: "Precondition: 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: [] |
| - name: "CreatorFabricIndex" |
| value: 1 |
| - name: "LastModifiedFabricIndex" |
| value: 1 |
| - name: "NextUserIndex" |
| value: null |
| |
| - label: |
| "Step 1: TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute |
| and saves for future use" |
| PICS: DRLK.S.F04 && DRLK.S.A0014 |
| command: "readAttribute" |
| attribute: "NumberOfWeekDaySchedulesSupportedPerUser" |
| response: |
| saveAs: NumberOfWeekDaySchedulesSupportedPerUserValue |
| constraints: |
| minValue: 0 |
| maxValue: 255 |
| |
| - label: |
| "Step 2: TH reads NumberOfTotalUsers Supported attribute and saves for |
| future use" |
| PICS: DRLK.S.F08 && DRLK.S.A0011 |
| command: "readAttribute" |
| attribute: "NumberOfTotalUsersSupported" |
| response: |
| saveAs: NumberOfTotalUsersSupportedValue |
| constraints: |
| minValue: 0 |
| maxValue: 65534 |
| |
| - label: |
| "Step 3: TH send Set Week Day Schedule Command to DUT with the |
| following values : a)WeekDayIndex as 1 b)UserIndex as 1 c)DaysMaskMap |
| as 2 d)StartHour as 15 e)StartMinute as 45 f)EndHour as 16 g)EndMinute |
| as 55 " |
| PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp |
| command: "SetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "DaysMask" |
| value: 2 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| value: 16 |
| - name: "EndMinute" |
| value: 55 |
| |
| #issue #18591 |
| - label: |
| "Step 4: TH send Get Week Day Schedule Command to DUT with |
| a)WeekDayIndex as 1 b)UserIndex as 1 " |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x0 |
| - name: "DaysMask" |
| value: 2 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| constraints: |
| hasValue: true |
| minValue: 16 |
| - name: "EndMinute" |
| constraints: |
| hasValue: true |
| minValue: 55 |
| |
| - label: |
| "Step 5: TH send Set Week Day Schedule Command to DUT with the |
| following values : a)WeekDayIndex as 0 (invalid value) b)UserIndex as |
| 1 c)DaysMaskMap as 7 (invalid value) d)StartHour as 15 e)StartMinute |
| as 45 f)EndHour as 16 g)EndMinute as 55" |
| PICS: DRLK.S.F04 && DRLK.S.C0b.Rsp |
| command: "SetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "DaysMask" |
| value: 7 |
| - name: "StartHour" |
| value: 15 |
| - name: "StartMinute" |
| value: 45 |
| - name: "EndHour" |
| value: 16 |
| - name: "EndMinute" |
| value: 55 |
| response: |
| error: INVALID_COMMAND |
| |
| - label: |
| "Step 6: TH send Get Week Day Schedule Command to DUT : a)WeekDayIndex |
| as 0 b)UserIndex as 1 " |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x85 |
| - name: "DaysMask" |
| constraints: |
| hasValue: false |
| - name: "StartHour" |
| constraints: |
| hasValue: false |
| - name: "StartMinute" |
| constraints: |
| hasValue: false |
| - name: "EndHour" |
| constraints: |
| hasValue: false |
| - name: "EndMinute" |
| constraints: |
| hasValue: false |
| |
| - label: |
| "Step 7: TH sends Get Week Day Schedule Command to DUT with following |
| values: a)WeekDayIndex as 1 (index of existing Schedule entry) |
| b)UserIndex as 2 (index on non-existent User)" |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 2 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 2 |
| - name: "Status" |
| value: 0x8B |
| - name: "DaysMask" |
| constraints: |
| hasValue: false |
| - name: "StartHour" |
| constraints: |
| hasValue: false |
| - name: "StartMinute" |
| constraints: |
| hasValue: false |
| - name: "EndHour" |
| constraints: |
| hasValue: false |
| - name: "EndMinute" |
| constraints: |
| hasValue: false |
| |
| - label: |
| "Step 8: TH sends Clear Week Day Schedule Command to DUT with : |
| a)WeekDayIndex as 1 b)UserIndex as 1" |
| PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp |
| command: "ClearWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| |
| - label: |
| "Step 9: TH sends Get Week Day Schedule Command to DUT with following |
| values: a)WeekDayIndex as 1 b)UserIndex as 1" |
| PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx |
| command: "GetWeekDaySchedule" |
| arguments: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "WeekDayIndex" |
| value: 1 |
| - name: "UserIndex" |
| value: 1 |
| - name: "Status" |
| value: 0x8B |
| - name: "DaysMask" |
| constraints: |
| hasValue: false |
| - name: "StartHour" |
| constraints: |
| hasValue: false |
| - name: "StartMinute" |
| constraints: |
| hasValue: false |
| - name: "EndHour" |
| constraints: |
| hasValue: false |
| - name: "EndMinute" |
| constraints: |
| hasValue: false |
| |
| - label: "Cleanup the created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |