Skip to content

Commit

Permalink
Generate .matter IDL to contain global structures (#34545)
Browse files Browse the repository at this point in the history
* Starting a template implementation

* Move file to propper location

* Start adding some global types in codegen

* Fix indent

* Undo large changes and fix spacing

* zap regen

* Prepare to remove the extra Bitmap types

* Different style workaround

* Fix the condition ending to make it work

* zap regen

* Undo file change

* Undo file change

* Matter IDL indent is a bit better

* Fighting with zap/handlebars intend... this is terrible

* zap-regen

* Self code review cleanup

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Aug 5, 2024
1 parent 7354132 commit 1478482
Show file tree
Hide file tree
Showing 94 changed files with 1,538 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
17 changes: 17 additions & 0 deletions examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
// This IDL was generated automatically by ZAP.
// It is for view/code review purposes only.

enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
kFinalValue = 2;
}

bitmap TestGlobalBitmap : bitmap32 {
kFirstBit = 0x1;
kSecondBit = 0x2;
}

struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
optional nullable TestGlobalEnum myEnum = 2;
}

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
cluster Identify = 3 {
revision 4;
Expand Down
Loading

0 comments on commit 1478482

Please sign in to comment.