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

Commands Struct Reference

Client command action function data structure. More...

#include <commands.h>


Data Fields

char * cmd
 command verb (e.g., read, quit, etc.)

int(* action )(char *args, MsgType msgtype, char *reply)
 Action function for this command.

char * usage
 command usage syntax, for the help facility and error messages

char * description
 brief, 1-line command description for the help facility


Detailed Description

Client command action function data structure.


Field Documentation

char* Commands::cmd
 

command verb (e.g., read, quit, etc.)

int(* Commands::action)(char *args, MsgType msgtype, char *reply)
 

Action function for this command.

Parameters:
args command-line arguments (less the command verb)
msgtype ISIS message-type code (see isismessage.h)
reply string with the command return reply (info or error message)
Command action functions take the form

int cmd_xxx(char *args, MsgType msgtype, char *reply){}

They return one of three integer return status values (defined in commands.h):

  • CMD_OK command execution completed OK, reply contains the command output string to return to the caller.
  • CMD_NOOP command execution OK, but nothing to return to the caller (reply is empty, command requires no reply service).
  • CMD_ERR command execution resulted in an error, reply contains the error message to return to the caller.
See the individual command action functions implemented in commands.c for details.

char* Commands::usage
 

command usage syntax, for the help facility and error messages

char* Commands::description
 

brief, 1-line command description for the help facility


The documentation for this struct was generated from the following file:
Generated on Thu Jul 22 20:02:06 2004 for SiTool Si Microstepping Motor Controller Agent by doxygen 1.3.7