Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xpacmdnew(3) [debian man page]

xpacmdnew(3)							SAORD Documentation						      xpacmdnew(3)

NAME
XPACmdNew - create a new XPA public access point for commands SYNOPSIS
#include <xpa.h> XPA XPACmdNew(char *class, char *name); DESCRIPTION
Create a new XPA public access point for commands that will share a common identifier class:name. Enter this access point into the XPA name server, so that it can be accessed by external processes. XPACmdNew() returns an XPA struct. It often is more convenient to have one public access point that can manage a number of commands, rather than having individual access points for each command. For example, it is easier to command the ds9 image display using: echo "colormap I8" | xpaset ds9 echo "scale log" | xpaset ds9 echo "file foo.fits" | xpaset ds9 then to use: echo "I8" | xpaset ds9_colormap echo "log" | xpaset ds9_scale echo "foo.fits" | xpaset ds9_file In the first case, the commands remain the same regardless of the target XPA name. In the second case, the command names must change for each instance of ds9. That is, if a second instance of ds9 called DS9 were running, it would be commanded either as: echo "colormap I8" | xpaset DS9 echo "scale log" | xpaset DS9 echo "file foo.fits" | xpaset DS9 or as: echo "I8" | xpaset DS9_colormap echo "log" | xpaset DS9_scale echo "foo.fits" | xpaset DS9_file Thus, in cases where a program is going to manage many commands, it generally is easier to define them as commands associated with the XPACmdNew() routine, rather than as separate access points using XPANew(). When XPACmdNew() is called, only the class:name identifier is specified. Each sub-command is subsequently defined using the XPACmdAdd() routine. SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpacmdnew(3)

Check Out this Related Man Page

xpaclient(3)							SAORD Documentation						      xpaclient(3)

NAME
XPAClient - The XPA Client-side Programming Interface SYNOPSIS
A description of the XPA client-side programming interface. DESCRIPTION
Introduction to XPA Client Programming Sending/receiving data to/from an XPA access point is easy: you generally only need to call the XPAGet() or XPASet() subroutines. #include <xpa.h> int XPAGet(XPA xpa, char *template, char *paramlist, char *mode, char **bufs, int *lens, char **names, char **messages, int n); int XPASet(XPA xpa, char *template, char *paramlist, char *mode, char *buf, int len, char **names, char **messages, int n); int XPAInfo(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); int XPAAccess(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); int XPAGetFd(XPA xpa, char *template, char *paramlist, char *mode, int *fds, char **names, char **messages, int n); int XPASetFd(XPA xpa, char *template, char *paramlist, char *mode, int fd, char **names, char **messages, int n); XPA XPAOpen(char *mode); void XPAClose(XPA xpa); int XPANSLookup(XPA xpa, char *template, char *type, char ***classes, char ***names, char ***methods, char ***infos); Introduction To use the XPA application programming interface, a software developer generally will include the xpa.h definitions file: #include <xpa.h> in the software module that defines or accesses an XPA access point and then will link against the libxpa.a library: gcc -o foo foo.c libxpa.a XPA has been compiled using both C and C++ compilers. Client communication with XPA public access points generally is accomplished using XPAGet() or XPASet() within a program (or xpaget and xpaset at the command line). Both routines require specification of the name of the access point. If a template is used to specify the access point name (e.g., "ds9*"), then communication will take place with all servers matching that template. SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpaclient(3)
Man Page