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

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.


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.


The documentation for this struct was generated from the following file:
Generated on Thu Jul 22 20:10:48 2004 for Barcode Reader Agent by doxygen 1.3.7