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/cmd.data/vload.c

    r2843 r3693  
    66  int Ximage, Nimage;
    77  double dx, dy;
    8   char *buffer, *line;
     8  char *buffer;
    99  Vector *vecx, *vecy;
    1010 
     
    3333  ALLOCATE (buffer, char, 65536);  /* space for 512 lines of 128 bytes */
    3434  bzero (buffer, 65536);
    35   ALLOCATE (line, char, 1024);     /* space to read the file */
    3635  Nline = 0;
    3736
    38   write (Ximage, "LOAD", 4); /* force Ximage to look for the incoming image */
    39   sprintf (line, "OVER %9d ", n);
    40   write (Ximage, line, 16);
    41  
     37  SendGraphCommand (Ximage, 4, "LOAD");
     38  SendGraphCommand (Ximage, 16, "OVER %9d ", n);
     39
    4240  dx = dy = 1.0;
    43 
    4441  for (i = 0; i < vecx[0].Nelements; i++) {
    4542    snprintf (&buffer[Nline*128], 128, "%15s %20.10f %20.10f %20.10f %20.10f ", "BOX",
     
    4744    Nline ++;
    4845    if (Nline == 512) {
    49       sprintf (line, "NLINES  %7d ", Nline);
    50       write (Ximage, line, 16);
     46      SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    5147      write (Ximage, buffer, Nline*128);
    5248      bzero (buffer, 65536);
     
    5551  }
    5652
    57   sprintf (line, "NLINES  %7d ", Nline);
    58   write (Ximage, line, 16);
     53  SendGraphCommand (Ximage, 16, "NLINES  %7d ", Nline);
    5954  write (Ximage, buffer, Nline*128);
    60   sprintf (line, "DONE ");
    61   write (Ximage, line, 16);
     55  SendGraphCommand (Ximage, 16, "DONE");
    6256
    6357  free (buffer);
    64   free (line);
    6558  fprintf (stderr, "loaded %d objects\n", n);
    6659
Note: See TracChangeset for help on using the changeset viewer.