Crates.io | locodrive |
lib.rs | locodrive |
version | 0.1.2 |
source | src |
created_at | 2022-09-04 21:54:33.221379 |
updated_at | 2022-09-19 16:38:28.315548 |
description | A model railroad connection handler to read message from and write messages to serial port. |
homepage | https://github.com/juhu1705/locodrive |
repository | https://github.com/juhu1705/locodrive |
max_upload_size | |
id | 658470 |
size | 194,886 |
A rust library for controlling a model train railroad system.
Feature | Description | Status |
---|---|---|
Sending control | Control of sending messages to the model railroad | DONE |
Receiving control | Possibility to handle received messages | DONE |
Configuration of the connection | Control over the configuration settings of the model railroad connection like BaudRate or FlowControl | DONE |
As rust is able to use GitHub repositories directly as dependencies you can simply add
locodrive = "0.1.1"
to your Cargo.toml
control
: The control feature allows you to access the LocoDriveController
. This struct allows you to read and write messages to a specified serial port on your device.
Therefore, the async runtime tokio
, with the extras tokio-serial
and tokio-util
as well as the bytes
module are needed. Please read the documentation for more information about how to use the LocoDriveController.The LocoDrive has the struct loco_controller::LocoDriveController
made for connecting to a model railroad over a serial port.
This reader will care of parsing received messages correctly before sending them to you.
The documentation is published here
To set up the project yourself please make sure to have rust installed.
To commit to this repository please consider the Contributing rules.
Please note: Always add me to your pull request to test your changes with an active model railroad connection or add some test logs to your commitment.
Dependency | License |
---|---|
tokio-serial | MIT |
tokio-util | MIT |
bytes | MIT |
tokio | MIT |
For getting the needed information about the used protocol I mostly used the rocrail wiki. Thanks for the detailed information.