Skip to main content

rodecaster_protocol/names/
fx_preset.rs

1//! [`FxPresetParam`]: per-`FXPRESET`-node parameter family.
2
3// FXPRESET nodes carry two properties per preset (confirmed from capture,
4// firmware 1.7.3): the effect preset's serialized contents blob and its
5// preset index.
6wire_param_enum! {
7    /// A per-effect-preset parameter: the flat properties on each `FXPRESET`
8    /// node. `Contents` is the preset's serialized data (typically a
9    /// pipe-separated or JSON-ish blob); `Idx` is the preset slot ordinal.
10    FxPresetParam {
11    Contents => "fxPresetContents",
12    Idx => "fxPresetIdx",
13    }
14}
15
16#[cfg(test)]
17mod tests {
18    use super::*;
19
20    #[test]
21    fn fx_preset_param_round_trips() {
22        for p in [FxPresetParam::Contents, FxPresetParam::Idx] {
23            assert_eq!(FxPresetParam::from_name(p.as_str()), p);
24            assert!(p.is_known());
25        }
26    }
27}