Copyright Digital Equipment Corp. All rights reserved.

Example

   /*
    *   Send a Ready Inport command to the robot.  This is specific
    *   the TL82X family and causes the Inport door to be enabled
    *   for one minute (the period the light is on).  A future
    *   version of firmware may allow enableing the button to be
    *   on all the time, making this command obsolete.  The command
    *   usage is:
    *
    *      mrd_ready_inport robot
    */
   #ifndef   lint
   static   char   SccsId[] = "@(#)mrd_ready_inport.c   1.2 3/5/97" ;
   #endif

   #include <stdio.h>
   #include <stdlib.h>
   #include <mrd_common.h>
   #include <mrd_message.h>

   main(int argc, char *argv[])
   {
      int      status ;   /* status from mrd_ready_inport(3mrd) */
      char      *robot ;   /* Robot for command */
      char      log_info[MRD_MAX_LOG_STRING+1] ;   /* error text */

      /*
       *   Only one argument; the robot name.
       */
      if( argc == 1 ) {
         printf("usage: %s robot\n", argv[0]) ;
         exit(1) ;
      }
      else
         robot = argv[1] ;

      /*
       *   While the interface of Ready Inport allows the specification
       *   of any port address, the Inport of the TL820 is always "0",
       *   and this command is very robot specific.
       */
      status = mrd_ready_inport(robot, "0", log_info) ;

      if( status != MRD_STATUS_SUCCESS )
         printf("Ready Inport failed: %s: %s.\n", mrd_strstatus(status),
            log_info[0] ? log_info : "none") ;

      return 0 ;
   }