rtxDiagBitTrace.h File Reference

Common runtime functions for tracing bit patterns written to or read from a stream. More...

#include <stdarg.h>
#include "rtxsrc/rtxMemBuf.h"
#include "rtxsrc/rtxSList.h"
#include "rtxsrc/rtxPrintToStream.h"

Go to the source code of this file.

Defines

#define RTDIAG_GETCTXTBITOFFSET(pctxt)   (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset))
 This macro calculates the relative bit offset to the current buffer position.

Functions

EXTERNRT int rtxDiagCtxtBitFieldListInit (OSCTXT *pctxt)
 This function initializes the standard bit field list structure within the context.
EXTERNRT void rtxDiagBitFieldListInit (OSCTXT *pctxt, OSRTDiagBitFieldList *pBFList)
 This function initializes a bit field list structure.
EXTERNRT void rtxDiagInsBitFieldLen (OSRTDiagBitFieldList *pBFList)
 This function inserts a special length field before the current record in the bit field list.
EXTERNRT OSRTDiagBitField * rtxDiagNewBitField (OSRTDiagBitFieldList *pBFList, const char *nameSuffix)
 This function allocates a new bit field structure and adds it to the bit field list.
EXTERNRT void rtxDiagSetBitFldOffset (OSRTDiagBitFieldList *pBFList)
 This function is used to set the bit offset in the current bit field structure.
EXTERNRT void rtxDiagSetBitFldCount (OSRTDiagBitFieldList *pBFList)
 This function is used to set the bit count in the current bit field structure.
EXTERNRT void rtxDiagSetBitFldNameSuffix (OSRTDiagBitFieldList *pBFList, const char *nameSuffix)
 This function is used to set the name suffix in the current bit field structure.
EXTERNRT OSBOOL rtxDiagSetBitFldDisabled (OSRTDiagBitFieldList *pBFList, OSBOOL value)
 This function increments or decrements the disabled count.
EXTERNRT void rtxDiagBitTracePrint (OSRTDiagBitFieldList *pBFList, const char *varname)
 This function prints the bit field list to a an output stream.
EXTERNRT void rtxDiagBitTracePrintHTML (const char *filename, OSRTDiagBitFieldList *pBFList, const char *varname)
 This function prints the bit field list to a an HTML document.
EXTERNRT void rtxDiagBitFldAppendNamePart (OSRTDiagBitFieldList *pBFList, const char *namePart)
 This function appends the given name part to the element name in the bit field.

Detailed Description

Common runtime functions for tracing bit patterns written to or read from a stream.

Definition in file rtxDiagBitTrace.h.


Function Documentation

EXTERNRT void rtxDiagBitFieldListInit ( OSCTXT pctxt,
OSRTDiagBitFieldList *  pBFList 
)

This function initializes a bit field list structure.

Parameters:
pctxt Pointer to a context structure.
pBFList Pointer to bit field list structure.
EXTERNRT void rtxDiagBitFldAppendNamePart ( OSRTDiagBitFieldList *  pBFList,
const char *  namePart 
)

This function appends the given name part to the element name in the bit field.

A dot (.) separator character is added after the existing name and before the name part.

Parameters:
pBFList Pointer to bit field list structure.
namePart A name part that is appended to the field.
EXTERNRT void rtxDiagBitTracePrint ( OSRTDiagBitFieldList *  pBFList,
const char *  varname 
)

This function prints the bit field list to a an output stream.

By default, the output goes to stdout; but this can be changed by creating a print output stream within the context (see rtxPrintStream).

Parameters:
pBFList Pointer to bit field list structure.
varname A variable name that is prepended to each field.
EXTERNRT void rtxDiagBitTracePrintHTML ( const char *  filename,
OSRTDiagBitFieldList *  pBFList,
const char *  varname 
)

This function prints the bit field list to a an HTML document.

Parameters:
filename Name of HTML file to be written.
pBFList Pointer to bit field list structure.
varname A variable name that is prepended to each field.
EXTERNRT int rtxDiagCtxtBitFieldListInit ( OSCTXT pctxt  ) 

This function initializes the standard bit field list structure within the context.

Parameters:
pctxt Pointer to a context structure.
EXTERNRT void rtxDiagInsBitFieldLen ( OSRTDiagBitFieldList *  pBFList  ) 

This function inserts a special length field before the current record in the bit field list.

Parameters:
pBFList Pointer to bit field list structure.
EXTERNRT OSRTDiagBitField* rtxDiagNewBitField ( OSRTDiagBitFieldList *  pBFList,
const char *  nameSuffix 
)

This function allocates a new bit field structure and adds it to the bit field list.

Parameters:
pBFList Pointer to bit field list structure.
nameSuffix Suffix to append to the bit field name.
Returns:
Allocated bit field structure.
EXTERNRT void rtxDiagSetBitFldCount ( OSRTDiagBitFieldList *  pBFList  ) 

This function is used to set the bit count in the current bit field structure.

Parameters:
pBFList Pointer to bit field list structure.
EXTERNRT OSBOOL rtxDiagSetBitFldDisabled ( OSRTDiagBitFieldList *  pBFList,
OSBOOL  value 
)

This function increments or decrements the disabled count.

This allows the list to be temporaily disabled to allow collection of more bits to form larger, aggregate fields.

Parameters:
pBFList Pointer to bit field list structure.
value Indicates if disabled count should be incremented (TRUE) or decremented (FALSE).
Returns:
TRUE if field operations are still disabled.
EXTERNRT void rtxDiagSetBitFldNameSuffix ( OSRTDiagBitFieldList *  pBFList,
const char *  nameSuffix 
)

This function is used to set the name suffix in the current bit field structure.

This text is printed after the element name when the field is displayed.

Parameters:
pBFList Pointer to bit field list structure.
nameSuffix Suffix to append to the bit field name.
EXTERNRT void rtxDiagSetBitFldOffset ( OSRTDiagBitFieldList *  pBFList  ) 

This function is used to set the bit offset in the current bit field structure.

Parameters:
pBFList Pointer to bit field list structure.