Skip to content

Commit 282567d

Browse files
committed
Merge branch 'master' into remove_depricated_RVC_items
2 parents f768e20 + fe5dcfe commit 282567d

File tree

19 files changed

+571
-511
lines changed

19 files changed

+571
-511
lines changed

examples/all-clusters-app/all-clusters-common/include/rvc-modes.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class RvcRunModeDelegate : public ModeBase::Delegate
4141
using ModeTagStructType = detail::Structs::ModeTagStruct::Type;
4242
ModeTagStructType ModeTagsIdle[1] = { { .value = to_underlying(ModeTag::kIdle) } };
4343
ModeTagStructType ModeTagsCleaning[1] = { { .value = to_underlying(ModeTag::kCleaning) } };
44+
ModeTagStructType ModeTagsMapping[1] = { { .value = to_underlying(ModeTag::kMapping) } };
4445

4546
const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = {
4647
detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Idle"),
@@ -49,10 +50,9 @@ class RvcRunModeDelegate : public ModeBase::Delegate
4950
detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Cleaning"),
5051
.mode = ModeCleaning,
5152
.modeTags = DataModel::List<const ModeTagStructType>(ModeTagsCleaning) },
52-
detail::Structs::ModeOptionStruct::Type{
53-
.label = CharSpan::fromCharString("Mapping"),
54-
.mode = ModeMapping,
55-
.modeTags = DataModel::List<const ModeTagStructType>(ModeTagsIdle) }, // todo set to no mode tags
53+
detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Mapping"),
54+
.mode = ModeMapping,
55+
.modeTags = DataModel::List<const ModeTagStructType>(ModeTagsMapping) },
5656
};
5757

5858
CHIP_ERROR Init() override;

examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void RvcRunModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands:
4545
// Our business logic states that we can only switch into the mapping state from the idle state.
4646
if (NewMode == RvcRunMode::ModeMapping && currentMode != RvcRunMode::ModeIdle)
4747
{
48-
response.status = to_underlying(ModeBase::StatusCode::kGenericFailure);
48+
response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode);
4949
response.statusText.SetValue(chip::CharSpan::fromCharString("Change to the mapping mode is only allowed from idle"));
5050
return;
5151
}
@@ -132,10 +132,11 @@ void RvcCleanModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Command
132132
{
133133
uint8_t rvcRunCurrentMode = gRvcRunModeInstance->GetCurrentMode();
134134

135-
if (rvcRunCurrentMode == RvcRunMode::ModeCleaning)
135+
if (rvcRunCurrentMode != RvcRunMode::ModeIdle)
136136
{
137-
response.status = to_underlying(RvcCleanMode::StatusCode::kCleaningInProgress);
138-
response.statusText.SetValue(chip::CharSpan::fromCharString("Cannot change the cleaning mode during a clean"));
137+
response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode);
138+
response.statusText.SetValue(
139+
chip::CharSpan::fromCharString("Cannot change the cleaning mode when the device is not in idle"));
139140
return;
140141
}
141142

examples/minimal-mdns/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ unicast queries.
3636
Example run:
3737

3838
```sh
39-
./out/minimal_mdns/minimal-mdns-client -4
39+
./out/minimal_mdns/minimal-mdns-client
4040
```
4141

4242
which is likely to list a lot of answers.
4343

4444
You can customize the queries run:
4545

4646
```sh
47-
/out/minimal_mdns/minimal-mdns-client -4 -q chip-mdns-demo._matter._tcp.local
47+
./out/minimal_mdns/minimal-mdns-client -q chip-mdns-demo._matter._tcp.local
4848
```
4949

5050
see

src/app/clusters/descriptor/descriptor.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include <lib/support/CodeUtils.h>
2929
#include <lib/support/logging/CHIPLogging.h>
3030

31+
#include "descriptor.h"
32+
3133
using namespace chip;
3234
using namespace chip::app;
3335
using namespace chip::app::Clusters;
@@ -45,8 +47,6 @@ class DescriptorAttrAccess : public AttributeAccessInterface
4547
CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;
4648

4749
private:
48-
static constexpr uint16_t ClusterRevision = 2;
49-
5050
CHIP_ERROR ReadTagListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder);
5151
CHIP_ERROR ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder);
5252
CHIP_ERROR ReadDeviceAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder);
@@ -55,8 +55,6 @@ class DescriptorAttrAccess : public AttributeAccessInterface
5555
CHIP_ERROR ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder);
5656
};
5757

