ALIASES += bt_pre_is_sb_msg{1}="@pre \bt_p{\1} is a \link api-msg-sb stream beginning message\endlink."
ALIASES += bt_pre_is_se_msg{1}="@pre \bt_p{\1} is a \link api-msg-se stream end message\endlink."
+# Aliases: preconditions: MIP version
+ALIASES += bt_pre_tc_with_mip{2}="@pre \bt_p{\1} was created from a \bt_comp which belongs to a trace processing \bt_graph with the effective \bt_mip version \2."
+ALIASES += bt_pre_fc_with_mip{2}="@pre \bt_p{\1} was created from a \bt_trace_cls which was created from a \bt_comp which belongs to a trace processing \bt_graph with the effective \bt_mip version \2."
+
# Aliases: field class object types: singular
ALIASES += bt_fc="\link api-tir-fc field class\endlink"
ALIASES += bt_ba_fc="\link api-tir-fc-ba bit array field class\endlink"
New dynamic array field class reference, or \c NULL on memory error.
@bt_pre_not_null{trace_class}
+@bt_pre_tc_with_mip{trace_class, 0}
@bt_pre_not_null{element_field_class}
@bt_pre_fc_not_in_tc{element_field_class}
@pre
@bt_pre_not_null{field_class}
@bt_pre_is_darray_wl_fc{field_class}
+@bt_pre_fc_with_mip{field_class, 0}
*/
extern const bt_field_path *
bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const(
@bt_pre_not_null{field_class}
@bt_pre_is_opt_ws_fc{field_class}
+@bt_pre_fc_with_mip{field_class, 0}
*/
extern const bt_field_path *
bt_field_class_option_with_selector_field_borrow_selector_field_path_const(
New option field class reference, or \c NULL on memory error.
@bt_pre_not_null{trace_class}
+@bt_pre_tc_with_mip{trace_class, 0}
@bt_pre_not_null{optional_field_class}
@bt_pre_fc_not_in_tc{optional_field_class}
@bt_pre_not_null{selector_field_class}
New option field class reference, or \c NULL on memory error.
@bt_pre_not_null{trace_class}
+@bt_pre_tc_with_mip{trace_class, 0}
@bt_pre_not_null{optional_field_class}
@bt_pre_fc_not_in_tc{optional_field_class}
@bt_pre_not_null{selector_field_class}
New option field class reference, or \c NULL on memory error.
@bt_pre_not_null{trace_class}
+@bt_pre_tc_with_mip{trace_class, 0}
@bt_pre_not_null{optional_field_class}
@bt_pre_fc_not_in_tc{optional_field_class}
@bt_pre_not_null{selector_field_class}
New variant field class reference, or \c NULL on memory error.
@bt_pre_not_null{trace_class}
+@bt_pre_tc_with_mip{trace_class, 0}
@pre
<strong>If \bt_p{selector_field_class} is not \c NULL</strong>,
\bt_p{selector_field_class} is an \bt_int_fc.
@bt_pre_not_null{field_class}
@bt_pre_is_var_ws_fc{field_class}
+@bt_pre_fc_with_mip{field_class, 0}
*/
extern const bt_field_path *
bt_field_class_variant_with_selector_field_borrow_selector_field_path_const(
BT_ASSERT_PRE_DEV_NON_NULL(_BT_ASSERT_PRE_GRAPH_ID, (_graph), \
_BT_ASSERT_PRE_GRAPH_NAME)
+#define _BT_ASSERT_PRE_MIP_VERSION_VALID_ID "mip-version-is-valid"
+
+/* Asserts that the MIP version `_mip_version` is equal to `_val`. */
+#define BT_ASSERT_PRE_MIP_VERSION_EQ(_mip_version, _val) \
+ BT_ASSERT_PRE(_BT_ASSERT_PRE_MIP_VERSION_VALID_ID, \
+ _mip_version == _val, \
+ "MIP version is not equal to %" PRIu64, _val)
+
+/*
+ * Asserts that the effective MIP version for `_trace_class` is equal to `_val`.
+ */
+#define BT_ASSERT_PRE_TC_MIP_VERSION_EQ(_trace_class, _val) \
+ BT_ASSERT_PRE_MIP_VERSION_EQ((_trace_class)->mip_version, _val)
+
+/*
+ * Asserts that the effective MIP version for `_field_class` is equal to `_val`.
+ */
+#define BT_ASSERT_PRE_FC_MIP_VERSION_EQ(_field_class, _val) \
+ BT_ASSERT_PRE_MIP_VERSION_EQ((_field_class)->mip_version, _val)
+
#define _BT_ASSERT_PRE_INTR_NAME "Interrupter"
#define _BT_ASSERT_PRE_INTR_ID "interrupter"
struct bt_field_class *selector_fc)
{
BT_ASSERT_PRE_NO_ERROR();
+ BT_ASSERT_PRE_TC_MIP_VERSION_EQ(trace_class, 0);
return create_option_field_class(trace_class,
BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD,
(const void *) u_range_set;
BT_ASSERT_PRE_NO_ERROR();
+ BT_ASSERT_PRE_TC_MIP_VERSION_EQ(trace_class, 0);
BT_ASSERT_PRE_INT_RANGE_SET_NON_NULL(range_set);
BT_ASSERT_PRE_INT_RANGE_SET_NOT_EMPTY(range_set);
fc = (void *) create_option_field_class(trace_class,
(const void *) i_range_set;
BT_ASSERT_PRE_NO_ERROR();
+ BT_ASSERT_PRE_TC_MIP_VERSION_EQ(trace_class, 0);
BT_ASSERT_PRE_INT_RANGE_SET_NON_NULL(range_set);
BT_ASSERT_PRE_INT_RANGE_SET_NOT_EMPTY(range_set);
fc = (void *) create_option_field_class(trace_class,
BT_ASSERT_PRE_FC_NON_NULL(fc);
BT_ASSERT_PRE_FC_IS_OPTION_WITH_SEL("field-class", fc, "Field class");
+ BT_ASSERT_PRE_FC_MIP_VERSION_EQ(fc, 0);
return opt_fc->selector_field_path;
}
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_TC_NON_NULL(trace_class);
+ BT_ASSERT_PRE_TC_MIP_VERSION_EQ(trace_class, 0);
if (selector_fc) {
BT_ASSERT_PRE_FC_IS_INT("selector-field-class", selector_fc,
BT_ASSERT_PRE_DEV_FC_NON_NULL(fc);
BT_ASSERT_PRE_DEV_FC_IS_VARIANT_WITH_SEL("field-class", fc,
"Field class");
+ BT_ASSERT_PRE_FC_MIP_VERSION_EQ(fc, 0);
return var_fc->selector_field_path;
}
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_TC_NON_NULL(trace_class);
+ BT_ASSERT_PRE_TC_MIP_VERSION_EQ(trace_class, 0);
BT_ASSERT_PRE_NON_NULL("element-field-class", element_fc,
"Element field class");
BT_LOGD_STR("Creating default dynamic array field class object.");
"dynamic-array-field-class-with-length-field",
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD,
"Field class");
+ BT_ASSERT_PRE_FC_MIP_VERSION_EQ(fc, 0);
return seq_fc->length_field_path;
}