module ti.uiactools.runtime.EventHdr |  |  |

index URL

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

- C synopsis
- Individual elements
- XDCscript usage
- Individual elements

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/uiactools/runtime/EventHdr.xdc

``#include <ti/uiactools/runtime/EventHdr.h>

Functions
``macro UInt32 | EventHdr_genEventHdrWord1// generates the first word to use in an Event header(SizeT numBytesInEventMsg, UInt16 seqCount, EventHdr_HdrType eventHdrType);
``macro EventHdr_HdrType | EventHdr_getHdrType// Gets the message header type from the first word of the event header(UInt32 eventWord1);
``macro SizeT | EventHdr_getLength// gets the event length (in bytes) from the event header(UInt32 eventWord1);
``macro UInt16 | EventHdr_getSeqCount// gets the sequence count from the message header(UInt32 eventWord1);
``macro Void | EventHdr_setHdrType// Sets the header type in the event header(UInt32 eventWord1, EventHdr_HdrType hdrType);
``macro Void | EventHdr_setLength// sets the event length (in bytes) in the event header(UInt32 eventWord1, SizeT eventLength);
``macro Void | EventHdr_setSeqCount// sets the sequence count in the message header(UInt32 eventWord1, UInt16 seqCount);
Functions common to all target modules
| EventHdr_Module_getMask// Returns the diagnostics mask for this module, EventHdr_Module_hasMask// Test whether this module has a diagnostics mask, EventHdr_Module_heap// The heap from which this module allocates memory, EventHdr_Module_id// Get this module's unique id, EventHdr_Module_setMask// Set the diagnostics mask for this module, EventHdr_Module_startupDone// Test if this module has completed startup
Typedefs
``typedef enum | EventHdr_HdrType// Enumeration of the various types of events headers ...

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.

For shared, non-packetized event transports that carry events from multiple cores, or for events logged by applications runnning on multiprocess O/Ses, the event header needs to identify which endpoint ID the event was logged from and which process Id logged the event. The following two additional event headers support these situations.
HdrType_EventWithTimestampAndEndpointId word0: EventHdr word1: Timestamp lower 32 bits word2: Timestamp upper 32 bits word3: EndpointId (lower 16 bits) word4: ProcessId word3: event Id (top 16 bits) & module Id (bottom 16 bits)
HdrType_EventWithSnapshotIdAndTimestampAndEndpointId: word0: EventHdr word1: Timestamp lower 32 bits word2: Timestamp upper 32 bits word3: EndpointId (lower 16 bits) word4: ProcessId word5: event Id (top 16 bits) & module Id (bottom 16 bits) word6: filename pointer word7: linenum word8: snapshotId word9: address where the data was located word10: total length of data (top 16-bits) length for this record (bottom 16 bits) word11: format pointer data: the rest of the record contains the data

enum EventHdr_HdrType |

index URL

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_Reserved4,
```` // reserved for future use
```` EventHdr_HdrType_EventWithTimestampAndEndpointId,
```` // Event with 64 bit Timestamp, endpoint ID and process Id
```` EventHdr_HdrType_Reserved6,
```` // reserved for future use
```` EventHdr_HdrType_EventWithSnapshotIdAndTimestampAndEndpointId,
```` // Snapshot event with 64 bit Timestamp, Endpoint and processId
```` EventHdr_HdrType_Reserved8,
```` // reserved for future use
```` EventHdr_HdrType_Reserved9,
```` // reserved for future use
```` EventHdr_HdrType_Reserved10,
```` // reserved for future use
```` EventHdr_HdrType_Reserved11,
```` // reserved for future use
```` EventHdr_HdrType_Reserved12,
```` // reserved for future use
```` 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 |

index URL

generates the first word to use in an Event header

`C` synopsis | target-domain

````macro UInt32 EventHdr_genEventHdrWord1(SizeT numBytesInEventMsg, UInt16 seqCount, EventHdr_HdrType eventHdrType);
ARGUMENTS
numBytesInEventMsg — number of bytes in the event
seqCount — sequence count number to tag the event with
eventHdrType — enum value indicating the format of the event header

EventHdr_getHdrType() // module-wide |

index URL

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 |

index URL

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 |

index URL

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 |

index URL

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 |

index URL

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 |

index URL

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 |

index URL

`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

`XDCscript` usage | meta-domain | sourced in ti/uiactools/runtime/EventHdr.xdc

``var EventHdr = xdc.useModule('ti.uiactools.runtime.EventHdr');
module-wide constants & types
`` ``values of type EventHdr.HdrType// Enumeration of the various types of events headers
`` `` 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_Reserved4// reserved for future use;
`` `` const EventHdr.HdrType_EventWithTimestampAndEndpointId// Event with 64 bit Timestamp, endpoint ID and process Id;
`` `` const EventHdr.HdrType_Reserved6// reserved for future use;
`` `` const EventHdr.HdrType_EventWithSnapshotIdAndTimestampAndEndpointId// Snapshot event with 64 bit Timestamp, Endpoint and processId;
`` `` const EventHdr.HdrType_Reserved8// reserved for future use;
`` `` const EventHdr.HdrType_Reserved9// reserved for future use;
`` `` const EventHdr.HdrType_Reserved10// reserved for future use;
`` `` const EventHdr.HdrType_Reserved11// reserved for future use;
`` `` const EventHdr.HdrType_Reserved12// reserved for future use;
`` `` 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;
module-wide config parameters
`` ``EventHdr.common$// Common module configuration parameters = Types.Common$ undefined;

enum EventHdr.HdrType |

index URL

Enumeration of the various types of events headers

`XDCscript` usage | meta-domain

````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_Reserved4;
```` // reserved for future use
```` const EventHdr.HdrType_EventWithTimestampAndEndpointId;
```` // Event with 64 bit Timestamp, endpoint ID and process Id
```` const EventHdr.HdrType_Reserved6;
```` // reserved for future use
```` const EventHdr.HdrType_EventWithSnapshotIdAndTimestampAndEndpointId;
```` // Snapshot event with 64 bit Timestamp, Endpoint and processId
```` const EventHdr.HdrType_Reserved8;
```` // reserved for future use
```` const EventHdr.HdrType_Reserved9;
```` // reserved for future use
```` const EventHdr.HdrType_Reserved10;
```` // reserved for future use
```` const EventHdr.HdrType_Reserved11;
```` // reserved for future use
```` const EventHdr.HdrType_Reserved12;
```` // reserved for future use
```` 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
EventHdr_HdrType

metaonly config EventHdr.common$ // module-wide |

index URL

Common module configuration parameters

`XDCscript` usage | meta-domain

````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 Wed, 27 Jun 2012 04:11:42 GMT