module ti.uia.runtime.EventHdr

Module defines the header format to be used when logging an event

Each event's first word includes the type, length of the event and sequence number. The length includes the first word and is in bytes. [ more ... ]
C synopsis target-domain sourced in ti/uia/runtime/EventHdr.xdc
#include <ti/uia/runtime/EventHdr.h>
Functions
macro UInt32 
macro UInt32 
macro SizeT 
macro UInt16 
macro Void 
macro Void 
macro Void 
Functions common to all target modules
Typedefs
typedef enum
 
DETAILS
Each event's first word includes the type, length of the event and sequence number. The length includes the first word and is in bytes.
The following is the desciption of the first word.
  EventHdr
   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  |---------------------------------------------------------------|
  |H H H H H|L L L L L L L L L L L|S S S S S S S S S S S S S S S S|
  |---------------------------------------------------------------|

  H = HdrType         (5-bits)
  L = Event Length    (11-bits)
  S = Sequence Number (16-bits)
There are currently 4 different types of events supported in UIA. The following discusses the format of each one of the types.
  HdrType_Event
    word0: EventHdr
    word1: event Id (top 16 bits) & module Id (bottom 16 bits)

  HdrType_EventWithTimestamp
    word0: EventHdr
    word1: Timestamp lower 32 bits
    word2: Timestamp upper 32 bits
    word3: event Id (top 16 bits) & module Id (bottom 16 bits)

  HdrType_EventWithSnapshotId
    word0: EventHdr
    word1: event Id (top 16 bits) & module Id (bottom 16 bits)
    word2: filename pointer
    word3: linenum
    word4: snapshotId
    word5: address where the data was located
    word6: total length of data (top 16-bits)
           length for this record (bottom 16 bits)
    word7: format pointer
    data:  the rest of the record contains the data

  HdrType_EventWithSnapshotIdAndTimestamp:
    word0: EventHdr
    word1: Timestamp lower 32 bits
    word2: Timestamp upper 32 bits
    word3: event Id (top 16 bits) & module Id (bottom 16 bits)
    word4: filename pointer
    word5: linenum
    word6: snapshotId
    word7: address where the data was located
    word8: total length of data (top 16-bits)
           length for this record (bottom 16 bits)
    word9: format pointer
    data:  the rest of the record contains the data
