source: branches/fscctrl_safety_limits/src/HeadersFSC.h@ 18341

Last change on this file since 18341 was 18341, checked in by dneise, 9 years ago
Starting with Current limits: * define limits in config-file, or config-DB * add new state 'OverCurrent' * add some functionality to make SET_VERBOSE look different. (maybe not meant to stay forever)
File size: 1.6 KB
Line 
1#ifndef FACT_HeadersFSC
2#define FACT_HeadersFSC
3
4namespace FSC
5{
6 namespace State
7 {
8 enum states_t
9 {
10 kDisconnected = 1,
11 kConnected = 2,
12 kHighCurrent = 3,
13 kOverCurrent = 0xff+1,
14 };
15 }
16
17 enum {
18 kNumResistanceChannels = 64,
19 kNumResistanceRegs = 8,
20 kNumVoltageChannels = 84,
21 kNumVoltageRegs = 11
22 };
23
24
25 struct BinaryOutput_t
26 {
27 uint8_t ad7719_readings_since_last_muxing;
28 uint8_t ad7719_current_channel;
29 uint32_t ad7719_current_reading;
30 uint8_t ad7719_enables[kNumResistanceRegs];
31 uint8_t ad7719_channels_ready[kNumResistanceRegs];
32 uint32_t ad7719_values[kNumResistanceChannels];
33 uint16_t ad7719_values_checksum;
34
35 uint8_t adc_readings_since_last_muxing;
36 uint8_t adc_current_channel;
37 uint16_t adc_current_reading;
38 uint8_t adc_enables[kNumVoltageRegs];
39 uint8_t adc_channels_ready[kNumVoltageRegs];
40 uint16_t adc_values[kNumVoltageChannels];
41 uint16_t adc_values_checksum;
42
43 uint8_t ad7719_measured_all; // treat it as a bool
44 uint8_t adc_measured_all; // treat it as a bool
45
46 uint8_t app_reset_source;
47 uint32_t time_sec;
48 uint16_t time_ms;
49 } __attribute__((__packed__));
50
51
52 struct SecurityCurrentLimits
53 {
54 double ethernet_switch;
55 double FFC;
56 double FLP;
57 double FAD_digital;
58 double FAD_negative;
59 double FAD_positive;
60 double FPA_digital;
61 double FPA_negative;
62 double FPA_positive;
63 };
64}
65
66#endif
67
Note: See TracBrowser for help on using the repository browser.