|
Application Serviceability Pack
|
|
Overview - Brief Description of Feature
Terminal APIs for binary and ASCII logging, registering memory areas for snapshot dump, and invoking snapshot dump. APIs are provided for CBASIC, 16-bit 'C', 32-bit 'C', and Java applications.
Problem - What Problem Does the Feature Solve?
Provides easy to use set of APIs for debug logging that are designed for the 4690 terminal environment. Provides access to InSight features such snapshot dump data area registration and invoke.
Solution - Short Description of How the Feature Works
The InSight logging API's provide functions such as the following:
- LOG_SETUP("main") - identify name of current function. Name is pre-pended to every string logged within the function.
- LOG_ENDF() - removes current name from stack of names.
- logprintf(ulong sourceAndType, const char *formatstr, ....) - log this debug line.
- variable argument prototype is for 'C' only. CBASIC and Java have a set of methods with fixed parameter lists. For example, one of the BASIC prototypes is:
FUNCTION LP.LogPrintMix (type%, fmtStr$, str1$, str2$, str3$, int1%, int2%, int3%) EXTERNAL
INTEGER*2 LP.LogPrintMix ! Return value INTEGER*4 sourceAndType% ! Source component(optional) Type(DEBUG, INFO, WARNING, ERROR, FATAL, HEX) STRING fmtStr$ ! Format String STRING str1$ STRING str2$ STRING str3$ INTEGER*4 int1% INTEGER*4 int2% INTEGER*4 int3%
FEND
- Both ASCII and Binary logging are supported using the same APIs. Binary logging increases efficiency in two major ways: no string formatting is done at the time of the log call and amount of information sent to the controller is reduced to typically 1/3 of the ASCII equivality.
- With binary logging, the format strings are kept in a hash table separately from the rest of the log line arguments. The string table is written at the front of the binary log file as new format strings are added. Each log line record only references the string. A formatter is provided to convert the binary log information into ASCII output.
|