connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Handle typedef in zapt templates & matter_idl

Open gmarcosb opened this issue 1 year ago • 2 comments

Dependent on zap updates at https://github.com/project-chip/zap/pull/1458

Update zap templaets to processtypedef in zap, supporting things like defining a VideoStreamID as a uint16, see the camera spec: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/10004

This should also eliminate the need for many of the things in chip-types.xml, which can now be simply defined in the XML files as a simple typedef

See also discussion with @bzbarsky-apple: https://github.com/project-chip/connectedhomeip/pull/35773#discussion_r1775652745

gmarcosb avatar Oct 17 '24 15:10 gmarcosb

Review changes with  SemanticDiff

Changed Files
File Status
  src/app/zap-templates/zcl/zcl-with-test-extensions.json  82% smaller
  src/app/zap-templates/zcl/zcl.json  82% smaller
  scripts/py_matter_idl/matter_idl/generators/java/__init__.py  21% smaller
  scripts/py_matter_idl/matter_idl/matter_idl_parser.py  10% smaller
  examples/darwin-framework-tool/templates/commands.zapt Unsupported file format
  examples/darwin-framework-tool/templates/partials/decodable_value.zapt Unsupported file format
  scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py  0% smaller
  scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja Unsupported file format
  scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py  0% smaller
  scripts/py_matter_idl/matter_idl/generators/type_definitions.py  0% smaller
  scripts/py_matter_idl/matter_idl/matter_grammar.lark Unsupported file format
  scripts/py_matter_idl/matter_idl/matter_idl_types.py  0% smaller
  scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py  0% smaller
  scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py  0% smaller
  scripts/tools/zap_regen_all.py  0% smaller
  src/app/common/BUILD.gn Unsupported file format
  src/app/common/templates/templates.json  0% smaller
  src/app/zap-templates/partials/cluster-typedefs-typedef.zapt Unsupported file format
  src/app/zap-templates/partials/idl/cluster_definition.zapt Unsupported file format
  src/app/zap-templates/partials/idl/global_types.zapt Unsupported file format
  src/app/zap-templates/templates/app/cluster-objects.zapt Unsupported file format
  src/app/zap-templates/templates/app/cluster-typedefs.zapt Unsupported file format
  src/app/zap-templates/zcl/data-model/chip/global-structs.xml  0% smaller
  src/app/zap-templates/zcl/data-model/chip/global-typedefs.xml  0% smaller
  src/app/zap-templates/zcl/data-model/chip/test-cluster.xml  0% smaller
  src/app/zap-templates/zcl/zcl.xsd  0% smaller
  src/controller/java/templates/partials/decode_value.zapt Unsupported file format
  src/controller/java/templates/templates.json  0% smaller
  src/controller/python/templates/partials/typedef_def.zapt Unsupported file format
  src/controller/python/templates/python-CHIPClusters-py.zapt Unsupported file format
  src/controller/python/templates/python-cluster-Objects-py.zapt Unsupported file format
  src/controller/python/templates/templates.json  0% smaller
  src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/decode_value.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/encode_value.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/typedef_decl.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/templates.json  0% smaller
  src/lib/core/BUILD.gn Unsupported file format

semanticdiff-com[bot] avatar Oct 17 '24 15:10 semanticdiff-com[bot]

PR #36124: Size comparison from dead378d8d2dca64aa610f9c9447ef24523e469a to 61d1605479d63195364fd87281f09a0fc658f0b8

Full report (1 build for stm32)
platform target config section dead378d 61d16054 change % change
stm32 light STM32WB5MM-DK FLASH 481896 481896 0 0.0
RAM 144844 144844 0 0.0

github-actions[bot] avatar Oct 17 '24 16:10 github-actions[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 25 '25 16:11 CLAassistant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 25 '25 16:11 CLAassistant