System Trace Module(STM) Library API Reference Guide
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
StmLibrary.h File Reference
#include <stdint.h>
#include <stdarg.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  _STMBufObj
 
struct  _STMConfigObj
 
struct  _DCM_InfoObj
 

Macros

#define STMLIB_MAJOR_VERSION   (0x5)
 
#define STMLIB_MINOR_VERSION   (0x1)
 

Typedefs

typedef struct _STMBufObj STMBufObj
 
typedef void(* STMXport_callback )(const char *funcName, eSTM_STATUS)
 
typedef struct _STMConfigObj STMConfigObj
 
typedef struct _DCM_InfoObj STM_DCM_InfoObj
 
typedef struct _STMHandle STMHandle
 

Enumerations

enum  bool { false = 0, true = 1 }
 
enum  eSTM_STATUS {
  eSTM_SUCCESS = 0, eSTM_PENDING = 1, eSTM_ERROR_PARM = -1, eSTM_ERROR_STRING_FORMAT = -2,
  eSTM_ERROR_HEAP_ALLOCATION = -3, eSTM_ERROR_BUF_ALLOCATION = -4, eSTM_ERROR_INVALID_FUNC = -5, eSTM_ERROR_CIO_ERROR = -6,
  eSTM_ERROR_OWNERSHIP_NOT_GRANTED = -7, eSTM_ERROR_FIFO_NOTEMPTY = -8
}
 
enum  eSTMElementSize { eByte = 1, eShort = 2, eWord = 4 }
 
enum  eSTM_XmitPrintfMode { eSend_char_stream, eSend_optimized }
 
enum  eSTM_ExportBufSize {
  eBUFSIZE_0, eBUFSIZE_4K, eBUFSIZE_8K, eBUFSIZE_16K,
  eBUFSIZE_32K, eBUFSIZE_64K, eBUFSIZE_128K, eBUFSIZE_256K
}
 

Functions

STMHandleSTMXport_open (STMBufObj *pSTMBufObj, STMConfigObj *pSTM_ConfigObj)
 
eSTM_STATUS STMXport_getDCMInfo (STMHandle *pSTMHandle, STM_DCM_InfoObj *pDCM_InfoObj)
 
eSTM_STATUS STMXport_printf (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString,...)
 
eSTM_STATUS STMXport_printfV (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString, va_list arg_addr)
 
eSTM_STATUS STMXport_putMsg (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString, int32_t iMsgByteCount)
 
eSTM_STATUS STMXport_putBuf (STMHandle *pSTMHandle, int32_t chNum, void *pDataBuf, eSTMElementSize elementSize, int32_t elementCount)
 
eSTM_STATUS STMXport_putTwoBufs (STMHandle *pSTMHandle, int32_t chNum, void *pDataBuf1, eSTMElementSize elementSize1, int32_t elementCount1, void *pDataBuf2, eSTMElementSize elementSize2, int32_t elementCount2)
 
eSTM_STATUS STMXport_getBufInfo (STMHandle *pSTMHandle, uint32_t *msgCnt, uint32_t *curMsgBufSize)
 
eSTM_STATUS STMXport_flush (STMHandle *pSTMHandle)
 
eSTM_STATUS STMXport_close (STMHandle *pSTMHandle)
 
eSTM_STATUS STMXport_getVersion (STMHandle *pSTMHandle, uint32_t *pSTMLibMajorVersion, uint32_t *pSTMLibMinorVersion)
 
eSTM_STATUS STMXport_putWord (STMHandle *pSTMHandle, int32_t chNum, uint32_t data)
 
eSTM_STATUS STMXport_putShort (STMHandle *pSTMHandle, int32_t chNum, uint16_t data)
 
eSTM_STATUS STMXport_putByte (STMHandle *pSTMHandle, int32_t chNum, uint8_t data)
 
eSTM_STATUS STMXport_logMsg (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString,...)
 
eSTM_STATUS STMXport_logMsg0 (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString)
 
eSTM_STATUS STMXport_logMsg1 (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString, uint32_t parm1)
 
eSTM_STATUS STMXport_logMsg2 (STMHandle *pSTMHandle, int32_t chNum, const char *pMsgString, uint32_t parm1, uint32_t parm2)
 
eSTM_STATUS STMXport_setMetaState (STMHandle *pSTMHandle, bool onDemand)
 
eSTM_STATUS STMXport_getMetaState (STMHandle *pSTMHandle, bool *onDemand)
 
eSTM_STATUS STMXport_sendMetaOnDemand (STMHandle *pSTMHandle)
 

