Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

client.h

Go to the documentation of this file.
00001 #ifndef CLIENT_H 00002 #define CLIENT_H 00003 00004 // 00005 // client.h - Custom client application header 00006 // 00007 00017 // Various site-dependent but system-independent default values 00018 00019 // Default client application values (override/set in loadconfig.c) 00020 00021 #define DEFAULT_MYID "SCL" 00022 #define DEFAULT_MYPORT 7101 00023 #define DEFAULT_RCFILE "/home/darkstar/dts/Config/sitool.ini" 00024 #define DEFAULT_LOGFILE "/home/darkstar/dts/Logs/sitool.log" 00025 00026 // Default ISIS server information (see loadconfig.c if used) 00027 00028 #define DEFAULT_ISISID "IS" 00029 #define DEFAULT_ISISHOST "darkstar" 00030 #define DEFAULT_ISISPORT 6600 00031 00032 // 00033 // END of Site-Dependent Setup 00034 // 00035 //---------------------------------------------------------------- 00036 00037 // System header files 00038 00039 #include <stdio.h> 00040 #include <string.h> 00041 #include <stdlib.h> 00042 #include <unistd.h> 00043 #include <errno.h> 00044 #include <sys/time.h> 00045 #include <sys/times.h> 00046 #include <sys/types.h> 00047 #include <sys/socket.h> 00048 #include <sys/file.h> 00049 #include <netdb.h> 00050 #include <netinet/in.h> 00051 #include <arpa/inet.h> 00052 #include <time.h> 00053 #include <termios.h> 00054 #include <fcntl.h> 00055 #include <signal.h> 00056 00057 // In case the version and compilation data are not defined 00058 // at compilation, put in some placeholders to prevent code barfing 00059 00060 #ifndef APP_VERSION 00061 #define APP_VERSION "1.0 Beta" 00062 #endif 00063 00064 #ifndef APP_COMPDATE 00065 #define APP_COMPDATE "2004-01-01" 00066 #endif 00067 00068 #ifndef APP_COMPTIME 00069 #define APP_COMPTIME "00:00:00" 00070 #endif 00071 00072 // ISIS common client utilties library header 00073 00074 #include "isisclient.h" // should be in -I path in Makefile, no paths here! 00075 00076 extern isisclient_t client; // global client runtime config table 00077 00078 00079 // drive and mechanism setup 00080 00081 #include "siutils.h" // SiUtils API header 00082 #include "mechanism.h" // mechanism struct (part of SiUtils) 00083 00084 extern si_mechanism_t scl; 00085 00086 // drive parameters struct, one needed per mechanism 00087 00088 extern si_drivepars_t dpars; 00089 00090 //---------------------------------------------------------------- 00091 // 00092 // Custom client application function prototypes 00093 // 00094 00095 int LoadConfig(char *); // Load/parse the agent runtime config file (see loadconfig.c) 00096 void KeyboardCommand(char *); // process keyboard (cli) commands (see commands.c) 00097 void SocketCommand(char *); // process messages from the client socket (see commands.c) 00098 00099 // Signal Handlers 00100 00101 void HandleInt(int); // SIGINT handler 00102 void abortall(void); // abort all moves 00103 00104 #endif // CLIENT_H

Generated on Thu Jul 22 20:02:06 2004 for SiTool Si Microstepping Motor Controller Agent by doxygen 1.3.7