commands.h
Go to the documentation of this file.00001
#ifndef COMMANDS_H
00002
#define COMMANDS_H
00003
00017
00018
00019
int cmd_quit (
char *, MsgType,
char *);
00020
int cmd_ping (
char *, MsgType,
char *);
00021
int cmd_pong (
char *, MsgType,
char *);
00022
int cmd_info (
char *, MsgType,
char *);
00023
int cmd_version(
char *, MsgType,
char *);
00024
int cmd_verbose(
char *, MsgType,
char *);
00025
int cmd_debug (
char *, MsgType,
char *);
00026
int cmd_help (
char *, MsgType,
char *);
00027
int cmd_history(
char *, MsgType,
char *);
00028
00029
00030
00031
int cmd_status (
char *, MsgType,
char *);
00032
int cmd_mstatus (
char *, MsgType,
char *);
00033
int cmd_ports (
char *, MsgType,
char *);
00034
int cmd_rdpos (
char *, MsgType,
char *);
00035
int cmd_setcur (
char *, MsgType,
char *);
00036
int cmd_seticur (
char *, MsgType,
char *);
00037
int cmd_setsp (
char *, MsgType,
char *);
00038
int cmd_setacc (
char *, MsgType,
char *);
00039
int cmd_setdec (
char *, MsgType,
char *);
00040
int cmd_setdist (
char *, MsgType,
char *);
00041
int cmd_setto (
char *, MsgType,
char *);
00042
int cmd_setpt (
char *, MsgType,
char *);
00043
int cmd_settopo (
char *, MsgType,
char *);
00044
int cmd_idle (
char *, MsgType,
char *);
00045
int cmd_reset (
char *, MsgType,
char *);
00046
int cmd_init (
char *, MsgType,
char *);
00047
int cmd_abort (
char *, MsgType,
char *);
00048
int cmd_sclcmds (
char *, MsgType,
char *);
00049
int cmd_ismask (
char *, MsgType,
char *);
00050
int cmd_ndata (
char *, MsgType,
char *);
00051
int cmd_inpos (
char *, MsgType,
char *);
00052
int cmd_homeaddr(
char *, MsgType,
char *);
00053
int cmd_limits (
char *, MsgType,
char *);
00054
int cmd_moveit (
char *, MsgType,
char *);
00055
int cmd_moveabs (
char *, MsgType,
char *);
00056
int cmd_moverel (
char *, MsgType,
char *);
00057
int cmd_moveto (
char *, MsgType,
char *);
00058
int cmd_findpos (
char *, MsgType,
char *);
00059
00060
00061
00066 struct Commands {
00067 char *
cmd;
00068
00095 int(* action)(
char *args, MsgType msgtype,
char *reply);
00096
00097 char *
usage;
00098 char *
description;
00099 }
00100
cmdtab[] = {
00101 {
"quit" ,
cmd_quit ,
"quit",
"Terminate the client session"},
00102 {
"status" ,
cmd_status ,
"status",
"Report the device status"},
00103 {
"mstatus" ,
cmd_mstatus ,
"mstatus",
"Query and report detailed microstep drive status"},
00104 {
"rdpos" ,
cmd_rdpos ,
"rdpos",
"Read the microstep drive position status"},
00105 {
"move" ,
cmd_moveit ,
"move <Fx>",
"Execute a raw SCL Fx move command with verbose output"},
00106 {
"moveto" ,
cmd_moveto ,
"moveto <I>",
"Move to indexed position I, range: 1..Npos"},
00107 {
"moveabs" ,
cmd_moveabs ,
"moveabs <X>",
"Move to absolute step-count position X, range: +/-16000000"},
00108 {
"moverel" ,
cmd_moverel ,
"moverel <dX>",
"Move dX steps from current position, range: +/-16000000"},
00109 {
"abort" ,
cmd_abort ,
"abort",
"Abort all motions and clear the drive command buffer"},
00110 {
"cmds" ,
cmd_sclcmds ,
"cmds",
"Print a list of all low-level SCL commands"},
00111 {
"findpos" ,
cmd_findpos ,
"findpos",
"Seek the nearest valid position in an indexed mechanims"},
00112 {
"current" ,
cmd_setcur ,
"current <Amps>",
"Set/query the drive current in Amps, range: 0-Imax"},
00113 {
"accel" ,
cmd_setacc ,
"accel <rev/s/s>",
"Set/query the drive acceleration in rev/s/s, range: 1-3000"},
00114 {
"speed" ,
cmd_setsp ,
"speed <rev/s>",
"Set/query the drive speed in rev/s, range: 0.025-50"},
00115 {
"dist" ,
cmd_setdist ,
"dist <steps>",
"Set/query the move distance in steps, range: +/-16000000"},
00116 {
"decel" ,
cmd_setdec ,
"decel <rev/s/s>",
"Set/query the drive deceleration in rev/s/s, range: 1-3000"},
00117 {
"idlecur" ,
cmd_seticur ,
"idlecur <Amps>",
"Set/query the drive idle current in Amps, range: 0-Imax"},
00118 {
"idle" ,
cmd_idle ,
"idle <on|off>",
"Enable/Dsiable drive idle after moves"},
00119 {
"timeout" ,
cmd_setto ,
"timeout <sec>",
"Set/query the drive communications timeout in seconds"},
00120 {
"polltime",
cmd_setpt ,
"polltime <msec>",
"Set/query the drive polling time in milliseconds"},
00121 {
"topology",
cmd_settopo ,
"topology <rotary|linear>",
"Set/query the mechanism topology, rotary or linear"},
00122 {
"ndata" ,
cmd_ndata ,
"ndata <n>",
"Set/query the number of position data bits (0..8, 0=unused)"},
00123 {
"inposaddr",
cmd_inpos ,
"inposaddr <n>",
"Set/query the in-position sensor address (0..8, 0=unused)"},
00124 {
"homeaddr",
cmd_homeaddr,
"homeaddr <n>",
"Set/query the home sensor address (0..8, 0=unused)"},
00125 {
"ismask" ,
cmd_ismask ,
"ismask <10101010>",
"Set/query the Input Status bit mask (8-bits)"},
00126 {
"limits" ,
cmd_limits ,
"limits <off|open|closed>",
"Set/query limit switches"},
00127 {
"init" ,
cmd_init ,
"init",
"(re)Initialize the microstep drive motion profile parameters"},
00128 {
"reset" ,
cmd_reset ,
"reset",
"Reload the runtime config file and re-initialize the drive"},
00129 {
"verbose" ,
cmd_verbose ,
"verbose",
"Toggle verbose output mode on/off"},
00130 {
"debug" ,
cmd_debug ,
"debug",
"Toggle super-verbose debugging output mode on/off"},
00131 {
"history" ,
cmd_history ,
"history",
"Show the command history"},
00132 {
"info" ,
cmd_info ,
"info",
"Report application runtime info"},
00133 {
"version" ,
cmd_version ,
"version",
"Report the application version and compilation time"},
00134 {
"ports" ,
cmd_ports ,
"ports",
"List information about the active drive comm ports"},
00135 {
"help" ,
cmd_help ,
"help <cmd>",
"Help command (alias: ? <cmd>)"},
00136 {
"?" ,
cmd_help ,
"",
""},
00137 {
"ping" ,
cmd_ping ,
"",
""},
00138 {
"pong" ,
cmd_pong ,
"",
""}
00139 };
00140
00141
00142
00143 int NumCommands =
sizeof(
cmdtab)/
sizeof(
struct Commands);
00144
00145
00146
00147 #define CMD_OK 0
00148 #define CMD_ERR -1
00149 #define CMD_NOOP 1
00150
00151
#endif // COMMANDS_H
Generated on Thu Jul 22 20:02:06 2004 for SiTool Si Microstepping Motor Controller Agent by
1.3.7