43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
|
Purpose
|
||
|
=======
|
||
|
This is a testing tool for one proprietary enterprise app which in turn handles aviation lights on top of the wind turbines for aviation safety.
|
||
|
While working on that app it is not always possible to use real devices (so called light controllers).
|
||
|
|
||
|
Thus the purpose of this tool to help with development via simulating those devices.
|
||
|
Communication with controllers is built upon **MODBUS** protocol via TCP/IP.
|
||
|
|
||
|
The name ``abibas`` is more like a joke implying that it is not real devices but the simulated ones.
|
||
|
The tool consists of two parts - simulator (implemented using **pyModbusTCP**) and UI interface to it for configuration and monitoring (implemented using **Flask**)
|
||
|
|
||
|
Type ``abibas`` in terminal to run the tool after installation
|
||
|
Type Ctrl+C to cancel (or stop) the tool
|
||
|
After stopping it a table will be printed out with some stats info
|
||
|
|
||
|
Requires **python3.10** and above
|
||
|
|
||
|
Licensed under **GPLv3** license
|
||
|
|
||
|
|
||
|
Setup & debug
|
||
|
=============
|
||
|
+ clone the repo and cd to the cloned dir
|
||
|
+ ``python3.11 -m venv .venv``
|
||
|
+ ``source .venv/bin/activate``
|
||
|
+ ``pip install build``
|
||
|
+ ``python -m build``
|
||
|
+ ``pip install -e .``
|
||
|
+ ``pip list`` (pip show abibas, pip uninstall abibas, etc)
|
||
|
|
||
|
At this stage the package is installed in editable mode, to run it in debug mode:
|
||
|
|
||
|
+ ``abibas-debug``
|
||
|
|
||
|
or in normal mode:
|
||
|
|
||
|
+ ``abibas``
|
||
|
|
||
|
If in debug mode changes made to the Flask app will be applied automatically at runtime,
|
||
|
for the changes in simulator though the tool has to be restarted.
|
||
|
|
||
|
**main** module can be manipulated for debugging purposes as well
|