-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move rusp-run binary to the main rusp crate and improve all documenta…
…tion Signed-off-by: Daniel Egger <[email protected]>
- Loading branch information
1 parent
01f21d4
commit b0d44af
Showing
6 changed files
with
70 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,80 @@ | ||
![Continuous integration](https://github.com/axiros/rusp/workflows/Continuous%20integration/badge.svg) | ||
|
||
# rusp-bin | ||
# rusp | ||
|
||
This crate contains the application part of Rusp, which contains: | ||
|
||
* A **rusp** binary granting access to library functionality via command line. Included functionality at the moment are: | ||
* A `rusp` application, granting access to library functionality via command line. Included functionality at the moment are: | ||
* Decoding of **USP** Msg Protobuf bytestreams from standard input | ||
* Decoding of **USP** Msg Protobuf bytestreams from file(s) | ||
* Decoding of **USP** Record Protobuf bytestreams from standard input | ||
* Decoding of **USP** Record Protobuf bytestreams from file(s) | ||
* Extraction of **USP** Msg Protobuf bytestreams from the payload of a **USP** Record Protobuf bytestream | ||
* Generation of **USP** Msg Protobuf bytestreams and C char arrays for selected messages and Error | ||
* A `rusp-run` application, providing a simple frontend to the `rhai-rusp` bindings via an embedded [Rhai][] interpreter | ||
|
||
## How to use the rusp binary? | ||
In order to download, compile and install the `rusp` binary it is sufficient to have a stable [Rust][] environment and run: | ||
|
||
``` | ||
# cargo install rusp | ||
``` | ||
|
||
## How to use the `rusp` binary? | ||
|
||
**rusp** includes a binary with the same name demonstrating some of the uses. | ||
|
||
At the moment this mostly allows converting Protobuf encapsulated USP **Record** and **Msg** structures into human-readable text and other useful formats like code and to extracting a **Msg** structure from a **Record**. | ||
|
||
Currently, it also still supports synthesizing USP Records via command line, however this feature is going to be phased out soon in favour of something way better. 😉 | ||
Currently, it also still supports synthesizing USP Records via command line, however this feature is going to be phased out soon in favour of the way more flexible `rhai-rusp`. | ||
|
||
In order to download, compile and install the `rusp` binary it is sufficient to have a stable Rust environment and run: | ||
## How to use the `rhai-rusp` binary? | ||
|
||
We are now also including a simply binary called `rusp-run`, demonstrating how | ||
to embed the bindings and allowing you to execute `Rhai` code directly via | ||
command line, read either from `stdin` or a file. | ||
|
||
``` | ||
# cargo install rusp | ||
# rusp-run --script 'let body = rusp::get_builder().with_max_depth(1).with_params(["Device."]).build(); | ||
let msg = rusp::msg_builder().with_msg_id ("Foo").with_body (body).build(); | ||
print (msg)' | ||
{ | ||
"Header": { | ||
"msg_id": "Foo", | ||
"msg_type": "GET" | ||
}, | ||
"Body": { | ||
"Request": { | ||
"Get": { | ||
"param_paths": [ | ||
"Device." | ||
], | ||
"max_depth": 1 | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
After this you should be able to use the `rusp` binary, which has built-in help for all the commands to guide the way. | ||
|
||
## What else? | ||
|
||
You may use this crate however you like under the **BSD 3-Clause Licence**. | ||
|
||
The toolkit is still far from feature complete but already a big aid in our product development and also helped to find one or the other discrepancy in the standard. | ||
You may use this crate however you like under the [BSD 3-Clause Licence](LICENSE). | ||
|
||
Feel free to spread the word or drop us a note if you like it. Collaboration on this crate is highly welcome as are pull requests in [our GitHub repo](https://github.com/axiros/rusp/). | ||
Feel free to spread the word or drop us a note if you like it. Collaboration on | ||
this crate is highly welcome as are pull requests in [our GitHub | ||
repo](https://github.com/axiros/rusp/). | ||
|
||
## Contact us | ||
|
||
If you are in need of software for **USP** management software (agent, controller or testing) or expertise please get in touch with us via our [web form](https://www.axiros.com). We're also happy to solve all other device management and monitoring needs! | ||
|
||
[Rust]: https://www.rust-lang.org/ | ||
[USP]: https://usp.technology/ | ||
[BBF]: https://www.broadband-forum.org/ | ||
[Axiros]: https://www.axiros.com/ | ||
If you are in need of software for [USP][] management software (agent, | ||
controller or testing) or expertise please get [in touch with us][Axiros]. We're | ||
also happy to solve all other device management and monitoring needs! | ||
|
||
Licence | ||
------- | ||
|
||
[BSD 3-Clause Licence](LICENSE). | ||
|
||
[Rhai]: https://rhai.rs | ||
[Rust]: https://www.rust-lang.org/ | ||
[USP]: https://usp.technology/ | ||
[Axiros]: https://www.axiros.com/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters