Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

usrmotintf.h

Go to the documentation of this file.
00001 #ifndef USRMOTINTF_H
00002 #define USRMOTINTF_H
00003 
00004 /*
00005    usrmotintf.h
00006 
00007    Decls for interface functions (init, exit, read, write) for user
00008    processes which communicate with the real-time motion controller
00009    in emcmot.c
00010 
00011    Modification history:
00012 
00013    16-Aug-2000  FMP added usrmotAlter(); added #if 0 matching brackets
00014    to extern "C" bracket to satisfy autoindenters
00015    10-Aug-2000  FMP added decls for usrmotLoadComp,PrintComp()
00016    20-Aug-1998  FMP took logSize out of usrmotDumpLog(), since it's
00017    in the log header
00018    6-Jul-1998  FMP added usrmotIniLoad()
00019    28-May-1998  FMP added EMCMOT_COMM_SPLIT_READ_TIMEOUT
00020    13-Feb-1998  FMP added EMCMOT_COMM error values
00021    12-Feb-1998  FMP added usrmotReadEmcmotError()
00022    10-Jul-1997  FMP created from functions in usrmot.c
00023 */
00024 
00025 #include "emcmot.h"             /* EMCMOT_STATUS,CMD */
00026 
00027 /* ident tag */
00028 #ifndef __GNUC__
00029 #ifndef __attribute__
00030 #define __attribute__(x)
00031 #endif
00032 #endif
00033 
00034 static char  __attribute__((unused)) usrmotintf_h[] = "$Id: usrmotintf.h,v 1.9 2001/07/31 15:47:45 wshackle Exp $";
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #if 0
00039 }
00040 #endif
00041 #endif
00042 
00043 /* usrmotIniLoad() loads params (SHMEM_KEY, SHMEM_BASE_ADDRESS) from
00044    named ini file */
00045 extern int usrmotIniLoad(const char *file);
00046 
00047 /* usrmotReadEmcmotStatus() gets the status info out of
00048    the emcmot controller and puts it in arg */
00049 extern int usrmotReadEmcmotStatus(EMCMOT_STATUS * s);
00050 
00051 /* usrmotReadEmcmotConfig() gets the config info out of
00052    the emcmot controller and puts it in arg */
00053 extern int usrmotReadEmcmotConfig(EMCMOT_CONFIG * s);
00054 
00055 /* usrmotReadEmcmotDebug() gets the debug info out of
00056    the emcmot controller and puts it in arg */
00057 extern int usrmotReadEmcmotDebug(EMCMOT_DEBUG * s);
00058 
00059 /* usrmotReadEmcmotError() gets the earliest queued error string out of
00060    the emcmot controller and puts it in arg */
00061 extern int usrmotReadEmcmotError(char * e);
00062 
00063 /* usrmotPrintEmcmotStatus() prints the status in s, using which
00064    arg to select sub-prints */
00065 extern void usrmotPrintEmcmotStatus(EMCMOT_STATUS s, int which);
00066 
00067 /* usrmotPrintEmcmotConfig() prints the config in s, using which
00068    arg to select sub-prints */
00069 extern void usrmotPrintEmcmotConfig(EMCMOT_CONFIG s, int which);
00070 
00071 /* usrmotPrintEmcmotDebug() prints the debug in s, using which
00072    arg to select sub-prints */
00073 extern void usrmotPrintEmcmotDebug(EMCMOT_DEBUG s, int which);
00074 
00075 /* values returned by usrmotWriteEmcmotCommand; negative values
00076    are all errors */
00077 #define EMCMOT_COMM_OK 0        /* went through and honored */
00078 #define EMCMOT_COMM_ERROR_CONNECT -1 /* can't even connect */
00079 #define EMCMOT_COMM_ERROR_TIMEOUT -2 /* connected, but send timeout */
00080 #define EMCMOT_COMM_ERROR_COMMAND -3 /* sent, but can't run command now */
00081 #define EMCMOT_COMM_SPLIT_READ_TIMEOUT -4 /* can't read without split */
00082 
00083 /* usrmotWriteEmcmotCommand() writes the command to the emcmot process.
00084    Return values are as per the #defines above */
00085 extern int usrmotWriteEmcmotCommand(EMCMOT_COMMAND * c);
00086 
00087 /* usrmotInit() initializes communication with the emcmot process */
00088 extern int usrmotInit(void);
00089 
00090 /* usrmotExit() terminates communication with the emcmot process */
00091 extern int usrmotExit(void);
00092 
00093 /* usrmotDumpLog() dumps the logged data (if active) from the usrmot
00094    process into the named filename */
00095 extern int usrmotDumpLog(const char * filename, int include_header);
00096 
00097 /* usrmotLoadComp() loads the compensation data in file into the axis */
00098 extern int usrmotLoadComp(int axis, const char * file);
00099 
00100 /* usrmotAlter() loads the alter value to modify the axis position */
00101 extern int usrmotAlter(int axis, double alter);
00102 
00103 /* usrmotQueryAlter() sets the alter ptr to the current alter value */
00104 extern int usrmotQueryAlter(int axis, double * alter);
00105 
00106 /* usrmotPrintComp() prints the axis compensation data for axis */
00107 extern int usrmotPrintComp(int axis);
00108 
00109 #ifdef __cplusplus
00110 #if 0
00111 {
00112 #endif
00113 }
00114 #endif
00115 
00116 #endif /* USRMOTINTF_H */
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 

Generated on Sun Dec 2 15:27:44 2001 for EMC by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001