How johnscotttt/witrn_pd_sniffer works
WITRN K2 PD Sniffer is a desktop host application for capturing and inspecting USB Power Delivery traffic with a WITRN K2, and for working with compatible exported data. Its main workflow is device capture, protocol decoding into timestamped records, GUI inspection and plotting, then optional file export; compatible exports can also be imported. The sampled source is partial and concentrated in one GUI module, so the graph separates responsibilities conceptually while retaining that exact path. Import and device-library wiring beyond the shown excerpts is represented cautiously.
Main entry points: witrn_pd_sniffer.py Host application
Components 13
Device capture
- Host application
witrn_pd_sniffer.py - HID access
witrn_pd_sniffer.py
Decode and inspect
- PD decoder
witrn_pd_sniffer.py - Capture records
witrn_pd_sniffer.py - Record details
witrn_pd_sniffer.py - Signal plots
witrn_pd_sniffer.py - Matplotlib
File exchange
- Export importer
witrn_pd_sniffer.py - CSV exporter
witrn_pd_sniffer.py
Other components
- Operator
- WITRN K2
- Compatible export
- CSV output
Connections 14
- Operator → Host application: starts and operates
- Host application → HID access: opens and polls
- HID access → WITRN K2: reads PD traffic
- HID access → PD decoder: supplies capture data
- PD decoder → Capture records: creates records
- Host application → Record details: displays selected record
- Host application → Signal plots: updates curves
- Signal plots → Matplotlib: renders with
- Operator → Export importer: selects input
- Compatible export → Export importer: provides exported data
- Export importer → Capture records: loads parsed records
- Operator → CSV exporter: requests export
- CSV exporter → Capture records: reads capture data
- CSV exporter → CSV output: writes CSV