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.
|
#define | RTDIAG_GETCTXTBITOFFSET(pctxt) (((pctxt)->buffer.byteIndex * 8) + (8 - (pctxt)->buffer.bitOffset)) |
| This macro calculates the relative bit offset to the current buffer position.
|
|
|
EXTERNRT int | rtxDiagCtxtBitFieldListInit (OSCTXT *pctxt) |
| This function initializes the standard bit field list structure within the context. More...
|
|
EXTERNRT void | rtxDiagBitFieldListInit (OSCTXT *pctxt, OSRTDiagBitFieldList *pBFList) |
| This function initializes a bit field list structure. More...
|
|
EXTERNRT void | rtxDiagInsBitFieldLen (OSRTDiagBitFieldList *pBFList) |
| This function inserts a special length field before the current record in the bit field list. More...
|
|
EXTERNRT OSRTDiagBitField * | rtxDiagNewBitField (OSRTDiagBitFieldList *pBFList, const char *nameSuffix) |
| This function allocates a new bit field structure and adds it to the bit field list. More...
|
|
EXTERNRT void | rtxDiagSetBitFldOffset (OSRTDiagBitFieldList *pBFList) |
| This function is used to set the bit offset in the current bit field structure. More...
|
|
EXTERNRT void | rtxDiagSetBitFldCount (OSRTDiagBitFieldList *pBFList) |
| This function is used to set the bit count in the current bit field structure. More...
|
|
EXTERNRT void | rtxDiagSetBitFldNameSuffix (OSRTDiagBitFieldList *pBFList, const char *nameSuffix) |
| This function is used to set the name suffix in the current bit field structure. More...
|
|
EXTERNRT OSBOOL | rtxDiagSetBitFldDisabled (OSRTDiagBitFieldList *pBFList, OSBOOL value) |
| This function increments or decrements the disabled count. More...
|
|
EXTERNRT void | rtxDiagBitTracePrint (OSRTDiagBitFieldList *pBFList, const char *varname) |
| This function prints the bit field list to a an output stream. More...
|
|
EXTERNRT void | rtxDiagBitTracePrintHTML (const char *filename, OSRTDiagBitFieldList *pBFList, const char *varname) |
| This function prints the bit field list to a an HTML document. More...
|
|
EXTERNRT void | rtxDiagBitFldAppendNamePart (OSRTDiagBitFieldList *pBFList, const char *namePart) |
| This function appends the given name part to the element name in the bit field. More...
|
|
Common runtime functions for tracing bit patterns written to or read from a stream.
Definition in file rtxDiagBitTrace.h.
◆ rtxDiagBitFieldListInit()
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. |
◆ rtxDiagBitFldAppendNamePart()
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. |
◆ rtxDiagBitTracePrint()
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. |
◆ rtxDiagBitTracePrintHTML()
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. |
◆ rtxDiagCtxtBitFieldListInit()
EXTERNRT int rtxDiagCtxtBitFieldListInit |
( |
OSCTXT * |
pctxt | ) |
|
This function initializes the standard bit field list structure within the context.
- Parameters
-
pctxt | Pointer to a context structure. |
◆ rtxDiagInsBitFieldLen()
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. |
◆ rtxDiagNewBitField()
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.
◆ rtxDiagSetBitFldCount()
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. |
◆ rtxDiagSetBitFldDisabled()
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.
◆ rtxDiagSetBitFldNameSuffix()
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. |
◆ rtxDiagSetBitFldOffset()
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. |