Chapter 7 Using the NI-VXI Software
VXI/VME-PCI8022 for Solaris 7-4
©
National Instruments Corporation

System Configuration Functions

The System Configuration functions provide the lowest-level
initialization of your NI-VXI software and VXI controller. You must
use the InitVXIlibrary() function at the start of each application
and the CloseVXIlibrary() function at the end of each application.
Compiling Your C Program
You can use the sample programs included with the NI-VXI software
as a starting point to develop your own C program that uses NI-VXI
functions. First, look over and compile the sample programs using the
makefile provided to get familiar with how the functions operate. The
example programs are broken into multiple files, and each one shows
how to use different groups of functions. You can then modify the
sample programs to try out different aspects of the NI-VXI software.
The sample programs for the SPARC compiler are in the
\nivxi\examples directory.
The easiest way to compile the sample programs is to use the makefile
included with the NI-VXI software. For example, go to the examples
directory and type make -f example.mak.

Symbols

You may need to define a symbol so that the NI-VXI library can work
properly with your program. The VXISOLARIS symbol is usually
required. VXISOLARIS designates the application as a Solaris
application. You can define this symbol using a #define statements in
the source code or you can use the -D option in your compiler. If you
use a #define statement, you must define the symbol before including
the NI-VXI header file nivxi.h. If you use the makefiles to compile
the sample program, the makefile already defined the necessary symbol.
If you define this symbol in your source code, your source code should
look something like the following sample code:
#define VXISOLARIS
.
.
.
#include <nivxi.h>