KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vars.h
Go to the documentation of this file.
1 /**
2  * @file
3  *
4  * Provides access to all variables of the various subsystems.
5  *
6  * @note This file has been automatically generated, please do not modify.
7  */
8 #ifndef _VARS_H_
9 #define _VARS_H_
10 
11 #include <stdint.h>
12 #include <stdbool.h>
13 #include "util/float.h"
14 
15 #ifdef DEBUG
16 #define PV_META
17 #endif
18 
19 typedef void * var_ptr;
20 
21 typedef struct {
22  int count;
23  const char * name;
24  var_ptr * ptrs;
25 #ifdef PV_META
26  const int32_t * ids;
27  const char * const * names;
28 #endif
30 
31 #define SUBSYS_COUNT 6
32 //! Total number of variables
33 #define TOTAL_VAR_COUNT 81
34 //! Total number of bytes for all variables
35 #define TOTAL_VAR_SIZE 567
36 //! Total number of configurable variables
37 #define TOTAL_CFG_COUNT 26
38 //! Total number of bytes for configurable variables
39 #define TOTAL_CFG_SIZE 159
40 
41 
42 
43 // ------------------------------------------------------------
44 // Definitions for subsystem System
45 // ------------------------------------------------------------
46 #define SYS_RUN_NUMBER 0x00127000
47 #define SYS_DOM_ID 0x00224000
48 #define SYS_TIME_SLICE_DUR 0x00327000
49 #define SYS_HW_DATE_REV 0x00624000
50 #define SYS_SW_DATE_REV 0x00724000
51 #define SYS_STMACH_PKTSIZE 0x00417000
52 #define SYS_PWR_MEAS 0x00514011
53 #define SYS_PWR_MEAS_12V_CUR 0 //!< Array index of 12 Volt current, in milliamps
54 #define SYS_PWR_MEAS_1V_CUR 1 //!< Array index of 1 Volt current, in milliamps
55 #define SYS_PWR_MEAS_1V8_CUR 2 //!< Array index of 1.8 Volt current, in milliamps
56 #define SYS_PWR_MEAS_2V5_CUR 3 //!< Array index of 2.5 Volt current, in milliamps
57 #define SYS_PWR_MEAS_3V3_CUR 4 //!< Array index of 3.3 Volt current, in milliamps
58 #define SYS_PWR_MEAS_5V_CUR 5 //!< Array index of 5 Volt current, in milliamps
59 #define SYS_PWR_MEAS_3V3PMT_CUR 6 //!< Array index of 3.3 Volt PMT current, in milliamps
60 #define SYS_PWR_MEAS_VLED_CUR 7 //!< Array index of LED current, in milliamps
61 #define SYS_PWR_MEAS_VLED_LVL 8 //!< Array index of LED Voltage level, in millivolts
62 #define SYS_PWR_MEAS_12V_LVL 9 //!< Array index of 12 Volt level, in millivolts
63 #define SYS_PWR_MEAS_TEMP_LVL 10 //!< Array index of Temperature sensor voltage, in millivolts
64 #define SYS_PWR_MEAS_1V_LVL 11 //!< Array index of 1 Volt level, in millivolts
65 #define SYS_PWR_MEAS_1V8_LVL 12 //!< Array index of 1.8 Volt level, in millivolts
66 #define SYS_PWR_MEAS_2V5_LVL 13 //!< Array index of 2.5 Volt level, in millivolts
67 #define SYS_PWR_MEAS_3V3_LVL 14 //!< Array index of 3.3 Volt level, in millivolts
68 #define SYS_PWR_MEAS_5V_LVL 15 //!< Array index of 5 Volt level, in millivolts
69 #define SYS_PWR_MEAS_3V3PMT_LVL 16 //!< Array index of 3.3 Volt level, in millivolts
70 #define SYS_PWR_MEAS_DACCTL_LVL 17 //!< Array index of DAC Control voltage, in millivolts
71 #define SYS_SYS_TEMP_HUM 0x00854005
72 #define SYS_SYS_TEMP_HUM_FPGA 0 //!< Array index of FPGA core temperature
73 #define SYS_SYS_TEMP_HUM_CLB 1 //!< Array index of Temperature (SHT21)
74 #define SYS_SYS_TEMP_HUM_CLB_HUM 2 //!< Array index of Humidity (SHT21)
75 #define SYS_SYS_TEMP_HUM_PWR 3 //!< Array index of Power board temperature (MAX123)
76 #define SYS_SYS_TEMP_HUM_WR 4 //!< Array index of Power board temperature (MAX123)
77 #define SYS_SYS_TEMP_HUM_SFP 5 //!< Array index of SFP Transceiver temperature
78 #define SYS_FPGA_TEMP 0x00d54000
79 #define SYS_POWER_TEMP 0x00e54000
80 #define SYS_TDC_TS_FIFOC 0x00f14000
81 #define SYS_AES_TS_FIFOC 0x01014000
82 #define SYS_SYS_DISABLE 0x00906000
83 #define SYS_SYS_DISABLE_AHRS 0x1 //!< Bit which disables AHRS (Compass) periodic readout
84 #define SYS_SYS_DISABLE_TEMP_HUM 0x2 //!< Bit which disables Temperature / Humidity
85 #define SYS_SYS_DISABLE_HV 0x4 //!< Bit which disables High Voltage
86 #define SYS_SYS_DISABLE_NANO_STEP_UP 0x8 //!< Bit which disables the Nano-beacon step-up regulator
87 #define SYS_SYS_DISABLE_PWR_MEAS 0x10 //!< Bit which disables the power (voltage/current) measurement
88 #define SYS_SYS_RUN_ENA 0x00a07000
89 #define SYS_SYS_RUN_ENA_TDC 0x1 //!< Bit which enables TDC during run
90 #define SYS_SYS_RUN_ENA_ACS 0x2 //!< Bit which enables Acoustics during run
91 #define SYS_SYS_RUN_ENA_MON 0x4 //!< Bit which enables Monitoring during run
92 #define SYS_SYS_RUN_ENA_NANO 0x8 //!< Bit which enables Nano-Beacon during run
93 #define SYS_IMGTYPE 0x00b04000
94 #define SYS_IMGTYPE_GOLDEN 0x1 //!< Golden image running
95 #define SYS_IMGTYPE_DETECTOR 0x2 //!< Detector running
96 #define SYS_IMGTYPE_BASE 0x3 //!< Base image running
97 #define SYS_IMGTYPE_CALIBRATION 0x4 //!< Calibration image running
98 #define SYS_SYS_FAIL 0x00c06000
99 #define SYS_SYS_FAIL_AHRS 0x1 //!< Bit which disables AHRS (Compass) periodic readout
100 #define SYS_SYS_FAIL_TEMP_HUM 0x2 //!< Bit which disables Temperature / Humidity
101 #define SYS_SYS_FAIL_NANO_STEP_UP 0x8 //!< Bit which disables the Nano-beacon step-up regulator
102 #define SYS_SYS_FAIL_PWR_MEAS 0x10 //!< Bit which disables the power (voltage/current) measurement
103 
104 //! Structure defining all process variables for subsystem System.
105 typedef struct {
106 
107  //! The current run number
108  //! 20160704 Made run number configurable
109  uint32_t run_number;
110 
111  //! DOM identifier
112  uint32_t dom_id;
113 
114  //! Timeslice duration in microseconds
115  uint32_t time_slice_dur;
116 
117  //! Hardware revision (YYMMDDBB hex)
118  uint32_t hw_date_rev;
119 
120  //! Software revision (YYMMDDBB hex)
121  uint32_t sw_date_rev;
122 
123  //! Max packet size in bytes as chopped by the HW-StateMachine
124  uint16_t stmach_pktsize;
125 
126  //! Power measurement readings.
127  uint16_t pwr_meas[18];
128 
129  //! System temperatures and humidity summery, depreciated
130  //! All values in 1/100th of a degree or 1/100th of a percent
131  int16_t sys_temp_hum[6];
132 
133  //! FPGA core temperature in 1/100th of a degree
134  int16_t fpga_temp;
135 
136  //! Power board temperature in 1/100th of a degree
137  int16_t power_temp;
138 
139  //! TDC timestamp fifo count
140  uint16_t tdc_ts_fifoc;
141 
142  //! AES timestamp fifo count
143  uint16_t aes_ts_fifoc;
144 
145  //! Disable parts of the system
146  uint8_t sys_disable;
147 
148  //! Run-state Enable mask
149  uint8_t sys_run_ena;
150 
151  //! Currently running image type
152  uint8_t imgtype;
153 
154  //! Failure bitmask, same bits as SYS_DISABLE
155  uint8_t sys_fail;
156 } sys_t;
157 
158 //! Provides access to all process variables of subsystem System.
159 extern sys_t sys;
160 
161 //! Pointer look up table for all process variables of System.
162 extern void * sys_p[17];
163 
164 #ifdef PV_META
165 //! Variable ID's
166 extern const int32_t sys_id[17];
167 
168 //! Variable names
169 extern const char * const sys_name[17];
170 #endif
171 
172 
173 // ------------------------------------------------------------
174 // Definitions for subsystem Networking & IPMux
175 // ------------------------------------------------------------
176 #define NET_WR_MU 0x10834000
177 #define NET_CABLE_RTT 0x10c74000
178 #define NET_IPMUX_SRV_IP 0x10327000
179 #define NET_WR_DELTA 0x10664003
180 #define NET_WR_DELTA_SLAVE_TX 0 //!< Slave transmit delta delay index
181 #define NET_WR_DELTA_SLAVE_RX 1 //!< Slave receive delta delay index
182 #define NET_WR_DELTA_MASTER_TX 2 //!< Master transmit delta delay index
183 #define NET_WR_DELTA_MASTER_RX 3 //!< Master receive delta delay index
184 #define NET_MAC_ADDR 0x10114002
185 #define NET_IPMUX_PORTS 0x10217003
186 #define NET_IPMUX_SRV_MAC 0x10417002
187 #define NET_SC_PORT 0x10517000
188 #define NET_SC_PORT_DEFAULT 0xDACE //!< Default slow control port
189 #define NET_WR_BITSLIDE 0x10714000
190 #define NET_RX_INPUT_POWER 0x10d14000
191 #define NET_TX_OUTPUT_POWER 0x10e14000
192 #define NET_WR_TEMP 0x10f54000
193 #define NET_SFP_TEMP 0x11054000
194 #define NET_WR_ST_PTP 0x10944000
195 #define NET_WR_ST_PTP_INITIALIZING 0 //!< Value of state INITIALIZING
196 #define NET_WR_ST_PTP_FAULTY 1 //!< Value of state FAULTY
197 #define NET_WR_ST_PTP_DISABLED 2 //!< Value of state DISABLED
198 #define NET_WR_ST_PTP_LISTENING 3 //!< Value of state LISTENING
199 #define NET_WR_ST_PTP_PRE_MASTER 4 //!< Value of state PRE_MASTER
200 #define NET_WR_ST_PTP_MASTER 5 //!< Value of state MASTER
201 #define NET_WR_ST_PTP_PASSIVE 6 //!< Value of state PASSIVE
202 #define NET_WR_ST_PTP_UNCALIBRATED 7 //!< Value of state UNCALIBRATED
203 #define NET_WR_ST_PTP_SLAVE 8 //!< Value of state SLAVE
204 #define NET_WR_ST_PTP_UNINITIALIZED -1 //!< Value of state UNINITIALIZED
205 #define NET_WR_ST_GEN 0x10a44000
206 #define NET_WR_ST_GEN_PRESENT 0 //!< Value of state PRESENT
207 #define NET_WR_ST_GEN_S_LOCK 1 //!< Value of state S_LOCK
208 #define NET_WR_ST_GEN_M_LOCK 2 //!< Value of state M_LOCK
209 #define NET_WR_ST_GEN_LOCKED 3 //!< Value of state LOCKED
210 #define NET_WR_ST_GEN_CALIBRATION 4 //!< Value of state CALIBRATION
211 #define NET_WR_ST_GEN_CALIBRATED 5 //!< Value of state CALIBRATED
212 #define NET_WR_ST_GEN_RESP_CALIB_REQ 6 //!< Value of state RESP_CALIB_REQ
213 #define NET_WR_ST_GEN_WR_LINK_ON 7 //!< Value of state WR_LINK_ON
214 #define NET_WR_ST_GEN_TIMER_ARRAY_SIZE 8 //!< Value of state TIMER_ARRAY_SIZE
215 #define NET_WR_ST_GEN_IDLE 9 //!< Value of state IDLE
216 #define NET_WR_ST_GEN_S_LOCK_1 10 //!< Value of state S_LOCK_1
217 #define NET_WR_ST_GEN_S_LOCK_2 11 //!< Value of state S_LOCK_2
218 #define NET_WR_ST_GEN_CALIBRATION_1 12 //!< Value of state CALIBRATION_1
219 #define NET_WR_ST_GEN_CALIBRATION_2 13 //!< Value of state CALIBRATION_2
220 #define NET_WR_ST_GEN_CALIBRATION_3 14 //!< Value of state CALIBRATION_3
221 #define NET_WR_ST_GEN_CALIBRATION_4 15 //!< Value of state CALIBRATION_4
222 #define NET_WR_ST_GEN_CALIBRATION_5 16 //!< Value of state CALIBRATION_5
223 #define NET_WR_ST_GEN_CALIBRATION_6 17 //!< Value of state CALIBRATION_6
224 #define NET_WR_ST_GEN_CALIBRATION_7 18 //!< Value of state CALIBRATION_7
225 #define NET_WR_ST_GEN_CALIBRATION_8 19 //!< Value of state CALIBRATION_8
226 #define NET_WR_ST_GEN_RESP_CALIB_REQ_1 20 //!< Value of state RESP_CALIB_REQ_1
227 #define NET_WR_ST_GEN_RESP_CALIB_REQ_2 21 //!< Value of state RESP_CALIB_REQ_2
228 #define NET_WR_ST_GEN_RESP_CALIB_REQ_3 22 //!< Value of state RESP_CALIB_REQ_3
229 #define NET_WR_ST_GEN_UNINITIALIZED -1 //!< Value of state UNINITIALIZED
230 #define NET_WR_ST_SERV 0x10b44000
231 #define NET_WR_ST_SERV_SYNC_NSEC 1 //!< Value of state SYNC_NSEC
232 #define NET_WR_ST_SERV_SYNC_TAI 2 //!< Value of state SYNC_TAI
233 #define NET_WR_ST_SERV_SYNC_PHASE 3 //!< Value of state SYNC_PHASE
234 #define NET_WR_ST_SERV_TRACK_PHASE 4 //!< Value of state TRACK_PHASE
235 #define NET_WR_ST_SERV_WAIT_SYNC_IDLE 5 //!< Value of state WAIT_SYNC_IDLE
236 #define NET_WR_ST_SERV_WAIT_OFFSET_STABLE 6 //!< Value of state WAIT_OFFSET_STABLE
237 #define NET_WR_ST_SERV_UNINITIALIZED -1 //!< Value of state UNINITIALIZED
238 
239 //! Structure defining all process variables for subsystem Networking & IPMux.
240 typedef struct {
241 
242  //! White Rabbit Round-Trip time
243  uint64_t wr_mu;
244 
245  //! Cable roundtrip time in ps
246  int64_t cable_rtt;
247 
248  //! Server IP address (0xAABBCCDD = AA.BB.CC.DD)
249  uint32_t ipmux_srv_ip;
250 
251  //! White Rabbit Delta values, where each entry is a delta-value.
252  int32_t wr_delta[4];
253 
254  //! Modules MAC address
255  //! Encoding, [0xAABB,0xCCDD,0xEEFF] => AA:BB:CC:DD:EE:FF
256  uint16_t mac_addr[3];
257 
258  //! IP Mux ports, 0 - TDC, 1 - Accoustics, 2 - Instruments
259  uint16_t ipmux_ports[4];
260 
261  //! Server MAC address, set to 00 to resolve.
262  //! Encoding, [0xAABB,0xCCDD,0xEEFF] => AA:BB:CC:DD:EE:FF
263  uint16_t ipmux_srv_mac[3];
264 
265  //! Slow control port
266  uint16_t sc_port;
267 
268  //! White Rabbit Bitslide value
269  uint16_t wr_bitslide;
270 
271  //! Receiver input power in steps of 0.1 uW per count
272  uint16_t rx_input_power;
273 
274  //! Receiver output power in steps of 0.1 uW per count
275  uint16_t tx_output_power;
276 
277  //! White Rabbit temperature (DS18S20), in 1/100th of a degree
278  int16_t wr_temp;
279 
280  //! SFP module temperature, in 1/100th of a degree
281  int16_t sfp_temp;
282 
283  //! White Rabbit PTP State
284  int8_t wr_st_ptp;
285 
286  //! White Rabbit general state
287  int8_t wr_st_gen;
288 
289  //! White Rabbit servo state
290  int8_t wr_st_serv;
291 } net_t;
292 
293 //! Provides access to all process variables of subsystem Networking & IPMux.
294 extern net_t net;
295 
296 //! Pointer look up table for all process variables of Networking & IPMux.
297 extern void * net_p[17];
298 
299 #ifdef PV_META
300 //! Variable ID's
301 extern const int32_t net_id[17];
302 
303 //! Variable names
304 extern const char * const net_name[17];
305 #endif
306 
307 
308 // ------------------------------------------------------------
309 // Definitions for subsystem Optics
310 // ------------------------------------------------------------
311 #define OPT_PMT_ID 0x2052401e
312 #define OPT_HR_VETO_THRES 0x20627000
313 #define OPT_CHAN_ENABLE 0x20827000
314 #define OPT_HR_VETO_ENA_CH 0x20e27000
315 #define OPT_MULHIT_ENA_CH 0x20f27000
316 #define OPT_MIN_TOT 0x21027000
317 #define OPT_NANO_LENGTH 0x20917000
318 #define OPT_NANO_PERIOD 0x20a17000
319 #define OPT_NANO_VOLT 0x20b17000
320 #define OPT_NANO_DELAY 0x20c17000
321 #define OPT_NANO_PCOUNT 0x20d17000
322 #define OPT_CHAN_CONFIG 0x2010701e
323 #define OPT_CHAN_STATUS 0x2020401e
324 #define OPT_PMT_HIGHVOLT 0x2030701e
325 #define OPT_PMT_THRESHOLD 0x2040701e
326 #define OPT_NANO_ENABLE 0x20787000
327 
328 //! Structure defining all process variables for subsystem Optics.
329 typedef struct {
330 
331  //! All PMT ID's, 0=PMT at location 0, 31=PMT at location 31
332  uint32_t pmt_id[31];
333 
334  //! High-rate veto (hits per timeslice)
335  uint32_t hr_veto_thres;
336 
337  //! Channel enable, bit per channel
338  uint32_t chan_enable;
339 
340  //! High-rate veto enable, bit per channel
341  uint32_t hr_veto_ena_ch;
342 
343  //! Multi-hit enable, bit per channel
344  uint32_t mulhit_ena_ch;
345 
346  //! Min ToT
347  uint32_t min_tot;
348 
349  //! Length of pulse in 16 ns ticks, default is 4 ticks
350  uint16_t nano_length;
351 
352  //! Period of beacon in 16 ns ticks, default is 0xC35 ticks, or 50us
353  uint16_t nano_period;
354 
355  //! Nano-beacon voltage in millivolts, 0-30000V
356  uint16_t nano_volt;
357 
358  //! Nano-beacon delay in 16 ns ticks
359  uint16_t nano_delay;
360 
361  //! Nano-beacon pulse train count, each second
362  uint16_t nano_pcount;
363 
364  //! Channel configuration (depricated, use CHAN_ENABLE), 0=PMT at location 0, 31=PMT at location 31
365  uint8_t chan_config[31];
366 
367  //! Channel status, 0=PMT at location 0, 31=PMT at location 31
368  uint8_t chan_status[31];
369 
370  //! High voltage settings per channel, 0=PMT at location 0, 31=PMT at location 31
371  //! Scaling: 0: -700V, 255: -1500V
372  uint8_t pmt_highvolt[31];
373 
374  //! Threshold settings per channel, 0=PMT at location 0, 31=PMT at location 31
375  //! Scaling: 0: 800mV, 255: 2400mV
376  uint8_t pmt_threshold[31];
377 
378  //! Enable nano-beacon (deprecated, see SYS_RUN_ENA)
380 } opt_t;
381 
382 //! Provides access to all process variables of subsystem Optics.
383 extern opt_t opt;
384 
385 //! Pointer look up table for all process variables of Optics.
386 extern void * opt_p[17];
387 
388 #ifdef PV_META
389 //! Variable ID's
390 extern const int32_t opt_id[17];
391 
392 //! Variable names
393 extern const char * const opt_name[17];
394 #endif
395 
396 
397 // ------------------------------------------------------------
398 // Definitions for subsystem Instrumentation
399 // ------------------------------------------------------------
400 #define INS_AHRS_PITCH 0x301a4000
401 #define INS_AHRS_ROLL 0x302a4000
402 #define INS_AHRS_YAW 0x303a4000
403 #define INS_AHRS_A 0x304a4002
404 #define INS_AHRS_G 0x305a4002
405 #define INS_AHRS_H 0x306a4002
406 #define INS_TEMP 0x30754000
407 #define INS_HUMID 0x30814000
408 #define INS_AHRS_ENABLE 0x30987000
409 #define INS_AHRS_VALID 0x30a84000
410 #define INS_COMPASS_VERSION 0x30b04000
411 
412 //! Structure defining all process variables for subsystem Instrumentation.
413 typedef struct {
414 
415  //! Pitch in degrees
417 
418  //! Roll in degrees
420 
421  //! Yaw in degrees
423 
424  //! Acceleration projection, (Index 0=X, 1=Y, 2=Z)
425  f32_t ahrs_a[3];
426 
427  //! Angular velocity projection, (Index 0=X, 1=Y, 2=Z)
428  f32_t ahrs_g[3];
429 
430  //! Magnetic field projection, (Index 0=X, 1=Y, 2=Z)
431  f32_t ahrs_h[3];
432 
433  //! Temperature in 1/100th of a degree
434  int16_t temp;
435 
436  //! Humidity in 1/100th RH
437  uint16_t humid;
438 
439  //! Compass enable (deprecated, see SYS_DISABLE)
441 
442  //! Compass data are valid
444 
445  //! Compass version:
446  //! 0 if not available or very old version.
447  //! 255 for LSM303.
448  //! Otherwise version * 10, e.g. version 4.1 would be value 41
450 } ins_t;
451 
452 //! Provides access to all process variables of subsystem Instrumentation.
453 extern ins_t ins;
454 
455 //! Pointer look up table for all process variables of Instrumentation.
456 extern void * ins_p[12];
457 
458 #ifdef PV_META
459 //! Variable ID's
460 extern const int32_t ins_id[12];
461 
462 //! Variable names
463 extern const char * const ins_name[12];
464 #endif
465 
466 
467 // ------------------------------------------------------------
468 // Definitions for subsystem Acoustics
469 // ------------------------------------------------------------
470 #define ACS_ACOU_ENABLE 0x40187000
471 #define ACS_ACOU_CHAN 0x40207000
472 #define ACS_ACOU_CHAN_BOTH 0 //!< Value to enable both acoustic channels
473 #define ACS_ACOU_CHAN_ONE 1 //!< Value to enable enable only channel 1 (default)
474 #define ACS_ACOU_CHAN_TWO 2 //!< Value to enable enable only channel 2
475 #define ACS_ACOU_RES 0x40307000
476 #define ACS_ACOU_RES_12_BITS 0 //!< Value for 12 bit resolution
477 #define ACS_ACOU_RES_16_BITS 1 //!< Value for 16 bit resolution
478 #define ACS_ACOU_RES_24_BITS 2 //!< Value for 24 bit resolution (default)
479 
480 //! Structure defining all process variables for subsystem Acoustics.
481 typedef struct {
482 
483  //! Acoustic enable (deprecated, see SYS_RUN_ENA)
485 
486  //! Acoustics channel config
487  uint8_t acou_chan;
488 
489  //! Acoustic resolution
490  uint8_t acou_res;
491 } acs_t;
492 
493 //! Provides access to all process variables of subsystem Acoustics.
494 extern acs_t acs;
495 
496 //! Pointer look up table for all process variables of Acoustics.
497 extern void * acs_p[4];
498 
499 #ifdef PV_META
500 //! Variable ID's
501 extern const int32_t acs_id[4];
502 
503 //! Variable names
504 extern const char * const acs_name[4];
505 #endif
506 
507 
508 // ------------------------------------------------------------
509 // Definitions for subsystem Base
510 // ------------------------------------------------------------
511 #define BSE_EDFA_SETP_RD 0x50264000
512 #define BSE_EDFA_IOP 0x50364000
513 #define BSE_EDFA_OOP 0x50464000
514 #define BSE_EDFA_PUMPDC 0x50564000
515 #define BSE_EDFA_TEMP 0x50664000
516 #define BSE_EDFA_SETP_WR 0x508a2000
517 #define BSE_BPS_IBACK 0x50914000
518 #define BSE_BPS_I12 0x50a14000
519 #define BSE_BPS_V375 0x50b14000
520 #define BSE_BPS_I375 0x50c14000
521 #define BSE_BPS_V5 0x50d14000
522 #define BSE_BPS_BREAKER 0x50e14000
523 #define BSE_BPS_ALARM 0x50f14000
524 #define BSE_ACDC_VOLT 0x51014000
525 #define BSE_ACDC_CUR 0x51114000
526 #define BSE_EDFA_EMI 0x50186000
527 #define BSE_EDFA_SN 0x5070401f
528 #define BSE_ACDC_TEMP 0x51244000
529 #define BSE_INST_FAIL 0x51306000
530 #define BSE_INST_FAIL_EDFA 0x1 //!< EDFA
531 #define BSE_INST_FAIL_BPS 0x2 //!< BPS
532 #define BSE_INST_FAIL_ACDC 0x4 //!< ACDC
533 
534 //! Structure defining all process variables for subsystem Base.
535 typedef struct {
536 
537  //! Monitored Power Setpoint for APC mode (in milli dBm)
538  int32_t edfa_setp_rd;
539 
540  //! Input Optical Power (in milli dBm)
541  int32_t edfa_iop;
542 
543  //! Output Optical Power (in milli dBm)
544  int32_t edfa_oop;
545 
546  //! Diode Pump Current (in micro A)
547  int32_t edfa_pumpdc;
548 
549  //! Temperature (in milli degrees celsius)
550  int32_t edfa_temp;
551 
552  //! Settings for Power Setpoint (in dBm)
554 
555  //! Backbone current (0 to 1023 ADC raw)
556  uint16_t bps_iback;
557 
558  //! Current of 12V line (0 to 1023 ADC raw)
559  uint16_t bps_i12;
560 
561  //! Voltage of 375V line (0 to 1023 ADC raw)
562  uint16_t bps_v375;
563 
564  //! Current of 375V line (0 to 1023 ADC raw)
565  uint16_t bps_i375;
566 
567  //! Voltage of 5V line (0 to 1023 ADC raw)
568  uint16_t bps_v5;
569 
570  //! Breaker status
571  uint16_t bps_breaker;
572 
573  //! Alarm Status
574  uint16_t bps_alarm;
575 
576  //! ACDC Voltage, between 300 and 556
577  uint16_t acdc_volt;
578 
579  //! ACDC Current, between 0 and 2560A
580  uint16_t acdc_cur;
581 
582  //! Emission
583  bool edfa_emi;
584 
585  //! Serial number (Ascii string)
586  uint8_t edfa_sn[32];
587 
588  //! ACDC Temperature in degrees Centigrade
589  int8_t acdc_temp;
590 
591  //! Bitmask containing error devices. Once errored they will not
592  //! be read again until cleared
593  uint8_t inst_fail;
594 } bse_t;
595 
596 //! Provides access to all process variables of subsystem Base.
597 extern bse_t bse;
598 
599 //! Pointer look up table for all process variables of Base.
600 extern void * bse_p[20];
601 
602 #ifdef PV_META
603 //! Variable ID's
604 extern const int32_t bse_id[20];
605 
606 //! Variable names
607 extern const char * const bse_name[20];
608 #endif
609 
610 
611 
612 //! array of subsystem meta objects
613 extern const subsys_info_t subsys_info[6];
614 
615 
616 
617 #endif // _VARS_H_
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 aes_ts_fifoc
AES timestamp fifo count.
Definition: vars.h:143
uint8_t sys_fail
Failure bitmask, same bits as SYS_DISABLE.
Definition: vars.h:155
Structure defining all process variables for subsystem Optics.
Definition: vars.h:329
bool edfa_emi
Emission.
Definition: vars.h:583
Special library for primitive IEEE 754 floating point handling without dragging all float support alo...
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 &amp; 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
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
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
sys_t sys
Provides access to all process variables of subsystem System.
Definition: vars.c:8
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 &amp; 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 &amp; IPMux.
Definition: vars.c:76
int8_t wr_st_ptp
White Rabbit PTP State.
Definition: vars.h:284
uint16_t bps_iback
Backbone current (0 to 1023 ADC raw)
Definition: vars.h:556
uint32_t f32_t
32 bit representation for float.
Definition: float.h:30
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
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
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
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