Skip to main content

rodecaster_protocol/names/
app.rs

1//! [`AppParam`]: the singleton `APP`-node parameter family.
2
3// The four properties a real Pro II / Duo fullSync carries on the single APP
4// node (confirmed from capture, firmware 1.7.3): companion-app-mode flags.
5// These reflect the device's understanding of the RODE Connect app's current
6// state: used to auto-configure DSP for common companion-app workflows.
7wire_param_enum! {
8    /// A companion-app-mode parameter: one of the flat properties the device
9    /// carries on the singleton `APP` node. Reflects the device's view of
10    /// the RODE Connect app's current mode (compression on, monitor mix
11    /// selection, output device chosen, recording state). Semantics of each
12    /// value are firmware-internal; the crate types the property name only.
13    AppParam {
14    Compression => "appCompression",
15    MonitorMix => "appMonitorMix",
16    OutputDevice => "appOutputDevice",
17    Recording => "appRecording",
18    }
19}
20
21#[cfg(test)]
22mod tests {
23    use super::*;
24
25    #[test]
26    fn app_param_name_round_trips() {
27        let params = [
28            AppParam::Compression,
29            AppParam::MonitorMix,
30            AppParam::OutputDevice,
31            AppParam::Recording,
32        ];
33        for p in params {
34            assert_eq!(AppParam::from_name(p.as_str()), p);
35            assert!(p.is_known());
36        }
37    }
38}