epmux
This is a python binding for epmux cross-platform library for Multiplexer EyePoint 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:
- English version: https://eyepoint.physlab.ru/en/product/EyePoint_MUX_M/
- Russian version: https://eyepoint.physlab.ru/ru/product/EyePoint_MUX_M/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
epmux-1.0.0.tar.gz
(3.2 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
epmux-1.0.0-py3-none-any.whl
(3.2 MB
view details)
File details
Details for the file epmux-1.0.0.tar.gz.
File metadata
- Download URL: epmux-1.0.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39ab62523156e2d9b05e13a9b2de83cc7815156c25e94937475a96ed01435726
|
|
| MD5 |
59c8d3fe0bb4ea4875c7998e1880ab20
|
|
| BLAKE2b-256 |
1341689c3ab404c4eb324c532f869ca8b1d20652b449527dffe0d661f23a3495
|
File details
Details for the file epmux-1.0.0-py3-none-any.whl.
File metadata
- Download URL: epmux-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30e8b300f4eadc025ffcc698afd070df28ce5268bfbcf321ad4615cdfdd933aa
|
|
| MD5 |
1aa1231cdba9b5355c9666c7849d294a
|
|
| BLAKE2b-256 |
1d7d084a7eed05850d8bd16a1fa95dff2dbd00a1691a9c6481df08599a060e21
|