l6t_symbolic/
model.rs

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

pub struct DataModel {
    pub floats_as_ints: bool,
    pub groups: Vec<Group>,
}

#[derive(Clone)]
pub struct Group {
    pub name: String,
    pub slots: Vec<Slot>
}

#[derive(Clone)]
pub struct Slot {
    pub fixed_slot: Option<u32>,
    pub fixed_model: Option<u32>,
    pub fixed_enable: Option<bool>,
    pub params: Vec<Param>
}

#[derive(Clone, Eq, PartialEq)]
pub enum ParamType {
    Int,
    Float,
    Bool
}

#[derive(Clone)]
pub enum Param {
    SlotModel {
        name: String,
    },
    SlotEnable {
        name: String,
    },
    Param {
        name: String,
        param_id: u32,
        param_type: ParamType
    },
    FixedParam {
        name: String,
        param_value: u32,
        param_type: ParamType,
        slot_id: Option<u32>
    },
    IgnoreParam {
        param_id: u32,
    }
}