IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2005, 10:37:51 AM (21 years ago)
Author:
eugene
Message:

moved kapa/kii communications to use SendGraphCommand functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/cmpload.c

    r3462 r3693  
    1212  double dtmp;
    1313  FILE *f;
    14   char *buffer, *buffer2, *line;
     14  char *buffer, *buffer2;
     15  int Ximage, Nimage;
    1516  Header header;
    16   int Ximage, Nimage;
    1717 
    1818  Nimage = -1;
     
    121121  fclose (f);
    122122
    123   ALLOCATE (line, char, 129);
    124   write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */
    125   sprintf (line, "OVER %9d ", n);
    126   write (Ximage, line, 16);
    127  
     123  SendGraphCommand (Ximage, 4, "LOAD");
     124  SendGraphCommand (Ximage, 16, "OVER %9d ", n);
    128125  ALLOCATE (buffer2, char, 66000);
    129126  bzero (buffer2, 65536);
     127
    130128  for (Nout = i = 0; i < Nin; i++, Nout++) {
    131129    sprintf (&buffer2[Nout*128], "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX", X[i], Y[i], 5.0, 5.0);
    132130    if (Nout == 512) {
    133       sprintf (line, "NLINES  %7d ", Nout);
    134       write (Ximage, line, 16);
     131      SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nout);
    135132      write (Ximage, buffer2, Nout*128);
    136133      bzero (buffer2, 65536);
     
    140137
    141138  if (Nout) {
    142     sprintf (line, "NLINES  %7d ", Nout);
    143     write (Ximage, line, 16);
     139    SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nout);
    144140    write (Ximage, buffer2, Nout*128);
    145141  }
    146   sprintf (line, "DONE ");
    147   write (Ximage, line, 16);
     142  SendGraphCommand (Ximage, 16, "DONE");
    148143
    149144  fits_free_header (&header);
     
    152147  free (M);
    153148  free (buffer);
    154   /*  */
    155 
    156149  free (buffer2);
    157   free (line);
    158150
    159151  fprintf (stderr, "loaded %d objects\n", Nin);
Note: See TracChangeset for help on using the changeset viewer.