Changeset 21153 for trunk/Ohana/src/opihi
- Timestamp:
- Jan 22, 2009, 10:43:26 AM (18 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 18 edited
-
cmd.astro/cplot.c (modified) (1 diff)
-
dvo/dbExtractAverages.c (modified) (2 diffs)
-
dvo/dbExtractMeasures.c (modified) (2 diffs)
-
dvo/dbFields.c (modified) (5 diffs)
-
dvo/gimages.c (modified) (1 diff)
-
dvo/skycoverage.c (modified) (7 diffs)
-
include/astro.h (modified) (1 diff)
-
include/basic.h (modified) (1 diff)
-
include/data.h (modified) (4 diffs)
-
include/dimm.h (modified) (3 diffs)
-
include/display.h (modified) (2 diffs)
-
include/dvoshell.h (modified) (7 diffs)
-
include/imfit.h (modified) (1 diff)
-
include/mana.h (modified) (1 diff)
-
include/pantasks.h (modified) (6 diffs)
-
include/pclient.h (modified) (1 diff)
-
include/pcontrol.h (modified) (5 diffs)
-
include/shell.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c
r20936 r21153 75 75 } 76 76 Xvec.Nelements = Npts; 77 Yvec.Nelements = Npts; 77 78 78 79 graphmode.etype = 0; -
trunk/Ohana/src/opihi/dvo/dbExtractAverages.c
r20936 r21153 152 152 break; 153 153 case MAG_CHISQ: 154 // GetPhotcodeEquivCodebyCode (field->photcode)155 154 value.Flt = PhotXm (field->photcode, average, secfilt); 156 155 break; 157 156 case MAG_ERR: 158 // GetPhotcodeEquivCodebyCode (field->photcode)159 157 if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) { 160 158 for (i = 0; i < average[0].Nmeasure; i++) { … … 167 165 } 168 166 break; 167 case MAG_PHOT_FLAGS: 168 if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) { 169 for (i = 0; i < average[0].Nmeasure; i++) { 170 if (field->photcode->code != measure[i].photcode) continue; 171 value.Int = measure[i].photFlags; 172 break; 173 } 174 } else { 175 value.Int = 0; 176 } 177 break; 169 178 case MAG_NCODE: 170 179 // XXX push these into dvo_photcode_ops APIs -
trunk/Ohana/src/opihi/dvo/dbExtractMeasures.c
r20936 r21153 123 123 } else { 124 124 value.Flt = measure[0].dM; 125 } 126 break; 127 case MAG_PHOT_FLAGS: 128 if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) { 129 value.Int = measure[0].photFlags; 130 } else { 131 value.Int = 0; 125 132 } 126 133 break; … … 378 385 break; 379 386 case MEAS_OBJ_ID: /* OK */ 380 // XXX this should probably return average[0].objID381 387 value.Int = average[0].objID; 388 break; 389 case MEAS_CAT_ID: /* OK */ 390 value.Int = average[0].catID; 382 391 break; 383 392 case MEAS_IMAGE_ID: /* OK */ -
trunk/Ohana/src/opihi/dvo/dbFields.c
r20936 r21153 30 30 int GetMagMode (char *string) { 31 31 32 if (!strcasecmp (string, "inst")) return (MAG_INST); 33 if (!strcasecmp (string, "cat")) return (MAG_CAT); 34 if (!strcasecmp (string, "sys")) return (MAG_SYS); 35 if (!strcasecmp (string, "rel")) return (MAG_REL); 36 if (!strcasecmp (string, "cal")) return (MAG_CAL); 37 if (!strcasecmp (string, "ave")) return (MAG_AVE); 38 if (!strcasecmp (string, "ref")) return (MAG_REF); 39 if (!strcasecmp (string, "err")) return (MAG_ERR); 40 if (!strcasecmp (string, "chisq")) return (MAG_CHISQ); 41 if (!strcasecmp (string, "ncode")) return (MAG_NCODE); 42 if (!strcasecmp (string, "nphot")) return (MAG_NPHOT); 32 if (!strcasecmp (string, "inst")) return (MAG_INST); 33 if (!strcasecmp (string, "cat")) return (MAG_CAT); 34 if (!strcasecmp (string, "sys")) return (MAG_SYS); 35 if (!strcasecmp (string, "rel")) return (MAG_REL); 36 if (!strcasecmp (string, "cal")) return (MAG_CAL); 37 if (!strcasecmp (string, "ave")) return (MAG_AVE); 38 if (!strcasecmp (string, "ref")) return (MAG_REF); 39 if (!strcasecmp (string, "err")) return (MAG_ERR); 40 if (!strcasecmp (string, "photflags")) return (MAG_PHOT_FLAGS); 41 if (!strcasecmp (string, "chisq")) return (MAG_CHISQ); 42 if (!strcasecmp (string, "ncode")) return (MAG_NCODE); 43 if (!strcasecmp (string, "nphot")) return (MAG_NPHOT); 43 44 return (MAG_NONE); 44 45 } … … 75 76 } 76 77 77 78 78 // enforce compatibility 79 // XXX this is kind of poorly done 80 if ((code[0].type == PHOT_REF) && (*mode != MAG_ERR)) { 81 *mode = MAG_CAT; 82 } 83 if (code[0].type == PHOT_DEP) { 84 if (useDefault) { 79 if (useDefault) { 80 if (code[0].type == PHOT_REF) { 81 *mode = MAG_CAT; 82 } 83 if (code[0].type == PHOT_DEP) { 85 84 *mode = MAG_REL; 86 85 } … … 186 185 if (!strcasecmp (fieldName, "DETID")) ESCAPE (MEAS_DET_ID, MAG_NONE, OPIHI_INT); 187 186 if (!strcasecmp (fieldName, "OBJID")) ESCAPE (MEAS_OBJ_ID, MAG_NONE, OPIHI_INT); 187 if (!strcasecmp (fieldName, "CATID")) ESCAPE (MEAS_CAT_ID, MAG_NONE, OPIHI_INT); 188 188 if (!strcasecmp (fieldName, "IMAGEID")) ESCAPE (MEAS_IMAGE_ID, MAG_NONE, OPIHI_INT); 189 189 if (!strcasecmp (fieldName, "PSF_QF")) ESCAPE (MEAS_PSF_QF, MAG_NONE, OPIHI_FLT); … … 206 206 field->ID = MEAS_MAG; 207 207 field->magMode = mode; 208 field->type = OPIHI_FLT; 208 switch (mode) { 209 case MAG_NCODE: 210 case MAG_NPHOT: 211 case MAG_PHOT_FLAGS: 212 field->type = OPIHI_INT; 213 break; 214 default: 215 field->type = OPIHI_FLT; 216 break; 217 } 209 218 field->photcode = code; 210 219 return (TRUE); … … 280 289 field->ID = AVE_MAG; 281 290 field->magMode = mode; 282 field->type = OPIHI_FLT; 291 switch (mode) { 292 case MAG_NCODE: 293 case MAG_NPHOT: 294 case MAG_PHOT_FLAGS: 295 field->type = OPIHI_INT; 296 break; 297 default: 298 field->type = OPIHI_FLT; 299 break; 300 } 283 301 field->photcode = code; 284 302 return (TRUE); -
trunk/Ohana/src/opihi/dvo/gimages.c
r14590 r21153 103 103 if (!FindMosaicForImage (image, Nimage, i)) continue; 104 104 105 typehash = wordhash (&image[i].coords.ctype[4]); 106 107 // for non-linear astrometry solutions, a point which is far from the image may 108 // potentially appear to land in the image: at large field-position, the high order 109 // terms which are supposed to be perturbations may dominate the solution 110 111 // XXX this code checks if the image is even in the ballpark. this is not a great 112 // solution. the better way to do this would be to use the linear portions of the fit 113 // only for RD_to_XY, then see if the result is close. 114 { 115 Coords local; 116 double Ro, Do, Xo, Yo, Xs, Ys, Xe, Ye, Radius; 117 118 if (typehash == DistortImage) { 119 Xo = 0.0; 120 Yo = 0.0; 121 } else { 122 Xo = 0.5*image[i].NX; 123 Yo = 0.5*image[i].NY; 124 } 125 126 XY_to_RD (&Ro, &Do, Xo, Yo, &image[i].coords); 127 128 local.crval1 = Ro; 129 local.crval2 = Do; 130 local.crpix1 = local.crpix2 = 0.0; 131 local.cdelt1 = local.cdelt2 = 1.0/3600.0; 132 local.pc1_1 = local.pc2_2 = 1.0; 133 local.pc2_1 = local.pc1_2 = 0.0; 134 local.Npolyterms = 1; 135 strcpy (local.ctype, "RA---TAN"); 136 137 if (typehash == DistortImage) { 138 Xs = -0.5*image[i].NX; 139 Ys = -0.5*image[i].NY; 140 Xe = +0.5*image[i].NX; 141 Ye = +0.5*image[i].NY; 142 } else { 143 Xs = 0.0; 144 Ys = 0.0; 145 Xe = image[i].NX; 146 Ye = image[i].NY; 147 } 148 149 XY_to_RD (&Ro, &Do, Xs, Ys, &image[i].coords); 150 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 151 Radius = hypot (Xo, Yo); 152 // fprintf (stderr, "%s: %f %f %f ", image[i].name, local.crval1, local.crval2, Radius); 153 154 XY_to_RD (&Ro, &Do, Xs, Ye, &image[i].coords); 155 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 156 Radius = MAX (Radius, hypot (Xo, Yo)); 157 // fprintf (stderr, "%f ", Radius); 158 159 XY_to_RD (&Ro, &Do, Xe, Ys, &image[i].coords); 160 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 161 Radius = MAX (Radius, hypot (Xo, Yo)); 162 // fprintf (stderr, "%f ", Radius); 163 164 XY_to_RD (&Ro, &Do, Xe, Ye, &image[i].coords); 165 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 166 Radius = MAX (Radius, hypot (Xo, Yo)); 167 // fprintf (stderr, "%f ", Radius); 168 169 RD_to_XY (&Xo, &Yo, Ra, Dec, &local); 170 // fprintf (stderr, " : %f\n", hypot(Xo,Yo)); 171 if (hypot(Xo,Yo) > 1.5*Radius) continue; 172 // fprintf (stderr, " ** try me **\n"); 173 } 174 105 175 status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords); 106 176 if (!finite(X)) continue; 107 177 if (!finite(Y)) continue; 108 178 if (!status) continue; 109 110 typehash = wordhash (&image[i].coords.ctype[4]);111 179 112 180 if (typehash == DistortImage) { -
trunk/Ohana/src/opihi/dvo/skycoverage.c
r19823 r21153 1 1 # include "dvoshell.h" 2 3 int wordhash (char *word); 2 4 3 5 int skycoverage (int argc, char **argv) { 4 6 7 int WITH_MOSAIC, SOLO_MOSAIC; 5 8 int i, N, Nimage, status, TimeSelect, ByName, xs, ys; 6 9 time_t tzero, tend; 7 double pixscale, d Pix, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange;10 double pixscale, dX, dY, Npts, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange, RaCenter; 8 11 Image *image; 9 12 char name[256]; … … 12 15 Buffer *buf; 13 16 Coords coords; 17 int typehash; 18 19 WITH_MOSAIC = FALSE; 20 if ((N = get_argument (argc, argv, "+mosaic"))) { 21 remove_argument (N, &argc, argv); 22 WITH_MOSAIC = TRUE; 23 } 24 25 SOLO_MOSAIC = FALSE; 26 if ((N = get_argument (argc, argv, "-mosaic"))) { 27 remove_argument (N, &argc, argv); 28 SOLO_MOSAIC = TRUE; 29 WITH_MOSAIC = TRUE; 30 } 31 32 RaCenter = 0.0; 33 if ((N = get_argument (argc, argv, "-ra-center"))) { 34 remove_argument (N, &argc, argv); 35 RaCenter = atof (argv[N]); 36 remove_argument (N, &argc, argv); 37 } 14 38 15 39 ByName = FALSE; … … 61 85 62 86 if (argc != 4) { 63 gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) ( dPix) [-time start range] [-name name]\n");87 gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (Npts) [-time start range] [-name name]\n"); 64 88 gprint (GP_ERR, " (buffer) saves bitmapped AIT plot\n"); 65 89 gprint (GP_ERR, " (pixscale) specifies the pixel size in degrees\n"); 90 gprint (GP_ERR, " (Npts) gives the number of test points per image in each dimension\n"); 66 91 gprint (GP_ERR, " note: we need 64800 / (pixscale)^2 pixels to represent the sky\n"); 67 92 return (FALSE); … … 70 95 if ((buf = SelectBuffer (argv[1], ANYBUFFER, TRUE)) == NULL) return (FALSE); 71 96 pixscale = atof(argv[2]); 72 dPix= atof(argv[3]);97 Npts = atof(argv[3]); 73 98 74 99 Nx = 360/pixscale; … … 80 105 strcpy (buf[0].file, "(empty)"); 81 106 82 coords.crval1 = 180;107 coords.crval1 = RaCenter; 83 108 coords.crval2 = 0; 84 109 coords.crpix1 = 0.5*Nx; 85 110 coords.crpix2 = 0.5*Ny; 86 111 strcpy (coords.ctype, "DEC--AIT"); 87 coords.pc1_1 = coords.pc2_2 = 1; 88 coords.pc1_2 = coords.pc2_1 = 0; 112 coords.pc1_1 = -1.0; 113 coords.pc2_2 = +1.0; 114 coords.pc1_2 = 0.0; 115 coords.pc2_1 = 0.0; 89 116 coords.cdelt1 = coords.cdelt2 = pixscale; 90 117 coords.Npolyterms = 0; … … 109 136 } 110 137 138 int DistortImage = wordhash ("-DIS"); 139 111 140 for (i = 0; i < Nimage; i++) { 112 141 if (ByName && strcmp (name, image[i].name)) continue; 113 142 if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue; 114 143 if (!FindMosaicForImage (image, Nimage, i)) continue; 144 145 typehash = wordhash (&image[i].coords.ctype[4]); 146 147 /* DIS images represent a field, not a chip */ 148 if ((typehash == DistortImage) && !WITH_MOSAIC) continue; 149 if ((typehash != DistortImage) && SOLO_MOSAIC) continue; 115 150 116 151 /* project this image to screen display coords */ … … 125 160 status = FALSE; 126 161 127 for (Yi = y[0] + 0.5*dPix; Yi < y[1]; Yi += dPix) { 128 for (Xi = x[0] + 0.5*dPix; Xi < x[1]; Xi += dPix) { 162 dX = (x[1] - x[0]) / Npts; 163 dY = (y[1] - y[0]) / Npts; 164 165 for (Yi = y[0] + 0.5*dY; Yi < y[1]; Yi += dY) { 166 for (Xi = x[0] + 0.5*dX; Xi < x[1]; Xi += dX) { 129 167 XY_to_RD (&r, &d, Xi, Yi, &image[i].coords); 130 168 r = ohana_normalize_angle (r); 131 169 status = RD_to_XY (&Xs, &Ys, r, d, &coords); 170 if (Xs < 0) continue; 171 if (Ys < 0) continue; 172 if (Xs >= Nx) continue; 173 if (Ys >= Ny) continue; 132 174 if (status) { 133 175 xs = (int)Xs; -
trunk/Ohana/src/opihi/include/astro.h
r17419 r21153 9 9 # define ASTRO_H 10 10 11 void InitAstro ( );12 void FreeAstro ( );11 void InitAstro (void); 12 void FreeAstro (void); 13 13 14 14 typedef struct { -
trunk/Ohana/src/opihi/include/basic.h
r17419 r21153 3 3 # include "dvomath.h" 4 4 5 void cleanup ( );6 void InitBasic ( );7 void FreeBasic ( );8 void InitBasic_PantasksClient ( );5 void cleanup (void); 6 void InitBasic (void); 7 void FreeBasic (void); 8 void InitBasic_PantasksClient (void); -
trunk/Ohana/src/opihi/include/data.h
r20936 r21153 33 33 } Book; 34 34 35 void InitData ( );36 void FreeData ( );35 void InitData (void); 36 void FreeData (void); 37 37 38 38 /* in book.c */ 39 void InitBooks ( );39 void InitBooks (void); 40 40 void InitBook (Book *book, char *name); 41 41 void FreeBook (Book *book); … … 44 44 Book *CreateBook (char *name); 45 45 int DeleteBook (Book *book); 46 void ListBooks ( );46 void ListBooks (void); 47 47 48 48 /* in page.c */ … … 61 61 62 62 /* in queues.c */ 63 void InitQueues ( );64 void ListQueues ( );63 void InitQueues (void); 64 void ListQueues (void); 65 65 Queue *FindQueue (char *name); 66 66 Queue *CreateQueue (char *name); … … 151 151 int read_table_vectors (int argc, char **argv, char *extname); 152 152 153 void *db_getConnection ( );153 void *db_getConnection (void); 154 154 155 155 int bracket (double *list, int Nlist, int mode, double value); 156 156 int ibracket (int *list, int Nlist, int mode, double value); 157 157 158 void FreeKapa ( );159 void FreeQueues ( );160 void FreeBooks ( );158 void FreeKapa (void); 159 void FreeQueues (void); 160 void FreeBooks (void); 161 161 162 162 # endif -
trunk/Ohana/src/opihi/include/dimm.h
r4689 r21153 6 6 # include "sbig.h" 7 7 8 void InitDIMM ( );8 void InitDIMM (void); 9 9 10 10 /* telescope.c */ … … 19 19 int setTime (char *lst); 20 20 int getSite (double *lon, double *lat, double *lst); 21 int ParkScope( );22 int SleepScope( );23 int WakeScope( );21 int ParkScope(void); 22 int SleepScope(void); 23 int WakeScope(void); 24 24 25 25 /* Serial.c */ … … 36 36 /* camera.c */ 37 37 int InitCamera (int port); 38 void DumpCameraInfo ( );38 void DumpCameraInfo (void); 39 39 void CameraFullSize (int *x, int *y); 40 40 int SetTemperature (double temp); 41 double GetTemperature ( );42 int DumpCameraStatus ( );41 double GetTemperature (void); 42 int DumpCameraStatus (void); 43 43 int Exposure (double exptime); 44 44 static int readout_callback (float percent); 45 45 int ReadOut (int x, int y, int dx, int dy, int binning, unsigned short *buffer); 46 int OpenShutter ( );47 int CloseShutter ( );46 int OpenShutter (void); 47 int CloseShutter (void); 48 48 49 49 /* this image structure stuff is considered for further development */ -
trunk/Ohana/src/opihi/include/display.h
r20936 r21153 20 20 int SetImage PROTO((KapaImageData *data)); 21 21 22 void QuitKapa PROTO(( ));23 void InitKapa PROTO(( ));22 void QuitKapa PROTO((void)); 23 void InitKapa PROTO((void)); 24 24 int open_kapa PROTO((int entry)); 25 25 int close_kapa PROTO((char *name)); … … 27 27 int DelKapaDevice PROTO((char *name)); 28 28 int FindKapaDevice PROTO((char *name)); 29 char *GetKapaName PROTO(( ));29 char *GetKapaName PROTO((void)); 30 30 31 31 /* calling program need to define a function 'get_variable' which -
trunk/Ohana/src/opihi/include/dvoshell.h
r20936 r21153 33 33 MAG_REF, 34 34 MAG_ERR, 35 MAG_PHOT_FLAGS, 35 36 MAG_CHISQ, 36 37 MAG_NCODE, … … 99 100 MEAS_DET_ID, 100 101 MEAS_OBJ_ID, 102 MEAS_CAT_ID, 101 103 MEAS_IMAGE_ID, 102 104 MEAS_PSF_QF, … … 262 264 double *ExtractMeasuresByDMag PROTO((PhotCode **code, int *mode, int use_first, Average *average, SecFilt *secfilt, Measure *measure, int *nlist, int param)); 263 265 double *ExtractMeasuresDMag PROTO((PhotCode **code, int *mode, Average *average, SecFilt *secfilt, Measure *measure, int *nlist)); 264 void FreeImageSelection PROTO(( ));265 void FreeImageSelection PROTO(( ));266 void FreeImageSelection PROTO((void)); 267 void FreeImageSelection PROTO((void)); 266 268 int GetAverageParam PROTO((char *parname)); 267 void GetAverageParamHelp PROTO(( ));269 void GetAverageParamHelp PROTO((void)); 268 270 int GetMagMode PROTO((char *string)); 269 271 double GetMeasure PROTO((int param, Average *average, Measure *measure, double mag)); … … 271 273 int GetMeasureTypeCode PROTO((Measure *measure)); 272 274 int GetPhotcodeInfo PROTO((char *string, PhotCode **Code, int *Mode)); 273 int GetSelectionParam PROTO(( ));275 int GetSelectionParam PROTO((void)); 274 276 int GetTimeSelection PROTO((time_t *tz, time_t *te)); 275 void InitDVO PROTO(( ));276 void FreeDVO PROTO(( ));277 int InitPhotcodes PROTO(( ));277 void InitDVO PROTO((void)); 278 void FreeDVO PROTO((void)); 279 int InitPhotcodes PROTO((void)); 278 280 Image *LoadImages PROTO((int *Nimage)); 279 281 Image *MatchImage PROTO((unsigned int time, short int source)); … … 285 287 SkyList *SkyListLoadFile PROTO((char *filename)); 286 288 int SetCATDIR PROTO((char *path, int verbose)); 287 char * GetCATDIR PROTO(( ));288 SkyTable *GetSkyTable PROTO(( ));289 char * GetCATDIR PROTO((void)); 290 SkyTable *GetSkyTable PROTO((void)); 289 291 SkyList *SkyListFromFile PROTO((char *filename)); 290 292 SkyRegionSelection *SetRegionSelection PROTO((int *argc, char **argv)); … … 339 341 int get_skyregion (double *Rs, double *Re, double *Ds, double *De); 340 342 int set_skyregion (double Rs, double Re, double Ds, double De); 341 void FreeImageSelection ( );343 void FreeImageSelection (void); 342 344 343 345 void FreeSkyRegionSelection (SkyRegionSelection *selection); … … 345 347 346 348 int dbExtractMeasuresInitTransform (CoordTransformSystem target); 347 int dbExtractMeasuresInitAve ( );348 int dbExtractMeasuresInitMeas ( );349 int dbExtractMeasuresInit ( );349 int dbExtractMeasuresInitAve (void); 350 int dbExtractMeasuresInitMeas (void); 351 int dbExtractMeasuresInit (void); 350 352 351 353 int dbExtractAveragesInitTransform (CoordTransformSystem target); 352 int dbExtractAveragesInit ( );354 int dbExtractAveragesInit (void); 353 355 354 356 int dbExtractImagesInitTransform (CoordTransformSystem target); 355 int dbExtractImagesInit ( );356 int dbExtractImagesReset ( );357 int dbExtractImagesInit (void); 358 int dbExtractImagesReset (void); 357 359 358 360 # endif -
trunk/Ohana/src/opihi/include/imfit.h
r20936 r21153 8 8 9 9 opihi_flt (*fitfunc)(opihi_flt, opihi_flt, opihi_flt *, int, opihi_flt *); 10 void (*imfit_cleanup)( );10 void (*imfit_cleanup)(void); 11 11 12 12 void fgauss_setup (char *name); -
trunk/Ohana/src/opihi/include/mana.h
r17419 r21153 5 5 # ifndef MANA_H 6 6 7 void InitMana ( );8 void FreeMana ( );7 void InitMana (void); 8 void FreeMana (void); 9 9 int *findrowpeaks (float *row, int Nrow, float threshold, int *npeaks); 10 10 -
trunk/Ohana/src/opihi/include/pantasks.h
r20936 r21153 167 167 /* scheduler prototypes */ 168 168 169 void InitPantasks ( );170 void FreePantasks ( );171 172 void InitPantasksServer ( );173 void FreePantasksServer ( );174 175 void InitPantasksClient ( );176 void FreePantasksClient ( );177 178 void InitTasks ( );179 void FreeTasks ( );180 181 Task *NextTask ( );169 void InitPantasks (void); 170 void FreePantasks (void); 171 172 void InitPantasksServer (void); 173 void FreePantasksServer (void); 174 175 void InitPantasksClient (void); 176 void FreePantasksClient (void); 177 178 void InitTasks (void); 179 void FreeTasks (void); 180 181 Task *NextTask (void); 182 182 Task *FindTask (char *name); 183 183 void ListTasks (int verbose); … … 186 186 Task *CreateTask (char *name); 187 187 int ValidateTask (Task *task, int RequireStatic); 188 int RegisterNewTask ( );189 int DeleteNewTask ( );190 Task *GetNewTask ( );191 Task *GetActiveTask ( );188 int RegisterNewTask (void); 189 int DeleteNewTask (void); 190 Task *GetNewTask (void); 191 Task *GetActiveTask (void); 192 192 void SetTaskTimer (struct timeval *timer); 193 193 double GetTaskTimer (struct timeval start, int verbose); 194 void InitTaskTimers ( );194 void InitTaskTimers (void); 195 195 int TaskHash (char *input); 196 196 int RemoveTask (Task *task); … … 200 200 void UpdateTaskTimerStats (Task *task, int mode, double dtime); 201 201 202 int NextJobID ( );203 void InitJobIDs ( );204 void FreeJobIDs ( );202 int NextJobID (void); 203 void InitJobIDs (void); 204 void FreeJobIDs (void); 205 205 int FreeJobID (int ID); 206 206 207 void InitJobs ( );208 void FreeJobs ( );209 210 Job *NextJob ( );207 void InitJobs (void); 208 void FreeJobs (void); 209 210 Job *NextJob (void); 211 211 Job *FindJob (int JobID); 212 void ListJobs ( );212 void ListJobs (void); 213 213 Job *CreateJob (Task *task); 214 214 int SubmitJob (Job *job); … … 217 217 void FreeJob (Job *job); 218 218 219 float CheckJobs ( );220 float CheckTasks ( );221 int CheckSystem ( );222 int CheckController ( );219 float CheckJobs (void); 220 float CheckTasks (void); 221 int CheckSystem (void); 222 int CheckController (void); 223 223 int CheckTimeRanges (TimeRange *ranges, int Nranges); 224 224 int BumpTimeRanges (TimeRange *ranges, int Nranges); … … 230 230 int DeleteControllerJob (Job *job); 231 231 Job *FindControllerJob (int JobID); 232 int StartController ( );232 int StartController (void); 233 233 int ControllerCommand (char *command, char *response, IOBuffer *buffer); 234 234 int SubmitLocalJob (Job *job); 235 235 int CheckLocalJob (Job *job); 236 236 int CheckLocalJobStatus (Job *job); 237 void InitTaskTimers ( );237 void InitTaskTimers (void); 238 238 CommandF *FindControllerCommand (char *cmd); 239 int QuitController ( );240 int StopController ( );241 int RestartController ( );242 int VerboseMode ( );239 int QuitController (void); 240 int StopController (void); 241 int RestartController (void); 242 int VerboseMode (void); 243 243 int KillLocalJob (Job *job); 244 int CheckControllerOutput ( );245 int PrintControllerOutput ( );244 int CheckControllerOutput (void); 245 int PrintControllerOutput (void); 246 246 247 247 int AddHost (char *hostname, int max_threads); 248 248 int DeleteHost (char *hostname); 249 249 250 int FlushControllerOutput ( );250 int FlushControllerOutput (void); 251 251 int KillControllerJob (Job *job); 252 int CheckControllerStatus ( );252 int CheckControllerStatus (void); 253 253 void gotsignal (int signum); 254 254 int client_shell (int argc, char **argv); 255 255 256 void InitClients ( );256 void InitClients (void); 257 257 void AddNewClient (int client); 258 258 int DeleteClient (int client); … … 261 261 // functions related to the server threads 262 262 void CheckTasksSetState (int state); 263 int CheckTasksGetState ( );263 int CheckTasksGetState (void); 264 264 void *CheckTasksThread (void *data); 265 265 266 266 void CheckJobsSetState (int state); 267 int CheckJobsGetState ( );267 int CheckJobsGetState (void); 268 268 void *CheckJobsThread (void *data); 269 269 270 270 void CheckControllerSetState (int state); 271 int CheckControllerGetState ( );271 int CheckControllerGetState (void); 272 272 void *CheckControllerThread (void *data); 273 273 274 274 void CheckInputsSetState (int state); 275 int CheckInputsGetState ( );275 int CheckInputsGetState (void); 276 276 void *CheckInputsThread (void *data); 277 277 278 278 // functions related to the queue of input files 279 void InitInputs ( );280 void FreeInputs ( );279 void InitInputs (void); 280 void FreeInputs (void); 281 281 void AddNewInput (char *input); 282 282 int DeleteInput (char *input); 283 void CheckInputs ( );284 285 void SerialThreadLock ( );286 void SerialThreadUnlock ( );287 288 int InitPassword ( );283 void CheckInputs (void); 284 285 void SerialThreadLock (void); 286 void SerialThreadUnlock (void); 287 288 int InitPassword (void); 289 289 int CheckPassword (int BindSocket); 290 290 291 int FlushJobs ( );291 int FlushJobs (void); -
trunk/Ohana/src/opihi/include/pclient.h
r17419 r21153 44 44 IOBuffer child_stderr; 45 45 46 int InitChild ( );47 int FreeChild ( );48 int CheckChild ( );49 void CheckChildStatus ( );46 int InitChild (void); 47 int FreeChild (void); 48 int CheckChild (void); 49 void CheckChildStatus (void); 50 50 51 void InitPclient ( );52 void FreePclient ( );51 void InitPclient (void); 52 void FreePclient (void); 53 53 void gotsignal (int signum); 54 54 -
trunk/Ohana/src/opihi/include/pcontrol.h
r20047 r21153 154 154 // # define ABORT(STRING) { gprint (GP_ERR, "programming error: %s\n", STRING); raise (SIGINT); exit (2); } 155 155 156 void InitPcontrol ( );157 void FreePcontrol ( );156 void InitPcontrol (void); 157 void FreePcontrol (void); 158 158 159 159 /*** StackOps.c ***/ 160 Stack *InitStack ( );160 Stack *InitStack (void); 161 161 void FreeStack (Stack *stack); 162 162 int PushStack (Stack *stack, int where, void *object, int id, char *name); … … 173 173 174 174 /*** CheckSystem.c ***/ 175 int CheckSystem ( );175 int CheckSystem (void); 176 176 void *CheckSystem_Threaded (void *data); 177 177 int CheckBusyJobs (float delay); … … 214 214 215 215 /*** misc files ***/ 216 int VerboseMode ( ); // in verbose.c216 int VerboseMode (void); // in verbose.c 217 217 void gotsignal (int signum); // in pcontrol.c 218 218 219 219 /*** IDops.c ***/ 220 void InitIDs ( );221 IDtype NextJobID ( );222 IDtype NextHostID ( );220 void InitIDs (void); 221 IDtype NextJobID (void); 222 IDtype NextHostID (void); 223 223 void PrintID (gpDest dest, IDtype ID); 224 224 IDtype GetID (char *IDword); 225 225 226 226 /*** CheckPoint.c ***/ 227 int SetCheckPoint ( );228 int ClearCheckPoint ( );229 int TestCheckPoint ( );227 int SetCheckPoint (void); 228 int ClearCheckPoint (void); 229 int TestCheckPoint (void); 230 230 231 231 /*** HostOps.c ***/ 232 void InitHostStacks ( );233 void FreeHostStacks ( );232 void InitHostStacks (void); 233 void FreeHostStacks (void); 234 234 Stack *GetHostStack (int StackID); 235 235 char *GetHostStackName (int StackID); … … 246 246 void DownHost (Host *host); 247 247 void OffHost (Host *host); 248 int DownHosts ( );248 int DownHosts (void); 249 249 int StopHost (Host *host); 250 250 int StopHostResponse (Host *host); … … 254 254 int InitJobOutput (JobOutput *output); 255 255 int ResetJobOutput (JobOutput *output); 256 void InitJobStacks ( );257 void FreeJobStacks ( );256 void InitJobStacks (void); 257 void FreeJobStacks (void); 258 258 Stack *GetJobStack (int StackID); 259 259 char *GetJobStackName (int StackID); -
trunk/Ohana/src/opihi/include/shell.h
r17419 r21153 16 16 typedef enum {GP_LOG, GP_ERR} gpDest; 17 17 18 typedef int CommandF ( );18 typedef int CommandF (int argc, char **argv); 19 19 20 20 typedef struct sockaddr_in SockAddress; … … 65 65 int opihi PROTO((int argc, char **argv)); 66 66 int multicommand PROTO((char *line)); 67 int getServer ( );67 int getServer (void); 68 68 void multicommand_InitServer PROTO((void)); 69 void multicommand_StopServer ( );69 void multicommand_StopServer (void); 70 70 71 71 int command PROTO((char *line, char **outline, int VERBOSE)); … … 74 74 char *parse PROTO((char *line)); 75 75 char **parse_commands PROTO((char *, int *)); 76 void welcome PROTO(( ));76 void welcome PROTO((void)); 77 77 78 78 int add_listentry PROTO((int ThisList, char *line)); … … 85 85 int is_task_exec PROTO((char *line)); 86 86 int is_macro_create PROTO((char *line)); 87 void InitLists PROTO(( ));88 int current_list_depth ( );89 int increase_list_depth ( );90 int decrease_list_depth ( );87 void InitLists PROTO((void)); 88 int current_list_depth (void); 89 int increase_list_depth (void); 90 int decrease_list_depth (void); 91 91 char *get_next_listentry (int ThisList); 92 92 93 void InitCommands PROTO(( ));93 void InitCommands PROTO((void)); 94 94 void AddCommand PROTO((Command *new)); 95 95 int DeleteCommand PROTO((Command *command)); … … 105 105 int GetMacroDepth PROTO((void)); 106 106 void ListMacro PROTO((Macro *macro)); 107 void ListMacros PROTO(( ));107 void ListMacros PROTO((void)); 108 108 void FreeMacro PROTO((Macro *macro)); 109 109 CommandF *find_macro_command PROTO((char *name)); … … 151 151 char *memstr PROTO((char *m1, char *m2, int n)); 152 152 int write_fmt PROTO((int fd, char *format, ...)); 153 char *opihi_version PROTO(( ));153 char *opihi_version PROTO((void)); 154 154 char *strip_version PROTO((char *input)); 155 155 156 156 /* gprint functions */ 157 void gprintInit PROTO(( ));157 void gprintInit PROTO((void)); 158 158 gpStream *gprintGetStream PROTO((gpDest dest)); 159 159 void gprintSetBuffer PROTO((gpDest dest)); … … 172 172 int GetClientSocket (char *hostname); 173 173 int InitServerSocket_Named (char *hostname, SockAddress *Address); 174 int DefineValidIP ( );174 int DefineValidIP (void); 175 175 176 void FreeCommands ( );177 void FreeMacros ( );178 void FreeBuffers ( );179 void FreeVectors ( );180 void FreeVariables ( );181 void FreeLists ( );176 void FreeCommands (void); 177 void FreeMacros (void); 178 void FreeBuffers (void); 179 void FreeVectors (void); 180 void FreeVariables (void); 181 void FreeLists (void); 182 182 183 183 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
