User Guide

Ampex 1308911-02 5-43
libdd2 API Functions dst_gettrace
When you request an entire log, data retrieval starts with the first (earliest) entry in the log.
The
offset member permits specifying whether any data bytes should be discarded before
loading of the buffer is enabled. Should a buffer full condition occur, dst_gettrace() succeeds,
terminates successfully and remembers where it left off. To continue retrieving data from the
log, repeat the dst_gettrace() call.
STRUCTURE MEMBERS
type Specifies the trace log to get. The following definitions apply:
DstTraceTCF - Transport Control Firmware trace log
DstTracePCF - Process Control Firmware trace log
DstTraceRCF - Recorder Control Firmware trace log
DstTraceSCSI - SCSI Control Firmware trace log
start Specifies the information to get from the log. The following definitions
apply:
DST_TRACE_ALL - get the entire log, starting with the first (oldest)
entry
DST_TRACE_LAST - get the last entry in the log
DST_TRACE_CONT - continue from ending point of last call
size On input, specifies the capacity of the available trace buffer in bytes. On
return, specifies the number of data bytes stored in the buffer.
To prevent buffer overflow
DST_GETTRACE only returns size bytes
into the trace buffer. If the buffer is not large enough for the entire log,
you can get the next portion of the log by calling dst_gettrace() again
with the
start member set to DST_TRACE_CONT.
offset Specifies how many data bytes to discard before loading of the buffer
occurs; i.e., how much of the log to skip over. To retrieve the entire log,
set
offset to zero.
length Read only member; if start is set to DST_TRACE_ALL, length
indicates the number of data bytes available in the complete log;
otherwise it is set to -1.
no_of_lines Read only member; if start is set to DST_TRACE_ALL,
no_of_lines indicates the number of lines available in the complete
log; otherwise it is set to -1.
buf Address of the trace buffer.
RETURN VALUES
The return value is DST_SUCCESS (0) or DST_FAILURE (-1). See “DST API Overview” on
page 5-1 for information on
errno failure messages and associated DST result codes.