Debian Codegraph @

cextern/xpa/man/man1/xpamb.1

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