tokio-lxi

Crates.iotokio-lxi
lib.rstokio-lxi
version0.2.2
sourcesrc
created_at2019-02-12 07:39:20.188527
updated_at2021-08-24 13:47:46.659888
descriptionLXI protocol abstractions for Tokio
homepagehttps://github.com/agerasev/tokio-lxi
repositoryhttps://github.com/agerasev/tokio-lxi.git
max_upload_size
id114263
size44,234
Sam Demin (nthend)

documentation

https://docs.rs/tokio-lxi

README

tokio-lxi

Crates.io Docs.rs Github Actions Appveyor Codecov.io License

LXI protocol abstractions for Tokio with async/.await support.

Example

use tokio;

use tokio_lxi::LxiDevice;

#[tokio::main]
async fn main() -> Result<(), tokio_lxi::Error> {
    let addr = "10.0.0.9:5025".parse().unwrap();
    let mut device = LxiDevice::connect(&addr).await?;
    device.send("*IDN?").await?;
    let reply = device.receive().await?;
    println!("{}", reply);

    Ok(())
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 15

cargo fmt