Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahlner/sparkplug-rs
Sparkplug protobuf bindings for Rust
https://github.com/ahlner/sparkplug-rs
mqtt protobuf rust sparkplug
Last synced: 6 days ago
JSON representation
Sparkplug protobuf bindings for Rust
- Host: GitHub
- URL: https://github.com/ahlner/sparkplug-rs
- Owner: ahlner
- License: epl-2.0
- Created: 2022-03-12T12:27:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T18:31:14.000Z (over 2 years ago)
- Last Synced: 2024-12-01T16:54:15.263Z (about 1 month ago)
- Topics: mqtt, protobuf, rust, sparkplug
- Language: Rust
- Homepage: https://docs.rs/sparkplug-rs/
- Size: 80.1 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
sparkplug-rs
![License](https://img.shields.io/crates/l/sparkplug-rs)
[![Latest Version](https://img.shields.io/crates/v/sparkplug-rs.svg)](https://crates.io/crates/sparkplug-rs)
[![Documentation](https://docs.rs/sparkplug-rs/badge.svg)](https://docs.rs/sparkplug-rs)
[![Issues](https://img.shields.io/github/issues/ahlner/sparkplug-rs)](https://github.com/ahlner/sparkplug-rs/issues)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fahlner%2Fsparkplug-rs.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fahlner%2Fsparkplug-rs?ref=badge_shield)Rust protobuf payload for Sparkplug™.
The structs are generated with the protobuf IDL of the [`Eclipse Tahu`] project. For more information
look at the homepage of the [`Eclipse Sparkplug project`].[`Eclipse Tahu`]: https://github.com/eclipse/tahu/blob/master/sparkplug_b/sparkplug_b.proto
[`Eclipse Sparkplug project`]: https://sparkplug.eclipse.org## MQTT Topic Names
This crate provides a convenient way to handle MQTT topic names with [TopicName].
[TopicName]: https://docs.rs/sparkplug-rs/latest/sparkplug_rs/enum.TopicName.html
## Examples
```rust
# use std::str::FromStr;
# use sparkplug_rs::{NodeMessageType, TopicName, TopicNamespace};
let node = TopicName::new_node_message(TopicNamespace::SPBV1_0,
"my_group".to_string(),
NodeMessageType::NBIRTH,
"nodeId".to_string());
assert_eq!(node.to_string(), "spBv1.0/my_group/NBIRTH/nodeId");let topic: TopicName = TopicName::from_str("spBv1.0/my_group/NBIRTH/nodeId").unwrap();
assert_eq!(topic, node);
```License: EPL-2.0
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fahlner%2Fsparkplug-rs.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fahlner%2Fsparkplug-rs?ref=badge_large)