Skip to main content


Doctor X communication protocol

This library is not intended to be used on its own. Instead each Doctor X device has its own API library which uses this drx_protocol library as a dependency for the basic communication protocol.

Installation

Install the lastest python3 version. Open command line interface (cmd) and type pip3 install --upgrade drx-protocol

Usage example

See the manual of the DrX device for the full list of available commands for your device. However it is recommended to use the dedicated API libary of your device which already includes all commands.

import logging

from drx_protocol.protocol import drx_protocol, drx_command as cmd

# Set the debug level, normal operation: "INFO"
logging.basicConfig(level="DEBUG")

HOST = "192.168.1.100"
SERIAL = "fill in the serial number of the device"
ORGANIZATION = "fill in the organization from the software license provided with the device"
SIGNATURE = "fill in the signature from the software license provided with the device"

##########################################################################################################################################################
# Normal operation of the API
##########################################################################################################################################################

# constuct the API object
api = drx_protocol(
    host = HOST,
    serial = SERIAL,
    organization = ORGANIZATION,
    signature = SIGNATURE,
)

# send a single command to GET the frequency
cmd_freq = api.send_command(cmd("Frq"))
print(f"Frequency: {cmd_freq.value}")

# send a single command to SET the frequency
cmd_freq = api.send_command(cmd("Frq", "=", 2417.0))
print(f"Frequency: {cmd_freq.value}")

# send 5 commands in one message to GET all PSU voltages
response = api.send_command([cmd("V05"), cmd("V55"), cmd("V15"), cmd("Vm5"), cmd("V24")])
for val in response.values():
    print(f"{val.cmd}: {val.value}")

# Close the connection
api.close()

Metadata

Release files for drx-protocol 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drx-protocol 1.0.6
File Size Uploaded Provenance Actions
drx_protocol-1.0.6.tar.gz 8.7 kB Without provenance Details for drx_protocol-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drx-protocol 1.0.6
File Interpreter ABI Platform Actions
drx_protocol-1.0.6-py3-none-any.whl Python 3 none any Details for drx_protocol-1.0.6-py3-none-any.whl

Total release size: 17.2 kB

Release files / drx_protocol-1.0.6.tar.gz

Download URL drx_protocol-1.0.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
be40b187fc2d3a3460d48e5accf497a6fc1481bb172a4e83dd5fe1a8c386dfaf
BLAKE2b-256 checksum
How to use checksums
bbfcb4d0e1c45d0241d31b5ba42a0a41efad62ee0e2952f49c157bea67ca72be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / drx_protocol-1.0.6-py3-none-any.whl

Download URL drx_protocol-1.0.6-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3ddaadeb795404d00f9c974a70dd604fc7618b955966c2955f6ab9eca9f37cb
BLAKE2b-256 checksum
How to use checksums
377f0e7dd7e6f2fbb2392226e911be70ccf42c3442a47b61c1c60b7b7cdf8320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for drx-protocol 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page