module ti.uiactools.runtime.UIAPacket |  |

index URL

Packet format communications between instrumentation clients and instrumentation endpoints

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

`C` synopsis | target-domain | sourced in ti/uiactools/runtime/UIAPacket.xdc

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

Functions
``macro UInt16 | UIAPacket_getCmdId// gets the packet type from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getDestAdrs// gets the packet destination address from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getEndpointNumber// gets the endpoint number from the trace packet header(UIAPacket_Hdr7 *pHdr);
``macro Int32 | UIAPacket_getEventLength// Gets the packet length (in bytes) from the packet header(UIAPacket_Hdr *pHdr);
``macro Bool | UIAPacket_getFirstPktFlag// gets the first packet flag from the trace packet header(UIAPacket_Hdr7 *pHdr);
``macro Int32 | UIAPacket_getFooter// returns the integer to use as the packet footer(UIAPacket_Hdr *pHdr);
``macro UIAPacket_HdrType | UIAPacket_getHdrType// gets the packet header type from the packet header(UIAPacket_Hdr *pHdr);
``Int32 | UIAPacket_getLength// Gets the packet length (in bytes) from the packet header(UIAPacket_Hdr *pHdr);
``macro Bits16 | UIAPacket_getLoggerInstanceId// gets the logger instance ID from the event packet header(UIAPacket_Hdr *pHdr);
``macro Bits16 | UIAPacket_getLoggerModuleId// gets the logger ID from the event packet header(UIAPacket_Hdr *pHdr);
``macro Int32 | UIAPacket_getMsgLength// gets the packet length (in bytes) from the packet header(UIAPacket_Hdr *pHdr);
``macro UIAPacket_MsgType | UIAPacket_getMsgType// gets the packet type from the packet header(UIAPacket_Hdr *pHdr);
``macro Bits32 | UIAPacket_getPayloadEndianness// gets the payload endianness bit from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getSenderAdrs// gets the packet sender address from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getSequenceCount// gets the sequence count from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getServiceId// gets the packet type from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getSnapshotNumber// gets the snapshot number from the trace packet header(UIAPacket_Hdr7 *pHdr);
``macro Bits32 | UIAPacket_getTag// gets the 32b tag field from the packet header(UIAPacket_Hdr *pHdr);
``macro UInt16 | UIAPacket_getTracePktDownCount// gets the trace packet down count value from the trace packet header(UIAPacket_Hdr7 *pHdr);
``macro Void | UIAPacket_initEventRecHdr// initializes all bitfields in the event packet header(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs);
``macro Void | UIAPacket_initEventRecWithPIDHdr// initializes all bitfields in the event packet header(UIAPacket_Hdr5 *pHdr, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs, UInt32 processId);
``macro Void | UIAPacket_initMsgHdr// initializes all bitfields in the message header(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianness, UIAPacket_MsgType msgType, UInt16 msgLength, UInt16 serviceId, UInt16 seqCount, UInt16 cmdId, UInt32 tag, UInt16 destAdrs, UInt16 senderAdrs);
``macro Void | UIAPacket_initTraceHdrFields// initializes the hdrType field and bitfields in word5 and word6 of the trace packet header. Call @see initEventRecHdr first to initialize the first 4 words of the trace packet header. Then call this macro to initialize hdr type field and words 5 and 6 of the header(UIAPacket_Hdr7 *pPktHdr, UIAPacket_HdrType traceHdrType, UInt16 endpointNumber, Bool isFirstPacket, UInt16 tracePktDownCount, UInt32 traceSnapshotNumber);
``macro Void | UIAPacket_initTraceRecHdr// initializes all bitfields in the trace packet header(UIAPacket_Hdr7 *pHdr, UIAPacket_HdrType traceHdrType, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs, UInt32 processId, UInt16 endpointNumber, Bool isFirstPacket, UInt16 tracePktDownCount, UInt16 traceSnapshotNumber);
``macro Void | UIAPacket_setCmdId// sets the command Id in the packet header(UIAPacket_Hdr *pHdr, UInt16 cmdId);
``macro Void | UIAPacket_setDestAdrs// sets the packet destination address in the packet header(UIAPacket_Hdr *pHdr, UInt16 destAdrs);
``macro Void | UIAPacket_setEventLength// Sets the packet length (in bytes) from the packet header(UIAPacket_Hdr *pHdr, Bits32 pktLength);
``macro Void | UIAPacket_setHdrType// sets the header type in the packet header(UIAPacket_Hdr *pHdr, UIAPacket_HdrType hdrType);
``macro Void | UIAPacket_setInvalidHdr// Used to set the header type as invalid(UIAPacket_Hdr *pHdr, UInt32 eventLength);
``macro Void | UIAPacket_setLoggerInstanceId// sets the sequence count in the packet header(UIAPacket_Hdr *pHdr, Bits16 loggerInstanceId);
``macro Void | UIAPacket_setLoggerModuleId// sets the module ID in the event packet header(UIAPacket_Hdr *pHdr, Bits16 loggerModuleId);
``macro Void | UIAPacket_setMsgLength// sets the packet length (in bytes) from the packet header(UIAPacket_Hdr *pHdr, UInt16 pktLength);
``macro Void | UIAPacket_setMsgType// sets the packet type in the packet header(UIAPacket_Hdr *pHdr, UIAPacket_MsgType msgType);
``macro Bits32 | UIAPacket_setPayloadEndianness// sets the payload endianness bit from the packet header(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianess);
``macro Void | UIAPacket_setSenderAdrs// sets the packet sender address in the packet header(UIAPacket_Hdr *pHdr, UInt16 senderAdrs);
``macro Void | UIAPacket_setSequenceCount// sets the sequence count in the packet header(UIAPacket_Hdr *pHdr, Bits16 seqCount);
``macro Void | UIAPacket_setServiceId// sets the packet type in the packet header(UIAPacket_Hdr *pHdr, UInt16 serviceId);
``macro Void | UIAPacket_setTag// sets the 32b tag field in the packet header(UIAPacket_Hdr *pHdr, Bits32 tagValue);
``macro Bits32 | UIAPacket_swizzle// returns the value in big endian format(Bits32 value);
``macro Bits16 | UIAPacket_swizzle16// returns the value in big endian format(Bits16 value);
Functions common to all target modules
| UIAPacket_Module_getMask// Returns the diagnostics mask for this module, UIAPacket_Module_hasMask// Test whether this module has a diagnostics mask, UIAPacket_Module_heap// The heap from which this module allocates memory, UIAPacket_Module_id// Get this module's unique id, UIAPacket_Module_setMask// Set the diagnostics mask for this module, UIAPacket_Module_startupDone// Test if this module has completed startup
Defines
``#define | UIAPacket_BROADCAST// Used to denote a broadcast message (UInt16)0xFFFE
``#define | UIAPacket_HOST// The address of the host (UInt16)0xFFFF
Typedefs
``typedef struct | UIAPacket_Footer// Packet Footer ...
``typedef struct | UIAPacket_Hdr// UIAPacket Header ...
``typedef struct | UIAPacket_Hdr5// ...
``typedef struct | UIAPacket_Hdr7// ...
``typedef enum | UIAPacket_HdrType// Enumeration of the various types of packet headers ...
``typedef enum | UIAPacket_MsgType// Message Types ...
``typedef enum | UIAPacket_NACKErrorCode// Message Negative Acknowledge Error Codes ...
``typedef enum | UIAPacket_PayloadEndian// Enumeration of payload endianness ...
Constants
``extern const Int | UIAPacket_maxPktLengthInBytes// maximum number of bytes a packet can contain;

