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.1.tar.gz
.
File metadata
- Download URL: gridworks_proactor-0.2.1.tar.gz
- Upload date:
- Size: 50.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3cd9e5ece98cccb74d5f81dfb74e110f4c7dcc9e37367f6b50eb236471845d6 |
|
MD5 | 5d7c8b00e73f2111ec3b465136034e40 |
|
BLAKE2b-256 | 413b6583e28e0428fc3d9eb9df01ddf94f3a1804297dc3a8819595e4fe0a2957 |
File details
Details for the file gridworks_proactor-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: gridworks_proactor-0.2.1-py3-none-any.whl
- Upload date:
- Size: 62.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c738d854642cc12e266bd376307556075172274f9b5bd6b45a6b02b2fc961e |
|
MD5 | 6d68e5d5a0644bb849b1812afd9d9dfd |
|
BLAKE2b-256 | dc19c498a5e24f95a656a583e615c44fadba6adb65ef16da77f773770b749a3a |