Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xpaset(1) [debian man page]

xpaset(1)							SAORD Documentation							 xpaset(1)

NAME
xpaset - send data to one or more XPA servers SYNOPSIS
<data> | xpaset [-h] [-i nsinet] [-m method] [-n] [-p] [-s] [-t sval,lval] [-u users] [-v] <template|host:port> [paramlist] OPTIONS
-h print help message -i access XPA point on different machine (override XPA_NSINET) -m override XPA_METHOD environment variable -n don't wait for the status message after server completes -p don't read (or send) buf data from stdin -s enter server mode -t [s,l] set short and long timeouts (override XPA_[SHORT,LONG]_TIMEOUT) -u [users] XPA points can be from specified users (override XPA_NSUSERS) -v verify message to stdout --version display version and exit DESCRIPTION
Data read from stdin will be sent to access points matching the template or host:port. A set of qualifying parameters can be appended. Normally, xpaset reads data input from stdin until EOF and sends those data to the XPA target, along with parameters entered on the command line. For example to send a FITS file to the ds9 image display: cat foo.fits | xpaset ds9 fits Sometimes, however, it is desirable to send only parameters to an XPA access point, without sending data. For such cases, use the -p switch to indicate that there is no data being send to stdin. For example, to change the colormap used by the ds9 image display program, use: csh> xpaset -p ds9 cmap Heat Of course, this also can be accomplished by sending EOF to stdin in any of the usual ways: csh> echo "" | xpaset ds9 cmap Heat csh> xpaget ds9 cmap Heat < /dev/null csh> xpaset ds9 cmap Heat ^D # Ctl-D signals EOF The -s switch puts xpaset into server mode, in which commands and data can be sent to access points without having to run xpaset multiple times. (Its not clear if this buys you much!) The syntax for sending commands in server mode is: csh> xpaset -s xpaset ds9 colormap I8 ^D xpaset ds9 regions circle 200 300 40 circle 300 400 50 ^D etc. After the required "xpaset" command is specified, optional ASCII data can be appended (as in the region example). A single data/command set is delimited by ^D. Note that typing ^D when a command is expected terminates the program. NB: server mode only works from the terminal and only ASCII data can be sent in this way. Examples - csh> xpaset ds9 file < foo.fits csh> echo "stop" | xpaset myhost:12345 SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpaset(1)

Check Out this Related Man Page

xpamb(1)							SAORD Documentation							  xpamb(1)

NAME
xpamb - the XPA Message Bus SYNOPSIS
The xpamb program can act as a "classical" message bus interface between clients and servers. A client can send a data request to the mes- sage bus, which then interfaces with multiple servers and returns the data back to the client. OPTIONS
For xpaset, several optional switches are used to save data and manipulate the stored data: o -data [name] Add the supplied data buffer to a pool of stored data buffers, using the specified name as a unique identifier for later retrieval. An error occurs if the name already exists (use either replace or del to rectify this). The -add switch is supported for backwards com- patibility with xpa 2.0. o -replace [name] Replace previously existing stored data having the same unique name with new data. This essentially is a combination of the del and data commands. o -info ["'info string'"] When adding a data buffer, you can specify an informational string to be stored with that data. This string will be returned by xpaget: xpaget xpamb foo -info (along with other information such as the date/time of storage and the size of the data buffer) if the -info switch is specified. If the info string contains spaces, you must enclose it in two sets of quotes: cat foo | xpaset xpamb -store foo -info "'this is info on foo'" The first set of quotes is removed by the shell while the second is used to delineate the info string. o -send [name] Broadcast the stored data buffer to the named template. o -del [name] Delete the named data buffer and free all allocated space. Switches can be used in any combination that makes sense. For example: cat foo.fits | xpaset xpamb -store foo -info "FITS" "DS9:*" fits foo.fits will broadcast the foo.fits image to all access points of class DS9. In addition, the foo.fits file will be stored under the name of foo for later manipulation such as: xpaset -p xpamb -send foo "DS9:*" fits foo.fits will re-broadcast the foo.fits image to all access points of class "DS9". DESCRIPTION
A "classical" message bus (such as ToolTalk) consists of servers and clients, along with a mediating program that transfers data between different processes. XPA takes a slightly different approach in that communication between clients and servers is direct. This generally is the correct technique when there is only one connection (or even a small number of connections), but can become inefficient for the serving program if a large amount of data is being transferred to many clients. For example, if a real-time data acquisition program is broadcasting a FITS image to several clients, it would need to transmit that image to each client individually. This might interfere with its own processing cycles. The preferable mechanism would be to pass the image off to an intermediate program that can then broadcast the data to the several clients. The xpamb program can alleviate such problems by functioning as a message bus in cases where such an intermediary process is wanted. It pre-defines a single access point named XPAMB - xpamb to which data can be sent for re-broadcast. You also can tell xpamb to save the data, and associate with that data a new access point, so that it can be retrieved later on. All interaction with xpamb is performed through xpaset and xpaget (or the corresponding API routines, XPASet() and XPAGet()) to the XPAMB - xpamb access point. That is, xpamb is just another XPA-enabled program that responds to requests from clients. The paramlist is used to specify the targets to which the data will be for re-broadcast, as well as the re-broadcast paramlist: data | xpaset xpamb [switches] broadcast-target broadcast-paramlist Optional switches are used to store data, and manipulate stored data, and are described below. In its simplest form, you can, for example, send a FITS image to xpamb for broadcasting to all ds9 image simply by executing: cat foo.fits | xpaset xpamb "DS9:*" fits foo.fits Since DS9 is the class name for the ds9 image display program, this will result in the FITS image being re-sent to all fits access points for all active image display programs. You can send stored data and new data to the same set of access points at the same time. The stored data always is send first, followed by the new data: cat foo2.fits | xpaset xpamb -send foo "DS9:*" fits foo.fits will first send the foo.fits file, and then the foo2.fits file to all access points of class DS9. Notice that in this example, the foo2.fits file is not stored, but it could be stored by using the -store [name] switch on the command line. The xpaget command can be used to retrieve a data from XPA access points or from a stored data buffer, or retrieve information about a stored data buffer. If no arguments are given: xpaget xpamb then information about all currently stored data buffers is returned. This information includes the data and time at which the data was stored, the size in bytes of the data, and the supplied info string. If arguments are specified, they will be in the form: xpaget xpamb [-info] [-data] [name [paramlist]] If the optional -info and/or -data switches are specified, then information and/or data will be returned for the named data buffer fol- lowing the switches. You can use either or both of these switches in a single command. For example, if the -info switch is used: xpaget xpamb -info foo then the info about that stored data buffer will be returned. If the -data is used with a specific name: xpaget xpamb -data foo then the stored data itself will be returned. If both are used: xpaget xpamb -info -data foo then the info will be returned, followed by the data. Note that it is an error to specify one of these switches without a data buffer name and that the paramlist will be ignored. If neither the -info or -data switch is specified, then the name refers to an XPA access point (with an optional paramlist following). For example: xpaget xpamb ds9 file is equivalent to: xpaget ds9 file SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpamb(1)
Man Page