LOG Module
Application Program Interface
2-185
❏
bufseg
. The name of a memory segment to contain the log buffer.
Tconf Name: bufSeg
Type: Reference
Example:
myLog.bufSeg = prog.get("myMEM");
❏
buflen
. The length of the log buffer (in words).
Tconf Name: bufLen
Type: EnumInt
Options:
0, 8, 16, 32, 64, ..., 32768
Example:
myLog.bufLen = 64;
❏
logtype
. The type of the log: circular or fixed. Events added to a full
circular log overwrite the oldest event in the buffer, whereas events
added to a full fixed log are dropped.
■
Fixed
. The log stores the first messages it receives and stops
accepting messages when its message buffer is full.
■
Circular
. The log automatically overwrites earlier messages
when its buffer is full. As a result, a circular log stores the last
events that occur.
Tconf Name: logType
Type: EnumString
Options:
"circular", "fixed"
Example:
myLog.logType = "circular";
❏
datatype
. Choose printf if you use LOG_printf to write to this log and
provide a format string.
Choose raw data if you want to use LOG_event to write to this log
and have the Event Log apply a printf-style format string to all records
in the log.
Tconf Name: dataType
Type: EnumString
Options:
"printf", "raw data"
Example:
myLog.dataType = "printf";
❏
format
. If you choose raw data as the datatype, type a printf-style
format string for this property. Provide up to three (3) conversion
characters (such as %d) to format words two, three, and four in all
records in the log. Do not put quotes around the format string. The
format string can use %d, %u, %x, %o, %s, %r, and %p conversion
characters; it cannot use other types of conversion characters. See
LOG_printf, page 2–191, and LOG_event, page 2–189, for
information about the structure of a log record.
Tconf Name: format
Type: String
Example:
myLog.format = "0x%x, 0x%x, 0x%x";