1#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
2#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
32#include <babeltrace2/types.h>
426 int64_t offset_seconds, uint64_t offset_cycles);
453 int64_t *offset_seconds, uint64_t *offset_cycles);
887 uint64_t value, int64_t *ns_from_origin);
944#define BT_CLOCK_CLASS_PUT_REF_AND_RESET(_clock_class) \
946 bt_clock_class_put_ref(_clock_class); \
947 (_clock_class) = NULL; \
975#define BT_CLOCK_CLASS_MOVE_REF(_dst, _src) \
977 bt_clock_class_put_ref(_dst); \
uint8_t const * bt_uuid
A UUID, that is, an array of 16 constant bytes.
Definition types.h:158
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:140
struct bt_self_component bt_self_component
Self component.
Definition types.h:85
void bt_clock_class_set_user_attributes(bt_clock_class *clock_class, const bt_value *user_attributes)
Sets the user attributes of the clock class clock_class to user_attributes.
uint64_t bt_clock_class_get_frequency(const bt_clock_class *clock_class)
Returns the frequency (Hz) of the clock class clock_class.
const char * bt_clock_class_get_description(const bt_clock_class *clock_class)
Returns the description of the clock class clock_class.
void bt_clock_class_set_offset(bt_clock_class *clock_class, int64_t offset_seconds, uint64_t offset_cycles)
Sets the offset of the clock class clock_class to offset_seconds plus offset_cycles from its origin.
void bt_clock_class_set_frequency(bt_clock_class *clock_class, uint64_t frequency)
Sets the frequency (Hz) of the clock class clock_class to frequency.
struct bt_clock_class bt_clock_class
Clock class.
Definition types.h:36
bt_clock_class_set_name_status bt_clock_class_set_name(bt_clock_class *clock_class, const char *name)
Sets the name of the clock class clock_class to a copy of name.
void bt_clock_class_get_ref(const bt_clock_class *clock_class)
Increments the reference count of the clock class clock_class.
void bt_clock_class_set_origin_is_unix_epoch(bt_clock_class *clock_class, bt_bool origin_is_unix_epoch)
Sets whether or not the origin of the clock class clock_class is the Unix epoch.
bt_uuid bt_clock_class_get_uuid(const bt_clock_class *clock_class)
Returns the UUID of the clock class clock_class.
void bt_clock_class_set_uuid(bt_clock_class *clock_class, bt_uuid uuid)
Sets the UUID of the clock class clock_class to a copy of uuid.
bt_clock_class_set_name_status
Status codes for bt_clock_class_set_name().
Definition clock-class.h:550
void bt_clock_class_set_precision(bt_clock_class *clock_class, uint64_t precision)
Sets the precision (cycles) of the clock class clock_class to precision.
bt_clock_class_set_description_status bt_clock_class_set_description(bt_clock_class *clock_class, const char *description)
Sets the description of the clock class clock_class to a copy of description.
const char * bt_clock_class_get_name(const bt_clock_class *clock_class)
Returns the name of the clock class clock_class.
bt_clock_class_cycles_to_ns_from_origin_status bt_clock_class_cycles_to_ns_from_origin(const bt_clock_class *clock_class, uint64_t value, int64_t *ns_from_origin)
Converts the stream clock value value from cycles to nanoseconds from the origin of the clock class c...
const bt_value * bt_clock_class_borrow_user_attributes_const(const bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class (const version).
bt_bool bt_clock_class_origin_is_unix_epoch(const bt_clock_class *clock_class)
Returns whether or not the origin of the clock class clock_class is the Unix epoch.
uint64_t bt_clock_class_get_precision(const bt_clock_class *clock_class)
Returns the precision (cycles) of the clock class clock_class.
bt_clock_class_set_description_status
Status codes for bt_clock_class_set_description().
Definition clock-class.h:622
void bt_clock_class_get_offset(const bt_clock_class *clock_class, int64_t *offset_seconds, uint64_t *offset_cycles)
Returns the offsets in seconds and cycles of the clock class clock_class.
bt_clock_class_cycles_to_ns_from_origin_status
Status codes for bt_clock_class_cycles_to_ns_from_origin().
Definition clock-class.h:820
void bt_clock_class_put_ref(const bt_clock_class *clock_class)
Decrements the reference count of the clock class clock_class.
bt_clock_class * bt_clock_class_create(bt_self_component *self_component)
Creates a default clock class from the self component self_component.
bt_value * bt_clock_class_borrow_user_attributes(bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class.
@ BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:561
@ BT_CLOCK_CLASS_SET_NAME_STATUS_OK
Success.
Definition clock-class.h:555
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK
Success.
Definition clock-class.h:627
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:633
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK
Success.
Definition clock-class.h:825
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR
Integer overflow while computing the result.
Definition clock-class.h:831
struct bt_value bt_value
Value.
Definition types.h:107