Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://hea-www.harvard.edu/RD/saotng/xpaif.html
Дата изменения: Unknown Дата индексирования: Mon Oct 1 23:16:18 2012 Кодировка: Поисковые слова: m 43 |
In addition to the xpaset and xpaget commands, the XPA mechanism supports C and Fortran interfaces to SAOtng. Using these interfaces, you can open a connection to SAOtng and exchange data and commands. The C and Fortran calls are:
cat [buf] | xpaset [name] [paramlist]The len variable specifies the size of buf in bytes. For most simple cases, buf can be set to NULL and len to 0. For example, to set the colormap to SLS, call:
SetXPAValue(xpas, "colormap SLS", NULL, 0);
xpaget [name] [paramlist] (into [buf])It returns its data into buf and returns a byte count of the size of the returned data.
When adding the XPA interface to your program, you must link with the following libraries in saord/lib: libxpa, libutil, libparam. (Yes, we need to make a better separation of library routines to eliminate the need to link libparam!).
See the file saord/XPA/ftest.f for example code that interfaces with SAOtng from Fortran.