Skip to content

Commit bbaf1af

Browse files
committedJul 28, 2024
Implement codegen for global things
1 parent f51ac2f commit bbaf1af

File tree

55 files changed

+4610
-271
lines changed

Some content is hidden

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

55 files changed

+4610
-271
lines changed
 

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

+19
Original file line numberDiff line numberDiff line change
@@ -6826,6 +6826,7 @@ internal cluster UnitTesting = 4294048773 {
68266826
SimpleBitmap f = 5;
68276827
single g = 6;
68286828
double h = 7;
6829+
optional TestGlobalEnum i = 8;
68296830
}
68306831

68316832
fabric_scoped struct TestFabricScoped {
@@ -6858,6 +6859,7 @@ internal cluster UnitTesting = 4294048773 {
68586859
int8u a = 0;
68596860
boolean b = 1;
68606861
SimpleStruct c = 2;
6862+
optional TestGlobalStruct d = 3;
68616863
}
68626864

68636865
struct NestedStructList {
@@ -6943,6 +6945,8 @@ internal cluster UnitTesting = 4294048773 {
69436945
timedwrite attribute boolean timedWriteBoolean = 48;
69446946
attribute boolean generalErrorBoolean = 49;
69456947
attribute boolean clusterErrorBoolean = 50;
6948+
attribute TestGlobalEnum globalEnum = 51;
6949+
attribute TestGlobalStruct globalStruct = 52;
69466950
attribute optional boolean unsupported = 255;
69476951
attribute nullable boolean nullableBoolean = 16384;
69486952
attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385;
@@ -6978,6 +6982,8 @@ internal cluster UnitTesting = 4294048773 {
69786982
attribute nullable int16u nullableRangeRestrictedInt16u = 16424;
69796983
attribute nullable int16s nullableRangeRestrictedInt16s = 16425;
69806984
attribute optional int8u writeOnlyInt8u = 16426;
6985+
attribute nullable TestGlobalEnum nullableGlobalEnum = 16435;
6986+
attribute nullable TestGlobalStruct nullableGlobalStruct = 16436;
69816987
attribute int8u meiInt8u = 4294070017;
69826988
readonly attribute command_id generatedCommandList[] = 65528;
69836989
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -7129,6 +7135,11 @@ internal cluster UnitTesting = 4294048773 {
71297135
SimpleEnum arg2 = 1;
71307136
}
71317137

7138+
response struct GlobalEchoResponse = 14 {
7139+
TestGlobalStruct field1 = 0;
7140+
TestGlobalEnum field2 = 1;
7141+
}
7142+
71327143
request struct TestNullableOptionalRequestRequest {
71337144
optional nullable int8u arg1 = 0;
71347145
}
@@ -7182,6 +7193,11 @@ internal cluster UnitTesting = 4294048773 {
71827193
octet_string payload = 0;
71837194
}
71847195

7196+
request struct GlobalEchoRequestRequest {
7197+
TestGlobalStruct field1 = 0;
7198+
TestGlobalEnum field2 = 1;
7199+
}
7200+
71857201
request struct TestDifferentVendorMeiRequestRequest {
71867202
int8u arg1 = 0;
71877203
}
@@ -7265,6 +7281,9 @@ internal cluster UnitTesting = 4294048773 {
72657281
the string back. If the string is large then it would require a session that
72667282
supports large payloads. */
72677283
command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24;
7284+
/** Command that takes arguments that are global structs/enums and the
7285+
response just echoes them back. */
7286+
command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25;
72687287
/** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */
72697288
command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962;
72707289
}

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

+19
Original file line numberDiff line numberDiff line change
@@ -5475,6 +5475,7 @@ internal cluster UnitTesting = 4294048773 {
54755475
SimpleBitmap f = 5;
54765476
single g = 6;
54775477
double h = 7;
5478+
optional TestGlobalEnum i = 8;
54785479
}
54795480

54805481
fabric_scoped struct TestFabricScoped {
@@ -5507,6 +5508,7 @@ internal cluster UnitTesting = 4294048773 {
55075508
int8u a = 0;
55085509
boolean b = 1;
55095510
SimpleStruct c = 2;
5511+
optional TestGlobalStruct d = 3;
55105512
}
55115513

55125514
struct NestedStructList {
@@ -5592,6 +5594,8 @@ internal cluster UnitTesting = 4294048773 {
55925594
timedwrite attribute boolean timedWriteBoolean = 48;
55935595
attribute boolean generalErrorBoolean = 49;
55945596
attribute boolean clusterErrorBoolean = 50;
5597+
attribute TestGlobalEnum globalEnum = 51;
5598+
attribute TestGlobalStruct globalStruct = 52;
55955599
attribute optional boolean unsupported = 255;
55965600
attribute nullable boolean nullableBoolean = 16384;
55975601
attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385;
@@ -5627,6 +5631,8 @@ internal cluster UnitTesting = 4294048773 {
56275631
attribute nullable int16u nullableRangeRestrictedInt16u = 16424;
56285632
attribute nullable int16s nullableRangeRestrictedInt16s = 16425;
56295633
attribute optional int8u writeOnlyInt8u = 16426;
5634+
attribute nullable TestGlobalEnum nullableGlobalEnum = 16435;
5635+
attribute nullable TestGlobalStruct nullableGlobalStruct = 16436;
56305636
attribute int8u meiInt8u = 4294070017;
56315637
readonly attribute command_id generatedCommandList[] = 65528;
56325638
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -5778,6 +5784,11 @@ internal cluster UnitTesting = 4294048773 {
57785784
SimpleEnum arg2 = 1;
57795785
}
57805786

5787+
response struct GlobalEchoResponse = 14 {
5788+
TestGlobalStruct field1 = 0;
5789+
TestGlobalEnum field2 = 1;
5790+
}
5791+
57815792
request struct TestNullableOptionalRequestRequest {
57825793
optional nullable int8u arg1 = 0;
57835794
}
@@ -5831,6 +5842,11 @@ internal cluster UnitTesting = 4294048773 {
58315842
octet_string payload = 0;
58325843
}
58335844

5845+
request struct GlobalEchoRequestRequest {
5846+
TestGlobalStruct field1 = 0;
5847+
TestGlobalEnum field2 = 1;
5848+
}
5849+
58345850
request struct TestDifferentVendorMeiRequestRequest {
58355851
int8u arg1 = 0;
58365852
}
@@ -5914,6 +5930,9 @@ internal cluster UnitTesting = 4294048773 {
59145930
the string back. If the string is large then it would require a session that
59155931
supports large payloads. */
59165932
command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24;
5933+
/** Command that takes arguments that are global structs/enums and the
5934+
response just echoes them back. */
5935+
command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25;
59175936
/** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */
59185937
command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962;
59195938
}

0 commit comments

Comments
 (0)