Macro Definition Documentation

#define STMLIB_MAJOR_VERSION   (0x5)

Major version number - Incremented for API changes

#define STMLIB_MINOR_VERSION   (0x1)

Minor version number - Incremented for bug fixes

Typedef Documentation

typedef struct _STMBufObj STMBufObj
STMBufObj

Configuration parameters for non-blocking buffered IO.

typedef void(* STMXport_callback)(const char *funcName, eSTM_STATUS)
STMXport_callback

The callback function is called with the function's exit status. Note that this function is not exported by the interface, but is used as a parameter for STM data transport calls.

Parameters
[in]eSTM_STATUSThe function's exit status
Returns
void
Details:

This is a user provided callback normally used to centralize error handling. When operating the STM Library in Buffered Mode, if there is no error, the status indicates if the message is pending (eSTM_PENDING) or in the process of being transported (eSTM_SUCCESS).

typedef struct _STMConfigObj STMConfigObj
eSTM_XportModuleType

Set the transport module type to MIPI STM or CoreSight STM.

STMConfigObj

This struct is used to communicate configuration parameters to the library.

typedef struct _STMHandle STMHandle
STMHandle

STMHandle is an incomplete structure pointer provide to the client by STMXport_open().

Enumeration Type Documentation

enum bool
bool

bool typedef provided for compilers that are not C99 compliant.

eSTM_STATUS

STM Library API function return codes.

Enumerator
eSTM_SUCCESS 

No error, message completed

eSTM_PENDING 

No error, message buffered

eSTM_ERROR_PARM 

Error, method parameter error

eSTM_ERROR_STRING_FORMAT 

Error, Printf string format error

eSTM_ERROR_HEAP_ALLOCATION 

Error , Can not allocate heap error

eSTM_ERROR_BUF_ALLOCATION 

Error, message to large for remaining buffer space

eSTM_ERROR_INVALID_FUNC 

Error, Function not supported by _COMPACT build

eSTM_ERROR_CIO_ERROR 

Error, CIO error occurred

eSTM_ERROR_OWNERSHIP_NOT_GRANTED 

Error, Module ownership not granted

eSTMElementSize

STM Library API element size codes.

Enumerator
eByte 

Byte element size

eShort 

Short element size

eWord 

Word element size

eSTM_PrintfMode

Set the mode for STMXport_printf, TMXport_logMsg, and STMXport_logMsgN functions.

Enumerator
eSend_char_stream 

Send the printf format string and arguments as a resolved char stream

eSend_optimized 

Send the printf format string as a pointer and arguments as binary values

Enumerator
eBUFSIZE_0 

STM data will be drained into a fixed buffer

eBUFSIZE_4K 

STM data will be drained into a 4K circular buffer

eBUFSIZE_8K 

STM data will be drained into a 8K circular buffer

eBUFSIZE_16K 

STM data will be drained into a 16K circular buffer

eBUFSIZE_32K 

STM data will be drained into a 32K circular buffer

eBUFSIZE_64K 

STM data will be drained into a 64K circular buffer

eBUFSIZE_128K 

STM data will be drained into a 128K circular buffer

eBUFSIZE_256K 

STM data will be drained into a 256K circular buffer

Function Documentation

STMHandle* STMXport_open ( STMBufObj pSTMBufObj,
STMConfigObj pSTM_ConfigObj 
)
STMXport_open

Open the STM Library API.

Parameters
[in]pSTMBufObjA pointer to a STMBufObj. To enable blocking IO pSTMBufObj must be NULL. To enable non-blocking buffered IO pSTMBufObj must not be NULL and the pSTMBufObj parameters must be valid.In the case of non-blocking buffered IO the client must provide a maximum amount of heap space that may be allocated by the STM Library and two DMA channels, defined within pSTMBufObj.
[in]pSTMConfigObjA pointer to a STM Configuration object. Currently used to provide the STM_BaseAddress, STM_ChannelResolution, an optional CallBack function pointer and an enable for STMXport_printf STM message optimization. If STMXport_printf optimization is enabled in the case of %s, only the pointer to the const char is transported. If STMXport_printf optimization is not enabled the entire null terminated string pointed by %s is transported. If pSTMConfigObj is NULL then the default configuration is used, which is all configuration parameters are false.
Returns
STMHandle pointer
Details:

