GDSX (Extended General Device Support) Manual
Design and Development
Extended General Device Support (GDSX) Manual—529931-001
2-84
User-Coded Trace Calls
or by setting the maximum in a call to USER^OPEN^TRACE^FILE (see Section 8,
Service Routines).
Trace entries are differentiated from each other by a trace entry type. Type values
from 0–127 are reserved for TSCODE events. Values from 128–255 are used for
USCODE events. Except for these restrictions, use of type, which is a parameter
passed in calls to ADD^TRACE^DATA or ADD^TRACE^DATA^INT, is completely user
dependent: whatever value is assigned to type is be passed through to the trace
records.
Dynamic Control of User-Coded Tracing
If you want to dynamically control the tracing of classes of these user-defined events,
you need to group the events into the classes to be controlled, and then assign trace
record type values to the events so that the events fall into the desired classes.
For example, two user-defined events can be assigned type as equal to 200 and 201
so that they fall within the trace class defined by the SCF keyword SRMISC (see
Table 2-5). You can then turn on and off the tracing of these two events by setting and
resetting the SCF trace class keyword SRMISC, which is equivalent to
SR^MISC^TRACE (see Table 2-7).
A simple form of the trace call used for event type 200 is:
IF SR^MISC^TRACE THEN
CALL ADD^TRACE^DATA (SR^MISC^REQ, MYBUF1,100, MYBUF2,10);
A simple form of the trace call used for event type 201 is:
IF SR^MISC^TRACE THEN
CALL ADD^TRACE^DATA (SR^MISC^RSP, MYBUF1,100, MYBUF2,10);
Table 2-5 shows which type values fall into the standard SCF trace classes for
USCODE events. The first column of the table contains the keywords used in SCF to
select the classes of events to be traced. The far right column contains a description
of the events for those entry types traced in the USAMPLE example program.
However, you can assign type values to events in a completely different way from the
correspondence shown for USAMPLE.
Table 2-5. USCODE Trace Classes and Entry Types (page 1 of 3)
SCF Trace
Class Keyword
Literal Name for
Entry Type
Literal
Value
Events Traced by USAMPLE
Example Program
TERMREQ TERM^REQ^IN 128 $RECEIVE request received by
DEVICE^HANDLER
TERM^REQ^OUT 129 Reply returned by
DEVICE^HANDLER to external
process
None 130-135 None