Metadata-Version: 2.4
Name: absscpi
Version: 1.2.0
Summary: SCPI driver for the Bloomy Controls Advanced Battery Simulator
Project-URL: homepage, https://github.com/BloomyControls/abs-scpi-driver-python
Project-URL: source, https://github.com/BloomyControls/abs-scpi-driver-python
Project-URL: issues, https://github.com/BloomyControls/abs-scpi-driver-python/issues
Project-URL: documentation, https://bloomycontrols.github.io/abs-scpi-driver-python
Author: Bloomy Controls, Inc.
License: Copyright (c) 2024, Bloomy Controls, Inc. All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
Description-Content-Type: text/x-rst

ABS SCPI Python Library (absscpi)
=================================

Python library for SCPI control of the Bloomy Controls ABS.

Features
--------

- TCP, UDP, RS-485, and UDP multicast
- Supports Windows and Linux
- Implements all SCPI commands and queries supported by the ABS
- Automatic device discovery over UDP multicast and RS-485
- Implemented as a wrapper around `the C/C++ library`_ for a consistent
  interface regardless of the language

.. _the C/C++ library: https://github.com/BloomyControls/abs-scpi-driver

Installation
------------

See `docs/installation.rst <docs/installation.rst>`__ for installation
instructions.

Example usage
-------------

.. code:: python

   from absscpi import ScpiClient
   from time import sleep

   with ScpiClient() as client:
       # open a UDP socket
       client.open_udp("192.168.1.100")

       # get general device information
       id = client.get_device_id()
       ident = client.get_device_info()
       print(f"Device ID: {id}")
       print(f"Part numer: {ident.get_part_number()}")
       print(f"Serial number: {ident.get_serial()}")
       print(f"FW version: {ident.get_version()}")

       # command cell 1 to 1.4V
       client.set_cell_voltage(0, 1.4)
       client.set_cell_sourcing(0, 5.0)
       client.set_cell_sinking(0, 5.0)
       client.enable_cell(0, True)

       sleep(0.05)

       # measure cell 1's voltage
       v = client.measure_cell_voltage(0)
       print(f"Cell 1 voltage: {v}")

       client.enable_cell(0, False)

Discussion
----------

If you find any bugs, you can report them on the GitHub `issue tracker`_.

.. _issue tracker:
   https://github.com/BloomyControls/abs-scpi-driver-python/issues
