rodecaster_protocol/names/build.rs
1//! [`BuildParam`]: the singleton `BUILD`-node parameter family.
2
3// The five properties a real Pro II / Duo fullSync carries on the single
4// BUILD node (confirmed from capture, firmware 1.7.3): the CallMe library
5// version, plus GUI and mixer module git shas + version strings. All strings.
6// These are read-back only (the wire doesn't accept writes on this node).
7wire_param_enum! {
8 /// A device-wide firmware-build metadata parameter: one of the flat
9 /// properties the device carries on the singleton `BUILD` node.
10 /// Read-back only (the fields are set by the firmware image itself;
11 /// writes are ignored). Includes the CallMe version, and GUI + mixer
12 /// module version strings and git shas: useful for capture-fidelity
13 /// tooling that needs to record the exact firmware build state.
14 BuildParam {
15 CallMeVersion => "buildCallMeVersion",
16 GuiVersion => "buildGuiVersion",
17 GuiModulesGitSha => "buildGuiModulesGitSha",
18 MixerVersion => "buildMixerVersion",
19 MixerModulesGitSha => "buildMixerModulesGitSha",
20 }
21}
22
23#[cfg(test)]
24mod tests {
25 use super::*;
26
27 #[test]
28 fn build_param_name_round_trips() {
29 let params = [
30 BuildParam::CallMeVersion,
31 BuildParam::GuiVersion,
32 BuildParam::GuiModulesGitSha,
33 BuildParam::MixerVersion,
34 BuildParam::MixerModulesGitSha,
35 ];
36 for p in params {
37 assert_eq!(BuildParam::from_name(p.as_str()), p);
38 assert!(p.is_known());
39 }
40 }
41}