siutils.h
Go to the documentation of this file.00001
#ifndef SCLUTILS_H
00002
#define SCLUTILS_H
00003
00004
00005
00006
00007
00018
00019
00020
#include <stdio.h>
00021
#include <string.h>
00022
#include <stdlib.h>
00023
#include <ctype.h>
00024
#include <math.h>
00025
#include <unistd.h>
00026
#include <errno.h>
00027
#include <time.h>
00028
#include <sys/time.h>
00029
#include <sys/times.h>
00030
#include <sys/types.h>
00031
#include <sys/socket.h>
00032
#include <sys/file.h>
00033
#include <netdb.h>
00034
#include <netinet/in.h>
00035
#include <arpa/inet.h>
00036
#include <termios.h>
00037
#include <fcntl.h>
00038
00039
00040
00041 #define SI_RESOLUTION 20000
00042 #define SI_MAXMOVE 16000000
00043 #define SI_MINVEL 0.025
00044 #define SI_MAXVEL 50.0
00045 #define SI_MINVDOT 1
00046 #define SI_MAXVDOT 3000
00047 #define SI_MINWAIT 0.01
00048 #define SI_MAXWAIT 300
00049 #define SI_MAXINPUTS 8
00050 #define SI_MAXOUTPUTS 3
00051 #define SI_JA_DEFAULT 25
00052 #define SI_IMAX 7.0
00053
00054
00055
00056 #define SI_READY 0
00057 #define SI_MOVING 1
00058 #define SI_WIEXEC 2
00059 #define SI_WTEXEC 3
00060 #define SI_SFAULT -1
00061
00062
00063
00064
00065
00066
00091 typedef struct si_drivepars {
00092 int RS;
00093 int RV;
00094 int PM;
00095 double PC;
00096 double CC;
00097 double CI;
00098 double VE;
00099 double VC;
00100 int AC;
00101 int DE;
00102 int AM;
00103 int DI;
00104 int DC;
00105 int ID;
00106 int IP;
00107 char IS[9];
00108 int MR;
00109 int BS;
00110 int DL;
00111 double JS;
00112 int JA;
00113 }
si_drivepars_t;
00114
00115
00116
00117
00118
00119
00120
int SCLOpenPort(
char *);
00121
void SCLClosePort(
int);
00122
int SCLReadPort(
int,
char *,
long);
00123
int SCLSendCommand(
int,
char *,
char *);
00124
int SCLSendQuery(
int,
char *,
char *,
long);
00125
int SCLReqStatus(
int,
char *,
long);
00126
int SCLGetParams(
int,
si_drivepars_t *,
char *,
long);
00127
int SCLGetPos(
int,
char *,
long);
00128
int SCLGetDist(
int,
char *,
long);
00129
int SCLInStatus(
int,
char *,
long);
00130
int SCLReadStatus(
char *,
int *,
int,
char *);
00131
void SCLAbort(
int);
00132
00133
00134
00135
void SCLUpper(
char *);
00136
int SCLHexToInt(
char *);
00137
char *
SCLStatus(
int );
00138
int SCLSleep(
long );
00139
double SCLTimeStamp(
void);
00140
00141
#endif // SCLUTILS_H
Generated on Mon Jul 19 16:32:37 2004 for Si Microstep Controller API by
1.3.7