Summary
Add two utility scripts to convert PICS log data into XML PICS files compatible with the Matter certification tool's Generic-PICS-XML-Schema.xsd schema.
Scripts
scripts/pics_to_xml.sh (bash)
- Accepts two input formats:
- Python dict log format:
PICSItem(number='KEY', enabled=True/False)
- Raw
KEY=0/1 lines (or inside an echo '...' block)
- Produces one XML file per cluster prefix (e.g.
MCORE.xml, JFADMIN.xml)
- Pure bash + awk + perl — no extra dependencies
Usage
# bash version
./scripts/pics_to_xml.sh <input_file> [output_dir]
# Python version
python scripts/pics_to_xml.py <input_file> [-o output_dir]
python scripts/pics_to_xml.py --text "MCORE.S=1\nMCORE.C=0" [-o output_dir]
XML output structure
Each output file follows the clusterPICS schema with sections:
usage — top-level cluster usage items (e.g. ACL.S, ACL.C)
clusterSide type="Server" / type="Client" — per-side attributes, events, commandsGenerated, commandsReceived, features, manually
miscellaneous — items that don't fit the Server/Client structure
Motivation
When running certification tests, PICS data is available as TH log output or as KEY=0/1 shell blocks. These scripts automate the conversion into the XML format required by the certification tool, eliminating manual XML editing.
Summary
Add two utility scripts to convert PICS log data into XML PICS files compatible with the Matter certification tool's
Generic-PICS-XML-Schema.xsdschema.Scripts
scripts/pics_to_xml.sh(bash)PICSItem(number='KEY', enabled=True/False)KEY=0/1lines (or inside anecho '...'block)MCORE.xml,JFADMIN.xml)Usage
XML output structure
Each output file follows the
clusterPICSschema with sections:usage— top-level cluster usage items (e.g.ACL.S,ACL.C)clusterSide type="Server"/type="Client"— per-side attributes, events, commandsGenerated, commandsReceived, features, manuallymiscellaneous— items that don't fit the Server/Client structureMotivation
When running certification tests, PICS data is available as TH log output or as
KEY=0/1shell blocks. These scripts automate the conversion into the XML format required by the certification tool, eliminating manual XML editing.