module ti.uiactools.runtime.LoggerSTM |  |  |

index URL

A logger which writes `Log` events to the System Trace Module (STM)

- C synopsis
- Individual elements
- DETAILS
- EXAMPLES
- XDCscript usage
- Individual elements

This module provides a logger which writes `Log` events to the System Trace Module in realtime. The `Log` events stored in the buffer are unformatted; `Log` event formatting is deferred until some client reads the raw event data from the buffer. [ more ... ]

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

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

Functions
``Void | LoggerSTM_construct// Initialize a new instance object inside the provided structure(LoggerSTM_Struct *structP, const LoggerSTM_Params *params, Error_Block *eb);
``LoggerSTM_Handle | LoggerSTM_create// Allocate and initialize a new instance object and return its handle(const LoggerSTM_Params *params, Error_Block *eb);
``Void | LoggerSTM_delete// Finalize and free this previously allocated instance object, setting the referenced handle to NULL(LoggerSTM_Handle *handleP);
``Void | LoggerSTM_destruct// Finalize the instance object inside the provided structure(LoggerSTM_Struct *structP);
``macro Int32 | LoggerSTM_getOSTHeader// returns the OST Header to use as the first word of the STM event(Int numBytes);
``Ptr | LoggerSTM_getSTMBaseAdrs// Gets the STM base address (STM channel 0) that events are to be written to();
``Bits8 | LoggerSTM_getSTMChannelRangeMax// Gets the highest STM channel number that events are to be written to(LoggerSTM_Handle handle);
``Bits8 | LoggerSTM_getSTMChannelRangeMin// Gets the lowest STM channel number that events are to be written to(LoggerSTM_Handle handle);
``Void | LoggerSTM_Params_init// Initialize this config-params structure with supplier-specified defaults before instance creation(LoggerSTM_Params *params);
``Void | LoggerSTM_printToSTM// Helper function that prints formatted strings to STM(Int chanNum, Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8);
``Void | LoggerSTM_setProcessId// Sets the active process ID to log with the event (default is 0)(UInt32 processId);
``Void | LoggerSTM_setSTMBaseAdrs// Sets the base address (STM channel 0) that events are to be written to(Ptr adrs);
``Void | LoggerSTM_setSTMChannelRangeMax// Sets the highest STM channel number that events are to be written to(LoggerSTM_Handle handle, Bits8 chanNum);
``Void | LoggerSTM_setSTMChannelRangeMin// Sets the lowest STM channel number that events are to be written to(LoggerSTM_Handle handle, Bits8 chanNum);
Functions common to all ILogger modules
``Bool | LoggerSTM_disable// Disable a log(LoggerSTM_Handle handle);
``Bool | LoggerSTM_enable// Enable a log(LoggerSTM_Handle handle);
``Void | LoggerSTM_write0// Process a log event with 0 arguments(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid);
``Void | LoggerSTM_write1// Process a log event with 1 argument(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1);
``Void | LoggerSTM_write2// Process a log event with 2 arguments(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2);
``Void | LoggerSTM_write4// Process a log event with 4 arguments(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4);
``Void | LoggerSTM_write8// Process a log event with 8 arguments(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8);
Functions common to all IUIATransfer modules
``Bool | LoggerSTM_getContents// Fills buffer that is passed in with unread data, up to size bytes in length(LoggerSTM_Handle handle, Ptr hdrBuf, SizeT size, SizeT *cpSize);
``UInt16 | LoggerSTM_getInstanceId// Returns an ID value that uniquely identifies this instance of the logger(LoggerSTM_Handle handle);
``SizeT | LoggerSTM_getMaxLength// (LoggerSTM_Handle handle);
``IUIATransfer_TransferType | LoggerSTM_getTransferType// (LoggerSTM_Handle handle);
``Bool | LoggerSTM_isEmpty// Returns true if the transfer buffer has no unread data(LoggerSTM_Handle handle);
``Void | LoggerSTM_reset// Reset a log to empty state and enable it(LoggerSTM_Handle handle);
Functions common to all IFilterLogger modules
``Diags_Mask | LoggerSTM_getFilterLevel// Returns the mask of diags categories currently set to the specified level(LoggerSTM_Handle handle, Diags_EventLevel level);
``Void | LoggerSTM_setFilterLevel// Sets the level of detail that instances will log(LoggerSTM_Handle handle, Diags_Mask mask, Diags_EventLevel filterLevel);
Functions common to all ILoggerSnapshot modules
``Void | LoggerSTM_writeMemoryRange// Process a log a snapshot of a range of memory values (e.g. array values, memory mapped registers, strings, etc.)(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, UInt32 snapshotId, IArg fileName, IArg LineNum, IArg fmt, IArg startAdrs, UInt32 lengthInMAUs);
Functions common to all target instances
| LoggerSTM_handle// Convert this instance structure pointer into an instance handle, LoggerSTM_Handle_downCast// conditionally move one level down the inheritance hierarchy; NULL upon failure, LoggerSTM_Handle_downCast2// conditionally move 2 levels down the inheritance hierarchy; NULL upon failure, LoggerSTM_Handle_downCast3// conditionally move 3 levels down the inheritance hierarchy; NULL upon failure, LoggerSTM_Handle_downCast4// conditionally move 4 levels down the inheritance hierarchy; NULL upon failure, LoggerSTM_Handle_label// The label associated with this instance object, LoggerSTM_Handle_name// The name of this instance object, LoggerSTM_Handle_upCast// unconditionally move one level up the inheritance hierarchy, LoggerSTM_Handle_upCast2// unconditionally move 2 levels up the inheritance hierarchy, LoggerSTM_Handle_upCast3// unconditionally move 3 levels up the inheritance hierarchy, LoggerSTM_Handle_upCast4// unconditionally move 4 levels up the inheritance hierarchy, LoggerSTM_Object_count// The number of statically-created instance objects, LoggerSTM_Object_first// The handle of the first dynamically-created instance object, or NULL, LoggerSTM_Object_get// The handle of the i-th statically-created instance object (array == NULL), LoggerSTM_Object_heap// The heap used to allocate dynamically-created instance objects, LoggerSTM_Object_next// The handle of the next dynamically-created instance object, or NULL, LoggerSTM_struct// Convert this instance handle into an instance structure pointer
Functions common to all target modules
| LoggerSTM_Module_getMask// Returns the diagnostics mask for this module, LoggerSTM_Module_hasMask// Test whether this module has a diagnostics mask, LoggerSTM_Module_heap// The heap from which this module allocates memory, LoggerSTM_Module_id// Get this module's unique id, LoggerSTM_Module_setMask// Set the diagnostics mask for this module, LoggerSTM_Module_startupDone// Test if this module has completed startup
Typedefs
``typedef LoggerSTM_Object * | LoggerSTM_Handle// Client reference to an instance object;
``typedef struct | LoggerSTM_Object// Opaque internal representation of an instance object LoggerSTM_Object;
``typedef struct | LoggerSTM_Params// Instance config-params structure ...
``typedef struct | LoggerSTM_Struct// Opaque client structure large enough to hold an instance object LoggerSTM_Struct;
``typedef enum | LoggerSTM_TransferType// ...
Constants
``extern const UInt16 | LoggerSTM_endpointId// Endpoint ID for the CPU that is logging the event;
``extern const Bool | LoggerSTM_filterByLevel// Support filtering of events by event level;
``extern const Bool | LoggerSTM_isGenerateSTMLibSupportFnsEnabled// Configures whether helper functions required by STMLib are automatically generated (default) or not;
``extern const Bool | LoggerSTM_isStringOutputModeEnabled// if true, events are logged to STM as strings instead of raw UIA data. Only enable this mode if not using System Analyzer to analyze and display events;
``extern const Diags_Mask | LoggerSTM_level1Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL1;
``extern const Diags_Mask | LoggerSTM_level2Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL2;
``extern const Diags_Mask | LoggerSTM_level3Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL3;
``extern const Diags_Mask | LoggerSTM_level4Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL4;
``extern const Ptr | LoggerSTM_stmBaseAdrs// Base address for the STM channel that events are to be written to;
``extern const Int | LoggerSTM_stmChannelResolution// Base address for the STM channel that events are to be written to;

