Using A/P Api Tracing; A/P Api Tracing Using Environmental Variables - HP A4500A - VMEbus Single Board Computer 744 Motherboard Programmer's Manual

Acse/presentation and rose interface programmer's guide
Hide thumbs Also See for A4500A - VMEbus Single Board Computer 744 Motherboard:
Table of Contents

Advertisement

Troubleshooting Your Application

Using A/P API Tracing

Using A/P API Tracing
You enable tracing in your application program and the tracing output is
printed to a trace file. Different levels of tracing are provided with the
trace facility. For example, you can trace procedure entry and exits, error
conditions, or both.
A/P API Tracing Using Environmental
Variables
A/P API has been enhanced to allow control of tracing via environment
variables. The original API tracing mechanism provided through global
variables is still available, however the new method means you do not
need to write any special code in your application to take advantage of
API tracing.
The following is an example of the new mechanism for APRI:
export AP_TRACE=io
initiator -nlocal_node -Nremote_node
Thu May 16 10:21:46 1996 -> ap_open()
> pathname = /dev/osipi
> oflags = 0x0
Thu May 16 10:21:47 1996 <- ap_open() = 4
Thu May 16 10:21:47 1996 -> ap_init_env()
fd = 4.
env_file = NULL
flags = 0.
Thu May 16 10:21:47 1996 <- ap_init_env() = 0
Thu May 16 10:21:47 1996 -> ap_set_env()
fd = 4.
attr = AP_ROLE_ALLOWED
*val = 1
Thu May 16 10:21:47 1996 <- ap_set_env() = 0
This example shows the environment variable, AP_TRACE, being set to
the ASCII characters "io" (meaning input and output parameters). For
csh(1) users the setenv(1) command should be used. The program is then
invoked and the API tracing is automatically enabled to the level
specified in the environment variable.
The program shown does not require any special user code for handling
the environment variables, or controlling the API tracing global
variables. The mechanism works by having the AP library itself test the
68
Chapter 5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents