Add clock accessor to CTF IR Trace
[babeltrace.git] / include / babeltrace / ctf-ir / trace.h
index 1be85cfdeb4d197246ce6fe7324c56b20fa0f2ab..d36da0eb43d86fa93d9827ea6f3a19e446b025ee 100644 (file)
@@ -95,6 +95,27 @@ extern int bt_ctf_trace_add_environment_field(struct bt_ctf_trace *trace,
 extern int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace,
                struct bt_ctf_clock *clock);
 
+/*
+ * bt_ctf_trace_get_clock_count: get the number of clocks
+ *     associated to the trace.
+ *
+ * @param trace Trace instance.
+ *
+ * Returns the clock count on success, a negative value on error.
+ */
+extern int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace);
+
+/*
+ * bt_ctf_trace_get_clock: get a trace's clock at index.
+ *
+ * @param trace Trace instance.
+ * @param index Index of the clock in the given trace.
+ *
+ * Return a clock instance on success, NULL on error.
+ */
+extern struct bt_ctf_clock *bt_ctf_trace_get_clock(
+               struct bt_ctf_trace *trace, int index);
+
 /*
  * bt_ctf_trace_get_metadata_string: get metadata string.
  *
This page took 0.024092 seconds and 4 git commands to generate.