DETAILS
This module provides a logger which writes `Log` events to the System Trace Module in realtime. The `Log` events stored in the buffer are unformatted; `Log` event formatting is deferred until some client reads the raw event data from the buffer.
EXAMPLES
Configuration Example 1: The following XDC configuration script statements show how to use the ti.uiactools.sysbios.LoggingSetupSTM module to enable instrumentation for SysBIOS modules, with the resulting UIA software events being logged to System Trace as STM software messages:

     var LoggerSTM = xdc.useModule('ti.uiactools.runtime.LoggerSTM');
     LoggerSTM.TimestampProxy = xdc.useModule('xdc.runtime.Timestamp');

     // The following stmBaseAdrs setting is valid for C66X devices only.
     // For other devices, please check the device's Technical Reference / Data
     // Manual for the STM base address.

     LoggerSTM.stmBaseAdrs = 0x20000000;
     LoggerSTM.stmChannelResolution = 0x1000;

     LoggerSTM.isStringOutputModeEnabled = false;

     // If you wish to provide a custom memory allocation
     // procedure for use by LoggerSTM and stmLib, you should
     // set the following to false.  You will then need to provide
     // your own implementation of the following helper functions:
     // void * cTools_memAlloc(size_t sizeInBytes);
     // void cTools_memFree(void * ptr);
     // void * cTools_memMap(unsigned int phyAddr, unsigned int mapSizeInBytes);
     // void cTools_memUnMap(void * vAddr, unsigned int mapSizeInBytes);
     //
     // See ti.uiactools.runtime.LoggerSTM.xdt for the default implementation
     // of these functions.

     LoggerSTM.isGenerateSTMLibSupportFnsEnabled = true;

     // Configure which STM channels the messages are to be logged to.
     // The channel number is incremented (and wrapped around if necessary)
     // for each message so that, if the code logging the message is preempted
     // by another task that also needs to log a message, the messages can be
     // properly decoded by the host.
     // Typically, channel 200 is reserved for synchronization events.
     // (See the cdoc documentation for ti.uiactools.runtime.SyncSTM
     // for more information).

     var LoggerSTMParams = new LoggerSTM.Params;
     LoggerSTMParams.stmChannelRangeMin = 128;
     LoggerSTMParams.stmChannelRangeMax = 199;
     var loggerSTM0 = LoggerSTM.create(LoggerSTMParams);
     Program.global["loggerSTMInstStatic"] = loggerSTM0;

     //Configure the LogSnapshot module to log snapshot events
     //(e.g. dynamically allocated strings and memory ranges)
     //to STM
     var LogSnapshot = xdc.useModule('ti.uia.runtime.LogSnapshot');
     LogSnapshot.common$.logger = loggerSTM0;

     var LoggingSetup = xdc.useModule('ti.uiactools.sysbios.LoggingSetupSTM');
     LoggingSetup.logger = loggerSTM0;
     LoggingSetup.sysbiosTaskLogging = true;
     LoggingSetup.loadLogging = false;
     LoggingSetup.mainLogging = true;

     // The following lines enable correlation of STM events
     // with UIA software events:
     var LogSync = xdc.useModule('ti.uia.runtime.LogSync');
     LoggerSTMParams.stmChannelRangeMin = 200;
     LoggerSTMParams.stmChannelRangeMax = 200;
     var loggerSTMsync = LoggerSTM.create(LoggerSTMParams);
     LogSync.syncLogger = loggerSTMsync;

     // If correlation of STM events with UIA software events is not
     // required (e.g. to reduce the code footprint), the
     // above lines should be commented out and the following line
     // enabled:
     // LoggingSetup.disableMulticoreEventCorrelation = false;

