Host Device Communication protocol
Project description
The HDC protocol
The purpose of the Host Device Communication protocol is to simplify the communication between the firmware of a device with severely limited computing resources and the software on the computer to which it's connected via a serial communication link, like UART / USB-CDC / Virtual COM Port.
Python implementation of the HDC protocol
The hdcproto package contains the Python implementation of the HDC protocol, and it's mainly meant for the
implementation of HDC-host software.
Implementing HDC-devices in Python offers some interesting possibilities:
- Mocking an HDC-device:
- For demonstration purposes of the HDC-host software, whenever a physical device is not available.
- For testing purposes, to create test-scenarios for the HDC-host software, which would otherwise be difficult to recreate on a physical HDC-device. e.g.: A Continuous Integration build server.
- Implementing an actual HDC-device on sufficiently powerful hardware:
- Because you can. ;-)
- In most cases, though, you would be better off using more conventional technologies like gRPC or RESTful API
WARNING: The HDC-device implementation in the
hdcprotopackage is still work in progress.
Installation
The hdcproto package is currently in pre-alpha stage, thus might be not listed by default in your graphical
package management tool.
You can install it into your project's virtual environment via the usual command:
pip install hdcproto
Attention testers!
Installing from the alternative Test-PyPi repository is a bit trickier:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ hdcproto
Alternatively, if you take care of installing any missing dependency yourself:
pip install --index-url https://test.pypi.org/simple/ --no-deps hdcproto
Usage
The hdcproto.host.proxy module implements generic proxy base-classes that can be used as building blocks to
define proxy-classes that are specific for a given device and provide a convenient API for the HDC-host
software to interact with the HDC-device.
Have a look at the hdcproto.demo.minimal sub-package, where you'll see an example of how
proxy-classes are defined
and
how they are used
to communicate with an HDC-device running the Demo_Minimal firmware example.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hdcproto-0.0.8.tar.gz.
File metadata
- Download URL: hdcproto-0.0.8.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e33ade12951931cb0425a80a445ccb28dce6ca71f6fd564c3c064e86e42aef2
|
|
| MD5 |
92e5edbc333df5e340df81ecdbe9a427
|
|
| BLAKE2b-256 |
fe9610e9b2ce912456ab1e0f9d87198ddfc8e1abd6f9f32403b3195b646fa137
|
File details
Details for the file hdcproto-0.0.8-py3-none-any.whl.
File metadata
- Download URL: hdcproto-0.0.8-py3-none-any.whl
- Upload date:
- Size: 36.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e476e19ce98b1b62e54433968298f723f2f8e35065d2a71c438b8cbde26d765
|
|
| MD5 |
574ac74a74c200f27254222ca99f5bb4
|
|
| BLAKE2b-256 |
6765f46dca328d9b24e02f7456c269e726f0a382962894e4f2cc7c0f2e88c00d
|