Skip to content

Commit 824ba6d

Browse files
DM XMLs: Add function to dump cluster IDs for documentation (#32761)
* Add function to dump cluster IDs for documentation * add json dump * add Illuminance to word list * remove unused var * Change titles on docs to show zap vs. spec * add the json for cluster_ids * Restyled by whitespace * Restyled by prettier-json * Restyled by prettier-markdown * Omit generated md files from restyler --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent b79831e commit 824ba6d

File tree

9 files changed

+305
-15
lines changed

9 files changed

+305
-15
lines changed

.github/.wordlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ ifdef
668668
ifdefs
669669
IGMP
670670
ihex
671+
Illuminance
671672
IlluminanceMeasurement
672673
IM
673674
imager

.restyled.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ exclude:
8686
- "integrations/docker/build-all.sh" # tries to quote loop variable
8787
- "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff.
8888
- "docs/ERROR_CODES.md" # generated by scripts, not easy to align tables
89-
- "docs/clusters.md" # generated by scripts, not easy to align tables
89+
- "docs/zap_clusters.md" # generated by scripts, not easy to align tables
90+
- "docs/spec_clusters.md" # generated by scripts, not easy to align tables
9091
- "docs/testing/yaml_pseudocluster.md" # generated by scripts, restyler makes the tables render improperly
9192
- "docs/testing/yaml_schema.md" # generated by scripts, restyler makes the tables render improperly
9293

data_model/clusters/cluster_ids.json

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"3": "Identify",
3+
"4": "Groups",
4+
"6": "On/Off",
5+
"8": "Level Control",
6+
"28": "Pulse Width Modulation",
7+
"29": "Descriptor",
8+
"30": "Binding",
9+
"31": "AccessControl",
10+
"37": "Actions",
11+
"40": "Basic Information",
12+
"41": "OTA Software Update Provider",
13+
"42": "OTA Software Update Requestor",
14+
"43": "Localization Configuration",
15+
"44": "Time Format Localization",
16+
"45": "Unit Localization",
17+
"46": "Power Source Configuration",
18+
"47": "Power Source",
19+
"48": "General Commissioning",
20+
"49": "Network Commissioning",
21+
"50": "Diagnostic Logs",
22+
"51": "General Diagnostics",
23+
"52": "Software Diagnostics",
24+
"53": "Thread Network Diagnostics",
25+
"54": "Wi",
26+
"55": "Ethernet Network Diagnostics",
27+
"56": "Time Synchronization",
28+
"57": "Bridged Device Basic Information",
29+
"59": "Switch",
30+
"60": "Administrator Commissioning",
31+
"62": "Operational Credentials",
32+
"63": "GroupKeyManagement",
33+
"64": "Fixed Label",
34+
"65": "User Label",
35+
"69": "Boolean State",
36+
"70": "ICDManagement",
37+
"72": "Oven Cavity Operational State",
38+
"73": "Oven Mode",
39+
"74": "Laundry Dryer Controls",
40+
"80": "Mode Select",
41+
"81": "Laundry Washer Mode",
42+
"82": "Refrigerator And Temperature Controlled Cabinet Mode",
43+
"83": "Laundry Washer Controls",
44+
"84": "RVC Run Mode",
45+
"85": "RVC Clean Mode",
46+
"86": "Temperature Control",
47+
"87": "Refrigerator Alarm",
48+
"89": "Dishwasher Mode",
49+
"91": "Air Quality",
50+
"92": "Smoke CO Alarm",
51+
"93": "Dishwasher Alarm",
52+
"94": "Microwave Oven Mode",
53+
"95": "Microwave Oven Control",
54+
"96": "Operational State",
55+
"97": "RVC Operational State",
56+
"98": "Scenes Management",
57+
"113": "HEPA Filter Monitoring",
58+
"114": "Activated Carbon Filter Monitoring",
59+
"128": "Boolean State Configuration",
60+
"129": "Valve Configuration and Control",
61+
"144": "Electrical Power Measurement",
62+
"145": "Electrical Energy Measurement",
63+
"148": "Water Heater Management",
64+
"149": "Energy Price",
65+
"150": "Demand Response and Load Control",
66+
"151": "Messages",
67+
"152": "Device Energy Management",
68+
"153": "Energy EVSE",
69+
"154": "Energy Calendar",
70+
"155": "Energy Preference",
71+
"156": "Power Topology",
72+
"157": "Energy EVSE Mode",
73+
"158": "Water Heater Mode",
74+
"159": "Device Energy Management Mode",
75+
"257": "Door Lock",
76+
"258": "Window Covering",
77+
"512": "Pump Configuration and Control",
78+
"513": "Thermostat",
79+
"514": "Fan Control",
80+
"516": "Thermostat User Interface Configuration",
81+
"768": "Color Control",
82+
"769": "Ballast Configuration",
83+
"1024": "Illuminance Measurement",
84+
"1026": "Temperature Measurement",
85+
"1027": "Pressure Measurement",
86+
"1028": "Flow Measurement",
87+
"1029": "Relative Humidity Measurement",
88+
"1030": "Occupancy Sensing",
89+
"1036": "Carbon Monoxide Concentration Measurement",
90+
"1037": "Carbon Dioxide Concentration Measurement",
91+
"1043": "Nitrogen Dioxide Concentration Measurement",
92+
"1045": "Ozone Concentration Measurement",
93+
"1066": "PM2",
94+
"1067": "Formaldehyde Concentration Measurement",
95+
"1068": "PM1 Concentration Measurement",
96+
"1069": "PM10 Concentration Measurement",
97+
"1070": "Total Volatile Organic Compounds Concentration Measurement",
98+
"1071": "Radon Concentration Measurement",
99+
"1104": "Network Identity Management",
100+
"1105": "Wi",
101+
"1283": "Wake on LAN",
102+
"1284": "Channel",
103+
"1285": "Target Navigator",
104+
"1286": "Media Playback",
105+
"1287": "Media Input",
106+
"1288": "Low Power",
107+
"1289": "Keypad Input",
108+
"1290": "Content Launcher",
109+
"1291": "Audio Output",
110+
"1292": "Application Launcher",
111+
"1293": "Application Basic",
112+
"1294": "Account Login",
113+
"1295": "Content Control",
114+
"1296": "Content App Observer"
115+
}