const UIAPacket_BROADCAST |

index URL

Used to denote a broadcast message

`C` synopsis | target-domain

````#define UIAPacket_BROADCAST (UInt16)0xFFFE
DETAILS
The broadcast address is always 0xFFFE.

const UIAPacket_HOST |

index URL

The address of the host

`C` synopsis | target-domain

````#define UIAPacket_HOST (UInt16)0xFFFF
DETAILS
The host address is always 0xFFFF.

enum UIAPacket_HdrType |

index URL

Enumeration of the various types of packet headers

`C` synopsis | target-domain

````typedef enum UIAPacket_HdrType {
```` UIAPacket_HdrType_InvalidData,
```` // Invalid Data packet (1 word header)
```` UIAPacket_HdrType_MsgWithPID,
```` // Message with Process ID (5 word header)
```` UIAPacket_HdrType_EventPktWithPID,
```` // Event rec. with Process ID containing multiple events: (5 word hdr)
```` UIAPacket_HdrType_Reserved1,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved2,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved3,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved4,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved5,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved6,
```` // reserved for future use
```` UIAPacket_HdrType_Reserved7,
```` // reserved for future use
```` UIAPacket_HdrType_ChannelizedData,
```` // Channelized data stream
```` UIAPacket_HdrType_Msg,
```` // Message (4 word header)
```` UIAPacket_HdrType_EventPkt,
```` // Event rec. containing multiple events: (4 word hdr)
```` UIAPacket_HdrType_CPUTrace,
```` // CPU Trace ETB data (7 word hdr)
```` UIAPacket_HdrType_STMTrace,
```` // STM Trace ETB data (7 word hdr)
```` UIAPacket_HdrType_MemoryBuffer,
```` // Memory buffer
```` UIAPacket_HdrType_USER2,
```` // User defined header type 2
```` UIAPacket_HdrType_USER3
```` // User defined header type 3
````} UIAPacket_HdrType;
DETAILS
Stored in a 4 bit bitfield (b31-b28) of the first word in the packet.
The HdrType_InvalidData denotes that following data is invalid. This can used to pad to the end of a buffer. Only the first word of the header is filled in. The length includes the header field.

enum UIAPacket_MsgType |

index URL

Message Types

`C` synopsis | target-domain

````typedef enum UIAPacket_MsgType {
```` UIAPacket_MsgType_ACK,
```` // Reply acknowledging receipt of CMD or DATA packet
```` UIAPacket_MsgType_CMD,
```` // Command packets
```` UIAPacket_MsgType_RESULT,
```` // Result reply
```` UIAPacket_MsgType_PARTIALRESULT,
```` // Partial result reply
```` UIAPacket_MsgType_NOTIFY,
```` // Notify messaage (equiv. to the EVENT packet in TCF)
```` UIAPacket_MsgType_FLOWCTRL,
```` // Flow control packet
```` UIAPacket_MsgType_DATA,
```` // Data packet (used for streaming data to host)
```` UIAPacket_MsgType_RESERVED7,
```` UIAPacket_MsgType_RESERVED8,
```` UIAPacket_MsgType_RESERVED9,
```` UIAPacket_MsgType_RESERVED10,
```` UIAPacket_MsgType_RESERVED11,
```` UIAPacket_MsgType_RESERVED12,
```` UIAPacket_MsgType_RESERVED13,
```` UIAPacket_MsgType_NACK_BAD_DATA,
```` // Negative Acknowledge due to bad data
```` UIAPacket_MsgType_NACK_WITH_ERROR_CODE
```` // Negative Acknowledge - error code in msg body
````} UIAPacket_MsgType;
DETAILS
Enumeration of the various types of packets. Stored in a 4 bit bitfield.
MsgType_ACK: Each packet of type CMD or DATA is immediately acknowledged by sending either an ACK reply (if the packet can be processed), a RESULT or PARTIALRESULT reply (if requested data can be provided immediately) or a NACK reply (if the packet cannot be processed). The Service that receives the command is responsible for sending the ACK or NACK. If the requested service is not available, the Endpoint is responsible for sending the NACK packet.
MsgType_CMD: CMD packets are typically sent from the host to the target. The receiving endpoint routes the command to the service identified in the Service Id field.
MsgType_RESULT: RESULT replies are sent along with any requested data. If the Service cannot reply with the requested data immediately, it should return with an ACK packet and send a RESULT packet that echoes the header info of the original command.
MsgType_PARTIALRESULT: PARTIALRESULT replies are sent along with any requested data when the requested action can only be partly fulfilled. Examples are when the service is reporting on some ongoing operation or has been requested to periodically poll some data value.
MsgType_EVENT: EVENT packets are sent to all interested parties in order to notify them about state changes. They can, for example, be used to report an error that has occurred which may impact the ability of the target to continue operating normally.
MsgType_FLOWCTRL FLOWCTRL packets are provided for TCF compliance. They are used to avoid flooding of communication links. In response, endpoints can either increase or decrease rate of packets sent, although this is only loosely defined. TCF services are not directly concerned with flow control. The data passed with FLOWCTRL packets reports the traffic congestion level as an integer between -100 and 100, where 0 = "optimal load"
MsgType_DATA DATA packets are used for sending event log data and other streams of data. Details about how this will be used are being worked out to ensure alignment with BIOS RTA Log Servers.
MsgType_NACK_BAD_DATA: Negative Acknowledge due to bad data. Sent in response to a command that had invalid data in the body of the packet. The original data is echoed in the NACK response.
MsgType_NACK_WITH_ERROR_CODE Negative Acknowledge with Error Code. Sent along with an error code in the first word of the body of the reply that describes the error that was encountered

