HP 800 ACSE/Presentation and ROSE Interface Programmer's Guide - Page 71

Enable A/P API Tracing Using Global, Variables

Page 71 highlights

Troubleshooting Your Application Using A/P API Tracing API_TR_ENTRY_EXIT API_TR_INPUT API_TR_OUTPUT API_TR_INT_ENTRY_EXIT API_TR_INT_ERROR Traces procedure entry and exit. No parameter information is displayed. This is useful if you are only interested in seeing what A/P calls your program is making. Note that this trace is automatically generated if you use API_TR_INPUT, API_TR_OUTPUT, or API_TR_INT_ENTRY_EXIT. Provides traces of A/P function call input parameters. This is useful if you want to verify that A/P is actually receiving the values you expect. Provides traces of A/P function call output parameters. This is useful if you want to verify what values A/P is passing back to your program. Enables internal tracing. Use if directed to do so by your HP support representative. Enables external and internal error tracing. Recommended that users turn this tracing on at all times. Includes filename and line number information useful for HP factory support. Enable A/P API Tracing Using Global Variables To enable A/P tracing in your program, add the following statements to your program: 1. Include the appropriate definitions by adding these lines: #include #include extern int ap_trace; extern int ap_trace_max_udata; extern FILE *ap_trace_fp; Chapter 5 71

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109

Chapter 5
71
Troubleshooting Your Application
Using A/P API Tracing
Enable A/P API Tracing Using Global
Variables
To enable A/P tracing in your program, add the following statements to
your program:
1.
Include the appropriate definitions by adding these lines:
#include <stdio.h>
#include <api_trace.h>
extern int ap_trace;
extern int ap_trace_max_udata;
extern FILE *ap_trace_fp;
API_TR_ENTRY_EXIT
Traces procedure entry and exit. No
parameter information is displayed. This is
useful if you are only interested in seeing
what A/P calls your program is making.
Note that this trace is automatically
generated if you use API_TR_INPUT,
API_TR_OUTPUT, or
API_TR_INT_ENTRY_EXIT.
API_TR_INPUT
Provides traces of A/P function call input
parameters. This is useful if you want to
verify that A/P is actually receiving the
values you expect.
API_TR_OUTPUT
Provides traces of A/P function call output
parameters. This is useful if you want to
verify what values A/P is passing back to
your program.
API_TR_INT_ENTRY_EXIT
Enables internal tracing. Use if directed to
do so by your HP support representative.
API_TR_INT_ERROR
Enables external and internal error tracing.
Recommended that users turn this tracing
on at all times. Includes filename and line
number information useful for HP factory
support.