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

commands.h

Go to the documentation of this file.
00001 #ifndef COMMANDS_H 00002 #define COMMANDS_H 00003 00017 // Common interactive client commands 00018 00019 int cmd_quit (char *, MsgType, char *); // quit the application 00020 int cmd_ping (char *, MsgType, char *); // ping (comm handshake request) 00021 int cmd_pong (char *, MsgType, char *); // pong (comm handshake acknowledge) 00022 int cmd_info (char *, MsgType, char *); // return client application info 00023 int cmd_version(char *, MsgType, char *); // return version info 00024 int cmd_verbose(char *, MsgType, char *); // toggle verbose mode 00025 int cmd_debug (char *, MsgType, char *); // toggle debug (superverbose) mode 00026 int cmd_help (char *, MsgType, char *); // show command help 00027 int cmd_history(char *, MsgType, char *); // cli history utility 00028 00029 // Filter Wheel commands 00030 00031 int cmd_ports (char *, MsgType, char *); // show current mechanism comm ports 00032 int cmd_rdpos (char *, MsgType, char *); // read position encoders 00033 int cmd_setcur (char *, MsgType, char *); // set motor current (amps) 00034 int cmd_setsp (char *, MsgType, char *); // set move speed (rev/s) 00035 int cmd_setacc (char *, MsgType, char *); // set move acceleration (rev/s/s) 00036 int cmd_setdec (char *, MsgType, char *); // set move deceleration (rev/s/s) 00037 int cmd_setstep(char *, MsgType, char *); // set steps/position 00038 int cmd_setto (char *, MsgType, char *); // set timeout interval (sec) 00039 int cmd_mstatus(char *, MsgType, char *); // print microstep drive status 00040 int cmd_idle (char *, MsgType, char *); // disable motor (idle to 0 amps) 00041 int cmd_send (char *, MsgType, char *); // send a raw command 00042 int cmd_query (char *, MsgType, char *); // send a raw query command 00043 int cmd_reset (char *, MsgType, char *); // reset runtime & controller params 00044 int cmd_init (char *, MsgType, char *); // initialize the microstep drive 00045 int cmd_abort (char *, MsgType, char *); // abort/stop microstep drive 00046 int cmd_fpars (char *, MsgType, char *); // report filter parameters 00047 00048 // High-level "user" commands 00049 00050 int cmd_status (char *, MsgType, char *); // client STATUS command 00051 int cmd_filter (char *, MsgType, char *); // user FILTER command 00052 int cmd_load (char *, MsgType, char *); // user LOAD command 00053 int cmd_findpos(char *, MsgType, char *); // seek valid filter position 00054 00055 // Application command/action structure 00056 00061 struct Commands { 00062 char *cmd; 00063 00090 int(* action)(char *args, MsgType msgtype, char *reply); 00091 } 00092 cmdtab[] = { 00093 {"quit" ,cmd_quit }, 00094 {"reset" ,cmd_reset }, 00095 {"filter" ,cmd_filter }, 00096 {"findpos" ,cmd_findpos }, 00097 {"load" ,cmd_load }, 00098 {"status" ,cmd_status }, 00099 {"init" ,cmd_init }, 00100 {"restore" ,cmd_init }, // restore is an alias for init 00101 {"abort" ,cmd_abort }, 00102 {"stop" ,cmd_abort }, 00103 {"rdpos" ,cmd_rdpos }, 00104 {"steps" ,cmd_setstep }, 00105 {"speed" ,cmd_setsp }, 00106 {"current" ,cmd_setcur }, 00107 {"accel" ,cmd_setacc }, 00108 {"decel" ,cmd_setdec }, 00109 {"timeout" ,cmd_setto }, 00110 {"mstatus" ,cmd_mstatus }, 00111 {"fpars" ,cmd_fpars }, 00112 {"idle" ,cmd_idle }, 00113 {"ports" ,cmd_ports }, 00114 {"send" ,cmd_send }, 00115 {"query" ,cmd_query }, 00116 {"info" ,cmd_info }, 00117 {"verbose" ,cmd_verbose }, 00118 {"version" ,cmd_version }, 00119 {"debug" ,cmd_debug }, 00120 {"help" ,cmd_help }, 00121 {"?" ,cmd_help }, // ? is an alias for help 00122 {"history" ,cmd_history }, 00123 {"ping" ,cmd_ping }, 00124 {"pong" ,cmd_pong } 00125 }; 00126 00127 // Number of commands defined (so we don't have to count correctly) 00128 00129 int NumCommands = sizeof(cmdtab)/sizeof(struct Commands); 00130 00131 // command function return codes 00132 00133 #define CMD_OK 0 00134 #define CMD_ERR -1 00135 #define CMD_NOOP 1 00136 00137 #endif // COMMANDS_H

Generated on Thu Jul 22 19:58:41 2004 for Filter Wheel Agent by doxygen 1.3.7