commands.h
Go to the documentation of this file.00001
#ifndef COMMANDS_H
00002
#define COMMANDS_H
00003
00017
00018
00019
00020
00021
00022
00023
int cmd_quit (
char *, MsgType,
char *);
00024
int cmd_ping (
char *, MsgType,
char *);
00025
int cmd_pong (
char *, MsgType,
char *);
00026
int cmd_info (
char *, MsgType,
char *);
00027
int cmd_version(
char *, MsgType,
char *);
00028
int cmd_verbose(
char *, MsgType,
char *);
00029
int cmd_debug (
char *, MsgType,
char *);
00030
int cmd_help (
char *, MsgType,
char *);
00031
int cmd_history(
char *, MsgType,
char *);
00032
int cmd_status (
char *, MsgType,
char *);
00033
00034
00035
00036
int cmd_filter (
char *, MsgType,
char *);
00037
int cmd_home (
char *, MsgType,
char *);
00038
int cmd_send (
char *, MsgType,
char *);
00039
int cmd_ports (
char *, MsgType,
char *);
00040
int cmd_setto (
char *, MsgType,
char *);
00041
int cmd_init (
char *, MsgType,
char *);
00042
00043
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 ,
"",
""},
00071 {
"ping" ,
cmd_ping ,
"",
""},
00072 {
"pong" ,
cmd_pong ,
"",
""}
00073 };
00074
00075
00076
00077 int NumCommands =
sizeof(
cmdtab)/
sizeof(
struct Commands);
00078
00079
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
1.3.7