1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! IDN UDP receiver server.
//!
//! Hosts an IDN protocol UDP server that can accept incoming laser point
//! streams from IDN clients (e.g. TouchDesigner, `laser-dac` senders, or
//! the bundled `idn-simulator`). Consumers implement [`ServerBehavior`] to
//! react to discovery commands, frame data, and parsed point streams.
//!
//! Behind the `receiver` feature flag — disabled by default.
//!
//! # Example
//!
//! ```ignore
//! use laser_dac::receiver::{IdnServer, ServerConfig, ServerBehavior, ReceivedPoint};
//!
//! struct MyBehavior;
//!
//! impl ServerBehavior for MyBehavior {
//! fn should_respond(&self, _command: u8) -> bool { true }
//! fn get_status_byte(&self) -> u8 { 0x01 }
//! fn get_ack_result_code(&self) -> u8 { 0x00 }
//!
//! fn on_points_received(&mut self, points: &[ReceivedPoint]) {
//! for p in points {
//! println!("({}, {}) rgb=({}, {}, {})", p.x, p.y, p.r, p.g, p.b);
//! }
//! }
//! }
//!
//! fn main() -> std::io::Result<()> {
//! let config = ServerConfig::new("MyReceiver");
//! let server = IdnServer::new(config, MyBehavior)?;
//! let _handle = server.spawn();
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;