xditscmd - A simple X Windows based interface to DRAMA.

Function

A simple X Windows based interface to DRAMA.

Synopsis

xditscmd [xt options] [options] [task[@node]]

Under VMS, individual strings should be enclosed in quotes to preserve case (the default is to convert to lower case).

Description

This program provides a X-Windows/Motif user interface to a Dits tasks.

In addition to displaying the results of normal \dits\ commands, this program will display any image structures returned by commands in a popup image window.

Command arguments

task
The initial name of the task to send the message to. If a remote task use the format task@node, where node is the internet node name of the machine the task is running on. This value can also be set or be changed once the program is running.

Options

Only the -b and -n options are not settable after the program is running.

xt options
Any options accepted by the X-Windows toolkit. See XtAppInitialise(3) for details.
-b size
Size is the total message buffer size. Default 615000 This size should be about 20% bigger then that required by the values specified by the -m option. This option cannot currently be set once the program is running.

-m n1:n2:n3
Sets message buffer sizes for the connection.

n1 Messages bytes allowed for message to be sent
n2 Messages bytes allowed for return messages
n3 Number of return messages which may occur

Default is 1000:600000:1 which should be sufficient for most tasks. This value can also be set from the options pulldown, buffer menu.

-n name
The name this task should register itself as. Default is the name of the top level widget (which defaults to Xditscmd but can be set by the -name Xt option). This option may be required if you intend to have several versions of this program outstanding at one time.

-o
Send obey message (default).
-k
Send kick message.
-s
Send set message.
-G
Send get message.
-c
Send control message.
-p
Send monitor message.
-z
When supplied, the task name and message type are set using the options pull down, configuration item instead of on main screen. This reduces the space used on the screen.
-f list
Specifies a space separated list which is a list of message facility files (_msgt.h files). These facilities are made known to this program. These facilities are in addition to those added by the facilities resource.

Main Window

The Menu Bar contains a File Menu, Commands Menu and Options Menu. The file menu contains the "Exit" button which will cause the program to exit.

The commands menu contains three items- Lose Path => This button which will cause the path to the current task to be closed. Delete Task(polite) => Causes the current task to be deleted in a polite way. Delete Task(force) => Causes the current task to be delete forcefully.

The Options menu contains four or five items-

Buffers Pop up the buffers dialog which allows you to set buffer sizes
Configuration Only present if the "-z" option was selected. It Pops up the configuration dialog allowing you to set the task name, node name and message type.
Miscellaneous Pop up the miscellaneous dialog which allows you to set case conversion options and timeouts on various operations.
Load Pop up the load program dialog which allows you to load a program using the imp master task. Image Test => Tests the imaging system by creating a test image and displaying it.

The first item on the main window is a scrolled list of messages output by Dits.

Next we have the optional configuration section. If the "-z" option was supplied, this is instead available in the "options" pull down, "configuration" item. It allows you to set the task name, node name and message type for the next message to be sent. The clear button causes the node and task name entries to be cleared.

Next we have the command area. First a list of previous commands is displayed, followed by the command entry area where you can type commands (action names followed by argument lists). The arrow keys can be used to scroll back through the list of commands. Hitting return will cause the current command to be executed. You can have multiple commands to one or more tasks outstanding at any one time.

Imager Window

The imager window is a simple image display system. It is displayed whenever a message from Dits contains an image structure as its argument. Note that it takes some time to scale and display an image.

The Menu Bar contains a File Menu and Options Menu. The file menu contains the "Close" button which will cause the imager window to be closed (releasing resources) and the "Refresh" button, which rescales and rewrites the image. The file menu also contains items which allow you to write the current image to a file and retrieve it from a file (using SdsWrite()/SdsRead())

The Options menu contains "Scaling" button, which activates the Scaling popup. This allows you to set the scaling of the image. The "From Data" button sets the scaling to the image low and high values. A high value of zero causes the high value to be set to the data high value automatically on each redisplay. The scaling low and high values can be any double size floating point values.

