traceparser_cs_range()

Attach a callback to a range of events

Synopsis:

#include <sys/traceparser.h>

int traceparser_cs_range ( 
   struct traceparser_state * stateptr, 
   void * userdata,
   tracep_callb_func_t funcptr, 
   unsigned class,
   unsigned firstevent, 
   unsigned lastevent );

Arguments:

stateptr
A pointer to the parser's state information, obtained by calling traceparser_init().
userdata
A pointer to arbitrary user data that you want to pass to the callback function.
funcptr
A pointer to the callback function that you want to register. For more information, see Callback function in the entry for traceparser_cs().
class
The class of trace events that you want to invoke the callback function for.
firstevent, lastevent
The range of trace events that you want to invoke the callback function for. The events must be members of the given class.

Library:

libtraceparser

Use the -l traceparser option to qcc to link against this library.

Description:

The traceparser_cs_range() function attaches a callback function, given by the pointer funcptr, to a range of events from firstevent through to lastevent inclusive, from one particular class. You'll use this function if you're creating your own utility for parsing trace data (as an alternative to traceprinter).

The user data (userdata) is passed to the registered callback function (funcptr) upon execution. The stateptr is an opaque structure obtained from traceparser_init().

Returns:

0
Success.
-1
Failure; errno is set. See also traceparser_get_info() for further details

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread No

See also:

TraceEvent(), traceparser(), traceparser_cs(), traceparser_debug(), traceparser_destroy(), traceparser_get_info(), traceparser_init()

tracelogger, traceprinter in the Utilities Reference

System Analysis Toolkit User's Guide

Analyzing Your System with Kernel Tracing chapter of the Integrated Development Environment User's Guide