Partager via


CEL_HEADER_V3 (Compact 2013)

3/28/2014

This structure precedes every logged event that is sent out through the logging mechanism.

Syntax

typedef struct {
    DWORD   Length:12;
    DWORD   CPU:4;    DWORD   ID : 14;
    DWORD   Reserved : 1;
    DWORD   fTimeStamp : 1;
} CEL_HEADER_V3, *PCEL_HEADER_V3;

Members

  • Length
    The lower 12 bits of the header holds the length, in bytes, of the event structure. This does not include the 32-bit length of the header structure or the 32-bit optional time stamp.
  • CPU
    Specifies the number of the CPU that the event occurred on.

    If the event does not apply to any specific CPU, this value will be set to 0. Examples include data loss events and sync events.

    If the CPU the event occurred on has a number greater than or equal to 15, the CPU number in the header will be set to 15. In that case, any timestamp or flag data in the event will be followed by a DWORD value containing the actual CPU number. As with the timestamp and flag values, the extra DWORD for the CPU number is not counted into the event size (length) value.

  • ID
    The next 14 bits of the header are used for the event identifier.
  • Reserved
    Reserved.
  • fTimeStamp
    The upper bit of the header is used to indicate whether or not a time stamp is present. If this bit is set, a 32-bit time stamp follows the structure and the value is given in tick counts. Otherwise, no time stamp follows.

Remarks

This structure is a single DWORD broken into several sections; it will be followed by a DWORD time stamp if the appropriate flag is set.

If you replace the event-tracking engine (Celog.lib) with your own, you should follow the same rules and include CEL_HEADER_V3 with each event. CEL_HEADER_V3 is attached to the data by CeLogData.

The format of the header has two forms depending on whether the event is a flagged event or not.

The following table shows the format of the non-flagged event header.

Data

Description

T

Flag that indicates whether TIMESTAMP is added to the header (fTimeStamp)

TIMESTAMP

Time that an event was recorded

ID

Event that occurred (ID)

LEN

Length of the data (Length)

DATA

Raw data that follows the header

The following table shows the format of the flagged event header.

Data

Description

T

Flag that indicates whether TIMESTAMP is added to the header (fTimeStamp)

CELID_FLAGGED

Identifier that is used to determine whether the event has been flagged and the structure changed

TIMESTAMP

Time that an event was recorded

ID

Event that occurred (ID)

FLAG

User-provided flag use to flag the event

LEN

Length of the data (Length)

DATA

Raw data that follows the header

See Also

Reference

CeLog Event Tracking Structures
CeLogData
CEL_HEADER