machinetalk-protobuf
Protobuf declarations for machinekit messages
This repo is integrated into github.com/machinekit/machinekit as a git subtree.
To change/add to message definitions:
- send a PR against this repo
- add a new remote in your machinekit repo referring to here
- update the subtree in your machinekit repo like so
git remote add machinetalk-protobuf git://github.com/machinekit/machinetalk-protobuf.git
git fetch machinetalk-protobuf
git subtree merge --prefix=src/machinetalk/proto machinetalk-protobuf/master --squash
Now create a PR against the machinekit repo.
Python
Installation via PyPi
To use the Machinetalk protobuf Python modules in your projects, use:
pip install machinetalk-protobuf
Installation from source
Alternatively you can install the Python modules directly from the source code.
make
python setup.py build
sudo python setup.py install
Usage
See examples.
JavaScript (NPM/NodeJS)
Installation
To use machinetalk protobuf definitions in your npm-based projects, use:
npm install --save machinetalk-protobuf
Usage
See examples. If you want to try these examples, be sure to first run npm install in this repository.
Encoding
var machinetalkProtobuf = require('machinetalk-protobuf');
var messageContainer = {
type: machinetalkProtobuf.message.ContainerType.MT_PING
};
var encodedMessageContainer = machinetalkProtobuf.message.Container.encode(messageContainer);
This results in a buffer that starts with 0x08 0xd2 0x01.
Decoding
var machinetalkProtobuf = require('machinetalk-protobuf');
var encodedBuffer = new Buffer([0x08, 0xd2, 0x01]);
var decodedMessageContainer = machinetalkProtobuf.message.Container.decode(encodedBuffer);
This results in a messageContainer like the one defined in Encoding.
JavaScript (Browser)
CDN usage
<script src="//cdn.rawgit.com/machinekit/machinetalk-protobuf/VERSION/dist/machinetalk-protobuf.js"></script>
With VERSION replaced by a valid tag or just master for testing
the latest master build.
Encoding
var messageContainer = {
type: machinetalk.protobuf.message.ContainerType.MT_PING
};
var encodedMessageContainer = machinetalk.protobuf.message.Container.encode(messageContainer);
This results in a buffer that starts with 0x08 0xd2 0x01.
Decoding
var encodedBuffer = new ArrayBuffer([0x08, 0xd2, 0x01]);
var decodedMessageContainer = machinetalk.protobuf.message.Container.decode(encodedBuffer);
This results in a messageContainer like the one defined in Encoding.
Metadata
Release files for machinetalk-protobuf 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| machinetalk-protobuf-1.2.1.tar.gz | 33.4 kB | Without provenance | Details for machinetalk-protobuf-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| machinetalk_protobuf-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for machinetalk_protobuf-1.2.1-py3-none-any.whl |
Total release size: 114.4 kB
Release files / machinetalk-protobuf-1.2.1.tar.gz
| Download URL | machinetalk-protobuf-1.2.1.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
725d7deb7f83b19106f261128766967fe2f5ff774516c0b6085b65b53e51d066
|
|
BLAKE2b-256 checksum How to use checksums |
34f7af843d42d2376b9366dad291849e27d4c07c10c54ad02c6358dfa9a20bc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / machinetalk_protobuf-1.2.1-py3-none-any.whl
| Download URL | machinetalk_protobuf-1.2.1-py3-none-any.whl |
|---|---|
| Size | 81.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c0e7fd8cde4f1e41b60336aef05478d7c691302efa20acef8174d391cee7685
|
|
BLAKE2b-256 checksum How to use checksums |
4db820eb6614bb9c3c08b38be50efd82248c874e2f427ed759b2fc78b413cb2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for machinetalk-protobuf 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.