Metadata-Version: 2.4
Name: eismultiplexer
Version: 1.6.6
Author: Carl Philipp Klemm
License-Expression: LGPL-2.0-or-later
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: libusb-package
Dynamic: author
Dynamic: license-file
Dynamic: requires-python

# libeismultiplexerpy

**Python bindings for the `libeismultiplexer` C library**

`libeismultiplexerpy` provides a thin, high‑level wrapper around the native library
`libeismultiplexer` that controls RHD eismultiplexer devices.
The functionality is implemented in C++ using pybind11.

---

## Installation

The package can be installed from pypi:

```bash
pip install eismultiplexer
```

The package can be also built and installed from source using the standard Python
build workflow:

```bash
# Build and install the package in editable mode
pip install -e .
```

---

## Quick start

```python
from libeismultiplexer import Multiplexer, Channel, TriggerState

# Connect to the first device
mux = Multiplexer()
# Connect to device with serial number 12
mux2 = Multiplexer(12)

# Connect a channel and set the first trigger to output logic high
mux.connectChannel(Channel.A)
mux.setTriggerState(0, TriggerState.HIGH)

print("Channel count:", mux.getChannelCount())
print("Connected channels:", mux.getConnected())
```

For a more complete example see the `examples/example.py` script.

---

## API reference

The public symbols are re‑exported from the compiled ``_core`` module:

- :class:`Multiplexer` – high‑level class that wraps a ``eismultiplexer`` device.
- :class:`Channel` – enumeration of available channels (A‑H).
- :class:`TriggerState` – enumeration of trigger states (HIGH, LOW, INPUT).
- :class:`TriggerWaitType` – enumeration for waiting on trigger events.

Refer to the source code in ``src/main.cpp`` or the python docstrings for the exact method signatures.

---

## License

`libeismultiplexerpy` and `libeismultiplexer` is licensed LGPL‑2.0‑or‑later.
