/************************************************************************/ /* */ /* Given a station def and an unfilled station parameter structure, */ /* this routine descends the VEX hierarchy as needed to extract all */ /* the parameters pertaining to the station. */ /* */ /* Inputs: deflist List of defs for this station */ /* ndef Number of defs in list */ /* refdate scan time (for clock_parms()) */ /* */ /* Output: st The station struct to be filled */ /* return value 0=OK, else bad */ /* */ /* Created December 29, 1997 by CJL */ /* */ /************************************************************************/ #include #include #include "vex.h" #include "mk4_vex.h" #include "mk4_util.h" #define IFNOT(blockname)\ if (strcmp (blist[deflist[i].blockno].name, blockname) != 0) int fill_station_parms (struct def_list *deflist, int ndefs, struct date *refdate, struct station_struct *st) { int i, nchan; int site_present, freq_present, bbc_present, if_present, clock_present; extern struct block blist[]; /* Do a sanity check */ if (st->start_offset >= st->stop_offset) { msg ("Station stop time invalid %d>=%d", 2, st->start_offset, st->stop_offset); return (1); } /* Now time to start digging into the */ /* list of defs assembled for this */ /* station */ /* SITE */ site_present = FALSE; for (i=0; imk4_site_id); return (1); } /* To resolve links properly, it turns */ /* out that we must do the $FREQ defs */ /* before several others, so we do */ /* them early */ nchan = 0; freq_present = FALSE; for (i=0; imk4_site_id); return (1); } /* Next must do BBC and links to IF */ bbc_present = FALSE; for (i=0; imk4_site_id); return (1); } /* Continue with channel-dependent ones */ /* IF */ if_present = FALSE; for (i=0; imk4_site_id); return (1); } /* PHASE_CAL_DETECT */ for (i=0; imk4_site_id); return (1); } /* DAS */ for (i=0; i