zencan_client/
lib.rs

1//! A client for communicating with zencan nodes
2//!
3//! The crate provides utilities for communicating with nodes, including:
4//!
5//! - An [SDO client](SdoClient) for reading/writing a node's object dictionary via it's SDO server
6//! - An [LSS master](LssMaster) for discovering and configuring un-configured nodes with IDs
7//! - A [BusManager] which is intended to be the engine behind an application, such as `zencan-cli`,
8//!   keeping track of nodes, and providing an API for managing them.
9//! - Defining a [NodeConfig](crate::common::node_configuration::NodeConfig) TOML file format, which allows for storing and loading node configuration (primarily
10//!   PDOs, but any objects can be written)
11//!
12//! This library is currently based on tokio/async. The plan is to also include blocking APIs in the
13//! future.
14//!
15//! This should be considered very alpha, with important missing features, and potentially frequent
16//! breaking API changes.
17#![warn(
18    missing_docs,
19    missing_debug_implementations,
20    missing_copy_implementations
21)]
22#![allow(clippy::single_match)]
23#![cfg_attr(docsrs, feature(doc_cfg))]
24
25mod bus_manager;
26mod lss_master;
27pub mod nmt_master;
28mod sdo_client;
29pub use zencan_common as common;
30
31pub use bus_manager::BusManager;
32pub use common::open_socketcan;
33pub use lss_master::{LssError, LssMaster};
34pub use sdo_client::{RawAbortCode, SdoClient, SdoClientError};