User`s manual
.DIAGFCN
5-80
5
02: .TESTSTAT (output test status report)
This diagcfn call allows access to selftest diagnostic results. The
calling function must supply the diagcfn call with a pointer to two
arguments (a structure containing two members):
struct ts_bufps
{
unsigned int size;
void *bufptr;
}
ÔbufptrÕ points to a buffer in memory, where the Þrst Ôsizeof(int)Õ
bytes are reserved for an integer ÔcountÕ variable, and the rest of the
buffer is reserved as a ÔcharÕ array for ASCII string data:
struct ts_bufs
{
unsigned int count;
unsigned char buf[1];}
The calling function typically Þrst makes a call with the ÔsizeÕ set to
Ôsizeof(int)Õ, and ÔbufptrÕ pointing to a section of R/W memory,
ÔsizeÕ bytes long. This causes the TESTSTAT function to calculate
how large a buffer will be required to contain the test status report.
The calculated value, plus Ôsizeof(int)Õ, will be returned in the
location pointed to by ÔbufptrÕ.
int ÕsizeÕ
void *bufptr -------------------------> int count
(char buf)
B
U
F
F
E
R