Skip to main content

epmux

This is a python binding for epmux cross-platform library for Multiplexer EyePoint MUX.

MUX

Installation

pip install epmux

Minimal example

For more information on API functions please consult documentation (see section "More information").

from epmux import EpmuxDeviceHandle

module_type = {
    0: "placeholder",  # No module present
    1: "A",            # Module of type A (connects to line A only)
    2: "AB"            # Module of type AB (connects to both line A and B)
}

# Set correct device URI here
# Format for Windows: com:\\.\COM1
# Format for Linux: /dev/ttyACM1
# Format for MacOS: com:///dev/tty.usbmodem000001721
device_uri = r'com:\\.\COM433'

# Open device
try:
    device = EpmuxDeviceHandle(device_uri)
    print("Device opened")
    print("Read device information... ", end="")
    device_info = device.get_identity_information()
    print("Done")
    print("  -- Device information --")
    print("  Product: {} {}".format(bytes(device_info.manufacturer).decode("utf-8"),
                                    bytes(device_info.product_name).decode("utf-8")))
    print("  Hardware version: {}.{}.{}".format(device_info.hardware_major,
                                                device_info.hardware_minor,
                                                device_info.hardware_bugfix))
    print("  Serial number: {}".format(device_info.serial_number))
    print("  Firmware version: {}.{}.{}".format(device_info.firmware_major,
                                                device_info.firmware_minor,
                                                device_info.firmware_bugfix))
except RuntimeError:
    print("Cannot open device {}.".format(device_uri))
    print("Please check URI and try again.")
    exit()

# Get module chain structure (number of modules and their types)
chain = device.get_chain_structure()
print("Device chain length: {}".format(chain.chain_length))
print("Device chain structure: ", end="")
print(*("{}".format(module_type[chain.chain_structure[k]])
        for k in range(chain.chain_length)), sep=", ")

# Set active output channel
print("Set active output channel to: module 1, line A, channel 1")
active_channel_a = device.get_channel_for_line_a()
active_channel_a.module_number = 1   # Module chain position
active_channel_a.channel_number = 1  # Channel number within the module
device.set_channel_for_line_a(active_channel_a)

print("Turn off all channels of all modules")
device.all_channels_off()

# Close device
device.close_device()
print("Device closed")

More information

For documentation, software, examples of using the API and bindings for Python and C#, you can visit our website:

Metadata

Release files for epmux 1.0.0

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

Source distribution (sdist)

Source distribution for epmux 1.0.0
File Size Uploaded
epmux-1.0.0.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for epmux 1.0.0
File Interpreter ABI Platform
epmux-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / epmux-1.0.0.tar.gz

Download URL epmux-1.0.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
39ab62523156e2d9b05e13a9b2de83cc7815156c25e94937475a96ed01435726
BLAKE2b-256 checksum
How to use checksums
1341689c3ab404c4eb324c532f869ca8b1d20652b449527dffe0d661f23a3495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

Release files / epmux-1.0.0-py3-none-any.whl

Download URL epmux-1.0.0-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
30e8b300f4eadc025ffcc698afd070df28ce5268bfbcf321ad4615cdfdd933aa
BLAKE2b-256 checksum
How to use checksums
1d7d084a7eed05850d8bd16a1fa95dff2dbd00a1691a9c6481df08599a060e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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