diff --git a/docs/index.md b/docs/index.md index 8447850784787f..b7615a476818df 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,8 +20,10 @@ testing/index tools/index BUG_REPORT code_generation -clusters +zap_clusters +spec_clusters ERROR_CODES + ``` ```{include} README.md diff --git a/docs/cluster_ids.md b/docs/spec_clusters.md similarity index 99% rename from docs/cluster_ids.md rename to docs/spec_clusters.md index 5becc78f9f0e8d..02715424bbb5d8 100644 --- a/docs/cluster_ids.md +++ b/docs/spec_clusters.md @@ -1,4 +1,4 @@ -# Matter Cluster IDs +# List of currently defined spec clusters This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND! | ID (Decimal) | ID (hex) | Name | diff --git a/docs/clusters.md b/docs/zap_clusters.md similarity index 99% rename from docs/clusters.md rename to docs/zap_clusters.md index eb3dfde53abb80..eedfb7190e2f27 100644 --- a/docs/clusters.md +++ b/docs/zap_clusters.md @@ -8,7 +8,7 @@ Generally regenerate using one of: - ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter --> -## List of currently defined clusters +## List of currently defined ZAP clusters | Code (dec) | Code (hex) | Name | | ---------- | ---------- | ------------------------------------------------------- | diff --git a/scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py b/scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py index fc49931ff60f21..3acb05110c463f 100644 --- a/scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py @@ -28,7 +28,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): def internal_render_all(self): self.internal_render_one_output( template_path="clusters_markdown.jinja", - output_file_name="clusters.md", + output_file_name="zap_clusters.md", vars={ 'idl': self.idl, } diff --git a/scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja b/scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja index bc9f7c8ad36a85..33473c028d83fb 100644 --- a/scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja @@ -8,7 +8,7 @@ Generally regenerate using one of: - ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter --> -## List of currently defined clusters +## List of currently defined ZAP clusters | Code (dec) | Code (hex) | Name | | ---------- | ---------- | ------------------------------------------------------- | diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index 2da012d6b1d929..b947b997665251 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -27,8 +27,8 @@ os.path.join(os.path.dirname(__file__), '..', '..')) DEFAULT_OUTPUT_DIR = os.path.abspath( os.path.join(DEFAULT_CHIP_ROOT, 'data_model')) -DEFAULT_DOCUMENTATION_DIR = os.path.abspath( - os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'cluster_ids.md')) +DEFAULT_DOCUMENTATION_FILE = os.path.abspath( + os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'spec_clusters.md')) def get_xml_path(filename, output_dir): @@ -156,11 +156,12 @@ def dump_cluster_ids(output_dir): python_testing_path = os.path.abspath( os.path.join(DEFAULT_CHIP_ROOT, 'src', 'python_testing')) sys.path.insert(0, python_testing_path) - clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters')) + clusters_output_dir = os.path.abspath( + os.path.join(output_dir, 'clusters')) from spec_parsing_support import build_xml_clusters - header = '# Matter Cluster IDs\n' + header = '# List of currently defined spec clusters\n' header += 'This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!\n\n' clusters, problems = build_xml_clusters() @@ -180,7 +181,7 @@ def dump_cluster_ids(output_dir): hex_id = f'0x{id:04X}' s += f'|{id:<{dec_len}}|{hex_id:<{hex_len}}|{cluster.name:<{name_len}}|\n' - with open(DEFAULT_DOCUMENTATION_DIR, 'w') as fout: + with open(DEFAULT_DOCUMENTATION_FILE, 'w') as fout: fout.write(header) fout.write(s)