motorcortex-rust 0.5.0

Motorcortex Rust: a Rust client for the Motorcortex Core real-time control system (async + blocking).
Documentation
//! Rust client for the [Motorcortex] real-time control system.
//!
//! Implements the wire protocol defined by `motorcortex.proto` over
//! NNG + WebSocket Secure: request/reply for parameter access,
//! publish/subscribe for real-time streaming, and the session-token
//! dance that keeps long-lived connections alive through reverse
//! proxies and transient server restarts.
//!
//! Two frontends share one actor-style core:
//!
//! - [`core`] — async (tokio-driven). The recommended surface.
//!   Handles are `Clone + Send + Sync`; multiple tasks share one
//!   connection safely.
//! - [`blocking`] — thin sync wrapper for scripts, tests, and code
//!   that doesn't want a tokio runtime in `main()`. Same method
//!   names and semantics, just without `.await`.
//!
//! # Example — async round-trip
//!
//! ```no_run
//! use motorcortex_rust::core::Request;
//! use motorcortex_rust::{ConnectionOptions, Result};
//!
//! # async fn demo() -> Result<()> {
//! let opts = ConnectionOptions::new("tests/mcx.cert.crt".into(), 5000, 5000);
//! let req  = Request::connect_to("wss://127.0.0.1:5568", opts).await?;
//! req.login("root", "secret").await?;
//! req.request_parameter_tree().await?;
//!
//! let value: f64 = req.get_parameter("root/Control/dummyDouble").await?;
//! println!("{value}");
//!
//! req.disconnect().await?;
//! # Ok(())
//! # }
//! ```
//!
//! See the [`examples/`] directory for blocking, subscribe-latest,
//! and subscribe-stream flavours, and [ARCHITECTURE.md] for the
//! design rationale — actor driver, three-sink subscription model,
//! reconnect + session-token machinery.
//!
//! [Motorcortex]: https://www.vectioneer.com/motorcortex
//! [`examples/`]: https://git.vectioneer.com/pub/motorcortex-rust/-/tree/master/examples
//! [ARCHITECTURE.md]: https://git.vectioneer.com/pub/motorcortex-rust/-/blob/master/ARCHITECTURE.md

pub mod blocking;
mod client;
mod connection;
pub mod core;
mod error;
mod msg;
mod nng_init_threads;
mod nng_logger;
mod parameter_value;
mod time_spec;
mod url;

pub use client::{ParameterTree, Parameters};
pub use connection::ConnectionOptions;
pub use core::ConnectionState;
pub use error::{MotorcortexError, Result};
pub use msg::*;
pub use nng_init_threads::*;
pub use nng_logger::*;
pub use parameter_value::{GetParameterValue, SetParameterValue};
pub use time_spec::TimeSpec;
pub use url::parse_url;