The VEVI shell (vsh) is a command-line interface which allows users to directly interact with the VEVI kernel. It supports line editing, command history (with substitutions), batch mode processing and the sending of VEVI messages. The vsh sends VEVI messages directly to the VEVI kernel using network-based communications and the VEVI communications object. Thus, the shell is capable of providing remote access to VEVI across IP networks. Due to this high-level of access and since only minimal error checking is performed on VEVI messages, extreme care must be taken when using the vsh. For most applications, it is recommended that <insert name of Laurent's expect thing> be used instead since it provides a safe interface to vsh.
The vsh was designed as a command-line interface for directly interacting with the VEVI kernel. It is generally used as an interactive shell, relaying user input to the VEVI kernel in the form of VEVI messages. The vsh is also capable of non-interactive, batch mode processing of command sequences from a file or a pipe (via standard input). When the vsh is used interactively, however, it provides the following features:
The line editing, history, and completion features are derived from the GNU readline and history libraries. Please refer to the GNU manuals for configuration details. The default configuration used by vsh is Emacs-mode which includes key bindings such as:
ctrl-d delete forward character
ctrl-k kill line
ctrl-n next line
ctrl-p previous line
tab completion
The vsh uses the VEVI Communications Library to perform network-based communications. VEVI messages (received from user input) are encapsulated as "generic" network messages for the VEVI communications object. These messages are produced by vsh under user control and are broadcast to all VEVIs which have an active communications object. Access control is used by each communications object to control reception and processing of these messages (see "comm_obj: The VEVI Communications Object" for details). When a valid message is received, the communications object extracts the VEVI message and sends it to the VEVI kernel for immediate execution. Minimal error checking is performed by vsh and the VEVI communications object on VEVI messages. Thus, it is possible that execution of these messages will cause VEVI to crash.
SYNOPSIS
vsh [-e command] [-f file] [-h] [-n] [-p prompt] [-s vcf_file]
-e execute "command" and exit (i.e., a "one-shot"). The "command" should be a valid vsh command. For example:
'vsh -e "send CommObj VMC_PRINTSTATUS"'
-f execute commands from file ("-" = stdin) and exit. This allows batch-mode processing. For example, if the file "command-sequence" contains a sequence of valid vsh commands:
'vsh -f command-sequence'
-h prints help message
-n no network communications. When this is specified, no network communications initialization or message passing is performed. Any network messages produced by vsh are are sent to standard output.
-p replace default prompt with "prompt". The default prompt is the vsh executable name.
-s send vcf_file and exit. This allows "one-shot" sending of a VCF file. For example, if the file "blah.vcf" contains a valid object VCF definition, the following will cause VEVI to load it:
'vsh -s blah.vcf'
-v print vsh version information
The following commands are currently supported:
| Command syntax | Description |
| help, ? | list vsh commands |
| exit, quit | terminate vsh |
| history | show history list |
| send <VEVIObjName> <VEVI message name> [data] | send a VEVI message |
| sendvcf <filename> | send a VCF file |
| sh <command> | execute a command using sh(1) |
At this time, "history" is limited only by the amount of memory which can be dynamically allocated. On UNIX systems, this is essentially unlimited. Thus, if you run vsh for a long time, using the "history" command may result in extremely long output.
The "send" command provides the basic method of interacting with an active VEVI. Here are some examples of its use:
Print status of all VEVI objects:
'send Creator VMC_PRINTSTATUS'
Print status of VEVI communications object (named "CommObj" in the VCF used to start VEVI):
'send CommObj VMC_PRINTSTATUS'
Zoom the viewpoint (named "Viewpoint" in the VCF used to start VEVI):
'send Viewpoint VMC_VIEW_ZOOMALL'
The "sendvcf" command allows a VCF description to be "uploaded" to an active VEVI from a local file. For example, if the file "blah.vcf" contains a valid object VCF definition, the following will cause VEVI to load it:
'sendvcf blah.vcf'
Note: the "generic" network message that the vsh uses to communicate with VEVI is limited to approximately 6 KB of data. Thus, "send" and "sendvcf" commands may not contain data larger than this amount (i.e., "sendvcf" cannot send a VCF larger than 6 KB).
The vsh uses the VEVI Communications Library for network-based communications. This library and the VEVI Communication Object both use Real-Time Innovations Inc.'s Network Data Delivery Service (NDDS) to distribute data across an IP network. Configuration details are given in the VEVI User's Manual (see the "NDDS Setup" section presented in "comm_obj" : the VEVI Communications Object).