HELIOS developer specifications

"opitouch" UNIX utility

Support Index
Last updated:
January 8, 2003
Other developer specifications
HELIOS update "u0122" introduces a new "opitouch" UNIX utility program with the following parameters:

opitouch [-h host] [-s service]
[-dr] file_or_directory_pathnames.

This utility is kind of a UNIX version of the Macintosh "touch" program that belongs to the ImageServer distribution. It allows to trigger generation of low-resolution layout files from within UNIX. One can also achieve this by the HELIOS "layout" command, but with the layout command one has to specify plenty of parameters. On the contrary, "opitouch" automatically uses the overall OPI server settings as specified with EtherShare Admin, be it color spaces, compression methods, or lo-res resolution.

"opitouch" does not alter the modification date of the server files (like the Macintosh "touch" application does), but queues the high-resolution files directly into the queue of the OPI server master process.

There is a "-r" option to let "opitouch" go recursively through subdirectories. This option should be used carefully for two reasons: First, recursively going through a HSM system, a jukebox, or just a huge hard disk can take a lot of time or can even do physical harm by overstressing mechanical parts. Second, "opitouch" schedules the files into the OPI master server's queue in which also all requests from Macintosh or PC users, who copy or save images to the server, are scheduled. As a side effect, users may experience unpleasant delays in getting their low-resolution layout files done when "opitouch" is competing with them too heavily.

The "opitouch" program can be used remotely from a different machine to trigger low-resolution layout generation on an ImageServer server. EtherShare's built-in IP access control method can be used to prevent unauthorized use of this feature.

The "opitouch" program is a standalone utility. It is not (!) bound to a HELIOS license. It can therefore be used on any of the HELIOS supported systems to trigger remote OPI layout generation.

In many cases, "opitouch" provides a much more convenient and less error-prone method than the standard HELIOS "layout" command. In addition, it has its own unique capabilities. Anybody interested in server-based system integration should have a close look. Please check update u0122 in our Updates area for further information.

Sending events using "opitouch"

The utility "opitouch" has a new option that allows you to send events to "opisrv". When "opisrv" receives an event, it distributes that event to all programs that have registered for it. This new feature of "opitouch" can be used in scripts, called by the "Script Server". For instance, a file creation event, triggered by a script that created a new file, can be made public to all interested programs using "opitouch".
In the following example the file "/data/images/cover.tif" has been created by a script. In order to inform other programs about this event, "opitouch" must be called with the following parameters:

opitouch -e sendclose "/data/images/cover.tif"

Programs that have registered with "opisrv" using "registersuffix tif" or "registertype TIFF" will receive an event. Programs that have registered both types of events will receive two events.

A simple test case

This simple test case allows you to test the communication paths. You need two terminal windows. On the first window register for the suffix "tif":

telnet localhost 2002
Trying 127.0.0.1...
Connected to osiris.
Escape character is '^]'.
0 - Welcome to the HELIOS ImageServer event listener
registersuffix tif
0 - OK

Now send an event using "opitouch" on the second window:

opitouch -e sendclose "/data/images/cover.tif"

On the first window you see the event being received by the "telnet" process:

4 - close "/data/images/cover.tif"

Please note that the event has been sent even though the file "/data/images/ cover.tif" might not even exist. It is the responsibility of the script that calls "opitouch" to ensure that the file names are valid.

List of events and parameters

Parameters in square brackets are optional.

sendclose "file name" ["file type"]
sendrename "file name old" "file name new" ["file type"]
senddelete "file name" ["file type"]
sendcreatedir "directory name"
sendrenamedir "directory name old" "directory name new"
senddeletedir "directory name"

Please note a special case for the "senddelete" event. In order for programs that have registered using "registertype" to receive this event, you must add the file type to the event. Programs that have registered using "registersuffix" receive the event in any case.


Search the HELIOS web site: