Expand description
client library to connect to ISLabTech UPW Sensor
Connect to a sensor either with connect_via_network or with connect_via_network_on_port.
§Example
use islabtech_upw_sensor_v1::{connect_via_network_on_port, Device, Error};
use tokio;
use std::{thread::sleep, time::Duration};
#[tokio::main]
async fn main() -> Result<(), Error> {
let sensor = connect_via_network_on_port(
"192.168.1.123".parse().unwrap(),
80.into(), // port
Default::default(), // TLS
);
let status = sensor.system_status().await?;
println!("{status:?}");
Ok(())
}Re-exports§
pub use device::connect_via_network;pub use device::connect_via_network_on_port;pub use device::Device;pub use error::Error;pub use measurements::Measurement;pub use measurements::SuccessfulMeasurement;pub use system_status::SystemStatus;
Modules§
- device
- The trait
Devicerepresents an UPW Sensor v1 device. - error
- measurements
- system_
status