Skip to content

Commit 405d5b0

Browse files
committed
Added the propsed xml changes, regeneerated and got things compiling
again. Still not done
1 parent a224248 commit 405d5b0

File tree

29 files changed

+89
-220
lines changed

29 files changed

+89
-220
lines changed

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,7 @@ cluster Thermostat = 513 {
13431343
kLocalTemperatureNotExposed = 0x40;
13441344
kMatterScheduleConfiguration = 0x80;
13451345
kPresets = 0x100;
1346-
kSetpoints = 0x200;
1347-
kQueuedPresetsSupported = 0x400;
1346+
kQueuedPresetsSupported = 0x200;
13481347
}
13491348

13501349
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1424,7 +1423,7 @@ cluster Thermostat = 513 {
14241423
optional char_string<64> name = 2;
14251424
optional octet_string<16> presetHandle = 3;
14261425
ScheduleTransitionStruct transitions[] = 4;
1427-
optional nullable boolean builtIn = 5;
1426+
nullable boolean builtIn = 5;
14281427
}
14291428

14301429
struct PresetStruct {

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -4995,8 +4995,7 @@ cluster Thermostat = 513 {
49954995
kLocalTemperatureNotExposed = 0x40;
49964996
kMatterScheduleConfiguration = 0x80;
49974997
kPresets = 0x100;
4998-
kSetpoints = 0x200;
4999-
kQueuedPresetsSupported = 0x400;
4998+
kQueuedPresetsSupported = 0x200;
50004999
}
50015000

50025001
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -5076,7 +5075,7 @@ cluster Thermostat = 513 {
50765075
optional char_string<64> name = 2;
50775076
optional octet_string<16> presetHandle = 3;
50785077
ScheduleTransitionStruct transitions[] = 4;
5079-
optional nullable boolean builtIn = 5;
5078+
nullable boolean builtIn = 5;
50805079
}
50815080

50825081
struct PresetStruct {

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -3609,8 +3609,7 @@ cluster Thermostat = 513 {
36093609
kLocalTemperatureNotExposed = 0x40;
36103610
kMatterScheduleConfiguration = 0x80;
36113611
kPresets = 0x100;
3612-
kSetpoints = 0x200;
3613-
kQueuedPresetsSupported = 0x400;
3612+
kQueuedPresetsSupported = 0x200;
36143613
}
36153614

36163615
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -3690,7 +3689,7 @@ cluster Thermostat = 513 {
36903689
optional char_string<64> name = 2;
36913690
optional octet_string<16> presetHandle = 3;
36923691
ScheduleTransitionStruct transitions[] = 4;
3693-
optional nullable boolean builtIn = 5;
3692+
nullable boolean builtIn = 5;
36943693
}
36953694

36963695
struct PresetStruct {

examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1266,8 +1266,7 @@ cluster Thermostat = 513 {
12661266
kLocalTemperatureNotExposed = 0x40;
12671267
kMatterScheduleConfiguration = 0x80;
12681268
kPresets = 0x100;
1269-
kSetpoints = 0x200;
1270-
kQueuedPresetsSupported = 0x400;
1269+
kQueuedPresetsSupported = 0x200;
12711270
}
12721271

12731272
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1347,7 +1346,7 @@ cluster Thermostat = 513 {
13471346
optional char_string<64> name = 2;
13481347
optional octet_string<16> presetHandle = 3;
13491348
ScheduleTransitionStruct transitions[] = 4;
1350-
optional nullable boolean builtIn = 5;
1349+
nullable boolean builtIn = 5;
13511350
}
13521351

13531352
struct PresetStruct {

examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1623,8 +1623,7 @@ cluster Thermostat = 513 {
16231623
kLocalTemperatureNotExposed = 0x40;
16241624
kMatterScheduleConfiguration = 0x80;
16251625
kPresets = 0x100;
1626-
kSetpoints = 0x200;
1627-
kQueuedPresetsSupported = 0x400;
1626+
kQueuedPresetsSupported = 0x200;
16281627
}
16291628

16301629
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1704,7 +1703,7 @@ cluster Thermostat = 513 {
17041703
optional char_string<64> name = 2;
17051704
optional octet_string<16> presetHandle = 3;
17061705
ScheduleTransitionStruct transitions[] = 4;
1707-
optional nullable boolean builtIn = 5;
1706+
nullable boolean builtIn = 5;
17081707
}
17091708

17101709
struct PresetStruct {

examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,7 @@ cluster Thermostat = 513 {
12061206
kLocalTemperatureNotExposed = 0x40;
12071207
kMatterScheduleConfiguration = 0x80;
12081208
kPresets = 0x100;
1209-
kSetpoints = 0x200;
1210-
kQueuedPresetsSupported = 0x400;
1209+
kQueuedPresetsSupported = 0x200;
12111210
}
12121211

12131212
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1287,7 +1286,7 @@ cluster Thermostat = 513 {
12871286
optional char_string<64> name = 2;
12881287
optional octet_string<16> presetHandle = 3;
12891288
ScheduleTransitionStruct transitions[] = 4;
1290-
optional nullable boolean builtIn = 5;
1289+
nullable boolean builtIn = 5;
12911290
}
12921291

12931292
struct PresetStruct {

examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1426,8 +1426,7 @@ cluster Thermostat = 513 {
14261426
kLocalTemperatureNotExposed = 0x40;
14271427
kMatterScheduleConfiguration = 0x80;
14281428
kPresets = 0x100;
1429-
kSetpoints = 0x200;
1430-
kQueuedPresetsSupported = 0x400;
1429+
kQueuedPresetsSupported = 0x200;
14311430
}
14321431

14331432
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1507,7 +1506,7 @@ cluster Thermostat = 513 {
15071506
optional char_string<64> name = 2;
15081507
optional octet_string<16> presetHandle = 3;
15091508
ScheduleTransitionStruct transitions[] = 4;
1510-
optional nullable boolean builtIn = 5;
1509+
nullable boolean builtIn = 5;
15111510
}
15121511

15131512
struct PresetStruct {

examples/placeholder/linux/apps/app1/config.matter

+4-6
Original file line numberDiff line numberDiff line change
@@ -4854,8 +4854,7 @@ cluster Thermostat = 513 {
48544854
kLocalTemperatureNotExposed = 0x40;
48554855
kMatterScheduleConfiguration = 0x80;
48564856
kPresets = 0x100;
4857-
kSetpoints = 0x200;
4858-
kQueuedPresetsSupported = 0x400;
4857+
kQueuedPresetsSupported = 0x200;
48594858
}
48604859

48614860
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -4935,7 +4934,7 @@ cluster Thermostat = 513 {
49354934
optional char_string<64> name = 2;
49364935
optional octet_string<16> presetHandle = 3;
49374936
ScheduleTransitionStruct transitions[] = 4;
4938-
optional nullable boolean builtIn = 5;
4937+
nullable boolean builtIn = 5;
49394938
}
49404939

49414940
struct PresetStruct {
@@ -5225,8 +5224,7 @@ cluster Thermostat = 513 {
52255224
kLocalTemperatureNotExposed = 0x40;
52265225
kMatterScheduleConfiguration = 0x80;
52275226
kPresets = 0x100;
5228-
kSetpoints = 0x200;
5229-
kQueuedPresetsSupported = 0x400;
5227+
kQueuedPresetsSupported = 0x200;
52305228
}
52315229

52325230
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -5306,7 +5304,7 @@ cluster Thermostat = 513 {
53065304
optional char_string<64> name = 2;
53075305
optional octet_string<16> presetHandle = 3;
53085306
ScheduleTransitionStruct transitions[] = 4;
5309-
optional nullable boolean builtIn = 5;
5307+
nullable boolean builtIn = 5;
53105308
}
53115309

53125310
struct PresetStruct {

examples/placeholder/linux/apps/app2/config.matter

+4-6
Original file line numberDiff line numberDiff line change
@@ -4811,8 +4811,7 @@ cluster Thermostat = 513 {
48114811
kLocalTemperatureNotExposed = 0x40;
48124812
kMatterScheduleConfiguration = 0x80;
48134813
kPresets = 0x100;
4814-
kSetpoints = 0x200;
4815-
kQueuedPresetsSupported = 0x400;
4814+
kQueuedPresetsSupported = 0x200;
48164815
}
48174816

48184817
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -4892,7 +4891,7 @@ cluster Thermostat = 513 {
48924891
optional char_string<64> name = 2;
48934892
optional octet_string<16> presetHandle = 3;
48944893
ScheduleTransitionStruct transitions[] = 4;
4895-
optional nullable boolean builtIn = 5;
4894+
nullable boolean builtIn = 5;
48964895
}
48974896

48984897
struct PresetStruct {
@@ -5182,8 +5181,7 @@ cluster Thermostat = 513 {
51825181
kLocalTemperatureNotExposed = 0x40;
51835182
kMatterScheduleConfiguration = 0x80;
51845183
kPresets = 0x100;
5185-
kSetpoints = 0x200;
5186-
kQueuedPresetsSupported = 0x400;
5184+
kQueuedPresetsSupported = 0x200;
51875185
}
51885186

51895187
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -5263,7 +5261,7 @@ cluster Thermostat = 513 {
52635261
optional char_string<64> name = 2;
52645262
optional octet_string<16> presetHandle = 3;
52655263
ScheduleTransitionStruct transitions[] = 4;
5266-
optional nullable boolean builtIn = 5;
5264+
nullable boolean builtIn = 5;
52675265
}
52685266

52695267
struct PresetStruct {

examples/thermostat/nxp/zap/thermostat_matter_thread.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -2010,8 +2010,7 @@ cluster Thermostat = 513 {
20102010
kLocalTemperatureNotExposed = 0x40;
20112011
kMatterScheduleConfiguration = 0x80;
20122012
kPresets = 0x100;
2013-
kSetpoints = 0x200;
2014-
kQueuedPresetsSupported = 0x400;
2013+
kQueuedPresetsSupported = 0x200;
20152014
}
20162015

20172016
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -2091,7 +2090,7 @@ cluster Thermostat = 513 {
20912090
optional char_string<64> name = 2;
20922091
optional octet_string<16> presetHandle = 3;
20932092
ScheduleTransitionStruct transitions[] = 4;
2094-
optional nullable boolean builtIn = 5;
2093+
nullable boolean builtIn = 5;
20952094
}
20962095

20972096
struct PresetStruct {

examples/thermostat/nxp/zap/thermostat_matter_wifi.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1921,8 +1921,7 @@ cluster Thermostat = 513 {
19211921
kLocalTemperatureNotExposed = 0x40;
19221922
kMatterScheduleConfiguration = 0x80;
19231923
kPresets = 0x100;
1924-
kSetpoints = 0x200;
1925-
kQueuedPresetsSupported = 0x400;
1924+
kQueuedPresetsSupported = 0x200;
19261925
}
19271926

19281927
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -2002,7 +2001,7 @@ cluster Thermostat = 513 {
20022001
optional char_string<64> name = 2;
20032002
optional octet_string<16> presetHandle = 3;
20042003
ScheduleTransitionStruct transitions[] = 4;
2005-
optional nullable boolean builtIn = 5;
2004+
nullable boolean builtIn = 5;
20062005
}
20072006

20082007
struct PresetStruct {

examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,7 @@ cluster Thermostat = 513 {
16251625
kLocalTemperatureNotExposed = 0x40;
16261626
kMatterScheduleConfiguration = 0x80;
16271627
kPresets = 0x100;
1628-
kSetpoints = 0x200;
1629-
kQueuedPresetsSupported = 0x400;
1628+
kQueuedPresetsSupported = 0x200;
16301629
}
16311630

16321631
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1706,7 +1705,7 @@ cluster Thermostat = 513 {
17061705
optional char_string<64> name = 2;
17071706
optional octet_string<16> presetHandle = 3;
17081707
ScheduleTransitionStruct transitions[] = 4;
1709-
optional nullable boolean builtIn = 5;
1708+
nullable boolean builtIn = 5;
17101709
}
17111710

17121711
struct PresetStruct {

examples/thermostat/thermostat-common/src/thermostat-schedules-manager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static ScheduleStruct::Type BuiltInSchedules[] = {
5757
.name = Optional<chip::CharSpan>(chip::CharSpan(kBuildInScheduleOneName, strlen(kBuildInScheduleOneName))),
5858
.presetHandle = Optional<chip::ByteSpan>(chip::ByteSpan(Uint8::from_const_char(kBuiltInPOneHandle), strlen(kBuiltInPOneHandle))),
5959
.transitions = DataModel::List<const Structs::ScheduleTransitionStruct::Type>(),
60-
.builtIn = Optional<DataModel::Nullable<bool>>(DataModel::Nullable<bool>(true))
60+
.builtIn = DataModel::Nullable<bool>(true)
6161
},
6262
};
6363

examples/thermostat/thermostat-common/thermostat.matter

+2-3
Original file line numberDiff line numberDiff line change
@@ -1805,8 +1805,7 @@ cluster Thermostat = 513 {
18051805
kLocalTemperatureNotExposed = 0x40;
18061806
kMatterScheduleConfiguration = 0x80;
18071807
kPresets = 0x100;
1808-
kSetpoints = 0x200;
1809-
kQueuedPresetsSupported = 0x400;
1808+
kQueuedPresetsSupported = 0x200;
18101809
}
18111810

18121811
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1886,7 +1885,7 @@ cluster Thermostat = 513 {
18861885
optional char_string<64> name = 2;
18871886
optional octet_string<16> presetHandle = 3;
18881887
ScheduleTransitionStruct transitions[] = 4;
1889-
optional nullable boolean builtIn = 5;
1888+
nullable boolean builtIn = 5;
18901889
}
18911890

18921891
struct PresetStruct {

src/app/clusters/thermostat-server/thermostat-schedule-commit-validation.cpp

+11-8
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ static EmberAfStatus CheckScheduleTypes(ThermostatMatterScheduleManager & mgr, S
163163
// make sure the preset exists (check 7)
164164
{
165165
size_t preset_index = 0;
166-
PresetStruct::Type preset;
167166
bool presetFound = false;
168-
while (presetList[index] != CHIP_ERROR_NOT_FOUND)
167+
while (preset_index < presetList.size())
169168
{
169+
auto &preset = presetList[preset_index];
170170
VerifyOrDie(preset.presetHandle.IsNull() == false);
171171
if (preset.presetHandle.Value().data_equal(schedule.presetHandle.Value()))
172172
{
@@ -261,17 +261,17 @@ EmberAfStatus ThermostatMatterScheduleManager::ValidateSchedulesForCommitting(Sp
261261
VerifyOrDie(old_schedule.scheduleHandle.IsNull() == false);
262262

263263
// Check 1. -- for each existing built in schedule, make sure it's still in the new list
264-
if ((old_schedule.builtIn.HasValue() == true) && (old_schedule.builtIn.Value() == true))
264+
if ((old_schedule.builtIn.IsNull() == false) && (old_schedule.builtIn.Value() == true))
265265
{
266266
status = FindScheduleByHandle(old_schedule.scheduleHandle.Value(), newlist, querySchedule);
267267
VerifyOrExit(status == EMBER_ZCL_STATUS_SUCCESS, status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR);
268-
VerifyOrExit(querySchedule.builtIn.HasValue() == false, status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
268+
VerifyOrExit(querySchedule.builtIn.IsNull() == false, status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
269269
VerifyOrExit(querySchedule.builtIn.Value() == true, status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
270270
}
271271

272272
// Check 2 -- If the schedule is currently being referenced but would be deleted.
273273
// if its a builtin schedule we don't need to search again, we know it's there from the above check.
274-
if ((old_schedule.builtIn.HasValue() == false || old_schedule.builtIn.Value() == false) && IsScheduleHandleReferenced(*this, old_schedule.scheduleHandle.Value()))
274+
if ((old_schedule.builtIn.IsNull() == true || old_schedule.builtIn.Value() == false) && IsScheduleHandleReferenced(*this, old_schedule.scheduleHandle.Value()))
275275
{
276276
VerifyOrDie(old_schedule.scheduleHandle.IsNull() == false);
277277
status = FindScheduleByHandle(old_schedule.scheduleHandle.Value(), newlist, querySchedule);
@@ -296,13 +296,16 @@ EmberAfStatus ThermostatMatterScheduleManager::ValidateSchedulesForCommitting(Sp
296296
SuccessOrExit(status);
297297

298298
// Check BuiltIn
299-
VerifyOrExit(new_schedule.builtIn.HasValue() == existingSchedule.builtIn.HasValue(), status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
300-
VerifyOrExit(new_schedule.builtIn.Value() == existingSchedule.builtIn.Value(), status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
299+
VerifyOrExit(new_schedule.builtIn.IsNull() == existingSchedule.builtIn.IsNull(), status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
300+
if (new_schedule.builtIn.IsNull() == false)
301+
{
302+
VerifyOrExit(new_schedule.builtIn.Value() == existingSchedule.builtIn.Value(), status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS);
303+
}
301304
}
302305
else
303306
{
304307
// new schedule checks
305-
VerifyOrExit((new_schedule.builtIn.HasValue() == false) || (new_schedule.builtIn.Value() == false), status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR);
308+
VerifyOrExit((new_schedule.builtIn.IsNull() == true) || (new_schedule.builtIn.Value() == false), status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR);
306309
}
307310

308311
// Check for system mode in Schedule Types

0 commit comments

Comments
 (0)