enum UIAPacket_NACKErrorCode |

index URL

Message Negative Acknowledge Error Codes

`C` synopsis | target-domain

````typedef enum UIAPacket_NACKErrorCode {
```` UIAPacket_NACKErrorCode_NO_REASON_SPECIFIED,
```` // Use this when none of the defined NACK error codes are appropriate
```` UIAPacket_NACKErrorCode_SERVICE_NOT_SUPPORTED,
```` // A module that handles the requested Service Id could not be found
```` UIAPacket_NACKErrorCode_CMD_NOT_SUPPORTED,
```` // The service does not support the specified Command Id
```` UIAPacket_NACKErrorCode_QUEUE_FULL,
```` // Cmd couldn't be passed on to dest. end point due to a queue full condition
```` UIAPacket_NACKErrorCode_BAD_ENDPOINT_ADDRESS,
```` // The destination end point address does not exists
```` UIAPacket_NACKErrorCode_BAD_MESSAGE_LENGTH
```` // packet lenght > endpoint max. msg length or not what is required to service the cmd
````} UIAPacket_NACKErrorCode;
DETAILS
Stored in the first 32b word of the data body of the packet in Network Byte Order

enum UIAPacket_PayloadEndian |

index URL

Enumeration of payload endianness

`C` synopsis | target-domain

````typedef enum UIAPacket_PayloadEndian {
```` UIAPacket_PayloadEndian_LITTLE,
```` UIAPacket_PayloadEndian_BIG
````} UIAPacket_PayloadEndian;

struct UIAPacket_Footer |

index URL

Packet Footer

`C` synopsis | target-domain

````typedef struct UIAPacket_Footer {
```` Int32 word1;
```` // 16 MSBs contain msg length in Bytes, 16 LSBs contain 0x7777
````} UIAPacket_Footer;
DETAILS
The packet footer is always in network byte order i.e. big-endian byte ordering

struct UIAPacket_Hdr |

index URL

UIAPacket Header

`C` synopsis | target-domain

````typedef struct UIAPacket_Hdr {
```` Bits32 word1;
```` Bits32 word2;
```` Bits32 word3;
```` Bits32 word4;
````} UIAPacket_Hdr;
DETAILS
The following is a breakdown of the packet header based on type packet.
The packet header is always sent in network byte (big endian) order.
The top 4 leftmost bits of word1 denote what type of packet this is: HdrType_Msg or HdrType_EventPkt. The contents of the packet depends on this type.

      HdrType_Msg word1
       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|E|L L L L L L L L L L L|T T T T|S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      H = HdrType         (4-bits)
      E = Payload endian  (1-bit)
      L = Message Length  (11-bits)
      T = Message Type    (4-bits)
      S = Service Id      (12-bits)

      HdrType_Msg word2
       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
      |---------------------------------------------------------------|
      |S S S S S S S S S S S S S S S S|C C C C C C C C C C C C C C C C|
      |---------------------------------------------------------------|

      S = Sequence Number (16-bits)
      C = Command Id      (16-bits)

      HdrType_Msg word3
       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
      |---------------------------------------------------------------|
      |T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T|
      |---------------------------------------------------------------|

      T - Tag             (32-bits)

      HdrType_Msg word4
       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
      |---------------------------------------------------------------|
      |D D D D D D D D D D D D D D D D|S S S S S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      D - Destination Address (16-bits)
      S - Source Address      (16-bits)

      HdrType_EventPkt word1
       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|E|L L L L L L L L L L L L L L L L L L L L L L L L L L L|
      |---------------------------------------------------------------|

      H = HdrType         (4-bits)
      E = Payload endian   (1-bit)
      L = Event Length   (27-bits)

      HdrType_EventPkt word2
       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
      |---------------------------------------------------------------|
      |S S S S S S S S S S S S S S S S|R R R R R R R R R R R R R R|P P|
      |---------------------------------------------------------------|

      S = Sequence Number              (16-bits)
      R = Reserved                     (14-bits)
      P = Priority: Normal=0, High > 0 (2-bits)

      HdrType_EventPkt word3
       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
      |---------------------------------------------------------------|
      |D I I I I I I I I I I I I I I I M M M M M M M M M M M M M M M M|
      |---------------------------------------------------------------|

      D ? wasLoggerDynamicallyCreated  (1-bit:  0 = statically created,
                                                1 = dynamically created)
      I - Logger Instance ID           (15-bits)
      M - Logger Module ID             (16-bits)

      HdrType_EventPkt word4
       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
      |---------------------------------------------------------------|
      |D D D D D D D D D D D D D D D D|S S S S S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      D - Destination Address (16-bits)
      S - Source Address      (16-bits)

For HdrType_EventPktWithPID, HdrType_CPUTrace and HdrType_STMTrace, word 5 holds the 32b process ID of the sender (0 for RTOSes such as SysBIOS) 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 |---------------------------------------------------------------| |P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P| |---------------------------------------------------------------| P =Process ID (0 if only 1 process) (32-bits)
For STM_trace and CPU_trace hdr types, word 6 is defined as follows: word 6 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 |---------------------------------------------------------------| |E E E E E E E E E E E E E E E E|F|P P P P P P P P P P P P P P P| |---------------------------------------------------------------|
E = Endpoint Number (16-bits) F = First Packet: 0=first packet, 1=other (1 bit) P = Number of packets left to send in this trace snapshot (15-bits)
For STM_trace and CPU_trace hdr types, word 7 is defined as follows: word 7 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 |---------------------------------------------------------------| |R R R R R R R R|S S S S S S S S S S S S S S S S S S S S S S S S| |---------------------------------------------------------------|
R = Reserved (8-bits) S = Trace Snapshot Number (24-bits)

struct UIAPacket_Hdr5 |

index URL

`C` synopsis | target-domain

````typedef struct UIAPacket_Hdr5 {
```` Bits32 word1;
```` Bits32 word2;
```` Bits32 word3;
```` Bits32 word4;
```` Bits32 word5;
````} UIAPacket_Hdr5;

struct UIAPacket_Hdr7 |

index URL

`C` synopsis | target-domain

````typedef struct UIAPacket_Hdr7 {
```` Bits32 word1;
```` Bits32 word2;
```` Bits32 word3;
```` Bits32 word4;
```` Bits32 word5;
```` Bits32 word6;
```` Bits32 word7;
````} UIAPacket_Hdr7;