58-
constexpr uint16_t DescriptorAttrAccess::ClusterRevision;
59-
6058
CHIP_ERROR DescriptorAttrAccess::ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder)
6159
{
6260
Clusters::Descriptor::Structs::SemanticTagStruct::Type tag;
@@ -202,7 +200,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadClientServerAttribute(EndpointId endpoint,
202200

203201
CHIP_ERROR DescriptorAttrAccess::ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder)
204202
{
205-
return aEncoder.Encode(ClusterRevision);
203+
return aEncoder.Encode(kClusterRevision);
206204
}
207205

208206
DescriptorAttrAccess gAttrAccess;
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright (c) 2024 Project CHIP Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
namespace chip {
18+
namespace app {
19+
namespace Clusters {
20+
namespace Descriptor {
21+
22+
inline constexpr uint16_t kClusterRevision = 2;
23+
24+
} // namespace Descriptor
25+
} // namespace Clusters
26+
} // namespace app
27+
} // namespace chip

src/app/tests/suites/certification/PICS.yaml

+2-11
Original file line numberDiff line numberDiff line change
@@ -9116,12 +9116,6 @@ PICS:
91169116
- label: "Does the device implement the CurrentMode attribute?"
91179117
id: RVCCLEANM.S.A0001
91189118

9119-
- label: "Does the device implement the StartUpMode attribute?"
9120-
id: RVCCLEANM.S.A0002
9121-
9122-
- label: "Does the device implement the OnMode attribute?"
9123-
id: RVCCLEANM.S.A0003
9124-
91259119
#
91269120
# server / Commands received
91279121
#
@@ -9334,11 +9328,8 @@ PICS:
93349328
- label: "Does the device implement the CurrentMode attribute?"
93359329
id: RVCRUNM.S.A0001
93369330

9337-
- label: "Does the device implement the StartUpMode attribute?"
9338-
id: RVCRUNM.S.A0002
9339-
9340-
- label: "Does the device implement the OnMode attribute?"
9341-
id: RVCRUNM.S.A0003
9331+
- label: "Can the mode change be manually controlled?"
9332+
id: RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED
93429333

93439334
#Commands received
93449335
- label: "Does the device implement receiving the ChangeToMode command?"

src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml

-34
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,13 @@ tests:
4242
type: int16u
4343

4444
- label: "Step 3: TH reads from the DUT the FeatureMap attribute."
45-
PICS: " !RVCCLEANM.S.F00 "
4645
command: "readAttribute"
4746
attribute: "FeatureMap"
4847
response:
4948
value: 0
5049
constraints:
5150
type: bitmap32
5251

53-
- label:
54-
"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the
55-
correct bit set"
56-
PICS: RVCCLEANM.S.F00
57-
command: "readAttribute"
58-
attribute: "FeatureMap"
59-
response:
60-
constraints:
61-
type: bitmap32
62-
hasMasksSet: [0x1]
63-
6452
- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
6553
PICS: PICS_EVENT_LIST_ENABLED
6654
command: "readAttribute"
@@ -79,28 +67,6 @@ tests:
7967
type: list
8068
contains: [0, 1, 65528, 65529, 65531, 65532, 65533]
8169

82-
- label:
83-
"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF)
84-
and optional attribute(OnMode) is in AttributeList from the DUT"
85-
PICS: RVCCLEANM.S.F00
86-
command: "readAttribute"
87-
attribute: "AttributeList"
88-
response:
89-
constraints:
90-
type: list
91-
contains: [3]
92-
93-
- label:
94-
"Step 4c: TH reads the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF)
95-
and optional attribute(OnMode) is not in AttributeList from the DUT"
96-
PICS: " !RVCCLEANM.S.F00 "
97-
command: "readAttribute"
98-
attribute: "AttributeList"
99-
response:
100-
constraints:
101-
type: list
102-
excludes: [3]
103-
10470
- label: "Step 5: TH reads from the DUT the EventList attribute."
10571
PICS: PICS_EVENT_LIST_ENABLED
10672
command: "readAttribute"

src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml

+1-35
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,14 @@ tests:
4141
constraints:
4242
type: int16u
4343

44-
- label: "Step 3a: TH reads from the DUT the FeatureMap attribute."
45-
PICS: " !RVCRUNM.S.F00 "
44+
- label: "Step 3: TH reads from the DUT the FeatureMap attribute."
4645
command: "readAttribute"
4746
attribute: "FeatureMap"
4847
response:
4948
value: 0
5049
constraints:
5150
type: bitmap32
5251

53-
- label:
54-
"Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the
55-
correct bit set"
56-
PICS: RVCRUNM.S.F00
57-
command: "readAttribute"
58-
attribute: "FeatureMap"
59-
response:
60-
constraints:
61-
type: bitmap32
62-
hasMasksSet: [0x1]
63-
6452
- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
6553
PICS: PICS_EVENT_LIST_ENABLED
6654
command: "readAttribute"
@@ -79,28 +67,6 @@ tests:
7967
type: list
8068
contains: [0, 1, 65528, 65529, 65531, 65532, 65533]
8169

82-
- label:
83-
"Step 4c: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and
84-
optional attribute(OnMode) is in AttributeList from the DUT"
85-
PICS: RVCRUNM.S.F00
86-
command: "readAttribute"
87-
attribute: "AttributeList"
88-
response:
89-
constraints:
90-
type: list
91-
contains: [3]
92-
93-
- label:
94-
"Step 4d: TH reads the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and
95-
optional attribute(OnMode) is not in AttributeList from the DUT"
96-
PICS: " !RVCRUNM.S.F00 "
97-
command: "readAttribute"
98-
attribute: "AttributeList"
99-
response:
100-
constraints:
101-
type: list
102-
excludes: [3]
103-
10470
- label: "Step 5: TH reads from the DUT the EventList attribute."
10571
PICS: PICS_EVENT_LIST_ENABLED
10672
command: "readAttribute"

src/app/tests/suites/certification/ci-pics-values

+3-16
Original file line numberDiff line numberDiff line change
@@ -2438,11 +2438,9 @@ RVCCLEANM.S=1
24382438
#Server
24392439
RVCCLEANM.S.A0000=1
24402440
RVCCLEANM.S.A0001=1
2441-
RVCCLEANM.S.A0002=0
2442-
RVCCLEANM.S.A0003=1
24432441

24442442
#Feature
2445-
RVCCLEANM.S.F00=1
2443+
RVCCLEANM.S.F00=0
24462444

24472445
#commands
24482446
RVCCLEANM.S.C00.Rsp=1
@@ -2506,19 +2504,18 @@ RVCOPSTATE.C.C04.Tx=1
25062504

25072505
# RVC RUN MODE CLUSTER
25082506
RVCRUNM.S=1
2509-
RVCRUNM.S.F00=1
2507+
RVCRUNM.S.F00=0
25102508

25112509
#Server
25122510
RVCRUNM.S.A0000=1
25132511
RVCRUNM.S.A0001=1
2514-
RVCRUNM.S.A0002=0
2515-
RVCRUNM.S.A0003=1
25162512

25172513
#Commands
25182514
RVCRUNM.S.C00.Rsp=1
25192515
RVCRUNM.S.C01.Tx=1
25202516

25212517
RVCRUNM.S.M.CAN_TEST_MODE_FAILURE=1
2518+
RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED=1
25222519

25232520
#PIXIT
25242521
PIXIT.RVCRUNM.MODE_CHANGE_FAIL=1
@@ -2691,16 +2688,6 @@ WASHERCTRL.S.M.ManuallyControlledSpin=1
26912688
WASHERCTRL.S.M.ManuallyControlledRinse=1
26922689
WASHERCTRL.S.M.ManuallyControlled=0
26932690

2694-
#RVC Run Mode
2695-
RVCRUNM.S=1
2696-
RVCRUNM.S.F00=1
2697-
RVCRUNM.S.A0000=1
2698-
RVCRUNM.S.A0001=1
2699-
RVCRUNM.S.A0002=0
2700-
RVCRUNM.S.A0003=1
2701-
RVCRUNM.S.C00.Rsp=1
2702-
RVCRUNM.S.C01.Tx=1
2703-
27042691
#Refrigerator Alarm
27052692
REFALM.S=1
27062693
REFALM.C=1

src/python_testing/TC_BOOLCFG_4_4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async def test_TC_BOOLCFG_4_4(self):
109109
logging.info("Test step skipped")
110110

111111
self.step("5b")
112-
if is_vis_feature_supported:
112+
if is_aud_feature_supported:
113113
enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible
114114
else:
115115
logging.info("Test step skipped")

src/python_testing/TC_BOOLCFG_5_1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def test_TC_BOOLCFG_5_1(self):
102102
logging.info("Test step skipped")
103103

104104
self.step("5b")
105-
if is_vis_feature_supported:
105+
if is_aud_feature_supported:
106106
enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible
107107
else:
108108
logging.info("Test step skipped")
@@ -160,7 +160,7 @@ async def test_TC_BOOLCFG_5_1(self):
160160
self.step("9b")
161161
if not is_aud_feature_supported:
162162
try:
163-
await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint)
163+
await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), endpoint=endpoint)
164164
asserts.fail("Received Success response when an CONSTRAINT_ERROR was expected")
165165
except InteractionModelError as e:
166166
asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error returned")

src/python_testing/TC_BOOLCFG_5_2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def test_TC_BOOLCFG_5_2(self):
101101
logging.info("Test step skipped")
102102

103103
self.step("5b")
104-
if is_vis_feature_supported:
104+
if is_aud_feature_supported:
105105
enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible
106106
else:
107107
logging.info("Test step skipped")

0 commit comments

Comments
 (0)