wireband_edge/lib.rs
1//! wireband-edge — Lightweight Wire.Band client for IoT gateway hardware.
2//!
3//! # Architecture
4//!
5//! ```text
6//! [MQTT broker] ──► MqttConnector ──► WireBandClient ──► Wire.Band backend
7//! (or serial/BLE) classify+frame ring buffer /iot/v1/ingest/batch
8//! delta filter flush loop
9//! retry+backoff
10//! ```
11//!
12//! # Minimal example
13//!
14//! ```no_run
15//! use wireband_edge::client::{WireBandClient, ClientConfig};
16//!
17//! #[cfg(feature = "mqtt")]
18//! use wireband_edge::mqtt::MqttConnector;
19//!
20//! #[tokio::main]
21//! async fn main() {
22//! let client = WireBandClient::new(ClientConfig {
23//! backend_url: "http://localhost:8000".into(),
24//! device_id: "factory-rpi4".into(),
25//! ..Default::default()
26//! });
27//! client.start();
28//!
29//! #[cfg(feature = "mqtt")]
30//! MqttConnector::new("mqtt://localhost:1883", 0.02)
31//! .run(client, vec!["sensors/#".into()])
32//! .await
33//! .unwrap();
34//! }
35//! ```
36
37pub mod classifier;
38pub mod client;
39pub mod error;
40pub mod frame;
41pub mod symbols;
42
43#[cfg(feature = "crypto")]
44pub mod crypto;
45
46#[cfg(feature = "mqtt")]
47pub mod mqtt;
48
49#[cfg(feature = "serial")]
50pub mod serial;
51
52#[cfg(feature = "ble")]
53pub mod ble;
54
55#[cfg(feature = "coap")]
56pub mod coap;
57
58#[cfg(feature = "modbus")]
59pub mod modbus;
60
61#[cfg(feature = "agent")]
62pub mod agent;
63
64#[cfg(feature = "infer-onnx")]
65pub mod infer_onnx;
66
67#[cfg(feature = "infer-tflite")]
68pub mod infer_tflite;
69
70#[cfg(feature = "python")]
71pub mod python;
72
73pub use client::{BufferedEvent, ClientConfig, ClientStats, WireBandClient};
74pub use error::{Result, WireBandError};
75
76#[cfg(feature = "agent")]
77pub use agent::{DeviceTwin, OtaManager, OtaUpdate, Watchdog};