This API opens a physical STM hw module for SW instrumentation data export. The STM Library can be opened for either non-blocking buffered IO or blocking IO. In the case of blocking IO the CPU is utilized to facilitate STM transfers. In case of non-blocking IO, DMA services are used. When the interface is opened for blocking IO, the CPU can be stalled. CPU stalls are avoided if the interface is opened for non-blocking, buffered IO.

To change the interfaces IO type (between blocking and non-blocking/buffered) the interface must be closed and then re-opened.

Return handle is NULL if open calls failed. Only a single STMHandle can be opened on a processor.

If STMXport_open exits with a non-NULL STMHandle memory is allocated through a call to the client provided external function cTools_memAlloc(). cTools_memMap(), also a client provided function, is called by STMXport_open to map the physical pSTMConfigObj->STM_BaseAddress to a virtual address space.

Prototype for client provided functions:
void * cTools_memAlloc(size_t sizeInBytes) return NULL if memory not allocated
void * cTools_memMap(unsigned int phyAddr, unsigned int mapSizeInBytes) return phyAddr if virtual mapping not required.

Build Option Notes:

Compact Build:

The compact build only supports enabling the API for blocking mode. If STMXport_open is called with pSTMBufObj set to a non-NULL value, it will return NULL rather than a valid pSTMHdl. The compact build makes no calls to the RTS Library.

CIO Build:

When using the CIO build, STMXport_open must be called with a pSTMBufObj that utilizes the CIO definition.

eSTM_STATUS STMXport_getDCMInfo ( STMHandle pSTMHandle,
STM_DCM_InfoObj pDCM_InfoObj 
)
STMXport_getDCMInfo

Use this function to extract DCM data required to provide back to the decoder utility (normally within a file).

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[out]pDCM_InfoObjA pointer to a DCM_InfoObj (see :: MIPI_ConfigObj).
Details:

This function is used to provide DCM parameters, extracted form the STM module, after data collection has been terminated.

eSTM_STATUS STMXport_printf ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
  ... 
)
STMXport_printf

Transport over STM a formatted string pointer and variables

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification). The format string must be defined as a global static.
[in]...List of variables corresponding to conversion characters in the format string.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport a pointer to a static formatted string and the values defined by the conversion characters within the formatted string. This is similar to a C printf call with some additional STM specific parameters. All elements of the transported data are transported using 32-bit STM transfers.

If data has been buffered or queued previously for any channel, that data is transported first.

If STMXport_printf STM message optimization is enabled (see STMXport_open()), in the case of %s only its const char pointer is transported. If STMXport_printf STM message optimization is not enabled, in the case of %s the entire null terminated string pointed by the %s parameter is transported. In this case STM byte transfers are used to eliminate endian conversion issues.

The %s STMXport_printf STM message optimization is provided for cases where the client is using const char pointers for all %s cases and is not forming strings dynamically. If your application forms strings for use with %s dynamically you must disable STMXport_printf message optimization (default).

Limitations

The following "C" conversion characters are not supported:

  • %p
  • %n
  • %%
Build Option Notes:

Compact Build:

This function is not valid and will return eSTM_ERROR_INVALID_FUNC.

eSTM_STATUS STMXport_printfV ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
va_list  arg_addr 
)
STMXport_printfV

Transport over STM a formatted string pointer and variables. This function is identical in operation to STMXport_printf(), except that instead of a variable argument list the variables are passed through va_list.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification). The format string must be defined as a global static.
[in]arg_addrA va_list of variables corresponding to conversion characters in the format string.
Returns
eSTM_STATUS Function's exit status.
Details:

See STMXport_printf().

Note that this function is provided in cases where existing client logging functions require the use of a va_list.

This function is also effected by the STMXport_printf optimization configuration parameter. See STMXport_printf() for details.

eSTM_STATUS STMXport_putMsg ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
int32_t  iMsgByteCount 
)
STMXport_putMsg

Transport over STM a user formatted string

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringPointer to a byte array containing the message to be transported.
[in]iMsgByteCountNumber of bytes to be transported from the pMsgString pointer.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport non-static data, starting on any byte address in the most efficient manner possible. In the blocking case the data transfer starts with byte and short transfers until the data is aligned to a word address, then making as many word transfers as possible, followed up with any trailing short and byte transfers on the back-end if required. In the non-blocking buffered case data is buffered, aligned to a word address and zero padded. All elements are transported using 32-bit STM transfers.

If data has been buffered or queued previously for any channel, that data is transported first.

Build Option Notes:

Compact Build:

This function is not valid and will return eSTM_ERROR_INVALID_FUNC.

