X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=doc%2Fapi%2Fdox%2Fmain-page.dox;fp=doc%2Fapi%2Fdox%2Fmain-page.dox;h=8edb56aeb5d9b9ea6f09473b53067262609e9c2f;hb=d1dab1d2126585017a17c35e05e9873d995bfee2;hp=0000000000000000000000000000000000000000;hpb=24626e8bc3516dd3b075489b42576c9045070b4a;p=babeltrace.git diff --git a/doc/api/dox/main-page.dox b/doc/api/dox/main-page.dox new file mode 100644 index 00000000..8edb56ae --- /dev/null +++ b/doc/api/dox/main-page.dox @@ -0,0 +1,122 @@ +/** +@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: + + + +Some parts of the API require typical scalar value objects (boolean, +integer, floating point number, string) and compound value objects +(array, map). For example, the environment of a +\link ctfirtraceclass CTF IR trace class\endlink maps strings to strings +or to integers, and the parameters passed to component instances take +the form of a map. For this purpose, the API uses +\link values value objects\endlink. + +All the Babeltrace objects have a +reference count +to make them shareable. +When you create a Babeltrace object, its reference count is +initialized to 1: you are its sole owner. When you add this object to +another one, the latter takes its own reference using bt_get(), +incrementing the shared object's reference count. When you are done +with an object, you must call bt_put() to drop your reference, +decrementing its reference count. When an object's reference count +reaches 0, the object is considered \em destroyed and cannot be +used anymore. See \ref refs for more details. + +The postconditions of the functions and macros documented here indicate +what you can expect of the reference counts of the Babeltrace objects +passed as parameters and returned. + +The Babeltrace library can \em freeze almost all of the Babeltrace +objects. A frozen object is considered \em immutable, although you can +still get and put references to this object. + +The preconditions of the functions and macros documented here indicate +when they expect unfrozen objects. The postconditions indicate when +the functions and macros freeze an object. + +Have a look at \ref quickstart to learn more about the available +modules of the Babeltrace C API. +*/