Metadata-Version: 2.1
Name: caen_libs
Version: 1.0.0rc3
Summary: Official Python wrapper for CAEN VMELib, CAEN Comm, CAEN PLU and CAEN HV Wrapper libraries.
Author: Giovanni Cerretani
Project-URL: Homepage, https://www.caen.it
Project-URL: Support, https://www.caen.it/mycaen/support/
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: COPYING
License-File: COPYING.LESSER

# caen_libs
Official Python wrapper for CAEN VMELib, CAEN Comm, CAEN PLU and CAEN HV Wrapper libraries.

## Install
You need to install the latest version of the libraries from [the CAEN website](https://www.caen.it/subfamilies/software-libraries/).

Then, install this module and have fun.

## Examples
This example show the simplest way to read some registers using the CAEN Comm:

```python
from caen_libs import caencomm as comm


print(f'CAEN Comm wrapper loaded (lib version {comm.lib.sw_release()})')

conn_type = comm.ConnectionType.USB
link_number = 0
conet_node = 0
vme_ba = 0

with comm.Device.open(conn_type, link_number, conet_node, vme_ba) as device:
    # Assuming to be connected to a CAEN Digitizer 1.0
    serial_byte_1 = device.read32(0xF080) & 0xFF
    serial_byte_0 = device.read32(0xF084) & 0xFF
    serial_number = (serial_byte_1 << 8) | serial_byte_0
    print(f'Connected to device with serial number {serial_number}')
```

## References
Requirements and documentation can be found at 
https://www.caen.it/subfamilies/software-libraries/.
