aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libsamp/examples/README
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /vendor/voclient/libsamp/examples/README
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'vendor/voclient/libsamp/examples/README')
-rw-r--r--vendor/voclient/libsamp/examples/README68
1 files changed, 68 insertions, 0 deletions
diff --git a/vendor/voclient/libsamp/examples/README b/vendor/voclient/libsamp/examples/README
new file mode 100644
index 00000000..461b3501
--- /dev/null
+++ b/vendor/voclient/libsamp/examples/README
@@ -0,0 +1,68 @@
+
+ This directory contains the example tasks for the LIBSAMP interface.
+Current examples include:
+
+
+ samp General SAMP commandline interface
+ snoop Print all messages available to a client application
+ send Send a message of a specific mtype to one or more apps
+
+
+Example Programs
+----------------
+
+ The interface distribution comes with a 'zztest.c' test application
+meant to exercise various methods of the interface. This is a largely
+undocumented unit test program intended only for development, users
+should instead look at the programs in the 'examples' directory.
+Current examples include:
+
+
+ snoop Print all messages available to a client application
+ send Send a message of a specific mtype to one or more apps
+
+
+Examples:
+
+ 1) Print out messages received by a client application:
+
+ % snoop print all available messages
+ % snoop -m image.load.fits print only the one mtype
+ % snoop -s topcat only message from 'TOPCAT'
+
+ 2) Print the usage of the 'send' (or 'snoop') application:
+
+ % send -h
+
+ 3) Broadcast a message to all clients subscribed to a mtype:
+
+ % send image.load.fits http://foo.edu/bar.fits testId testName
+
+ 4) Send a message to a specific app (c4) using synchronous message pattern:
+
+ % send -r c4 -p sync client.env.get HOME
+
+ 5) Send a client multiple messages from a single connection:
+
+ % cat msgs.txt
+ client.cmd.exec show noao
+ client.cmd.exec imstat dev$pix
+ client.cmd.exec imstat dev$pix[*,1:10]
+ client.cmd.exec imstat dev$pix[*,10:20]
+ client.cmd.exec imstat dev$pix[*,20:30]
+ % send -r iraf -f msgs.txt
+
+ The message text file must containt the mtype as the first value, the
+ remainder of the line are the arguments specific to that mtype.
+
+
+Note that each of these examples assumes an already-running Hub. A
+standalone hub is provided in the 'jsamp' directory included in the
+distribution. To start a hub from the toplevel directory:
+
+ % java -jar jsamp/jsamp-1.3.jar hub
+
+This should be done before trying the above example. Note that applications
+such as Topcat or Aladin have a builtin Hub that can also be used.
+
+