Python interface for the Agiltron SelfAlign fiber switch
Project description
Agiltron-SelfAlign
Python interface for the Agiltron SelfAlign fiber switch.
Requires Python 3.11 or newer.
Install
uv add agiltron-selfalign
Or install directly from source:
uv add git+https://github.com/ograsdijk/Agiltron-SelfAlign.git
Code Example
from agiltron_selfalign import AgiltronSelfAlign
resource_name = "COM8"
switch = AgiltronSelfAlign(resource_name, number_of_ports=16)
# change port to port 14
switch.set_fiber_port(14)
# home switch to port 1
switch.home()
Context Manager Example
from agiltron_selfalign import AgiltronSelfAlign
resource_name = "COM8"
with AgiltronSelfAlign(resource_name, number_of_ports=16) as switch:
switch.set_fiber_port(14)
switch.home()
API
AgiltronSelfAlign(resource_name, timeout=2.0, number_of_ports=16, baudrate=9600, write_timeout=None, inter_byte_timeout=None)- Opens the serial connection to the switch.
write_timeout=Nonedefaults to the readtimeoutvalue.
set_fiber_port(fiber_port)- Switches to the requested fiber port and validates the acknowledgement frame.
home()- Sends the home command to move the switch to port 1.
close()- Closes the serial connection.
AgiltronSelfAlignError- Raised for serial communication failures and protocol response errors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agiltron_selfalign-0.2.0.tar.gz
(40.9 kB
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
File details
Details for the file agiltron_selfalign-0.2.0.tar.gz.
File metadata
- Download URL: agiltron_selfalign-0.2.0.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0289048f0d1d0295d22620d3721a31583cb79fed3ff24905515e9f864520e147
|
|
| MD5 |
911da598b0d3a8358884d1bab5b37441
|
|
| BLAKE2b-256 |
fddc63b7e3b5c391b4e33c39b6b35327253d64709926264cd12013250b9312b1
|
File details
Details for the file agiltron_selfalign-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agiltron_selfalign-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87a0c128648b96f1d74cd81b2af4e21b2e0cde2c5bac365e3a2cbed12511ef14
|
|
| MD5 |
569c7f44842b60c5f6fbf778847f2bd0
|
|
| BLAKE2b-256 |
e9b98f38d0b0b7509ddab9839ddde1bc9137ee2ff3485b51172416f30efea72d
|