Configuration Example 2: The following XDC configuration script statements create a logger instance, assign it as the default logger for all modules, and enable `USER1` logging in all modules of the package `my.pkg`. See the `Diags.setMaskMeta()` function for details on specifying the module names.

      var Defaults = xdc.useModule('xdc.runtime.Defaults');
      var Main = xdc.useModule('xdc.runtime.Main');
      var Diags = xdc.useModule('xdc.runtime.Diags');
      var LoggerSTM = xdc.useModule('ti.uiactools.runtime.LoggerSTM');

      // Configure LoggerSTM to log to channels 100-128.
      // (assumes that the device has the STM base address at the
      // default address of 0x20000000).
      var LoggerSTMParams = new LoggerSTM.Params();
      LoggerSTMParams.stmChannelRangeMin = 100;
      LoggerSTMParams.stmChannelRangeMax = 128;
      var loggerSTM0 = LoggerSTM.create(LoggerSTMParams);

      // Configure which modules are to log
      // events using the LoggerSTM instance that was created above.
      Main.common$.logger = loggerSTM0;
      Defaults.common$.logger = loggerSTM0;

      // Configure which event masks are enabled.
      Main.common$.Diags_USER1 = Diags.RUNTIME_ON;
      Main.common$.Diags_ANALYSIS = Diags.RUNTIME_ON;
      Diags.setMaskMeta("my.pkg.%", Diags.USER1, Diags.RUNTIME_ON);

The implementation of this logger is fast with minimal stack usage making it appropriate for a realtime application. This logger uses different STM channels for writing different numbers of parameters in order to avoid the need to have a header indicating the length in bytes of each event. As a result, the execution time of all `Log` methods bound to this type of logger are deterministic (and quite short) because there are no additional memory allocation calls required.
If this logger is used in a preemptive environment, then an appropriate gate must be assigned to the module. By default, the xdc.runtime.Gate module's system gate is used. The following configuration script shows how to configure a different gate:

      var LoggerSTM = xdc.useModule('ti.uiactools.runtime.LoggerSTM');
      LoggerSTM.common$.gate = ...some gate instance...

enum LoggerSTM_TransferType |

index URL

`C` synopsis | target-domain

````typedef enum LoggerSTM_TransferType {
```` LoggerSTM_TransferType_RELIABLE,
```` LoggerSTM_TransferType_LOSSY
````} LoggerSTM_TransferType;

config LoggerSTM_endpointId // module-wide |

index URL

Endpoint ID for the CPU that is logging the event

`C` synopsis | target-domain

````extern const UInt16 LoggerSTM_endpointId;
DETAILS
The endpointId corresponds to Ipc's MultiProc value.
For single processor systems this value is ignored. For C64P devices, leave this value as 0xFFFF to configure the logger to use the DNUM value as the endpointId.

config LoggerSTM_filterByLevel // module-wide |

index URL

Support filtering of events by event level

`C` synopsis | target-domain

````extern const Bool LoggerSTM_filterByLevel;
DETAILS
To improve logging performance, this feature can be disabled by setting `filterByLevel` to false.
See 'setFilterLevel' for an explanation of level filtering.

config LoggerSTM_isGenerateSTMLibSupportFnsEnabled // module-wide |

index URL

Configures whether helper functions required by STMLib are automatically generated (default) or not

`C` synopsis | target-domain

````extern const Bool LoggerSTM_isGenerateSTMLibSupportFnsEnabled;
DETAILS
if LoggerSTM.isGenerateSTMLibSupportFnsEnabled is true AND LoggerSTM.isGenerateSTMLibSupportFnsEnabled is false, the following helper functions required by STMLib are automatically generated by the LoggerSTM.xdt template: (see ti/ctools/stmLib/StmLibrary.h for details)

- cTools_memAlloc(size_t sizeInBytes);
- void * cTools_memMap(unsigned int phyAddr, unsigned int mapSizeInBytes);
- void cTools_memFree(void * ptr);
- void cTools_memUnmap(void * vAddr, unsigned int mapSizeInBytes);

If you wish to use STMLib directly, set this to false and provide implementations of the above functions in your application in order to handle memory allocation and mapping.

config LoggerSTM_isStringOutputModeEnabled // module-wide |

index URL

if true, events are logged to STM as strings instead of raw UIA data. Only enable this mode if not using System Analyzer to analyze and display events

`C` synopsis | target-domain

````extern const Bool LoggerSTM_isStringOutputModeEnabled;
DETAILS
Note that setting LoggerSTM.isStringOutputModeEnabled to true will require that your application implement the STMLib helper functions in order to properly provide memory management for STMLib. The LoggerSTM.isGenerateSTMLibSupportFnsEnabled will be forced to 'false' if LoggerSTM.isStringOutputModeEnabled is set to 'true'.
SEE
isGenerateSTMLibSupportFnsEnabled

config LoggerSTM_level1Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL1

`C` synopsis | target-domain

````extern const Diags_Mask LoggerSTM_level1Mask;
DETAILS
See 'level4Mask' for details.

config LoggerSTM_level2Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL2

`C` synopsis | target-domain

````extern const Diags_Mask LoggerSTM_level2Mask;
DETAILS
See 'level4Mask' for details.

config LoggerSTM_level3Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL3

`C` synopsis | target-domain

````extern const Diags_Mask LoggerSTM_level3Mask;
DETAILS
See 'level4Mask' for details.

config LoggerSTM_level4Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL4

`C` synopsis | target-domain

````extern const Diags_Mask LoggerSTM_level4Mask;
DETAILS
If 'filterByLevel' is true, then all LoggerBuf instances will filter incoming events based on their event level.
The LoggerCircBuf module allows for specifying a different filter level for every Diags bit. These filtering levels are module wide; LoggerBuf does not support specifying the levels on a per-instance basis.
The setFilterLevel API can be used to change the filtering levels at runtime.
The default filtering levels are assigned using the 'level1Mask' - 'level4Mask' config parameters. These are used to specify, for each of the four event levels, the set of bits which should filter at that level by default.
The default filtering configuration sets the filter level to Diags.LEVEL4 for all logging-related diags bits so that all events are logged by default.

config LoggerSTM_stmBaseAdrs // module-wide |

index URL

Base address for the STM channel that events are to be written to

`C` synopsis | target-domain

````extern const Ptr LoggerSTM_stmBaseAdrs;

config LoggerSTM_stmChannelResolution // module-wide |

index URL

Base address for the STM channel that events are to be written to

`C` synopsis | target-domain

````extern const Int LoggerSTM_stmChannelResolution;

LoggerSTM_getOSTHeader() // module-wide |