docs/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ testing/index
2020
tools/index
2121
BUG_REPORT
2222
code_generation
23-
clusters
23+
zap_clusters
24+
spec_clusters
2425
ERROR_CODES
26+
2527
```
2628

2729
```{include} README.md

docs/spec_clusters.md

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# List of currently defined spec clusters
2+
This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!
3+
4+
| ID (Decimal) | ID (hex) | Name |
5+
|--------------|----------|----------------------------------------------------------|
6+
|3 |0x0003 |Identify |
7+
|4 |0x0004 |Groups |
8+
|6 |0x0006 |On/Off |
9+
|8 |0x0008 |Level Control |
10+
|28 |0x001C |Pulse Width Modulation |
11+
|29 |0x001D |Descriptor |
12+
|30 |0x001E |Binding |
13+
|31 |0x001F |AccessControl |
14+
|37 |0x0025 |Actions |
15+
|40 |0x0028 |Basic Information |
16+
|41 |0x0029 |OTA Software Update Provider |
17+
|42 |0x002A |OTA Software Update Requestor |
18+
|43 |0x002B |Localization Configuration |
19+
|44 |0x002C |Time Format Localization |
20+
|45 |0x002D |Unit Localization |
21+
|46 |0x002E |Power Source Configuration |
22+
|47 |0x002F |Power Source |
23+
|48 |0x0030 |General Commissioning |
24+
|49 |0x0031 |Network Commissioning |
25+
|50 |0x0032 |Diagnostic Logs |
26+
|51 |0x0033 |General Diagnostics |
27+
|52 |0x0034 |Software Diagnostics |
28+
|53 |0x0035 |Thread Network Diagnostics |
29+
|54 |0x0036 |Wi |
30+
|55 |0x0037 |Ethernet Network Diagnostics |
31+
|56 |0x0038 |Time Synchronization |
32+
|57 |0x0039 |Bridged Device Basic Information |
33+
|59 |0x003B |Switch |
34+
|60 |0x003C |Administrator Commissioning |
35+
|62 |0x003E |Operational Credentials |
36+
|63 |0x003F |GroupKeyManagement |
37+
|64 |0x0040 |Fixed Label |
38+
|65 |0x0041 |User Label |
39+
|69 |0x0045 |Boolean State |
40+
|70 |0x0046 |ICDManagement |
41+
|72 |0x0048 |Oven Cavity Operational State |
42+
|73 |0x0049 |Oven Mode |
43+
|74 |0x004A |Laundry Dryer Controls |
44+
|80 |0x0050 |Mode Select |
45+
|81 |0x0051 |Laundry Washer Mode |
46+
|82 |0x0052 |Refrigerator And Temperature Controlled Cabinet Mode |
47+
|83 |0x0053 |Laundry Washer Controls |
48+
|84 |0x0054 |RVC Run Mode |
49+
|85 |0x0055 |RVC Clean Mode |
50+
|86 |0x0056 |Temperature Control |
51+
|87 |0x0057 |Refrigerator Alarm |
52+
|89 |0x0059 |Dishwasher Mode |
53+
|91 |0x005B |Air Quality |
54+
|92 |0x005C |Smoke CO Alarm |
55+
|93 |0x005D |Dishwasher Alarm |
56+
|94 |0x005E |Microwave Oven Mode |
57+
|95 |0x005F |Microwave Oven Control |
58+
|96 |0x0060 |Operational State |
59+
|97 |0x0061 |RVC Operational State |
60+
|98 |0x0062 |Scenes Management |
61+
|113 |0x0071 |HEPA Filter Monitoring |
62+
|114 |0x0072 |Activated Carbon Filter Monitoring |
63+
|128 |0x0080 |Boolean State Configuration |
64+
|129 |0x0081 |Valve Configuration and Control |
65+
|144 |0x0090 |Electrical Power Measurement |
66+
|145 |0x0091 |Electrical Energy Measurement |
67+
|148 |0x0094 |Water Heater Management |
68+
|149 |0x0095 |Energy Price |
69+
|150 |0x0096 |Demand Response and Load Control |
70+
|151 |0x0097 |Messages |
71+
|152 |0x0098 |Device Energy Management |
72+
|153 |0x0099 |Energy EVSE |
73+
|154 |0x009A |Energy Calendar |
74+
|155 |0x009B |Energy Preference |
75+
|156 |0x009C |Power Topology |
76+
|157 |0x009D |Energy EVSE Mode |
77+
|158 |0x009E |Water Heater Mode |
78+
|159 |0x009F |Device Energy Management Mode |
79+
|257 |0x0101 |Door Lock |
80+
|258 |0x0102 |Window Covering |
81+
|512 |0x0200 |Pump Configuration and Control |
82+
|513 |0x0201 |Thermostat |
83+
|514 |0x0202 |Fan Control |
84+
|516 |0x0204 |Thermostat User Interface Configuration |
85+
|768 |0x0300 |Color Control |
86+
|769 |0x0301 |Ballast Configuration |
87+
|1024 |0x0400 |Illuminance Measurement |
88+
|1026 |0x0402 |Temperature Measurement |
89+
|1027 |0x0403 |Pressure Measurement |
90+
|1028 |0x0404 |Flow Measurement |
91+
|1029 |0x0405 |Relative Humidity Measurement |
92+
|1030 |0x0406 |Occupancy Sensing |
93+
|1036 |0x040C |Carbon Monoxide Concentration Measurement |
94+
|1037 |0x040D |Carbon Dioxide Concentration Measurement |
95+
|1043 |0x0413 |Nitrogen Dioxide Concentration Measurement |
96+
|1045 |0x0415 |Ozone Concentration Measurement |
97+
|1066 |0x042A |PM2 |
98+
|1067 |0x042B |Formaldehyde Concentration Measurement |
99+
|1068 |0x042C |PM1 Concentration Measurement |
100+
|1069 |0x042D |PM10 Concentration Measurement |
101+
|1070 |0x042E |Total Volatile Organic Compounds Concentration Measurement|
102+
|1071 |0x042F |Radon Concentration Measurement |
103+
|1104 |0x0450 |Network Identity Management |
104+
|1105 |0x0451 |Wi |
105+
|1283 |0x0503 |Wake on LAN |
106+
|1284 |0x0504 |Channel |
107+
|1285 |0x0505 |Target Navigator |
108+
|1286 |0x0506 |Media Playback |
109+
|1287 |0x0507 |Media Input |
110+
|1288 |0x0508 |Low Power |
111+
|1289 |0x0509 |Keypad Input |
112+
|1290 |0x050A |Content Launcher |
113+
|1291 |0x050B |Audio Output |
114+
|1292 |0x050C |Application Launcher |
115+
|1293 |0x050D |Application Basic |
116+
|1294 |0x050E |Account Login |
117+
|1295 |0x050F |Content Control |
118+
|1296 |0x0510 |Content App Observer |

docs/clusters.md docs/zap_clusters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Generally regenerate using one of:
88
- ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter
99
-->
1010

11-
## List of currently defined clusters
11+
## List of currently defined ZAP clusters
1212

1313
| Code (dec) | Code (hex) | Name |
1414
| ---------- | ---------- | ------------------------------------------------------- |

scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs):
2828
def internal_render_all(self):
2929
self.internal_render_one_output(
3030
template_path="clusters_markdown.jinja",
31-
output_file_name="clusters.md",
31+
output_file_name="zap_clusters.md",
3232
vars={
3333
'idl': self.idl,
3434
}

scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Generally regenerate using one of:
88
- ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter
99
-->
1010

11-
## List of currently defined clusters
11+
## List of currently defined ZAP clusters
1212

1313
| Code (dec) | Code (hex) | Name |
1414
| ---------- | ---------- | ------------------------------------------------------- |

0 commit comments

Comments
 (0)