dalybms_lib/
lib.rs

1//! # dalybms_lib
2//!
3//! This crate provides a library for interacting with Daly BMS (Battery Management System) devices.
4//! It offers both synchronous and asynchronous clients for communication.
5//!
6//! ## Features
7//!
8//! - `serialport`: Enables the synchronous client using the `serialport` crate.
9//! - `tokio-serial-async`: Enables the asynchronous client using the `tokio-serial` crate.
10//!
11//! By default, both features are enabled.
12
13/// Contains error types for the library.
14mod error;
15/// Defines the communication protocol for Daly BMS.
16pub mod protocol;
17
18pub use error::Error;
19
20/// Synchronous client for Daly BMS communication.
21#[cfg(feature = "serialport")]
22pub mod serialport;
23
24/// Asynchronous client for Daly BMS communication.
25#[cfg(feature = "tokio-serial-async")]
26pub mod tokio_serial_async;