Water quality monitor can binding jsonrpc
🚧 Work In Progress 🚧
protocol:jsonrpc
Auf GitHub
cargo add jsonrpc-core
cargo add jsonrpc-deliveTesting: Read analog1 in01
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "analog_get_in01", "id":123 }' 127.0.0.1:3030
Requires Rust nightly. To compile using rustup:
$ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
$ rustup toolchain install nightly
$ rustup default nightly
$ cargo buildBe sure to switch back to stable with rustup default stable if that's your preferred toolchain.
To cross-compile for the Raspberry Pi you will need an
gcc-multilib-i686-linux-gnu GCC toolchain and Rust component installed. Add the Rust target
with rustup target add i686-unknown-linux-gnu. Then you can
cross-compile with cargo:
cargo build --release --target i686-unknown-linux-gnutarget/i686-unknown-linux-gnu/release/wqm-uv
- Work List: https://
- API docs: https://lar-ag/github.io/canrpc/ra_ide_api/index.html
- CI: https://travis-ci.org/rust-analyzer/rust-analyzer
[socketcan] crate.
Integrating the test into a CI system is non-trivial as it relies on a vcan0 virtual can device existing. Adding one to most linux systems is pretty easy with root access but attaching a vcan device to a container for CI seems difficult to find support for.
To run the tests locally, though, setup should be simple:
sudo modprobe vcan
sudo ip link add vcan0 type vcan
sudo ip link set vcan0 up
cargo test