Skip to content

Commit

Permalink
Change Media::ApplicationBasic cluster to match spec (#29959)
Browse files Browse the repository at this point in the history
* Application basic: increase length of application name and mark vendor list as access administer

* Zap regen

* Switch to long char string, to support 256 characters

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
andy31415 and andreilitvin authored Oct 25, 2023
1 parent f473579 commit a0d3555
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3621,11 +3621,11 @@ server cluster ApplicationBasic = 1293 {
char_string applicationID = 1;
}

readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6399,12 +6399,12 @@ client cluster ApplicationBasic = 1293 {

readonly attribute optional char_string<32> vendorName = 0;
readonly attribute optional vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute optional int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -6429,12 +6429,12 @@ server cluster ApplicationBasic = 1293 {

readonly attribute char_string<32> vendorName = 0;
readonly attribute vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6358,12 +6358,12 @@ client cluster ApplicationBasic = 1293 {

readonly attribute optional char_string<32> vendorName = 0;
readonly attribute optional vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute optional int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -6388,12 +6388,12 @@ server cluster ApplicationBasic = 1293 {

readonly attribute char_string<32> vendorName = 0;
readonly attribute vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
4 changes: 2 additions & 2 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2402,12 +2402,12 @@ server cluster ApplicationBasic = 1293 {

readonly attribute char_string<32> vendorName = 0;
readonly attribute vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1949,12 +1949,12 @@ client cluster ApplicationBasic = 1293 {

readonly attribute optional char_string<32> vendorName = 0;
readonly attribute optional vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute optional int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
/* Cluster: Color Control, Attribute: ColorPointBY, Privilege: view */ \
/* Cluster: Color Control, Attribute: ColorPointBIntensity, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
0x0000050D, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}

// Parallel array data (cluster, *attribute*, privilege) for read attribute
Expand Down Expand Up @@ -151,6 +152,7 @@
/* Cluster: Color Control, Attribute: ColorPointBY, Privilege: view */ \
/* Cluster: Color Control, Attribute: ColorPointBIntensity, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
0x00000007, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}

// Parallel array data (cluster, attribute, *privilege*) for read attribute
Expand Down Expand Up @@ -214,6 +216,7 @@
/* Cluster: Color Control, Attribute: ColorPointBY, Privilege: view */ \
/* Cluster: Color Control, Attribute: ColorPointBIntensity, Privilege: view */ \
/* Cluster: Color Control, Attribute: StartUpColorTemperatureMireds, Privilege: view */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Application Basic, Attribute: AllowedVendorList, Privilege: administer */ \
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1239,12 +1239,12 @@
{ ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \
\
/* Endpoint: 1, Cluster: Application Basic (server) */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000000, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* VendorName */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000001, 2, ZAP_TYPE(VENDOR_ID), 0 }, /* VendorID */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000002, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* ApplicationName */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000003, 2, ZAP_TYPE(INT16U), 0 }, /* ProductID */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000005, 1, ZAP_TYPE(ENUM8), 0 }, /* Status */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000006, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* ApplicationVersion */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000000, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* VendorName */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000001, 2, ZAP_TYPE(VENDOR_ID), 0 }, /* VendorID */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000002, 258, ZAP_TYPE(LONG_CHAR_STRING), 0 }, /* ApplicationName */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000003, 2, ZAP_TYPE(INT16U), 0 }, /* ProductID */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000005, 1, ZAP_TYPE(ENUM8), 0 }, /* Status */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000006, 33, ZAP_TYPE(CHAR_STRING), 0 }, /* ApplicationVersion */ \
{ ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* AllowedVendorList */ \
{ ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \
{ ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \
Expand Down Expand Up @@ -2851,7 +2851,7 @@
.clusterId = 0x0000050D, \
.attributes = ZAP_ATTRIBUTE_INDEX(573), \
.attributeCount = 9, \
.clusterSize = 110, \
.clusterSize = 335, \
.mask = ZAP_CLUSTER_MASK(SERVER), \
.functions = NULL, \
.acceptedCommandList = nullptr, \
Expand Down Expand Up @@ -3024,7 +3024,7 @@
// This is an array of EmberAfEndpointType structures.
#define GENERATED_ENDPOINT_TYPES \
{ \
{ ZAP_CLUSTER_INDEX(0), 27, 345 }, { ZAP_CLUSTER_INDEX(27), 44, 3492 }, { ZAP_CLUSTER_INDEX(71), 7, 127 }, \
{ ZAP_CLUSTER_INDEX(0), 27, 345 }, { ZAP_CLUSTER_INDEX(27), 44, 3717 }, { ZAP_CLUSTER_INDEX(71), 7, 127 }, \
{ ZAP_CLUSTER_INDEX(78), 2, 4 }, \
}

Expand All @@ -3037,7 +3037,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE,
#define ATTRIBUTE_SINGLETONS_SIZE (37)

// Total size of attribute storage
#define ATTRIBUTE_MAX_SIZE (3968)
#define ATTRIBUTE_MAX_SIZE (4193)

// Number of fixed endpoints
#define FIXED_ENDPOINT_COUNT (4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ limitations under the License.
<description>This cluster provides information about an application running on a TV or media player device which is represented as an endpoint.</description>
<attribute side="server" code="0x0000" define="APPLICATION_VENDOR_NAME" type="char_string" default="" length="32" writable="false" optional="true">VendorName</attribute>
<attribute side="server" code="0x0001" define="APPLICATION_VENDOR_ID" type="vendor_id" default="0x0" min="0x0000" max="0xFFFF" writable="false" optional="true">VendorID</attribute>
<attribute side="server" code="0x0002" define="APPLICATION_NAME" type="char_string" length="32" writable="false" optional="false">ApplicationName</attribute>
<attribute side="server" code="0x0002" define="APPLICATION_NAME" type="long_char_string" length="256" writable="false" optional="false">ApplicationName</attribute>
<attribute side="server" code="0x0003" define="APPLICATION_PRODUCT_ID" type="int16u" default="0x0" min="0x0000" max="0xFFFF" writable="false" optional="true">ProductID</attribute>
<attribute side="server" code="0x0004" define="APPLICATION_APP" type="ApplicationStruct" writable="false" optional="false">Application</attribute>
<attribute side="server" code="0x0005" define="APPLICATION_STATUS" type="ApplicationStatusEnum" default="0x01" min="0x00" max="0xFF" writable="false" optional="false">Status</attribute>
<attribute side="server" code="0x0006" define="APPLICATION_VERSION" type="char_string" length="32" writable="false" optional="false">ApplicationVersion</attribute>
<attribute side="server" code="0x0007" define="APPLICATION_ALLOWED_VENDOR_LIST" type="ARRAY" entryType="vendor_id" length="32" writable="false" optional="false">AllowedVendorList</attribute>
<attribute side="server" code="0x0007" define="APPLICATION_ALLOWED_VENDOR_LIST" type="ARRAY" entryType="vendor_id" length="32" writable="false" optional="false">
<description>AllowedVendorList</description>
<access op="read" role="administer"/>
</attribute>

</cluster>

Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6375,12 +6375,12 @@ client cluster ApplicationBasic = 1293 {

readonly attribute optional char_string<32> vendorName = 0;
readonly attribute optional vendor_id vendorID = 1;
readonly attribute char_string<32> applicationName = 2;
readonly attribute long_char_string<256> applicationName = 2;
readonly attribute optional int16u productID = 3;
readonly attribute ApplicationStruct application = 4;
readonly attribute ApplicationStatusEnum status = 5;
readonly attribute char_string<32> applicationVersion = 6;
readonly attribute vendor_id allowedVendorList[] = 7;
readonly attribute access(read: administer) vendor_id allowedVendorList[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0d3555

Please sign in to comment.