Skip to content

Commit

Permalink
Merge branch 'master' into EVSE_Add_PersistedAttributes_and_Events
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesharrow authored Jan 16, 2024
2 parents ac40f61 + 72fd9e9 commit 138760c
Show file tree
Hide file tree
Showing 30 changed files with 2,120 additions and 1,077 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3041,6 +3041,7 @@ cluster RvcRunMode = 84 {
enum ModeTag : enum16 {
kIdle = 16384;
kCleaning = 16385;
kMapping = 16386;
}

enum StatusCode : enum8 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ cluster RvcRunMode = 84 {
enum ModeTag : enum16 {
kIdle = 16384;
kCleaning = 16385;
kMapping = 16386;
}

enum StatusCode : enum8 {
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/qpg/project_include/OpenThreadConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#define OPENTHREAD_CONFIG_TCP_ENABLE 0
#define OPENTHREAD_CONFIG_BLE_TCAT_ENABLE 0
#define OPENTHREAD_CONFIG_TLS_ENABLE 0
#define OPENTHREAD_CONFIG_DTLS_ENABLE 0
#define OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE 0

#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0
#define OPENTHREAD_EXAMPLES_SIMULATION 0
Expand Down
1 change: 1 addition & 0 deletions examples/rvc-app/rvc-common/rvc-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ cluster RvcRunMode = 84 {
enum ModeTag : enum16 {
kIdle = 16384;
kCleaning = 16385;
kMapping = 16386;
}

enum StatusCode : enum8 {
Expand Down
67 changes: 67 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9421,3 +9421,70 @@ PICS:

- label: "Does the device implement the SensorFault event?"
id: BOOLCFG.S.E01

#
#Valve Configuration and Control
#
- label:
"Does the device implement the Valve Configuration and Control cluster
as a server?"
id: VALCC.S

#Features
- label:
"Does the device support the ability to use UTC time is used for time
indications?"
id: VALCC.S.F00

- label:
"Does the device support the ability to setting the specific position
of the valve?"
id: VALCC.S.F01

#Attributes
- label: "Does the device implement the OpenDuration attribute?"
id: VALCC.S.A0000

- label: "Does the device implement the DefaultOpenDuration attribute?"
id: VALCC.S.A0001

- label: "Does the device implement the AutoCloseTime attribute?"
id: VALCC.S.A0002

- label: "Does the device implement the RemainingDuration attribute?"
id: VALCC.S.A0003

- label: "Does the device implement the CurrentState attribute?"
id: VALCC.S.A0004

- label: "Does the device implement the TargetState attribute?"
id: VALCC.S.A0005

- label: "Does the device implement the CurrentLevel attribute?"
id: VALCC.S.A0006

- label: "Does the device implement the TargetLevel attribute?"
id: VALCC.S.A0007

- label: "Does the device implement the DefaultOpenLevel attribute?"
id: VALCC.S.A0008

- label: "Does the device implement the ValveFault attribute?"
id: VALCC.S.A0009

- label: "Does the device implement the LevelStep attribute?"
id: VALCC.S.A000a

#Commands received
- label: "Does the device implement receiving the Open command?"
id: VALCC.S.C00.Rsp

- label: "Does the device implement receiving the Close command?"
id: VALCC.S.C01.Rsp

#Events
- label: "Does the device implement the ValveStateChanged event?"
id: VALCC.S.E00

- label: "Does the device implement the ValveFault event?"
id: VALCC.S.E01
927 changes: 0 additions & 927 deletions src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml

This file was deleted.

186 changes: 186 additions & 0 deletions src/app/tests/suites/certification/Test_TC_VALCC_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Copyright (c) 2024 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: 62.1.1. [TC-VALCC-1.1] Global attributes with server as DUT

PICS:
- VALCC.S

config:
nodeId: 0x12344321
cluster: "Valve Configuration and Control"
endpoint: 1

tests:
- label: "Step 1: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Step 2: Read the global attribute: ClusterRevision"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

- label: "Step 3a: Read the global attribute: FeatureMap"
command: "readAttribute"
attribute: "FeatureMap"
PICS: ( !VALCC.S.F00 && !VALCC.S.F01 )
response:
value: 0
constraints:
type: bitmap32

- label:
"Step 3b: Given VALCC.S.F00(TS) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: VALCC.S.F00
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

- label:
"Step 3c: Given VALCC.S.F01(LVL) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: VALCC.S.F01
response:
constraints:
type: bitmap32
hasMasksSet: [0x2]

- label: "Step 4a: Read the global attribute: AttributeList"
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533]

- label: "Step 4a: Read the global attribute: AttributeList"
PICS: "!PICS_EVENT_LIST_ENABLED"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 3, 4, 65528, 65529, 65531, 65532, 65533]

- label:
"Step 4b: Read the feature dependent(VALCC.S.F00) attribute in
AttributeList"
PICS: VALCC.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2]

- label:
"Step 4c: Read the feature dependent(VALCC.S.F01) attribute in
AttributeList"
PICS: VALCC.S.F01
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [6, 7]

- label:
"Step 4d: Read the feature dependent(VALCC.S.F01) optional attribute
in AttributeList"
PICS: VALCC.S.F01 && VALCC.S.A0008
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [8]

- label:
"Step 4e: Read the feature dependent(VALCC.S.F01) optional attribute
in AttributeList"
PICS: VALCC.S.F01 && VALCC.S.A000a
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [10]

- label:
"Step 4f: TH reads optional (ValveFault) attribute in AttributeList"
PICS: VALCC.S.A0009
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [9]

- label: "Step 5a: Read the global attribute: EventList"
PICS: PICS_EVENT_LIST_ENABLED && !VALCC.S.E00 && !VALCC.S.E01
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list

- label: "Step 5b: Read the optional (ValveStateChanged) event in EventList"
PICS: PICS_EVENT_LIST_ENABLED && VALCC.S.E00
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [0]

- label: "Step 5c: Read the optional (ValveFault) event in EventList"
PICS: PICS_EVENT_LIST_ENABLED && VALCC.S.E01
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [1]

- label: "Step 6: Read the global attribute: AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0, 1]

- label: "Step 7: Read the global attribute: GeneratedCommandList"
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: []
constraints:
type: list
21 changes: 21 additions & 0 deletions src/app/tests/suites/certification/ci-pics-values
Original file line number Diff line number Diff line change
Expand Up @@ -2656,6 +2656,7 @@ REFALM.S.E00=1
REFALM.S.C00.Rsp=1
REFALM.S.C01.Rsp=1

#Boolean State Configuration
BOOLCFG.S=1
BOOLCFG.S.F00=1
BOOLCFG.S.F01=1
Expand All @@ -2673,3 +2674,23 @@ BOOLCFG.S.E00=1
BOOLCFG.S.E01=1
BOOLCFG.S.C00.Rsp=1
BOOLCFG.S.C01.Rsp=1

#Valve Configuration and Control
VALCC.S=1
VALCC.S.F00=1
VALCC.S.F01=1
VALCC.S.A0000=1
VALCC.S.A0001=1
VALCC.S.A0002=1
VALCC.S.A0003=1
VALCC.S.A0004=1
VALCC.S.A0005=1
VALCC.S.A0006=1
VALCC.S.A0007=1
VALCC.S.A0008=1
VALCC.S.A0009=1
VALCC.S.A000a=1
VALCC.S.E00=1
VALCC.S.E01=1
VALCC.S.C00.Rsp=1
VALCC.S.C01.Rsp=1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ limitations under the License.
<cluster code="0x0054"/>
<item value="0x4000" name="Idle"/>
<item value="0x4001" name="Cleaning"/>
<item value="0x4002" name="Mapping"/>
</enum>

<cluster>
Expand Down
1 change: 1 addition & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3298,6 +3298,7 @@ cluster RvcRunMode = 84 {
enum ModeTag : enum16 {
kIdle = 16384;
kCleaning = 16385;
kMapping = 16386;
}

enum StatusCode : enum8 {
Expand Down
6 changes: 5 additions & 1 deletion src/controller/python/chip/ChipDeviceCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,12 @@ def DiscoverAllCommissioning(self):
self.devCtrl)
).raise_on_error()

class CommissioningWindowPasscode(enum.IntEnum):
kOriginalSetupCode = 0,
kTokenWithRandomPin = 1,

def OpenCommissioningWindow(self, nodeid: int, timeout: int, iteration: int,
discriminator: int, option: int) -> CommissioningParameters:
discriminator: int, option: CommissioningWindowPasscode) -> CommissioningParameters:
''' Opens a commissioning window on the device with the given nodeid.
nodeid: Node id of the device
timeout: Command timeout
Expand Down
1 change: 1 addition & 0 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/platform/ESP32/ESP32Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool ESP32Utils::IsStationProvisioned(void)
CHIP_ERROR ESP32Utils::IsStationConnected(bool & connected)
{
wifi_ap_record_t apInfo;
connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK);
connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK && apInfo.ssid[0] != 0);
return CHIP_NO_ERROR;
}

Expand Down
1 change: 1 addition & 0 deletions src/platform/Tizen/NetworkCommissioningDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class TizenWiFiDriver final : public WiFiDriver
Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText,
uint8_t & outNetworkIndex) override;
void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override;
uint32_t GetSupportedWiFiBandsMask() const override;

private:
bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId);
Expand Down
6 changes: 6 additions & 0 deletions src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ void TizenWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal
}
}

uint32_t TizenWiFiDriver::GetSupportedWiFiBandsMask() const
{
return static_cast<uint32_t>((1UL << chip::to_underlying(WiFiBandEnum::k2g4)) |
(1UL << chip::to_underlying(WiFiBandEnum::k5g)));
}

size_t TizenWiFiDriver::WiFiNetworkIterator::Count()
{
return driver->mStagingNetwork.ssidLen == 0 ? 0 : 1;
Expand Down
Loading

0 comments on commit 138760c

Please sign in to comment.