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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! [![github]](https://github.com/dannydulai/libwing) [![crates-io]](https://crates.io/crates/libwing) [![docs-rs]](https://docs.rs/libwing)
//!
//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
//!
//! # Libwing SDK Documentation
//!
//! Libwing is a C++ library for interfacing with Behringer Wing digital mixing
//! consoles. It provides functionality for discovering Wing consoles on the
//! network, connecting to them, reading/writing console parameters, and receiving
//! any changes made on the mixer itself.
//!
//! There is a C wrapper for this library. It generally follows the C++ API. You
//! can find it in `wing_c_api.h`.
//!
//! ## Basic Concepts
//!
//! The Wing console exposes its functionality through a tree of nodes. Each node has:
//! - A unique numeric ID
//! - A hierarchical path name (like a filesystem path)
//! - A type (string, float, integer, enum, etc.)
//! - Optional min/max values and units
//! - Read/write or read-only access
//!
//! ## Getting Started
//!
//! ### Connecting
//! If you have a Wing's IP address, you can connect to it:
//!
//! ```rust
//! WingConsole wing = WingConsole::connect(Some("192.168.1.100"));
//! ```
//!
//! or just run with no IP address to discover the first Wing console on the network:
//!
//! ```rust
//! WingConsole wing = WingConsole::connect(None);
//! ```
//!
//! There is also `WingConsole::scan()` which can be used to scan for Wing mixers.
//!
//! ### Communication Model
//!
//! - You can request properties from the Wing device using `WingConsole.request_node_data()`,
//! which will result in a `WingResponse::NodeData` being sent if your request was for a valid
//! property. Note that you may get other properties as well, as the Wing device will send
//! unsolicited property changes, so you may need to filter for your specific property change.
//! After the NodeData is sent (or not), the Wing device will send a `WingResponse::RequestEnd`
//! message.
//!
//! - You can request node definitions using `WingConsole::request_node_definition()`, which cause
//! a `WingResponse::NodeDef` message to be read. **wingschema** uses this request to dump the
//! schema. Again, unsolicited messages may be sent, so you may need to filter for your specific
//! NodeDef. After the NodeDef is sent (or not), the Wing device will send a `WingResponse::RequestEnd`
//!
//! - You can set properties using the `WingConsole::set_*()` functions. These do not send any
//! response back.
//!
//! - `WingConsole::read()` will block and return you messages from the Wing mixer as they come in.
//! If the device is modified either physically or via another user of the API, the Wing device
//! sends unsolicited `WingResponse::NodeData(id, data)` messages.
//!
//! - `WingConsole::request_meter()` will ask the Wing to start sending meter level data (the
//! bouncing green/yellow/red level lights on the mixer). It returns an u16 ID corresponding to
//! this request. This ID will returned when you read the meters data.
//!
//! - `WingConsole::read_meters()` will block and return you messages from the Wing mixer as they
//! come in. It includes the ID returned from the `request_meter()` call for you to help correlate.
//!
//! All these calls are thread safe.
pub use ;
pub use ;
pub use ;
type Result<T> = Result;