Skip to content

[FEATURE] Create PICS-to-XML conversion script #1016

@rquidute

Description

@rquidute

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:
    1. Python dict log format: PICSItem(number='KEY', enabled=True/False)
    2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions