islabtech_upw_sensor_v1/
lib.rs

1//! client library to connect to ISLabTech UPW Sensor
2//!
3//! Connect to a sensor either with [`connect_via_network`] or with [`connect_via_network_on_port`].
4//!
5//! # Example
6//! ```rust,no_run
7//! use islabtech_upw_sensor_v1::{connect_via_network_on_port, Device, Error};
8//! use tokio;
9//! use std::{thread::sleep, time::Duration};
10//! #[tokio::main]
11//! async fn main() -> Result<(), Error> {
12//!     let sensor = connect_via_network_on_port(
13//!         "192.168.1.123".parse().unwrap(),
14//!         80.into(),          // port
15//!         Default::default(), // TLS
16//!     );
17//!     let status = sensor.system_status().await?;
18//!     println!("{status:?}");
19//!     Ok(())
20//! }
21//! ```
22
23pub mod device;
24pub mod error;
25pub mod measurements;
26pub mod system_status;
27
28pub use device::{connect_via_network, connect_via_network_on_port, Device};
29pub use error::Error;
30pub use measurements::{Measurement, SuccessfulMeasurement};
31pub use system_status::SystemStatus;