config UIAPacket_maxPktLengthInBytes // module-wide |

index URL

maximum number of bytes a packet can contain

`C` synopsis | target-domain

````extern const Int UIAPacket_maxPktLengthInBytes;
DETAILS
used to limit the amount of memory needed by the packet factories in order to handle a new packet

UIAPacket_getCmdId() // module-wide |

index URL

gets the packet type from the packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getCmdId(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getDestAdrs() // module-wide |

index URL

gets the packet destination address from the packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getDestAdrs(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.
Example1 : Void example1(UIAPacket_Object *obj){ Int16 destAdrs = UIAPacket_getDestAdrs(&obj->hdr); ... } Example2 : Void example2(UIAPacket_Hdr *pHdr){ Int16 destAdrs = UIAPacket_getDestAdrs(pHdr); ... }

UIAPacket_getEndpointNumber() // module-wide |

index URL

gets the endpoint number from the trace packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getEndpointNumber(UIAPacket_Hdr7 *pHdr);
ARGUMENTS
— (Hdr7* pHdr) pointer to the packet header
DETAILS
Trace Event header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getEventLength() // module-wide |

index URL

Gets the packet length (in bytes) from the packet header

`C` synopsis | target-domain

````macro Int32 UIAPacket_getEventLength(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Includes the packet header

UIAPacket_getFirstPktFlag() // module-wide |

index URL

gets the first packet flag from the trace packet header

`C` synopsis | target-domain

````macro Bool UIAPacket_getFirstPktFlag(UIAPacket_Hdr7 *pHdr);
ARGUMENTS
— (Hdr7* pHdr) pointer to the packet header
DETAILS
Trace Event header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getFooter() // module-wide |

index URL

returns the integer to use as the packet footer

`C` synopsis | target-domain

````macro Int32 UIAPacket_getFooter(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* pHdr) pointer to the packet header

UIAPacket_getHdrType() // module-wide |

index URL

gets the packet header type from the packet header

`C` synopsis | target-domain

````macro UIAPacket_HdrType UIAPacket_getHdrType(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getLength() // module-wide |

index URL

Gets the packet length (in bytes) from the packet header

`C` synopsis | target-domain

````Int32 UIAPacket_getLength(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Includes the packet header

UIAPacket_getLoggerInstanceId() // module-wide |

index URL

gets the logger instance ID from the event packet header

`C` synopsis | target-domain

````macro Bits16 UIAPacket_getLoggerInstanceId(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getLoggerModuleId() // module-wide |

index URL

gets the logger ID from the event packet header

`C` synopsis | target-domain

````macro Bits16 UIAPacket_getLoggerModuleId(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getMsgLength() // module-wide |

index URL

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

`C` synopsis | target-domain

````macro Int32 UIAPacket_getMsgLength(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getMsgType() // module-wide |

index URL

gets the packet type from the packet header

`C` synopsis | target-domain

````macro UIAPacket_MsgType UIAPacket_getMsgType(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* pHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getPayloadEndianness() // module-wide |

index URL

gets the payload endianness bit from the packet header

`C` synopsis | target-domain

````macro Bits32 UIAPacket_getPayloadEndianness(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getSenderAdrs() // module-wide |

index URL

gets the packet sender address from the packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getSenderAdrs(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getSequenceCount() // module-wide |

index URL

gets the sequence count from the packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getSequenceCount(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getServiceId() // module-wide |

index URL

gets the packet type from the packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getServiceId(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getSnapshotNumber() // module-wide |

index URL

gets the snapshot number from the trace packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getSnapshotNumber(UIAPacket_Hdr7 *pHdr);
ARGUMENTS
— (Hdr7* pHdr) pointer to the packet header
DETAILS
Trace Event header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_getTag() // module-wide |

index URL

gets the 32b tag field from the packet header

`C` synopsis | target-domain

````macro Bits32 UIAPacket_getTag(UIAPacket_Hdr *pHdr);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header

UIAPacket_getTracePktDownCount() // module-wide |

index URL

gets the trace packet down count value from the trace packet header

`C` synopsis | target-domain

````macro UInt16 UIAPacket_getTracePktDownCount(UIAPacket_Hdr7 *pHdr);
ARGUMENTS
— (Hdr7* pHdr) pointer to the packet header
DETAILS
Trace Event header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_initEventRecHdr() // module-wide |

index URL

initializes all bitfields in the event packet header

`C` synopsis | target-domain

````macro Void UIAPacket_initEventRecHdr(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs);
ARGUMENTS
— (Hdr* pHdr) pointer to the event packet header
endianness — endianness of the payload
eventLength — the number of Bytes in the packet, including the header and footer
seqCount — the sequence number for the packet
priority — the logger's priority
moduleId — the logger's module Id
instanceId — the logger's instanceId
destAdrs — the destination address
senderAdrs — the sender address

UIAPacket_initEventRecWithPIDHdr() // module-wide |

index URL

initializes all bitfields in the event packet header

`C` synopsis | target-domain

````macro Void UIAPacket_initEventRecWithPIDHdr(UIAPacket_Hdr5 *pHdr, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs, UInt32 processId);
ARGUMENTS
— (Hdr* pHdr) pointer to the event packet header
endianness — endianness of the payload
eventLength — the number of Bytes in the packet, including the header and footer
seqCount — the sequence number for the packet
priority — the logger's priority
moduleId — the logger's module Id
instanceId — the logger's instanceId
destAdrs — the destination address
senderAdrs — the sender address
processId — the sender process ID

UIAPacket_initMsgHdr() // module-wide |

index URL

initializes all bitfields in the message header

`C` synopsis | target-domain

````macro Void UIAPacket_initMsgHdr(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianness, UIAPacket_MsgType msgType, UInt16 msgLength, UInt16 serviceId, UInt16 seqCount, UInt16 cmdId, UInt32 tag, UInt16 destAdrs, UInt16 senderAdrs);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
endianness — endianness of the payload
msgType — the packet type
msgLength — the number of Bytes in the packet, including the header and footer
serviceId — the service Id
seqCount — the sequence number for the packet
cmdId — the command Id
tag — the tag value to store in the header
destAdrs — the destination address
senderAdrs — the sender address

UIAPacket_initTraceHdrFields() // module-wide |

index URL

initializes the hdrType field and bitfields in word5 and word6 of the trace packet header. Call @see initEventRecHdr first to initialize the first 4 words of the trace packet header. Then call this macro to initialize hdr type field and words 5 and 6 of the header

`C` synopsis | target-domain

````macro Void UIAPacket_initTraceHdrFields(UIAPacket_Hdr7 *pPktHdr, UIAPacket_HdrType traceHdrType, UInt16 endpointNumber, Bool isFirstPacket, UInt16 tracePktDownCount, UInt32 traceSnapshotNumber);
ARGUMENTS
— (Hdr7* pHdr) pointer to the 7 word trace packet header
HdrType traceHdrType — the header type to store in word 1 of the trace packet header
endpointNumber — the endpoint number of the ETB that the data is from
isFirstPacket — true for the first packet in the trace snapshot
tracePktDownCount — the number of packets left to send in the trace snapshot
traceSnapshotNumber — the trace snapshot number

UIAPacket_initTraceRecHdr() // module-wide |

index URL

initializes all bitfields in the trace packet header

`C` synopsis | target-domain

````macro Void UIAPacket_initTraceRecHdr(UIAPacket_Hdr7 *pHdr, UIAPacket_HdrType traceHdrType, UIAPacket_PayloadEndian endianness, UInt32 eventLength, UInt16 seqCount, IUIATransfer_Priority priority, UInt16 moduleId, UInt16 instanceId, UInt16 destAdrs, UInt16 senderAdrs, UInt32 processId, UInt16 endpointNumber, Bool isFirstPacket, UInt16 tracePktDownCount, UInt16 traceSnapshotNumber);
ARGUMENTS
— (Hdr7* pHdr) pointer to the 6 word trace packet header
HdrType traceHdrType — the header type to store in word 1 of the trace packet header
endianness — endianness of the payload
eventLength — the number of Bytes in the packet, including the header and footer
seqCount — the sequence number for the packet
priority — the logger's priority
moduleId — the logger's module Id
instanceId — the logger's instanceId
destAdrs — the destination address
senderAdrs — the sender address
endpointNumber — the endpoint number of the ETB that the data is from
isFirstPacket — true for the first packet in the trace snapshot
tracePktDownCount — the number of packets left to send in the trace snapshot
traceSnapshotNumber — the trace snapshot number

UIAPacket_setCmdId() // module-wide |

index URL

sets the command Id in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setCmdId(UIAPacket_Hdr *pHdr, UInt16 cmdId);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
cmdId — the new command Id
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setDestAdrs() // module-wide |

index URL

sets the packet destination address in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setDestAdrs(UIAPacket_Hdr *pHdr, UInt16 destAdrs);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
destAdrs — the new destination address
DETAILS
The destination address identifies which endpoint (i.e. which CPU or process) the packet should be sent to. 0 is used to broadcast the packet. 1 is used for point-to-point connections. Replies to a packet always use the sender address in the originating packet as the destination address. Destination addresses other than the above can be determined via a discovery process.
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setEventLength() // module-wide |

index URL

Sets the packet length (in bytes) from the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setEventLength(UIAPacket_Hdr *pHdr, Bits32 pktLength);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
pktLength — the new packet length
DETAILS
Includes the packet header

UIAPacket_setHdrType() // module-wide |

index URL

sets the header type in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setHdrType(UIAPacket_Hdr *pHdr, UIAPacket_HdrType hdrType);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
HdrType hdrType — the new header type
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setInvalidHdr() // module-wide |

index URL

Used to set the header type as invalid

`C` synopsis | target-domain

````macro Void UIAPacket_setInvalidHdr(UIAPacket_Hdr *pHdr, UInt32 eventLength);
ARGUMENTS
— (Hdr* pHdr) pointer to the packet header
eventLength — the number of Bytes in the packet of memory that is invalid (including the first word of the 32-bit hdr)

UIAPacket_setLoggerInstanceId() // module-wide |

index URL

sets the sequence count in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setLoggerInstanceId(UIAPacket_Hdr *pHdr, Bits16 loggerInstanceId);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
seqCount — the new packet sequence count
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setLoggerModuleId() // module-wide |

index URL

sets the module ID in the event packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setLoggerModuleId(UIAPacket_Hdr *pHdr, Bits16 loggerModuleId);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
loggerModuleId — the moduleID of the logger that logged the events
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setMsgLength() // module-wide |

index URL

sets the packet length (in bytes) from the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setMsgLength(UIAPacket_Hdr *pHdr, UInt16 pktLength);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
pktLength — the new packet length
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setMsgType() // module-wide |

index URL

sets the packet type in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setMsgType(UIAPacket_Hdr *pHdr, UIAPacket_MsgType msgType);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
msgType — the new packet type
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setPayloadEndianness() // module-wide |

index URL

sets the payload endianness bit from the packet header

`C` synopsis | target-domain

````macro Bits32 UIAPacket_setPayloadEndianness(UIAPacket_Hdr *pHdr, UIAPacket_PayloadEndian endianess);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header (Hdr* msgHdr) Endianness of the payload
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setSenderAdrs() // module-wide |

index URL

sets the packet sender address in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setSenderAdrs(UIAPacket_Hdr *pHdr, UInt16 senderAdrs);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
senderAdrs — the new destination address
DETAILS
The sender address identifies which endpoint (i.e. which CPU or process) the packet is coming from 1 is used by default. Sender addresses other than 1 can be set via configuration (e.g. to identify which CPU core a packet originated from).
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setSequenceCount() // module-wide |

index URL

sets the sequence count in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setSequenceCount(UIAPacket_Hdr *pHdr, Bits16 seqCount);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
seqCount — the new packet sequence count
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setServiceId() // module-wide |

index URL

sets the packet type in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setServiceId(UIAPacket_Hdr *pHdr, UInt16 serviceId);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
serviceId — the new service Id
DETAILS
Message header is always layed out as big endian (network order). This macro is designed to work on both little endian and big endian targets, since 32b long words are consistently handled for both endianness - it is only when converting from bytes to longs that bit orders get swapped. #ifdef xdc_target__bigEndian can be used if necessary.

UIAPacket_setTag() // module-wide |

index URL

sets the 32b tag field in the packet header

`C` synopsis | target-domain

````macro Void UIAPacket_setTag(UIAPacket_Hdr *pHdr, Bits32 tagValue);
ARGUMENTS
— (Hdr* msgHdr) pointer to the packet header
tagValue — the tag value to store in the header

UIAPacket_swizzle() // module-wide |

index URL

returns the value in big endian format

`C` synopsis | target-domain

````macro Bits32 UIAPacket_swizzle(Bits32 value);

UIAPacket_swizzle16() // module-wide |

index URL

returns the value in big endian format

`C` synopsis | target-domain

````macro Bits16 UIAPacket_swizzle16(Bits16 value);

Module-Wide Built-Ins |

index URL

`C` synopsis | target-domain

````Types_ModuleId UIAPacket_Module_id();
````// Get this module's unique id
````Bool UIAPacket_Module_startupDone();
````// Test if this module has completed startup
````IHeap_Handle UIAPacket_Module_heap();
````// The heap from which this module allocates memory
````Bool UIAPacket_Module_hasMask();
````// Test whether this module has a diagnostics mask
````Bits16 UIAPacket_Module_getMask();
````// Returns the diagnostics mask for this module
````Void UIAPacket_Module_setMask(Bits16 mask);
````// Set the diagnostics mask for this module

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

``var UIAPacket = xdc.useModule('ti.uiactools.runtime.UIAPacket');
module-wide constants & types
`` ``const UIAPacket.BROADCAST// Used to denote a broadcast message = 0xFFFE;
`` ``const UIAPacket.HOST// The address of the host = 0xFFFF;
`` ``values of type UIAPacket.HdrType// Enumeration of the various types of packet headers
`` `` const UIAPacket.HdrType_InvalidData// Invalid Data packet (1 word header);
`` `` const UIAPacket.HdrType_MsgWithPID// Message with Process ID (5 word header);
`` `` const UIAPacket.HdrType_EventPktWithPID// Event rec. with Process ID containing multiple events: (5 word hdr);
`` `` const UIAPacket.HdrType_Reserved1// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved2// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved3// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved4// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved5// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved6// reserved for future use;
`` `` const UIAPacket.HdrType_Reserved7// reserved for future use;
`` `` const UIAPacket.HdrType_ChannelizedData// Channelized data stream;
`` `` const UIAPacket.HdrType_Msg// Message (4 word header);
`` `` const UIAPacket.HdrType_EventPkt// Event rec. containing multiple events: (4 word hdr);
`` `` const UIAPacket.HdrType_CPUTrace// CPU Trace ETB data (7 word hdr);
`` `` const UIAPacket.HdrType_STMTrace// STM Trace ETB data (7 word hdr);
`` `` const UIAPacket.HdrType_MemoryBuffer// Memory buffer;
`` `` const UIAPacket.HdrType_USER2// User defined header type 2;
`` `` const UIAPacket.HdrType_USER3// User defined header type 3;
`` ``values of type UIAPacket.MsgType// Message Types
`` `` const UIAPacket.MsgType_ACK// Reply acknowledging receipt of CMD or DATA packet;
`` `` const UIAPacket.MsgType_CMD// Command packets;
`` `` const UIAPacket.MsgType_RESULT// Result reply;
`` `` const UIAPacket.MsgType_PARTIALRESULT// Partial result reply;
`` `` const UIAPacket.MsgType_NOTIFY// Notify messaage (equiv. to the EVENT packet in TCF);
`` `` const UIAPacket.MsgType_FLOWCTRL// Flow control packet;
`` `` const UIAPacket.MsgType_DATA// Data packet (used for streaming data to host);
`` `` const UIAPacket.MsgType_RESERVED7;
`` `` const UIAPacket.MsgType_RESERVED8;
`` `` const UIAPacket.MsgType_RESERVED9;
`` `` const UIAPacket.MsgType_RESERVED10;
`` `` const UIAPacket.MsgType_RESERVED11;
`` `` const UIAPacket.MsgType_RESERVED12;
`` `` const UIAPacket.MsgType_RESERVED13;
`` `` const UIAPacket.MsgType_NACK_BAD_DATA// Negative Acknowledge due to bad data;
`` `` const UIAPacket.MsgType_NACK_WITH_ERROR_CODE// Negative Acknowledge - error code in msg body;
`` ``values of type UIAPacket.NACKErrorCode// Message Negative Acknowledge Error Codes
`` `` const UIAPacket.NACKErrorCode_NO_REASON_SPECIFIED// Use this when none of the defined NACK error codes are appropriate;
`` `` const UIAPacket.NACKErrorCode_SERVICE_NOT_SUPPORTED// A module that handles the requested Service Id could not be found;
`` `` const UIAPacket.NACKErrorCode_CMD_NOT_SUPPORTED// The service does not support the specified Command Id;
`` `` const UIAPacket.NACKErrorCode_QUEUE_FULL// Cmd couldn't be passed on to dest. end point due to a queue full condition;
`` `` const UIAPacket.NACKErrorCode_BAD_ENDPOINT_ADDRESS// The destination end point address does not exists;
`` `` const UIAPacket.NACKErrorCode_BAD_MESSAGE_LENGTH// packet lenght > endpoint max. msg length or not what is required to service the cmd;
`` ``values of type UIAPacket.PayloadEndian// Enumeration of payload endianness
`` `` const UIAPacket.PayloadEndian_LITTLE;
`` `` const UIAPacket.PayloadEndian_BIG;
`` ``var obj = new UIAPacket.Footer// Packet Footer;
`` `` obj.word1// 16 MSBs contain msg length in Bytes, 16 LSBs contain 0x7777 = Int32 ...
`` ``var obj = new UIAPacket.Hdr// UIAPacket Header;
`` `` obj.word1 = Bits32 ...
`` `` obj.word2 = Bits32 ...
`` `` obj.word3 = Bits32 ...
`` `` obj.word4 = Bits32 ...
`` ``var obj = new UIAPacket.Hdr5// ;
`` `` obj.word1 = Bits32 ...
`` `` obj.word2 = Bits32 ...
`` `` obj.word3 = Bits32 ...
`` `` obj.word4 = Bits32 ...
`` `` obj.word5 = Bits32 ...
`` ``var obj = new UIAPacket.Hdr7// ;
`` `` obj.word1 = Bits32 ...
`` `` obj.word2 = Bits32 ...
`` `` obj.word3 = Bits32 ...
`` `` obj.word4 = Bits32 ...
`` `` obj.word5 = Bits32 ...
`` `` obj.word6 = Bits32 ...
`` `` obj.word7 = Bits32 ...
module-wide config parameters
`` ``UIAPacket.maxPktLengthInBytes// maximum number of bytes a packet can contain = Int 128;
`` ``UIAPacket.common$// Common module configuration parameters = Types.Common$ undefined;

const UIAPacket.BROADCAST |

index URL

Used to denote a broadcast message

`XDCscript` usage | meta-domain

````const UIAPacket.BROADCAST = 0xFFFE;
DETAILS
The broadcast address is always 0xFFFE.
C SYNOPSIS
UIAPacket_BROADCAST

const UIAPacket.HOST |

index URL

The address of the host

`XDCscript` usage | meta-domain

````const UIAPacket.HOST = 0xFFFF;
DETAILS
The host address is always 0xFFFF.
C SYNOPSIS
UIAPacket_HOST

enum UIAPacket.HdrType |

index URL

Enumeration of the various types of packet headers

`XDCscript` usage | meta-domain

````values of type UIAPacket.HdrType
```` const UIAPacket.HdrType_InvalidData;
```` // Invalid Data packet (1 word header)
```` const UIAPacket.HdrType_MsgWithPID;
```` // Message with Process ID (5 word header)
```` const UIAPacket.HdrType_EventPktWithPID;
```` // Event rec. with Process ID containing multiple events: (5 word hdr)
```` const UIAPacket.HdrType_Reserved1;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved2;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved3;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved4;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved5;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved6;
```` // reserved for future use
```` const UIAPacket.HdrType_Reserved7;
```` // reserved for future use
```` const UIAPacket.HdrType_ChannelizedData;
```` // Channelized data stream
```` const UIAPacket.HdrType_Msg;
```` // Message (4 word header)
```` const UIAPacket.HdrType_EventPkt;
```` // Event rec. containing multiple events: (4 word hdr)
```` const UIAPacket.HdrType_CPUTrace;
```` // CPU Trace ETB data (7 word hdr)
```` const UIAPacket.HdrType_STMTrace;
```` // STM Trace ETB data (7 word hdr)
```` const UIAPacket.HdrType_MemoryBuffer;
```` // Memory buffer
```` const UIAPacket.HdrType_USER2;
```` // User defined header type 2
```` const UIAPacket.HdrType_USER3;
```` // User defined header type 3
DETAILS
Stored in a 4 bit bitfield (b31-b28) of the first word in the packet.
The HdrType_InvalidData denotes that following data is invalid. This can used to pad to the end of a buffer. Only the first word of the header is filled in. The length includes the header field.
C SYNOPSIS
UIAPacket_HdrType

enum UIAPacket.MsgType |

index URL

Message Types

`XDCscript` usage | meta-domain

````values of type UIAPacket.MsgType
```` const UIAPacket.MsgType_ACK;
```` // Reply acknowledging receipt of CMD or DATA packet
```` const UIAPacket.MsgType_CMD;
```` // Command packets
```` const UIAPacket.MsgType_RESULT;
```` // Result reply
```` const UIAPacket.MsgType_PARTIALRESULT;
```` // Partial result reply
```` const UIAPacket.MsgType_NOTIFY;
```` // Notify messaage (equiv. to the EVENT packet in TCF)
```` const UIAPacket.MsgType_FLOWCTRL;
```` // Flow control packet
```` const UIAPacket.MsgType_DATA;
```` // Data packet (used for streaming data to host)
```` const UIAPacket.MsgType_RESERVED7;
```` const UIAPacket.MsgType_RESERVED8;
```` const UIAPacket.MsgType_RESERVED9;
```` const UIAPacket.MsgType_RESERVED10;
```` const UIAPacket.MsgType_RESERVED11;
```` const UIAPacket.MsgType_RESERVED12;
```` const UIAPacket.MsgType_RESERVED13;
```` const UIAPacket.MsgType_NACK_BAD_DATA;
```` // Negative Acknowledge due to bad data
```` const UIAPacket.MsgType_NACK_WITH_ERROR_CODE;
```` // Negative Acknowledge - error code in msg body
DETAILS
Enumeration of the various types of packets. Stored in a 4 bit bitfield.
MsgType_ACK: Each packet of type CMD or DATA is immediately acknowledged by sending either an ACK reply (if the packet can be processed), a RESULT or PARTIALRESULT reply (if requested data can be provided immediately) or a NACK reply (if the packet cannot be processed). The Service that receives the command is responsible for sending the ACK or NACK. If the requested service is not available, the Endpoint is responsible for sending the NACK packet.
MsgType_CMD: CMD packets are typically sent from the host to the target. The receiving endpoint routes the command to the service identified in the Service Id field.
MsgType_RESULT: RESULT replies are sent along with any requested data. If the Service cannot reply with the requested data immediately, it should return with an ACK packet and send a RESULT packet that echoes the header info of the original command.
MsgType_PARTIALRESULT: PARTIALRESULT replies are sent along with any requested data when the requested action can only be partly fulfilled. Examples are when the service is reporting on some ongoing operation or has been requested to periodically poll some data value.
MsgType_EVENT: EVENT packets are sent to all interested parties in order to notify them about state changes. They can, for example, be used to report an error that has occurred which may impact the ability of the target to continue operating normally.
MsgType_FLOWCTRL FLOWCTRL packets are provided for TCF compliance. They are used to avoid flooding of communication links. In response, endpoints can either increase or decrease rate of packets sent, although this is only loosely defined. TCF services are not directly concerned with flow control. The data passed with FLOWCTRL packets reports the traffic congestion level as an integer between -100 and 100, where 0 = "optimal load"
MsgType_DATA DATA packets are used for sending event log data and other streams of data. Details about how this will be used are being worked out to ensure alignment with BIOS RTA Log Servers.
MsgType_NACK_BAD_DATA: Negative Acknowledge due to bad data. Sent in response to a command that had invalid data in the body of the packet. The original data is echoed in the NACK response.
MsgType_NACK_WITH_ERROR_CODE Negative Acknowledge with Error Code. Sent along with an error code in the first word of the body of the reply that describes the error that was encountered
C SYNOPSIS
UIAPacket_MsgType

enum UIAPacket.NACKErrorCode |

index URL

Message Negative Acknowledge Error Codes

`XDCscript` usage | meta-domain

````values of type UIAPacket.NACKErrorCode
```` const UIAPacket.NACKErrorCode_NO_REASON_SPECIFIED;
```` // Use this when none of the defined NACK error codes are appropriate
```` const UIAPacket.NACKErrorCode_SERVICE_NOT_SUPPORTED;
```` // A module that handles the requested Service Id could not be found
```` const UIAPacket.NACKErrorCode_CMD_NOT_SUPPORTED;
```` // The service does not support the specified Command Id
```` const UIAPacket.NACKErrorCode_QUEUE_FULL;
```` // Cmd couldn't be passed on to dest. end point due to a queue full condition
```` const UIAPacket.NACKErrorCode_BAD_ENDPOINT_ADDRESS;
```` // The destination end point address does not exists
```` const UIAPacket.NACKErrorCode_BAD_MESSAGE_LENGTH;
```` // packet lenght > endpoint max. msg length or not what is required to service the cmd
DETAILS
Stored in the first 32b word of the data body of the packet in Network Byte Order
C SYNOPSIS
UIAPacket_NACKErrorCode

enum UIAPacket.PayloadEndian |

index URL

Enumeration of payload endianness

`XDCscript` usage | meta-domain

````values of type UIAPacket.PayloadEndian
```` const UIAPacket.PayloadEndian_LITTLE;
```` const UIAPacket.PayloadEndian_BIG;
C SYNOPSIS
UIAPacket_PayloadEndian

struct UIAPacket.Footer |

index URL

Packet Footer

`XDCscript` usage | meta-domain

````var obj = new UIAPacket.Footer;
```` obj.word1 = Int32 ...
```` // 16 MSBs contain msg length in Bytes, 16 LSBs contain 0x7777
DETAILS
The packet footer is always in network byte order i.e. big-endian byte ordering
C SYNOPSIS
UIAPacket_Footer

struct UIAPacket.Hdr |

index URL

UIAPacket Header

`XDCscript` usage | meta-domain

````var obj = new UIAPacket.Hdr;
```` obj.word1 = Bits32 ...
```` obj.word2 = Bits32 ...
```` obj.word3 = Bits32 ...
```` obj.word4 = Bits32 ...
DETAILS
The following is a breakdown of the packet header based on type packet.
The packet header is always sent in network byte (big endian) order.
The top 4 leftmost bits of word1 denote what type of packet this is: HdrType_Msg or HdrType_EventPkt. The contents of the packet depends on this type.

      HdrType_Msg word1
       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|E|L L L L L L L L L L L|T T T T|S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      H = HdrType         (4-bits)
      E = Payload endian  (1-bit)
      L = Message Length  (11-bits)
      T = Message Type    (4-bits)
      S = Service Id      (12-bits)

      HdrType_Msg word2
       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
      |---------------------------------------------------------------|
      |S S S S S S S S S S S S S S S S|C C C C C C C C C C C C C C C C|
      |---------------------------------------------------------------|

      S = Sequence Number (16-bits)
      C = Command Id      (16-bits)

      HdrType_Msg word3
       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
      |---------------------------------------------------------------|
      |T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T|
      |---------------------------------------------------------------|

      T - Tag             (32-bits)

      HdrType_Msg word4
       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
      |---------------------------------------------------------------|
      |D D D D D D D D D D D D D D D D|S S S S S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      D - Destination Address (16-bits)
      S - Source Address      (16-bits)

      HdrType_EventPkt word1
       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|E|L L L L L L L L L L L L L L L L L L L L L L L L L L L|
      |---------------------------------------------------------------|

      H = HdrType         (4-bits)
      E = Payload endian   (1-bit)
      L = Event Length   (27-bits)

      HdrType_EventPkt word2
       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
      |---------------------------------------------------------------|
      |S S S S S S S S S S S S S S S S|R R R R R R R R R R R R R R|P P|
      |---------------------------------------------------------------|

      S = Sequence Number              (16-bits)
      R = Reserved                     (14-bits)
      P = Priority: Normal=0, High > 0 (2-bits)

      HdrType_EventPkt word3
       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
      |---------------------------------------------------------------|
      |D I I I I I I I I I I I I I I I M M M M M M M M M M M M M M M M|
      |---------------------------------------------------------------|

      D ? wasLoggerDynamicallyCreated  (1-bit:  0 = statically created,
                                                1 = dynamically created)
      I - Logger Instance ID           (15-bits)
      M - Logger Module ID             (16-bits)

      HdrType_EventPkt word4
       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
      |---------------------------------------------------------------|
      |D D D D D D D D D D D D D D D D|S S S S S S S S S S S S S S S S|
      |---------------------------------------------------------------|

      D - Destination Address (16-bits)
      S - Source Address      (16-bits)

For HdrType_EventPktWithPID, HdrType_CPUTrace and HdrType_STMTrace, word 5 holds the 32b process ID of the sender (0 for RTOSes such as SysBIOS) 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 |---------------------------------------------------------------| |P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P| |---------------------------------------------------------------| P =Process ID (0 if only 1 process) (32-bits)
For STM_trace and CPU_trace hdr types, word 6 is defined as follows: word 6 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 |---------------------------------------------------------------| |E E E E E E E E E E E E E E E E|F|P P P P P P P P P P P P P P P| |---------------------------------------------------------------|
E = Endpoint Number (16-bits) F = First Packet: 0=first packet, 1=other (1 bit) P = Number of packets left to send in this trace snapshot (15-bits)
For STM_trace and CPU_trace hdr types, word 7 is defined as follows: word 7 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 |---------------------------------------------------------------| |R R R R R R R R|S S S S S S S S S S S S S S S S S S S S S S S S| |---------------------------------------------------------------|
R = Reserved (8-bits) S = Trace Snapshot Number (24-bits)
C SYNOPSIS
UIAPacket_Hdr

struct UIAPacket.Hdr5 |

index URL

`XDCscript` usage | meta-domain

````var obj = new UIAPacket.Hdr5;
```` obj.word1 = Bits32 ...
```` obj.word2 = Bits32 ...
```` obj.word3 = Bits32 ...
```` obj.word4 = Bits32 ...
```` obj.word5 = Bits32 ...
C SYNOPSIS
UIAPacket_Hdr5

struct UIAPacket.Hdr7 |

index URL

`XDCscript` usage | meta-domain

````var obj = new UIAPacket.Hdr7;
```` obj.word1 = Bits32 ...
```` obj.word2 = Bits32 ...
```` obj.word3 = Bits32 ...
```` obj.word4 = Bits32 ...
```` obj.word5 = Bits32 ...
```` obj.word6 = Bits32 ...
```` obj.word7 = Bits32 ...
C SYNOPSIS
UIAPacket_Hdr7

config UIAPacket.maxPktLengthInBytes // module-wide |

index URL

maximum number of bytes a packet can contain

`XDCscript` usage | meta-domain

````UIAPacket.maxPktLengthInBytes = Int 128;
DETAILS
used to limit the amount of memory needed by the packet factories in order to handle a new packet
C SYNOPSIS
UIAPacket_maxPktLengthInBytes

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

index URL

Common module configuration parameters

`XDCscript` usage | meta-domain

````UIAPacket.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