Skip to content

Commit e9a971d

Browse files
authored
Merge branch 'master' into granbery/code_driven_thermostat
2 parents f067ae6 + 9cf1485 commit e9a971d

136 files changed

Lines changed: 9179 additions & 848 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
--log-level info \
125125
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
126126
src/app/zap-templates/zcl/data-model/chip/ambient-context-sensing-cluster.xml \
127+
src/app/zap-templates/zcl/data-model/chip/ambient-sensing-union-cluster.xml \
127128
src/app/zap-templates/zcl/data-model/chip/av-analysis-cluster.xml \
128129
src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml \
129130
src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml \

.gitmodules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@
6666
path = third_party/openthread/ot-qorvo
6767
url = https://github.com/openthread/ot-qorvo.git
6868
platforms = qpg
69-
[submodule "third_party/openthread/ot-efr32"]
70-
path = third_party/openthread/ot-efr32
71-
url = https://github.com/SiliconLabs/ot-efr32.git
72-
branch = matter_sve
73-
platforms = silabs,silabs_docker
7469
[submodule "ot-stm32"]
7570
path = third_party/openthread/ot-stm32
7671
url = https://github.com/openthread/openthread

docs/ids_and_codes/zap_clusters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Generally regenerate using one of:
123123
| 1071 | 0x42F | RadonConcentrationMeasurement |
124124
| 1072 | 0x430 | SoilMeasurement |
125125
| 1073 | 0x431 | AmbientContextSensing |
126+
| 1074 | 0x432 | AmbientSensingUnion |
126127
| 1075 | 0x433 | ProximityRanging |
127128
| 1076 | 0x434 | SmokeConcentrationMeasurement |
128129
| 1104 | 0x450 | NetworkIdentityManagement |

examples/platform/linux/CommissionerMain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort, F
134134
factoryParams.fabricIndependentStorage = &gServerStorage;
135135
factoryParams.fabricTable = &Server::GetInstance().GetFabricTable();
136136
factoryParams.sessionKeystore = &gSessionKeystore;
137+
factoryParams.enableServerInteractions = true;
138+
// Since CommissionerMain is used in combined server/commissioner applications,
139+
// we must prevent the commissioner from overwriting the server's DNS-SD port.
140+
factoryParams.preventDnssdPortOverwrite = true;
137141
// We're running alongside an existing Server, so use the existing DataModelProvider
138142
// without changing the underlying persistent storage delegate.
139143
factoryParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(nullptr);

scripts/examples/gn_silabs_example.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ else
230230
optArgs+="lwip_root=\""//third_party/connectedhomeip/third_party/lwip"\" "
231231
shift
232232
;;
233-
# Option not to be used until ot-efr32 github is updated
234-
# --use_ot_github_sources)
235-
# optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\""
236-
# shift
237-
# ;;
238233
--release)
239234
optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false sl_uart_log_output=false "
240235
shift

scripts/py_matter_idl/matter/idl/generators/idl/MatterIdl.jinja

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
optional ExtensionFieldSet extensionFieldSets[] = 5;
88
#}
99