index URL

returns the OST Header to use as the first word of the STM event

`C` synopsis | target-domain

````macro Int32 LoggerSTM_getOSTHeader(Int numBytes);
DETAILS
param(numBytes) number of bytes in the event, not including the OST header itself (max 255)

LoggerSTM_getSTMBaseAdrs() // module-wide |

index URL

Gets the STM base address (STM channel 0) that events are to be written to

`C` synopsis | target-domain

````Ptr LoggerSTM_getSTMBaseAdrs();

LoggerSTM_printToSTM() // module-wide |

index URL

Helper function that prints formatted strings to STM

`C` synopsis | target-domain

````Void LoggerSTM_printToSTM(Int chanNum, Log_Event evt, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8);

LoggerSTM_setProcessId() // module-wide |

index URL

Sets the active process ID to log with the event (default is 0)

`C` synopsis | target-domain

````Void LoggerSTM_setProcessId(UInt32 processId);

LoggerSTM_setSTMBaseAdrs() // module-wide |

index URL

Sets the base address (STM channel 0) that events are to be written to

`C` synopsis | target-domain

````Void LoggerSTM_setSTMBaseAdrs(Ptr adrs);
ARGUMENTS
adrs — the STM base address (STM channel 0) that events are to be written to

Module-Wide Built-Ins |

index URL

`C` synopsis | target-domain

````Types_ModuleId LoggerSTM_Module_id();
````// Get this module's unique id
````Bool LoggerSTM_Module_startupDone();
````// Test if this module has completed startup
````IHeap_Handle LoggerSTM_Module_heap();
````// The heap from which this module allocates memory
````Bool LoggerSTM_Module_hasMask();
````// Test whether this module has a diagnostics mask
````Bits16 LoggerSTM_Module_getMask();
````// Returns the diagnostics mask for this module
````Void LoggerSTM_Module_setMask(Bits16 mask);
````// Set the diagnostics mask for this module

Instance Object Types |

index URL

`C` synopsis | target-domain

````typedef struct LoggerSTM_Object LoggerSTM_Object;
````// Opaque internal representation of an instance object
````typedef LoggerSTM_Object *LoggerSTM_Handle;
````// Client reference to an instance object
````typedef struct LoggerSTM_Struct LoggerSTM_Struct;
````// Opaque client structure large enough to hold an instance object
````LoggerSTM_Handle LoggerSTM_handle(LoggerSTM_Struct *structP);
````// Convert this instance structure pointer into an instance handle
````LoggerSTM_Struct *LoggerSTM_struct(LoggerSTM_Handle handle);
````// Convert this instance handle into an instance structure pointer

Instance Config Parameters |

index URL

`C` synopsis | target-domain

````typedef struct LoggerSTM_Params {
````// Instance config-params structure
```` IInstance_Params *instance;
```` // Common per-instance configs
```` Bool enabled;
```` // controls whether logging is enabled or disabled
```` SizeT maxEventSize;
```` // The maximum event size (in Maus) that can be written with a single event
```` Bits8 stmChannelRangeMax;
```` // The highest STM channel number that events are to be written to
```` Bits8 stmChannelRangeMin;
```` // The lowest STM channel number that events are to be written to
```` IUIATransfer_TransferType transferType;
```` //
````} LoggerSTM_Params;
````Void LoggerSTM_Params_init(LoggerSTM_Params *params);
````// Initialize this config-params structure with supplier-specified defaults before instance creation

config LoggerSTM_enabled // instance |

index URL

controls whether logging is enabled or disabled

`C` synopsis | target-domain