eSTM_STATUS STMXport_putBuf ( STMHandle pSTMHandle,
int32_t  chNum,
void *  pDataBuf,
eSTMElementSize  elementSize,
int32_t  elementCount 
)
STMXport_putBuf

Transport over STM an element array

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pDataBufPointer to the data buffer array to be transported.
[in]elementSizeSize of each element represented in the buffer.
[in]elementCountTotal number of elements (of elementSize) in the buffer being transported.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport non-formatted data values. All the data pointed to by pDataBuf is transported based on elementSize.

If data has been buffered or queued previously for any channel, that data is transported first.

Build Option Notes:

Compact Build:

This function is valid but will only work in blocking mode.

eSTM_STATUS STMXport_putTwoBufs ( STMHandle pSTMHandle,
int32_t  chNum,
void *  pDataBuf1,
eSTMElementSize  elementSize1,
int32_t  elementCount1,
void *  pDataBuf2,
eSTMElementSize  elementSize2,
int32_t  elementCount2 
)
STMXport_putTwoBufs

Transport two element arrays

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pDataBuf1Pointer to the first data buffer array to be transported.
[in]elementSize1Size of each element represented in the buffer.
[in]elementCount1Total number of elements (of elementSize) in the buffer being transported.
[in]pDataBuf2Pointer to the second data buffer array to be transported.
[in]elementSize2Size of each element represented in the buffer.
[in]elementCount2Total number of elements (of elementSize) in the buffer being transported.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport non-formatted data values. All the data pointed to by pDataBuf is transported based on elementSize.

Build Option Notes:

Compact Build:

This function is valid but will only work in blocking mode.

eSTM_STATUS STMXport_getBufInfo ( STMHandle pSTMHandle,
uint32_t *  msgCnt,
uint32_t *  curMsgBufSize 
)
STMXport_getBufInfo

Get Buffered Message Information

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[out]msgCntReturns the number of outstanding messages.
[out]curMsgBufSizeReturns the number of currently utilized bytes of the space provided by STMBufObj->MaxMsgBufSize currently allocated.
Returns
eSTM_STATUS Function's exit status.
Details:

When the interface is opened for non-blocking buffered IO, periodically the user may need to check the number of messages queued and flush the buffer to guarantee there are no eSTM_ERROR_BUF_ALLOCATION errors.

Important Notes:
  • When the interface is opened for buffered IO, any errors detected by the STMXport_DMAIntService routine will be reported by this function.
Build Option Notes:

Compact and CIO Build:

This function is not valid and will return eSTM_ERROR_INVALID_FUNC.

eSTM_STATUS STMXport_flush ( STMHandle pSTMHandle)
STMXport_flush

Flush Buffered Messages

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
Returns
eSTM_STATUS Function's exit status.
Details:

Flush all data buffered or pending.

Build Option Notes:

Compact Build:

This function is valid but it performs no useful purpose since the API is in blocking mode. Will always return eSTM_SUCCESS.

eSTM_STATUS STMXport_close ( STMHandle pSTMHandle)
STMXport_close

Close the instance of the STM Library pointed to by pSTMHandle.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
Returns
eSTM_STATUS Function's exit status.
Details:

In the case the library is open for buffered IO, if the client has not flushed the channel, the channel will still be closed although any partial transfers already in progress will be completed.

eSTM_STATUS STMXport_getVersion ( STMHandle pSTMHandle,
uint32_t *  pSTMLibMajorVersion,
uint32_t *  pSTMLibMinorVersion 
)
STMXport_getVersion

Get the version of the STM Library

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[out]pSTMLibMajorVersionThe return pointer for the library's major version.
[out]pSTMLibMinorVersionThe return pointer for the library's minor version.
Returns
eSTM_STATUS Function's exit status.
Details:

This function provides the major and minor version numbers of the libraries build. These values can be compared with the following macro values in StmLibrary.h to confirm that the version of the library matches that of the header file.

  • STMLIB_MAJOR_VERSION
  • STMLIB_MINOR_VERSION

Major version releases of the same level will be backward compatible with lower minor release versions. Any change in the API will be reflected in a change to the major release version. The minor release version is typically for bug fixes.

eSTM_STATUS STMXport_putWord ( STMHandle pSTMHandle,
int32_t  chNum,
uint32_t  data 
)
STMXport_putWord

Transport over STM a 32-bit word.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]data32-bit value to transport.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport a single 32-bit value. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_putShort ( STMHandle pSTMHandle,
int32_t  chNum,
uint16_t  data 
)
STMXport_putShort

