module ti.uiactools.runtime.BufferPacketizer |  |  |

index URL

A logger which stores `Log` events in a non-blocking, streamable circular buffer

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

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

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

Functions
``Void | BufferPacketizer_construct// Initialize a new instance object inside the provided structure(BufferPacketizer_Struct *structP, const BufferPacketizer_Params *params, Error_Block *eb);
``BufferPacketizer_Handle | BufferPacketizer_create// Allocate and initialize a new instance object and return its handle(const BufferPacketizer_Params *params, Error_Block *eb);
``Void | BufferPacketizer_delete// Finalize and free this previously allocated instance object, setting the referenced handle to NULL(BufferPacketizer_Handle *handleP);
``Void | BufferPacketizer_destruct// Finalize the instance object inside the provided structure(BufferPacketizer_Struct *structP);
``Void | BufferPacketizer_enableDebugMessages// (BufferPacketizer_Handle handle, Bool enable);
``SizeT | BufferPacketizer_getUnsentSize// Determines how much unsent data is left to send (in Maus)(BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_init// (BufferPacketizer_Handle handle);
``macro Void | BufferPacketizer_initBuffer// Initializes the UIA trace packet header(Ptr buffer, UInt16 src, UInt32 processId);
``Bool | BufferPacketizer_isFirstPacketFlagSet// (BufferPacketizer_Handle handle);
``Void | BufferPacketizer_Params_init// Initialize this config-params structure with supplier-specified defaults before instance creation(BufferPacketizer_Params *params);
``Void | BufferPacketizer_sendPacket// calls the exchangeFxn with the next packet payload of data(BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_setBufferToUpload// Assigns a buffer to upload to System Analyzer (in Maus)(BufferPacketizer_Handle handle, UInt32 *pBuffer, UInt32 bufferSizeInWords, Ptr pUploaderContext);
``Void | BufferPacketizer_transferSTMConfig// (BufferPacketizer_Handle handle);
Functions common to all IUIAPacketTransfer modules
``Bool | BufferPacketizer_disable// Disable a log(BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_enable// Enable a log(BufferPacketizer_Handle handle);
``IUIAPacketTransfer_TransferType | BufferPacketizer_getTransferType// (BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_isEmpty// Returns true if the transfer buffer has no unread data(BufferPacketizer_Handle handle);
``UInt32 | BufferPacketizer_poll// Check if data is ready and, if so, trigger buffer exchange to send the data as packets. Call readyToSend after this call to check if there is data available to send(BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_prime// If PrimeFxn is not set the user must call prime with the first packet(BufferPacketizer_Handle handle, Ptr packetBuffer);
``Bool | BufferPacketizer_readyToSend// check to see if the ETB drain buffer contains unsent data. If true, call transferData API to send the data(BufferPacketizer_Handle handle);
``Bool | BufferPacketizer_transferData// Read and Transfer ETB data move the binary data to PC host via event packets for further decoding and analysis(BufferPacketizer_Handle handle, UInt32 maxNumPackets);
Functions common to all target instances
| BufferPacketizer_handle// Convert this instance structure pointer into an instance handle, BufferPacketizer_Handle_downCast// conditionally move one level down the inheritance hierarchy; NULL upon failure, BufferPacketizer_Handle_label// The label associated with this instance object, BufferPacketizer_Handle_name// The name of this instance object, BufferPacketizer_Handle_upCast// unconditionally move one level up the inheritance hierarchy, BufferPacketizer_Object_count// The number of statically-created instance objects, BufferPacketizer_Object_first// The handle of the first dynamically-created instance object, or NULL, BufferPacketizer_Object_get// The handle of the i-th statically-created instance object (array == NULL), BufferPacketizer_Object_heap// The heap used to allocate dynamically-created instance objects, BufferPacketizer_Object_next// The handle of the next dynamically-created instance object, or NULL, BufferPacketizer_struct// Convert this instance handle into an instance structure pointer
Functions common to all target modules
| BufferPacketizer_Module_getMask// Returns the diagnostics mask for this module, BufferPacketizer_Module_hasMask// Test whether this module has a diagnostics mask, BufferPacketizer_Module_heap// The heap from which this module allocates memory, BufferPacketizer_Module_id// Get this module's unique id, BufferPacketizer_Module_setMask// Set the diagnostics mask for this module, BufferPacketizer_Module_startupDone// Test if this module has completed startup
Typedefs
``typedef enum | BufferPacketizer_BufferType// Used to specify the type of ETB to drain ...
``typedef Ptr | (*BufferPacketizer_ExchangeFxnType// Typedef for the exchange function pointer)(Ptr,Ptr);
``typedef BufferPacketizer_Object * | BufferPacketizer_Handle// Client reference to an instance object;
``typedef struct | BufferPacketizer_Object// Opaque internal representation of an instance object BufferPacketizer_Object;
``typedef struct | BufferPacketizer_Params// Instance config-params structure ...
``typedef Ptr | (*BufferPacketizer_PrimeFxnType// Typedef for the exchange function pointer)(Ptr);
``typedef struct | BufferPacketizer_Struct// Opaque client structure large enough to hold an instance object BufferPacketizer_Struct;
``typedef enum | BufferPacketizer_TransferType// ...
``typedef enum | BufferPacketizer_TransportType// Used to specify the type of transport to use ...
Constants
``extern const String | BufferPacketizer_customTransportType// Custom transport used to send the records to an instrumentation host;
``extern const BufferPacketizer_TransportType | BufferPacketizer_transportType// Transport used to send the records to an instrumentation host;

enum BufferPacketizer_BufferType |

index URL

Used to specify the type of ETB to drain

`C` synopsis | target-domain

````typedef enum BufferPacketizer_BufferType {
```` BufferPacketizer_BufferType_MEMORY,
```` BufferPacketizer_BufferType_CPUTRACE_ETB,
```` BufferPacketizer_BufferType_STM_ETB
````} BufferPacketizer_BufferType;
DETAILS
This enum is used by the instrumentation host to determine what the ETB type is.

enum BufferPacketizer_TransferType |

index URL

`C` synopsis | target-domain

````typedef enum BufferPacketizer_TransferType {
```` BufferPacketizer_TransferType_RELIABLE,
```` BufferPacketizer_TransferType_LOSSY
````} BufferPacketizer_TransferType;

enum BufferPacketizer_TransportType |

index URL

Used to specify the type of transport to use

`C` synopsis | target-domain

````typedef enum BufferPacketizer_TransportType {
```` BufferPacketizer_TransportType_UART,
```` BufferPacketizer_TransportType_USB,
```` BufferPacketizer_TransportType_UDP,
```` BufferPacketizer_TransportType_TCP,
```` BufferPacketizer_TransportType_CUSTOM
````} BufferPacketizer_TransportType;
DETAILS
This enum is used by the instrumentation host to determine what the transport is. It is not used by the target code.

typedef BufferPacketizer_ExchangeFxnType |

index URL

Typedef for the exchange function pointer

`C` synopsis | target-domain

````typedef Ptr (*BufferPacketizer_ExchangeFxnType)(Ptr,Ptr);
VALUES
Ptr — first pointer is for the object instance handle second pointer is the just-filled buffer containing the ETB packet to be sent

typedef BufferPacketizer_PrimeFxnType |

index URL

Typedef for the exchange function pointer

`C` synopsis | target-domain

````typedef Ptr (*BufferPacketizer_PrimeFxnType)(Ptr);
VALUES
Ptr — first pointer is for the object instance handle

config BufferPacketizer_customTransportType // module-wide |

index URL

Custom transport used to send the records to an instrumentation host

`C` synopsis | target-domain

````extern const String BufferPacketizer_customTransportType;
DETAILS
If the desired transport is not in the `TransportType` enum, and `transportType` is set to `TransportType_CUSTOM`, this parameter must be filled in with the correct transport name.
If `transportType` is NOT set to `TransportType_CUSTOM`, this parameter is ignored.

config BufferPacketizer_transportType // module-wide |

index URL

Transport used to send the records to an instrumentation host

`C` synopsis | target-domain

````extern const BufferPacketizer_TransportType BufferPacketizer_transportType;
DETAILS
This parameter is used to specify the transport that the `exchangeFxn` function will use to send the buffer to an instrumentation host (e.g. System Analyzer in CCS).
This parameter is placed into the generated UIA XML file. The instrumentation host can use the XML file to help it auto-detect as much as possible and act accordingly.
If the desired transport is not in the `TransportType` enum, select `TransportType_CUSTOM` and set the `customTransport` string with the desired string.

BufferPacketizer_initBuffer() // module-wide |

index URL

Initializes the UIA trace packet header

`C` synopsis | target-domain

````macro Void BufferPacketizer_initBuffer(Ptr buffer, UInt16 src, UInt32 processId);
ARGUMENTS
buffer — Pointer to the buffer that BufferPacketizer will fill with Log events. The first four 32-bit words will contain the UIAPacket_Hdr structure.
src — Used to initialize the UIA source address. For a single core device, this will generally be 0. For multi-core devices, it generally corresponds to the DNUM (on C6xxxx deviecs) or the Ipc MultiProc id. It must be unique for all cores and match the configuration in the System Analyzer endpoint configuration.
processId — the process ID the packet is being sent by. (0 if only a single process).
DETAILS
This API is used to initialize a buffer before it is given to BufferPacketizer (via priming or exchange). The function initializes the UIAPacket portion of the buffer.

Module-Wide Built-Ins |

index URL

`C` synopsis | target-domain

````Types_ModuleId BufferPacketizer_Module_id();
````// Get this module's unique id
````Bool BufferPacketizer_Module_startupDone();
````// Test if this module has completed startup
````IHeap_Handle BufferPacketizer_Module_heap();
````// The heap from which this module allocates memory
````Bool BufferPacketizer_Module_hasMask();
````// Test whether this module has a diagnostics mask
````Bits16 BufferPacketizer_Module_getMask();
````// Returns the diagnostics mask for this module
````Void BufferPacketizer_Module_setMask(Bits16 mask);
````// Set the diagnostics mask for this module

Instance Object Types |

index URL

`C` synopsis | target-domain

````typedef struct BufferPacketizer_Object BufferPacketizer_Object;
````// Opaque internal representation of an instance object
````typedef BufferPacketizer_Object *BufferPacketizer_Handle;
````// Client reference to an instance object
````typedef struct BufferPacketizer_Struct BufferPacketizer_Struct;
````// Opaque client structure large enough to hold an instance object
````BufferPacketizer_Handle BufferPacketizer_handle(BufferPacketizer_Struct *structP);
````// Convert this instance structure pointer into an instance handle
````BufferPacketizer_Struct *BufferPacketizer_struct(BufferPacketizer_Handle handle);
````// Convert this instance handle into an instance structure pointer

Instance Config Parameters |

index URL

`C` synopsis | target-domain

````typedef struct BufferPacketizer_Params {
````// Instance config-params structure
```` IInstance_Params *instance;
```` // Common per-instance configs
```` BufferPacketizer_BufferType bufferType;
```` // Specifies the type of data that is being uploaded so that it can be properly decoded on the host
```` Bits16 endpointNumber;
```` // sender ID to insert in UIAPacket header Set to 0xFF if this should be set to DNUM (C6X only)
```` UInt8 etbCoreId;
```` // the ID for the core that the ETB services
```` BufferPacketizer_ExchangeFxnType exchangeFxn;
```` // Function pointer to the exchange function
```` SizeT packetSizeInMAUs;
```` // Number of minimum addressable units (e.g. bytes) in the trace event packet buffer
```` BufferPacketizer_PrimeFxnType primeFxn;
```` // Function pointer to the prime function
```` IUIAPacketTransfer_TransferType transferType;
```` //
````} BufferPacketizer_Params;
````Void BufferPacketizer_Params_init(BufferPacketizer_Params *params);
````// Initialize this config-params structure with supplier-specified defaults before instance creation

config BufferPacketizer_bufferType // instance |

index URL

Specifies the type of data that is being uploaded so that it can be properly decoded on the host

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` BufferPacketizer_BufferType bufferType;

config BufferPacketizer_endpointNumber // instance |

index URL

sender ID to insert in UIAPacket header Set to 0xFF if this should be set to DNUM (C6X only)

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` Bits16 endpointNumber;

config BufferPacketizer_etbCoreId // instance |

index URL

the ID for the core that the ETB services

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` UInt8 etbCoreId;
DETAILS
For STM (default), use 0xFF

config BufferPacketizer_exchangeFxn // instance |

index URL

Function pointer to the exchange function

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` BufferPacketizer_ExchangeFxnType exchangeFxn;
DETAILS
exchange function must return a pointer to a buffer that is word aligned, initialized with a UIA header and the correct size. This is called in the context of a log so generally the exchange function should be quick to execute.

config BufferPacketizer_packetSizeInMAUs // instance |

index URL

Number of minimum addressable units (e.g. bytes) in the trace event packet buffer

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` SizeT packetSizeInMAUs;
DETAILS
NOTE: the packet size must contain an integer number of 32b words (e.g. if a MAU = 1 byte, then the packet size must be a multiple of 4).

config BufferPacketizer_primeFxn // instance |

index URL

Function pointer to the prime function

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` BufferPacketizer_PrimeFxnType primeFxn;

config BufferPacketizer_transferType // instance |

index URL

`C` synopsis | target-domain

````struct BufferPacketizer_Params {
```` ...
```` IUIAPacketTransfer_TransferType transferType;

Instance Creation |

index URL

`C` synopsis | target-domain

````BufferPacketizer_Handle BufferPacketizer_create(const BufferPacketizer_Params *params, Error_Block *eb);
````// Allocate and initialize a new instance object and return its handle
````Void BufferPacketizer_construct(BufferPacketizer_Struct *structP, const BufferPacketizer_Params *params, Error_Block *eb);
````// Initialize a new instance object inside the provided structure
ARGUMENTS
params — per-instance config params, or `NULL` to select default values (target-domain only)
eb — active error-handling block, or `NULL` to select default policy (target-domain only)
SEE
BufferPacketizer.Params

Instance Deletion |

index URL

`C` synopsis | target-domain

````Void BufferPacketizer_delete(BufferPacketizer_Handle *handleP);
````// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
````Void BufferPacketizer_destruct(BufferPacketizer_Struct *structP);
````// Finalize the instance object inside the provided structure

BufferPacketizer_disable() // instance |

index URL

Disable a log

`C` synopsis | target-domain

````Bool BufferPacketizer_disable(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
DETAILS
Events written to a disabled log are silently discarded.
RETURNS
The function returns the state of the packet upload (`TRUE` if enabled, `FALSE` if disabled) before the call. This return value allows clients to restore the previous state. Note: not thread safe.
The function returns the state of the log (`TRUE` if enabled, `FALSE` if disabled) before the call. That allow clients to restore the previous state.

BufferPacketizer_enable() // instance |

index URL

Enable a log

`C` synopsis | target-domain

````Bool BufferPacketizer_enable(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
RETURNS
The function returns the state of the packet upload (`TRUE` if enabled, `FALSE` if disabled) before the call. This return value allows clients to restore the previous state. Note: not thread safe.
The function returns the state of the log (`TRUE` if enabled, `FALSE` if disabled) before the call. That allow clients to restore the previous state.

BufferPacketizer_enableDebugMessages() // instance |

index URL

`C` synopsis | target-domain

````Void BufferPacketizer_enableDebugMessages(BufferPacketizer_Handle handle, Bool enable);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_getTransferType() // instance |

index URL

`C` synopsis | target-domain

````IUIAPacketTransfer_TransferType BufferPacketizer_getTransferType(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_getUnsentSize() // instance |

index URL

Determines how much unsent data is left to send (in Maus)

`C` synopsis | target-domain

````SizeT BufferPacketizer_getUnsentSize(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_init() // instance |

index URL

`C` synopsis | target-domain

````Bool BufferPacketizer_init(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
NODOC
Used internally to initialize data structures as part of prime function

BufferPacketizer_isEmpty() // instance |

index URL

Returns true if the transfer buffer has no unread data

`C` synopsis | target-domain

````Bool BufferPacketizer_isEmpty(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
RETURN
true if no unread data

BufferPacketizer_isFirstPacketFlagSet() // instance |

index URL

`C` synopsis | target-domain

````Bool BufferPacketizer_isFirstPacketFlagSet(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_poll() // instance |

index URL

Check if data is ready and, if so, trigger buffer exchange to send the data as packets. Call readyToSend after this call to check if there is data available to send

`C` synopsis | target-domain

````UInt32 BufferPacketizer_poll(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
RETURNS
0 if success, else error code

BufferPacketizer_prime() // instance |

index URL

If PrimeFxn is not set the user must call prime with the first packet

`C` synopsis | target-domain

````Bool BufferPacketizer_prime(BufferPacketizer_Handle handle, Ptr packetBuffer);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_readyToSend() // instance |

index URL

check to see if the ETB drain buffer contains unsent data. If true, call transferData API to send the data

`C` synopsis | target-domain

````Bool BufferPacketizer_readyToSend(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
RETURNS
TRUE if there is unsent data.

BufferPacketizer_sendPacket() // instance |

index URL

calls the exchangeFxn with the next packet payload of data

`C` synopsis | target-domain

````Void BufferPacketizer_sendPacket(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object

BufferPacketizer_setBufferToUpload() // instance |

index URL

Assigns a buffer to upload to System Analyzer (in Maus)

`C` synopsis | target-domain

````Bool BufferPacketizer_setBufferToUpload(BufferPacketizer_Handle handle, UInt32 *pBuffer, UInt32 bufferSizeInWords, Ptr pUploaderContext);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
DETAILS
Returns false if another buffer is already being uploaded.

BufferPacketizer_transferData() // instance |

index URL

Read and Transfer ETB data move the binary data to PC host via event packets for further decoding and analysis

`C` synopsis | target-domain

````Bool BufferPacketizer_transferData(BufferPacketizer_Handle handle, UInt32 maxNumPackets);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
maxNumPackets — maximum number of packets to send in context of this API call
maximum number of packets to send in context of this API call

BufferPacketizer_transferSTMConfig() // instance |

index URL

`C` synopsis | target-domain

````Void BufferPacketizer_transferSTMConfig(BufferPacketizer_Handle handle);
ARGUMENTS
handle — handle of a previously-created `BufferPacketizer` instance object
NODOC
Status of the STM - this is required to decode the compressed data

Instance Convertors |

index URL

`C` synopsis | target-domain

````IUIAPacketTransfer_Handle BufferPacketizer_Handle_upCast(BufferPacketizer_Handle handle);
````// unconditionally move one level up the inheritance hierarchy
````BufferPacketizer_Handle BufferPacketizer_Handle_downCast(IUIAPacketTransfer_Handle handle);
````// conditionally move one level down the inheritance hierarchy; NULL upon failure

Instance Built-Ins |

index URL

`C` synopsis | target-domain

````Int BufferPacketizer_Object_count();
````// The number of statically-created instance objects
````BufferPacketizer_Handle BufferPacketizer_Object_get(BufferPacketizer_Object *array, Int i);
````// The handle of the i-th statically-created instance object (array == NULL)
````BufferPacketizer_Handle BufferPacketizer_Object_first();
````// The handle of the first dynamically-created instance object, or NULL
````BufferPacketizer_Handle BufferPacketizer_Object_next(BufferPacketizer_Handle handle);
````// The handle of the next dynamically-created instance object, or NULL
````IHeap_Handle BufferPacketizer_Object_heap();
````// The heap used to allocate dynamically-created instance objects
````Types_Label *BufferPacketizer_Handle_label(BufferPacketizer_Handle handle, Types_Label *buf);
````// The label associated with this instance object
````String BufferPacketizer_Handle_name(BufferPacketizer_Handle handle);
````// The name of this instance object

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

``var BufferPacketizer = xdc.useModule('ti.uiactools.runtime.BufferPacketizer');
module-wide constants & types
`` ``values of type BufferPacketizer.BufferType// Used to specify the type of ETB to drain
`` `` const BufferPacketizer.BufferType_MEMORY;
`` `` const BufferPacketizer.BufferType_CPUTRACE_ETB;
`` `` const BufferPacketizer.BufferType_STM_ETB;
`` ``values of type BufferPacketizer.TransferType//
`` `` const BufferPacketizer.TransferType_RELIABLE;
`` `` const BufferPacketizer.TransferType_LOSSY;
`` ``values of type BufferPacketizer.TransportType// Used to specify the type of transport to use
`` `` const BufferPacketizer.TransportType_UART;
`` `` const BufferPacketizer.TransportType_USB;
`` `` const BufferPacketizer.TransportType_UDP;
`` `` const BufferPacketizer.TransportType_TCP;
`` `` const BufferPacketizer.TransportType_CUSTOM;
module-wide config parameters
`` ``BufferPacketizer.customTransportType// Custom transport used to send the records to an instrumentation host = String "None";
`` ``BufferPacketizer.transportType// Transport used to send the records to an instrumentation host = BufferPacketizer.TransportType BufferPacketizer.TransportType_UDP;
`` ``BufferPacketizer.common$// Common module configuration parameters = Types.Common$ undefined;
per-instance config parameters
`` ``var params = new BufferPacketizer.Params// Instance config-params object;
`` `` params.bufferType// Specifies the type of data that is being uploaded so that it can be properly decoded on the host = BufferPacketizer.BufferType BufferPacketizer.BufferType_STM_ETB;
`` `` params.endpointNumber// sender ID to insert in UIAPacket header Set to 0xFF if this should be set to DNUM (C6X only) = Bits16 0xFF;
`` `` params.etbCoreId// the ID for the core that the ETB services = UInt8 0xFF;
`` `` params.exchangeFxn// Function pointer to the exchange function = Ptr(*)(Ptr,Ptr) null;
`` `` params.packetSizeInMAUs// Number of minimum addressable units (e.g. bytes) in the trace event packet buffer = SizeT 1400;
`` `` params.primeFxn// Function pointer to the prime function = Ptr(*)(Ptr) null;
`` `` params.transferType// = IUIAPacketTransfer.TransferType IUIAPacketTransfer.TransferType_LOSSY;
per-instance creation
`` ``var inst = BufferPacketizer.create// Create an instance-object(params);

enum BufferPacketizer.BufferType |

index URL

Used to specify the type of ETB to drain

`XDCscript` usage | meta-domain

````values of type BufferPacketizer.BufferType
```` const BufferPacketizer.BufferType_MEMORY;
```` const BufferPacketizer.BufferType_CPUTRACE_ETB;
```` const BufferPacketizer.BufferType_STM_ETB;
DETAILS
This enum is used by the instrumentation host to determine what the ETB type is.
C SYNOPSIS
BufferPacketizer_BufferType

enum BufferPacketizer.TransferType |

index URL

`XDCscript` usage | meta-domain

````values of type BufferPacketizer.TransferType
```` const BufferPacketizer.TransferType_RELIABLE;
```` const BufferPacketizer.TransferType_LOSSY;
C SYNOPSIS
BufferPacketizer_TransferType

enum BufferPacketizer.TransportType |

index URL

Used to specify the type of transport to use

`XDCscript` usage | meta-domain

````values of type BufferPacketizer.TransportType
```` const BufferPacketizer.TransportType_UART;
```` const BufferPacketizer.TransportType_USB;
```` const BufferPacketizer.TransportType_UDP;
```` const BufferPacketizer.TransportType_TCP;
```` const BufferPacketizer.TransportType_CUSTOM;
DETAILS
This enum is used by the instrumentation host to determine what the transport is. It is not used by the target code.
C SYNOPSIS
BufferPacketizer_TransportType

config BufferPacketizer.customTransportType // module-wide |

index URL

Custom transport used to send the records to an instrumentation host

`XDCscript` usage | meta-domain

````BufferPacketizer.customTransportType = String "None";
DETAILS
If the desired transport is not in the `TransportType` enum, and `transportType` is set to `TransportType_CUSTOM`, this parameter must be filled in with the correct transport name.
If `transportType` is NOT set to `TransportType_CUSTOM`, this parameter is ignored.
C SYNOPSIS
BufferPacketizer_customTransportType

config BufferPacketizer.transportType // module-wide |

index URL

Transport used to send the records to an instrumentation host

`XDCscript` usage | meta-domain

````BufferPacketizer.transportType = BufferPacketizer.TransportType BufferPacketizer.TransportType_UDP;
DETAILS
This parameter is used to specify the transport that the `exchangeFxn` function will use to send the buffer to an instrumentation host (e.g. System Analyzer in CCS).
This parameter is placed into the generated UIA XML file. The instrumentation host can use the XML file to help it auto-detect as much as possible and act accordingly.
If the desired transport is not in the `TransportType` enum, select `TransportType_CUSTOM` and set the `customTransport` string with the desired string.
C SYNOPSIS
BufferPacketizer_transportType

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

index URL

Common module configuration parameters

`XDCscript` usage | meta-domain

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

Instance Config Parameters |

index URL

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
````// Instance config-params object
```` params.bufferType = BufferPacketizer.BufferType BufferPacketizer.BufferType_STM_ETB;
```` // Specifies the type of data that is being uploaded so that it can be properly decoded on the host
```` params.endpointNumber = Bits16 0xFF;
```` // sender ID to insert in UIAPacket header Set to 0xFF if this should be set to DNUM (C6X only)
```` params.etbCoreId = UInt8 0xFF;
```` // the ID for the core that the ETB services
```` params.exchangeFxn = Ptr(*)(Ptr,Ptr) null;
```` // Function pointer to the exchange function
```` params.packetSizeInMAUs = SizeT 1400;
```` // Number of minimum addressable units (e.g. bytes) in the trace event packet buffer
```` params.primeFxn = Ptr(*)(Ptr) null;
```` // Function pointer to the prime function
```` params.transferType = IUIAPacketTransfer.TransferType IUIAPacketTransfer.TransferType_LOSSY;
```` //

config BufferPacketizer.bufferType // instance |

index URL

Specifies the type of data that is being uploaded so that it can be properly decoded on the host

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.bufferType = BufferPacketizer.BufferType BufferPacketizer.BufferType_STM_ETB;
C SYNOPSIS
null

config BufferPacketizer.endpointNumber // instance |

index URL

sender ID to insert in UIAPacket header Set to 0xFF if this should be set to DNUM (C6X only)

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.endpointNumber = Bits16 0xFF;
C SYNOPSIS
null

config BufferPacketizer.etbCoreId // instance |

index URL

the ID for the core that the ETB services

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.etbCoreId = UInt8 0xFF;
DETAILS
For STM (default), use 0xFF
C SYNOPSIS
null

config BufferPacketizer.exchangeFxn // instance |

index URL

Function pointer to the exchange function

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.exchangeFxn = Ptr(*)(Ptr,Ptr) null;
DETAILS
exchange function must return a pointer to a buffer that is word aligned, initialized with a UIA header and the correct size. This is called in the context of a log so generally the exchange function should be quick to execute.
C SYNOPSIS
null

config BufferPacketizer.packetSizeInMAUs // instance |

index URL

Number of minimum addressable units (e.g. bytes) in the trace event packet buffer

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.packetSizeInMAUs = SizeT 1400;
DETAILS
NOTE: the packet size must contain an integer number of 32b words (e.g. if a MAU = 1 byte, then the packet size must be a multiple of 4).
C SYNOPSIS
null

config BufferPacketizer.primeFxn // instance |

index URL

Function pointer to the prime function

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.primeFxn = Ptr(*)(Ptr) null;
C SYNOPSIS
null

config BufferPacketizer.transferType // instance |

index URL

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
```` ...
````params.transferType = IUIAPacketTransfer.TransferType IUIAPacketTransfer.TransferType_LOSSY;
C SYNOPSIS
null

Instance Creation |

index URL

`XDCscript` usage | meta-domain

````var params = new BufferPacketizer.Params;
````// Allocate instance config-params
````params.config = ...
````// Assign individual configs
````var inst = BufferPacketizer.create(params);
````// Create an instance-object
ARGUMENTS
params — per-instance config params, or `NULL` to select default values (target-domain only)
eb — active error-handling block, or `NULL` to select default policy (target-domain only)
SEE
BufferPacketizer.Params
generated on Wed, 27 Jun 2012 04:11:41 GMT