qosst-hal


Nameqosst-hal JSON
Version 0.10.0 PyPI version JSON
download
home_pagehttps://github.com/qosst
SummaryHardware Abstraction Layer (HAL) submodule of QOSST
upload_time2024-04-29 12:28:10
maintainerNone
docs_urlNone
authorYoann Piétri
requires_python<3.13,>=3.9
licenseGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # qosst-hal

<center>

![QOSST Logo](qosst_logo_full.png)

</center>

This project is part of [QOSST](https://github.com/qosst/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:

```console
pip install qosst-hal
```

It is also possible to install it directly from the github repository:

```console
pip install git+https://github.com/qosst/qosst-hal
```

It also possible to clone the repository before and install it with pip or poetry

```console
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:

```python
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](https://www.gnu.org/licenses/gpl-3.0.html).

## Contributing

Contribution are more than welcomed, either by reporting issues or proposing merge requests. Please check the contributing section of the [QOSST](https://github.com/qosst/qosst) project fore more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/qosst",
    "name": "qosst-hal",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Yoann Pi\u00e9tri",
    "author_email": "Yoann.Pietri@lip6.fr",
    "download_url": "https://files.pythonhosted.org/packages/79/8b/f21be52dc0431a2fb4389b0adf21aa6e6b16c650bef92386c7ad00a87018/qosst_hal-0.10.0.tar.gz",
    "platform": null,
    "description": "# qosst-hal\n\n<center>\n\n![QOSST Logo](qosst_logo_full.png)\n\n</center>\n\nThis project is part of [QOSST](https://github.com/qosst/qosst).\n\n## Features\n\n`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\n\n* Analog-to-Digital Converters (ADC);\n* Amperemeters;\n* Digital-to-Analog Converters (DAC);\n* DAC and ADC simultaneous;\n* Lasers;\n* Modulation Bias Controllers;\n* Polarisation Controllers;\n* Powermeters;\n* Power supplies;\n* Switches (optical switches);\n* Variable Optical Attenuators (VOA);\n* Voltmeters.\n\n## Installation\n\nThe module can be installed with the following command:\n\n```console\npip install qosst-hal\n```\n\nIt is also possible to install it directly from the github repository:\n\n```console\npip install git+https://github.com/qosst/qosst-hal\n```\n\nIt also possible to clone the repository before and install it with pip or poetry\n\n```console\ngit clone https://github.com/qosst/qosst-hal\ncd qosst-alice\npoetry install\npip install .\n```\n\n## Documentation\n\nThe whole documentation can be found at https://qosst-hal.readthedocs.io/en/latest/\n\n## Usage\n\n`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:\n\n```python\nfrom qosst_hal.voa import GenericVOA\n\nclass MyVOA(GenericVOA):\n    # According to the documentation, the VOA class should implement\n    # open, set_value and close\n    location: str\n    inst: Whatever\n\n    def __init__(self, location:str):\n        self.location = location\n\n    def open(self) -> None:\n        self.inst = Whatever(self.location)\n\n    def set_value(self, value:float) -> None:\n        self.write(value)\n\n    def close(self) -> None:\n        self.inst.close()\n\n```\n\nThe list of methods that should be implemented for each abstract class can be found in the code, or in the documentation.\n\nImportant: no actual implementations are released with QOSST.\n\n## License\n\nAs for all submodules of QOSST, `qosst-hal` is shipped under the [Gnu General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html).\n\n## Contributing\n\nContribution are more than welcomed, either by reporting issues or proposing merge requests. Please check the contributing section of the [QOSST](https://github.com/qosst/qosst) project fore more information.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Hardware Abstraction Layer (HAL) submodule of QOSST",
    "version": "0.10.0",
    "project_urls": {
        "Documentation": "https://qosst-hal.readthedocs.io/",
        "Homepage": "https://github.com/qosst",
        "Repository": "https://github.com/qosst/qosst-hal"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51f21664bd847da77b27086ea4ec6207078068d65c4e4499adb1f0bdc0b70386",
                "md5": "17a782db59458584de8ff4fa192b2bf4",
                "sha256": "16ba2a0e5d40f5fed4232d9cd21543ef0d5b013a2e677c578b746227a01aa16e"
            },
            "downloads": -1,
            "filename": "qosst_hal-0.10.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "17a782db59458584de8ff4fa192b2bf4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 35414,
            "upload_time": "2024-04-29T12:28:09",
            "upload_time_iso_8601": "2024-04-29T12:28:09.372411Z",
            "url": "https://files.pythonhosted.org/packages/51/f2/1664bd847da77b27086ea4ec6207078068d65c4e4499adb1f0bdc0b70386/qosst_hal-0.10.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "798bf21be52dc0431a2fb4389b0adf21aa6e6b16c650bef92386c7ad00a87018",
                "md5": "e2f3dea908ee340893b173ffa3703c04",
                "sha256": "d89eaa32c8e3abe3a99b50035d4e3cf3a533bdb058719d69f7fcf7a09be054c5"
            },
            "downloads": -1,
            "filename": "qosst_hal-0.10.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e2f3dea908ee340893b173ffa3703c04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 23613,
            "upload_time": "2024-04-29T12:28:10",
            "upload_time_iso_8601": "2024-04-29T12:28:10.804578Z",
            "url": "https://files.pythonhosted.org/packages/79/8b/f21be52dc0431a2fb4389b0adf21aa6e6b16c650bef92386c7ad00a87018/qosst_hal-0.10.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 12:28:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qosst",
    "github_project": "qosst-hal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "qosst-hal"
}
        
Elapsed time: 0.24308s