TINE console command line API. More...
Functions | |
int | RegisterUserCommand (char *cmd, int(*fcn)(int, int, int, int), int *iparam, float *fparam, int access) |
Registers a user-defined command or variable which can be accessed via the TINE command line interpreter. More... | |
int | RegisterUserFunction (char *name, int(*fcn)(int argc, char *argv[])) |
Registers a user-defined function which can be accessed via the TINE command line interpreter. More... | |
TINE console command line API.
The API routines offered here allow the developer to register his own command-line calling routines to be used for interacting with a running server at the command line.
int RegisterUserCommand | ( | char * | cmd, |
int(*)(int, int, int, int) | fcn, | ||
int * | iparam, | ||
float * | fparam, | ||
int | access | ||
) |
Registers a user-defined command or variable which can be accessed via the TINE command line interpreter.
As a console application, a running tine server (or client) offers a variety of services at the command line (just type 'help'). For instance, you can turn debugging on or off, get the current server statistics, examine the connection tables, etc. This interface is avaible via the 'remote' accessor even if the server is running in the background. It it often frequently desireable to examine or alter server-specific variables or call a server specific routine. This can be partially achieved by making use of this registration function.
cmd | is the command string ([1...32] characters) to be parsed by the command interpreter. |
fcn | is an optional user defined function taking four integer arguments. |
iparam | is a pointer to an optional global integer variable. |
fparam | is a pointer to an optional global float variable. |
access | is a TINE access code (either CA_READ or CA_READ|CA_WRITE). To allow 'set' commands at the command line, you should include the CA_WRITE flag. |
References already_assigned, argument_list_error, and out_of_local_memory.
int RegisterUserFunction | ( | char * | name, |
int(*)(int argc, char *argv[]) | fcn | ||
) |
Registers a user-defined function which can be accessed via the TINE command line interpreter.
As a console application, a running tine server (or client) offers a variety of services at the command line (just type 'help'). For instance, you can turn debugging on or off, get the current server statistics, examine the connection tables, etc. This interface is avaible via the 'remote' accessor even if the server is running in the background. It it often frequently desireable to examine or alter server-specific variables or call a server specific routine. This can be partially achieved by making use of this registration function.
name | is a string ([1...32] characters) identifying the function to be parsed by the command interpreter. |
fcn | is the user defined function taking the argc and argv. |
References already_assigned, argument_list_error, and out_of_local_memory.