Transport over STM a 16-bit word.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]data16-bit value to transport.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport a single 16-bit value. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_putByte ( STMHandle pSTMHandle,
int32_t  chNum,
uint8_t  data 
)
STMXport_putByte

Transport over STM an 8-bit word.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]data8-bit value to transport.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport a single 8-bit value. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_logMsg ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
  ... 
)
STMXport_logMsg

Transport over STM a formatted string and a list of variables whose conversion character types are limited to ints.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification) limited to int type conversion characters. The format string must be defined as a global static.
[in]...List of int variables corresponding to conversion characters in the format string.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport the pointer to a static formatted string and the values defined by the conversion characters within the formatted string with the limitation that all conversion characters are ints. All elements are transported using 32-bit STM transfers. This function is a blocking only call regardless of which mode the API is opened for.

Build Option Notes:

Compact Build:

This function is not valid and will return eSTM_ERROR_INVALID_FUNC.

eSTM_STATUS STMXport_logMsg0 ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString 
)
STMXport_logMsg0

Transport over STM a string. Format string contains no conversion characters.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification) with no conversion characters. The format string must be defined as a global static.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport the pointer to a static formatted string with no conversion characters within the formatted string. This is an optimized version of STMXport_logMsg. All elements are transported using 32-bit STM transfers. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_logMsg1 ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
uint32_t  parm1 
)
STMXport_logMsg1

Transport over STM a formatted string and a single variable whose conversion characters type is limited an int.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification) limited to a single int type conversion characters. The format string must be defined as a global static.
[in]parm132-bit value associated with the int conversion character to be transferred.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport the pointer to a static formatted string and a single 32-bit value whose format is defined by a single int conversion character within the formatted string. This is an optimized version of STMXport_logMsg. All elements are transported using 32-bit STM transfers. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_logMsg2 ( STMHandle pSTMHandle,
int32_t  chNum,
const char *  pMsgString,
uint32_t  parm1,
uint32_t  parm2 
)
STMXport_logMsg2

Transport over STM a formatted string and two variables whose conversion character types are limited to ints.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]chNumA STM Channel number in the range of 0 to STM_MAX_CHANNEL(StmSupport.h). The most common usage is to identify messages coming from different OS tasks or processes. It's expected the application will manage it's channel usage.
[in]pMsgStringANSI C style format string (printf specification) limited to two int type conversion characters. The format string must be defined as a global static.
[in]parm132-bit value associated with the first int conversion character to be transferred.
[in]parm232-bit value associated with the second int conversion character to be transferred.
Returns
eSTM_STATUS Function's exit status.
Details:

This function is utilized to transport the pointer to a static formatted string and a two 32-bit values whose format are defined by int conversion characters within the formatted string. This is an optimized version of STMXport_logMsg. All elements are transported using 32-bit STM transfers. This function is a blocking only call regardless of which mode the API is opened for.

eSTM_STATUS STMXport_setMetaState ( STMHandle pSTMHandle,
bool  onDemand 
)
STMXport_setMetaState

Enable/Disable transport of meta data on demand.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]onDemandSet to "true" to enable Meta On Demand, Set to "false" to disable.
Returns
eSTM_STATUS Function's exit status.
Details:

If "true" meta data is only transported by call to STMXport_sendMetaOnDemand (a public function). In this case the STMXport_putMeta (a private function) is used by other libraries to register their meta data. If "false" meta data sent to STMXport_putMeta is transported immediately and STMXport_sendMetaOnDemand is disabled (does nothing). False is the default state.

eSTM_STATUS STMXport_getMetaState ( STMHandle pSTMHandle,
bool onDemand 
)
STMXport_getMetaState

Enable/Disable state of meta data on demand.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
[in]onDemandSet to "true" if Meta On Demand enabled, Set to "false" if disable.
Returns
eSTM_STATUS Function's exit status.
Details:
eSTM_STATUS STMXport_sendMetaOnDemand ( STMHandle pSTMHandle)
STMXport_sendMetaOnDemand

Send all meta data.

Parameters
[in]pSTMHandleA pointer to an STM Handle returned by STMXport_open().
Returns
eSTM_STATUS Function's exit status.
Details:

If meta onDemand state has been changed to "true" meta data all registered meta data is transported. When the Meta onDemand state is true, meta data is registered by other libraries calling STMXport_putMeta (a private function). If meta onDemand state is "false" meta data sent to STMXport_putMeta is transported immediately and STMXport_sendMetaOnDemand is disabled (does nothing). Meta onDemand's default state is false and must be explicitly set by a call to STMXport_setMetaState.