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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
use juniper::GraphQLObject;
#[derive(GraphQLObject)]
pub struct GenericResponse {
pub errors: String,
pub success: bool,
}
#[derive(GraphQLEnum, Clone, Copy)]
pub enum AckCommand {
None,
Noop,
SetSystemConfig,
SetBatteryConfig,
Reboot,
SaveBattConfig,
SystemConfigReset,
BatteryConfigReset,
ResetCounters,
SetEpsChannels,
EpsSetMPPTmode,
EpsSetMPPTLevel,
EpsHeaterToggle,
EpsWatchDog,
TestHardware,
IssueRawCommand,
}
#[derive(GraphQLObject)]
pub struct RawCommandResponse {
pub errors: String,
pub success: bool,
pub response: String,
}
#[derive(GraphQLObject)]
#[doc(hidden)]
pub struct SchEpsSystemConfig {
pub ppt_mode: i32,
pub battheater_mode: i32,
pub battheater_low: i32,
pub battheater_high: i32,
pub output_normal_value: Vec<i32>,
pub output_safe_value: Vec<i32>,
pub output_initial_on_delay: Vec<i32>,
pub output_initial_off_delay: Vec<i32>,
pub vboost_settings: Vec<i32>,
}
#[derive(GraphQLObject)]
#[doc(hidden)]
pub struct SchEpsBatteryConfig {
pub batt_maxvoltage: i32,
pub batt_safevoltage: i32,
pub batt_criticalvoltage: i32,
pub batt_normalvoltage: i32,
pub reserved1: Vec<i32>,
pub reserved2: Vec<i32>,
}
#[derive(GraphQLObject)]
#[doc(hidden)]
pub struct SchEpsHk {
pub vboost: Vec<i32>,
pub vbatt: i32,
pub curin: Vec<i32>,
pub cursun: i32,
pub cursys: i32,
pub reserved1: i32,
pub curout: Vec<i32>,
pub output: Vec<i32>,
pub output_on_delta: Vec<i32>,
pub output_off_delta: Vec<i32>,
pub latchup: Vec<i32>,
pub wdt_i2c_time_left: i32,
pub wdt_gnd_time_left: i32,
pub wdt_csp_pings_left: Vec<i32>,
pub counter_wdt_i2c: i32,
pub counter_wdt_gnd: i32,
pub counter_wdt_csp: Vec<i32>,
pub counter_boot: i32,
pub temp: Vec<i32>,
pub boot_cause: i32,
pub batt_mode: i32,
pub ppt_mode: i32,
pub reserved2: i32,
}