Add bt_field_class_get_graph_mip_version, which returns the MIP version
for the graph the field class is in, for the same reason as explained in
fbc90342dade ("lib: add bt_trace_class_get_graph_mip_version") for trace
class.
Note to Phil: I don't know where to put the function declaration in the
header, perhaps a new section is needed.
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I97b4a440020cb006bee9a79a5dce9cbade565914
Reviewed-on: https://review.lttng.org/c/babeltrace/+/13395
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
return __BT_UPCAST_CONST(bt_field_class_variant_option, option);
}
+/*!
+@brief
+ Returns the effective \bt_mip (MIP) version of the trace processing
+ \bt_graph containing the \bt_comp from which \bt_p{field_class} was
+ created.
+
+@param[in] field_class
+ Field class of which to get the effective MIP version.
+
+@returns
+ Effective MIP version of \bt_p{field_class}.
+
+@bt_pre_not_null{field_class}
+
+@sa bt_self_component_get_graph_mip_version() —
+ Returns the effective MIP version of the trace processing
+ graph which contains a given component.
+*/
+extern uint64_t bt_field_class_get_graph_mip_version(
+ const bt_field_class *field_class) __BT_NOEXCEPT;
+
/*! @} */
/*!
return blob_fc->length_fl;
}
+BT_EXPORT
+uint64_t bt_field_class_get_graph_mip_version(
+ const bt_field_class *field_class)
+{
+ BT_ASSERT_PRE_DEV_FC_NON_NULL(field_class);
+ return field_class->mip_version;
+}
+
BT_EXPORT
void bt_field_class_get_ref(const struct bt_field_class *field_class)
{