Snapshot events can span multiple records. The snapshotId is used to correlate the records when this occurs. The length field (word6 or word8) contains two lengths. The bottom 16 bits length of data for this record. The top 16 bits is the sum of all lengths for this specific snapshotId.
The address field points to the location of the data. When the snapshot spans multiple records, the address field is updated accordingly. Therefore this field can be used to detect dropped records. Note the snapshot event data is contiguous.
EventHdr for HdrType_EventWithPrevLen* and HdrType_SnapshotEventWithPrevLen* 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 |---------------------------------------------------------------| |H H H H H|L L L L L L L L L L L|P P P P P P P P P P P|S S S S S| |---------------------------------------------------------------|
H = HdrType (5-bits) L = Event Length in bytes (11-bits: # of bytes in current event) P = Number of Bytes in Previous Event (5-bits: # of bytes in prev. event) S = Sequence Number (5-bits)
 
enum EventHdr_HdrType

Enumeration of the various types of events headers

C synopsis target-domain
typedef enum EventHdr_HdrType {
    EventHdr_HdrType_Event,
    // Event with no timestamp or other optional parameters
    EventHdr_HdrType_EventWithTimestamp,
    // Event with 64 bit Timestamp
    EventHdr_HdrType_EventWithSnapshotId,
    // Snapshot event
    EventHdr_HdrType_EventWithSnapshotIdAndTimestamp,
    // Snapshot event with 64 bit Timestamp
    EventHdr_HdrType_EventWith32bTimestamp,
    // Event with 32 bit Timestamp
    EventHdr_HdrType_EventWithTimestampAndEndpointId,
    EventHdr_HdrType_EventWithSnapshotIdAnd32bTimestamp,
    // Snapshot event with 32 bit Timestamp
    EventHdr_HdrType_EventWithSnapshotIdAndTimestampAndEndpointId,
    EventHdr_HdrType_EventWithPrevLenWithNoTimestamp,
    // reverse param event with prev. length field
    EventHdr_HdrType_EventWithPrevLenWith32bTimestamp,
    // reverse param event with prev. length field
    EventHdr_HdrType_EventWithPrevLenWith64bTimestamp,
    // reverse param event with prev. length field
    EventHdr_HdrType_SnapshotEventWithPrevLen,
    // Snapshot event with no timestamp
    EventHdr_HdrType_SnapshotEventWithPrevLenAnd64bTimestamp,
    // Snapshot event with 64 bit Timestamp
    EventHdr_HdrType_Reserved13,
    // reserved for future use
    EventHdr_HdrType_Reserved14,
    // reserved for future use
    EventHdr_HdrType_Reserved15,
    // reserved for future use
    EventHdr_HdrType_Reserved16,
    // reserved for future use
    EventHdr_HdrType_Reserved17,
    // reserved for future use
    EventHdr_HdrType_Reserved18,
    // reserved for future use
    EventHdr_HdrType_Reserved19,
    // reserved for future use
    EventHdr_HdrType_Reserved20,
    // reserved for future use
    EventHdr_HdrType_Reserved21,
    // reserved for future use
    EventHdr_HdrType_Reserved22,
    // reserved for future use
    EventHdr_HdrType_Reserved23,
    // reserved for future use
    EventHdr_HdrType_Reserved24,
    // reserved for future use
    EventHdr_HdrType_Reserved25,
    // reserved for future use
    EventHdr_HdrType_Reserved26,
    // reserved for future use
    EventHdr_HdrType_Reserved27,
    // reserved for future use
    EventHdr_HdrType_Reserved28,
    // reserved for future use
    EventHdr_HdrType_Reserved29,
    // reserved for future use
    EventHdr_HdrType_Reserved30,
    // reserved for future use
    EventHdr_HdrType_Reserved31
    // reserved for future use
} EventHdr_HdrType;
 
DETAILS
Stored in a 5 bit bitfield (b31-b27) of the first word in the event.
 
EventHdr_genEventHdrWord1()  // module-wide

generates the first word to use in an Event header

C synopsis target-domain
macro UInt32 EventHdr_genEventHdrWord1(SizeT numBytesInEvent, UInt16 seqCount, EventHdr_HdrType eventHdrType);
 
ARGUMENTS
numBytesInEvent — number of bytes in the event
seqCount — sequence count number to tag the event with
eventHdrType — type of event header for this event
 
EventHdr_genEventWithPrevLenHdrWord1()  // module-wide

generates the first word to use in a header that contains the length of the previous event

C synopsis target-domain
macro UInt32 EventHdr_genEventWithPrevLenHdrWord1(SizeT numBytesInEvent, SizeT numBytesInPrevEvent, UInt16 seqCount, EventHdr_HdrType eventHdrType);
 
ARGUMENTS
numBytesInEvent — number of bytes in the event
numBytesInPrevEvent — number of bytes in the previous event
seqCount — sequence count number to tag the event with
eventHdrType — type of event header for this event
 
EventHdr_getHdrType()  // module-wide

Gets the message header type from the first word of the event header

C synopsis target-domain
macro EventHdr_HdrType EventHdr_getHdrType(UInt32 eventWord1);
 
ARGUMENTS
eventWord1 — first word of the event header
RETURNS
HdrType of the event
 
EventHdr_getLength()  // module-wide

gets the event length (in bytes) from the event header

C synopsis target-domain
macro SizeT EventHdr_getLength(UInt32 eventWord1);
 
ARGUMENTS
eventWord1 — first word of the event header
 
EventHdr_getSeqCount()  // module-wide

gets the sequence count from the message header

C synopsis target-domain
macro UInt16 EventHdr_getSeqCount(UInt32 eventWord1);
 
ARGUMENTS
eventWord1 — first word of the event header
 
EventHdr_setHdrType()  // module-wide

Sets the header type in the event header

C synopsis target-domain
macro Void EventHdr_setHdrType(UInt32 eventWord1, EventHdr_HdrType hdrType);
 
ARGUMENTS
eventWord1 — the first word of the event header to be updated
HdrType hdrType — the new header type
 
EventHdr_setLength()  // module-wide

sets the event length (in bytes) in the event header

C synopsis target-domain
macro Void EventHdr_setLength(UInt32 eventWord1, SizeT eventLength);
 
ARGUMENTS
eventWord1 — first word of the event header
eventLength — the new event length
 
EventHdr_setSeqCount()  // module-wide

sets the sequence count in the message header

C synopsis target-domain
macro Void EventHdr_setSeqCount(UInt32 eventWord1, UInt16 seqCount);
 
ARGUMENTS
eventWord1 — first word of the event header
seqCount — the new message sequence count
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId EventHdr_Module_id();
// Get this module's unique id
 
Bool EventHdr_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle EventHdr_Module_heap();
// The heap from which this module allocates memory
 
Bool EventHdr_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 EventHdr_Module_getMask();
// Returns the diagnostics mask for this module
 
Void EventHdr_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/uia/runtime/EventHdr.xdc
var EventHdr = xdc.useModule('ti.uia.runtime.EventHdr');
module-wide constants & types
module-wide config parameters
 
 
enum EventHdr.HdrType

Enumeration of the various types of events headers

Configuration settings
values of type EventHdr.HdrType
    const EventHdr.HdrType_Event;
    // Event with no timestamp or other optional parameters
    const EventHdr.HdrType_EventWithTimestamp;
    // Event with 64 bit Timestamp
    const EventHdr.HdrType_EventWithSnapshotId;
    // Snapshot event
    const EventHdr.HdrType_EventWithSnapshotIdAndTimestamp;
    // Snapshot event with 64 bit Timestamp
    const EventHdr.HdrType_EventWith32bTimestamp;
    // Event with 32 bit Timestamp
    const EventHdr.HdrType_EventWithTimestampAndEndpointId;
    const EventHdr.HdrType_EventWithSnapshotIdAnd32bTimestamp;
    // Snapshot event with 32 bit Timestamp
    const EventHdr.HdrType_EventWithSnapshotIdAndTimestampAndEndpointId;
    const EventHdr.HdrType_EventWithPrevLenWithNoTimestamp;
    // reverse param event with prev. length field
    const EventHdr.HdrType_EventWithPrevLenWith32bTimestamp;
    // reverse param event with prev. length field
    const EventHdr.HdrType_EventWithPrevLenWith64bTimestamp;
    // reverse param event with prev. length field
    const EventHdr.HdrType_SnapshotEventWithPrevLen;
    // Snapshot event with no timestamp
    const EventHdr.HdrType_SnapshotEventWithPrevLenAnd64bTimestamp;
    // Snapshot event with 64 bit Timestamp
    const EventHdr.HdrType_Reserved13;
    // reserved for future use
    const EventHdr.HdrType_Reserved14;
    // reserved for future use
    const EventHdr.HdrType_Reserved15;
    // reserved for future use
    const EventHdr.HdrType_Reserved16;
    // reserved for future use
    const EventHdr.HdrType_Reserved17;
    // reserved for future use
    const EventHdr.HdrType_Reserved18;
    // reserved for future use
    const EventHdr.HdrType_Reserved19;
    // reserved for future use
    const EventHdr.HdrType_Reserved20;
    // reserved for future use
    const EventHdr.HdrType_Reserved21;
    // reserved for future use
    const EventHdr.HdrType_Reserved22;
    // reserved for future use
    const EventHdr.HdrType_Reserved23;
    // reserved for future use
    const EventHdr.HdrType_Reserved24;
    // reserved for future use
    const EventHdr.HdrType_Reserved25;
    // reserved for future use
    const EventHdr.HdrType_Reserved26;
    // reserved for future use
    const EventHdr.HdrType_Reserved27;
    // reserved for future use
    const EventHdr.HdrType_Reserved28;
    // reserved for future use
    const EventHdr.HdrType_Reserved29;
    // reserved for future use
    const EventHdr.HdrType_Reserved30;
    // reserved for future use
    const EventHdr.HdrType_Reserved31;
    // reserved for future use
 
DETAILS
Stored in a 5 bit bitfield (b31-b27) of the first word in the event.
C SYNOPSIS
 
metaonly config EventHdr.common$  // module-wide

Common module configuration parameters

Configuration settings
EventHdr.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
generated on Tue, 14 Feb 2017 00:15:16 GMT