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

extsimmot.c

Go to the documentation of this file.
00001 /*
00002   extsim.c
00003 
00004   Dispatcher of external functions to simulated implementation.
00005 
00006   Modification history:
00007 
00008    14-Apr-2000 WPS added _attribute__((unused)) to ident
00009   7-Aug-1998  FMP changed extInit/Quit to extMotInit/Quit()
00010   8-Jul-1998  FMP changed EMC_INIFILE to EMCMOT_INIFILE
00011   18-Mar-1998  FMP split out from extsim.c
00012   25-Nov-1997 FMP changed extLimitSwitchRead to extPos,NegLimit...
00013   18-Nov-1997 FMP added dio functions
00014   16-Oct-1997  FMP created
00015   */
00016 
00017 #include "extintf.h"            /* these decls */
00018 #include "sim.h"                /* decls for sim implementation */
00019 /* FIXME-- this header is installed in emcmot/, after emcsim/ is compiled */
00020 #include "emcmotglb.h"          /* EMCMOT_INIFILE */
00021 
00022 /* ident tag */
00023 #ifndef __GNUC__
00024 #ifndef __attribute__
00025 #define __attribute__(x)
00026 #endif
00027 #endif
00028 
00029 static char __attribute__((unused)) ident[] = "$Id: extsimmot.c,v 1.2 2000/10/27 20:34:42 terrylr Exp $";
00030 
00031 int extMotInit(const char * stuff)
00032 {
00033   /* pass the name of the ini file here */
00034   return simMotInit(EMCMOT_INIFILE);
00035 }
00036 
00037 int extMotQuit()
00038 {
00039   return simMotQuit();
00040 }
00041 
00042 int extDacNum()
00043 {
00044   return simDacNum();
00045 }
00046 
00047 int extDacWrite(int dac, double volts)
00048 {
00049   return simDacWrite(dac, volts);
00050 }
00051 
00052 int extDacWriteAll(int max, double * volts)
00053 {
00054   return simDacWriteAll(max, volts);
00055 }
00056 
00057 int extEncoderSetIndexModel(unsigned int model)
00058 {
00059   return simEncoderSetIndexModel(model);
00060 }
00061 
00062 int extEncoderNum()
00063 {
00064   return simEncoderNum();
00065 }
00066 
00067 int extEncoderRead(int encoder, double * counts)
00068 {
00069   return simEncoderRead(encoder, counts);
00070 }
00071 
00072 int extEncoderReadAll(int max, double * counts)
00073 {
00074   return simEncoderReadAll(max, counts);
00075 }
00076 
00077 int extEncoderResetIndex(int encoder)
00078 {
00079   return simEncoderResetIndex(encoder);
00080 }
00081 
00082 int extEncoderReadLatch(int encoder, int * flag)
00083 {
00084   return simEncoderReadLatch(encoder, flag);
00085 }
00086 
00087 int extEncoderReadLevel(int encoder, int * flag)
00088 {
00089   return simEncoderReadLevel(encoder, flag);
00090 }
00091 
00092 int extMaxLimitSwitchRead(int axis, int * flag)
00093 {
00094   return simMaxLimitSwitchRead(axis, flag);
00095 }
00096 
00097 int extMinLimitSwitchRead(int axis, int * flag)
00098 {
00099   return simMinLimitSwitchRead(axis, flag);
00100 }
00101 
00102 int extHomeSwitchRead(int axis, int * flag)
00103 {
00104   return simHomeSwitchRead(axis, flag);
00105 }
00106 
00107 int extAmpEnable(int axis, int enable)
00108 {
00109   return simAmpEnable(axis, enable);
00110 }
00111 
00112 int extAmpFault(int axis, int * fault)
00113 {
00114   return simAmpFault(axis, fault);
00115 }

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