How pmk-probing-solutions-germany/pmk-probes works
Project Type and Purpose
• Type: A Python SDK/library for controlling PMK active oscilloscope probes and their power supplies.
• Purpose: Expose a high-level API so clients can configure and read metadata from probes over serial/IP, abstracting away low-level hardware details.
Top-Level Components
• pmk_probes (the library)
• Data Structures (_data_structures.py)
• Devices/Domain
– Probes (probes.py)
– Power Supplies (power_supplies.py)
• Hardware Abstraction (_hardware_interfaces.py)
• Errors (_errors.py)
• Auxiliary (_devices.py)
• External Dependencies
• pyserial (for serial COM)
• stdlib / ip sockets (for network-attached supplies)
• External Systems
• Physical power supply hardware (PS03)
• Physical probe head (e.g., BumbleBee2kV)
• Oscilloscope (consumer of probe output)
Relationships & Data Flows
• User Application (leftmost) calls into pmk_probes API:
– Instantiates a PowerSupply object (e.g., PS03) using COM port or IP.
– Instantiates a Probe object (e.g., BumbleBee2kV) passing the supply and channel.
– Reads/writes properties (attenuation, serial_number, etc.)
• The Probe/PowerSupply object uses Hardware Interface layer to send/receive commands:
– SerialInterface (pyserial) or TcpInterface → physical device.
• Device responds → raw bytes → parsed into DataStructure/metadata → returned to user.
• Errors bubble up via custom error classes.
Architectural Patterns & Design Principles
• Layered Architecture—separate domain logic from hardware I/O.
• Dependency Injection—Probe accepts a PowerSupply instance.
• Single Responsibility—each module focuses on one concern (e.g., errors vs hardware I/O vs domain).
• Abstraction over concrete transports (serial vs TCP).