f289ctrl/
lib.rs

1//!
2//! This library provides communication with a Fluke 287/289 digital multimeter.
3//!
4//! <br>
5//!
6//! # Details
7//!
8//! - You need a Fluke IR cable attached to your DMM.
9//!
10//! - Basic setup and connection
11//!
12//!   ```
13//!   use f289ctrl::{Device, DEFAULT_BAUDRATE};
14//!   #[tokio::main]
15//!   async fn main() -> f289ctrl::Result<()> {
16//!       let path = "/dev/ttyUSB0".to_string();
17//!       let mut device = Device::new(&path, DEFAULT_BAUDRATE)?;
18//!       eprintln!("Connected to: {}\n", device.ident().await?.model);
19//!       Ok(())
20//!   }
21//!   ```
22//!
23//! # Supported devices
24//!
25//!  * Fluke 287
26//!  * Fluke 289
27//!
28
29pub mod device;
30pub mod measurement;
31pub mod proto;
32pub mod rawmea;
33
34pub use device::Device;
35pub use proto::Result;
36
37#[cfg(unix)]
38pub const DEFAULT_TTY: &str = "/dev/ttyUSB0";
39#[cfg(windows)]
40pub const DEFAULT_TTY: &str = "COM1";
41
42/// Default Baudrate for Fluke 287 and 289.
43pub const DEFAULT_BAUDRATE: u32 = 115200;