CARMA C++
rtcnetcoms.h
1 #ifndef rtcnetcoms_h
2 #define rtcnetcoms_h
3 
4 /*
5  * This file defines the network interfaces between the host control-program
6  * and the real-time controller task, and between control-clients and
7  * the control program.
8  */
9 #include "carma/szaarrayutils/netbuf.h"
10 #include "carma/szaarrayutils/netobj.h"
11 #include "carma/szaarrayutils/szaregs.h"
12 #include "carma/szaarrayutils/szaconst.h"
13 
14 //#include "carma/szautil/AntNum.h"
15 #include "carma/szautil/SzaPorts.h"
16 
17 namespace sza {
18  namespace array {
19 
20  /*-----------------------------------------------------------------------
21  * Define the ids of control-program to controller messages along with
22  * the corresponding message containers.
23  */
24  typedef enum {
25  NET_LOG_MSG, // A message to be logged
26  NET_PMAC_DONE_MSG, // A pmac transaction-completion message
27  NET_SOURCE_SET_MSG, // A warning message that the source has set
28  NET_SETREG_DONE_MSG, // A setreg transaction completion message
29  NET_TV_OFFSET_DONE_MSG, // A tv_offset transaction completion message
30  NET_ID_MSG, // A message from an antenna to identify itself
31  NET_GREETING_MSG, // A handshake message
32  NET_NAV_UPDATE_MSG, // A request from the controller for a
33  // re-initialization of ephemeris
34  // positions from the navigator thread
35  NET_CALTERT_DONE_MSG, // A caltert transaction-completion message
36  NET_IFMOD_DONE_MSG, // An antenna IF transaction-completion message
37  NET_CAN_DONE_MSG, // A CAN transaction-completion message
38  NET_NOISE_DONE_MSG, // A noise source completion message
39  NET_FRAME_DONE_MSG // A frame transaction-completion message
40  } NetMsgId;
41 
45  typedef struct {
46  NetUlong revision;
47  NetUlong nReg;
48  NetUlong nByte;
50 
51  /*
52  * The following object is used to forward log messages from the real-time
53  * control system to the control program. Note that cnt_send_log_message()
54  * in controller.c relies on the text[] member of NetLogMsg being the
55  * last member (in order not to have to copy all NET_LOG_MAX+1 bytes of
56  * text[] if the string in text[] is shorter).
57  */
58  enum {NET_LOG_MAX=127};
59  typedef struct {
60  unsigned seq; // A unique sequence number associated
61  // with this message
62  short bad; // True if the text describes an error
63  // condition
64  char text[NET_LOG_MAX+1]; // The text of the log message
65 
66  bool end;
67  } NetLogMsg;
68 
69  /*
70  * The following object is used by the Scanner task to report
71  * the completion of noise source transactions.
72  */
73  typedef struct {
74  NetUlong seq; /* The sequence number of the transaction that completed */
75  } NetNoiseDoneMsg;
76 
77  /*
78  * The following object is used by the receiver-control task to report
79  * the completion of a setreg transactions.
80  */
81  typedef struct {
82  NetUlong seq; /* The sequence number of the transaction that completed */
83  } NetSetregDoneMsg;
84 
85  /*
86  * The following object is used by the scanner task to report
87  * the completion of a tv_offset transaction.
88  */
89  typedef struct {
90  NetUlong seq; /* The sequence number of the transaction that completed */
91  } NetTvOffsetDoneMsg;
92 
93  /*
94  * The following object is used by the tracker task to report
95  * target acquisition.
96  */
97  typedef struct {
98  NetUlong seq; /* The sequence number of the transaction
99  that completed */
100  } NetCalTertDoneMsg;
101 
102  /*
103  * The following object is used by the tracker task to report
104  * target acquisition.
105  */
106  typedef struct {
107  NetUlong seq; /* The sequence number of the transaction
108  that completed */
109  } NetFrameDoneMsg;
110 
111  /*
112  * The following object is used by the tracker task to report
113  * target acquisition.
114  */
115  typedef struct {
116  NetUlong seq; // The sequence number of the transaction
117  // that completed
118  } NetCanDoneMsg;
119 
120  /*
121  * The following object is used by the rx task to report
122  * target IF switch acquisition.
123  */
124  typedef struct {
125  NetUlong seq; /* The sequence number of the transaction
126  that completed */
127  } NetIFModDoneMsg;
128 
129  /*
130  * The following object is used by the tracker task to report
131  * target acquisition.
132  */
133  typedef struct {
134  NetUlong seq; /* The sequence number of the transaction
135  that completed */
136  } NetPmacDoneMsg;
137 
138  /*
139  * The following object is used by the tracker task to report
140  * if the telescope can't reach the current source due to it being
141  * too low in the sky.
142  */
143  typedef struct {
144  NetUlong seq; /* The sequence number of the transaction that resulted */
145  /* in the telescope needing to point too low. */
146  } NetSourceSetMsg;
147 
148  /*
149  * Create a union of the above message containers.
150  */
151  typedef union {
152  NetGreetingMsg greeting; // A greeting message
153  NetLogMsg log; /* A message to be logged */
154  NetNoiseDoneMsg noise_done; /* A noise source completion message */
155  NetPmacDoneMsg pmac_done; /* A tracker transaction-completion message */
156  NetSourceSetMsg source_set; /* A source-has-set advisory message */
157  NetSetregDoneMsg setreg_done; /* A setreg transaction completion message */
158  NetTvOffsetDoneMsg tv_offset_done;// A tv_offset transaction
159  // completion message
160  NetCalTertDoneMsg calTertDone; // A caltert transaction
161  // completion message
162  NetIFModDoneMsg IFModDone; // An antenna IF transaction
163  // completion message
164  NetCanDoneMsg canDone; // A CAN completion message
165  NetFrameDoneMsg frameDone; // A FRAME completion message
166  NetNoiseDoneMsg noiseDone; // A noise source completion message
167  } NetMsg;
168 
169  struct RtcNetMsg {
170  NetUlong antenna;
171  NetMsg msg;
172  unsigned size();
173  };
174  }
175 }
176 /*
177  * The following object description table, defined in rtcnetcoms.c,
178  * describes the messages that are sent from the real-time controller
179  * to the control program.
180  */
181 extern const NetObjTable rtc_msg_table;
182 
183 namespace sza {
184  namespace array {
185  /*-----------------------------------------------------------------------
186  * Define the ids of controller to control-program commands along with
187  * the corresponding message containers.
188  */
189  typedef enum {
190  NET_SHUTDOWN_CMD, // A request to shutdown the control system
191  NET_INTERVAL_CMD, // A request to change the hardware integration time
192  NET_INHIBIT_CMD, // Inhibit or resume integration readout
193  NET_STROBE_CMD, // A request to take a register snapshot
194  NET_SETREG_CMD, // Change the value of a given register
195  NET_GETREG_CMD, // Change the value of a given register
196  NET_SETDIO_CMD, // Modify the output register of a digital I/O board
197  NET_UNFLAG_CMD, // Resume monitoring of a previously unreachable board
198  NET_PHASE_MOTOR_CMD, // Switch on or off a given set of phase shift motors
199  NET_PHASE_SHIFT_CMD, // Set the positions of a given set of phase shifters
200  NET_SELECT_RX_CMD, // Select a receiver type as the target of
201  // the next command
202  NET_SET_BIAS_CMD, // Set a receiver bias
203  NET_RX_HEATER_CMD, // Switch on or off a given set of heaters
204  NET_RX_COLDHEAD_CMD, // Switch on or off a given set of coldheads
205  NET_RX_TEMP_CMD, // Set the temperatures of a given set of heaters
206  NET_LO_CMD, // A command to configure the LO chain
207  NET_RX_QUAD_CMD, // Set the state of the phase quadrature network
208  NET_RX_POLAR_CMD, // Define a polarization state-encoder
209  // association for a receiver
210  NET_POLWALSH_CMD, // Define a polarization state-encoder
211  // association for a receiver
212  NET_SITE_CMD, // Specify the location of the SZA
213  NET_LOCATION_CMD, // Specify the location of an antenna
214  NET_DELAYREF_CMD, // Specify the location of the delay reference
215  NET_INIT_CMD, // Mandatory controller initialization command
216  NET_HALT_CMD, // Halt the telescope drives
217  NET_SLEW_CMD, // Slew to a given az,el,dk
218  NET_TRACK_CMD, // Append to the track of the current source
219  NET_MOUNT_OFFSET_CMD,// Adjust the az,el,dk tracking offsets
220  NET_EQUAT_OFFSET_CMD,// Adjust the equatorial ra and dec tracking offsets
221  NET_TV_OFFSET_CMD, // Adjust the tracking offsets to move a
222  // star by a on the tv monitor of the
223  // optical telescope.
224  NET_TV_ANGLE_CMD, // The deck angle at which the vertical
225  // direction on the tv monitor of the
226  // optical telescope matches the direction
227  // of increasing topocentric elevation.
228  NET_SKY_OFFSET_CMD, // Tell the tracker to continually adjust
229  // the tracking offsets to maintain the
230  // telescope pointed at a given fixed sky
231  // offset from the normal pointing center.
232  NET_UT1UTC_CMD, // Append to the UT1-UTC interpolation table
233  NET_EQNEQX_CMD, // Append to the equation-of-the-equinoxes
234  // interpolation table
235  NET_ENCODER_CALS_CMD, // Tell the tracker task the current encoder scales
236  NET_ENCODER_LIMITS_CMD,// Tell the tracker task the current encoder limits
237  NET_ENCODER_ZEROS_CMD, // Set the zero points of the telescope encoders
238  NET_SLEW_RATE_CMD, // Set the slew rate of each telescope axis
239  NET_TILTS_CMD, // Calibrate the axis tilts of the telescope
240  NET_FLEXURE_CMD, // Calibrate the axis flexure of the telescope
241  NET_COLLIMATE_CMD, // Calibrate the collimation of the telescope
242  NET_MODEL_CMD, // Select the optical or radio pointing model
243  NET_YEAR_CMD, // Tell the control system what the current year is
244  NET_DECK_MODE_CMD, // Tell the tracker how to position the deck
245  // axis while tracking sources.
246  NET_ATMOS_CMD, // Supply atmospheric conditions to weather task
247  NET_FEATURE_CMD, // Change the set of feature markers to be
248  // recorded in one or more subsequent
249  // archive frames.
250  NET_GPIB_SEND_CMD, // Send a message to a given GPIB device
251  NET_GPIB_READ_CMD, // Read a message from a given GPIB device
252  NET_POWER_CMD, // Turn the power on/off to an antennas power strip
253  NET_POWER_DT_CMD, // Set the interval of noise-cal power-meter readings
254  NET_POWER_METER_CMD,// Send a command to the power meter
255  NET_NOISE_CAL_CMD, // Connect or disconnect the noise-calibration source
256  NET_CHZR_POWER_CMD, // Initiate a command to search for the
257  // attenuations that result in outputs from
258  // specified total-power detectors that are
259  // close to a given power level.
260  NET_CHZR_ZERO_CMD, // Initiate a command to measure the
261  // zero-offset of one or more total-power
262  // detectors
263  NET_CHZR_ATTN_CMD, // Set the attenuations of one or more IF channels
264  NET_CHZR_SWITCH_CMD,// Turn one or more IF amplifiers on or off
265  NET_CHZR_ENABLE_CMD,// Temporarily disable, or reenable the channelizer
266  NET_RXSIM_CMD, // Configure the receiver simulation box
267  NET_THERMO_CMD, // Send a command to the DS1820 digital thermometers
268  NET_DS_DT_CMD, // Set the interval for DS1820 temperature readouts.
269  NET_CAMERA_CMD, // Forward a command to the optical camera controller.
270  NET_OPTCAM_CNTL_CMD,// Turn the optical camera/stepper motor on/off
271  NET_STEPPER_CMD, // Step the stepper motor
272  NET_GRABBER_CMD, // Step the stepper motor
273  NET_FLATFIELD_CMD, // Toggle flat fielding of frame grabber frames
274  NET_FG_CMD, // Write to a register on the frame grabber board
275  NET_CONFIGURE_FG_CMD, // Configure the frame grabber
276  NET_TPCAL_CMD, // Install total power calibration factors
277  NET_WALSH_CMD, // Toggle slow walshing on or off
278  NET_PAGER_CMD, // Turn the pager on or off
279  NET_REBOOT_PMAC_CMD,// Reboot the pmac
280 
281  // Downconverter control commands
282 
283  NET_PSYS_CMD, // Set the DC power
284  NET_PSYS_ATTEN_CMD, // Set the Psys attenuation
285  NET_IFOUT_CMD, // Set the IF output power
286  NET_IFOUT_ATTEN_CMD, // Set the IF output attenuation
287  NET_RF_AMP_CMD, // Enable the RF amp
288  NET_IF_ALC_CMD, // Enable the IF automatic level control
289 
290  // Noise Source control commands
291 
292  NET_NOISE_POWER_CMD, // Set the noise source power.
293  NET_NOISE_ATTEN_CMD, // Set the noise source attenuation.
294  NET_TONE_ATTEN_CMD, // Set the tone attenuation.
295  NET_NOISE_CMD, // Turn the noise source on/off
296  NET_TONE_CMD, // Turn the tone on/off
297 
298  // Quadrature Modulator control commands
299 
300  NET_QUAD_POWER_CMD, // Set the noise source power.
301  NET_QUAD_ATTEN_CMD, // Set the noise source attenuation.
302  NET_QUAD_WALSH_COLUMN_CMD, // Set the tone attenuation.
303  NET_QUAD_CMD, // Turn the noise source on/off.
304  NET_QUAD_WALSH_TABLE_CMD, // Set the tone attenuation.
305  NET_QUAD_PHASE_CMD, // Set the phase state of the QuadMod.
306 
307  // CAN module reset command
308 
309  NET_RESET_CMD, // Reset a module.
310 
311  // Receiver CAN commands
312 
313  NET_FAST_SAMPLING_CMD, // Set fast sampling
314 
315  // Delay commands
316 
317  NET_SET_ANTENNA_COORDS_CMD,// Set antenna coordinates
318 
319  // Lobe Rotator commands
320 
321  NET_DDS_CMD, // Command the output state of the
322  // DDS channels of the lobe rotator
323  NET_SET_ANTENNA_DDS_CMD, // Associate a DDS channel with an
324  // antenna
325 
326  NET_SET_LR_PHASE_CMD, // Set the phase on a LR DDS or input channel
327  NET_SET_LR_FREQ_CMD, // Set the frequency on a LR of input channel
328  NET_ENABLE_DDS_WALSHING_CMD,// Set the walshing state on a DDS channel
329  NET_SET_DDS_WALSH_COLUMN_CMD,// Set the walsh state on a DDS channel
330  NET_SET_OUTPUT_REGS_CMD, // Set the delay on a LR input channel
331  NET_SET_LR_DELAY_CMD, // Set the delay on a LR input channel
332  NET_SET_ANTENNA_PHASE_CMD, // Set the phase on an antenna channel
333  NET_SET_ANTENNA_FREQ_CMD, // Set the frequency on an antenna channel
334  NET_SET_ANTENNA_PARAMS_CMD,// Set antenna parameters
335  NET_SET_DELAY_CMD, // Set a delay
336  NET_SET_DEFAULT_DELAY_CMD, // Set a default delay
337  NET_REF_ANT_CMD, // Select a reference antenna
338  NET_SET_WEATHER_PARAMS_CMD,// Set weather parameters
339  NET_USE_DELAY_CMD, // Use a delay
340  NET_SCAN_CMD, // Scan
341 
342  // CalTert command
343 
344  NET_CALTERT_CMD,
345 
346  // Antenna IF command
347 
348  NET_IFMOD_CMD,
349 
350  // IntMod command
351 
352  NET_INTMOD_CMD,
353 
354  // Flip delay signs?
355 
356  NET_FLIP_DELAY_CMD,
357 
358  // Toggle fringe tracking on/off
359 
360  NET_FRINGE_TRACKING_CMD,
361 
362  // A command for the Thermal module
363 
364  NET_THERMAL_CMD,
365 
366  // A command for the Tiltmeter module
367 
368  NET_TILTMETER_CMD,
369 
370  // A command for the synthesizer
371 
372  NET_SYNTH_CMD,
373 
374  NET_ENABLE_FREQUENCY_OFFSET_CMD, // Enable lobe-rotating with a
375  // frequency offset
376  } NetCmdId;
377 
381  typedef enum {
382  HARD_RESTART, /* Restart the control system via a reboot */
383  SOFT_RESTART, /* Re-initialize the running control-system */
384  HARD_SHUTDOWN, /* Reboot the CPU and wait at the boot prompt */
385  SOFT_SHUTDOWN /* Terminate the control system but don't reboot */
386  } RtcShutdownMethod;
387 
388 #define SCAN_NET_NPT 10
389 
390  /*
391  * The NetScanCmd is used to command the telescope to perform a scan.
392  * Sequential commands containing the same scan name will be combined
393  * to form a scrolling table of offsets of up to SCAN_NET_NPT points
394  * at a time.
395  *
396  * A non-zero sequence number will indicate the start of a new scan.
397  */
398  typedef struct {
399  char name[SCAN_LEN]; /* The name of the scan (see cbiregs.h for
400  SCAN_LEN) */
401  NetUlong seq; /* The sequence number of this command */
402  NetUlong index[SCAN_NET_NPT];
403  NetUlong npt; /* The number of points sent with this
404  command */
405  long azoff[SCAN_NET_NPT];
406  long eloff[SCAN_NET_NPT];
407  long dkoff[SCAN_NET_NPT];
408  } NetScanCmd;
409 
410  /*
411  * Define the contents of the shutdown command.
412  */
413  typedef struct { /* The context of NET_SHUTDOWN_CMD */
414  NetEnum method; /* A RtcShutdownMethod enumeration identifier */
415  } NetShutdownCmd;
416 
417  /*
418  * The following command sets the hardware integration interval.
419  */
420  typedef struct { /* The context of NET_INTERVAL_CMD */
421  unsigned short exponent; /* Integration time is (12.8us * 2^(6+exponent)) */
422  } NetIntervalCmd;
423 
424  /*
425  * The following command sets or clears the integration inhibit flag.
426  */
427  typedef struct { /* The context of NET_INHIBIT_CMD */
428  NetBool flag; /* True to inhibit, false to resume readout */
429  } NetInhibitCmd;
430 
431  /*
432  * The slow_walsh command toggles slow walshing on or off.
433  */
434 
435  typedef struct {
436  NetBool on; /* True to start slow walshing. False to turn it off. */
437  } NetWalshStateCmd;
438 
439  /*
440  * The pager command turns the pager on or off
441  */
442  typedef struct {
443  NetEnum state; /* A PagerState enumerator */
444  } NetPagerCmd;
445  /*
446  * Enumerate the supported pager states.
447  */
448  typedef enum {
449  PAGER_ON, /* Turn the pager on */
450  PAGER_OFF, /* Turn the pager off */
451  PAGER_IP,
452  PAGER_EMAIL,
453  PAGER_ENABLE, /* Enable paging */
454  PAGER_DISABLE,/* Disable paging */
455  PAGER_CLEAR, /* clear pager */
456  PAGER_LIST /* list pager regs */
457  } PagerState;
458  /*
459  * The setreg command sets the value of a specified register to a given
460  * value.
461  */
462  typedef struct {
463  unsigned long value; /* The value to write to the register */
464  unsigned short board; /* The host-board of the register */
465  unsigned short block; /* The block number of the register */
466  unsigned short index; /* The index of the first element to be set */
467  unsigned short nreg; /* The number of elements to be set */
468  unsigned long seq; /* The sequence number of this transaction */
469  } NetSetregCmd;
470 
471  /*
472  * The getreg command reads the value of a specified register out of the
473  * register map
474  */
475  typedef struct {
476  unsigned short board; /* The host-board of the register */
477  unsigned short block; /* The block number of the register */
478  unsigned short index; /* The index of the first element to be set */
479  } NetGetregCmd;
480 
481  /*
482  * The setdio command sets the value of the 4-byte output register of
483  * a digital I/O card as a 32-bit bit-mask.
484  *
485  * Specify the operations that can be used to combine a template bit mask with
486  * an established bit mask.
487  */
488  typedef enum {
489  BIT_MASK_SET, /* For each bit that is set in the template, set the */
490  /* corresponding bit in the established bit mask. */
491  BIT_MASK_CLEAR, /* For each bit that is set in the template, clear the */
492  /* corresponding bit in the established bit mask. */
493  BIT_MASK_ASSIGN, /* Set the established bit mask equal to the template. */
494  } BitMaskOper;
495 
496  typedef struct {
497  unsigned long value; /* The value to write to the register */
498  unsigned short board; /* The host-board of the register */
499  NetEnum oper; /* A BitMaskOper enumerator */
500  } NetSetDioCmd;
501 
502  /*
503  * A board becomes flagged as unreachable after a bus or access error occurs
504  * wrt any of its registers. Once this happens, modules such as the scanner
505  * stop trying to access the board. After fixing the problem, or if the
506  * problem is transient, the unflag command can be used to mark the board
507  * as reachable again. If this turns out to be incorrect and another bus
508  * error occurs on a subsequent register access, the board will be reflagged.
509  */
510  typedef struct {
511  unsigned short board; /* The register map index of the board to unflag */
512  } NetUnflagCmd;
513 
514  /*
515  * The following command turns on or off a given set of phase-shifter
516  * motors.
517  */
518  typedef struct {
519  NetBool on; /* True to switch the specified motors on, false */
520  /* to switch them off */
521  NetMask receivers; /* The bit-set of receivers whose shifters are to */
522  /* be switched. The phase shifter of receiver n */
523  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
524  } NetPhaseMotorCmd;
525 
526  /*
527  * The NetSetPolarCmd command sets up an association between a
528  * polarization state and an encoder position for a given set of
529  * receivers.
530  */
531  typedef enum {
532  LEFT, /* Left circular polarization */
533  RIGHT /* Right circular polarization */
534  } PolarState;
535 
536  typedef struct {
537  NetMask receivers; /* The bit-set of receivers whose shifters are to */
538  /* be switched. The phase shifter of receiver n */
539  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
540  NetEnum state; /* The PolarState enumeration */
541  NetUlong posn; /* The desired encoder position (1..1023) */
542 
543  } NetRxPolarCmd;
544 
545  /*
546  * The NetPolWalshCmd command sets the polarization state of receivers to the
547  * requested step of receiver Walsh functions
548  */
549  typedef struct {
550  NetUlong seq; /* The sequence number of this command */
551  NetMask receivers; /* The bit-set of receivers whose shifters are to */
552  /* be switched. The phase shifter of receiver n */
553  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
554  NetBool half_step; /* True to use a half-step for extra precision */
555  NetUlong walshstep; /* The desired step of the Walsh cycle */
556  } NetPolWalshCmd;
557 
558  /*
559  * The following command sets the positions of a given set of phase-shifter
560  * motors.
561  */
562  typedef struct {
563  NetUlong seq; /* The sequence number of this command */
564  NetUlong posn; /* The desired encoder position (0..1023) */
565  NetBool half_step; /* True to use a half-step for extra precision */
566  NetMask receivers; /* The bit-set of receivers whose shifters are to */
567  /* be moved. The phase shifter of receiver n, */
568  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
569  } NetPhaseShiftCmd;
570 
571  /*
572  * The following command selects a receiver
573  */
574  typedef struct {
575  NetEnum band; /* The receiver to select */
576  unsigned seq;
577  } NetSelectRxCmd;
578 
579  /*
580  * The following command sets a bias
581  */
582  typedef enum {
583  AMP = 0x1, // Biasing an amplifier
584  RX = 0x2, // Biasing a whole receiver
585  } BiasType;
586 
587  typedef struct {
588  NetEnum amp; // The amplifier bias to select
589  short bias; // The value to set
590  NetEnum biasType; // Are we biasing an amplifier or a receiver?
591  NetEnum rxId; // The receiver to select
592  bool isDefault; // If true, just set the values as defaults
593  unsigned seq;
594  } NetSetBiasCmd;
595 
596  /*
597  * The following command turns on or off a given set of heaters.
598  */
599  typedef struct {
600  NetBool on; /* True to switch the specified heaters on, false */
601  /* to switch them off */
602  NetMask heaters; /* The bit-set of heater types to be switched, the 3 */
603  /* least significant bits correspond to the first */
604  /* three elements of the rxn.htr_on[] register */
605  NetMask receivers; /* The bit-set of receivers whose heaters are to */
606  /* be switched. The heater of receiver n */
607  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
608  } NetRxHeaterCmd;
609 
610  /*
611  * The following command turns on or off a given set of coldheads.
612  */
613  typedef struct {
614  NetMask receivers; /* The bit-set of receivers whose heaters are to */
615  /* be switched. The heater of receiver n */
616  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
617  NetBool on; /* True to switch the specified coldheads on, false */
618  /* to switch them off */
619  } NetRxColdheadCmd;
620 
621  /*
622  * The following command sets the target sensor output voltages of the
623  * control-loops of a given set of heaters.
624  */
625  typedef struct {
626  NetUlong value; /* The output voltage multiplied by 409.6, (0-4096) */
627  NetMask heaters; /* The bit-set of heater types to be switched, the 3 */
628  /* least significant bits correspond to the first */
629  /* three elements of the rxn.htr_req[] register */
630  NetMask receivers; /* The bit-set of receivers whose heaters are to */
631  /* be switched. The heater of receiver n */
632  /* (n=0..12) is to be set if set&(1<<n))!=0. */
633  } NetRxTempCmd;
634 
635  typedef enum {
636  LO_NONE,
637  LO_DAMPGAIN,
638  LO_FREQ,
639  LO_LO_FREQ,
640  LO_DEFAULT_FREQ,
641  LO_LOOPGAIN,
642  LO_TOGGLE,
643  LO_VOLTAGE,
644  LO_DEFAULT_VOLTAGE,
645  LO_ID,
646  LO_TUNINGTABLE,
647  LO_ONEWIRE,
648  LO_AUTOLOCK,
649  LO_SETDACCOEFF,
650  LO_POS_GUNN_DEVICE,
651  LO_JOG_GUNN_DEVICE,
652  LO_HOME_GUNN_DEVICE
653  } LoMsgId;
654 
655  /*
656  * The following command enables or disables a given set of local
657  * oscillator stages in a given set of receivers.
658  */
659  typedef struct {
660  NetEnum msgId; // Which LO message is this?
661  NetEnum oscs; // The bit-set of oscillators whose stages we
662  // wish to switch on or off.
663  NetEnum stages; // The bit-set of stages to switch on or off. The
664  NetEnum rxId; // A mask of Rx::Ids
665  NetBool on; // True to switch the specified stages on,
666  // false to switch them off
667  unsigned short dampGain; // Used to set the damping gain of the Yig
668  unsigned short frequency; // Used to set the frequency of the Yig
669  unsigned short loopGain; // Used to set the loop gain of Var/Yig
670  unsigned short voltage; // Used to set the voltage of the Yig
671  unsigned char id; // Used to set the Yig/Gunn ID
672  unsigned char month; // Used to set the Yig/Gunn ID
673  unsigned char day; // Used to set the Yig/Gunn ID
674  unsigned char year; // Used to set the Yig/Gunn ID
675  unsigned char npt; // Used to set the Gunn ID
676  float coeff; // Used to set the DAC coefficient
677  int tunerPos;
678  int backshortPos;
679  int attenPos;
680  int position; // A position to command
681 
682  } NetLoCmd;
683 
684  /*.......................................................................
685  * The following command turns fast sampling on/off
686  */
687  typedef struct {
688  NetUlong channel;
689  NetBool start;
690  } NetFastSamplingCmd;
691 
695  typedef enum {
696  FIXED = 0x1,
697  ADJUSTABLE = 0x2,
698  GEOMETRIC = 0x4,
699  THERMAL = 0x8,
700  IONOSPHERIC = 0x10,
701  TROPOSPHERIC = 0x20,
702  CORR_OFFSET = 0x40,
703  NIA = 0x80
704  } DelayType;
705 
709  typedef struct {
710  double x;
711  double y;
712  double z;
713  double longitude;
714  double latitude;
715  double axisMis;
717 
721  typedef enum {
722  DDS_ENABLE,
723  DDS_DISABLE,
724  DDS_RESET,
725  } DDSState;
726 
730  typedef struct {
731  NetEnum state;
732  } NetDDSCmd;
733 
737  typedef struct {
738  long ddsId;
740 
744  typedef struct {
745  bool enable;
747 
751  typedef struct {
752  long input;
753  short phase;
754  NetEnum type;
756 
760  typedef struct {
761  long input;
762  double freq;
763  NetEnum type;
764  } NetSetLRFreqCmd;
765 
766  typedef enum {
767  LR_DDS,
768  LR_INPUT
769  } LRType;
770 
775  typedef struct {
776  long input;
777  long column;
779 
783  typedef struct {
784  long input;
785  bool enable;
787 
791  typedef struct {
792  long input;
793  double delay;
794  double mjd;
795  NetBool disc;
797 
801  typedef struct {
802  long input;
803  long freg;
804  long preg;
806 
810  typedef struct {
811  short phase;
813 
817  typedef struct {
818  double freq;
820 
824  typedef struct {
825  double pntRa;
826  double pntDec;
827  double phsRa;
828  double phsDec;
829  double freq;
830  double distance;
831  double mjd;
832  NetBool discontinuity;
834 
838  typedef struct {
839  double airTemp;
840  double atmPressure;
841  double dewPoint;
842  double relHumid;
844 
848  typedef struct {
849  double delay;
850  NetEnum delayType;
851  NetEnum rxId;
852  } NetSetDelayCmd;
853 
857  typedef struct {
858  NetBool use;
859  NetEnum delayType;
860  } NetUseDelayCmd;
861 
865  typedef struct {
866  NetBool on;
867  NetEnum target;
869 
870  /*
871  * The following command selects between 4 quadrature phase shifts per
872  * receiver.
873  */
874 
875  typedef enum { /* Enumerate the possible quadrature network states */
876  QUAD_0 = 0, /* No phase shift */
877  QUAD_90 = 1, /* A phase shift of 90 degrees */
878  QUAD_180 = 2, /* A phase shift of 180 degrees */
879  QUAD_270 = 3 /* A phase shift of 270 degrees */
880  } QuadPhase;
881 
882  typedef struct {
883  NetEnum state; /* A QuadPhase enumerator */
884  NetMask receivers; /* The bit-set of receivers whose oscillators are to */
885  /* be switched. The oscillator of receiver n */
886  /* (n=0..12) is to be switched if set&(1<<n))!=0. */
887  } NetRxQuadCmd;
888 
889  /*
890  * The following command is used to inform the control system of the
891  * location of the SZA.
892  */
893 #define SZA_MAX_ALT 10000.0 /* The max altitude above or below sea-level (m) */
894 
895  typedef struct {
896  long lon; /* The SZA longitude (east +ve) [-pi..pi] (milli-arcsec) */
897  long lat; /* The SZA latitude [-pi/2..pi/2] (milli-arcsec) */
898  long alt; /* The SZA altitude (mm) */
899  } NetSiteCmd;
900 
901  typedef struct {
902  double north; /* The north offset of an antenna */
903  double east; /* The east offset of an antenna */
904  double up; /* The up offset of an antenna */
905  } NetLocationCmd;
906 
907  typedef struct {
908  double east; /* The east offset of an antenna */
909  double north; /* The north offset of an antenna */
910  double up; /* The up offset of an antenna */
911  } NetDelayRefCmd;
912 
913  /*
914  * The first command sent to the controller after startup must be
915  * the following. Note that this command can not be sent at any
916  * other time. When a connection is first initiated to the
917  * translator layer, the scheduler automatically runs its
918  * initialization script. On start-up, the controller will send
919  * this message with start=true, and after the scheduler has
920  * completely sent the initialization script, it will queue this
921  * command to be sent with start=false.
922  */
923  typedef struct {
924  NetBool start;
925  } NetInitCmd;
926 
927  /*
928  * The following object is sent to halt the telescope.
929  */
930  typedef struct {
931  NetUlong seq; // The tracker sequence number of this command
932  NetMask antennas; // A bitwise union of antennas to control
933  } NetHaltCmd;
934 
935  /*
936  * The following object is sent to reboot the pmac
937  */
938  typedef struct {
939  NetUlong seq; /* The tracker sequence number of this command */
940  } NetRebootPmacCmd;
941 
942  /*
943  * The following object is used to request a telescope slew to a given
944  * mount position.
945  */
946  typedef enum { /* This must be kept in step with source.h::SourceAxes*/
947  DRIVE_AZ_AXIS=1, /* Slew the azimuth axis */
948  DRIVE_EL_AXIS=2, /* Slew the elevation axis */
949  DRIVE_DK_AXIS=4, /* Slew the deck axis */
950  DRIVE_ALL_AXES = DRIVE_AZ_AXIS | DRIVE_EL_AXIS | DRIVE_DK_AXIS
951  } DriveAxes;
952 
953  typedef struct {
954  char source[SRC_LEN]; /* The name of the source (see szaregs.h for SRC_LEN) */
955  NetUlong number; /* The catalog number of this source */
956  NetUlong seq; /* The sequence number of this command */
957  NetMask mask; /* A bitwise union of DriveAxes enumerated */
958  /* bits used to specify which of the following axis */
959  /* positions are to be used. */
960  long az; /* The target azimuth (0..360 degrees in mas) */
961  long el; /* The target elevation (0..90 degrees in mas) */
962  long dk; /* The target deck angle (-180..180 in mas) */
963  NetEnum type; // An sza::util::Tracking::Type enumerator
964  } NetSlewCmd;
965 
966  /*
967  * The NetTrackCmd is used to command the telescope to track a source.
968  * Sequential commands containing the same source name will be
969  * combined to form a scrolling interpolation table of up to 3 points
970  * at a time.
971  *
972  * On source changes the control program is expected to send three
973  * ephemeris entries for the source, one preceding the current time
974  * and two following it. It is thereafter expected to send a new
975  * ephemeris entry whenever the current time passes that of the
976  * second point in the table. The new entry must be for a later time
977  * than the existing 3rd entry.
978  *
979  * On receipt of a track command with a new source name, the tracker
980  * task will immediately command a slew to the first position received.
981  * It is anticipated that by the time the slew ends, the control program
982  * will have had more than enough time to send two more entries. If only
983  * one more entry has been received, linear interpolation will be used. If
984  * no new entries have been received then the details of the single entry
985  * will be used without any interpolation.
986  */
987 
988  typedef struct {
989  char source[SRC_LEN]; /* The name of the source (see szaregs.h
990  for SRC_LEN) */
991  NetUlong number; /* The catalog number of the source */
992  NetEnum srcType; /* The source type */
993  long seq; /* The sequence number of this command */
994  long mjd; /* The Terrestrial Time at which ra,dec are valid, */
995  /* as a Modified Julian Day number */
996  long tt; /* The number of TT milliseconds into day 'mjd' */
997  long ra; /* The desired apparent Right Ascension */
998  /* (0..360 degrees in mas) */
999  long dec; /* The desired apparent Declination */
1000  /* (-180..180 degrees in mas) */
1001  long dist; // The distance to the source if it is
1002  // near enough for parallax to be
1003  // significant. Specify the distance in
1004  // micro-AU Send 0 for distant sources.
1005  NetEnum type; // An sza::util::Tracking::Type enumerator
1006  } NetTrackCmd;
1007 
1008  /*
1009  * The following enumerators specify how new offsets are to effect
1010  * existing offsets.
1011  */
1012  typedef enum {
1013  OFFSET_ADD, /* Add the new offsets to any existing offsets */
1014  OFFSET_SET /* Replace the existing offsets with the new offsets */
1015  } OffsetMode;
1016 
1017  /*
1018  * The following command establishes new horizon pointing offsets.
1019  */
1020  typedef struct {
1021  NetUlong seq; /* The tracker sequence number of this command */
1022  NetMask axes; /* The set of axes to offset, as a union of SkyAxis */
1023  /* enumerators. */
1024  NetEnum mode; /* The effect of the offsets on existing offsets, chosen */
1025  /* from the above OffsetMode enumerators. */
1026  long az,el,dk; /* The offsets for the azimuth, elevation and deck axes */
1027  /* Only those values that correspond to axes included in */
1028  /* the 'axes' set will be used. */
1029  } NetMountOffsetCmd;
1030 
1031  /*
1032  * The following command establishes new equatorial pointing offsets.
1033  */
1034  typedef enum { /* The set of offsetable equatorial axes */
1035  EQUAT_RA_AXIS=1, /* The Right-Ascension axis */
1036  EQUAT_DEC_AXIS=2 /* The declination axis */
1037  } EquatAxis;
1038 
1039  typedef struct {
1040  NetUlong seq; /* The tracker sequence number of this command */
1041  NetMask axes; /* The set of equatorial axes to offset, as a union of */
1042  /* EquatAxis enumerators */
1043  NetEnum mode; /* The effect of the offsets on existing offsets, chosen */
1044  /* from OffsetMode enumerators. */
1045  long ra,dec; /* The offsets for the right-ascension and declination axes */
1046  /* Only those values that correspond to axes included in */
1047  /* the 'axes' set will be used. */
1048  } NetEquatOffsetCmd;
1049 
1050  /*
1051  * The following command asks the tracker to add to the az and el
1052  * tracking offsets such that the image on the tv monitor of the
1053  * optical-pointing telescope moves by given amounts horizontally
1054  * and vertically.
1055  */
1056  typedef struct {
1057  NetUlong seq; /* The tracker sequence number of this command */
1058  long up; /* The amount to move the image up on the display (mas) */
1059  long right; /* The amount to move the image right on the display (mas) */
1060  } NetTvOffsetCmd;
1061 
1062  /*
1063  * The following command sets the deck angle at which the vertical
1064  * direction on the tv monitor of the optical telescope matches
1065  * the direction of increasing topocentric elevation.
1066  */
1067  typedef struct {
1068  long angle; /* The deck angle at which the camera image is upright (mas) */
1069  } NetTvAngleCmd;
1070 
1071  /*
1072  * The SkyOffset command tells the tracker to track a point at a given
1073  * fixed sky offset from the normal pointing center, regardless of
1074  * elevation or declination. This is used primarily for making beam
1075  * maps.
1076  */
1077  typedef enum { /* Set members for the NetSkyOffsetCmd axes member. */
1078  SKY_X_AXIS = 1, /* The NetSkyOffsetCmd::x axis */
1079  SKY_Y_AXIS = 2, /* The NetSkyOffsetCmd::y axis */
1080  } SkyXYAxes;
1081 
1082  typedef struct {
1083  NetUlong seq; /* The tracker sequence number of this command */
1084  NetMask axes; /* The set of axes to offset, as a union of SkyXYAxes */
1085  /* enumerators. */
1086  NetEnum mode; /* The effect of the new offsets on any existing offsets, */
1087  /* chosen from OffsetMode enumerators. */
1088  long x,y; /* The 2-dimensional angular offset, expressed as distances */
1089  /* along two great circles that meet at right angles at the */
1090  /* normal pointing center. The y offset is directed along */
1091  /* the great circle that joins the normal pointing center */
1092  /* to the zenith. The x offset increases along the */
1093  /* perpendicular great circle to this, increasing from */
1094  /* east to west. Both offsets are measured in */
1095  /* milli-arcseconds. */
1096  } NetSkyOffsetCmd;
1097 
1098  /*
1099  * The NetUt1UtcCmd and NetEqnEqxCmd commands are used to send occasional
1100  * updates of variable earth orientation parameters.
1101  *
1102  * For each command the control system retains a table of the 3 most
1103  * recently received updates. These three values are quadratically
1104  * interpolated to yield orientation parameters for the current time.
1105  * On connection to the control system, the control program is expected
1106  * to send values for the start of the current day, the start of the following
1107  * day and the start of the day after that. Thereafter, at the start
1108  * of each new day, it should send parameters for a time two days
1109  * in the future.
1110  *
1111  * On startup of the control system, requests for ut1utc and eqex
1112  * will return zero. On receipt of the first earth-orientation command,
1113  * requests for orientation parameters will return the received values.
1114  * On the receipt of the second, requesters will receive a linear
1115  * interpolation of the parameters. On receipt of the third and subsequent
1116  * commands, requesters will receive quadratically interpolated values
1117  * using the parameters of the three most recently received commands.
1118  */
1119  typedef struct {
1120  long mjd; /* The UTC to which this command refers as a Modified */
1121  /* Julian Day number */
1122  long utc; /* The number of UTC milliseconds into day 'mjd' */
1123  long ut1utc; /* The value of ut1 - utc (us) */
1124  } NetUt1UtcCmd;
1125 
1126  typedef struct {
1127  long mjd; /* The Terrestrial Time to which this command refers, */
1128  /* as a Modified Julian day number */
1129  long tt; /* The number of TT milliseconds into day 'mjd' */
1130  long eqneqx; /* The equation of the equinoxes (mas) */
1131  } NetEqnEqxCmd;
1132 
1133  /*
1134  * The NetEncoderCalsCmd is used to calibrate the scales and directions
1135  * of the telescope encoders.
1136  */
1137  typedef struct {
1138  NetUlong seq; /* The tracker sequence number of this command */
1139  long az; /* Azimuth encoder counts per turn */
1140  long el; /* Elevation encoder counts per turn */
1141  long dk; /* Deck encoder counts per turn */
1142  } NetEncoderCalsCmd;
1143 
1144  /*
1145  * The NetEncoderZerosCmd is used to set the zero points of the telescope
1146  * encoders. The angles are measured relative to the position at which the
1147  * encoders show zero counts.
1148  */
1149  typedef struct {
1150  NetUlong seq; // The tracker sequence number of this command
1151  double az; // Azimuth encoder angle at zero azimuth, measured in
1152  // the direction of increasing azimuth (radians).
1153  double el; // Elevation encoder angle at zero elevation,
1154  // measured in the direction of increasing elevation
1155  // (radians).
1156  double dk; // Deck encoder angle at the deck reference position,
1157  // measured clockwise when looking towards the sky
1158  // (radians).
1159  } NetEncoderZerosCmd;
1160 
1161  /*
1162  * The NetSlewRateCmd is used to set the slew speeds of each of the
1163  * telescope axes. The speed is specified as a percentage of the
1164  * maximum speed available.
1165  */
1166  typedef struct {
1167  NetUlong seq; /* The tracker sequence number of this command */
1168  NetMask mask; /* A bitwise union of DriveAxes enumerated */
1169  /* bits, used to specify which of the following axis */
1170  /* rates are to be applied. */
1171  long az; /* Azimuth slew rate (0-100) */
1172  long el; /* Elevation slew rate (0-100) */
1173  long dk; /* Deck slew rate (0-100) */
1174  } NetSlewRateCmd;
1175 
1176  /*
1177  * The NetTiltsCmd is used to calibrate the axis tilts of the
1178  * telescope.
1179  */
1180  typedef struct {
1181  NetUlong seq; /* The tracker sequence number of this command */
1182  long ha; /* The hour-angle component of the azimuth-axis tilt (mas) */
1183  long lat; /* The latitude component of the azimuth-axis tilt (mas) */
1184  long el; /* The tilt of the elevation axis perpendicular to the */
1185  /* azimuth ring, measured clockwise around the direction */
1186  /* of the azimuth vector (mas) */
1187  } NetTiltsCmd;
1188 
1189  /*
1190  * The NetFlexureCmd is used to calibrate the gravitational flexure of the
1191  * telescope.
1192  */
1193  typedef struct {
1194  NetUlong seq; /* The tracker sequence number of this command */
1195  NetEnum mode; /* An sza::util::PointingMode enumeration */
1196  long sFlexure; /* Gravitational flexure (milli-arcsec per sine elevation) */
1197  long cFlexure; /* Gravitational flexure (milli-arcsec per cosine elevation) */
1198  } NetFlexureCmd;
1199 
1200  /*
1201  * The NetCollimateCmd command is used to calibrate the collimation of
1202  * the optical or radio axes.
1203  */
1204  typedef struct {
1205  NetUlong seq; /* The tracker sequence number of this command */
1206  NetEnum mode; /* An sza::util::PointingMode enumeration */
1207  long x; /* The magnitude of the azimuthal offset (mas) */
1208  long y; /* The magnitude of the elevation offset (mas) */
1209  NetEnum addMode; // The effect of the new offsets on any
1210  // existing offsets, chosen from OffsetMode
1211  // enumerators.
1212  } NetCollimateCmd;
1213 
1214  /*
1215  * The NetEncoderLimitsCmd command tells the tracker task what the limits
1216  * on encoder values are.
1217  */
1218  typedef struct {
1219  NetUlong seq; /* The tracker sequence number of this command */
1220  long az_min; /* The lower azimuth limit (encoder counts) */
1221  long az_max; /* The upper azimuth limit (encoder counts) */
1222  long el_min; /* The lower elevation limit (encoder counts) */
1223  long el_max; /* The upper elevation limit (encoder counts) */
1224  long pa_min; /* The lower pa limit (encoder counts) */
1225  long pa_max; /* The upper pa limit (encoder counts) */
1226  } NetEncoderLimitsCmd;
1227 
1228  /*
1229  * The NetModelCmd command selects between the optical and radio pointing
1230  * models.
1231  */
1232  typedef struct {
1233  NetUlong seq; /* The tracker sequence number of this command */
1234  NetEnum mode; /* A PointingMode enumeration */
1235  } NetModelCmd;
1236 
1237  /*
1238  * The NetYearCmd command tells the control system what the
1239  * current year is. This is necessary because the gps time-code reader
1240  * doesn't supply year information.
1241  */
1242  typedef struct {
1243  short year; /* The current Gregorian year */
1244  } NetYearCmd;
1245 
1246  /*
1247  * The NetDeckModeCmd command tells the track task how to position
1248  * the deck axis while tracking a source.
1249  */
1250  typedef struct {
1251  NetUlong seq; /* The tracker sequence number of this command */
1252  NetEnum mode; /* A DeckMode enumerator from szaregs.h */
1253  } NetDeckModeCmd;
1254 
1255  /*
1256  * The atmosphere command is used to supply atmospheric parameters for
1257  * refraction computations in the weather-station task. It is not
1258  * needed when the weather station is functioning.
1259  */
1260  typedef struct {
1261  double temperature; /* The outside temperature (mC) */
1262  double humidity; /* The relative humidity (0-1)*1000 */
1263  double pressure; /* The atmospheric pressure (micro-bar) */
1264  } NetAtmosCmd;
1265 
1266  /*
1267  * The feature command conveys a bit-mask to be added or removed from the
1268  * set of feature bits to be recorded with one or more subsequent archive
1269  * frames. Once a feature bit has been added to the transient or persistent
1270  * set of feature bits, it is guaranteed to be recorded in at least one
1271  * frame. For transient markers the feature bits are recorded in the next
1272  * frame only, whereas persistent feature markers will continue to appear
1273  * in subsequent frames until they are cancelled.
1274  */
1275  typedef enum {
1276  FEATURE_ADD, /* Add the new set of feature bits to those that are */
1277  /* to be recorded in subsequent frames. */
1278  FEATURE_REMOVE, /* Remove the specified set of features from those that */
1279  /* have previously been registered with FEATURE_ADD */
1280  FEATURE_ONE /* Add the new set of feature bits to the transient set */
1281  /* which is to be recorded just in the next frame. */
1282  } FeatureMode;
1283 
1284  typedef struct {
1285  NetUlong seq; /* The mark-command sequence number of this message */
1286  NetEnum mode; /* What to do with the bit mask */
1287  unsigned long mask; /* The bit-mask to merge with any existing bit mask. */
1288  } NetFeatureCmd;
1289 
1290  /*
1291  * Specify the maximum size of a GPIB data message.
1292  * Note that this effects both the size of network communications
1293  * buffers and the size of some message queue nodes, so it shouldn't
1294  * be made too large.
1295  */
1296 #define GPIB_MAX_DATA 80
1297 
1298  /*
1299  * The gpib-send command tells the GPIB control task to try to send the
1300  * specified message to a given GPIB device.
1301  */
1302  typedef struct {
1303  unsigned short device; /* The generic address of the target */
1304  /* GPIB device (0..30). */
1305  char message[GPIB_MAX_DATA+1]; /* The message to be sent. */
1306  } NetGpibSendCmd;
1307 
1308  /*
1309  * The gpib-read command tells the GPIB control task to try to read a
1310  * message from a given GPIB device.
1311  */
1312  typedef struct {
1313  unsigned short device; /* The generic address of the source */
1314  /* GPIB device (0..30). */
1315  } NetGpibReadCmd;
1316 
1317  /*
1318  * Turns power on/off to one or more antenna breakers
1319  */
1320  typedef struct {
1321  NetUlong breaker;
1322  NetBool power;
1323  } NetPowerCmd;
1324 
1325  /*
1326  * The noise-times command changes the time between noise-cal power
1327  * readouts.
1328  */
1329  typedef struct {
1330  unsigned long seconds; /* The interval between power readings (seconds) */
1331  } NetPowerDtCmd;
1332 
1333  /*
1334  * The NetPowerMeterCmd sends a command to the noise-cal power meter.
1335  *
1336  * Enumerate the supported power-meter commands in order of decreasing
1337  * priority. Commands with higher priority will be transacted before
1338  * those of lower priority.
1339  */
1340  typedef enum {
1341  NCAL_POWER_RESET, /* Reinstate the power meter's power-on settings */
1342  NCAL_POWER_ZERO, /* Perform a zero calibration */
1343  NCAL_POWER_READ, /* Take periodic power readings */
1344  /* The next enumerator must always be last */
1345  NCAL_POWER_NCMD /* The number of commands enumerated above */
1346  } NcalPowerCmd;
1347 
1348  typedef struct {
1349  NetEnum cmd; /* One of the commands listed above */
1350  } NetPowerMeterCmd;
1351 
1352  /*
1353  * The chzr_power command initiates a search for the IF attenuations
1354  * that result in outputs from specified total-power detectors that
1355  * are close to a given power level.
1356  */
1357  typedef struct {
1358  NetUlong seq; /* The sequence number of this command */
1359  NetMask bands; /* The bit-set of bands whose attenuators are to */
1360  /* be configured. The attenuator of band n */
1361  /* (n=0..N_BAND-1) is to be configured if */
1362  /* set&(1<<n))!=0. */
1363  NetMask receivers; /* The bit-set of receivers whose attenuators are to */
1364  /* be configured. The attenuator of receiver n */
1365  /* (n=0..N_ANT-1) is to be configured if */
1366  /* set&(1<<n))!=0. */
1367  float power; /* The desired output of the total-power
1368  In calibrated units */
1369  } NetChzrPowerCmd;
1370 
1371  /*
1372  * The chzr_zero command initiates a procedure that measures the
1373  * zero-offset of a given set of total-power detectors.
1374  */
1375  typedef struct {
1376  NetUlong seq; /* The sequence number of this command */
1377  NetMask bands; /* The bit-set of bands whose sensor zero-offsets */
1378  /* are to be found. Band n (n=0..N_BAND-1) is to */
1379  /* be processed if (bands & (1<<n))!=0. */
1380  NetMask receivers; /* The bit-set of receivers whose sensor */
1381  /* zero-offsets are to be measured. Receiver n */
1382  /* (n=0..N_ANT-1) is to be configured if */
1383  /* (receivers & (1<<n))!=0. */
1384  } NetChzrZeroCmd;
1385  /*
1386  * The tpcal command installs total powers calibration factors for a given set'* of receivers and bands.
1387  */
1388  typedef struct {
1389  NetMask bands; /* The bit-set of bands whose total power
1390  calibration sare to be changed */
1391  NetMask receivers; /* The bit-set of receivers whose total offsets
1392  are to be changed. */
1393  float offset; /* The offset to apply to the total powers */
1394  NetBool offset_present;/* Was an offset change requested in this command? */
1395  float factor; /* The factor to apply to the total powers */
1396  NetBool factor_present;/* Was an factor change requested in this command? */
1397  } NetTpcalCmd;
1398 
1399  /*
1400  * The following enumerators specify if the attn avlue is absolute
1401  * or additive
1402  */
1403  typedef enum {
1404  ATTN_ADD, /* Add the new attn to the existing attn */
1405  ATTN_SET /* Replace the existing attn with the new attn */
1406  } AttnMode;
1407 
1408  /*
1409  * The chzr_attn command sets the inserted attenuations of a given
1410  * set of IF channels.
1411  */
1412  typedef struct {
1413  NetMask bands; /* The bit-set of bands whose attenuators */
1414  /* are to be set. Band n (n=0..N_BAND-1) is to */
1415  /* be configured if (bands & (1<<n))!=0. */
1416  NetMask receivers; /* The bit-set of receivers whose attenuators */
1417  /* are to be set. Receiver n (n=0..N_ANT-1) is */
1418  /* to be configured if (receivers & (1<<n))!=0. */
1419  long attn; /* The desired attenuation (-31-31db) */
1420  NetEnum mode; /* Additive or absolute attenuation value */
1421  } NetChzrAttnCmd;
1422 
1423  /*
1424  * The chzr_switch command sets the on/off states of a given
1425  * set of IF channels.
1426  */
1427  typedef struct {
1428  NetMask bands; /* The bit-set of bands whose switches */
1429  /* are to be set. Band n (n=0..N_BAND-1) is to */
1430  /* be configured if (bands & (1<<n))!=0. */
1431  NetMask receivers; /* The bit-set of receivers whose switches */
1432  /* are to be set. Receiver n (n=0..N_ANT-1) is */
1433  /* to be configured if (receivers & (1<<n))!=0. */
1434  NetBool on; /* True to switch the specified channels on, false */
1435  /* to switch them off */
1436  } NetChzrSwitchCmd;
1437 
1438  /*
1439  * The chzr_enable command temporarily disables or reenables all of
1440  * the channelizer IF amplifiers. Note that the switch states are
1441  * ORed with those set by the chzr_switch command, so that on using
1442  * this command to reenable the IFs, those that had been disabled
1443  * separately by the chzr_switch command, remain disabled.
1444  */
1445  typedef struct {
1446  NetBool on; /* True to switch the IFs on, false to switch */
1447  /* them off */
1448  } NetChzrEnableCmd;
1449 
1450  /*
1451  * The noise_cal command connects or disconnects the noise-calibration
1452  * signal from all of the receivers.
1453  */
1454  typedef struct {
1455  NetBool on; /* True to connect the noise-source, false to */
1456  /* disconnect it. */
1457  } NetNoiseCalCmd;
1458 
1459  /*
1460  * The NetRxSimCmd configures the receiver simulation box.
1461  */
1462  typedef enum { /* Enumerated bit values for NetRxSimCmd::what */
1463  RX_SIM_NOISE=1, /* Configure the noise generators */
1464  RX_SIM_SKY=2, /* Configure the fake-sky signal generator */
1465  RX_SIM_QUAD=4 /* Configure the quadrature phase-shifters */
1466 
1467  } RxSimSel;
1468 
1469  typedef struct {
1470  NetMask what; /* A bitwise union of RxSimSel enumeration values */
1471  /* specifying which of the following members should */
1472  /* used to configure the receiver simulator. */
1473  NetMask noise; /* The bit-set of receivers whose noise sources */
1474  /* are to be enabled. Receiver n (n=0..N_ANT-1) is */
1475  /* to be enabled if (noise & (1<<n))!=0. */
1476  NetMask quad; /* The bit-set of receivers whose 90 degree */
1477  /* phase-shifters are to be enabled. */
1478  /* Receiver n (n=0..N_ANT-1) is to be enabled */
1479  /* if (noise & (1<<n))!=0. */
1480  NetBool sky; /* True to switch the fake sky signal on */
1481  } NetRxSimCmd;
1482  /*
1483  * Enumerate the allowed DS commands
1484  */
1485  typedef enum {
1486  DS_READ_CMD, /* Read the temp from a single device */
1487  DS_READALL_CMD, /* Read the temp from all devices */
1488  DS_ADDRESS_CMD, /* Call out an address */
1489  DS_RESET_CMD, /* Reset the controller */
1490  DS_INIT_CMD, /* Re-initialize the serial port connection */
1491  DS_SEARCH_CMD, /* Search the bus for devices */
1492  DS_ROMID_CMD, /* Install a ROM id in the list of known devices */
1493  DS_FLAG_CMD, /* Flag a device as unreachable */
1494  DS_UNFLAG_CMD, /* Flag a device as reachable */
1495  DS_DISPLAY_CMD, /* Display known devices */
1496  DS_CHECK_CMD, /* Add checksumming to commands */
1497  DS_NOCHECK_CMD, /* Remove checksumming */
1498  } DsCommand;
1499 
1500  /*
1501  * The thermometer command sends commands to the DS1820 digital thermometers.
1502  */
1503  typedef struct {
1504  NetEnum command; /* The enumerated command above to send */
1505  unsigned char address[16];/* The optional address to send */
1506  NetUlong index; /* The index to assign this address to */
1507  NetBool checksum; /* Add checksumming? */
1508  } NetThermoCmd;
1509  /*
1510  * The ds-times command changes the time between DS1820 temperature
1511  * readouts.
1512  */
1513  typedef struct {
1514  unsigned long seconds; /* The interval between power readings (seconds) */
1515  } NetDsDtCmd;
1516  /*
1517  * The NetStepperCmd controls the stepper motor.
1518  */
1519  typedef struct {
1520  long count; /* The stepper motor count. */
1521  } NetStepperCmd;
1522  /*
1523  * The NetOptCamCntlCmd controls the camera/stepper motor power.
1524  */
1525  typedef struct {
1526  NetEnum target; /* Which device to control */
1527  NetBool on; /* Turn device on/off? */
1528  } NetOptCamCntlCmd;
1529  /*
1530  * The NetOptCamCmd controls miscellaneous camera functions.
1531  */
1532  typedef struct {
1533  NetEnum target; /* The enumerated target of this operation */
1534  NetEnum action; /* The action to take. */
1535  } NetOptCamCmd;
1536  /*
1537  * Enumerate the optical camera target options.
1538  */
1539  typedef enum {
1540  OPTCAM_FRAME, /* Target is the frame grabber */
1541  OPTCAM_CAMERA, /* Controls power to the camera */
1542  OPTCAM_CONTROLLER,/* Commands intended for the controller box. */
1543  OPTCAM_STEPPER, /* Controls power to the stepper motor */
1544  OPTCAM_FOCUS, /* Controls the stepper motor count. */
1545  OPTCAM_IRIS, /* Camera iris commands. */
1546  OPTCAM_SHUT, /* Controls camera shutter speed. */
1547  OPTCAM_SENS_AUTO, /* Electronic sensitivity enhancement. */
1548  OPTCAM_SENS_MANU, /* Electronic sensitivity enhancement. */
1549  OPTCAM_AGC, /* Auto gain control. */
1550  OPTCAM_ALC, /* Auto light control setting. */
1551  OPTCAM_MANU_IRIS, /* Manual Iris (Toggles to ELC?) */
1552  OPTCAM_SUPERD, /* Super D mode */
1553  } OptCamTarget;
1554  /*
1555  * Enumerate the optical camera action options.
1556  */
1557  typedef enum {
1558  OPTCAM_ID=20000,/* Request the controller id. Note that the first element in
1559  this list must be set to 20000 */
1560  OPTCAM_GRAB, /* Tell the frame grabber to take a frame */
1561  OPTCAM_RBC, /* Request the controller to drop buffered commands rbc. */
1562  OPTCAM_OPEN, /* Open the iris */
1563  OPTCAM_CLOSE, /* Close the iris */
1564  OPTCAM_STOP, /* Stop the iris? */
1565  OPTCAM_PRESET, /* Reset the iris, or when used with the
1566  OPTCAM_CAMERA Target, reset the entire camera to
1567  factory presets */
1568  OPTCAM_ON, /* Turn target on */
1569  OPTCAM_OFF, /* Turn target off */
1570  OPTCAM_INC, /* Increment target */
1571  OPTCAM_DEC, /* Decrement target */
1572  OPTCAM_LOW, /* Set the gain to low */
1573  OPTCAM_MID, /* Set the gain to mid */
1574  OPTCAM_HIGH, /* Set the gain to high */
1575  OPTCAM_100, /* Set shutter speed to 1/100 s */
1576  OPTCAM_250, /* Set shutter speed to 1/250 s */
1577  OPTCAM_500, /* Set shutter speed to 1/500 s */
1578  OPTCAM_1000, /* Set shutter speed to 1/1000 s */
1579  OPTCAM_2000, /* Set shutter speed to 1/2000 s */
1580  OPTCAM_4000, /* Set shutter speed to 1/4000 s */
1581  OPTCAM_10000, /* Set shutter speed to 1/10000 s */
1582  OPTCAM_CENTER, /* Move to the peak of the image */
1583  } OptCamAction;
1584  /*
1585  * The NetFgCmd writes to miscellaneous frame grabber registers.
1586  */
1587  typedef struct {
1588  NetEnum target; /* The enumerated target of this operation */
1589  unsigned long value; /* The value to write to the register */
1590  } NetFgCmd;
1591  /*
1592  * The NetFlatFieldCmd toggles frame grabber flat fielding
1593  */
1594  typedef struct {
1595  NetBool on; /* If true, flat field frame grabber images */
1596  } NetFlatFieldCmd;
1597 
1598  /*
1599  * Enumerate the frame grabber register options.
1600  */
1601  typedef enum {
1602  FG_INCSR1_REG,
1603  FG_INCSR2_REG,
1604  FG_OUTCSR_REG,
1605  FG_CURSOR_REG,
1606  FG_INDEX_REG,
1607  FG_INLUT_REG,
1608  FG_REDGRN_REG,
1609  FG_BLUE_REG,
1610  } FgReg;
1611 
1612  /*
1613  * Enumerate the frame grabber peak options.
1614  */
1615  typedef enum {
1616  PEAK_X,
1617  PEAK_Y,
1618  PEAK_XABS,
1619  PEAK_YABS,
1620  } Peak;
1621 
1622  /*
1623  * Enumerate the frame grabber image statistic options.
1624  */
1625  typedef enum {
1626  IMSTAT_PEAK,
1627  IMSTAT_SNR
1628  } Imstat;
1629 
1633  typedef enum {
1634  FG_NONE=0x0,
1635  FG_CHAN=0x1,
1636  FG_COMBINE=0x2,
1637  FG_FLATFIELD=0x4
1638  } FgOpt;
1639 
1640  /*
1641  * The NetConfigureFrameGrabberCmd configures the frame grabber.
1642  */
1643  typedef struct {
1644  unsigned mask; /* The mask of parameters to configure */
1645  unsigned channel; /* The channel number to selec */
1646  unsigned nCombine; /* The number of frames to combine */
1647  NetBool flatfield; // If true, flatfield the image
1648  } NetConfigureFrameGrabberCmd;
1649 
1650  //------------------------------------------------------------
1651  // Downconverter control commands.
1652  //------------------------------------------------------------
1653 
1654  // Set the Psys power
1655 
1656  typedef struct {
1657  double power;
1658  NetBool preset;
1659  NetMask bands;
1660  } NetPsysCmd;
1661 
1662  // Set the Psys attenuation
1663 
1664  typedef struct {
1665  double atten;
1666  NetMask bands;
1667  } NetPsysAttenCmd;
1668 
1669  // Set the Ifout power
1670 
1671  typedef struct {
1672  double power;
1673  NetBool preset;
1674  NetMask bands;
1675  } NetIfoutCmd;
1676 
1677  // Set the Ifout attenuation
1678 
1679  typedef struct {
1680  double atten;
1681  NetMask bands;
1682  } NetIfoutAttenCmd;
1683 
1684  // Enable the RF amplifier
1685 
1686  typedef struct {
1687  bool enable;
1688  NetMask bands;
1689  } NetRfAmpCmd;
1690 
1691  // Enable the IF automatic level control
1692 
1693  typedef struct {
1694  bool enable;
1695  NetMask bands;
1696  } NetIfAlcCmd;
1697 
1698  //-----------------------------------------------------------------------
1699  // Noise source commands.
1700  //-----------------------------------------------------------------------
1701 
1702  // Set the output power
1703 
1704  typedef struct {
1705  double power;
1706  NetBool preset;
1707  } NetNoisePowerCmd;
1708 
1709  // Set the noise source attenuation
1710 
1711  typedef struct {
1712  unsigned short atten;
1713  } NetNoiseAttenCmd;
1714 
1715  // Set the tone (?) attenuation
1716 
1717  typedef struct {
1718  unsigned short atten;
1719  } NetToneAttenCmd;
1720 
1721  //------------------------------------------------------------
1722  // Noise diode commands
1723  //------------------------------------------------------------
1724 
1725  typedef enum {
1726  NOISE_SIMPLE, // Toggle just the noise diode
1727  NOISE_ALL // Toggle noise diode, quadmods, and configure
1728  // the correlator
1729  } NoiseType;
1730 
1731  // Turn the noise source on
1732 
1733  typedef struct {
1734  NetMask mask; // A bitwise union of NoiseType enumerations
1735  bool enable; // True if the noise source is to be enabled
1736  NetUlong seq; // The sequence number of the transaction that completed
1737  } NetNoiseCmd;
1738 
1739  // Turn the tone on
1740 
1741  typedef struct {
1742  bool enable;
1743  } NetToneCmd;
1744 
1745  //-----------------------------------------------------------------------
1746  // Quad Mod commands.
1747  //-----------------------------------------------------------------------
1748 
1749  // Set the output power
1750 
1751  typedef struct {
1752  double power;
1753  NetBool preset;
1754  } NetQuadPowerCmd;
1755 
1756  // Set the quad attenuation
1757 
1758  typedef struct {
1759  unsigned short atten;
1760  } NetQuadAttenCmd;
1761 
1762  // Set the quad walsh state column
1763 
1764  typedef struct {
1765  unsigned short column;
1766  } NetQuadWalshColCmd;
1767 
1768  // Turn quad modulation on
1769 
1770  typedef struct {
1771  bool enable;
1772  } NetQuadCmd;
1773 
1774  // Set the quad phase state
1775 
1776  typedef struct {
1777  unsigned short phase;
1778  } NetQuadPhaseCmd;
1779 
1780  //-----------------------------------------------------------------------
1781  // CAN module control
1782  //-----------------------------------------------------------------------
1783 
1784  typedef struct {
1785  NetEnum modules;
1786  NetMask bands;
1787  NetBool hard;
1788  } NetResetCmd;
1789 
1790  //-----------------------------------------------------------------------
1791  // CalTert control
1792  //-----------------------------------------------------------------------
1793 
1794  enum CalTertMsg {
1795  CALTERT_POSITION_CAL,
1796  CALTERT_HOME_TERT,
1797  CALTERT_POSITION_TERT,
1798  CALTERT_ENABLE_TERT,
1799  CALTERT_RESET_STEPPER,
1800  CALTERT_INDEX_TERT,
1801  CALTERT_ONE_WIRE,
1802  CALTERT_SET_ENCODER,
1803  CALTERT_STORE_ENCODER,
1804  CALTERT_NEW_TERT_POS_ANGLE,
1805  CALTERT_NEW_TERT_POS_RX
1806  };
1807 
1808  // Enumerate special values which will signify indexed tertiary positions
1809 
1810  enum TertPos {
1811  TERTPOS_RX30GHZ = 0x10000, // Note that these must all be >= 2^16 (see
1812  // szatypes.c, where they are used)
1813  TERTPOS_RX90GHZ = 0x20000,
1814  TERTPOS_RX230GHZ = 0x40000,
1815  };
1816 
1817  typedef struct {
1818  NetEnum msgId;
1819  NetEnum rxId;
1820  short tertPosition;
1821  NetEnum calPosition;
1822  NetBool enable;
1823  NetEnum owDevice;
1824  NetEnum owCommand;
1825  NetUlong seq;
1826  } NetCalTertCmd;
1827 
1828  enum ThermalMsg {
1829  THERMAL_SET_TEMP,
1830  THERMAL_SET_MODE,
1831  THERMAL_SET_LOOP_GAIN,
1832  THERMAL_SET_INTEG_CONST,
1833  THERMAL_SET_LOOP_BW,
1834  THERMAL_SET_RATE_CONST,
1835  THERMAL_SET_PROP_CONST,
1836  THERMAL_SET_VOLTAGE_OFFSET,
1837  THERMAL_SET_EBOX_EQ_STATE,
1838  THERMAL_SET_EBOX_INT_ERROR
1839  };
1840 
1841  typedef struct {
1842  NetEnum msgId;
1843  NetEnum target;
1844  float value;
1845  NetEnum mode;
1846  NetEnum state;
1847  } NetThermalCmd;
1848 
1849  enum TiltmeterMsg {
1850  TILTMETER_SET_TEMP,
1851  TILTMETER_REGULATE_TEMP,
1852  TILTMETER_SET_LOOP_GAIN,
1853  TILTMETER_SET_INTEG_CONST,
1854  TILTMETER_SET_RATE_CONST,
1855  TILTMETER_SET_LOOP_BW,
1856  TILTMETER_WRITE_TO_EEPROM,
1857  TILTMETER_ZEROS,
1858  };
1859 
1860  enum TiltmeterMode {
1861  ON,
1862  OFF,
1863  MANUAL
1864  };
1865 
1866  typedef struct {
1867  NetEnum msgId;
1868  NetEnum mode;
1869  float value;
1870  } NetTiltmeterCmd;
1871 
1872  // Antenna IntMod command
1873 
1874  enum IntModMsg {
1875  INTMOD_SET_ATTEN,
1876  INTMOD_SET_DEFAULT_ATTEN,
1877  INTMOD_PRESET_POWER,
1878  };
1879 
1880  typedef struct {
1881  NetEnum msgId;
1882  unsigned char atten;
1883  } NetIntModCmd;
1884 
1885  // Antenna IF command
1886 
1887  enum IFModMsg {
1888  IFMOD_SET_LEVEL,
1889  IFMOD_SET_ATTEN,
1890  IFMOD_SET_DEFAULT_ATTEN,
1891  IFMOD_POSITION_SWITCH,
1892  IFMOD_SET_TO_DEFAULT
1893  };
1894 
1895  typedef struct {
1896  NetEnum msgId;
1897  NetEnum band;
1898  double level;
1899  NetEnum attenSet;
1900  double total;
1901  double input;
1902  double output;
1903  NetUlong seq;
1904  NetEnum pos;
1905  } NetIFModCmd;
1906 
1907  enum FlipDelayTarget {
1908  FLIP_DELAY = 0x1,
1909  FLIP_RATE = 0x2,
1910  FLIP_BOTH = FLIP_DELAY | FLIP_RATE
1911  };
1912 
1913  enum DelayTarget {
1914  DELAY_CORR = 0x1,
1915  DELAY_LR = 0x2,
1916  DELAY_ALL = DELAY_CORR | DELAY_LR
1917  };
1918 
1919  typedef struct {
1920  NetEnum target;
1921  NetEnum delayTarget;
1922  bool delay;
1923  bool rate;
1924  } NetFlipDelayCmd;
1925 
1926  enum SynthMsg {
1927  SYNTH_FREQ,
1928  SYNTH_POW,
1929  SYNTH_RFOUTPUT,
1930  SYNTH_OUTPUTMOD,
1931  };
1932 
1933  typedef struct {
1934  NetEnum msgId;
1935  double val;
1936  bool enable;
1937  } NetSynthCmd;
1938 
1939  /*
1940  * Create a union of the above command containers.
1941  */
1942  typedef union {
1943  NetShutdownCmd shutdown;
1944  NetIntervalCmd interval;
1945  NetInhibitCmd inhibit;
1946  NetSetregCmd setreg;
1947  NetSetDioCmd setdio;
1948  NetUnflagCmd unflag;
1949  NetPhaseMotorCmd phase_motor;
1950  NetPhaseShiftCmd phase_shift;
1951  NetSelectRxCmd selectRx;
1952  NetSetBiasCmd setBias;
1953  NetRxHeaterCmd rx_heater;
1954  NetRxColdheadCmd rx_coldhead;
1955  NetRxTempCmd rx_temp;
1956  NetLoCmd lo;
1957  NetRxQuadCmd rx_quad;
1958  NetRxPolarCmd rx_polar;
1959  NetPolWalshCmd rx_polwalsh;
1960  NetSiteCmd site;
1961  NetLocationCmd location;
1962  NetDelayRefCmd delayref;
1963  NetInitCmd init;
1964  NetHaltCmd halt;
1965  NetSlewCmd slew;
1966  NetTrackCmd track;
1967  NetMountOffsetCmd mount_offset;
1968  NetEquatOffsetCmd equat_offset;
1969  NetTvOffsetCmd tv_offset;
1970  NetTvAngleCmd tv_angle;
1971  NetSkyOffsetCmd sky_offset;
1972  NetUt1UtcCmd ut1utc;
1973  NetEqnEqxCmd eqneqx;
1974  NetEncoderCalsCmd encoder_cals;
1975  NetEncoderLimitsCmd encoder_limits;
1976  NetEncoderZerosCmd encoder_zeros;
1977  NetSlewRateCmd slew_rate;
1978  NetTiltsCmd tilts;
1979  NetFlexureCmd flexure;
1980  NetCollimateCmd collimate;
1981  NetModelCmd model;
1982  NetYearCmd year;
1983  NetDeckModeCmd deck_mode;
1984  NetAtmosCmd atmos;
1985  NetFeatureCmd feature;
1986  NetGpibSendCmd gpib_send;
1987  NetGpibReadCmd gpib_read;
1988  NetPowerCmd power;
1989  NetPowerDtCmd power_dt;
1990  NetPowerMeterCmd power_meter;
1991  NetNoiseCalCmd noise_cal;
1992  NetChzrPowerCmd chzr_power;
1993  NetChzrZeroCmd chzr_zero;
1994  NetTpcalCmd tpcal;
1995  NetChzrAttnCmd chzr_attn;
1996  NetChzrSwitchCmd chzr_switch;
1997  NetChzrEnableCmd chzr_enable;
1998  NetRxSimCmd rxsim;
1999  NetThermoCmd thermometer;
2000  NetDsDtCmd ds_dt;
2001  NetStepperCmd stepper;
2002  NetOptCamCmd camera;
2003  NetOptCamCntlCmd optcam_cntl;
2004  NetFgCmd fg;
2005  NetFlatFieldCmd flatfield;
2006  NetConfigureFrameGrabberCmd configureFrameGrabber;
2007  NetWalshStateCmd walshstate;
2008  NetPagerCmd pager;
2009  NetRebootPmacCmd reboot_pmac;
2010 
2011  // Downconverter control
2012 
2013  NetPsysCmd psys;
2014  NetPsysAttenCmd psys_atten;
2015  NetIfoutCmd ifout;
2016  NetIfoutAttenCmd ifout_atten;
2017  NetRfAmpCmd rf_amp;
2018  NetIfAlcCmd if_alc;
2019 
2020  // Noise source control
2021 
2022  NetNoisePowerCmd noise_power;
2023  NetNoiseAttenCmd noise_atten;
2024  NetToneAttenCmd tone_atten;
2025  NetNoiseCmd noise;
2026  NetToneCmd tone;
2027 
2028  // Quad Mod control
2029 
2030  NetQuadPowerCmd quad_power;
2031  NetQuadAttenCmd quad_atten;
2032  NetQuadWalshColCmd quad_walshcol;
2033  NetQuadCmd quad;
2034  NetQuadPhaseCmd quad_phase;
2035 
2036  // CAN module commands
2037 
2038  NetResetCmd reset;
2039  NetFastSamplingCmd fast_sampling;
2040 
2041  // Delay commands
2042 
2043  NetSetAntennaCoordsCmd setAntennaCoords;
2044  NetDDSCmd DDS;
2045  NetSetAntennaDDSCmd setAntennaDDS;
2046  NetSetLRPhaseCmd setLRPhase;
2047  NetSetLRFreqCmd setLRFreq;
2048  NetEnableDDSWalshingCmd enableDDSWalshing;
2049  NetSetDDSWalshColumnCmd setDDSWalshColumn;
2050  NetSetOutputRegsCmd setOutputRegs;
2051  NetSetLRDelayCmd setLRDelay;
2052  NetSetAntennaPhaseCmd setAntennaPhase;
2053  NetSetAntennaFreqCmd setAntennaFreq;
2054 
2055  NetSetAntennaParamsCmd setAntennaParams;
2056  NetSetDelayCmd setDelay;
2057  NetSetWeatherParamsCmd setWeatherParams;
2058  NetUseDelayCmd useDelay;
2059  NetScanCmd scan;
2060 
2061  // CalTert commands
2062 
2063  NetCalTertCmd caltert;
2064 
2065  // Antenna IF command
2066 
2067  NetIFModCmd IFMod;
2068 
2069  // IntMod
2070 
2071  NetIntModCmd intmod;
2072 
2073  // Flip delays
2074 
2075  NetFlipDelayCmd flipDelay;
2076 
2077  // Fringe tracking
2078 
2079  NetFringeTrackingCmd fringeTracking;
2080 
2081  // Thermal commands
2082 
2083  NetThermalCmd thermal;
2084 
2085  // Tiltmeter commands
2086 
2087  NetTiltmeterCmd tiltmeter;
2088 
2089  // Synth commands
2090 
2091  NetSynthCmd synth;
2092 
2093  NetEnableLrFrequencyOffsetCmd enableLrFrequencyOffset;
2094 
2095  } NetCmd;
2096 
2097  /*
2098  * Create a structure that merges the above union with a mask of
2099  * antennas for whom the command is intended.
2100  */
2101  struct RtcNetCmd {
2102  NetMask antennas;
2103  NetCmd cmd;
2104  };
2105  }
2106 }
2107 
2108 /*
2109  * The following object description table, defined in rtcnetcoms.c,
2110  * describes the commands that are sent from the control program to
2111  * the real-time controller.
2112  */
2113 extern const NetObjTable rtc_cmd_table;
2114 #endif
2115 
float amp(std::complex< float > visibility)
Compute the visibility amplitude from a complex visibility.
Definition: complexManip.h:15
......................................................................
Definition: rtcnetcoms.h:857
......................................................................
Definition: rtcnetcoms.h:751
......................................................................
Definition: rtcnetcoms.h:810
float phase(std::complex< float > visibility)
Compute the visibility phase from a complex visibility.
Definition: complexManip.h:25
......................................................................
Definition: rtcnetcoms.h:783
The following command sets weather parameters.
Definition: rtcnetcoms.h:838
......................................................................
Definition: rtcnetcoms.h:824
......................................................................
Definition: rtcnetcoms.h:737
......................................................................
Definition: rtcnetcoms.h:791
......................................................................
Definition: rtcnetcoms.h:775
......................................................................
Definition: rtcnetcoms.h:730
......................................................................
Definition: rtcnetcoms.h:744
......................................................................
Definition: rtcnetcoms.h:709
Send a greeting message.
Definition: rtcnetcoms.h:45
......................................................................
Definition: rtcnetcoms.h:760
......................................................................
Definition: rtcnetcoms.h:801
......................................................................
Definition: rtcnetcoms.h:817
......................................................................
Definition: rtcnetcoms.h:865
......................................................................
Definition: rtcnetcoms.h:848