How battery-data-alliance/pyctiarbin works
Project type and purpose
• This is an open-source Python library (not a full-stack web app) whose core job is to provide a high-level “CyclerInterface” and “ChannelInterface” over TCP to Arbin cyclers via their Console TCP/IP Interface (CTI).
• It also includes an “ArbinSpoofer” local TCP server for testing in lieu of a real cycler.
File structure
• Top Level
– .github/workflows: CI pipelines (Release, testing)
– docs/: user and protocol docs + pydoc-generated API docs
– pyctiarbin/ : the library package
– tests/: test suite, including example messages and spoofer tests
– demo_notebook.ipynb: usage demo
• pyctiarbin/ sub-packages
– arbinspoofer/: server emulator (ArbinSpoofer)
– channel_interface.py: ChannelInterface class (read/write per‐channel)
– cycler_interface.py: CyclerInterface class (read‐only cycler status)
– messages.py: message definitions, (de)serialization for CTI protocol
README for additional insights
• Two main client classes: CyclerInterface & ChannelInterface
• Configuration via dict + .env for credentials
• Underlying communications: raw TCP sockets, protocol messages
• Testing via ArbinSpoofer