The VisAO Camera
statusboard.h
Go to the documentation of this file.
1 /************************************************************
2 * statusboard.h
3 *
4 * Author: Jared R. Males (jrmales@email.arizona.edu)
5 *
6 * Declarations for the VisAO status information structures
7 *
8 * Developed as part of the Magellan Adaptive Optics system.
9 ************************************************************/
10 
11 /** \file statusboard.h
12  * \author Jared R. Males
13  * \brief Declarations for the VisAO status information structures.
14  *
15 */
16 
17 
18 #ifndef __statusboard_h__
19 #define __statusboard_h__
20 
21 #include <iostream>
22 
23 /*Status board shared memory ID:*/
24 
25 ///Shared memory key for ccd47 data
26 #define DATA_framegrabber47 5000
27 ///Shared memory key for BCU39 data
28 #define DATA_framegrabber39 5001
29 
30 #define DATA_47darks 5002
31 
32 #define DATA_39darks 5004
33 
34 ///Shared memory key for reconstructed strehl data
35 #define DATA_strehls 5003
36 
37 
38 ///Shared memory key for the focus motor controller status board
39 #define STATUS_focusstage 6000
40 ///Shared memory key for the ccd47 controller status board
41 #define STATUS_ccd47 7000
42 ///Shared memory key for the ccd47 framegrabber status board
43 #define STATUS_framegrabber47 7050
44 ///Shared memory key for the ccd47 framewriter status board
45 #define STATUS_framewriter47 7100
46 ///Shared memory key for the ccd47 frameserver status board
47 #define STATUS_frameserver47 7150
48 ///Shared memory key for the reconstructor status board
49 #define STATUS_reconstructor 7500
50 ///Shared memory key for the BCU39 framegrabber status board
51 #define STATUS_framegrabber39 7550
52 #define STATUS_framewriter39 7600
53 
54 #define STATUS_shutterctrl 8000
55 #define STATUS_filterwheel2 9000
56 #define STATUS_filterwheel3 9500
57 #define STATUS_sysmonD 10000
58 #define STATUS_wollaston 11000
59 #define STATUS_aosystem 12000
60 #define DL_aosystem 12001
61 
62 #define STATUS_power 13000
63 
64 ///Shared memory key for the Gimbal mirror status board
65 #define STATUS_gimbal 14000
66 
67 ///Shared memory key for the Coronagraph Guider status board
68 #define STATUS_coronguide 14100
69 
70 ///Shared memory key for the dioserver status board
71 #define STATUS_dioserver 15000
72 
73 ///Shared memory key for the frame selector status board
74 #define STATUS_frameselector 16000
75 
76 ///Shared memory key for imviewer status board
77 #define STATUS_imviewer 17000
78 
79 ///Shared memory key for shutter tester status board
80 #define STATUS_shuttertester 22000
81 
82 
83 namespace VisAO
84 {
85 
87 {
88  char appname[25];
89  int control_mode;
90 
91  struct timespec last_update;
92  double max_update_interval;
93 };
94 
95 
97 {
98  int power_state; //0 off, 1 on
99  int is_moving;
100  int cur_dir;
101  int cur_enabled;
102  int homing;
103  double cur_pos; //position in microns
104  int is_focused;
105 
106 };
107 
108 
110 {
111  int status;
112  int speed;
113  int xbin;
114  int ybin;
115  int windowx;
116  int windowy;
117  int repetitions;
118  double framerate;
119  int gain;
120  double joe_temp;
121  double head_temp1;
122  double head_temp2;
123  int black0;
124  int black1;
125 
126  int saving;
127  int skipping;
128  int remaining;
129 
130  int imtype; ///<0=science, 1=acquisition, 2=dark, 3=sky, 4=flat
131 };
132 
134 {
135  int running;
136  int reconstructing;
137  int saving;
138  double fps;
139 };
140 
142 {
143  double avgwfe_1_sec; ///<1 second average WFE
144  double stdwfe_1_sec; ///<1 second std dev of WFE
145  double inst_wfe; ///<Instantaneous WFE
146 };
147 
148 
150 {
151  int in_auto;
152  int power_state;
153  int sw_state;
154  int hw_state;
155  int sync_enabled;
156 };
157 
159 {
160  int RunTest; //1 = test running, 0 = no test running
161  int testmode;
162  char testfile[255];
163  double threshold;
164  double freq;
165  double dutycyc;
166  double duration;
167 };
168 
170 {
171  int state;
172  double pos;
173  double req_pos;
174  char filter_name[256];
175  int type;
176  int req_type;
177 };
178 
180 {
181  double core_temps[SYS_N_CORES];
182  double core_max[SYS_N_CORES];
183  double core_idle[SYS_N_VCORES];
184 
185  double core_temp_warn;
186  double core_temp_limit;
187 
188 
189 
190 
191  char raid_stat[SYS_N_LOGDRV];
192 
193  size_t mem_tot;
194  size_t mem_used;
195  size_t mem_free;
196  size_t mem_shared;
197  size_t mem_buff;
198  size_t mem_cached;
199 
200  size_t swap_tot;
201  size_t swap_used;
202  size_t swap_free;
203 
204  size_t dfroot_size;
205  size_t dfroot_used;
206  size_t dfroot_avail;
207 
208  double hdd_used_warn;
209  double hdd_used_limit;
210 
211  int GPUTemp;
212  int GPUMemUsage;
213 
214  double gpu_temp_warn;
215  double gpu_temp_limit;
216 
217  int HDDTemp_a;
218  int HDDTemp_b;
219 
220  double hdd_temp_warn;
221  double hdd_temp_limit;
222 
223  double AirTemp;
224  double Joe47Temp;
225 
226  double air_temp_warn;
227  double air_temp_limit;
228 
229  double joe_temp_warn;
230  double joe_temp_limit;
231 
232 };
233 
235 {
236  double cur_pos; //1 up, 0 intermediate, -1 down
237 
238 };
239 
241 {
242  //char tgtname[256];
243 
244  char dateobs[256];
245  int ut;
246  double epoch;
247  double ra;
248  double dec;
249  double az;
250  double el;
251  double am;
252  double pa;
253  double ha;
254  double zd;
255  int st;
256 
257  int istracking;
258  int isguiding;
259  int isslewing;
260  int guider_ismoving;
261 
262  double catra;
263  double catdec;
264  double catep;
265  double catro;
266  char catrm[256];
267  char catobj[256];
268  char obsinst[256];
269  char obsname[256];
270 
271  double rotang;
272  double rotoffset;
273  int rotfollowing;
274 
275  double wxtemp;
276  double wxpres;
277  double wxhumid;
278  double wxwind;
279  double wxwdir;
280  double wxdewpoint;
281  double wxpwvest;
282  double ttruss;
283  double tcell;
284  double tseccell;
285  double tambient;
286  double dimmfwhm;
287  int dimmtime;
288  double mag1fwhm;
289  int mag1time;
290 
291 
292  double filter1_pos;
293  double filter1_reqpos;
294  char filter1_name[256];
295 
296  double baysidex;
297  int baysidex_enabled;
298  double baysidey;
299  int baysidey_enabled;
300  double baysidez;
301  int baysidez_enabled;
302 
303  int correctedmodes;
304  int loop_on;
305  int loop_open_counter;
306 
307  char modal_basis[256];
308  char reconstructor[256];
309  int n_modes;
310  int homiddle;
311  char loop_gains[256];
312  double loop_gain_tt;
313  double loop_gain_ho1;
314  double loop_gain_ho2;
315 
316  double tt_amp[3];
317  double tt_freq[3];
318  double tt_offset[3];
319  double ccd39_freq;
320  int ccd39_bin;
321  int wfs_counts;
322 
323  int nodInProgress;
324 
325  int orient_useel;
326  int orient_usepa;
327 
328  //camera lens position, rirot ang
329 };
330 
332 {
333  int outlet1_state;
334  char outlet1_name[50];
335 
336  int outlet2_state;
337  char outlet2_name[50];
338 
339  int outlet3_state;
340  char outlet3_name[50];
341 
342  int outlet4_state;
343  char outlet4_name[50];
344 
345  int outlet5_state;
346  char outlet5_name[50];
347 
348  int outlet6_state;
349  char outlet6_name[50];
350 
351  int outlet7_state;
352  char outlet7_name[50];
353 
354  int outlet8_state;
355  char outlet8_name[50];
356 };
357 
359 {
360  double xpos;
361  double ypos;
362  int power;
363 };
364 
366 {
367  //int guidebox_vis;
368  int guidebox_x0;
369  int guidebox_x1;
370  int guidebox_y0;
371  int guidebox_y1;
372 
373  double min;
374  double max;
375  double mean;
376 
377  double fit_FWHM;
378  double fit_FWHM_min;
379  double fit_FWHM_max;
380 
381  double fit_Ellipt;
382 
383  double fit_Peak;
384  double fit_X;
385  double fit_Y;
386 
387 
388 };
389 
391 {
392  int loopState;
393  double loop_gain;
394  double tgtx;
395  double tgty;
396  double xcen;
397  double ycen;
398 };
399 
401 {
402  int frame_select;
403  double thresh;
404 
405 };
406 
407 }//namespace VisAO
408 
409 #endif //__statusboard_h__
410 
411 
double inst_wfe
Instantaneous WFE.
Definition: statusboard.h:145
double stdwfe_1_sec
1 second std dev of WFE
Definition: statusboard.h:144
#define SYS_N_VCORES
Number of virtual processors in the system.
Definition: libvisao.h:48
int imtype
0=science, 1=acquisition, 2=dark, 3=sky, 4=flat
Definition: statusboard.h:130
#define SYS_N_LOGDRV
Number of logical drives in the system.
Definition: libvisao.h:54
The namespace of VisAO software.
The VisAO reconstructor.
Definition: reconstructor.h:82
double avgwfe_1_sec
1 second average WFE
Definition: statusboard.h:143
#define SYS_N_CORES
Number of physical processors in the system.
Definition: libvisao.h:45