1 #ifndef BABELTRACE_CTF_IR_FIELD_TYPES_H
2 #define BABELTRACE_CTF_IR_FIELD_TYPES_H
5 * BabelTrace - CTF IR: Event field types
7 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 * The Common Trace Format (CTF) Specification is available at
30 * http://www.efficios.com/ctf
40 @defgroup ctfirfieldtypes CTF IR field types
42 @brief CTF IR field types.
45 #include <babeltrace/ctf-ir/field-types.h>
48 A CTF IR <strong><em>field type</em></strong> is a field type that you
49 can use to create concrete @fields.
51 You can create a @field object from a CTF IR field type object
52 with bt_ctf_field_create().
54 In the CTF IR hierarchy, you can set the root field types of three
57 - \ref ctfirtraceclass
58 - Trace packet header field type: bt_ctf_trace_set_packet_header_type().
59 - \ref ctfirstreamclass
60 - Stream packet context field type:
61 bt_ctf_stream_class_set_packet_context_type().
62 - Stream event header field type:
63 bt_ctf_stream_class_set_event_header_type().
64 - Stream event context field type:
65 bt_ctf_stream_class_set_event_context_type().
66 - \ref ctfireventclass
67 - Event context field type: bt_ctf_event_class_set_context_type().
68 - Event payload field type: bt_ctf_event_class_set_payload_type().
70 As of Babeltrace \btversion, those six previous "root" field types
71 \em must be @structft objects.
73 If, at any level within a given root field type, you add a @seqft or a
74 @varft, you do not need to specify its associated length
75 or tag field type: the length or tag string is enough for the Babeltrace
76 system to resolve the needed field type depending on where this
77 dynamic field type is located within the whole hierarchy. It is
78 guaranteed that this automatic resolving is performed for all the field
79 types contained in a given
80 \link ctfirstreamclass CTF IR stream class\endlink (and in its
81 children \link ctfireventclass CTF IR event classes\endlink) once you
82 add it to a \link ctfirtraceclass CTF IR trace class\endlink with
83 bt_ctf_trace_add_stream_class(). Once a stream class is the child of
84 a trace class, this automatic resolving is performed for the field
85 types of an event class when you add it with
86 bt_ctf_stream_class_add_event_class(). If the system cannot find a path
87 to a field in the hierarchy for a dynamic field type, the adding
90 The standard CTF field types are:
96 <th>CTF IR field which you can create from this field type
99 <td>#BT_CTF_TYPE_ID_INTEGER
100 <td>\ref ctfirintfieldtype
101 <td>\ref ctfirintfield
104 <td>#BT_CTF_TYPE_ID_FLOAT
105 <td>\ref ctfirfloatfieldtype
106 <td>\ref ctfirfloatfield
109 <td>#BT_CTF_TYPE_ID_ENUM
110 <td>\ref ctfirenumfieldtype
111 <td>\ref ctfirenumfield
114 <td>#BT_CTF_TYPE_ID_STRING
115 <td>\ref ctfirstringfieldtype
116 <td>\ref ctfirstringfield
119 <td>#BT_CTF_TYPE_ID_STRUCT
120 <td>\ref ctfirstructfieldtype
121 <td>\ref ctfirstructfield
124 <td>#BT_CTF_TYPE_ID_ARRAY
125 <td>\ref ctfirarrayfieldtype
126 <td>\ref ctfirarrayfield
129 <td>#BT_CTF_TYPE_ID_SEQUENCE
130 <td>\ref ctfirseqfieldtype
131 <td>\ref ctfirseqfield
134 <td>#BT_CTF_TYPE_ID_VARIANT
135 <td>\ref ctfirvarfieldtype
136 <td>\ref ctfirvarfield
140 Each field type has its own <strong>type ID</strong> (see
141 #bt_ctf_type_id). You get the type ID of a field type object
142 with bt_ctf_field_type_get_type_id().
144 You can get a deep copy of a field type with bt_ctf_field_type_copy().
145 This function resets, in the field type copy, the resolved field type
146 of the dynamic field types. The automatic resolving can be done again
147 when you eventually call bt_ctf_event_create(),
148 bt_ctf_stream_class_add_event_class(), or
149 bt_ctf_trace_add_stream_class().
151 You \em must always use bt_ctf_field_type_compare() to compare two
152 field types. Since some parts of the Babeltrace system can copy field
153 types behind the scenes, you \em cannot rely on a simple field type
156 As with any Babeltrace object, CTF IR field type objects have
157 <a href="https://en.wikipedia.org/wiki/Reference_counting">reference
158 counts</a>. See \ref refs to learn more about the reference counting
159 management of Babeltrace objects.
161 The following functions can \em freeze field type objects:
163 - bt_ctf_field_create() freezes its field type parameter.
164 - bt_ctf_stream_class_add_event_class(), if its
165 \link ctfirstreamclass CTF IR stream class\endlink parameter has a
166 \link ctfirtraceclass CTF IR trace class\endlink parent, freezes
167 the root field types of its
168 \link ctfireventclass CTF IR event class\endlink parameter.
169 - bt_ctf_trace_add_stream_class() freezes the root field types of the
170 whole trace class hierarchy (trace class, children stream classes,
171 and their children event classes).
172 - bt_ctf_writer_create_stream() freezes the root field types of the
173 whole CTF writer's trace class hierarchy.
174 - bt_ctf_event_create() freezes the root field types of its event class
175 parameter and of ther parent stream class of this event class.
180 @brief CTF IR field type type and functions.
183 @addtogroup ctfirfieldtypes
188 @struct bt_ctf_field_type
189 @brief A CTF IR field type.
192 struct bt_ctf_field_type
;
193 struct bt_ctf_event_class
;
196 struct bt_ctf_field_path
;
198 /** @cond DOCUMENT */
201 * Babeltrace 1.x enumerations that were also used in CTF writer's API.
202 * They are left here for backward compatibility reasons, but
203 * enum bt_ctf_type_id and enum bt_ctf_string_encoding should be used
204 * in new code. Both new enumerations are compatible with their legacy
208 CTF_TYPE_UNKNOWN
= 0,
214 CTF_TYPE_UNTAGGED_VARIANT
,
224 enum ctf_string_encoding
{
237 /// Unknown, used for errors.
238 BT_CTF_SCOPE_UNKNOWN
= -1,
240 /// Trace packet header.
241 BT_CTF_SCOPE_TRACE_PACKET_HEADER
= 1,
243 /// Stream packet context.
244 BT_CTF_SCOPE_STREAM_PACKET_CONTEXT
= 2,
246 /// Stream event header.
247 BT_CTF_SCOPE_STREAM_EVENT_HEADER
= 3,
249 /// Stream event context.
250 BT_CTF_SCOPE_STREAM_EVENT_CONTEXT
= 4,
253 BT_CTF_SCOPE_EVENT_CONTEXT
= 5,
256 BT_CTF_SCOPE_EVENT_PAYLOAD
= 6,
259 BT_CTF_SCOPE_ENV
= 0,
260 BT_CTF_SCOPE_EVENT_FIELDS
= 6,
265 @name Type information
270 @brief Type ID of a @ft.
272 enum bt_ctf_type_id
{
273 /// Unknown, used for errors.
274 BT_CTF_TYPE_ID_UNKNOWN
= CTF_TYPE_UNKNOWN
,
276 /// \ref ctfirintfieldtype
277 BT_CTF_TYPE_ID_INTEGER
= CTF_TYPE_INTEGER
,
279 /// \ref ctfirfloatfieldtype
280 BT_CTF_TYPE_ID_FLOAT
= CTF_TYPE_FLOAT
,
282 /// \ref ctfirenumfieldtype
283 BT_CTF_TYPE_ID_ENUM
= CTF_TYPE_ENUM
,
285 /// \ref ctfirstringfieldtype
286 BT_CTF_TYPE_ID_STRING
= CTF_TYPE_STRING
,
288 /// \ref ctfirstructfieldtype
289 BT_CTF_TYPE_ID_STRUCT
= CTF_TYPE_STRUCT
,
292 BT_CTF_TYPE_ID_UNTAGGED_VARIANT
= CTF_TYPE_UNTAGGED_VARIANT
,
295 /// \ref ctfirarrayfieldtype
296 BT_CTF_TYPE_ID_ARRAY
= CTF_TYPE_ARRAY
,
298 /// \ref ctfirseqfieldtype
299 BT_CTF_TYPE_ID_SEQUENCE
= CTF_TYPE_SEQUENCE
,
301 /// \ref ctfirvarfieldtype
302 BT_CTF_TYPE_ID_VARIANT
= CTF_TYPE_VARIANT
,
304 /// Number of enumeration entries.
305 BT_CTF_NR_TYPE_IDS
= NR_CTF_TYPES
,
309 @brief Returns the type ID of the @ft \p field_type.
311 @param[in] field_type Field type of which to get the type ID.
312 @returns Type ID of \p field_type,
313 or #BT_CTF_TYPE_ID_UNKNOWN on error.
315 @prenotnull{field_type}
316 @postrefcountsame{field_type}
318 @sa #bt_ctf_type_id: CTF IR field type ID.
319 @sa bt_ctf_field_type_is_integer(): Returns whether or not a given
320 field type is a @intft.
321 @sa bt_ctf_field_type_is_floating_point(): Returns whether or not a
322 given field type is a @floatft.
323 @sa bt_ctf_field_type_is_enumeration(): Returns whether or not a given
324 field type is a @enumft.
325 @sa bt_ctf_field_type_is_string(): Returns whether or not a given
326 field type is a @stringft.
327 @sa bt_ctf_field_type_is_structure(): Returns whether or not a given
328 field type is a @structft.
329 @sa bt_ctf_field_type_is_array(): Returns whether or not a given
330 field type is a @arrayft.
331 @sa bt_ctf_field_type_is_sequence(): Returns whether or not a given
332 field type is a @seqft.
333 @sa bt_ctf_field_type_is_variant(): Returns whether or not a given
334 field type is a @varft.
336 extern enum bt_ctf_type_id
bt_ctf_field_type_get_type_id(
337 struct bt_ctf_field_type
*field_type
);
340 @brief Returns whether or not the @ft \p field_type is a @intft.
342 @param[in] field_type Field type to check (can be \c NULL).
343 @returns 1 if \p field_type is an integer field type,
344 or 0 otherwise (including if \p field_type is
347 @prenotnull{field_type}
348 @postrefcountsame{field_type}
350 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
353 extern int bt_ctf_field_type_is_integer(struct bt_ctf_field_type
*field_type
);
356 @brief Returns whether or not the @ft \p field_type is a @floatft.
358 @param[in] field_type Field type to check (can be \c NULL).
359 @returns 1 if \p field_type is a floating point
361 or 0 otherwise (including if \p field_type is
364 @postrefcountsame{field_type}
366 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
369 extern int bt_ctf_field_type_is_floating_point(struct bt_ctf_field_type
*field_type
);
372 @brief Returns whether or not the @ft \p field_type is a @enumft.
374 @param[in] field_type Field type to check (can be \c NULL).
375 @returns 1 if \p field_type is an enumeration field type,
376 or 0 otherwise (including if \p field_type is
379 @postrefcountsame{field_type}
381 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
384 extern int bt_ctf_field_type_is_enumeration(struct bt_ctf_field_type
*field_type
);
387 @brief Returns whether or not the @ft \p field_type is a @stringft.
389 @param[in] field_type Field type to check (can be \c NULL).
390 @returns 1 if \p field_type is a string field type,
391 or 0 otherwise (including if \p field_type is
394 @postrefcountsame{field_type}
396 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
399 extern int bt_ctf_field_type_is_string(struct bt_ctf_field_type
*field_type
);
402 @brief Returns whether or not the @ft \p field_type is a @structft.
404 @param[in] field_type Field type to check (can be \c NULL).
405 @returns 1 if \p field_type is a structure field type,
406 or 0 otherwise (including if \p field_type is
409 @postrefcountsame{field_type}
411 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
414 extern int bt_ctf_field_type_is_structure(struct bt_ctf_field_type
*field_type
);
417 @brief Returns whether or not the @ft \p field_type is a @arrayft.
419 @param[in] field_type Field type to check (can be \c NULL).
420 @returns 1 if \p field_type is an array field type,
421 or 0 otherwise (including if \p field_type is
424 @postrefcountsame{field_type}
426 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
429 extern int bt_ctf_field_type_is_array(struct bt_ctf_field_type
*field_type
);
432 @brief Returns whether or not the @ft \p field_type is a @seqft.
434 @param[in] field_type Field type to check (can be \c NULL).
435 @returns 1 if \p field_type is a sequence field type,
436 or 0 otherwise (including if \p field_type is
439 @postrefcountsame{field_type}
441 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
444 extern int bt_ctf_field_type_is_sequence(struct bt_ctf_field_type
*field_type
);
447 @brief Returns whether or not the @ft \p field_type is a @varft.
449 @param[in] field_type Field type to check (can be \c NULL).
450 @returns 1 if \p field_type is a variant field type,
451 or 0 otherwise (including if \p field_type is
454 @postrefcountsame{field_type}
456 @sa bt_ctf_field_type_get_type_id(): Returns the type ID of a given
459 extern int bt_ctf_field_type_is_variant(struct bt_ctf_field_type
*field_type
);
464 @name Common properties types and functions
469 @brief <a href="https://en.wikipedia.org/wiki/Endianness">Byte order</a>
472 enum bt_ctf_byte_order
{
473 /// Unknown, used for errors.
474 BT_CTF_BYTE_ORDER_UNKNOWN
= -1,
477 * Note that native, in the context of the CTF specification, is defined
478 * as "the byte order described in the trace" and does not mean that the
479 * host's endianness will be used.
481 /// Native (default) byte order.
482 BT_CTF_BYTE_ORDER_NATIVE
= 0,
485 BT_CTF_BYTE_ORDER_LITTLE_ENDIAN
,
488 BT_CTF_BYTE_ORDER_BIG_ENDIAN
,
490 /// Network byte order (big-endian).
491 BT_CTF_BYTE_ORDER_NETWORK
,
495 @brief String encoding of a @ft.
497 enum bt_ctf_string_encoding
{
498 /// Unknown, used for errors.
499 BT_CTF_STRING_ENCODING_UNKNOWN
= CTF_STRING_UNKNOWN
,
502 BT_CTF_STRING_ENCODING_NONE
= CTF_STRING_NONE
,
504 /// <a href="https://en.wikipedia.org/wiki/UTF-8">UTF-8</a>.
505 BT_CTF_STRING_ENCODING_UTF8
= CTF_STRING_UTF8
,
507 /// <a href="https://en.wikipedia.org/wiki/ASCII">ASCII</a>.
508 BT_CTF_STRING_ENCODING_ASCII
= CTF_STRING_ASCII
,
512 @brief Returns the alignment of the @fields described by
513 the @ft \p field_type.
515 @param[in] field_type Field type which describes the
516 fields of which to get the alignment.
517 @returns Alignment of the fields described by
518 \p field_type, or a negative value on error.
520 @prenotnull{field_type}
521 @postrefcountsame{field_type}
523 @sa bt_ctf_field_type_set_alignment(): Sets the alignment
524 of the fields described by a given field type.
526 extern int bt_ctf_field_type_get_alignment(
527 struct bt_ctf_field_type
*field_type
);
530 @brief Sets the alignment of the @fields described by the
531 @ft \p field_type to \p alignment.
533 \p alignment \em must be greater than 0 and a power of two.
535 @param[in] field_type Field type which describes the fields of
536 which to set the alignment.
537 @param[in] alignment Alignment of the fields described by
539 @returns 0 on success, or a negative value on error.
541 @prenotnull{field_type}
543 @pre \p alignment is greater than 0 and a power of two.
544 @postrefcountsame{field_type}
546 @sa bt_ctf_field_type_get_alignment(): Returns the alignment of the
547 fields described by a given field type.
549 extern int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type
*field_type
,
550 unsigned int alignment
);
553 @brief Returns the byte order of the @fields described by
554 the @ft \p field_type.
556 You can only call this function if \p field_type is a @intft, a
557 @floatft, or a @enumft.
559 @param[in] field_type Field type which describes the
560 fields of which to get the byte order.
561 @returns Byte order of the fields described by
562 \p field_type, or #BT_CTF_BYTE_ORDER_UNKNOWN on
565 @prenotnull{field_type}
566 @pre \p field_type is a @intft, a @floatft, or a @enumft.
567 @postrefcountsame{field_type}
569 @sa bt_ctf_field_type_set_byte_order(): Sets the byte order
570 of the fields described by a given field type.
572 extern enum bt_ctf_byte_order
bt_ctf_field_type_get_byte_order(
573 struct bt_ctf_field_type
*field_type
);
576 @brief Sets the byte order of the @fields described by the
577 @ft \p field_type to \p byte_order.
579 If \p field_type is a compound field type, this function also
580 recursively sets the byte order of its children to \p byte_order.
582 @param[in] field_type Field type which describes the fields of
583 which to set the byte order.
584 @param[in] byte_order Alignment of the fields described by
586 @returns 0 on success, or a negative value on error.
588 @prenotnull{field_type}
590 @pre \p byte_order is #BT_CTF_BYTE_ORDER_NATIVE,
591 #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN, #BT_CTF_BYTE_ORDER_BIG_ENDIAN,
592 or #BT_CTF_BYTE_ORDER_NETWORK.
593 @postrefcountsame{field_type}
595 @sa bt_ctf_field_type_get_byte_order(): Returns the byte order of the
596 fields described by a given field type.
598 extern int bt_ctf_field_type_set_byte_order(
599 struct bt_ctf_field_type
*field_type
,
600 enum bt_ctf_byte_order byte_order
);
605 @name Utility functions
610 @brief Returns whether or not the @ft \p field_type_a
611 is equivalent to the field type \p field_type_b.
613 You \em must use this function to compare two field types: it is not
614 safe to compare two pointer values directly, because, for internal
615 reasons, some parts of the Babeltrace system can copy user field types
616 and discard the original ones.
618 @param[in] field_type_a Field type to compare to \p field_type_b.
619 @param[in] field_type_b Field type to compare to \p field_type_a.
620 @returns 0 if \p field_type_a is equivalent to
621 \p field_type_b, 1 if they are not equivalent,
622 or a negative value on error.
624 @prenotnull{field_type_a}
625 @prenotnull{field_type_b}
626 @postrefcountsame{field_type_a}
627 @postrefcountsame{field_type_b}
629 extern int bt_ctf_field_type_compare(struct bt_ctf_field_type
*field_type_a
,
630 struct bt_ctf_field_type
*field_type_b
);
633 @brief Creates a \em deep copy of the @ft \p field_type.
635 You can copy a frozen field type: the resulting copy is
638 This function resets the tag field type of a copied @varft. The
639 automatic field resolving which some functions of the API perform
640 can set it again when the returned field type is used (learn more
641 in the detailed description of this module).
643 @param[in] field_type Field type to copy.
644 @returns Deep copy of \p field_type on success,
647 @prenotnull{field_type}
648 @postrefcountsame{field_type}
649 @postsuccessrefcountret1
651 extern struct bt_ctf_field_type
*bt_ctf_field_type_copy(
652 struct bt_ctf_field_type
*field_type
);
659 @defgroup ctfirintfieldtype CTF IR integer field type
660 @ingroup ctfirfieldtypes
661 @brief CTF IR integer field type.
664 #include <babeltrace/ctf-ir/field-types.h>
667 A CTF IR <strong><em>integer field type</em></strong> is a field type that
668 you can use to create concrete @intfield objects.
670 You can create an integer field type
671 with bt_ctf_field_type_integer_create().
673 An integer field type has the following properties:
678 <th>Value at creation
683 <td>\b Alignment (bits) of the described integer fields
685 <td>bt_ctf_field_type_get_alignment()
686 <td>bt_ctf_field_type_set_alignment()
689 <td><strong>Byte order</strong> of the described integer fields
690 <td>#BT_CTF_BYTE_ORDER_NATIVE
691 <td>bt_ctf_field_type_get_byte_order()
692 <td>bt_ctf_field_type_set_byte_order()
695 <td><strong>Storage size</strong> (bits) of the described
697 <td>Specified at creation
698 <td>bt_ctf_field_type_integer_get_size()
699 <td>None: specified at creation (bt_ctf_field_type_integer_create())
702 <td><strong>Signedness</strong> of the described integer fields
704 <td>bt_ctf_field_type_integer_get_signed()
705 <td>bt_ctf_field_type_integer_set_signed()
708 <td><strong>Preferred display base</strong> of the described
710 <td>#BT_CTF_INTEGER_BASE_DECIMAL
711 <td>bt_ctf_field_type_integer_get_base()
712 <td>bt_ctf_field_type_integer_set_base()
715 <td>\b Encoding of the described integer fields
716 <td>#BT_CTF_STRING_ENCODING_NONE
717 <td>bt_ctf_field_type_integer_get_encoding()
718 <td>bt_ctf_field_type_integer_set_encoding()
722 \link ctfirclockclass CTF IR clock class\endlink</strong>
724 <td>bt_ctf_field_type_integer_get_mapped_clock()
725 <td>bt_ctf_field_type_integer_set_mapped_clock()
732 @addtogroup ctfirintfieldtype
737 @brief Preferred display base (radix) of a @intft.
739 enum bt_ctf_integer_base
{
740 /// Unknown, used for errors.
741 BT_CTF_INTEGER_BASE_UNKNOWN
= -1,
744 BT_CTF_INTEGER_BASE_BINARY
= 2,
747 BT_CTF_INTEGER_BASE_OCTAL
= 8,
750 BT_CTF_INTEGER_BASE_DECIMAL
= 10,
753 BT_CTF_INTEGER_BASE_HEXADECIMAL
= 16,
757 @brief Creates a default @intft with \p size bits as the storage size
758 of the @intfields it describes.
760 @param[in] size Storage size (bits) of the described integer fields.
761 @returns Created integer field type, or \c NULL on error.
763 @pre \p size is greater than 0 and lesser than or equal to 64.
764 @postsuccessrefcountret1
766 extern struct bt_ctf_field_type
*bt_ctf_field_type_integer_create(
770 @brief Returns the storage size, in bits, of the @intfields
771 described by the @intft \p int_field_type.
773 @param[in] int_field_type Integer field type which describes the
774 integer fields of which to get the
776 @returns Storage size (bits) of the integer
777 fields described by \p int_field_type,
778 or a negative value on error.
780 @prenotnull{int_field_type}
781 @preisintft{int_field_type}
782 @postrefcountsame{int_field_type}
784 extern int bt_ctf_field_type_integer_get_size(
785 struct bt_ctf_field_type
*int_field_type
);
788 @brief Returns whether or not the @intfields described by the @intft
789 \p int_field_type are signed.
791 @param[in] int_field_type Integer field type which describes the
792 integer fields of which to get the
794 @returns 1 if the integer fields described by
795 \p int_field_type are signed, 0 if they
796 are unsigned, or a negative value on
799 @prenotnull{int_field_type}
800 @preisintft{int_field_type}
801 @postrefcountsame{int_field_type}
803 @sa bt_ctf_field_type_integer_set_signed(): Sets the signedness of the
804 integer fields described by a given integer field type.
806 extern int bt_ctf_field_type_integer_get_signed(
807 struct bt_ctf_field_type
*int_field_type
);
810 @brief Sets whether or not the @intfields described by
811 the @intft \p int_field_type are signed.
813 @param[in] int_field_type Integer field type which describes the
814 integer fields of which to set the
816 @param[in] is_signed Signedness of the integer fields
817 described by \p int_field_type; 0 means
818 \em unsigned, 1 means \em signed.
819 @returns 0 on success, or a negative value on error.
821 @prenotnull{int_field_type}
822 @preisintft{int_field_type}
823 @prehot{int_field_type}
824 @pre \p is_signed is 0 or 1.
825 @postrefcountsame{event_class}
827 @sa bt_ctf_field_type_integer_get_signed(): Returns the signedness of
828 the integer fields described by a given integer field type.
830 extern int bt_ctf_field_type_integer_set_signed(
831 struct bt_ctf_field_type
*int_field_type
, int is_signed
);
834 @brief Returns the preferred display base (radix) of the @intfields
835 described by the @intft \p int_field_type.
837 @param[in] int_field_type Integer field type which describes the
838 integer fields of which to get the
839 preferred display base.
840 @returns Preferred display base of the integer
841 fields described by \p int_field_type,
842 or #BT_CTF_INTEGER_BASE_UNKNOWN on
845 @prenotnull{int_field_type}
846 @preisintft{int_field_type}
847 @postrefcountsame{int_field_type}
849 @sa bt_ctf_field_type_integer_set_base(): Sets the preferred display
850 base of the integer fields described by a given integer field
853 extern enum bt_ctf_integer_base
bt_ctf_field_type_integer_get_base(
854 struct bt_ctf_field_type
*int_field_type
);
857 @brief Sets the preferred display base (radix) of the @intfields
858 described by the @intft \p int_field_type to \p base.
860 @param[in] int_field_type Integer field type which describes the
861 integer fields of which to set the
862 preferred display base.
863 @param[in] base Preferred display base of the integer
864 fields described by \p int_field_type.
865 @returns 0 on success, or a negative value on error.
867 @prenotnull{int_field_type}
868 @preisintft{int_field_type}
869 @prehot{int_field_type}
870 @pre \p base is #BT_CTF_INTEGER_BASE_BINARY, #BT_CTF_INTEGER_BASE_OCTAL,
871 #BT_CTF_INTEGER_BASE_DECIMAL, or
872 #BT_CTF_INTEGER_BASE_HEXADECIMAL.
873 @postrefcountsame{int_field_type}
875 @sa bt_ctf_field_type_integer_get_base(): Returns the preferred display
876 base of the integer fields described by a given
879 extern int bt_ctf_field_type_integer_set_base(
880 struct bt_ctf_field_type
*int_field_type
,
881 enum bt_ctf_integer_base base
);
884 @brief Returns the encoding of the @intfields described by
885 the @intft \p int_field_type.
887 @param[in] int_field_type Integer field type which describes the
888 integer fields of which to get the
890 @returns Encoding of the integer
891 fields described by \p int_field_type,
892 or #BT_CTF_STRING_ENCODING_UNKNOWN on
895 @prenotnull{int_field_type}
896 @preisintft{int_field_type}
897 @postrefcountsame{int_field_type}
899 @sa bt_ctf_field_type_integer_set_encoding(): Sets the encoding
900 of the integer fields described by a given integer field type.
902 extern enum bt_ctf_string_encoding
bt_ctf_field_type_integer_get_encoding(
903 struct bt_ctf_field_type
*int_field_type
);
906 @brief Sets the encoding of the @intfields described by the @intft
907 \p int_field_type to \p encoding.
909 You can use this property, in CTF IR, to create "text" @arrayfts or
910 @seqfts. A text array field type is array field type with an unsigned,
911 8-bit integer field type having an encoding as its element field type.
913 @param[in] int_field_type Integer field type which describes the
914 integer fields of which to set the
916 @param[in] encoding Encoding of the integer
917 fields described by \p int_field_type.
918 @returns 0 on success, or a negative value on error.
920 @prenotnull{int_field_type}
921 @preisintft{int_field_type}
922 @prehot{int_field_type}
923 @pre \p encoding is #BT_CTF_STRING_ENCODING_NONE,
924 #BT_CTF_STRING_ENCODING_ASCII, or
925 #BT_CTF_STRING_ENCODING_UTF8.
926 @postrefcountsame{int_field_type}
928 @sa bt_ctf_field_type_integer_get_encoding(): Returns the encoding of
929 the integer fields described by a given integer field type.
931 extern int bt_ctf_field_type_integer_set_encoding(
932 struct bt_ctf_field_type
*int_field_type
,
933 enum bt_ctf_string_encoding encoding
);
936 @brief Returns the \link ctfirclockclass CTF IR clock class\endlink
937 mapped to the @intft \p int_field_type.
939 The mapped clock class, if any, indicates the class of the clock which
940 an @intfield described by \p int_field_type should sample or update.
941 This mapped clock class is only indicative.
943 @param[in] int_field_type Integer field type of which to get the
945 @returns Mapped clock class of \p int_field_type,
946 or \c NULL if there's no mapped clock
949 @prenotnull{int_field_type}
950 @preisintft{int_field_type}
951 @postrefcountsame{int_field_type}
952 @postsuccessrefcountretinc
954 @sa bt_ctf_field_type_integer_set_mapped_clock(): Sets the mapped
955 clock class of a given integer field type.
957 extern struct bt_ctf_clock
*bt_ctf_field_type_integer_get_mapped_clock(
958 struct bt_ctf_field_type
*int_field_type
);
961 @brief Sets the \link ctfirclockclass CTF IR clock class\endlink mapped
962 to the @intft \p int_field_type to \p mapped_clock.
964 The mapped clock class, if any, indicates the class of the clock which
965 an integer field described by \p int_field_type should sample or update.
966 This mapped clock class is only indicative.
968 @param[in] int_field_type Integer field type of which to set the
970 @param[in] clock_class Mapped clock class of \p int_field_type.
971 @returns 0 on success, or a negative value on error.
973 @prenotnull{int_field_type}
974 @prenotnull{clock_class}
975 @preisintft{int_field_type}
976 @prehot{int_field_type}
977 @postrefcountsame{int_field_type}
978 @postsuccessrefcountinc{clock_class}
980 @sa bt_ctf_field_type_integer_get_mapped_clock(): Returns the mapped
981 clock class of a given integer field type.
983 extern int bt_ctf_field_type_integer_set_mapped_clock(
984 struct bt_ctf_field_type
*int_field_type
,
985 struct bt_ctf_clock
*clock_class
);
990 @defgroup ctfirfloatfieldtype CTF IR floating point number field type
991 @ingroup ctfirfieldtypes
992 @brief CTF IR floating point number field type.
995 #include <babeltrace/ctf-ir/field-types.h>
998 A CTF IR <strong><em>floating point number field type</em></strong> is
999 a field type that you can use to create concrete @floatfields.
1001 You can create a floating point number field type
1002 with bt_ctf_field_type_floating_point_create().
1004 A floating point number field type has the following properties:
1009 <th>Value at creation
1014 <td>\b Alignment (bits) of the described floating point
1017 <td>bt_ctf_field_type_get_alignment()
1018 <td>bt_ctf_field_type_set_alignment()
1021 <td><strong>Byte order</strong> of the described floating point
1023 <td>#BT_CTF_BYTE_ORDER_NATIVE
1024 <td>bt_ctf_field_type_get_byte_order()
1025 <td>bt_ctf_field_type_set_byte_order()
1028 <td><strong>Exponent storage size</strong> (bits) of the described
1029 floating point number fields
1031 <td>bt_ctf_field_type_floating_point_get_exponent_digits()
1032 <td>bt_ctf_field_type_floating_point_set_exponent_digits()
1035 <td><strong>Mantissa and sign storage size</strong> (bits) of the
1036 described floating point number fields
1037 <td>24 (23-bit mantissa, 1-bit sign)
1038 <td>bt_ctf_field_type_floating_point_get_mantissa_digits()
1039 <td>bt_ctf_field_type_floating_point_set_mantissa_digits()
1046 @addtogroup ctfirfloatfieldtype
1051 @brief Creates a default @floatft.
1053 @returns Created floating point number field type,
1054 or \c NULL on error.
1056 @postsuccessrefcountret1
1058 extern struct bt_ctf_field_type
*bt_ctf_field_type_floating_point_create(void);
1061 @brief Returns the exponent storage size of the @floatfields
1062 described by the @floatft \p float_field_type.
1064 @param[in] float_field_type Floating point number field type which
1065 describes the floating point number
1066 fields of which to get the exponent
1068 @returns Exponent storage size of the
1069 floating point number fields
1070 described by \p float_field_type,
1071 or a negative value on error.
1073 @prenotnull{float_field_type}
1074 @preisfloatft{float_field_type}
1075 @postrefcountsame{float_field_type}
1077 @sa bt_ctf_field_type_floating_point_set_exponent_digits(): Sets the
1078 exponent storage size of the floating point number fields
1079 described by a given floating point number field type.
1081 extern int bt_ctf_field_type_floating_point_get_exponent_digits(
1082 struct bt_ctf_field_type
*float_field_type
);
1085 @brief Sets the exponent storage size of the @floatfields described by
1086 the @floatft \p float_field_type to \p exponent_size.
1088 As of Babeltrace \btversion, \p exponent_size can only be 8 or 11.
1090 @param[in] float_field_type Floating point number field type which
1091 describes the floating point number
1092 fields of which to set the exponent
1094 @param[in] exponent_size Exponent storage size of the floating
1095 point number fields described by \p
1097 @returns 0 on success, or a negative value on error.
1099 @prenotnull{float_field_type}
1100 @preisfloatft{float_field_type}
1101 @prehot{float_field_type}
1102 @pre \p exponent_size is 8 or 11.
1103 @postrefcountsame{float_field_type}
1105 @sa bt_ctf_field_type_floating_point_get_exponent_digits(): Returns the
1106 exponent storage size of the floating point number fields
1107 described by a given floating point number field type.
1109 extern int bt_ctf_field_type_floating_point_set_exponent_digits(
1110 struct bt_ctf_field_type
*float_field_type
,
1111 unsigned int exponent_size
);
1114 @brief Returns the mantissa and sign storage size of the @floatfields
1115 described by the @floatft \p float_field_type.
1117 On success, the returned value is the sum of the mantissa \em and
1120 @param[in] float_field_type Floating point number field type which
1121 describes the floating point number
1122 fields of which to get the mantissa and
1124 @returns Mantissa and sign storage size of the
1125 floating point number fields
1126 described by \p float_field_type,
1127 or a negative value on error.
1129 @prenotnull{float_field_type}
1130 @preisfloatft{float_field_type}
1131 @postrefcountsame{float_field_type}
1133 @sa bt_ctf_field_type_floating_point_set_mantissa_digits(): Sets the
1134 mantissa and size storage size of the floating point number
1135 fields described by a given floating point number field type.
1137 extern int bt_ctf_field_type_floating_point_get_mantissa_digits(
1138 struct bt_ctf_field_type
*float_field_type
);
1141 @brief Sets the mantissa and sign storage size of the @floatfields
1142 described by the @floatft \p float_field_type to \p
1145 As of Babeltrace \btversion, \p mantissa_sign_size can only be 24 or 53.
1147 @param[in] float_field_type Floating point number field type which
1148 describes the floating point number
1149 fields of which to set the mantissa and
1151 @param[in] mantissa_sign_size Mantissa and sign storage size of the
1152 floating point number fields described
1153 by \p float_field_type.
1154 @returns 0 on success, or a negative value on error.
1156 @prenotnull{float_field_type}
1157 @preisfloatft{float_field_type}
1158 @prehot{float_field_type}
1159 @pre \p mantissa_sign_size is 24 or 53.
1160 @postrefcountsame{float_field_type}
1162 @sa bt_ctf_field_type_floating_point_get_mantissa_digits(): Returns the
1163 mantissa and sign storage size of the floating point number
1164 fields described by a given floating point number field type.
1166 extern int bt_ctf_field_type_floating_point_set_mantissa_digits(
1167 struct bt_ctf_field_type
*float_field_type
,
1168 unsigned int mantissa_sign_size
);
1173 @defgroup ctfirenumfieldtype CTF IR enumeration field type
1174 @ingroup ctfirfieldtypes
1175 @brief CTF IR enumeration field type.
1178 #include <babeltrace/ctf-ir/field-types.h>
1181 A CTF IR <strong><em>enumeration field type</em></strong> is
1182 a field type that you can use to create concrete @enumfields.
1184 You can create an enumeration field type with
1185 bt_ctf_field_type_enumeration_create(). This function needs a @intft
1186 which represents the storage field type of the created enumeration field
1187 type. In other words, an enumeration field type wraps an integer field
1188 type and adds label-value mappings to it.
1190 An enumeration mapping has:
1192 - A <strong>name</strong>.
1193 - A <strong>range of values</strong> given by a beginning and an ending
1194 value, both included in the range.
1196 You can add a mapping to an enumeration field type with
1197 bt_ctf_field_type_enumeration_add_mapping() or
1198 bt_ctf_field_type_enumeration_add_mapping_unsigned(), depending on the
1199 signedness of the wrapped @intft.
1201 Many mappings can share the same name, but the ranges of a given
1202 enumeration field type <strong>must not overlap</strong>. For example,
1203 this is a valid set of mappings:
1212 The following set of mappings is \em not valid, however:
1221 Here, the range of the second \c APPLE mapping overlaps the range of
1222 the \c CHERRY mapping.
1227 @addtogroup ctfirenumfieldtype
1232 @brief Creates a default @enumft wrapping the @intft \p int_field_type.
1234 @param[in] int_field_type Integer field type wrapped by the
1235 created enumeration field type.
1236 @returns Created enumeration field type,
1237 or \c NULL on error.
1239 @prenotnull{int_field_type}
1240 @preisintft{int_field_type}
1241 @postsuccessrefcountinc{int_field_type}
1242 @postsuccessrefcountret1
1244 extern struct bt_ctf_field_type
*bt_ctf_field_type_enumeration_create(
1245 struct bt_ctf_field_type
*int_field_type
);
1248 @brief Returns the @intft wrapped by the @enumft \p enum_field_type.
1250 @param[in] enum_field_type Enumeration field type of which to get
1251 the wrapped integer field type.
1252 @returns Integer field type wrapped by
1253 \p enum_field_type, or \c NULL on
1256 @prenotnull{enum_field_type}
1257 @preisenumft{enum_field_type}
1258 @postrefcountsame{enum_field_type}
1259 @postsuccessrefcountretinc
1262 struct bt_ctf_field_type
*bt_ctf_field_type_enumeration_get_container_type(
1263 struct bt_ctf_field_type
*enum_field_type
);
1266 @brief Returns the number of mappings contained in the
1267 @enumft \p enum_field_type.
1269 @param[in] enum_field_type Enumeration field type of which to get
1270 the number of contained mappings.
1271 @returns Number of mappings contained in
1272 \p enum_field_type, or a negative
1275 @prenotnull{enum_field_type}
1276 @preisenumft{enum_field_type}
1277 @postrefcountsame{enum_field_type}
1279 extern int bt_ctf_field_type_enumeration_get_mapping_count(
1280 struct bt_ctf_field_type
*enum_field_type
);
1283 @brief Returns the signed mapping of the @enumft
1284 \p enum_field_type at index \p index.
1286 The @intft wrapped by \p enum_field_type, as returned by
1287 bt_ctf_field_type_enumeration_get_container_type(), must be \b signed
1288 to use this function.
1290 On success, \p enum_field_type remains the sole owner of \p *name.
1292 @param[in] enum_field_type Enumeration field type of which to get
1293 the mapping at index \p index.
1294 @param[in] index Index of the mapping to get from
1296 @param[out] name Returned name of the mapping at index
1298 @param[out] range_begin Returned beginning of the range
1299 (included) of the mapping at index \p
1301 @param[out] range_end Returned end of the range (included) of
1302 the mapping at index \p index.
1303 @returns 0 on success, or a negative value on error.
1305 @prenotnull{enum_field_type}
1307 @prenotnull{range_begin}
1308 @prenotnull{range_end}
1309 @preisenumft{enum_field_type}
1310 @pre The wrapped @intft of \p enum_field_type is signed.
1311 @pre \p index is lesser than the number of mappings contained in the
1312 enumeration field type \p enum_field_type (see
1313 bt_ctf_field_type_enumeration_get_mapping_count()).
1314 @postrefcountsame{enum_field_type}
1316 @sa bt_ctf_field_type_enumeration_get_mapping_unsigned(): Returns the
1317 unsigned mapping contained by a given enumeration field type
1320 extern int bt_ctf_field_type_enumeration_get_mapping(
1321 struct bt_ctf_field_type
*enum_field_type
, int index
,
1322 const char **name
, int64_t *range_begin
, int64_t *range_end
);
1325 @brief Returns the unsigned mapping of the @enumft
1326 \p enum_field_type at index \p index.
1328 The @intft wrapped by \p enum_field_type, as returned by
1329 bt_ctf_field_type_enumeration_get_container_type(), must be
1330 \b unsigned to use this function.
1332 On success, \p enum_field_type remains the sole owner of \p *name.
1334 @param[in] enum_field_type Enumeration field type of which to get
1335 the mapping at index \p index.
1336 @param[in] index Index of the mapping to get from
1338 @param[out] name Returned name of the mapping at index
1340 @param[out] range_begin Returned beginning of the range
1341 (included) of the mapping at index \p
1343 @param[out] range_end Returned end of the range (included) of
1344 the mapping at index \p index.
1345 @returns 0 on success, or a negative value on error.
1347 @prenotnull{enum_field_type}
1349 @prenotnull{range_begin}
1350 @prenotnull{range_end}
1351 @preisenumft{enum_field_type}
1352 @pre The wrapped @intft of \p enum_field_type is unsigned.
1353 @pre \p index is lesser than the number of mappings contained in the
1354 enumeration field type \p enum_field_type (see
1355 bt_ctf_field_type_enumeration_get_mapping_count()).
1356 @postrefcountsame{enum_field_type}
1358 @sa bt_ctf_field_type_enumeration_get_mapping(): Returns the
1359 signed mapping contained by a given enumeration field type
1362 extern int bt_ctf_field_type_enumeration_get_mapping_unsigned(
1363 struct bt_ctf_field_type
*enum_field_type
, int index
,
1364 const char **name
, uint64_t *range_begin
,
1365 uint64_t *range_end
);
1367 /** @cond DOCUMENT */
1369 * TODO: Document once we know what to do with this function (return
1370 * the first match?).
1372 extern int bt_ctf_field_type_enumeration_get_mapping_index_by_name(
1373 struct bt_ctf_field_type
*enum_field_type
, const char *name
);
1377 @brief Returns the index of the signed mapping of the @enumft
1378 \p field_type which contains the value \p value.
1380 The @intft wrapped by \p enum_field_type, as returned by
1381 bt_ctf_field_type_enumeration_get_container_type(), must be
1382 \b signed to use this function.
1384 @param[in] enum_field_type Enumeration field type of which to get
1385 the index of the mapping which contains
1387 @param[in] value Value of the mapping to find.
1388 @returns Index of the mapping of
1389 \p enum_field_type which contains
1390 \p value, or a negative value if the
1391 function cannot find such a mapping or
1394 @prenotnull{enum_field_type}
1395 @preisenumft{enum_field_type}
1396 @pre The wrapped @intft of \p enum_field_type is signed.
1397 @postrefcountsame{enum_field_type}
1399 @sa bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value():
1400 Finds the index of an unsigned mapping of a given enumeration
1401 field type by value.
1403 extern int bt_ctf_field_type_enumeration_get_mapping_index_by_value(
1404 struct bt_ctf_field_type
*enum_field_type
, int64_t value
);
1407 @brief Returns the index of the unsigned mapping of the @enumft
1408 \p field_type which contains the value \p value.
1410 The @intft wrapped by \p enum_field_type, as returned by
1411 bt_ctf_field_type_enumeration_get_container_type(), must be
1412 \b unsigned to use this function.
1414 @param[in] enum_field_type Enumeration field type of which to get
1415 the index of the mapping which contains
1417 @param[in] value Value of the mapping to find.
1418 @returns Index of the mapping of
1419 \p enum_field_type which contains
1420 \p value, or a negative value if the
1421 function cannot find such a mapping or
1424 @prenotnull{enum_field_type}
1425 @preisenumft{enum_field_type}
1426 @pre The wrapped @intft of \p enum_field_type is unsigned.
1427 @postrefcountsame{enum_field_type}
1429 @sa bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value():
1430 Finds the index of a signed mapping of a given enumeration
1431 field type by value.
1433 extern int bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value(
1434 struct bt_ctf_field_type
*enum_field_type
, uint64_t value
);
1437 @brief Adds a mapping to the @enumft \p enum_field_type which maps the
1438 name \p name to the signed range \p range_begin (included) to
1439 \p range_end (included).
1441 Make \p range_begin and \p range_end the same value to add a mapping
1444 The @intft wrapped by \p enum_field_type, as returned by
1445 bt_ctf_field_type_enumeration_get_container_type(), must be
1446 \b signed to use this function.
1448 A mapping in \p enum_field_type can exist with the name \p name, but
1449 there must be no overlap amongst all the ranges of
1452 @param[in] enum_field_type Enumeration field type to which to add
1454 @param[in] name Name of the mapping to add (copied
1456 @param[in] range_begin Beginning of the range of the mapping
1458 @param[in] range_end End of the range of the mapping
1460 @returns 0 on success, or a negative value on error.
1462 @prenotnull{enum_field_type}
1464 @preisenumft{enum_field_type}
1465 @pre The wrapped @intft of \p enum_field_type is signed.
1466 @pre \p range_end is greater than or equal to \p range_begin.
1467 @postrefcountsame{enum_field_type}
1469 @sa bt_ctf_field_type_enumeration_add_mapping_unsigned(): Adds an
1470 unsigned mapping to a given enumeration field type.
1472 extern int bt_ctf_field_type_enumeration_add_mapping(
1473 struct bt_ctf_field_type
*enum_field_type
, const char *name
,
1474 int64_t range_begin
, int64_t range_end
);
1477 @brief Adds a mapping to the @enumft \p enum_field_type which maps
1478 the name \p name to the unsigned
1479 range \p range_begin (included) to \p range_end (included).
1481 Make \p range_begin and \p range_end the same value to add a mapping
1484 The @intft wrapped by \p enum_field_type, as returned by
1485 bt_ctf_field_type_enumeration_get_container_type(), must be
1486 \b unsigned to use this function.
1488 A mapping in \p enum_field_type can exist with the name \p name, but
1489 there must be no overlap amongst all the ranges of
1492 @param[in] enum_field_type Enumeration field type to which to add
1494 @param[in] name Name of the mapping to add (copied
1496 @param[in] range_begin Beginning of the range of the mapping
1498 @param[in] range_end End of the range of the mapping
1500 @returns 0 on success, or a negative value on error.
1502 @prenotnull{enum_field_type}
1504 @preisenumft{enum_field_type}
1505 @pre The wrapped @intft of \p enum_field_type is unsigned.
1506 @pre \p range_end is greater than or equal to \p range_begin.
1507 @postrefcountsame{enum_field_type}
1509 @sa bt_ctf_field_type_enumeration_add_mapping(): Adds a signed
1510 mapping to a given enumeration field type.
1512 extern int bt_ctf_field_type_enumeration_add_mapping_unsigned(
1513 struct bt_ctf_field_type
*enum_field_type
, const char *name
,
1514 uint64_t range_begin
, uint64_t range_end
);
1519 @defgroup ctfirstringfieldtype CTF IR string field type
1520 @ingroup ctfirfieldtypes
1521 @brief CTF IR string field type.
1524 #include <babeltrace/ctf-ir/field-types.h>
1527 A CTF IR <strong><em>string field type</em></strong> is a field type that
1528 you can use to create concrete @stringfields.
1530 You can create a string field type
1531 with bt_ctf_field_type_string_create().
1533 A string field type has only one property: the \b encoding of its
1534 described @stringfields. By default, the encoding of the string fields
1535 described by a string field type is #BT_CTF_STRING_ENCODING_UTF8. You
1536 can set the encoding of the string fields described by a string field
1537 type with bt_ctf_field_type_string_set_encoding().
1539 @sa ctfirstringfield
1542 @addtogroup ctfirstringfieldtype
1547 @brief Creates a default @stringft.
1549 @returns Created string field type, or \c NULL on error.
1551 @postsuccessrefcountret1
1553 extern struct bt_ctf_field_type
*bt_ctf_field_type_string_create(void);
1556 @brief Returns the encoding of the @stringfields described by
1557 the @stringft \p string_field_type.
1559 @param[in] string_field_type String field type which describes the
1560 string fields of which to get the
1562 @returns Encoding of the string
1563 fields described by \p string_field_type,
1564 or #BT_CTF_STRING_ENCODING_UNKNOWN on
1567 @prenotnull{string_field_type}
1568 @preisstringft{string_field_type}
1569 @postrefcountsame{string_field_type}
1571 @sa bt_ctf_field_type_string_set_encoding(): Sets the encoding
1572 of the string fields described by a given string field type.
1574 extern enum bt_ctf_string_encoding
bt_ctf_field_type_string_get_encoding(
1575 struct bt_ctf_field_type
*string_field_type
);
1578 @brief Sets the encoding of the @stringfields described by the
1579 @stringft \p string_field_type to \p encoding.
1581 @param[in] string_field_type String field type which describes the
1582 string fields of which to set the
1584 @param[in] encoding Encoding of the string fields described
1585 by \p string_field_type.
1586 @returns 0 on success, or a negative value on error.
1588 @prenotnull{string_field_type}
1589 @preisstringft{string_field_type}
1590 @prehot{string_field_type}
1591 @pre \p encoding is #BT_CTF_STRING_ENCODING_ASCII or
1592 #BT_CTF_STRING_ENCODING_UTF8.
1593 @postrefcountsame{string_field_type}
1595 @sa bt_ctf_field_type_string_get_encoding(): Returns the encoding of
1596 the string fields described by a given string field type.
1598 extern int bt_ctf_field_type_string_set_encoding(
1599 struct bt_ctf_field_type
*string_field_type
,
1600 enum bt_ctf_string_encoding encoding
);
1605 @defgroup ctfirstructfieldtype CTF IR structure field type
1606 @ingroup ctfirfieldtypes
1607 @brief CTF IR structure field type.
1610 #include <babeltrace/ctf-ir/field-types.h>
1613 A CTF IR <strong><em>structure field type</em></strong> is
1614 a field type that you can use to create concrete @structfields.
1616 You can create a structure field type
1617 with bt_ctf_field_type_structure_create(). This function creates
1618 an empty structure field type, with no fields.
1620 You can add a field to a structure field type with
1621 bt_ctf_field_type_structure_add_field(). Two fields in a structure
1622 field type cannot have the same name.
1624 You can set the \em minimum alignment of the structure fields described
1625 by a structure field type with the common
1626 bt_ctf_field_type_set_alignment() function. The \em effective alignment
1627 of the structure fields described by a structure field type, as per
1628 <a href="http://diamon.org/ctf/">CTF</a>, is the \em maximum value amongst
1629 the effective alignments of all its fields. Note that the effective
1630 alignment of @varfields is always 1.
1632 You can set the byte order of <em>all the contained fields</em>,
1633 recursively, of a structure field type with the common
1634 bt_ctf_field_type_set_byte_order() function.
1636 @sa ctfirstructfield
1639 @addtogroup ctfirstructfieldtype
1644 @brief Creates a default, empty @structft.
1646 @returns Created structure field type,
1647 or \c NULL on error.
1649 @postsuccessrefcountret1
1651 extern struct bt_ctf_field_type
*bt_ctf_field_type_structure_create(void);
1654 @brief Returns the number of fields contained in the
1655 @structft \p struct_field_type.
1657 @param[in] struct_field_type Structure field type of which to get
1658 the number of contained fields.
1659 @returns Number of fields contained in
1660 \p struct_field_type, or a negative
1663 @prenotnull{struct_field_type}
1664 @preisstructft{struct_field_type}
1665 @postrefcountsame{struct_field_type}
1667 extern int bt_ctf_field_type_structure_get_field_count(
1668 struct bt_ctf_field_type
*struct_field_type
);
1671 @brief Returns the field of the @structft \p struct_field_type
1674 On success, the field's type is placed in \p *field_type if
1675 \p field_type is not \c NULL. The field's name is placed in
1676 \p *field_name if \p field_name is not \c NULL.
1677 \p struct_field_type remains the sole owner of \p *field_name.
1679 @param[in] struct_field_type Structure field type of which to get
1680 the field at index \p index.
1681 @param[out] field_name Returned name of the field at index
1682 \p index (can be \c NULL).
1683 @param[out] field_type Returned field type of the field
1684 at index \p index (can be \c NULL).
1685 @param[in] index Index of the field to get from
1686 \p struct_field_type.
1687 @returns 0 on success, or a negative value on error.
1689 @prenotnull{struct_field_type}
1690 @preisstructft{struct_field_type}
1691 @pre \p index is lesser than the number of fields contained in the
1692 structure field type \p struct_field_type (see
1693 bt_ctf_field_type_structure_get_field_count()).
1694 @postrefcountsame{struct_field_type}
1695 @post <strong>On success</strong>, the returned field's type is placed
1696 in \p *field_type and its reference count is incremented.
1698 @sa bt_ctf_field_type_structure_get_field_type_by_name(): Finds a
1699 structure field type's field by name.
1701 extern int bt_ctf_field_type_structure_get_field(
1702 struct bt_ctf_field_type
*struct_field_type
,
1703 const char **field_name
, struct bt_ctf_field_type
**field_type
,
1707 @brief Returns the type of the field named \p field_name found in
1708 the @structft \p struct_field_type.
1710 @param[in] struct_field_type Structure field type of which to get
1712 @param[in] field_name Name of the field to find.
1713 @returns Type of the field named \p field_name in
1714 \p struct_field_type, or
1717 @prenotnull{struct_field_type}
1718 @prenotnull{field_name}
1719 @preisstructft{struct_field_type}
1720 @postrefcountsame{struct_field_type}
1721 @postsuccessrefcountretinc
1723 @sa bt_ctf_field_type_structure_get_field(): Finds a
1724 structure field type's field by index.
1727 struct bt_ctf_field_type
*bt_ctf_field_type_structure_get_field_type_by_name(
1728 struct bt_ctf_field_type
*struct_field_type
,
1729 const char *field_name
);
1732 @brief Adds a field named \p field_name with the @ft
1733 \p field_type to the @structft \p struct_field_type.
1735 On success, \p field_type becomes the child of \p struct_field_type.
1737 This function adds the new field after the current last field of
1738 \p struct_field_type (append mode).
1740 You \em cannot add a field named \p field_name if there's already a
1741 field named \p field_name in \p struct_field_type.
1743 @param[in] struct_field_type Structure field type to which to add
1745 @param[in] field_type Field type of the field to add to
1746 \p struct_field_type.
1747 @param[in] field_name Name of the field to add to
1748 \p struct_field_type
1749 (copied on success).
1750 @returns 0 on success, or a negative value on error.
1752 @prenotnull{struct_field_type}
1753 @prenotnull{field_type}
1754 @prenotnull{field_name}
1755 @preisstructft{struct_field_type}
1756 @pre \p field_type is not and does not contain \p struct_field_type,
1757 recursively, as a field's type.
1758 @prehot{struct_field_type}
1759 @postrefcountsame{struct_field_type}
1760 @postsuccessrefcountinc{field_type}
1762 extern int bt_ctf_field_type_structure_add_field(
1763 struct bt_ctf_field_type
*struct_field_type
,
1764 struct bt_ctf_field_type
*field_type
,
1765 const char *field_name
);
1770 @defgroup ctfirarrayfieldtype CTF IR array field type
1771 @ingroup ctfirfieldtypes
1772 @brief CTF IR array field type.
1775 #include <babeltrace/ctf-ir/field-types.h>
1778 A CTF IR <strong><em>array field type</em></strong> is a field type that
1779 you can use to create concrete @arrayfields.
1781 You can create an array field type
1782 with bt_ctf_field_type_array_create(). This function needs
1783 the @ft of the fields contained by the array fields described by the
1784 array field type to create.
1789 @addtogroup ctfirarrayfieldtype
1794 @brief Creates a default @arrayft with
1795 \p element_field_type as the field type of the fields contained
1796 in its described @arrayfields of length \p length.
1798 @param[in] element_field_type Field type of the fields contained in
1799 the array fields described by the
1800 created array field type.
1801 @param[in] length Length of the array fields described by
1802 the created array field type.
1803 @returns Created array field type, or
1806 @prenotnull{element_field_type}
1807 @postsuccessrefcountinc{element_field_type}
1808 @postsuccessrefcountret1
1810 extern struct bt_ctf_field_type
*bt_ctf_field_type_array_create(
1811 struct bt_ctf_field_type
*element_field_type
,
1812 unsigned int length
);
1815 @brief Returns the @ft of the @fields contained in
1816 the @arrayfields described by the @arrayft \p array_field_type.
1818 @param[in] array_field_type Array field type of which to get
1819 the type of the fields contained in its
1820 described array fields.
1821 @returns Type of the fields contained in the
1822 array fields described by
1823 \p array_field_type, or \c NULL
1826 @prenotnull{array_field_type}
1827 @preisarrayft{array_field_type}
1828 @postrefcountsame{array_field_type}
1829 @postsuccessrefcountretinc
1831 extern struct bt_ctf_field_type
*bt_ctf_field_type_array_get_element_type(
1832 struct bt_ctf_field_type
*array_field_type
);
1835 @brief Returns the number of @fields contained in the
1836 @arrayfields described by the @arrayft \p array_field_type.
1838 @param[in] array_field_type Array field type of which to get
1839 the number of fields contained in its
1840 described array fields.
1841 @returns Number of fields contained in the
1842 array fields described by
1843 \p array_field_type, or a negative value
1846 @prenotnull{array_field_type}
1847 @preisarrayft{array_field_type}
1848 @postrefcountsame{array_field_type}
1850 extern int64_t bt_ctf_field_type_array_get_length(
1851 struct bt_ctf_field_type
*array_field_type
);
1856 @defgroup ctfirseqfieldtype CTF IR sequence field type
1857 @ingroup ctfirfieldtypes
1858 @brief CTF IR sequence field type.
1861 #include <babeltrace/ctf-ir/field-types.h>
1864 A CTF IR <strong><em>sequence field type</em></strong> is
1865 a field type that you can use to create concrete @seqfields.
1867 You can create a sequence field type with
1868 bt_ctf_field_type_sequence_create(). This function needs the @ft
1869 of the fields contained by the sequence fields described by the created
1870 sequence field type. This function also needs the length name of the
1871 sequence field type to create. The length name is used to automatically
1872 resolve the length's field type. See \ref ctfirfieldtypes to learn more
1873 about the automatic resolving.
1878 @addtogroup ctfirseqfieldtype
1883 @brief Creates a default @seqft with \p element_field_type as the
1884 @ft of the @fields contained in its described @seqfields
1885 with the length name \p length_name.
1887 \p length_name can be an absolute or relative reference. See
1888 <a href="http://diamon.org/ctf/">CTF</a> for more details.
1890 @param[in] element_field_type Field type of the fields contained in
1891 the sequence fields described by the
1892 created sequence field type.
1893 @param[in] length_name Length name (copied on success).
1894 @returns Created array field type, or
1897 @prenotnull{element_field_type}
1898 @prenotnull{length_name}
1899 @postsuccessrefcountinc{element_field_type}
1900 @postsuccessrefcountret1
1902 extern struct bt_ctf_field_type
*bt_ctf_field_type_sequence_create(
1903 struct bt_ctf_field_type
*element_field_type
,
1904 const char *length_name
);
1907 @brief Returns the @ft of the @fields contained in the @seqft
1908 described by the @seqft \p sequence_field_type.
1910 @param[in] sequence_field_type Sequence field type of which to get
1911 the type of the fields contained in its
1912 described sequence fields.
1913 @returns Type of the fields contained in the
1914 sequence fields described by
1915 \p sequence_field_type, or \c NULL
1918 @prenotnull{sequence_field_type}
1919 @preisseqft{sequence_field_type}
1920 @postrefcountsame{sequence_field_type}
1921 @postsuccessrefcountretinc
1923 extern struct bt_ctf_field_type
*bt_ctf_field_type_sequence_get_element_type(
1924 struct bt_ctf_field_type
*sequence_field_type
);
1927 @brief Returns the length name of the @seqft \p sequence_field_type.
1929 On success, \p sequence_field_type remains the sole owner of
1930 the returned string.
1932 @param[in] sequence_field_type Sequence field type of which to get the
1934 @returns Length name of \p sequence_field_type,
1935 or \c NULL on error.
1937 @prenotnull{sequence_field_type}
1938 @preisseqft{sequence_field_type}
1940 @sa bt_ctf_field_type_sequence_get_length_field_path(): Returns the
1941 length's CTF IR field path of a given sequence field type.
1943 extern const char *bt_ctf_field_type_sequence_get_length_field_name(
1944 struct bt_ctf_field_type
*sequence_field_type
);
1947 @brief Returns the length's CTF IR field path of the @seqft
1948 \p sequence_field_type.
1950 The length's field path of a sequence field type is set when automatic
1951 resolving is performed (see \ref ctfirfieldtypes).
1953 @param[in] sequence_field_type Sequence field type of which to get the
1954 length's field path.
1955 @returns Length's field path of
1956 \p sequence_field_type, or
1957 \c NULL if the length's field path is
1958 not set yet is not set or on error.
1960 @prenotnull{sequence_field_type}
1961 @preisseqft{sequence_field_type}
1962 @postsuccessrefcountretinc
1964 @sa bt_ctf_field_type_sequence_get_length_field_name(): Returns the
1965 length's name of a given sequence field type.
1967 extern struct bt_ctf_field_path
*bt_ctf_field_type_sequence_get_length_field_path(
1968 struct bt_ctf_field_type
*sequence_field_type
);
1973 @defgroup ctfirvarfieldtype CTF IR variant field type
1974 @ingroup ctfirfieldtypes
1975 @brief CTF IR variant field type.
1978 #include <babeltrace/ctf-ir/field-types.h>
1981 A CTF IR <strong><em>variant field type</em></strong> is
1982 a field type that you can use to create concrete @varfields.
1984 You can create a variant field type with
1985 bt_ctf_field_type_variant_create(). This function expects you to pass
1986 both the tag's @enumft and the tag name of the variant field type to
1987 create. The tag's field type is optional, as the Babeltrace system can
1988 automatically resolve it using the tag name. You can leave the tag name
1989 to \c NULL initially, and set it later with
1990 bt_ctf_field_type_variant_set_tag_name(). The tag name must be set when
1991 the variant field type is frozen. See \ref ctfirfieldtypes to learn more
1992 about the automatic resolving and the conditions under which a field
1995 You can add a field to a variant field type with
1996 bt_ctf_field_type_variant_add_field(). All the field names of a
1997 variant field type \em must exist as mapping names in its tag's @enumft.
1999 The effective alignment of the @varfields described by a
2000 variant field type is always 1, but the individual fields of a
2001 @varfield can have custom alignments.
2003 You can set the byte order of <em>all the contained fields</em>,
2004 recursively, of a variant field type with the common
2005 bt_ctf_field_type_set_byte_order() function.
2010 @addtogroup ctfirvarfieldtype
2015 @brief Creates a default, empty @varft with the tag's @enumft
2016 \p tag_field_type and the tag name \p tag_name.
2018 \p tag_field_type can be \c NULL; the tag's field type can be
2019 automatically resolved from the variant field type's tag name (see
2020 \ref ctfirfieldtypes). If \p tag_name is \c NULL, it \em must be set
2021 with bt_ctf_field_type_variant_set_tag_name() \em before the variant
2022 field type is frozen.
2024 \p tag_name can be an absolute or relative reference. See
2025 <a href="http://diamon.org/ctf/">CTF</a> for more details.
2027 @param[in] tag_field_type Tag's enumeration field type
2029 @param[in] tag_name Tag name (copied on success,
2031 @returns Created variant field type, or
2034 @pre \p tag_field_type is an enumeration field type or \c NULL.
2035 @post <strong>On success, if \p tag_field_type is not \c NULL</strong>,
2036 its reference count is incremented.
2037 @postsuccessrefcountret1
2039 extern struct bt_ctf_field_type
*bt_ctf_field_type_variant_create(
2040 struct bt_ctf_field_type
*tag_field_type
,
2041 const char *tag_name
);
2044 @brief Returns the tag's @enumft of the @varft \p variant_field_type.
2046 @param[in] variant_field_type Variant field type of which to get
2047 the tag's enumeration field type.
2048 @returns Tag's enumeration field type of
2049 \p variant_field_type, or \c NULL if the
2050 tag's field type is not set or on
2053 @prenotnull{variant_field_type}
2054 @preisvarft{variant_field_type}
2055 @postrefcountsame{variant_field_type}
2056 @postsuccessrefcountretinc
2058 extern struct bt_ctf_field_type
*bt_ctf_field_type_variant_get_tag_type(
2059 struct bt_ctf_field_type
*variant_field_type
);
2062 @brief Returns the tag name of the @varft \p variant_field_type.
2064 On success, \p variant_field_type remains the sole owner of
2065 the returned string.
2067 @param[in] variant_field_type Variant field type of which to get the
2069 @returns Tag name of \p variant_field_type, or
2070 \c NULL if the tag name is not set or
2073 @prenotnull{variant_field_type}
2074 @preisvarft{variant_field_type}
2076 @sa bt_ctf_field_type_variant_set_tag_name(): Sets the tag name of
2077 a given variant field type.
2078 @sa bt_ctf_field_type_variant_get_tag_field_path(): Returns the tag's
2079 CTF IR field path of a given variant field type.
2081 extern const char *bt_ctf_field_type_variant_get_tag_name(
2082 struct bt_ctf_field_type
*variant_field_type
);
2085 @brief Sets the tag name of the @varft \p variant_field_type.
2087 \p tag_name can be an absolute or relative reference. See
2088 <a href="http://diamon.org/ctf/">CTF</a> for more details.
2090 @param[in] variant_field_type Variant field type of which to set
2092 @param[in] tag_name Tag name of \p variant_field_type
2093 (copied on success).
2094 @returns 0 on success, or a negative value on error.
2096 @prenotnull{variant_field_type}
2098 @prehot{variant_field_type}
2099 @postrefcountsame{variant_field_type}
2101 @sa bt_ctf_field_type_variant_get_tag_name(): Returns the tag name of
2102 a given variant field type.
2104 extern int bt_ctf_field_type_variant_set_tag_name(
2105 struct bt_ctf_field_type
*variant_field_type
,
2106 const char *tag_name
);
2109 @brief Returns the tag's CTF IR field path of the @varft
2110 \p variant_field_type.
2112 The tag's field path of a variant field type is set when automatic
2113 resolving is performed (see \ref ctfirfieldtypes).
2115 @param[in] variant_field_type Variant field type of which to get the
2117 @returns Tag's field path of
2118 \p variant_field_type, or
2119 \c NULL if the tag's field path is not
2120 set yet is not set or on error.
2122 @prenotnull{variant_field_type}
2123 @preisvarft{variant_field_type}
2124 @postsuccessrefcountretinc
2126 @sa bt_ctf_field_type_variant_get_tag_name(): Returns the tag's
2127 name of a given variant field type.
2129 extern struct bt_ctf_field_path
*bt_ctf_field_type_variant_get_tag_field_path(
2130 struct bt_ctf_field_type
*variant_field_type
);
2133 @brief Returns the number of fields (choices) contained in the @varft
2134 \p variant_field_type.
2136 @param[in] variant_field_type Variant field type of which to get
2137 the number of contained fields.
2138 @returns Number of fields contained in
2139 \p variant_field_type, or a negative
2142 @prenotnull{variant_field_type}
2143 @preisvarft{variant_field_type}
2144 @postrefcountsame{variant_field_type}
2146 extern int bt_ctf_field_type_variant_get_field_count(
2147 struct bt_ctf_field_type
*variant_field_type
);
2150 @brief Returns the field (choice) of the @varft \p variant_field_type
2153 On success, the field's type is placed in \p *field_type if
2154 \p field_type is not \c NULL. The field's name is placed in
2155 \p *field_name if \p field_name is not \c NULL.
2156 \p variant_field_type remains the sole owner of \p *field_name.
2158 @param[in] variant_field_type Variant field type of which to get
2159 the field at index \p index.
2160 @param[out] field_name Returned name of the field at index
2161 \p index (can be \c NULL).
2162 @param[out] field_type Returned field type of the field
2163 at index \p index (can be \c NULL).
2164 @param[in] index Index of the field to get from
2165 \p variant_field_type.
2166 @returns 0 on success, or a negative value on error.
2168 @prenotnull{variant_field_type}
2169 @preisvarft{variant_field_type}
2170 @pre \p index is lesser than the number of fields contained in the
2171 variant field type \p variant_field_type (see
2172 bt_ctf_field_type_variant_get_field_count()).
2173 @postrefcountsame{variant_field_type}
2174 @post <strong>On success</strong>, the returned field's type is placed
2175 in \p *field_type and its reference count is incremented.
2177 @sa bt_ctf_field_type_variant_get_field_type_by_name(): Finds a variant
2178 field type's field by name.
2179 @sa bt_ctf_field_type_variant_get_field_type_from_tag(): Finds a variant
2180 field type's field by current tag value.
2182 extern int bt_ctf_field_type_variant_get_field(
2183 struct bt_ctf_field_type
*variant_field_type
,
2184 const char **field_name
,
2185 struct bt_ctf_field_type
**field_type
, int index
);
2188 @brief Returns the type of the field (choice) named \p field_name
2189 found in the @varft \p variant_field_type.
2191 @param[in] variant_field_type Variant field type of which to get
2193 @param[in] field_name Name of the field to find.
2194 @returns Type of the field named \p field_name in
2195 \p variant_field_type, or
2198 @prenotnull{variant_field_type}
2199 @prenotnull{field_name}
2200 @preisvarft{variant_field_type}
2201 @postrefcountsame{variant_field_type}
2202 @postsuccessrefcountretinc
2204 @sa bt_ctf_field_type_variant_get_field(): Finds a variant field type's
2206 @sa bt_ctf_field_type_variant_get_field_type_from_tag(): Finds a variant
2207 field type's field by current tag value.
2210 struct bt_ctf_field_type
*bt_ctf_field_type_variant_get_field_type_by_name(
2211 struct bt_ctf_field_type
*variant_field_type
,
2212 const char *field_name
);
2215 @brief Returns the type of the field (choice) selected by the value of
2216 the @enumfield \p tag_field in the @varft \p variant_field_type.
2218 \p tag_field is the current tag value.
2220 The field type of \p tag_field, as returned by bt_ctf_field_get_type(),
2221 \em must be equivalent to the field type returned by
2222 bt_ctf_field_type_variant_get_tag_type() for \p variant_field_type.
2224 @param[in] variant_field_type Variant field type of which to get
2226 @param[in] tag_field Current tag value (variant field type's
2228 @returns Type of the field selected by
2229 \p tag_field in \p variant_field_type,
2230 or \c NULL on error.
2232 @prenotnull{variant_field_type}
2233 @prenotnull{tag_field}
2234 @preisvarft{variant_field_type}
2235 @preisenumfield{tag_field}
2236 @postrefcountsame{variant_field_type}
2237 @postrefcountsame{tag_field}
2238 @postsuccessrefcountretinc
2240 @sa bt_ctf_field_type_variant_get_field(): Finds a variant field type's
2242 @sa bt_ctf_field_type_variant_get_field_type_by_name(): Finds a variant
2243 field type's field by name.
2246 struct bt_ctf_field_type
*bt_ctf_field_type_variant_get_field_type_from_tag(
2247 struct bt_ctf_field_type
*variant_field_type
,
2248 struct bt_ctf_field
*tag_field
);
2251 @brief Adds a field (a choice) named \p field_name with the @ft
2252 \p field_type to the @varft \p variant_field_type.
2254 On success, \p field_type becomes the child of \p variant_field_type.
2256 You \em cannot add a field named \p field_name if there's already a
2257 field named \p field_name in \p variant_field_type.
2259 \p field_name \em must name an existing mapping in the tag's
2260 enumeration field type of \p variant_field_type.
2262 @param[in] variant_field_type Variant field type to which to add
2264 @param[in] field_type Field type of the field to add to
2265 \p variant_field_type.
2266 @param[in] field_name Name of the field to add to
2267 \p variant_field_type
2268 (copied on success).
2269 @returns 0 on success, or a negative value on error.
2271 @prenotnull{variant_field_type}
2272 @prenotnull{field_type}
2273 @prenotnull{field_name}
2274 @preisvarft{variant_field_type}
2275 @pre \p field_type is not and does not contain \p variant_field_type,
2276 recursively, as a field's type.
2277 @prehot{variant_field_type}
2278 @postrefcountsame{variant_field_type}
2279 @postsuccessrefcountinc{field_type}
2281 extern int bt_ctf_field_type_variant_add_field(
2282 struct bt_ctf_field_type
*variant_field_type
,
2283 struct bt_ctf_field_type
*field_type
,
2284 const char *field_name
);
2292 #endif /* BABELTRACE_CTF_IR_FIELD_TYPES_H */