10+
{{- field.api_maturity | idltxt -}}
1011
{%- if field.qualities %}{{field.qualities | idltxt}} {% endif -%}
1112
{{field.data_type.name}}
1213
{%- if field.data_type.max_length -%} <{{field.data_type.max_length}}> {%- endif -%}
@@ -18,6 +19,7 @@
1819
{% macro render_struct(s) -%}{#
1920
Macro for the output of a complete struct
2021
#}
22+
{{- s.api_maturity | idltxt -}}
2123
{%- if s.is_shared%}shared {% endif -%}
2224
{%- if s.tag %}{{s.tag | idltxt}} {% endif -%}
2325
{% if s.qualities %}{{s.qualities | idltxt}} {% endif -%}
@@ -42,18 +44,18 @@ struct {{s.name}} {##}
4244
// This IDL was auto-generated from a parsed data structure
4345

4446
{% for enum in idl.global_enums %}
45-
enum {{enum.name}} : {{ enum.base_type}} {
47+
{{enum.api_maturity | idltxt}}enum {{enum.name}} : {{ enum.base_type}} {
4648
{% for entry in enum.entries %}
47-
{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
49+
{{entry.api_maturity | idltxt}}{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
4850
{% endfor %}
4951
}
5052

5153
{% endfor %}
5254

5355
{%- for bitmap in idl.global_bitmaps %}
54-
bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
56+
{{bitmap.api_maturity | idltxt}}bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
5557
{% for entry in bitmap.entries %}
56-
{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
58+
{{entry.api_maturity | idltxt}}{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
5759
{% endfor %}
5860
}
5961

@@ -72,9 +74,9 @@ bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
7274

7375
{% for enum in cluster.enums | selectattr("is_global")%}
7476
/* GLOBAL:
75-
enum {{enum.name}} : {{ enum.base_type}} {
77+
{{enum.api_maturity | idltxt}}enum {{enum.name}} : {{ enum.base_type}} {
7678
{% for entry in enum.entries %}
77-
{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
79+
{{entry.api_maturity | idltxt}}{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
7880
{% endfor %}
7981
}
8082
*/
@@ -83,9 +85,9 @@ bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
8385

8486
{%- for bitmap in cluster.bitmaps | selectattr("is_global")%}
8587
/* GLOBAL:
86-
bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
88+
{{bitmap.api_maturity | idltxt}}bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
8789
{% for entry in bitmap.entries %}
88-
{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
90+
{{entry.api_maturity | idltxt}}{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
8991
{% endfor %}
9092
}
9193
*/
@@ -100,20 +102,22 @@ bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
100102
{% endfor %}
101103

102104
{%- for enum in cluster.enums | rejectattr("is_global")%}
103-
{%+ if enum.is_shared%}shared {% endif -%}
105+
{%+ if enum.api_maturity %}{{enum.api_maturity | idltxt}}{% endif -%}
106+
{%- if enum.is_shared%}shared {% endif -%}
104107
enum {{enum.name}} : {{ enum.base_type}} {
105108
{% for entry in enum.entries %}
106-
{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
109+
{{entry.api_maturity | idltxt}}{{entry.name}} = {{entry.code}} {{-specification_name_clarification(entry)}};
107110
{% endfor %}
108111
}
109112

110113
{% endfor %}
111114

112115
{%- for bitmap in cluster.bitmaps | rejectattr("is_global")%}
113-
{%+ if bitmap.is_shared%}shared {% endif -%}
116+
{%+ if bitmap.api_maturity %}{{bitmap.api_maturity | idltxt}}{% endif -%}
117+
{%- if bitmap.is_shared%}shared {% endif -%}
114118
bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
115119
{% for entry in bitmap.entries %}
116-
{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
120+
{{entry.api_maturity | idltxt}}{{entry.name}} = 0x{{"%X" | format(entry.code)}} {{-specification_name_clarification(entry)}};
117121
{% endfor %}
118122
}
119123

@@ -152,7 +156,7 @@ bitmap {{bitmap.name}} : {{ bitmap.base_type}} {
152156
{% if c.description %}
153157
/** {{c.description}} */
154158
{% endif %}
155-
{{c.qualities | idltxt}}command {{c | command_access}}{{c.name}}(
159+
{{c.api_maturity | idltxt}}{{c.qualities | idltxt}}command {{c | command_access}}{{c.name}}(
156160
{%- if c.input_param %}{{c.input_param}}{% endif -%}
157161
): {{c.output_param}} = {{c.code}};
158162
{% endfor %}

scripts/py_matter_idl/matter/idl/matter_idl_parser.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def apply_to_idl(self, idl: Idl, content: str):
5050
return
5151

5252
actual_pos = self.start_pos + self.value_len
53-
while content[actual_pos] in ' \t\n\r':
53+
while actual_pos < len(content) and content[actual_pos] in ' \t\n\r':
5454
actual_pos += 1
5555

5656
# A doc comment will apply to any supported element assuming it immediately
@@ -505,10 +505,16 @@ def endpoint_server_cluster(self, meta, cluster_id, *content):
505505
return AddServerClusterToEndpointTransform(
506506
ServerClusterInstantiation(parse_meta=meta, name=cluster_id, attributes=attributes, events_emitted=events, commands=commands))
507507

508-
@v_args(inline=True)
509-
def cluster_content(self, api_maturity, element):
508+
@v_args(meta=True)
509+
def cluster_content(self, meta, args):
510+
api_maturity, element = args[0], args[1]
510511
if api_maturity is not None:
511512
element.api_maturity = api_maturity
513+
if not self.skip_meta:
514+
if isinstance(element, Attribute):
515+
element.definition.parse_meta = ParseMetaData(meta)
516+
elif hasattr(element, 'parse_meta'):
517+
element.parse_meta = ParseMetaData(meta)
512518
return element
513519

514520
@v_args(inline=True, meta=True)

scripts/py_matter_idl/matter/idl/test_idl_generator.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,46 @@ def test_app_rendering(self):
134134
# checks that data types and content is the same
135135
self.assertEqual(idl, idl2)
136136

137+
def test_maturity_rendering(self):
138+
idl_content = """
139+
client cluster ProvisionalCluster = 1 {
140+
provisional struct ProvisionalStruct {
141+
provisional int16u provisionalField = 1;
142+
}
143+
144+
provisional enum ProvisionalEnum : ENUM16 {
145+
provisional kProvisionalValue = 0;
146+
}
147+
148+
provisional bitmap ProvisionalBitmap : BITMAP32 {
149+
provisional kProvisionalBit = 0x1;
150+
}
151+
152+
/** Test command description */
153+
provisional command ProvisionalCommand(): DefaultSuccess = 0;
154+
}
155+
"""
156+
# Parse and render (skip_meta must be False for comment parsing to work)
157+
parser = CreateParser(skip_meta=False, merge_globals=False)
158+
idl = parser.parse(idl_content)
159+
rendered = RenderAsIdlTxt(idl)
160+
161+
# Verify that maturity words are preserved in the rendered IDL
162+
self.assertIn("provisional struct ProvisionalStruct", rendered)
163+
self.assertIn("provisional int16u provisionalField = 1;", rendered)
164+
self.assertIn("provisional enum ProvisionalEnum", rendered)
165+
self.assertIn("provisional kProvisionalValue = 0;", rendered)
166+
self.assertIn("provisional bitmap ProvisionalBitmap", rendered)
167+
self.assertIn("provisional kProvisionalBit = 0x1;", rendered)
168+
self.assertIn("provisional command ProvisionalCommand(): DefaultSuccess = 0;", rendered)
169+
170+
# Verify that doc comment is matched and rendered correctly on the provisional command
171+
self.assertIn("/** Test command description */", rendered)
172+
173+
# Also ensure roundtrip parses back to the exact same IDL
174+
idl2 = parser.parse(rendered)
175+
self.assertEqual(idl, idl2)
176+
137177

138178
if __name__ == '__main__':
139179
unittest.main()

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
133133
#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
134134
#define MATTER_DM_AMBIENT_CONTEXT_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
135+
#define MATTER_DM_AMBIENT_SENSING_UNION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
135136
#define MATTER_DM_PROXIMITY_RANGING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
136137
#define MATTER_DM_SMOKE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
137138
#define MATTER_DM_NETWORK_IDENTITY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -284,6 +285,7 @@
284285
#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285286
#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286287
#define MATTER_DM_AMBIENT_CONTEXT_SENSING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288+
#define MATTER_DM_AMBIENT_SENSING_UNION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287289
#define MATTER_DM_PROXIMITY_RANGING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288290
#define MATTER_DM_SMOKE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
289291
#define MATTER_DM_NETWORK_IDENTITY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
133133
#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
134134
#define MATTER_DM_AMBIENT_CONTEXT_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
135+
#define MATTER_DM_AMBIENT_SENSING_UNION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
135136
#define MATTER_DM_PROXIMITY_RANGING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
136137
#define MATTER_DM_SMOKE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
137138
#define MATTER_DM_NETWORK_IDENTITY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -284,6 +285,7 @@
284285
#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285286
#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286287
#define MATTER_DM_AMBIENT_CONTEXT_SENSING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288+
#define MATTER_DM_AMBIENT_SENSING_UNION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
287289
#define MATTER_DM_PROXIMITY_RANGING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
288290
#define MATTER_DM_SMOKE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
289291
#define MATTER_DM_NETWORK_IDENTITY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

0 commit comments

Comments
 (0)