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); \
Success.
Definition: clock-class.h:1151
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_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.
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. ...
Success.
Definition: clock-class.h:1339
const char * bt_clock_class_get_description(const bt_clock_class *clock_class)
Returns the description of the clock class clock_class.
struct bt_self_component bt_self_component
Self component.
Definition: types.h:71
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.
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.
bt_property_availability
Availability of an object property.
Definition: types.h:159
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.
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_clock_class_set_name_status
Status codes for bt_clock_class_set_name().
Definition: clock-class.h:1146
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_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.
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_clock_class_set_uid_status
Status codes for bt_clock_class_set_uid().
Definition: clock-class.h:1220
uint64_t bt_clock_class_get_precision(const bt_clock_class *clock_class)
Returns the precision (cycles) of the clock class clock_class.
void bt_clock_class_get_ref(const bt_clock_class *clock_class)
Increments the reference count of the clock class clock_class.
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_namespace(const bt_clock_class *clock_class)
Returns the namespace 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.
const char * bt_clock_class_get_uid(const bt_clock_class *clock_class)
Returns the UID of the clock class clock_class.
Success.
Definition: clock-class.h:807
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.
Success.
Definition: clock-class.h:1225
uint64_t bt_clock_class_get_frequency(const bt_clock_class *clock_class)
Returns the frequency (Hz) of the clock class clock_class.
void bt_clock_class_put_ref(const bt_clock_class *clock_class)
Decrements the reference count of the clock class clock_class.
bt_value * bt_clock_class_borrow_user_attributes(bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class.
struct bt_value bt_value
Value.
Definition: types.h:93
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.
Success.
Definition: clock-class.h:1072
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.
int bt_bool
Babeltrace 2 boolean type.
Definition: types.h:126
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_namespace_status
Status codes for bt_clock_class_set_namespace().
Definition: clock-class.h:1067
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.
Success.
Definition: clock-class.h:1583
Out of memory.
Definition: clock-class.h:1345
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.
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_clock_class * bt_clock_class_create(bt_self_component *self_component)
Creates a default clock class from the self component self_component.
bt_clock_class_set_origin_status
Status codes for bt_clock_class_set_origin().
Definition: clock-class.h:802
Out of memory.
Definition: clock-class.h:813
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_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.
Out of memory.
Definition: clock-class.h:1078
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...
Out of memory.
Definition: clock-class.h:1231
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.
Integer overflow while computing the result.
Definition: clock-class.h:1589
Out of memory.
Definition: clock-class.h:1157
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_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.
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_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_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...
struct bt_clock_class bt_clock_class
Clock class.
Definition: types.h:22
uint8_t const * bt_uuid
A UUID, that is, an array of 16 constant bytes.
Definition: types.h:144