7#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
8#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
18#include <babeltrace2/types.h>
486 uint64_t frequency) __BT_NOEXCEPT;
534 int64_t offset_seconds, uint64_t offset_cycles) __BT_NOEXCEPT;
561 int64_t *offset_seconds, uint64_t *offset_cycles) __BT_NOEXCEPT;
582 uint64_t precision) __BT_NOEXCEPT;
646 uint64_t *precision) __BT_NOEXCEPT;
670 uint64_t accuracy) __BT_NOEXCEPT;
704 uint64_t *accuracy) __BT_NOEXCEPT;
742 bt_bool origin_is_unix_epoch) __BT_NOEXCEPT;
872 const char *uid) __BT_NOEXCEPT;
1645 uint64_t value, int64_t *ns_from_origin) __BT_NOEXCEPT;
1704#define BT_CLOCK_CLASS_PUT_REF_AND_RESET(_clock_class) \
1706 bt_clock_class_put_ref(_clock_class); \
1707 (_clock_class) = NULL; \
1735#define BT_CLOCK_CLASS_MOVE_REF(_dst, _src) \
1737 bt_clock_class_put_ref(_dst); \
uint8_t const * bt_uuid
A UUID, that is, an array of 16 constant bytes.
Definition types.h:144
bt_property_availability
Availability of an object property.
Definition types.h:159
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:126
struct bt_self_component bt_self_component
Self component.
Definition types.h:71
bt_clock_class_set_namespace_status bt_clock_class_set_namespace(bt_clock_class *clock_class, const char *ns)
Sets the namespace of the clock class clock_class to a copy of ns.
bt_property_availability bt_clock_class_get_accuracy(const struct bt_clock_class *clock_class, uint64_t *accuracy)
Returns the accuracy of the clock class clock_class.
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.
bt_clock_class_set_namespace_status
Status codes for bt_clock_class_set_namespace().
Definition clock-class.h:1067
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.
bt_clock_class_set_origin_status bt_clock_class_set_origin(bt_clock_class *clock_class, const char *ns, const char *name, const char *uid)
Sets the custom origin of the clock class clock_class to the ns, name, and uid tuple.
struct bt_clock_class bt_clock_class
Clock class.
Definition types.h:22
bt_bool bt_clock_class_has_same_identity(const bt_clock_class *clock_class_a, const bt_clock_class *clock_class_b)
Returns whether or not the clock classes clock_class_a and clock_class_b share the same identity.
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.
bt_clock_class_set_uid_status bt_clock_class_set_uid(bt_clock_class *clock_class, const char *uid)
Sets the unique identifier (UID) of the clock class clock_class to a copy of uid.
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 the origin of the clock class clock_class is unknown or 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.
const char * bt_clock_class_get_namespace(const bt_clock_class *clock_class)
Returns the namespace of the clock class clock_class.
const char * bt_clock_class_get_origin_namespace(const bt_clock_class *clock_class)
Returns the namespace of the custom origin of the clock class clock_class.
void bt_clock_class_set_accuracy(bt_clock_class *clock_class, uint64_t accuracy)
Sets the accuracy (cycles) of the clock class clock_class to accuracy.
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.
uint64_t bt_clock_class_get_graph_mip_version(const bt_clock_class *clock_class)
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph contai...
bt_clock_class_set_name_status
Status codes for bt_clock_class_set_name().
Definition clock-class.h:1146
bt_bool bt_clock_class_origin_is_known(const bt_clock_class *clock_class)
Returns whether or not the origin of the clock class clock_class is known.
const char * bt_clock_class_get_origin_uid(const bt_clock_class *clock_class)
Returns the UID of the custom origin of the clock class clock_class.
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.
const char * bt_clock_class_get_origin_name(const bt_clock_class *clock_class)
Returns the name of the custom origin 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).
const char * bt_clock_class_get_uid(const bt_clock_class *clock_class)
Returns the UID of the clock class clock_class.
void bt_clock_class_set_origin_unix_epoch(bt_clock_class *clock_class)
Makes the origin of the clock class clock_class the Unix epoch.
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.
bt_property_availability bt_clock_class_get_opt_precision(const struct bt_clock_class *clock_class, uint64_t *precision)
Returns the precision of the clock class clock_class.
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:1334
void bt_clock_class_set_origin_unknown(bt_clock_class *clock_class)
Makes the origin of the clock class clock_class unknown.
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:1578
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_set_uid_status
Status codes for bt_clock_class_set_uid().
Definition clock-class.h:1220
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_origin_status
Status codes for bt_clock_class_set_origin().
Definition clock-class.h:802
@ BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1078
@ BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_OK
Success.
Definition clock-class.h:1072
@ BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1157
@ BT_CLOCK_CLASS_SET_NAME_STATUS_OK
Success.
Definition clock-class.h:1151
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK
Success.
Definition clock-class.h:1339
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1345
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK
Success.
Definition clock-class.h:1583
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR
Integer overflow while computing the result.
Definition clock-class.h:1589
@ BT_CLOCK_CLASS_SET_UID_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1231
@ BT_CLOCK_CLASS_SET_UID_STATUS_OK
Success.
Definition clock-class.h:1225
@ BT_CLOCK_CLASS_SET_ORIGIN_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:813
@ BT_CLOCK_CLASS_SET_ORIGIN_STATUS_OK
Success.
Definition clock-class.h:807
struct bt_value bt_value
Value.
Definition types.h:93