The SLxpa api provides both high-level and low-level views on the
underlying XPA library. At the high-level SLxpa seeks to mimic
the three most commonly used XPA command line utilities: xpaset,
xpaget, and xpaaccess. It is anticipated that the
corresponding S-Lang functions will also be the most
commonly used SLxpa features.
At the low-level SLxpa aims at mirroring the XPA api more closely. To that end, rather than replicate the XPA documentation here we simply note discrepancies between the respective apis and refer the reader to the XPA website.
Note that for brevity we use the terms XPA access point and XPA command, and likewise XPA server and target, interchangeably.
SLxpa indicates version information in the variables
_xpa_module_version An integer containing the value
(10000*major_ver) + (100*minor_ver) + micro_ver
_xpa_module_version_string A string containing the value
major_ver.minor_ver.micro_ver
Earlier releases of SLxpa used the variables _slxpa_version and
_slxpa_version_string to convey this information, but these have
been deprecated.
As a user convenience SLxpa also indicates the version of XPA against
which it was built, via the floating point variable
xpa_version
If a function argument is omitted at invocation time, and a default value is given in the functions Usage statement, the underlying XPA C function will be invoked as if the default value were specified for the omitted argument. Note that, as is the case with, say, C++, in order to default the Nth argument each of arguments 1 through N-1 must be specified.
SLxpa introduces the slxpa_errno variable, which indicates the last error which occurred internal to the XPA module. The module zeros slxpa_errno at import time, and explicitly assigns only the following values
1 XPA_COULD_NOT_CONNECT
2 XPA_SERVER_ERROR
3 XPA_MALLOC_ERROR
during subsequent execution. As with the errno variable defined
by C, it is the caller's responsibility to zero slxpa_errno when
needed.
The XPA_MAXHOSTS environment variable, when set, signifies the upper
limit for the number of application servers that any single SLxpa call
will contact. By default this value is 5. Note that this variable is
also utilized by the XPA library itself, as are others described
in the XPA documentation.
The XPA module supports only the client portion of the XPA library; no server functions have yet been wrapped.
Several client functions have been omitted:
XPAInfoXPANSLookupXPASetFdIt is unclear if any applications have been written which provide
info XPA access points. Although technically speaking SLxpa
does provide a wrapper for XPASetFd, namely XPASetFromFile,
at present it is only an empty stub.