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 // 00018 // Command action function prototypes, see commands.c for the implementation 00019 // 00020 00021 // Common interactive client commands 00022 00023 int cmd_quit (char *, MsgType, char *); // quit the application 00024 int cmd_ping (char *, MsgType, char *); // ping (comm handshake request) 00025 int cmd_pong (char *, MsgType, char *); // pong (comm handshake acknowledge) 00026 int cmd_info (char *, MsgType, char *); // return client application info 00027 int cmd_version(char *, MsgType, char *); // return version info 00028 int cmd_verbose(char *, MsgType, char *); // toggle verbose mode 00029 int cmd_debug (char *, MsgType, char *); // toggle debug (superverbose) mode 00030 int cmd_help (char *, MsgType, char *); // show command help 00031 int cmd_history(char *, MsgType, char *); // cli history utility 00032 int cmd_status (char *, MsgType, char *); // client STATUS command 00033 00034 // IFW commands 00035 00036 int cmd_filter (char *, MsgType, char *); // set/query the filter position 00037 int cmd_home (char *, MsgType, char *); // home the filter wheel 00038 int cmd_send (char *, MsgType, char *); // send a raw IFW command 00039 int cmd_ports (char *, MsgType, char *); // show current IFW comm port info 00040 int cmd_setto (char *, MsgType, char *); // set/query IFW comm timeout 00041 int cmd_init (char *, MsgType, char *); // initialize/reset runtime params 00042 00043 // Application command/action structure 00044 00049 struct Commands { 00050 char *cmd; 00051 int(* action)(char *args, MsgType msgtype, char *reply); 00052 char *usage; 00053 char *description; 00054 } 00055 cmdtab[] = { 00056 {"quit" ,cmd_quit ,"quit","Terminate the IFWTool session"}, 00057 {"filter" ,cmd_filter ,"filter <n>","Set/query the filter position"}, 00058 {"send" ,cmd_send ,"send <cmd>","Send a raw IFW command"}, 00059 {"status" ,cmd_status ,"status","Report IFWTool application status"}, 00060 {"timeout" ,cmd_setto ,"timeout <sec>","Set/query the IFW port communications timeout in seconds"}, 00061 {"init" ,cmd_init ,"init","(re)Initialize the IFW"}, 00062 {"home" ,cmd_home ,"home", "Restore filter wheel to position 1"}, 00063 {"verbose" ,cmd_verbose ,"verbose","Toggle verbose output mode on/off"}, 00064 {"debug" ,cmd_debug ,"debug","Toggle super-verbose debugging output mode on/off"}, 00065 {"history" ,cmd_history ,"history","Show the command history"}, 00066 {"info" ,cmd_info ,"info","Report application runtime info"}, 00067 {"version" ,cmd_version ,"version","Report the application version and compilation time"}, 00068 {"ports" ,cmd_ports ,"ports","List information about the active IFW comm ports"}, 00069 {"help" ,cmd_help ,"help <cmd>","Help command (alias: ? <cmd>)"}, 00070 {"?" ,cmd_help ,"",""}, // "" excludes from help 00071 {"ping" ,cmd_ping ,"",""}, 00072 {"pong" ,cmd_pong ,"",""} 00073 }; 00074 00075 // Number of commands defined (so we don't have to count correctly) 00076 00077 int NumCommands = sizeof(cmdtab)/sizeof(struct Commands); 00078 00079 // command function return codes 00080 00081 #define CMD_OK 0 00082 #define CMD_ERR -1 00083 #define CMD_NOOP 1 00084 00085 #endif // COMMANDS_H

Generated on Thu Jul 22 20:23:38 2004 for Optec IFW Intelligent Filter Wheel Control Tool by doxygen 1.3.7