Skip to main content

ember_plus/
lib.rs

1//! # Ember+ Protocol Implementation for Rust
2//!
3//! A complete implementation of Lawo's Ember+ control protocol.
4//!
5//! Ember+ is a control protocol used in broadcast and professional audio
6//! equipment, providing a tree-based data structure for parameters, nodes,
7//! functions, and matrices.
8//!
9//! ## Features
10//!
11//! - **S101 Framing**: Transport layer protocol for message framing
12//! - **BER Codec**: ASN.1 Basic Encoding Rules implementation
13//! - **Glow DTD**: Complete Ember+ schema type definitions
14//! - **Client (Consumer)**: Connect to Ember+ providers
15//! - **Server (Provider)**: Host an Ember+ tree for consumers
16//! - **Async/Await**: Built on Tokio for async networking
17//!
18//! ## Quick Start
19//!
20//! ### Client Example
21//!
22//! ```rust,no_run
23//! use ember_plus::{EmberClient, Result};
24//!
25//! #[tokio::main]
26//! async fn main() -> Result<()> {
27//!     let mut client = EmberClient::connect("192.168.1.100:9000").await?;
28//!     
29//!     // Get the root directory
30//!     let tree = client.get_directory().await?;
31//!     
32//!     // Get element by path
33//!     let node = client.get_element_by_path("0.1.2").await?;
34//!     
35//!     Ok(())
36//! }
37//! ```
38//!
39//! ### Server Example
40//!
41//! ```rust,no_run
42//! use ember_plus::{EmberServer, EmberValue, Result};
43//! use ember_plus::tree::TreeNode;
44//!
45//! #[tokio::main]
46//! async fn main() -> Result<()> {
47//!     let mut server = EmberServer::bind("0.0.0.0:9000").await?;
48//!     
49//!     // Build your tree
50//!     let root = TreeNode::new_node(0);
51//!     server.init(root).await;
52//!     
53//!     // Run the server
54//!     server.run().await?;
55//!     
56//!     Ok(())
57//! }
58//! ```
59
60#![warn(missing_docs)]
61#![warn(rust_2018_idioms)]
62
63pub mod error;
64pub mod ber;
65pub mod s101;
66pub mod glow;
67pub mod types;
68pub mod tree;
69pub mod client;
70pub mod server;
71pub mod codec;
72
73pub use error::{Error, Result};
74pub use types::*;
75pub use tree::*;
76pub use client::EmberClient;
77pub use server::EmberServer;