KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vars.c
1 /*
2  Process variables source implementation
3 
4  Please do not modify, automagically generated!
5  */
6 #include "pv/vars.h"
7 
8 sys_t sys = {
9 
10 };
11 
12 var_ptr sys_p[17] = {
13  0,
14  &(sys.run_number),
15  &(sys.dom_id),
16  &(sys.time_slice_dur),
17  &(sys.stmach_pktsize),
18  &(sys.pwr_meas),
19  &(sys.hw_date_rev),
20  &(sys.sw_date_rev),
21  &(sys.sys_temp_hum),
22  &(sys.sys_disable),
23  &(sys.sys_run_ena),
24  &(sys.imgtype),
25  &(sys.sys_fail),
26  &(sys.fpga_temp),
27  &(sys.power_temp),
28  &(sys.tdc_ts_fifoc),
29  &(sys.aes_ts_fifoc)
30 };
31 
32 
33 #ifdef PV_META
34 //! Variable ID's
35 const int32_t sys_id[17] = {
36  0,
37  SYS_RUN_NUMBER,
38  SYS_DOM_ID,
39  SYS_TIME_SLICE_DUR,
40  SYS_STMACH_PKTSIZE,
41  SYS_PWR_MEAS,
42  SYS_HW_DATE_REV,
43  SYS_SW_DATE_REV,
44  SYS_SYS_TEMP_HUM,
45  SYS_SYS_DISABLE,
46  SYS_SYS_RUN_ENA,
47  SYS_IMGTYPE,
48  SYS_SYS_FAIL,
49  SYS_FPGA_TEMP,
50  SYS_POWER_TEMP,
51  SYS_TDC_TS_FIFOC,
52  SYS_AES_TS_FIFOC
53 };
54 //! Variable names
55 const char * const sys_name[17] = {
56  "0",
57  "SYS_RUN_NUMBER",
58  "SYS_DOM_ID",
59  "SYS_TIME_SLICE_DUR",
60  "SYS_STMACH_PKTSIZE",
61  "SYS_PWR_MEAS",
62  "SYS_HW_DATE_REV",
63  "SYS_SW_DATE_REV",
64  "SYS_SYS_TEMP_HUM",
65  "SYS_SYS_DISABLE",
66  "SYS_SYS_RUN_ENA",
67  "SYS_IMGTYPE",
68  "SYS_SYS_FAIL",
69  "SYS_FPGA_TEMP",
70  "SYS_POWER_TEMP",
71  "SYS_TDC_TS_FIFOC",
72  "SYS_AES_TS_FIFOC"
73 };
74 #endif
75 
77 
78 };
79 
80 var_ptr net_p[17] = {
81  0,
82  &(net.mac_addr),
83  &(net.ipmux_ports),
84  &(net.ipmux_srv_ip),
85  &(net.ipmux_srv_mac),
86  &(net.sc_port),
87  &(net.wr_delta),
88  &(net.wr_bitslide),
89  &(net.wr_mu),
90  &(net.wr_st_ptp),
91  &(net.wr_st_gen),
92  &(net.wr_st_serv),
93  &(net.cable_rtt),
94  &(net.rx_input_power),
95  &(net.tx_output_power),
96  &(net.wr_temp),
97  &(net.sfp_temp)
98 };
99 
100 
101 #ifdef PV_META
102 //! Variable ID's
103 const int32_t net_id[17] = {
104  0,
105  NET_MAC_ADDR,
106  NET_IPMUX_PORTS,
107  NET_IPMUX_SRV_IP,
108  NET_IPMUX_SRV_MAC,
109  NET_SC_PORT,
110  NET_WR_DELTA,
111  NET_WR_BITSLIDE,
112  NET_WR_MU,
113  NET_WR_ST_PTP,
114  NET_WR_ST_GEN,
115  NET_WR_ST_SERV,
116  NET_CABLE_RTT,
117  NET_RX_INPUT_POWER,
118  NET_TX_OUTPUT_POWER,
119  NET_WR_TEMP,
120  NET_SFP_TEMP
121 };
122 //! Variable names
123 const char * const net_name[17] = {
124  "0",
125  "NET_MAC_ADDR",
126  "NET_IPMUX_PORTS",
127  "NET_IPMUX_SRV_IP",
128  "NET_IPMUX_SRV_MAC",
129  "NET_SC_PORT",
130  "NET_WR_DELTA",
131  "NET_WR_BITSLIDE",
132  "NET_WR_MU",
133  "NET_WR_ST_PTP",
134  "NET_WR_ST_GEN",
135  "NET_WR_ST_SERV",
136  "NET_CABLE_RTT",
137  "NET_RX_INPUT_POWER",
138  "NET_TX_OUTPUT_POWER",
139  "NET_WR_TEMP",
140  "NET_SFP_TEMP"
141 };
142 #endif
143 
145 
146 };
147 
148 var_ptr opt_p[17] = {
149  0,
150  &(opt.chan_config),
151  &(opt.chan_status),
152  &(opt.pmt_highvolt),
153  &(opt.pmt_threshold),
154  &(opt.pmt_id),
155  &(opt.hr_veto_thres),
156  &(opt.nano_enable),
157  &(opt.chan_enable),
158  &(opt.nano_length),
159  &(opt.nano_period),
160  &(opt.nano_volt),
161  &(opt.nano_delay),
162  &(opt.nano_pcount),
163  &(opt.hr_veto_ena_ch),
164  &(opt.mulhit_ena_ch),
165  &(opt.min_tot)
166 };
167 
168 
169 #ifdef PV_META
170 //! Variable ID's
171 const int32_t opt_id[17] = {
172  0,
173  OPT_CHAN_CONFIG,
174  OPT_CHAN_STATUS,
175  OPT_PMT_HIGHVOLT,
176  OPT_PMT_THRESHOLD,
177  OPT_PMT_ID,
178  OPT_HR_VETO_THRES,
179  OPT_NANO_ENABLE,
180  OPT_CHAN_ENABLE,
181  OPT_NANO_LENGTH,
182  OPT_NANO_PERIOD,
183  OPT_NANO_VOLT,
184  OPT_NANO_DELAY,
185  OPT_NANO_PCOUNT,
186  OPT_HR_VETO_ENA_CH,
187  OPT_MULHIT_ENA_CH,
188  OPT_MIN_TOT
189 };
190 //! Variable names
191 const char * const opt_name[17] = {
192  "0",
193  "OPT_CHAN_CONFIG",
194  "OPT_CHAN_STATUS",
195  "OPT_PMT_HIGHVOLT",
196  "OPT_PMT_THRESHOLD",
197  "OPT_PMT_ID",
198  "OPT_HR_VETO_THRES",
199  "OPT_NANO_ENABLE",
200  "OPT_CHAN_ENABLE",
201  "OPT_NANO_LENGTH",
202  "OPT_NANO_PERIOD",
203  "OPT_NANO_VOLT",
204  "OPT_NANO_DELAY",
205  "OPT_NANO_PCOUNT",
206  "OPT_HR_VETO_ENA_CH",
207  "OPT_MULHIT_ENA_CH",
208  "OPT_MIN_TOT"
209 };
210 #endif
211 
213 
214 };
215 
216 var_ptr ins_p[12] = {
217  0,
218  &(ins.ahrs_pitch),
219  &(ins.ahrs_roll),
220  &(ins.ahrs_yaw),
221  &(ins.ahrs_a),
222  &(ins.ahrs_g),
223  &(ins.ahrs_h),
224  &(ins.temp),
225  &(ins.humid),
226  &(ins.ahrs_enable),
227  &(ins.ahrs_valid),
228  &(ins.compass_version)
229 };
230 
231 
232 #ifdef PV_META
233 //! Variable ID's
234 const int32_t ins_id[12] = {
235  0,
236  INS_AHRS_PITCH,
237  INS_AHRS_ROLL,
238  INS_AHRS_YAW,
239  INS_AHRS_A,
240  INS_AHRS_G,
241  INS_AHRS_H,
242  INS_TEMP,
243  INS_HUMID,
244  INS_AHRS_ENABLE,
245  INS_AHRS_VALID,
246  INS_COMPASS_VERSION
247 };
248 //! Variable names
249 const char * const ins_name[12] = {
250  "0",
251  "INS_AHRS_PITCH",
252  "INS_AHRS_ROLL",
253  "INS_AHRS_YAW",
254  "INS_AHRS_A",
255  "INS_AHRS_G",
256  "INS_AHRS_H",
257  "INS_TEMP",
258  "INS_HUMID",
259  "INS_AHRS_ENABLE",
260  "INS_AHRS_VALID",
261  "INS_COMPASS_VERSION"
262 };
263 #endif
264 
266 
267 };
268 
269 var_ptr acs_p[4] = {
270  0,
271  &(acs.acou_enable),
272  &(acs.acou_chan),
273  &(acs.acou_res)
274 };
275 
276 
277 #ifdef PV_META
278 //! Variable ID's
279 const int32_t acs_id[4] = {
280  0,
281  ACS_ACOU_ENABLE,
282  ACS_ACOU_CHAN,
283  ACS_ACOU_RES
284 };
285 //! Variable names
286 const char * const acs_name[4] = {
287  "0",
288  "ACS_ACOU_ENABLE",
289  "ACS_ACOU_CHAN",
290  "ACS_ACOU_RES"
291 };
292 #endif
293 
295 
296 };
297 
298 var_ptr bse_p[20] = {
299  0,
300  &(bse.edfa_emi),
301  &(bse.edfa_setp_rd),
302  &(bse.edfa_iop),
303  &(bse.edfa_oop),
304  &(bse.edfa_pumpdc),
305  &(bse.edfa_temp),
306  &(bse.edfa_sn),
307  &(bse.edfa_setp_wr),
308  &(bse.bps_iback),
309  &(bse.bps_i12),
310  &(bse.bps_v375),
311  &(bse.bps_i375),
312  &(bse.bps_v5),
313  &(bse.bps_breaker),
314  &(bse.bps_alarm),
315  &(bse.acdc_volt),
316  &(bse.acdc_cur),
317  &(bse.acdc_temp),
318  &(bse.inst_fail)
319 };
320 
321 
322 #ifdef PV_META
323 //! Variable ID's
324 const int32_t bse_id[20] = {
325  0,
326  BSE_EDFA_EMI,
327  BSE_EDFA_SETP_RD,
328  BSE_EDFA_IOP,
329  BSE_EDFA_OOP,
330  BSE_EDFA_PUMPDC,
331  BSE_EDFA_TEMP,
332  BSE_EDFA_SN,
333  BSE_EDFA_SETP_WR,
334  BSE_BPS_IBACK,
335  BSE_BPS_I12,
336  BSE_BPS_V375,
337  BSE_BPS_I375,
338  BSE_BPS_V5,
339  BSE_BPS_BREAKER,
340  BSE_BPS_ALARM,
341  BSE_ACDC_VOLT,
342  BSE_ACDC_CUR,
343  BSE_ACDC_TEMP,
344  BSE_INST_FAIL
345 };
346 //! Variable names
347 const char * const bse_name[20] = {
348  "0",
349  "BSE_EDFA_EMI",
350  "BSE_EDFA_SETP_RD",
351  "BSE_EDFA_IOP",
352  "BSE_EDFA_OOP",
353  "BSE_EDFA_PUMPDC",
354  "BSE_EDFA_TEMP",
355  "BSE_EDFA_SN",
356  "BSE_EDFA_SETP_WR",
357  "BSE_BPS_IBACK",
358  "BSE_BPS_I12",
359  "BSE_BPS_V375",
360  "BSE_BPS_I375",
361  "BSE_BPS_V5",
362  "BSE_BPS_BREAKER",
363  "BSE_BPS_ALARM",
364  "BSE_ACDC_VOLT",
365  "BSE_ACDC_CUR",
366  "BSE_ACDC_TEMP",
367  "BSE_INST_FAIL"
368 };
369 #endif
370 
371 
372 
374  {
375  .count = 17,
376  .name = "sys",
377  .ptrs = sys_p,
378 #ifdef PV_META
379  .ids = sys_id,
380  .names = sys_name
381 #endif
382  }, {
383  .count = 17,
384  .name = "net",
385  .ptrs = net_p,
386 #ifdef PV_META
387  .ids = net_id,
388  .names = net_name
389 #endif
390  }, {
391  .count = 17,
392  .name = "opt",
393  .ptrs = opt_p,
394 #ifdef PV_META
395  .ids = opt_id,
396  .names = opt_name
397 #endif
398  }, {
399  .count = 12,
400  .name = "ins",
401  .ptrs = ins_p,
402 #ifdef PV_META
403  .ids = ins_id,
404  .names = ins_name
405 #endif
406  }, {
407  .count = 4,
408  .name = "acs",
409  .ptrs = acs_p,
410 #ifdef PV_META
411  .ids = acs_id,
412  .names = acs_name
413 #endif
414  }, {
415  .count = 20,
416  .name = "bse",
417  .ptrs = bse_p,
418 #ifdef PV_META
419  .ids = bse_id,
420  .names = bse_name
421 #endif
422  }
423 };
424 
uint16_t bps_i12
Current of 12V line (0 to 1023 ADC raw)
Definition: vars.h:559
uint32_t hw_date_rev
Hardware revision (YYMMDDBB hex)
Definition: vars.h:118
uint16_t acdc_cur
ACDC Current, between 0 and 2560A.
Definition: vars.h:580
uint8_t inst_fail
Bitmask containing error devices.
Definition: vars.h:593
uint16_t stmach_pktsize
Max packet size in bytes as chopped by the HW-StateMachine.
Definition: vars.h:124
f32_t ahrs_roll
Roll in degrees.
Definition: vars.h:419
int8_t acdc_temp
ACDC Temperature in degrees Centigrade.
Definition: vars.h:589
uint32_t time_slice_dur
Timeslice duration in microseconds.
Definition: vars.h:115
f32_t ahrs_pitch
Pitch in degrees.
Definition: vars.h:416
uint16_t nano_pcount
Nano-beacon pulse train count, each second.
Definition: vars.h:362
uint32_t chan_enable
Channel enable, bit per channel.
Definition: vars.h:338
uint32_t hr_veto_ena_ch
High-rate veto enable, bit per channel.
Definition: vars.h:341
int16_t sfp_temp
SFP module temperature, in 1/100th of a degree.
Definition: vars.h:281
void * bse_p[20]
Pointer look up table for all process variables of Base.
Definition: vars.c:298
uint16_t humid
Humidity in 1/100th RH.
Definition: vars.h:437
uint16_t tx_output_power
Receiver output power in steps of 0.1 uW per count.
Definition: vars.h:275
uint16_t ipmux_srv_mac[3]
Server MAC address, set to 00 to resolve.
Definition: vars.h:263
uint16_t aes_ts_fifoc
AES timestamp fifo count.
Definition: vars.h:143
uint16_t pwr_meas[18]
Power measurement readings.
Definition: vars.h:127
Provides access to all variables of the various subsystems.
uint8_t sys_fail
Failure bitmask, same bits as SYS_DISABLE.
Definition: vars.h:155
uint8_t edfa_sn[32]
Serial number (Ascii string)
Definition: vars.h:586
Structure defining all process variables for subsystem Optics.
Definition: vars.h:329
f32_t ahrs_g[3]
Angular velocity projection, (Index 0=X, 1=Y, 2=Z)
Definition: vars.h:428
bool edfa_emi
Emission.
Definition: vars.h:583
int16_t sys_temp_hum[6]
System temperatures and humidity summery, depreciated All values in 1/100th of a degree or 1/100th of...
Definition: vars.h:131
uint16_t nano_length
Length of pulse in 16 ns ticks, default is 4 ticks.
Definition: vars.h:350
Structure defining all process variables for subsystem System.
Definition: vars.h:105
uint32_t mulhit_ena_ch
Multi-hit enable, bit per channel.
Definition: vars.h:344
uint16_t nano_period
Period of beacon in 16 ns ticks, default is 0xC35 ticks, or 50us.
Definition: vars.h:353
bool acou_enable
Acoustic enable (deprecated, see SYS_RUN_ENA)
Definition: vars.h:484
Structure defining all process variables for subsystem Networking & IPMux.
Definition: vars.h:240
f32_t edfa_setp_wr
Settings for Power Setpoint (in dBm)
Definition: vars.h:553
int16_t power_temp
Power board temperature in 1/100th of a degree.
Definition: vars.h:137
void * opt_p[17]
Pointer look up table for all process variables of Optics.
Definition: vars.c:148
uint8_t pmt_highvolt[31]
High voltage settings per channel, 0=PMT at location 0, 31=PMT at location 31 Scaling: 0: -700V...
Definition: vars.h:372
uint16_t sc_port
Slow control port.
Definition: vars.h:266
uint32_t ipmux_srv_ip
Server IP address (0xAABBCCDD = AA.BB.CC.DD)
Definition: vars.h:249
uint8_t chan_status[31]
Channel status, 0=PMT at location 0, 31=PMT at location 31.
Definition: vars.h:368
uint32_t run_number
The current run number 20160704 Made run number configurable.
Definition: vars.h:109
int8_t wr_st_gen
White Rabbit general state.
Definition: vars.h:287
int32_t edfa_iop
Input Optical Power (in milli dBm)
Definition: vars.h:541
int32_t edfa_temp
Temperature (in milli degrees celsius)
Definition: vars.h:550
Structure defining all process variables for subsystem Base.
Definition: vars.h:535
f32_t ahrs_h[3]
Magnetic field projection, (Index 0=X, 1=Y, 2=Z)
Definition: vars.h:431
sys_t sys
Provides access to all process variables of subsystem System.
Definition: vars.c:8
uint16_t mac_addr[3]
Modules MAC address Encoding, [0xAABB,0xCCDD,0xEEFF] => AA:BB:CC:DD:EE:FF.
Definition: vars.h:256
uint16_t tdc_ts_fifoc
TDC timestamp fifo count.
Definition: vars.h:140
uint8_t compass_version
Compass version: 0 if not available or very old version.
Definition: vars.h:449
uint32_t min_tot
Min ToT.
Definition: vars.h:347
uint32_t hr_veto_thres
High-rate veto (hits per timeslice)
Definition: vars.h:335
uint16_t acdc_volt
ACDC Voltage, between 300 and 556.
Definition: vars.h:577
const subsys_info_t subsys_info[6]
array of subsystem meta objects
Definition: vars.c:373
int16_t temp
Temperature in 1/100th of a degree.
Definition: vars.h:434
uint8_t sys_disable
Disable parts of the system.
Definition: vars.h:146
uint16_t bps_v375
Voltage of 375V line (0 to 1023 ADC raw)
Definition: vars.h:562
uint32_t sw_date_rev
Software revision (YYMMDDBB hex)
Definition: vars.h:121
bool ahrs_valid
Compass data are valid.
Definition: vars.h:443
void * net_p[17]
Pointer look up table for all process variables of Networking & IPMux.
Definition: vars.c:80
acs_t acs
Provides access to all process variables of subsystem Acoustics.
Definition: vars.c:265
uint8_t imgtype
Currently running image type.
Definition: vars.h:152
net_t net
Provides access to all process variables of subsystem Networking & IPMux.
Definition: vars.c:76
int8_t wr_st_ptp
White Rabbit PTP State.
Definition: vars.h:284
int32_t wr_delta[4]
White Rabbit Delta values, where each entry is a delta-value.
Definition: vars.h:252
uint8_t chan_config[31]
Channel configuration (depricated, use CHAN_ENABLE), 0=PMT at location 0, 31=PMT at location 31...
Definition: vars.h:365
uint16_t bps_iback
Backbone current (0 to 1023 ADC raw)
Definition: vars.h:556
f32_t ahrs_a[3]
Acceleration projection, (Index 0=X, 1=Y, 2=Z)
Definition: vars.h:425
uint8_t sys_run_ena
Run-state Enable mask.
Definition: vars.h:149
void * ins_p[12]
Pointer look up table for all process variables of Instrumentation.
Definition: vars.c:216
uint16_t wr_bitslide
White Rabbit Bitslide value.
Definition: vars.h:269
uint16_t rx_input_power
Receiver input power in steps of 0.1 uW per count.
Definition: vars.h:272
int16_t fpga_temp
FPGA core temperature in 1/100th of a degree.
Definition: vars.h:134
uint64_t wr_mu
White Rabbit Round-Trip time.
Definition: vars.h:243
uint8_t acou_res
Acoustic resolution.
Definition: vars.h:490
opt_t opt
Provides access to all process variables of subsystem Optics.
Definition: vars.c:144
uint16_t nano_volt
Nano-beacon voltage in millivolts, 0-30000V.
Definition: vars.h:356
uint16_t nano_delay
Nano-beacon delay in 16 ns ticks.
Definition: vars.h:359
int32_t edfa_oop
Output Optical Power (in milli dBm)
Definition: vars.h:544
ins_t ins
Provides access to all process variables of subsystem Instrumentation.
Definition: vars.c:212
Structure defining all process variables for subsystem Instrumentation.
Definition: vars.h:413
int32_t edfa_pumpdc
Diode Pump Current (in micro A)
Definition: vars.h:547
uint32_t dom_id
DOM identifier.
Definition: vars.h:112
void * sys_p[17]
Pointer look up table for all process variables of System.
Definition: vars.c:12
uint16_t bps_v5
Voltage of 5V line (0 to 1023 ADC raw)
Definition: vars.h:568
bool ahrs_enable
Compass enable (deprecated, see SYS_DISABLE)
Definition: vars.h:440
Structure defining all process variables for subsystem Acoustics.
Definition: vars.h:481
bse_t bse
Provides access to all process variables of subsystem Base.
Definition: vars.c:294
uint32_t pmt_id[31]
All PMT ID's, 0=PMT at location 0, 31=PMT at location 31.
Definition: vars.h:332
int16_t wr_temp
White Rabbit temperature (DS18S20), in 1/100th of a degree.
Definition: vars.h:278
uint16_t bps_i375
Current of 375V line (0 to 1023 ADC raw)
Definition: vars.h:565
void * acs_p[4]
Pointer look up table for all process variables of Acoustics.
Definition: vars.c:269
f32_t ahrs_yaw
Yaw in degrees.
Definition: vars.h:422
uint8_t pmt_threshold[31]
Threshold settings per channel, 0=PMT at location 0, 31=PMT at location 31 Scaling: 0: 800mV...
Definition: vars.h:376
int32_t edfa_setp_rd
Monitored Power Setpoint for APC mode (in milli dBm)
Definition: vars.h:538
uint8_t acou_chan
Acoustics channel config.
Definition: vars.h:487
uint16_t ipmux_ports[4]
IP Mux ports, 0 - TDC, 1 - Accoustics, 2 - Instruments.
Definition: vars.h:259
int64_t cable_rtt
Cable roundtrip time in ps.
Definition: vars.h:246
uint16_t bps_alarm
Alarm Status.
Definition: vars.h:574
bool nano_enable
Enable nano-beacon (deprecated, see SYS_RUN_ENA)
Definition: vars.h:379
uint16_t bps_breaker
Breaker status.
Definition: vars.h:571
int8_t wr_st_serv
White Rabbit servo state.
Definition: vars.h:290