Metadata-Version: 2.1
Name: byte_triggers
Version: 0.2.0
Summary: Provides byte (0 to 255) triggers on serial/parallel ports and on LSL streams.
Author-email: Mathieu Scheltienne <mathieu.scheltienne@fcbg.ch>
Maintainer-email: Mathieu Scheltienne <mathieu.scheltienne@fcbg.ch>
License: MIT License
        
        Copyright (c) 2022 Mathieu Scheltienne
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: documentation, https://fcbg-hnp-meeg.github.io/byte-triggers
Project-URL: homepage, https://fcbg-hnp-meeg.github.io/byte-triggers
Project-URL: source, https://github.com/fcbg-hnp-meeg/byte-triggers
Project-URL: tracker, https://github.com/fcbg-hnp-meeg/byte-triggers/issues
Keywords: parallel,python,serial,triggers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mne_lsl
Requires-Dist: numpy>=1.21
Requires-Dist: packaging
Requires-Dist: psutil
Requires-Dist: pyparallel; sys_platform == "linux"
Requires-Dist: pyserial
Provides-Extra: all
Requires-Dist: byte_triggers[build]; extra == "all"
Requires-Dist: byte_triggers[doc]; extra == "all"
Requires-Dist: byte_triggers[style]; extra == "all"
Requires-Dist: byte_triggers[test]; extra == "all"
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Provides-Extra: doc
Requires-Dist: furo; extra == "doc"
Requires-Dist: matplotlib; extra == "doc"
Requires-Dist: memory-profiler; extra == "doc"
Requires-Dist: numpydoc; extra == "doc"
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx-copybutton; extra == "doc"
Requires-Dist: sphinx-design; extra == "doc"
Requires-Dist: sphinx-issues; extra == "doc"
Requires-Dist: sphinx-remove-toctrees; extra == "doc"
Requires-Dist: sphinxcontrib-bibtex; extra == "doc"
Provides-Extra: full
Requires-Dist: byte_triggers[all]; extra == "full"
Provides-Extra: style
Requires-Dist: bibclean; extra == "style"
Requires-Dist: black; extra == "style"
Requires-Dist: codespell; extra == "style"
Requires-Dist: isort; extra == "style"
Requires-Dist: pydocstyle[toml]; extra == "style"
Requires-Dist: ruff; extra == "style"
Requires-Dist: toml-sort; extra == "style"
Requires-Dist: yamllint; extra == "style"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![codecov](https://codecov.io/gh/fcbg-hnp-meeg/byte-triggers/graph/badge.svg?token=rSGaJehUMl)](https://codecov.io/gh/fcbg-hnp-meeg/byte-triggers)
[![tests](https://github.com/fcbg-hnp-meeg/byte-triggers/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/fcbg-hnp-meeg/byte-triggers/actions/workflows/pytest.yml)
[![doc](https://github.com/fcbg-hnp-meeg/byte-triggers/actions/workflows/doc.yml/badge.svg?branch=main)](https://github.com/fcbg-hnp-meeg/byte-triggers/actions/workflows/doc.yml)

# Byte-triggers

Delviers integer triggers between 0 and 255 on a parallel port or on an LSL marker
stream.

## Install

`byte_triggers` is available on [PyPI](https://pypi.org/project/byte_triggers/).

```
pip install byte_triggers
```

## Usage

For the API reference, see the online
[documentation](https://fcbg-hnp-meeg.github.io/byte-triggers).

```
from byte_triggers import LSLTrigger, MockTrigger, ParallelPortTrigger

trigger = MockTrigger()
trigger.signal(1)

trigger = LSLTrigger("MyTrigger")
trigger.signal(1)

# on-board parallel port on linux
trigger = ParallelPortTrigger("/dev/parport0")
trigger.signal(1)

# on-board parallel port on windows
trigger = ParallelPortTrigger(0x4FB8)
trigger.signal(1)

# arduino to parallel port converter
trigger = ParallelPortTrigger("arduino")
trigger.signal(1)
```

# Copyright and license

The code is released under the [MIT License](https://opensource.org/licenses/MIT).
