#include <tutil.h>
Static Public Methods | |
void | parseCommandFile (const char *file) throw (UtilitiesException) |
void | parseCommandString (const char *command_string) throw () |
void | parseTypedCommandString (const char *command_string) throw () |
const char * | getSocketDir () throw () |
const char * | getVersionName () throw () |
int4 | getVersionNumber () throw () |
void | initThreads () throw (UtilitiesException) |
bool | isThreadEnabled () throw () |
void | out (const char *format_str,...) throw () |
|
Returns the directory name where all SmartSockets local sockets are located. For Windows systems, this does not apply. On UNIX, this is usually the directory /tmp/rtworks. On OpenVMS, this is usually the directory RTSOCKETS: [SOCKETS.node] where node is the node name of the computer. TutGetSocketDir also uses mkdir to create the directory if it does not already exist. When running SmartSockets, it is often necessary to create files (such as UNIX domain sockets) that are world-readable and world-writable. To avoid forcing users to create world-writable directories under their own home directory, getSocketDir() is used instead.
|
|
Retrieves the current version number of SmartSockets as a string of the form Version a.bc mm/dd/yy status, where a is the major release number, b is the minor release number, c is an optional maintenance release number, mm/dd/yy is an optional date, and status is an optional status string.
|
|
Returns an integer that represents the software version number. SmartSockets Version X.Y would have a version number of XY0 . For example, version 3.0 corresponds to version number 300.
|
|
Initializes the thread API and turns on internal thread synchronization calls within the utility and IPC libraries. Programs that call SmartSockets API functions from more than one thread must first call this function, even if they do not use any of the other thread API functions. This protects the integrity of the library's internal data structures. Single-threaded programs do not need to call initThreads, and indeed should avoid doing so for optimum performance. The added overhead of internal thread synchronization calls is not needed for single-threaded programs.
|
|
Determines whether or not initThreads has been called. |
|
This method can be used to print information to the user Simillar to the printf and TutOut in SmartSockets. |
|
Submits a file to the process' command interface for execution. Each line of the file is executed with parseCommandString().
|
|
Submits a string to the command interface for execution. If there is a syntax error in command_string, a message is displayed on standard out. If the command is successfully executed, and the Command_Feedback option is set to always , command feedback is displayed on the output window. If Command_Feedback is set to never, or interactive, no feedback is generated.
|
|
Submits a string to the command interface for execution. This method behaves exactly like parseCommandString(), except for the feedback of successful commands. Unlike parseCommandString() -- which will not write any feedback to standard out if the 'Command_feedback' option is set to 'interactive' -- this method will provide positive feedback if the option 'Command_Feedback' is set to 'interactive'. If there is a syntax error in command_string, a message is displayed on standard out. If the command is successfully executed, and the Command_Feedback option is set to always or interactive, command feedback is displayed on the output window. If Command_Feedback is set to never, no feedback is generated. To submit a non-interactive string to the command interface use the method parseCommandString().
|