CARMA C++
szatypes.h
1 #ifndef szatypes_h
2 #define szatypes_h
3 
4 #include "carma/szaarrayutils/source.h" /* SRC_NAME_MAX */
5 #include "carma/szaarrayutils/scan.h" /* SCAN_NAME_MAX */
6 #include "carma/szaarrayutils/arraymap.h" /* (RegMap *) */
7 
8 /*-----------------------------------------------------------------------
9  * The Date datatype uses astrom.h::input_utc() to read UTC date and
10  * time values like:
11  *
12  * dd-mmm-yyyy hh:mm:ss.s
13  *
14  * where mmm is a 3-letter month name. It stores the date as a Modified
15  * Julian Date in DoubleVariable's. It provides + and - operators for
16  * the addition and subtraction of Interval values, along with all of the
17  * relational operators except the ~ operator.
18  */
19 DataType *add_DateDataType(Script *sc, char *name);
20 
21 /*-----------------------------------------------------------------------
22  * The Register datatype uses regmap.h::input_RegMapReg() to read
23  * standard SZA archive-register specifications (eg. board.name[3-4]).
24  *
25  * It is stored in a RegisterVariable and supports the != == !~ ~ operators.
26  */
27 DataType *add_RegisterDataType(Script *sc, char *name, ArrayMap *arraymap);
28 
29 typedef struct {
30  Variable v; /* The base-class members of the variable (see script.h) */
31  short regmap; /* Register-map number */
32  short board; /* Register-board number */
33  short block; /* Block number on specified board */
34  short index; /* The first element of the block to be addressed */
35  short nreg; /* The number of elements to be addressed */
36 } RegisterVariable;
37 
38 #define REGISTER_VARIABLE(v) ((RegisterVariable *)(v))
39 
40 
41 /*-----------------------------------------------------------------------
42  * The Wdir datatype is used to record writable directory names.
43  * The path name is stored in a StringVariable. It supports
44  * tilde expansion of home directories.
45  *
46  * It is stored in a StringVariable and supports the != == operators.
47  */
48 DataType *add_WdirDataType(Script *sc, char *name);
49 
50 /*-----------------------------------------------------------------------
51  * The Dir datatype is used to record the names of accessible directories.
52  *
53  * The path name is stored in a StringVariable. It supports
54  * tilde expansion of home directories.
55  *
56  * It is stored in a StringVariable and supports the != == operators.
57  */
58 DataType *add_DirDataType(Script *sc, char *name);
59 
60 /*-----------------------------------------------------------------------
61  * The Dev datatype is used to record the names of accessible devices
62  *
63  * The path name is stored in a StringVariable. It supports
64  * tilde expansion of home directories.
65  *
66  * It is stored in a StringVariable and supports the != == operators.
67  */
68 DataType *add_DevDataType(Script *sc, char *name);
69 
70 /*-----------------------------------------------------------------------
71  * The IntTime datatype is used to specify the hardware integration time
72  * of the SZA electronics, as a power-of-2 exponent to be used to scale
73  * the basic sample interval of 4.096e-4 seconds.
74  *
75  * It is stored in a UintVariable and supports != == <= >= < >.
76  */
77 DataType *add_IntTimeDataType(Script *sc, char *name);
78 
79 /*-----------------------------------------------------------------------
80  * The Board datatype is used to specify an archive register board by
81  * name.
82  *
83  * It is stored in a UintVariable and supports the != == operator.
84  */
85 DataType *add_BoardDataType(Script *sc, char *name, ArrayMap *arraymap);
86 
87 /*-----------------------------------------------------------------------
88  * The Time datatype is used to specify a time of day (UTC or LST).
89  *
90  * It is stored as decimal hours in a DoubleVariable. It supports the
91  * standard arithmentic != == <= >= < > operators.
92  */
93 DataType *add_TimeDataType(Script *sc, char *name);
94 
95 /*-----------------------------------------------------------------------
96  * The Interval datatype is used to specify a time interval.
97  *
98  * It is stored as decimal seconds in a DoubleVariable. It supports the
99  * standard arithmentic != == <= >= < > operators.
100  */
101 DataType *add_IntervalDataType(Script *sc, char *name);
102 
103 /*-----------------------------------------------------------------------
104  * The Outlet datatype is used to select an outlet
105  */
106 DataType *add_OutletDataType(Script *sc, char *name);
107 
108 /*-----------------------------------------------------------------------
109  * The Antennas datatype is used to select a sub-set of the SZA
110  * receivers.
111  *
112  * It is stored in a SetVariable and supports the standard
113  * set + - !~ ~ != == operators.
114  */
115 DataType *add_AntennasDataType(Script *sc, char *name);
116 
117 /*-----------------------------------------------------------------------
118  * The DDSChannel datatype is used to select a sub-set of the SZA
119  * receivers.
120  *
121  * It is stored in a SetVariable and supports the standard
122  * set + - !~ ~ != == operators.
123  */
124 DataType *add_DDSChannelDataType(Script *sc, char *name);
125 
126 /*-----------------------------------------------------------------------
127  * The Receivers datatype is used to select a sub-set of the 13 SZA
128  * receivers.
129  *
130  * It is stored in a SetVariable and supports the standard
131  * set + - !~ ~ != == operators.
132  */
133 DataType *add_ReceiversDataType(Script *sc, char *name);
134 
135 /*-----------------------------------------------------------------------
136  * The RxBand datatype is used to specify one or more receivers
137  * generators.
138  *
139  * It is stored in a SetVariable and supports the standard
140  * set + - !~ ~ != == operators.
141  */
142 DataType *add_RxStageDataType(Script *sc, char *name);
143 
144 /*-----------------------------------------------------------------------
145  * The RxBand datatype is used to specify one or more receivers
146  * generators.
147  *
148  * It is stored in a SetVariable and supports the standard
149  * set + - !~ ~ != == operators.
150  */
151 DataType *add_RxBandDataType(Script *sc, char *name);
152 
153 /*-----------------------------------------------------------------------
154  * The WalshStages datatype is used to specify one or more walsh function
155  * generators.
156  *
157  * It is stored in a SetVariable and supports the standard
158  * set + - !~ ~ != == operators.
159  */
160 DataType *add_WalshStagesDataType(Script *sc, char *name);
161 /*
162  * Define the bit-set values of walsh-generator set members. These
163  * must be powers of two.
164  */
165 typedef enum {
166  WALSH_MOD = 1, /* The modulation stage */
167  WALSH_DEMOD = 2 /* The demodulation stage */
168 } WalshStages;
169 
170 /*-----------------------------------------------------------------------
171  * The WalshStep datatype is used to select one step of a 16-step Walsh
172  * functions.
173  *
174  * It is stored in a UintVariable and supports the standard arithmetic
175  * != == <= >= < > operators.
176  */
177 DataType *add_WalshStepDataType(Script *sc, char *name);
178 
179 
180 /*-----------------------------------------------------------------------
181  * The WalshFunction datatype is used to select one of 32 walsh functions.
182  *
183  * It is stored in a UintVariable and supports the standard arithmetic
184  * != == <= >= < > operators.
185  */
186 DataType *add_WalshFunctionDataType(Script *sc, char *name);
187 
188 /*-----------------------------------------------------------------------
189  * The SysType datatype is used to tell the shutdown and reboot commands
190  * which sub-system to reset.
191  *
192  * It is stored in a ChoiceVariable and supports the != == operators.
193  */
194 DataType *add_SysTypeDataType(Script *sc, char *name);
195 /*
196  * Enumerate the subsystems addressed by the SysType datatype.
197  */
198 typedef enum {
199  SYS_CPU, /* Reboot or shutdown the CPU */
200  SYS_RTC, /* Reboot or shutdown the real-time-control system */
201  SYS_SZACONTROL, /* Restart or shutdown the control program */
202  SYS_PMAC /* Restart the pmac */
203 } SysType;
204 
205 /*-----------------------------------------------------------------------
206  * The TimeScale datatype is used with Time variables to specify which
207  * time system they refer to.
208  *
209  * It is stored in a ChoiceVariable and supports the != == operators.
210  */
211 DataType *add_TimeScaleDataType(Script *sc, char *name);
212 /*
213  * Enumerate the supported time systems.
214  */
215 typedef enum {
216  TIME_UTC, /* Universal Coordinated Time */
217  TIME_LST, /* Local Sidereal Time */
218 } TimeScale;
219 
220 /*-----------------------------------------------------------------------
221  * The SwitchState datatype is used to specify whether to turn a switch
222  * on or off.
223  *
224  * It is stored in a ChoiceVariable and supports the != == operators.
225  */
226 DataType *add_SwitchStateDataType(Script *sc, char *name);
227 /*
228  * Enumerate the supported switch states.
229  */
230 typedef enum {SWITCH_ON, SWITCH_OFF} SwitchState;
231 
232 /*-----------------------------------------------------------------------
233  * The Heaters datatype is used to specify a sub-set of receiver heaters
234  * to be controlled.
235  *
236  * It is stored in a SetVariable and supports the standard
237  * set + - !~ ~ != == operators.
238  */
239 DataType *add_HeatersDataType(Script *sc, char *name);
240 
241 /*-----------------------------------------------------------------------
242  * The HeaterVoltage datatype is used to specify the target sensor voltage
243  * in the feedback loop of a receiver heater.
244  *
245  * It is stored in a DoubleVariable with -ve values used to specify
246  * a heater to be switched off. It supports the standard arithmentic
247  * != == <= >= < > operators.
248  */
249 DataType *add_HeaterVoltageDataType(Script *sc, char *name);
250 
251 /*-----------------------------------------------------------------------
252  * The ThermalTargets datatype is used to select a subset of receiver
253  * local-oscillator stages.
254  *
255  * It is stored in a SetVariable and supports the standard
256  * set + - !~ ~ != == operators.
257  */
258 DataType *add_ThermalTargetDataType(Script *sc, char *name);
259 
260 /*-----------------------------------------------------------------------
261  * The ThermalMode datatype is used to select a subset of receiver
262  * local-oscillator stages.
263  *
264  * It is stored in a ChoiceVariable and supports the != == operators.
265  */
266 DataType *add_ThermalModeDataType(Script *sc, char *name);
267 
268 /*-----------------------------------------------------------------------
269  * The LoStages datatype is used to select a subset of receiver
270  * local-oscillator stages.
271  *
272  * It is stored in a SetVariable and supports the standard
273  * set + - !~ ~ != == operators.
274  */
275 DataType *add_LoStagesDataType(Script *sc, char *name);
276 
277 /*-----------------------------------------------------------------------
278  * The AcquireTargets datatype is used to tell the until() command which
279  * operations to wait for.
280  *
281  * It is stored in a SetVariable and supports the standard
282  * set + - !~ ~ != == operators.
283  */
284 DataType *add_DelayTargetDataType(Script *sc, char *name);
285 
286 /*-----------------------------------------------------------------------
287  * The AcquireTargets datatype is used to tell the until() command which
288  * operations to wait for.
289  *
290  * It is stored in a SetVariable and supports the standard
291  * set + - !~ ~ != == operators.
292  */
293 DataType *add_AcquireTargetsDataType(Script *sc, char *name);
294 /*
295  * Enumerate bit-set values of the available targets. Each should be
296  * a power of two.
297  */
298 typedef enum {
299  ACQ_PHASE = 0x1, // The last phase-shifter move command
300  ACQ_SOURCE = 0x2, // The last tracker command
301  ACQ_CHANNELIZER = 0x4, // The last long-duration channelizer command
302  ACQ_MARK = 0x8, // The last mark-command
303  ACQ_GRAB = 0x10, // The last grabber command
304  ACQ_SETREG = 0x20, // The last grabber command
305  ACQ_TV_OFFSET = 0x40, // The last tv_offset command
306  ACQ_CALTERT = 0x80, // The last caltert command
307  ACQ_IFMOD = 0x100,// The last antennaif command
308  ACQ_CAN = 0x200,// The last CAN command
309  ACQ_FRAME = 0x400,// The last newFrame command
310  ACQ_NOISE = 0x800 // The last noise source command
311 } AcquireTargets;
312 
313 /*-----------------------------------------------------------------------
314  * The PhaseStep datatype is used to specify whether to allow a
315  * stepper-motor to be positioned on a half-step boundary, or whether
316  * it must always stop on a full step.
317  *
318  * It is stored in a ChoiceVariable and supports the != == operators.
319  */
320 DataType *add_PhaseStepDataType(Script *sc, char *name);
321 /*
322  * Enumerate the phase-shifter stepper-motor increment options.
323  */
324 typedef enum {STEP_HALF, STEP_FULL} PhaseStep;
325 /*-----------------------------------------------------------------------
326  * The PolarState datatype is used to specify which phase state to set
327  *
328  * It is stored in a ChoiceVariable and supports the != == operators.
329  */
330 DataType *add_PolarStateDataType(Script *sc, char *name);
331 
332 /*-----------------------------------------------------------------------
333  * The PhaseShift datatype is used to specify the target encoder position
334  * of a phase-shifter motor over the range 0..1023. A value of 1024 is
335  * used to turn the motor off.
336  *
337  * It is stored in a UintVariable supports the standard arithmetic
338  * != == <= >= < > operators.
339  */
340 DataType *add_PhaseShiftDataType(Script *sc, char *name);
341 
342 /*-----------------------------------------------------------------------
343  * The QuadPhase datatype is used to select between the 4 possible states
344  * of a quadrature phase shift network. The 4 allowed phases are
345  * 0,90,180 and 270 degrees.
346  *
347  * It is stored in a UintVariable and supports the standard arithmetic
348  * != == <= >= < > operators.
349  */
350 DataType *add_QuadPhaseDataType(Script *sc, char *name);
351 
352 /*-----------------------------------------------------------------------
353  * The Scan datatype is used for specification of a scan by its name
354  * in the scan catalog.
355  *
356  * It is stored in a ScanVariable and supports the != == operators.
357  */
358 DataType *add_ScanDataType(Script *sc, char *name);
359 
360 typedef struct {
361  Variable v; /* Generic members of the variable (see script.h) */
362  char name[sza::array::SCAN_NAME_MAX]; /* The name of the scan */
363 } ScanVariable;
364 
365 #define SCAN_VARIABLE(v) ((ScanVariable *)(v))
366 
367 /*-----------------------------------------------------------------------
368  * The Source datatype is used for specification of a source by its name
369  * in the source catalog.
370  *
371  * It is stored in a SourceVariable and supports the != == operators.
372  */
373 DataType *add_SourceDataType(Script *sc, char *name);
374 
375 typedef struct {
376  Variable v; /* Generic members of the variable (see script.h) */
377  char name[sza::array::SRC_NAME_MAX]; /* The name of the source */
378 } SourceVariable;
379 
380 #define SOURCE_VARIABLE(v) ((SourceVariable *)(v))
381 
382 /*-----------------------------------------------------------------------
383  * The TransDev datatype is used for specification of a device by its name
384  * in the transaction catalog.
385  *
386  * It is stored in a TransDevVariable and supports the != == operators.
387  */
388 DataType *add_TransDevDataType(Script *sc, char *name);
389 
390 typedef struct {
391  Variable v; // Generic members of the variable (see script.h)
392  // The name of the device
393  char name[sza::array::TransactionManager::DEV_NAME_MAX+1];
394 } TransDevVariable;
395 
396 #define TRANSDEV_VARIABLE(v) ((TransDevVariable *)(v))
397 
398 /*-----------------------------------------------------------------------
399  * The TransLocation datatype is used for specification of a location
400  * by its name in the transaction catalog.
401  *
402  * It is stored in a TransLocationVariable
403  */
404 DataType *add_TransLocationDataType(Script *sc, char *name);
405 
406 /*-----------------------------------------------------------------------
407  * The TransSerial datatype is used for specification of a serial
408  * by its name in the transaction catalog.
409  *
410  * It is stored in a TransSerialVariable
411  */
412 DataType *add_TransSerialDataType(Script *sc, char *name);
413 
414 /*-----------------------------------------------------------------------
415  * The TransWho datatype is used for specification of the person
416  * logging the transaction
417  *
418  * It is stored in a TransWhoVariable
419  */
420 DataType *add_TransWhoDataType(Script *sc, char *name);
421 
422 /*-----------------------------------------------------------------------
423  * The TransComment datatype is used for specification of the person
424  * logging the transaction
425  *
426  * It is stored in a TransCommentVariable
427  */
428 DataType *add_TransCommentDataType(Script *sc, char *name);
429 
430 /*-----------------------------------------------------------------------
431  * The Model datatype is used to select between the optical and radio
432  * pointing models.
433  *
434  * It is stored in a ChoiceVariable and supports the != == operators.
435  */
436 DataType *add_ModelDataType(Script *sc, char *name);
437 
438 /*-----------------------------------------------------------------------
439  * The Latitude datatype is used to specify the latitude of a location
440  * on the surface of the Earth (-90..90 degrees).
441  *
442  * It is stored in degrees as a DoubleVariable and supports the
443  * standard arithmetic != == <= >= < > operators.
444  */
445 DataType *add_LatitudeDataType(Script *sc, char *name);
446 
447 /*-----------------------------------------------------------------------
448  * The Longitude datatype is used to specify the longitude of a location
449  * on the surface of the Earth (-180..180 degrees).
450  *
451  * It is stored in degrees as a DoubleVariable and supports the
452  * standard arithmetic != == <= >= < > operators.
453  */
454 DataType *add_LongitudeDataType(Script *sc, char *name);
455 
456 /*-----------------------------------------------------------------------
457  * The Azimuth datatype is used to specify a target azimuth for the
458  * telescope. The azimuths of the compass points are N=0, E=90, S=180
459  * and W=270 degrees (-360..360 degrees).
460  *
461  * It is stored in degrees as a DoubleVariable and supports the
462  * standard arithmetic != == <= >= < > operators.
463  */
464 DataType *add_AzimuthDataType(Script *sc, char *name);
465 
466 /*-----------------------------------------------------------------------
467  * The DeckAngle datatype is used to specify the position of the rotating
468  * platform on which the dishes are mounted (-360..360 degrees).
469  *
470  * It is stored in degrees as a DoubleVariable and supports the
471  * standard arithmetic != == <= >= < > operators.
472  */
473 DataType *add_DeckAngleDataType(Script *sc, char *name);
474 
475 /*-----------------------------------------------------------------------
476  * The Elevation datatype is used to specify the target elevation angle
477  * of the telescope (-90..90 degrees).
478  *
479  * It is stored in degrees as a DoubleVariable and supports the
480  * standard arithmetic != == <= >= < > operators.
481  */
482 DataType *add_ElevationDataType(Script *sc, char *name);
483 
484 /*-----------------------------------------------------------------------
485  * The PointingOffset datatype is used to specify a temporary offset of
486  * one of the telescope axes from the current pointing (-180..180).
487  *
488  * It is stored in degrees as a DoubleVariable and supports the
489  * standard arithmetic != == <= >= < > operators.
490  */
491 DataType *add_PointingOffsetDataType(Script *sc, char *name);
492 
493 /*-----------------------------------------------------------------------
494  * The Flexure datatype is used to specify the degree of gravitational
495  * drooping of the telescope as a function of elevation (-90..90 degrees).
496  *
497  * It is stored in degrees per cosine of elevation as a DoubleVariable
498  * and supports the standard arithmetic != == <= >= < > operators.
499  */
500 DataType *add_FlexureDataType(Script *sc, char *name);
501 
502 /*-----------------------------------------------------------------------
503  * The LoFrequency datatype is used to specify the target frequency for
504  * a tunable oscillator (MHz)
505  *
506  * It is stored in degrees as a DoubleVariable and supports the
507  * standard arithmetic != == <= >= < > operators. */
508 DataType *add_LoFrequencyDataType(Script *sc, char *name);
509 
510 /*-----------------------------------------------------------------------
511  * The Tilt datatype is used to specify the misalignment tilt of a
512  * telescope axis (-90..90 degrees).
513  *
514  * It is stored in degrees as a DoubleVariable and supports the
515  * standard arithmetic != == <= >= < > operators.
516  */
517 DataType *add_TiltDataType(Script *sc, char *name);
518 
519 /*-----------------------------------------------------------------------
520  * The Tracking data type is used for specifying the type of tracking,
521  * phase tracking or pointing tracking
522  */
523 DataType *add_TrackingDataType(Script *sc, char *name);
524 
525 /*-----------------------------------------------------------------------
526  * The Altitude datatype is used to specify the height of the telescope
527  * above the standard geodetic spheroid (-10000..10000 meters).
528  *
529  * It is stored in meters as a DoubleVariable and supports the
530  * standard arithmetic != == <= >= < > operators.
531  */
532 DataType *add_AltitudeDataType(Script *sc, char *name);
533 
534 /*-----------------------------------------------------------------------
535  * The GpibDev datatype is used to select a device on the GPIB bus (0..30).
536  *
537  * It is stored in a UintVariable and supports the standard arithmetic
538  * != == <= >= < > operators.
539  */
540 DataType *add_GpibDevDataType(Script *sc, char *name);
541 
542 /*-----------------------------------------------------------------------
543  * The GpibCmd datatype is used to specify a command string to be sent
544  * to a device on the GPIB bus.
545  *
546  * It is stored as a string of at most rtcnetcoms.h::GPIB_MAX_DATA
547  * characters in a StringVariable and supports the != == !~ ~ operators.
548  */
549 DataType *add_GpibCmdDataType(Script *sc, char *name);
550 
551 /*-----------------------------------------------------------------------
552  * The Features datatype is used to specify one or more features to
553  * be highlighted in a subsequent archive frame.
554  */
555 DataType *add_FeaturesDataType(Script *sc, char *name);
556 
557 /*-----------------------------------------------------------------------
558  * The DeckMode datatype is used to tell the tracker task how to
559  * position the deck axis while tracking sources.
560  *
561  * It is stored in a ChoiceVariable and supports the != == operators.
562  */
563 DataType *add_DeckModeDataType(Script *sc, char *name);
564 
565 /*-----------------------------------------------------------------------
566  * The Attenuation datatype is used for configuring channelizer
567  * attenuators to insert attenuations in steps of 1db over the range
568  * 0..31db.
569  *
570  * It is stored in a UintVariable and supports != == <= >= < >.
571  */
572 DataType *add_AttenuationDataType(Script *sc, char *name);
573 
574 /*-----------------------------------------------------------------------
575  * The CanModule datatype is used to select a sub-set of recognized CAN
576  * modules.
577  *
578  * It is stored in a SetVariable and supports the standard
579  * set + - !~ ~ != == operators.
580  */
581 DataType *add_CanModulesDataType(Script *sc, char *name);
582 
583 /*-----------------------------------------------------------------------
584  * The Bands datatype is used to select a sub-set of the 16 SZA
585  * frequency bands.
586  *
587  * It is stored in a SetVariable and supports the standard
588  * set + - !~ ~ != == operators.
589  */
590 DataType *add_BandsDataType(Script *sc, char *name);
591 
592 /*-----------------------------------------------------------------------
593  * The LoOsc datatype is used to select a sub-set of the possible LO
594  * frequency bands.
595  *
596  * It is stored in a SetVariable and supports the standard
597  * set + - !~ ~ != == operators.
598  */
599 DataType *add_LoOscDataType(Script *sc, char *name);
600 
601 /*-----------------------------------------------------------------------
602  * The TotalPower datatype is used to specify the target sensor voltage
603  * of a set of total power detectors.
604  *
605  * It is stored in a DoubleVariable with -ve values used to specify
606  * a heater to be switched off. It supports the standard arithmentic
607  * != == <= >= < > operators.
608  */
609 DataType *add_TotalPowerDataType(Script *sc, char *name);
610 
611 /*-----------------------------------------------------------------------
612  * The ArcType datatype is used to tell the close, flush and open
613  * commands which archiving file to operate on.
614  *
615  * It is stored in a ChoiceVariable and supports the != == operators.
616  * The enumerators that become stored in ArcType values are taken from
617  * arcfile.h::ArcFileType.
618  */
619 DataType *add_ArcFileDataType(Script *sc, char *name);
620 
621 /*-----------------------------------------------------------------------
622  * The FeatureChange datatype is used to tell the mark command what to
623  * do with the set of features that it is given.
624  *
625  * It is stored in a ChoiceVariable and supports the != == operators.
626  * The enumerators that become stored in FeatureChange values are taken from
627  * rtcnetcoms.h::FeatureMode.
628  */
629 DataType *add_FeatureChangeDataType(Script *sc, char *name);
630 
631 /*-----------------------------------------------------------------------
632  * The PowerMeterCommand datatype tells the power_meter command
633  * what type of command to send to the noise-cal power meter.
634  *
635  * It is stored in a ChoiceVariable and supports the != == operators.
636  * The enumerators that become stored in PowerMeterCommand values are
637  * taken from rtcnetcoms.h::NcalPowerCmd.
638  */
639 DataType *add_PowerMeterCommandDataType(Script *sc, char *name);
640 
641 /*-----------------------------------------------------------------------
642  * The BitMask datatype is used to set bit-mask as a set of 32 bits.
643  *
644  * It is stored in a SetVariable and supports the standard
645  * set + - !~ ~ != == operators.
646  */
647 DataType *add_BitMaskDataType(Script *sc, char *name);
648 
649 /*-----------------------------------------------------------------------
650  * The BitMaskOper datatype is used to specify whether a given bit-mask
651  * should be used to set bits, clear bits or to be used verbatim.
652  *
653  * It is stored in a ChoiceVariable using the enumerators defined in
654  * rtcnetcoms.h, and supports the standard set != and == operators.
655  */
656 DataType *add_BitMaskOperDataType(Script *sc, char *name);
657 
658 /*-----------------------------------------------------------------------
659  * The DioBoard datatype is used to specify a digital I/O board.
660  *
661  * It is stored in a UintVariable and supports the != == operator.
662  */
663 DataType *add_DioBoardDataType(Script *sc, char *name, ArrayMap *arraymap);
664 
665 /*-----------------------------------------------------------------------
666  * The Script datatype is used for entering the name and arguments
667  * of a script.
668  */
669 DataType *add_ScriptDataType(Script *sc, char *name);
670 
671 typedef struct {
672  Variable v; /* The base-class members of the variable (see script.h) */
673  Script *sc; /* The compiled script */
674 } ScriptVariable;
675 
676 #define SCRIPT_VARIABLE(v) ((ScriptVariable *)(v))
677 
678 /*-----------------------------------------------------------------------
679  * The DsCommand datatype is used to specify the target of a thermometer
680  * command.
681  */
682 DataType *add_DsCommandDataType(Script *sc, char *name);
683 
684 /*-----------------------------------------------------------------------
685  * The OptCamTarget datatype is used to specify the target of an optical
686  * camera command.
687  */
688 DataType *add_OptCamTargetDataType(Script *sc, char *name);
689 
690 /*-----------------------------------------------------------------------
691  * The OptCamAction datatype is used to specify the action of an optical
692  * camera command.
693  */
694 DataType *add_OptCamActionDataType(Script *sc, char *name);
695 
696 /*.......................................................................
697  * The OptCamCount datatype is used for specifying optical camera integer
698  * stepper motor steps.
699  *
700  * It is stored in an IntVariable with +10000 used to specify
701  * a device to be switched on, and -10000 used to specify a device to be
702  * switched off. It supports the standard arithmentic
703  * != == <= >= < > operators.
704  */
705 DataType *add_OptCamCountDataType(Script *sc, char *name);
706 
707 /*.......................................................................
708  * The FgReg datatype is used for specifying which register of the frame
709  * grabber board to write to.
710  */
711 DataType *add_FgRegDataType(Script *sc, char *name);
712 
713 /*.......................................................................
714  * The Peak datatype is used for specifying which peak offset from the
715  * frame grabber to return.
716  */
717 DataType *add_PeakDataType(Script *sc, char *name);
718 
719 /*.......................................................................
720  * The Imstat datatype is used for specifying which frame grabber image
721  * statistic to return
722  */
723 DataType *add_ImstatDataType(Script *sc, char *name);
724 
725 /*-----------------------------------------------------------------------
726  * The following datatype is used to set slew rates, in terms of a
727  * percentage of the maximum speed available.
728  *
729  * It is stored in a UintVariable and supports != == <= >= < >.
730  */
731 DataType *add_SlewRateDataType(Script *sc, char *name);
732 
733 /*-----------------------------------------------------------------------
734  * The WalshState datatype is used to specify whether to turn slow walshing
735  * on or off.
736  *
737  * It is stored in a ChoiceVariable and supports the != == operators.
738  */
739 DataType *add_WalshStateDataType(Script *sc, char *name);
740 /*
741  * Enumerate the supported walsh states.
742  */
743 typedef enum {WALSH_ON, WALSH_OFF} WalshState;
744 /*
745  * Enumerate special phase-shifter encoder positions
746  */
747 enum {
748  ENC_RIGHT_REQ=2048,
749  ENC_LEFT_REQ=4096,
750 };
751 
752 typedef enum {EMAIL_ADD, EMAIL_CLEAR, EMAIL_LIST} EmailAction;
753 
754 /*-----------------------------------------------------------------------
755  * The EmailAction datatype is used to specify whether to enable,
756  * disable, or turn the pager on
757  *
758  * It is stored in a ChoiceVariable using enumerators defined in
759  * rtcnetcoms.h, and supports the != == operators.
760 */
761 DataType *add_EmailActionDataType(Script *sc, char *name);
762 
763 /*-----------------------------------------------------------------------
764  * The PagerState datatype is used to specify whether to enable,
765  * disable, or turn the pager on
766  *
767  * It is stored in a ChoiceVariable using enumerators defined in
768  * rtcnetcoms.h, and supports the != == operators.
769 */
770 DataType *add_PagerStateDataType(Script *sc, char *name);
771 
772 /*-----------------------------------------------------------------------
773  * The PagerDev datatype is used to specify a pager device
774  *
775  * It is stored in a ChoiceVariable using enumerators defined in
776  * rtcnetcoms.h, and supports the != == operators.
777 */
778 DataType *add_PagerDevDataType(Script *sc, char *name);
779 
780 /*-----------------------------------------------------------------------
781  * The DcPower datatype is used to specify the target power level for
782  * the downconverter. A value < 0 is used to denote a preset level.
783  *
784  * It is stored in a Double variabel and supports the standard
785  * arithmetic != == <= >= < > operators.
786  */
787 DataType *add_DcPowerDataType(Script *sc, char *name);
788 
789 /*-----------------------------------------------------------------------
790  * The DelayType datatype is used to specify the type of delay to
791  * configure
792  */
793 DataType *add_DelayTypeDataType(Script *sc, char *name);
794 
795 /*-----------------------------------------------------------------------
796  * The DDSState datatype is used to enable/disable output from the DDS
797  * channels, or to reset the lobe rotator
798  */
799 DataType *add_DDSStateDataType(Script *sc, char *name);
800 
801 /*.......................................................................
802  * Create a new datatype for specifying a calibator position
803  */
804 DataType *add_CalPosDataType(Script *sc, char *name);
805 
809 DataType *add_TertPosDataType(Script *sc, char *name);
810 
814 DataType *add_CalTertOWDeviceDataType(Script *sc, char *name);
815 
819 DataType *add_CalTertOWCommandDataType(Script *sc, char *name);
820 
825 DataType *add_IFAttenuationDataType(Script *sc, char *name);
826 
831 DataType *add_IFLevelDataType(Script *sc, char *name);
832 
833 /*-----------------------------------------------------------------------
834  * The GunnDevice datatype is used to specify the device to control
835  */
836 DataType *add_GunnDeviceDataType(Script *sc, char *name);
837 
838 //-----------------------------------------------------------------------
839 // Data types to do with Array configurations
840 //-----------------------------------------------------------------------
841 
842 DataType* add_ArrayNameDataType(Script *sc, char *name);
843 DataType* add_ArrayConfigDataType(Script *sc, char *name);
844 DataType* add_AntennaTypeDataType(Script *sc, char *name);
845 
846 #endif
847 
848