Crates.io | tokio-lxi |
lib.rs | tokio-lxi |
version | 0.2.2 |
source | src |
created_at | 2019-02-12 07:39:20.188527 |
updated_at | 2021-08-24 13:47:46.659888 |
description | LXI protocol abstractions for Tokio |
homepage | https://github.com/agerasev/tokio-lxi |
repository | https://github.com/agerasev/tokio-lxi.git |
max_upload_size | |
id | 114263 |
size | 44,234 |
LXI protocol abstractions for Tokio with async
/.await
support.
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(())
}
Licensed under either of
at your option.
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.