/**
@mainpage Welcome!
Welcome to the
Babeltrace \btversion C API documentation!
Babeltrace is an open
source converter of
trace
formats. You can use its C API to
write custom source, sink, and filter
\link btcomponents component classes\endlink which you can package as user
\link btplugins plugins\endlink.
@section intro Introduction
The goal of using this API is to create user
\link btplugins plugins\endlink.
A Babeltrace plugin contains one or more
\link btcomponents component classes\endlink.
A component class is either:
- A \b source, or producer of trace events.
- A \b sink, or consumer of trace events.
- A \b filter, that is, both a producer and a consumer of trace
events.
A program or library can instantiate a component class as many times as
needed as concrete \em components. At component instantiation time, the
constructor function receives custom parameters.
Plugins, as of Babeltrace \btversion, are built as dynamic libraries
(.so
or .dll
files) and loaded by the \c
babeltrace converter program. The converter program is responsible for
passing notifications and events from source components to filter
components, if any, and from filter components to sink components.
The internal representations of a trace, a stream, and an event follow
the Common Trace Format model.
Within the Babeltrace C API, this representation is called the
Common Trace Format Intermediate Representation, or
\link ctfir CTF IR\endlink.
The CTF IR model contains the following objects, amongst others:
For example, an integer field type contains the size (in bits) of the integer fields it describes, as well as their byte order, whether or not they are signed, and so on. An integer field created out of an integer field type, however, only contains a raw integer value. You can create many fields from a single field type template.
An event class contains the field types of its various scopes, while an event contains the actual fields holding their values.
A stream class contains the field types of its various scopes, while \link ctfirpacket packets\endlink attached to a \link ctfirstream stream\endlink instantiated from a stream class contains the actual fields holding their values.
A stream class is the parent of one or more event classes.
A trace class is the parent of one or more stream classes.