Gridworks Proactor
Project description
Gridworks Proactor
This packages provides "live actor" and "application monitored communication" infrastructure for the GridWorks SpaceHeat SCADA project. This separation allows the scada code to be more focussed on on application specific details and provides the potential to re-use the "live actor" and "application monitored" infrastructure.
Features
- , a single threaded event loop running on asyncio, for exchanging messages between the main application object, "live actor" subobjects and MQTT clients.
- A communication state ("active" or not) for each external communications link is available to the proactor and
sub-objects. "Active" communications is defined as ALL of the following:
- The underlying communications mechanism (MQTT) is connected.
- All input channels of underlying mechanism (MQTT topics) are established.
- A application messages requiring acknowledgement have been ACKed in timely fashion (by default 5 seconds).
- A message has been received "recently" (by default within 1 minute).
- Reliable delievery of "Events" generated locally. Generated Events are stored locally until they are acknowledged and unacknowledged Events are retransmitted when the "Active" communication state is restored.
- , a test package for development and test environments of projects that implement a class derived from , allowing the derived class to be tested with the base-class tests.
Requirements
Testing requires an MQTT broker. This can be installed on a mac with:
brew install mosquitto
brew services restart mosquitto
Alternatively, the MQTT broker used by tests be controlled by .env file as described in .
Installation
You can install Gridworks Proactor via pip from PyPI:
$ pip install gridworks-proactor
Contributing
Contributions are very welcome. In order to develop, do this:
$ poetry install --all-extras
To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Gridworks Proactor is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gridworks_proactor-0.2.2.tar.gz
.
File metadata
- Download URL: gridworks_proactor-0.2.2.tar.gz
- Upload date:
- Size: 49.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 791435101e7d0a410ff1ca8eb1e5a2308c01c8bdaf3193744bef9908d6778e0d |
|
MD5 | 306dfe2d696e068f05e25e97d9b63218 |
|
BLAKE2b-256 | 8d7caa164effaad27a83383c0162d00b7f51045f4e228a752d287a73016146a0 |
File details
Details for the file gridworks_proactor-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: gridworks_proactor-0.2.2-py3-none-any.whl
- Upload date:
- Size: 60.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ae3c9415671e44470e545e0479934c97d6721561648dc1f516ded5139630c39 |
|
MD5 | f2fe8e9cf1aa3476cca749dda20f3984 |
|
BLAKE2b-256 | d90e5e34cbc936126f3e37e122d1e0135106fa6216d6b3fd5da21805b792ef1b |