The imager window scroll bars allow you to position the image (which is not zoomed either in or out) within the output window. If the window size exceeds the image size, the scroll bars are ignored.

Clicking a mouse button anywhere in the image causes the position within the image and the pixel value at the position, to be displayed at the top of the window.

Note that if you iconify the imager window, it will be automatically deiconified when a message containing an image structure is received.

When you are finished with the imager window, release resources by closing the window using either the file menu close button or the window manager close button. Performance will be improved if the server enables backing store by default.

X defaults

XDITSCMD uses the standard X-Windows Toolkit resource system. Fallback resources are provided to ensure the program works even if a resource file is not found. The file "xditscmd.ad" is the source of the fallback resources and can be used as a guide for user modifications. It is found in the DUL_DIR directory.

To create a user specific resources, create a file named Xditscmd and set the environment variable XUSERFILESEARCHPATH to the value "directory/%N" where "directory" is the directory containing this file. (Under VMS, create a file named "xditscmd.dat" in the directory pointed to by the logical name "DECW$USER_DEFAULTS"

Of particular interest are the application specific resources (those not related to a particular widget). The available values are

nodeName
A text string which specifies the default node which the target task resides on or the node on which to load the specified program (load dialog). Default is the current node.
taskName
A text string which specifies the name of the target task. No default is supplied.
program
A text string which specifies the name of the program to load (load dialog). No default is supplied.
processName
A text string specifing the name to be given to the created process (load dialog). No default is supplied.
logFile
If logging is to be written to a log file, the name of the log file. The default is xditscmd.log
globalBufferSize
The size of the global buffer for Xditscmd. See DitsInit() for details (buffers dialog). Default is 605000.
messageSize
An unsigned integer. The Normal size of messages sent to other tasks. See DitsGetPath() for details. Default is 1000.
maxMessages
An unsigned integer. The maximum number of messages to be queued. See "DitsGetPath()" for details (buffers dialog). Default is 1.
ReplySize
An unsigned integer. The normal size of messages sent from other tasks to this task. See DitsGetPath() for details. (buffers dialog) Default is 600000.
maxReplies
An unsigned integer. The maximum number of replies to be queued. See DitsGetPath() for details (buffers dialog). Default is 1.
pathTimeout
An unsigned integer. If timeouts are enabled on get path operations then this is the the default timeout (misc dialog). Default 100.
actionTimeout
An unsigned integer. If timeouts are enabled on action messages then this is the the default timeout (misc dialog). Default 100.
taskNodeCase
One of the values UPPER, LOWER or NONE indciating the case conversion to be applied to task and node names (misc dialog). Default is NONE.
actionCase
One of the values UPPER, LOWER or NONE indciating the case conversion to be applied to action names (misc dialog). Default is NONE.
logging
A logical value indicating if logging is to be enabled (misc dialog). Default is False.
logtoFile
A logical value indicating that if logging is enable, then it should be copied to the log files specified by the logFile resource value. (misc dialog). Default is False.
pathTimeoutEnable
A logical to enable or disable timeouts on get path operations (misc dialog). Default is False.
actionTimeoutEnable
A logical to enable or disable timeouts on normal messages (misc dialog). Default is False.
messageType
Indicates the initial message type (main window/config dialog). One of OBEY, KICK, SET, GET, CONTROL or MONITOR. Default is OBEY.
configDialogEnable
Indicates if the config dialog should be enabled. If False, then items normally displayed in the config dialog are displayed on the main menu. If true, the config dialog button is added to the options menu. If False, then it can be overriden by the -z option. Default False.
facilities
A space separated list of message table (_msgt.h) files to be loaded on startup.

See Also

ditscmd(1), XtAppInitialise(3), Dits specification, X-Windows documentation, X-Windows toolkit documentation, Motif documentation

Language

C

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au