````struct LoggerSTM_Params {
```` ...
```` Bool enabled;

config LoggerSTM_maxEventSize // instance |

index URL

The maximum event size (in Maus) that can be written with a single event

`C` synopsis | target-domain

````struct LoggerSTM_Params {
```` ...
```` SizeT maxEventSize;
DETAILS
Note: must be smaller than 240 due to STM small block size limitation. Must also be an integer multiple of sizeof(UInt32).

config LoggerSTM_stmChannelRangeMax // instance |

index URL

The highest STM channel number that events are to be written to

`C` synopsis | target-domain

````struct LoggerSTM_Params {
```` ...
```` Bits8 stmChannelRangeMax;

config LoggerSTM_stmChannelRangeMin // instance |

index URL

The lowest STM channel number that events are to be written to

`C` synopsis | target-domain

````struct LoggerSTM_Params {
```` ...
```` Bits8 stmChannelRangeMin;

config LoggerSTM_transferType // instance |

index URL

`C` synopsis | target-domain

````struct LoggerSTM_Params {
```` ...
```` IUIATransfer_TransferType transferType;

Instance Creation |

index URL

`C` synopsis | target-domain

````LoggerSTM_Handle LoggerSTM_create(const LoggerSTM_Params *params, Error_Block *eb);
````// Allocate and initialize a new instance object and return its handle
````Void LoggerSTM_construct(LoggerSTM_Struct *structP, const LoggerSTM_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
LoggerSTM.Params

Instance Deletion |

index URL

`C` synopsis | target-domain

````Void LoggerSTM_delete(LoggerSTM_Handle *handleP);
````// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
````Void LoggerSTM_destruct(LoggerSTM_Struct *structP);
````// Finalize the instance object inside the provided structure

LoggerSTM_disable() // instance |

index URL

Disable a log

`C` synopsis | target-domain

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

LoggerSTM_enable() // instance |

index URL

Enable a log

`C` synopsis | target-domain

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

LoggerSTM_getContents() // instance |

index URL

Fills buffer that is passed in with unread data, up to size bytes in length

`C` synopsis | target-domain

````Bool LoggerSTM_getContents(LoggerSTM_Handle handle, Ptr hdrBuf, SizeT size, SizeT *cpSize);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
hdrBuf — Ptr to a buffer that is at least <size> bytes in length
size — The max number of bytes to be read into the buffer
cpSize — The number of bytes actually copied
DETAILS
The logger is responsible for ensuring that no partial event records are stored in the buffer. Bytes are in target endianness.
RETURN
returns false if logger has no more records to read

LoggerSTM_getFilterLevel() // instance |

index URL

Returns the mask of diags categories currently set to the specified level

`C` synopsis | target-domain

````Diags_Mask LoggerSTM_getFilterLevel(LoggerSTM_Handle handle, Diags_EventLevel level);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
See 'setFilterLevel' for an explanation of level filtering.
See 'setFilterLevel' for an explanation of level filtering.

LoggerSTM_getInstanceId() // instance |

index URL

Returns an ID value that uniquely identifies this instance of the logger

`C` synopsis | target-domain

````UInt16 LoggerSTM_getInstanceId(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
Note that a value of 0 is reserved to indicate that the instance ID has not been initialized yet and a unique value needs to be generated.

LoggerSTM_getMaxLength() // instance |

index URL

`C` synopsis | target-domain

````SizeT LoggerSTM_getMaxLength(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_getSTMChannelRangeMax() // instance |

index URL

Gets the highest STM channel number that events are to be written to

`C` synopsis | target-domain

````Bits8 LoggerSTM_getSTMChannelRangeMax(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_getSTMChannelRangeMin() // instance |

index URL

Gets the lowest STM channel number that events are to be written to

`C` synopsis | target-domain

````Bits8 LoggerSTM_getSTMChannelRangeMin(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_getTransferType() // instance |

index URL

`C` synopsis | target-domain

````IUIATransfer_TransferType LoggerSTM_getTransferType(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_isEmpty() // instance |

index URL

Returns true if the transfer buffer has no unread data

`C` synopsis | target-domain

````Bool LoggerSTM_isEmpty(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
RETURN
true if no unread data

LoggerSTM_reset() // instance |

index URL

Reset a log to empty state and enable it

`C` synopsis | target-domain

````Void LoggerSTM_reset(LoggerSTM_Handle handle);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
WARNING
This method is not synchronized with other instance methods and, as a result, it must never be called when there is a chance that another instance method is currently in operation or when another method on this instance may preempt this call.

LoggerSTM_setFilterLevel() // instance |

index URL

Sets the level of detail that instances will log

`C` synopsis | target-domain

````Void LoggerSTM_setFilterLevel(LoggerSTM_Handle handle, Diags_Mask mask, Diags_EventLevel filterLevel);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
mask — The diags categories to set the level for
The diags categories to set the level for
filterLevel — The new filtering level for the specified categories
The new filtering level for the specified categories
DETAILS
Events with the specified level or higher will be logged, events below the specified level will be dropped.
Events are filtered first by diags category, then by level. If an event's diags category is disabled in the module's diags mask, then it will be filtered out regardless of level. The event will not even be passed to the logger.
This API allows for setting the filtering level for more than one diags category at a time. The mask parameter can be a single category or multiple categories combined, and the level will be set for all of those categories.
Events with the specified level or higher will be logged, events below the specified level will be dropped.
Events are filtered first by diags category, then by level. If an event's diags category is disabled in the module's diags mask, then it will be filtered out regardless of level. The event will not even be passed to the logger.
This API allows for setting the filtering level for more than one diags category at a time. The mask parameter can be a single category or multiple categories combined, and the level will be set for all of those categories.

LoggerSTM_setSTMChannelRangeMax() // instance |

index URL

Sets the highest STM channel number that events are to be written to

`C` synopsis | target-domain

````Void LoggerSTM_setSTMChannelRangeMax(LoggerSTM_Handle handle, Bits8 chanNum);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_setSTMChannelRangeMin() // instance |

index URL

Sets the lowest STM channel number that events are to be written to

`C` synopsis | target-domain

````Void LoggerSTM_setSTMChannelRangeMin(LoggerSTM_Handle handle, Bits8 chanNum);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object

LoggerSTM_write0() // instance |

index URL

Process a log event with 0 arguments

`C` synopsis | target-domain

````Void LoggerSTM_write0(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
Same as `write4` except with 0 arguments rather than 4.
SEE
ILogger.write4()

LoggerSTM_write1() // instance |

index URL

Process a log event with 1 argument

`C` synopsis | target-domain

````Void LoggerSTM_write1(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
Same as `write4` except with 1 arguments rather than 4.
SEE
ILogger.write4()

LoggerSTM_write2() // instance |

index URL

Process a log event with 2 arguments

`C` synopsis | target-domain

````Void LoggerSTM_write2(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
Same as `write4` except with 2 arguments rather than 4.
SEE
ILogger.write4()

LoggerSTM_write4() // instance |

index URL

Process a log event with 4 arguments

`C` synopsis | target-domain

````Void LoggerSTM_write4(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
evt — event to be logged
mid — module ID of the module which logged the event
a1 — arbitrary argument passed by caller
DETAILS
The `evt` argument is of type Log.Event, which encodes the `Log.EventId`, the `Diags.Mask`, and the `Diags.EventLevel` of the event. The event ID can be obtained via `Types.getEventId(evt)`, the Diags mask can be obtained via `Diags.getMask(evt)`, and the event level can be obtained via `Diags.getLevel(evt)`.
The `modId` argument is the module ID of the module that logged the event.
The event information can be used by the logger to handle different events specially. For example, the event ID can be used to compare against other known `Log.Event`s.

          if (Log_getEventId(MY_EVENT) == Log_getEventId(evt)) {
              :
          }

The Diags mask and event level can be used for filtering of events based on event level (see IFilterLogger), or even routing events to separate loggers based on diags category (see, for example, LoggerBuf.statusLogger).
The Diags mask and event level are useful for handling the event, but are generally not recorded by the logger because they are not needed in decoding and displaying the event. A more suitable value to record is a `Types.Event`, which encodes the event ID and module ID. For example, the `Log.EventRec` type stores a `Types.Event` in its record definition. A `Types.Event` can be created using the `Types.makeEvent` API given the event ID and module ID.
The event ID value of `0` is used to indicate an event triggered by a call to one of the `Log_print[0-6]` methods. These methods take a format string rather than a `Log_Event` argument and, as a result, the event ID encoded in `evt` is `0` and the parameter `a1` is the format string.
Non-zero event IDs can also be used to access the `msg` string associated with the `Log.EventDesc` that originally defined the `Log` event.

          Log_EventId id = Log_getEventId(evt));
          if (id != 0) {
              String msg = Text_ropeText(id);
              System_aprintf(msg, a1, a2, a3, a4);
          }

This works because an event's ID is simply an offset into a table of characters (maintained by the `Text` module) containing the event's msg string.
The arguments a1, a2, etc. are parameters that are to be interpreted according to the message format string associated with `evt`.
SEE
Log.Event, Log.EventDesc, Text.ropeText, Log.getEventId

LoggerSTM_write8() // instance |

index URL

Process a log event with 8 arguments

`C` synopsis | target-domain

````Void LoggerSTM_write8(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, IArg a1, IArg a2, IArg a3, IArg a4, IArg a5, IArg a6, IArg a7, IArg a8);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
DETAILS
Same as `write4` except with 8 arguments rather than 4.
SEE
ILogger.write4()

LoggerSTM_writeMemoryRange() // instance |

index URL

Process a log a snapshot of a range of memory values (e.g. array values, memory mapped registers, strings, etc.)

`C` synopsis | target-domain

````Void LoggerSTM_writeMemoryRange(LoggerSTM_Handle handle, Log_Event evt, Types_ModuleId mid, UInt32 snapshotId, IArg fileName, IArg LineNum, IArg fmt, IArg startAdrs, UInt32 lengthInMAUs);
ARGUMENTS
handle — handle of a previously-created `LoggerSTM` instance object
evt — event to be logged
snapshotId — 0 = no other snapshot groups, Use value from LogSnapshot.getSnapshotId() for all snapshots to be grouped.
fileName — __FILE__ result
lineNum — __LINE__ result
fmt — a `printf` style format string
startAdrs — value for first format conversion character
lengthInMAUs — value for second format conversion character
DETAILS
If the mask in the specified `LogSnapshot` event has any bit set which is also set in the current module's diagnostics mask, then this call to write will "raise" the given `LogSnapshot` event.
Note that this API supports null terminated strings, arrays of characters and memory mapped registgers as well as blocks of memory. The LogSnapshot module provides macros that map the appropriate values to the writeMemoryRange API's arguments
SEE
Log.Event, Log.EventDesc, Text.ropeText, Types.getEventId

Instance Convertors |

index URL

`C` synopsis | target-domain

````ILoggerSnapshot_Handle LoggerSTM_Handle_upCast(LoggerSTM_Handle handle);
````// unconditionally move one level up the inheritance hierarchy
````LoggerSTM_Handle LoggerSTM_Handle_downCast(ILoggerSnapshot_Handle handle);
````// conditionally move one level down the inheritance hierarchy; NULL upon failure
````IUIATransfer_Handle LoggerSTM_Handle_upCast2(LoggerSTM_Handle handle);
````// unconditionally move 2 levels up the inheritance hierarchy
````LoggerSTM_Handle LoggerSTM_Handle_downCast2(IUIATransfer_Handle handle);
````// conditionally move 2 levels down the inheritance hierarchy; NULL upon failure
````IFilterLogger_Handle LoggerSTM_Handle_upCast3(LoggerSTM_Handle handle);
````// unconditionally move 3 levels up the inheritance hierarchy
````LoggerSTM_Handle LoggerSTM_Handle_downCast3(IFilterLogger_Handle handle);
````// conditionally move 3 levels down the inheritance hierarchy; NULL upon failure
````ILogger_Handle LoggerSTM_Handle_upCast4(LoggerSTM_Handle handle);
````// unconditionally move 4 levels up the inheritance hierarchy
````LoggerSTM_Handle LoggerSTM_Handle_downCast4(ILogger_Handle handle);
````// conditionally move 4 levels down the inheritance hierarchy; NULL upon failure

Instance Built-Ins |

index URL

`C` synopsis | target-domain

````Int LoggerSTM_Object_count();
````// The number of statically-created instance objects
````LoggerSTM_Handle LoggerSTM_Object_get(LoggerSTM_Object *array, Int i);
````// The handle of the i-th statically-created instance object (array == NULL)
````LoggerSTM_Handle LoggerSTM_Object_first();
````// The handle of the first dynamically-created instance object, or NULL
````LoggerSTM_Handle LoggerSTM_Object_next(LoggerSTM_Handle handle);
````// The handle of the next dynamically-created instance object, or NULL
````IHeap_Handle LoggerSTM_Object_heap();
````// The heap used to allocate dynamically-created instance objects
````Types_Label *LoggerSTM_Handle_label(LoggerSTM_Handle handle, Types_Label *buf);
````// The label associated with this instance object
````String LoggerSTM_Handle_name(LoggerSTM_Handle handle);
````// The name of this instance object

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

``var LoggerSTM = xdc.useModule('ti.uiactools.runtime.LoggerSTM');
local proxy modules
`` ``LoggerSTM.TimestampProxy// User supplied time-stamp proxy = ITimestampClient.Module null
`` `` LoggerSTM.TimestampProxy.delegate$ = ITimestampClient.Module null
module-wide constants & types
`` ``values of type LoggerSTM.TransferType//
`` `` const LoggerSTM.TransferType_RELIABLE;
`` `` const LoggerSTM.TransferType_LOSSY;
`` ``var obj = new LoggerSTM.MetaData// This data is added to the RTA MetaData file to support stop mode RTA;
`` `` obj.instanceId = Int ...
`` `` obj.priority = Int ...
module-wide config parameters
`` ``LoggerSTM.endpointId// Endpoint ID for the CPU that is logging the event = UInt16 0xFFFF;
`` ``LoggerSTM.filterByLevel// Support filtering of events by event level = Bool false;
`` ``LoggerSTM.isGenerateSTMLibSupportFnsEnabled// Configures whether helper functions required by STMLib are automatically generated (default) or not = Bool true;
`` ``LoggerSTM.isStringOutputModeEnabled// if true, events are logged to STM as strings instead of raw UIA data. Only enable this mode if not using System Analyzer to analyze and display events = Bool false;
`` ``LoggerSTM.level1Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL1 = Bits16 0;
`` ``LoggerSTM.level2Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL2 = Bits16 0;
`` ``LoggerSTM.level3Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL3 = Bits16 0;
`` ``LoggerSTM.level4Mask// Mask of diags categories whose initial filtering level is Diags.LEVEL4 = Bits16 Diags.ALL_LOGGING;
`` ``LoggerSTM.stmBaseAdrs// Base address for the STM channel that events are to be written to = Ptr 0x54000000;
`` ``LoggerSTM.stmChannelResolution// Base address for the STM channel that events are to be written to = Int 0x1000;
`` ``LoggerSTM.common$// Common module configuration parameters = Types.Common$ undefined;
module-wide functions
`` ``LoggerSTM.getLoggerInstanceId// returns the id of this logger instance(Any inst) returns Any
`` ``LoggerSTM.getMetaArgs// Returns any meta data needed to support RTA(Any inst, Any instNum) returns Any
`` ``LoggerSTM.getPtrToQueueDescriptorMeta// Each logger instance has a unique queue descriptor address that is stored in the Event Record header to identify itself to the host. This metaonly configuration parameter allows the UIA Metadata to determine what the address is for each statically created logger instance in order to emit XML code to allow the host to look up information about the logger instance (such as its name) based on the queue descriptor address that is stored in the event record header(Any inst) returns Any
`` ``LoggerSTM.setPtrToQueueDescriptorMeta// Sets the queue descriptor address in the logger's object instance data(Any inst, Any queueDescriptorAdrs) returns Any
per-instance config parameters
`` ``var params = new LoggerSTM.Params// Instance config-params object;
`` `` params.enabled// controls whether logging is enabled or disabled = Bool true;
`` `` params.maxEventSize// The maximum event size (in Maus) that can be written with a single event = SizeT 200;
`` `` params.ptrToQueueDescriptorMeta// = Ptr null;
`` `` params.stmChannelRangeMax// The highest STM channel number that events are to be written to = Bits8 200;
`` `` params.stmChannelRangeMin// The lowest STM channel number that events are to be written to = Bits8 128;
`` `` params.transferType// = IUIATransfer.TransferType IUIATransfer.TransferType_LOSSY;
per-instance creation
`` ``var inst = LoggerSTM.create// Create an instance-object(params);

proxy LoggerSTM.TimestampProxy |

index URL

User supplied time-stamp proxy

`XDCscript` usage | meta-domain

````LoggerSTM.TimestampProxy = ITimestampClient.Module null
````// some delegate module inheriting the ITimestampClient interface
```` LoggerSTM.TimestampProxy.delegate$ = ITimestampClient.Module null
```` // explicit access to the currently bound delegate module
DETAILS
This proxy allows `LoggerSTM` to use a timestamp server different from the server used by `xdc.runtime.Timestamp`. However, if not supplied by a user, this proxy defaults to whichever timestamp server is used by `Timestamp`.

enum LoggerSTM.TransferType |

index URL

`XDCscript` usage | meta-domain

````values of type LoggerSTM.TransferType
```` const LoggerSTM.TransferType_RELIABLE;
```` const LoggerSTM.TransferType_LOSSY;
C SYNOPSIS
LoggerSTM_TransferType

metaonly struct LoggerSTM.MetaData |

index URL

This data is added to the RTA MetaData file to support stop mode RTA

`XDCscript` usage | meta-domain

````var obj = new LoggerSTM.MetaData;
```` obj.instanceId = Int ...
```` obj.priority = Int ...

config LoggerSTM.endpointId // module-wide |

index URL

Endpoint ID for the CPU that is logging the event

`XDCscript` usage | meta-domain

````LoggerSTM.endpointId = UInt16 0xFFFF;
DETAILS
The endpointId corresponds to Ipc's MultiProc value.
For single processor systems this value is ignored. For C64P devices, leave this value as 0xFFFF to configure the logger to use the DNUM value as the endpointId.
C SYNOPSIS
LoggerSTM_endpointId

config LoggerSTM.filterByLevel // module-wide |

index URL

Support filtering of events by event level

`XDCscript` usage | meta-domain

````LoggerSTM.filterByLevel = Bool false;
DETAILS
To improve logging performance, this feature can be disabled by setting `filterByLevel` to false.
See 'setFilterLevel' for an explanation of level filtering.
C SYNOPSIS
LoggerSTM_filterByLevel

config LoggerSTM.isGenerateSTMLibSupportFnsEnabled // module-wide |

index URL

Configures whether helper functions required by STMLib are automatically generated (default) or not

`XDCscript` usage | meta-domain

````LoggerSTM.isGenerateSTMLibSupportFnsEnabled = Bool true;
DETAILS
if LoggerSTM.isGenerateSTMLibSupportFnsEnabled is true AND LoggerSTM.isGenerateSTMLibSupportFnsEnabled is false, the following helper functions required by STMLib are automatically generated by the LoggerSTM.xdt template: (see ti/ctools/stmLib/StmLibrary.h for details)

- cTools_memAlloc(size_t sizeInBytes);
- void * cTools_memMap(unsigned int phyAddr, unsigned int mapSizeInBytes);
- void cTools_memFree(void * ptr);
- void cTools_memUnmap(void * vAddr, unsigned int mapSizeInBytes);

If you wish to use STMLib directly, set this to false and provide implementations of the above functions in your application in order to handle memory allocation and mapping.
C SYNOPSIS
LoggerSTM_isGenerateSTMLibSupportFnsEnabled

config LoggerSTM.isStringOutputModeEnabled // module-wide |

index URL

if true, events are logged to STM as strings instead of raw UIA data. Only enable this mode if not using System Analyzer to analyze and display events

`XDCscript` usage | meta-domain

````LoggerSTM.isStringOutputModeEnabled = Bool false;
DETAILS
Note that setting LoggerSTM.isStringOutputModeEnabled to true will require that your application implement the STMLib helper functions in order to properly provide memory management for STMLib. The LoggerSTM.isGenerateSTMLibSupportFnsEnabled will be forced to 'false' if LoggerSTM.isStringOutputModeEnabled is set to 'true'.
SEE
isGenerateSTMLibSupportFnsEnabled
C SYNOPSIS
LoggerSTM_isStringOutputModeEnabled

config LoggerSTM.level1Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL1

`XDCscript` usage | meta-domain

````LoggerSTM.level1Mask = Bits16 0;
DETAILS
See 'level4Mask' for details.
C SYNOPSIS
LoggerSTM_level1Mask

config LoggerSTM.level2Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL2

`XDCscript` usage | meta-domain

````LoggerSTM.level2Mask = Bits16 0;
DETAILS
See 'level4Mask' for details.
C SYNOPSIS
LoggerSTM_level2Mask

config LoggerSTM.level3Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL3

`XDCscript` usage | meta-domain

````LoggerSTM.level3Mask = Bits16 0;
DETAILS
See 'level4Mask' for details.
C SYNOPSIS
LoggerSTM_level3Mask

config LoggerSTM.level4Mask // module-wide |

index URL

Mask of diags categories whose initial filtering level is Diags.LEVEL4

`XDCscript` usage | meta-domain

````LoggerSTM.level4Mask = Bits16 Diags.ALL_LOGGING;
DETAILS
If 'filterByLevel' is true, then all LoggerBuf instances will filter incoming events based on their event level.
The LoggerCircBuf module allows for specifying a different filter level for every Diags bit. These filtering levels are module wide; LoggerBuf does not support specifying the levels on a per-instance basis.
The setFilterLevel API can be used to change the filtering levels at runtime.
The default filtering levels are assigned using the 'level1Mask' - 'level4Mask' config parameters. These are used to specify, for each of the four event levels, the set of bits which should filter at that level by default.
The default filtering configuration sets the filter level to Diags.LEVEL4 for all logging-related diags bits so that all events are logged by default.
C SYNOPSIS
LoggerSTM_level4Mask

config LoggerSTM.stmBaseAdrs // module-wide |

index URL

Base address for the STM channel that events are to be written to

`XDCscript` usage | meta-domain

````LoggerSTM.stmBaseAdrs = Ptr 0x54000000;
C SYNOPSIS
LoggerSTM_stmBaseAdrs

config LoggerSTM.stmChannelResolution // module-wide |

index URL

Base address for the STM channel that events are to be written to

`XDCscript` usage | meta-domain

````LoggerSTM.stmChannelResolution = Int 0x1000;
C SYNOPSIS
LoggerSTM_stmChannelResolution

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

index URL

Common module configuration parameters

`XDCscript` usage | meta-domain

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

metaonly LoggerSTM.getLoggerInstanceId() // module-wide |

index URL

returns the id of this logger instance

`XDCscript` usage | meta-domain

````LoggerSTM.getLoggerInstanceId(Any inst) returns Any

metaonly LoggerSTM.getMetaArgs() // module-wide |

index URL

Returns any meta data needed to support RTA

`XDCscript` usage | meta-domain

````LoggerSTM.getMetaArgs(Any inst, Any instNum) returns Any
DETAILS
This meta data should be returned in the form of a structure which can be converted into XML. This data is added to the RTA XML file during the application's configuration, and can be accessed later through the xdc.rta.MetaData module.
The MetaData is returned per instance of the ILogger module. The instance object is passed to the function as the first argument.
The second argument is the index of the instance in the list of the ILogger's static instances.

metaonly LoggerSTM.getPtrToQueueDescriptorMeta() // module-wide |

index URL

Each logger instance has a unique queue descriptor address that is stored in the Event Record header to identify itself to the host. This metaonly configuration parameter allows the UIA Metadata to determine what the address is for each statically created logger instance in order to emit XML code to allow the host to look up information about the logger instance (such as its name) based on the queue descriptor address that is stored in the event record header

`XDCscript` usage | meta-domain

````LoggerSTM.getPtrToQueueDescriptorMeta(Any inst) returns Any
DETAILS
The pointer is returned per instance of the logger module. The instance object is passed to the function as the first argument.

metaonly LoggerSTM.setPtrToQueueDescriptorMeta() // module-wide |

index URL

Sets the queue descriptor address in the logger's object instance data

`XDCscript` usage | meta-domain

````LoggerSTM.setPtrToQueueDescriptorMeta(Any inst, Any queueDescriptorAdrs) returns Any

Instance Config Parameters |

index URL

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
````// Instance config-params object
```` params.enabled = Bool true;
```` // controls whether logging is enabled or disabled
```` params.maxEventSize = SizeT 200;
```` // The maximum event size (in Maus) that can be written with a single event
```` params.ptrToQueueDescriptorMeta = Ptr null;
```` //
```` params.stmChannelRangeMax = Bits8 200;
```` // The highest STM channel number that events are to be written to
```` params.stmChannelRangeMin = Bits8 128;
```` // The lowest STM channel number that events are to be written to
```` params.transferType = IUIATransfer.TransferType IUIATransfer.TransferType_LOSSY;
```` //

config LoggerSTM.enabled // instance |

index URL

controls whether logging is enabled or disabled

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.enabled = Bool true;
C SYNOPSIS
null

config LoggerSTM.maxEventSize // instance |

index URL

The maximum event size (in Maus) that can be written with a single event

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.maxEventSize = SizeT 200;
DETAILS
Note: must be smaller than 240 due to STM small block size limitation. Must also be an integer multiple of sizeof(UInt32).
C SYNOPSIS
null

config LoggerSTM.stmChannelRangeMax // instance |

index URL

The highest STM channel number that events are to be written to

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.stmChannelRangeMax = Bits8 200;
C SYNOPSIS
null

config LoggerSTM.stmChannelRangeMin // instance |

index URL

The lowest STM channel number that events are to be written to

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.stmChannelRangeMin = Bits8 128;
C SYNOPSIS
null

config LoggerSTM.transferType // instance |

index URL

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.transferType = IUIATransfer.TransferType IUIATransfer.TransferType_LOSSY;
C SYNOPSIS
null

metaonly config LoggerSTM.ptrToQueueDescriptorMeta // instance |

index URL

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
```` ...
````params.ptrToQueueDescriptorMeta = Ptr null;

Instance Creation |

index URL

`XDCscript` usage | meta-domain

````var params = new LoggerSTM.Params;
````// Allocate instance config-params
````params.config = ...
````// Assign individual configs
````var inst = LoggerSTM.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
LoggerSTM.Params
generated on Wed, 27 Jun 2012 04:11:42 GMT