User Event Data tab

This tab lets you specify the format for user event data.

Figure 1. The User Event Data tab (Properties view) for a log file.

The following is an example of an event configuration file that has been documented to describe its contents:

<?xml version="1.0" encoding="UTF-8" ?>
            Root tag for the event definition file format
            Events definitions are broken down by the event class.
            The user event class is '6' (from <trace.h>); all event codes
            in this section are part of this event class.
            <eventclass name="User Events">
            The user event we want to describe is coded as event #12 within
            the user event class (6).  It is composed of a single 4 byte
            (32 bit) unsigned integer that is followed by a null terminated
            string.  In C the structure might look something like:
            struct event_twelve {
            uint32_t myvalue;
            char     mystring[28];    /* Null Terminated */
            And be emitted using code:
            stuct event_twelve event;
            ... /* Fill event */
            TraceEvent(_NTO_TRACE_INSERTCUSEREVENT, 12, &event, sizeof(event));
            <event sformat="%4u1x myvalue %1s0 mystring" />
            In general an event is described as a serial series of event
            payload definitions:
            %<size><signed><count><format> <label>
            Is the size in bytes (1,2,4,8)
            Is the signed/unsigned attribute of the value (s,u)
            Is the number of items to read (ie an array).  There is a
            special case where if the <size> is 1 and there is _NO_
            format then the <count> can be 0 to accomodate NULL
            terminated strings.
            <format> (optional)
            Is a hint as to how to format this value: d=decimal,
            x=hexadecimal, o=octal, c=character
            Is a string label that can't contain the % character