IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5270


Ignore:
Timestamp:
Oct 10, 2005, 8:52:00 PM (21 years ago)
Author:
eugene
Message:

added support for client/server functions, moved some globals around, dropped some unused entries, added commcode support for Stars and AddstarClientOptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r5239 r5270  
    1 # include <ohana.h>
     1# include "base.h"
    22# include <dvo.h>
    33# include <signal.h>
     
    55# include <time.h>
    66# include <zlib.h>
     7# include <netinet/ip.h>
     8# include <netdb.h>
     9# include <arpa/inet.h>
     10
     11/* this is generated locally from the entries in addstar/def */
     12# include "commcode.h"
    713
    814/* used in find_matches, find_matches_refstars */
     
    1824    exit (0); }
    1925
    20 # if (0)
    21 /* this structure is used for loading the data from the FITS smp file */
    22 typedef struct {
    23   float X;
    24   float Y;
    25   float M;
    26   float dM;
    27   float Mgal;
    28   float Map;
    29   float sky;
    30   float fx;
    31   float fy;
    32   float df;
    33   char  dophot;
    34   char  dummy[3];
    35 } StarData;
    36 # endif
    37 
    38 typedef struct {
    39   double X;
    40   double Y;
    41   double R;
    42   double D;
    43   double M, dM;
    44   char   dophot;
    45   double sky;
    46   double fx, fy, df;
    47   double Mgal, Map;
    48   int found;
    49   short int code;
    50   e_time t;
    51 } Stars;
     26typedef struct sockaddr_in SockAddress;
    5227
    5328enum {M_IMAGE, M_REFLIST, M_REFCAT};
     
    5530/* global variables set in parameter file */
    5631char   ImageCat[256];
    57 char   ImageTemplate[256];
    58 char   CatTemplate[256];
    5932char   GSCFILE[256];
    6033char   CATDIR[256];
     
    6538char   GSCDIR[256];
    6639char   CDROM[256];
     40char   DateKeyword[64];
     41char   DateMode[64];
     42char   UTKeyword[64];
     43char   MJDKeyword[64];
     44char   JDKeyword[64];
     45char   ExptimeKeyword[64];
     46char   AirmassKeyword[64];
     47char   CCDNumKeyword[64];
     48char   STKeyword[64];
     49char   SubpixDatafile[256];
    6750double DEFAULT_RADIUS, NSIGMA, SNLIMIT;
    6851double ZeroPt;
    6952double Latitude, SiderealTime;
    70 int    VERBOSE;
    71 int    FITS_INPUT;
    72 int    SKIP_MISSED;
    7353int    XOVERSCAN, YOVERSCAN;
    7454int    XMIN, XMAX, YMIN, YMAX;
    75 int    ACCEPT_ASTROM;
    76 int    TEXTMODE;
     55char   PASSWORD[80];
     56char   HOSTNAME[80];
     57int    NVALID, *VALID_IP;
    7758
    78 PhotCode *thiscode;
    79 GSCRegion UserPatch;
    80 Coords *MOSAIC;
     59/* globals set by command-line options */
     60int   CALIBRATE;
     61int   DUMP_MATCHES;
     62int   ONLY_IMAGES;
     63int   EXISTING_REGIONS;
     64int   FORCE_READ;
     65int   SKYPROBE;
     66int   ADDREFS;
     67int   REPLACE;
     68int   ONLY_MATCH;
     69int   CLOSEST;
     70int   VERBOSE;
     71int   FITS_INPUT;
     72int   SKIP_MISSED;
     73int   ACCEPT_ASTROM;
     74int   TEXTMODE;
     75int   NOSORT;
     76int   UPDATE;
     77int   MODE;
    8178
    82 char DateKeyword[64];
    83 char DateMode[64];
    84 char UTKeyword[64];
    85 char MJDKeyword[64];
    86 char JDKeyword[64];
    87 char ExptimeKeyword[64];
    88 char AirmassKeyword[64];
    89 char CCDNumKeyword[64];
    90 char STKeyword[64];
    91 char SubpixDatafile[256];
    92 
    93 int CalReference;
    94 int CalColor;
    95 int CALIBRATE;
    96 int DUMP_MATCHES;
    97 int ONLY_IMAGES;
    98 int EXISTING_REGIONS;
    99 int FORCE_READ;
    100 int SKYPROBE;
    101 int ADDREFS;
    102 int REPLACE;
    103 int ONLY_MATCH;
    104 int CLOSEST;
    105 
    106 int NOSORT;
    107 int UPDATE;
    108 
    109 int MODE;
    11079char *DUMP;
    11180char *SELECT_2MASS_QUALITY;
    11281
    113 time_t TIMEREF;
     82time_t    TIMEREF;
     83PhotCode *thiscode;
     84GSCRegion UserPatch;
     85Coords   *MOSAIC;
    11486
    11587/*** addstar prototypes ***/
     
    195167Missing *sort_missing (Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss);
    196168
     169int InitServerSocket (char *hostname, SockAddress *Address);
     170int WaitServerSocket (int InitSocket, SockAddress *Address, int *validIP, int Nvalid);
     171int GetClientSocket (char *hostname);
     172
    197173/**
    198174  there is an inconsistency to be resolved: fixed structures (like Image)
     
    204180**/
    205181
     182AddstarClientOptions args_client (int argc, char **argv);
     183
     184int args_server (int argc, char **argv);
     185int CheckPassword (int BindSocket);
     186int NewImage (int BindSocket);
Note: See TracChangeset for help on using the changeset viewer.