const struct bt_field_class_bit_array *ba_fc = (const void *) fc;
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_BIT_ARRAY,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_BIT_ARRAY,
"Field class");
return ba_fc->length;
}
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_DEV_VALID_INDEX(index, enum_fc->mappings->len);
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
"Field class");
return (const void *) BT_FIELD_CLASS_ENUM_MAPPING_AT_INDEX(fc, index);
}
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_DEV_VALID_INDEX(index, enum_fc->mappings->len);
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
"Field class");
return (const void *) BT_FIELD_CLASS_ENUM_MAPPING_AT_INDEX(fc, index);
}
const struct bt_field_class *fc, const char *label)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
"Field class");
return (const void *) borrow_enumeration_field_class_mapping_by_label(
(const void *) fc, label);
const struct bt_field_class *fc, const char *label)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION, "Field class");
return (const void *) borrow_enumeration_field_class_mapping_by_label(
(const void *) fc, label);
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Label array (output)");
BT_ASSERT_PRE_DEV_NON_NULL(count, "Count (output)");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
"Field class");
g_ptr_array_set_size(enum_fc->label_buf, 0);
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Label array (output)");
BT_ASSERT_PRE_DEV_NON_NULL(count, "Count (output)");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
"Field class");
g_ptr_array_set_size(enum_fc->label_buf, 0);
{
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION,
"Field class");
return add_mapping_to_enumeration_field_class(fc, label,
(const void *) range_set);
{
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION,
"Field class");
return add_mapping_to_enumeration_field_class(fc, label,
(const void *) range_set);
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
named_fc = create_named_field_class(name, member_fc);
if (!named_fc) {
struct bt_field_class_structure *struct_fc = (void *) fc;
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
return (uint64_t) struct_fc->common.named_fcs->len;
}
const struct bt_field_class *fc, uint64_t index)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_at_index(
struct bt_field_class *fc, uint64_t index)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
return (void *)
borrow_named_field_class_from_container_field_class_at_index(
const struct bt_field_class *fc, const char *name)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_by_name(
struct bt_field_class *fc, const char *name)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STRUCTURE,
"Field class");
return (void *)
borrow_named_field_class_from_container_field_class_by_name(
BT_ASSERT_PRE_NON_NULL(selector_fc, "Selector field class");
if (fc_type == BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD) {
- BT_ASSERT_PRE_FC_HAS_ID(selector_fc,
+ BT_ASSERT_PRE_FC_HAS_TYPE(selector_fc,
BT_FIELD_CLASS_TYPE_BOOL,
"Selector field class");
opt_with_sel_fc = (void *) g_new0(
struct bt_field_class_option_with_selector_field_bool *opt_fc = (void *) fc;
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD, "Field class");
BT_ASSERT_PRE_DEV_FC_HOT(fc, "Field class");
opt_fc->sel_is_reversed = sel_is_reversed;
struct bt_field_class_option_with_selector_field_bool *opt_fc = (void *) fc;
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD, "Field class");
return opt_fc->sel_is_reversed;
}
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_NON_NULL(name, "Name");
BT_ASSERT_PRE_NON_NULL(option_fc, "Option field class");
- BT_ASSERT_PRE_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD, "Field class");
named_fc = create_named_field_class(name, option_fc);
if (!named_fc) {
BT_ASSERT_PRE_NON_NULL(name, "Name");
BT_ASSERT_PRE_NON_NULL(option_fc, "Option field class");
BT_ASSERT_PRE_NON_NULL(range_set, "Integer range set");
- BT_ASSERT_PRE_FC_HAS_ID(fc, expected_type, "Field class");
+ BT_ASSERT_PRE_FC_HAS_TYPE(fc, expected_type, "Field class");
BT_ASSERT_PRE(range_set->ranges->len > 0,
"Integer range set is empty: %!+R", range_set);
status = ranges_overlap(var_fc->common.common.named_fcs, range_set,
const struct bt_field_class *fc, const char *name)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD,
"Field class");
return (const void *)
const struct bt_field_class *fc, uint64_t index)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD,
"Field class");
return (const void *)
const struct bt_field_class *fc, const char *name)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD,
"Field class");
return (const void *)
const struct bt_field_class *fc, uint64_t index)
{
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD,
"Field class");
return (const void *)
const struct bt_field_class_array_static *array_fc = (const void *) fc;
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_STATIC_ARRAY,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc, BT_FIELD_CLASS_TYPE_STATIC_ARRAY,
"Field class");
return (uint64_t) array_fc->length;
}
BT_ASSERT_PRE_NO_ERROR();
BT_ASSERT_PRE_DEV_NON_NULL(fc, "Field class");
- BT_ASSERT_PRE_DEV_FC_HAS_ID(fc,
+ BT_ASSERT_PRE_DEV_FC_HAS_TYPE(fc,
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD,
"Field class");
return seq_fc->length_field_path;