home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl169 < prev    next >
Text File  |  1987-03-02  |  5KB  |  158 lines

  1. /*
  2.  * RCCL Version 1.0           Author :  Vincent Hayward
  3.  *                                      School of Electrical Engineering
  4.  *                                      Purdue University
  5.  *      Dir     : h
  6.  *      File    : manip.h
  7.  *      Remarks : All the structures and entry point declaration not
  8.  *                known by the user
  9.  *      Usage   : Included in the concerned files
  10.  */
  11.  
  12. #define HARDCLOCK       7       /* basic sample time    */
  13. #define MINSAMPLE       7       /* minimum sample time  */
  14. #define MAXSAMPLE       112     /* maximum .....  ....  */
  15. #define DEF_SAMPLE      28      /* default ...... ....  */
  16. #define DEF_TRSV        10      /* default trs vel mm/s */
  17. #define DEF_ROTV        10      /* default rot vel dg/s */
  18.  
  19. /*
  20.  * bit definitions for set operations on directions and joints
  21.  */
  22.  
  23. #define SELFX           01
  24. #define SELFY           02
  25. #define SELFZ           04
  26. #define SELMX           010
  27. #define SELMY           020
  28. #define SELMZ           040
  29.  
  30. #define SELTX           01
  31. #define SELTY           02
  32. #define SELTZ           04
  33. #define SELRX           010
  34. #define SELRY           020
  35. #define SELRZ           040
  36.  
  37. #define SELJ1           01
  38. #define SELJ2           02
  39. #define SELJ3           04
  40. #define SELJ4           010
  41. #define SELJ5           020
  42. #define SELJ6           040
  43.  
  44.  
  45.  
  46. typedef int     ALIGN;                  /* basic machine word boundary  */
  47.  
  48. typedef union it {                      /* basic queue item aligned     */
  49.         union it *next;
  50.         ALIGN z;
  51. } ITEM, *ITEM_PTR;
  52.  
  53. typedef struct rt {                     /* empty record head of queue   */
  54.         ITEM_PTR put;
  55.         ITEM_PTR get;
  56. } ROOT, *ROOT_PTR;
  57.  
  58. typedef struct linkterm {               /* position equation term       */
  59.         TRSF_PTR trsf;          /* user's transform             */
  60.         TRSF_PTR altr;          /* alternate system's transform */
  61.         TRSF_PTR oldt;          /* old value                    */
  62.         bool rhs;               /* right hand side pred         */
  63.         ROOT hd;                /* head of the hold trsf queue  */
  64.         struct linkterm *next;  /* pointer to the next          */
  65.         struct linkterm *prev;  /* pointer to the previous      */
  66. } TERM, *TERM_PTR;
  67.  
  68.                     /* internal position structure  */
  69.                     /* that maps exactly on user's  */
  70. typedef struct position {               /* POS structure                */
  71.         char *name;             /* name pointer                 */
  72.         int code;               /* termination code             */
  73.         real scal;              /* motion scalar 0 - 1          */
  74.         event end;              /* signaled when done           */
  75.  
  76.                     /* what follows is not known    */
  77.         bool cfnsp, tfnsp;      /* coord fns , tool fns pred.   */
  78.         bool coorp, toolp;      /* coord , tool pred.           */
  79.         TERM_PTR t6ptr;         /* pointer to t6 term           */
  80.         TERM_PTR tlptr;         /* pointer to tool term         */
  81.         TERM_PTR pos;           /* pointer to pos term          */
  82. } PST, *PST_PTR;
  83.  
  84. typedef struct drivepar {               /* drive parameters             */
  85.         real dx, dy, dz;
  86.         real dthe, dphi, dpsi;
  87. } DRVP, *DRVP_PTR;
  88.  
  89.  
  90. typedef struct mot {                    /* motion record                */
  91.         int acct, sgt;          /* acc. time, segment time      */
  92.         int velt, velr;         /* trans, rot velocities        */
  93.         PST_PTR pst;            /* position requested           */
  94.         int mod;                /* mode                         */
  95.         char *cfg;              /* configuration                */
  96.         TERM_PTR upd;           /* term to be updated           */
  97.         TRFN fnt;               /* functions to be evaluated    */
  98.         int smpl;               /* sample                       */
  99.         real fmass;             /* mass of object               */
  100.         int fsp;                /* force limit selection        */
  101.         FORCE frc;              /* ..... ..... values           */
  102.         int csp;                /* comply selection             */
  103.         FORCE cpy;              /* ...... values                */
  104.         int dsp;                /* diff motion selection        */
  105.         DIFF dst;               /* ........... values           */
  106.         int exp;                /* extra distance selection     */
  107.         DIFF exd;               /* ..... ........ values        */
  108. } MOT, *MOT_PTR;
  109.  
  110. typedef struct opsw {                   /* option switches              */
  111.         bool graphics,          /* graphic files (unformated)   */
  112.              numerics,          /* numeric output (formated)    */
  113.              angles,            /* angles in solution frame     */
  114.              t6butnotj6,        /* t6 but not j6                */
  115.              encoders;          /* encoder values output        */
  116. } OPSW, *OPSW_PTR;
  117.  
  118.  
  119.  
  120. extern  ROOT    mqueue_n;               /* motion queue head            */
  121.  
  122. /*
  123.  * function's types
  124.  */
  125.  
  126. extern ITEM_PTR dequeue_n();
  127.  
  128. extern  int     setpoint_n(),
  129.         checkstate_n();
  130.  
  131. extern  char    *strsave();
  132.  
  133. extern  char    *mess;                  /* in rtc               */
  134.  
  135. /*
  136.  * fake system with signals use this Unix unallocated signal
  137.  */
  138.  
  139. #ifdef  FAKE
  140. #define SIGCLCK 16
  141. #endif
  142.  
  143. /*
  144.  * extra entry points that only exist in the PLAN and FAKE version
  145.  */
  146.  
  147. #ifndef REAL
  148. extern  OPSW    opsw_n;
  149.  
  150. extern  FILE    *fpo;
  151.  
  152. #define release release_l
  153. #define control control_l
  154.  
  155. extern  int     release_l(),
  156.         control_l();
  157. #endif
  158.