| enum BufferPacketizer_BufferType |
 |
Used to specify the type of ETB to drain
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 |
 |
typedef enum BufferPacketizer_TransferType {
BufferPacketizer_TransferType_RELIABLE,
BufferPacketizer_TransferType_LOSSY
} BufferPacketizer_TransferType;
| enum BufferPacketizer_TransportType |
 |
Used to specify the type of transport to use
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 |
 |
Typedef for the exchange function pointer
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 |
 |
Typedef for the exchange function pointer
typedef Ptr (*BufferPacketizer_PrimeFxnType)(Ptr);
VALUES
Ptr
first pointer is for the object instance handle
| config BufferPacketizer_customTransportType // module-wide |
 |
Custom transport used to send the records to an instrumentation host
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 |
 |
Transport used to send the records to an instrumentation host
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 |
 |
Initializes the UIA trace packet header
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 |
 |
// Get this module's unique id
Bool BufferPacketizer_Module_startupDone();
// Test if this module has completed startup
// 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 |
 |
typedef struct BufferPacketizer_Object BufferPacketizer_Object;
// Opaque internal representation of an instance object
// Client reference to an instance object
typedef struct BufferPacketizer_Struct BufferPacketizer_Struct;
// Opaque client structure large enough to hold an instance object
// Convert this instance structure pointer into an instance handle
// Convert this instance handle into an instance structure pointer
| Instance Config Parameters |
 |
typedef struct BufferPacketizer_Params {
// Instance config-params structure
// Common per-instance configs
// 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
// Function pointer to the exchange function
SizeT packetSizeInMAUs;
// Number of minimum addressable units (e.g. bytes) in the trace event packet buffer
// Function pointer to the prime function
//
} BufferPacketizer_Params;
// Initialize this config-params structure with supplier-specified defaults before instance creation
| config BufferPacketizer_bufferType // instance |
 |
Specifies the type of data that is being uploaded
so that it can be properly decoded on the host
| config BufferPacketizer_endpointNumber // instance |
 |
sender ID to insert in UIAPacket header
Set to 0xFF if this should be set to DNUM (C6X only)
...
Bits16 endpointNumber;
| config BufferPacketizer_etbCoreId // instance |
 |
the ID for the core that the ETB services
DETAILS
For STM (default), use 0xFF
| config BufferPacketizer_exchangeFxn // instance |
 |
Function pointer to the exchange function
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 |
 |
Number of minimum addressable units (e.g. bytes) in the trace event packet buffer
...
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 |
 |
Function pointer to the prime function
| config BufferPacketizer_transferType // instance |
 |
| Instance Creation |
 |
// Allocate and initialize a new instance object and return its handle
// 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
| Instance Deletion |
 |
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
// Finalize the instance object inside the provided structure
| BufferPacketizer_disable() // instance |
 |
Disable a log
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 |
 |
Enable a log
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 |
 |
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_getTransferType() // instance |
 |
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_getUnsentSize() // instance |
 |
Determines how much unsent data is left to send (in Maus)
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_init() // instance |
 |
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 |
 |
Returns true if the transfer buffer has no unread data
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
RETURN
true if no unread data
| BufferPacketizer_isFirstPacketFlagSet() // instance |
 |
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_poll() // instance |
 |
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
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
RETURNS
0 if success, else error code
| BufferPacketizer_prime() // instance |
 |
If PrimeFxn is not set the user must call prime with the first packet
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_readyToSend() // instance |
 |
check to see if the ETB drain buffer contains unsent data.
If true, call transferData API to send the data
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
RETURNS
TRUE if there is unsent data.
| BufferPacketizer_sendPacket() // instance |
 |
calls the exchangeFxn with the next packet payload of data
ARGUMENTS
handle
handle of a previously-created BufferPacketizer instance object
| BufferPacketizer_setBufferToUpload() // instance |
 |
Assigns a buffer to upload to System Analyzer (in Maus)
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 |
 |
Read and Transfer ETB data
move the binary data to PC host via event packets for further
decoding and analysis
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 |
 |
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 |
 |
// unconditionally move one level up the inheritance hierarchy
// conditionally move one level down the inheritance hierarchy; NULL upon failure
| Instance Built-Ins |
 |
Int BufferPacketizer_Object_count();
// The number of statically-created instance objects
// The handle of the i-th statically-created instance object (array == NULL)
// The handle of the first dynamically-created instance object, or NULL
// The handle of the next dynamically-created instance object, or NULL
// The heap used to allocate dynamically-created instance objects
// The label associated with this instance object
// The name of this instance object
| enum BufferPacketizer.BufferType |
 |
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
| enum BufferPacketizer.TransferType |
 |
| XDCscript usage |
meta-domain |
values of type BufferPacketizer.TransferType
const BufferPacketizer.TransferType_RELIABLE;
const BufferPacketizer.TransferType_LOSSY;
C SYNOPSIS
| enum BufferPacketizer.TransportType |
 |
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
| config BufferPacketizer.customTransportType // module-wide |
 |
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
| config BufferPacketizer.transportType // module-wide |
 |
Transport used to send the records to an instrumentation host
| XDCscript usage |
meta-domain |
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
| metaonly config BufferPacketizer.common$ // module-wide |
 |
Common module configuration parameters
| XDCscript usage |
meta-domain |
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 |
 |
| XDCscript usage |
meta-domain |
var params = new BufferPacketizer.Params;
// Instance config-params object
// 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
//
| config BufferPacketizer.bufferType // instance |
 |
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;
...
C SYNOPSIS
| config BufferPacketizer.endpointNumber // instance |
 |
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
| config BufferPacketizer.etbCoreId // instance |
 |
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
| config BufferPacketizer.exchangeFxn // instance |
 |
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
| config BufferPacketizer.packetSizeInMAUs // instance |
 |
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
| config BufferPacketizer.primeFxn // instance |
 |
Function pointer to the prime function
| XDCscript usage |
meta-domain |
var params = new BufferPacketizer.Params;
...
params.primeFxn = Ptr(*)(Ptr) null;
C SYNOPSIS
| config BufferPacketizer.transferType // instance |
 |
| XDCscript usage |
meta-domain |
var params = new BufferPacketizer.Params;
...
C SYNOPSIS
| Instance Creation |
 |
| 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