User manual

Programmer’s Guide Page 16 of 66
2.6.4. Standard library
You must include the C++ standard library in the VxWorks image to be able to use the Agilent Acqiris driver for
VxWorks.
2.6.5. Example program
The VxWorks sample program is written for the Tornado environment. The GetStartedVxW.cpp file contains a
simple user program which:
• spawns a process with a large stack as needed by the Acqiris driver
• finds the Acqiris digitizers on the target machine
• initializes the first (or only) one
• configures some acquisition parameters (and rereads them for checking)
• loops over a cycle that
- starts the acquisition
- waits for it to terminate
- reads the waveform
2.7. Linux
The AcqirisDemo program can simply be run from the AcqirisLinux directory by entering:
Demo/AcqirisDemo
The library /usr/lib/libAqDrv4.so is compiled with either gcc 3.3, 3.4, or 4.1; you need to have installed the desired
version.
When starting this program, the system can complain about a missing dependency on libqt-mt.so.3. Indeed,
AcqirisDemo requires the Qt3 gui library to be present on your system to be able to run. Install it using the system
package manager of your distribution: apt-get, yum, or YaST.
The Linux GetStarted sample program is provided ready to run. It can also be created without the need of an
additional development application. Enter the following commands:
cd usr/src
cp -r /usr/src/agilent/acqiris/examples examples - to copy the example directory and
all of its contents.
cd examples - to change to this new directory containing the source files
make - to compile and link the program
Note that the include and library paths are defined in the Makefile.
The GetStarted.cpp file contains a simple user program which:
has globally allocated buffers to achieve optimal readout performance
finds the Acqiris digitizers on the target machine
initializes the first (or only) one
configures some acquisition parameters (and rereads them for checking)
loops (100 times) over a cycle that
- starts the acquisition
- waits for it to terminate
- reads the waveform