Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Reviewed and revised December 2023

tab(-10, AG_TRACE); opcode {,trflags}; chr(127);     Tab(-10,x) Syntax Notes

AG_TRACE (76) allows the application on the server to clear, set, or query the trace flags on the ATE client in real time. This is mainly useful for debugging, but in such a case, can be very handy since it is not often practical to arrange for users to change the trace flags on individual copies of ATE.

Parameters

opcode

0=clear, 1=set, 2=query

trflags

32 bit value containing the trace bit flags to clear, set or query  (see table in MX_GETTRACE for bit definitions). Note that only the flags indicated by the bits set to 1 in trflags will be cleared, set or queried.

Response

For opcode 0 and 1, none.  For opcode 2, a 32 bit value representing the previously-set trace flags:

trflags

Example

MAP1 OPCODE,B,1             ! 0=clear, 1=set, 2=query

MAP1 TRFLAGS,B,4            ! Flags to clear, set or query

 

? TAB(-10,AG_TRACE);"1,";(TROP_XTREE or XTROP_XDEBUG);chr(127);

To specify all flags, you can use the shorthand -1:

? TAB(-10,AG_TRACE);"2,-1";chr(127);        ! query all flags

input "",TRFLAGS                            ! for query, retrieve results

? "Current ATE trace flags: ";Fn'Dec2Hex$(TRFLAGS);  ! display in hex

if (TRFLAGS and TROP_ATE) then "ATE trace set"

if (TRFLAGS and TROP_XTREE) then "XTREE trace set"

etc.