enum bt_ctf_byte_order {
BT_CTF_BYTE_ORDER_UNKNOWN = -1,
+ /*
+ * Note that native, in the context of the CTF specification, is defined as
+ * "the byte order described in the trace" and does not mean that the host's
+ * endianness will be used.
+ */
BT_CTF_BYTE_ORDER_NATIVE = 0,
BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
BT_CTF_BYTE_ORDER_BIG_ENDIAN,
* bt_ctf_field_type_integer_create: create an integer field type.
*
* Allocate a new integer field type of the given size. The creation of a field
- * type sets its reference countto 1.
+ * type sets its reference count to 1.
*
* @param size Integer field type size/length in bits.
*
struct bt_ctf_field_type *integer,
enum ctf_string_encoding encoding);
+/**
+ * bt_ctf_field_type_integer_get_mapped_clock: get an integer type's mapped clock.
+ *
+ * @param integer Integer type.
+ *
+ * Returns the integer's mapped clock (if any), NULL on error.
+ */
+extern struct bt_ctf_clock *bt_ctf_field_type_integer_get_mapped_clock(
+ struct bt_ctf_field_type *integer);
+
+/**
+ * bt_ctf_field_type_integer_set_mapped_clock: set an integer type's mapped clock.
+ *
+ * @param integer Integer type.
+ * @param clock Clock to map.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_ctf_field_type_integer_set_mapped_clock(
+ struct bt_ctf_field_type *integer,
+ struct bt_ctf_clock *clock);
+
/*
* bt_ctf_field_type_enumeration_create: create an enumeration field type.
*
*
* @param type Field type.
* @param byte_order Field type's byte order. Defaults to
- * BT_CTF_BYTE_ORDER_NATIVE, the host machine's endianness.
+ * BT_CTF_BYTE_ORDER_NATIVE; the trace's endianness.
*
* Returns 0 on success, a negative value on error.
*/