Debian Codegraph @

xpa/man/man1/xpamb.1

raw
1 .\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 . ds -- \(*W-
28 . ds PI pi
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31 . ds L" ""
32 . ds R" ""
33 . ds C` ""
34 . ds C' ""
35 'br\}
36 .el\{\
37 . ds -- \|\(em\|
38 . ds PI \(*p
39 . ds L" ``
40 . ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 . de IX
53 . tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 . nr % 0
56 . rr F
57 .\}
58 .el \{\
59 . de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
65 . \" fudge factors for nroff and troff
66 .if n \{\
67 . ds #H 0
68 . ds #V .8m
69 . ds #F .3m
70 . ds #[ \f1
71 . ds #] \fP
72 .\}
73 .if t \{\
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 . ds #V .6m
76 . ds #F 0
77 . ds #[ \&
78 . ds #] \&
79 .\}
80 . \" simple accents for nroff and troff
81 .if n \{\
82 . ds ' \&
83 . ds ` \&
84 . ds ^ \&
85 . ds , \&
86 . ds ~ ~
87 . ds /
88 .\}
89 .if t \{\
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 . \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 . \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 . \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 . ds : e
114 . ds 8 ss
115 . ds o a
116 . ds d- d\h'-1'\(ga
117 . ds D- D\h'-1'\(hy
118 . ds th \o'bp'
119 . ds Th \o'LP'
120 . ds ae ae
121 . ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "xpamb 1"
127 .TH xpamb 1 "July 23, 2013" "version 2.1.15" "SAORD Documentation"
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 \&\fBxpamb: the \s-1XPA\s0 Message Bus\fR
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 The xpamb program can act as a \*(L"classical\*(R" message bus interface
137 between clients and servers. A client can send a data request to
138 the message bus, which then interfaces with multiple servers and
139 returns the data back to the client.
140 .SH "OPTIONS"
141 .IX Header "OPTIONS"
142 For xpaset, several optional switches are used to save data and
143 manipulate the stored data:
144 .IP "\(bu" 4
145 \&\fB\-data [name]\fR
146 .Sp
147 Add the supplied data buffer to a pool of stored data buffers,
148 using the specified name as a unique identifier for later retrieval.
149 An error occurs if the name already exists (use either \fBreplace\fR
150 or \fBdel\fR to rectify this). The \fB\-add\fR switch is supported
151 for backwards compatibility with xpa 2.0.
152 .IP "\(bu" 4
153 \&\fB\-replace [name]\fR
154 .Sp
155 Replace previously existing stored data having the same unique name
156 with new data. This essentially is a combination of the \fBdel\fR
157 and \fBdata\fR commands.
158 .IP "\(bu" 4
159 \&\fB\-info [\*(L"'info string'\*(R"]\fR
160 .Sp
161 When adding a data buffer, you can specify an informational
162 string to be stored with that data. This string will be returned
163 by xpaget:
164 .Sp
165 .Vb 1
166 \& xpaget xpamb foo \-info
167 .Ve
168 .Sp
169 (along with other information such as the date/time of storage and the size of
170 the data buffer) if the \-info switch is specified. If the info string contains
171 spaces, you must enclose it in \fBtwo\fR sets of quotes:
172 .Sp
173 .Vb 1
174 \& cat foo | xpaset xpamb \-store foo \-info "\*(Aqthis is info on foo\*(Aq"
175 .Ve
176 .Sp
177 The first set of quotes is removed by the shell while the second is used to
178 delineate the info string.
179 .IP "\(bu" 4
180 \&\fB\-send [name]\fR
181 .Sp
182 Broadcast the stored data buffer to the named template.
183 .IP "\(bu" 4
184 \&\fB\-del [name]\fR
185 .Sp
186 Delete the named data buffer and free all allocated space.
187 .PP
188 Switches can be used in any combination that makes sense. For example:
189 .PP
190 .Vb 1
191 \& cat foo.fits | xpaset xpamb \-store foo \-info "FITS" "DS9:*" fits foo.fits
192 .Ve
193 .PP
194 will broadcast the foo.fits image to all access points of class
195 \&\fB\s-1DS9\s0\fR. In addition, the foo.fits file will be stored under the
196 name of \fBfoo\fR for later manipulation such as:
197 .PP
198 .Vb 1
199 \& xpaset \-p xpamb \-send foo "DS9:*" fits foo.fits
200 .Ve
201 .PP
202 will re-broadcast the foo.fits image to all access points of class \*(L"\s-1DS9\s0\*(R".
203 .SH "DESCRIPTION"
204 .IX Header "DESCRIPTION"
205 A \*(L"classical\*(R" message bus (such as ToolTalk) consists of servers and
206 clients, along with a mediating program that transfers data between
207 different processes. \s-1XPA\s0 takes a slightly different approach in that
208 communication between clients and servers is direct. This generally
209 is the correct technique when there is only one connection (or even a
210 small number of connections), but can become inefficient for the
211 serving program if a large amount of data is being transferred to many
212 clients. For example, if a real-time data acquisition program is
213 broadcasting a \s-1FITS\s0 image to several clients, it would need to
214 transmit that image to each client individually. This might interfere
215 with its own processing cycles. The preferable mechanism would be to
216 pass the image off to an intermediate program that can then broadcast
217 the data to the several clients.
218 .PP
219 The \fBxpamb\fR program can alleviate such problems by functioning
220 as a message bus in cases where such an intermediary process is
221 wanted. It pre-defines a single access point named
222 \&\fBXPAMB:xpamb\fR to which data can be sent for re-broadcast. You
223 also can tell \fBxpamb\fR to save the data, and associate with that
224 data a new access point, so that it can be retrieved later on.
225 .PP
226 All interaction with \fBxpamb\fR is performed through
227 \&\fBxpaset\fR and \fBxpaget\fR (or the corresponding \s-1API\s0
228 routines, \fB\f(BIXPASet()\fB\fR and \fB\f(BIXPAGet()\fB\fR) to the
229 \&\fBXPAMB:xpamb\fR access point. That is, \fBxpamb\fR is just
230 another XPA-enabled program that responds to requests from
231 clients. The paramlist is used to specify the targets to which
232 the data will be for re-broadcast, as well as the re-broadcast paramlist:
233 .PP
234 .Vb 1
235 \& data | xpaset xpamb [switches] broadcast\-target broadcast\-paramlist
236 .Ve
237 .PP
238 Optional switches are used to store data, and manipulate stored data,
239 and are described below.
240 .PP
241 In its simplest form, you can, for example, send a \s-1FITS\s0 image to xpamb for
242 broadcasting to all ds9 image simply by executing:
243 .PP
244 .Vb 1
245 \& cat foo.fits | xpaset xpamb "DS9:*" fits foo.fits
246 .Ve
247 .PP
248 Since \fB\s-1DS9\s0\fR is the class name for the ds9 image display
249 program, this will result in the \s-1FITS\s0 image being re-sent to all fits
250 access points for all active image display programs.
251 .PP
252 You can send stored data and new data to the same set of access points at
253 the same time. The stored data always is send first, followed by the new
254 data:
255 .PP
256 .Vb 1
257 \& cat foo2.fits | xpaset xpamb \-send foo "DS9:*" fits foo.fits
258 .Ve
259 .PP
260 will first send the foo.fits file, and then the foo2.fits file to all
261 access points of class \fB\s-1DS9\s0\fR. Notice that in this example,
262 the foo2.fits file is not stored, but it could be stored by using the
263 \&\fB\-store [name]\fR switch on the command line.
264 .PP
265 The \fBxpaget\fR command can be used to retrieve a data from \s-1XPA\s0
266 access points or from a stored data buffer, or retrieve information
267 about a stored data buffer. If no arguments are given:
268 .PP
269 .Vb 1
270 \& xpaget xpamb
271 .Ve
272 .PP
273 then information about all currently stored data buffers is returned. This
274 information includes the data and time at which the data was stored, the
275 size in bytes of the data, and the supplied info string.
276 .PP
277 If arguments are specified, they will be in the form:
278 .PP
279 .Vb 1
280 \& xpaget xpamb [\-info] [\-data] [name [paramlist]]
281 .Ve
282 .PP
283 If the optional \fB\-info\fR and/or \fB\-data\fR switches are specified, then
284 information and/or data will be returned for the named data buffer
285 following the switches. You can use either or both of these switches
286 in a single command. For example, if the \-info switch is used:
287 .PP
288 .Vb 1
289 \& xpaget xpamb \-info foo
290 .Ve
291 .PP
292 then the info about that stored data buffer will be returned.
293 If the \-data is used with a specific name:
294 .PP
295 .Vb 1
296 \& xpaget xpamb \-data foo
297 .Ve
298 .PP
299 then the stored data itself will be returned. If both are used:
300 .PP
301 .Vb 1
302 \& xpaget xpamb \-info \-data foo
303 .Ve
304 .PP
305 then the info will be returned, followed by the data. Note that it is an
306 error to specify one of these switches without a data buffer name and that
307 the paramlist will be ignored.
308 .PP
309 If neither the \fB\-info\fR or \fB\-data\fR switch is specified, then
310 the name refers to an \s-1XPA\s0 access point (with an optional paramlist
311 following).
312 For example:
313 .PP
314 .Vb 1
315 \& xpaget xpamb ds9 file
316 .Ve
317 .PP
318 is equivalent to:
319 .PP
320 .Vb 1
321 \& xpaget ds9 file
322 .Ve
323 .SH "SEE ALSO"
324 .IX Header "SEE ALSO"
325 See xpa(n) for a list of \s-1XPA\s0 help pages