Hardware Abstraction Layer (HAL) submodule of QOSST
Project description
qosst-hal
This project is part of QOSST.
Features
qosst-hal
is the Hardware Abstract Layer. Its goal is to provide a unified interface for the hardware and for the higher classes in order for QOSST to be hardware-agnostic. In particular it includes abstraction layer for
- Analog-to-Digital Converters (ADC);
- Amperemeters;
- Digital-to-Analog Converters (DAC);
- DAC and ADC simultaneous;
- Lasers;
- Modulation Bias Controllers;
- Polarisation Controllers;
- Powermeters;
- Power supplies;
- Switches (optical switches);
- Variable Optical Attenuators (VOA);
- Voltmeters.
Installation
The module can be installed with the following command:
pip install qosst-hal
It is also possible to install it directly from the github repository:
pip install git+https://github.com/qosst/qosst-hal
It also possible to clone the repository before and install it with pip or poetry
git clone https://github.com/qosst/qosst-hal
cd qosst-alice
poetry install
pip install .
Documentation
The whole documentation can be found at https://qosst-hal.readthedocs.io/en/latest/
Usage
qosst-hal
is not supposed to be used as a standalone package, but should be used to code your own hardware classes. There is a tutorial in the documentation on how to code your own hardware, but the basic idea is to subclass the basic hardware class and implement the abstract method of the abstract class. Here is an example on how to do with a VOA class for instance:
from qosst_hal.voa import GenericVOA
class MyVOA(GenericVOA):
# According to the documentation, the VOA class should implement
# open, set_value and close
location: str
inst: Whatever
def __init__(self, location:str):
self.location = location
def open(self) -> None:
self.inst = Whatever(self.location)
def set_value(self, value:float) -> None:
self.write(value)
def close(self) -> None:
self.inst.close()
The list of methods that should be implemented for each abstract class can be found in the code, or in the documentation.
Important: no actual implementations are released with QOSST.
License
As for all submodules of QOSST, qosst-hal
is shipped under the Gnu General Public License v3.
Contributing
Contribution are more than welcomed, either by reporting issues or proposing merge requests. Please check the contributing section of the QOSST project fore more information.
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
Built Distribution
File details
Details for the file qosst_hal-0.10.0.tar.gz
.
File metadata
- Download URL: qosst_hal-0.10.0.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.7-arch1-2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d89eaa32c8e3abe3a99b50035d4e3cf3a533bdb058719d69f7fcf7a09be054c5 |
|
MD5 | e2f3dea908ee340893b173ffa3703c04 |
|
BLAKE2b-256 | 798bf21be52dc0431a2fb4389b0adf21aa6e6b16c650bef92386c7ad00a87018 |
File details
Details for the file qosst_hal-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: qosst_hal-0.10.0-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.7-arch1-2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16ba2a0e5d40f5fed4232d9cd21543ef0d5b013a2e677c578b746227a01aa16e |
|
MD5 | 17a782db59458584de8ff4fa192b2bf4 |
|
BLAKE2b-256 | 51f21664bd847da77b27086ea4ec6207078068d65c4e4499adb1f0bdc0b70386 |