CA_Trace_Data(), CA_TRACE_DATA()

Purpose

Traces binary data from a custom server.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include “CA_header.h”
int CA_TRACE_DATA(
    int nbytes,
    const unsigned char * data
);
int CA_Trace_Data(
    int nbytes,
    const unsigned char * data
);

Description

This subroutine traces binary data from a custom server. If AIX system trace is enabled (see the trace command) nbytes starting at address data are written to the Blueworx Voice Response trace channel (channel 1, hookword X'456').

Tracing is recommended to assist in problem determination, however, excessive tracing will impact system performance. Use the CA_TRACE_DATA() macro in preference to the CA_Trace_Data() subroutine callThe macro expansion checks if AIX trace is active on trace channel 1 before making the function call. Normally, when tracing is turned off, this eliminates the cost of the function call.. When AIX system trace is not enabled the macro is more efficient.

Use the CA_TRACE_DATA() macro if you need to record significant data structures. This eliminates any runtime overhead required if you format a string suitable for use with CA_TRACE_STRING() macro. You can then examine the formatted trace output to determine the contents of the data structures.

Parameters

nbytes
Number of bytes of data to write to the trace channel. The trace channel will not accept an arbitrary amount of data. Only the first MAX_CA_TRACE_BYTES of data will be traced.
data
Address of the trace data.

Return codes

0
Successful
-1
Unsuccessful (CA_errno is set to an error code that indicates the error)

Error names

CA_INV_ADDR
CA_NOT_INIT
CA_TERMINATING

Related information

See Trace points in this information, the Blueworx Voice Response for AIX: Problem Determination information and AIX 6.1 General Programming Concepts: Writing and Debugging Programs for more information.