BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR = 14,
BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR = 15,
BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR = 16,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR = 17,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR = 18,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR = 17,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR = 18,
} bt_field_class_type;
typedef enum bt_field_class_integer_preferred_display_base {
bt_field_class_variant_borrow_option_by_name_const(
const bt_field_class *field_class, const char *name);
-extern const bt_field_class_variant_with_selector_unsigned_option *
-bt_field_class_variant_with_selector_unsigned_borrow_option_by_index_const(
+extern const bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const(
const bt_field_class *field_class, uint64_t index);
-extern const bt_field_class_variant_with_selector_unsigned_option *
-bt_field_class_variant_with_selector_unsigned_borrow_option_by_name_const(
+extern const bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_name_const(
const bt_field_class *field_class, const char *name);
-extern const bt_field_class_variant_with_selector_signed_option *
-bt_field_class_variant_with_selector_signed_borrow_option_by_index_const(
+extern const bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_class_variant_with_selector_integer_signed_borrow_option_by_index_const(
const bt_field_class *field_class, uint64_t index);
-extern const bt_field_class_variant_with_selector_signed_option *
-bt_field_class_variant_with_selector_signed_borrow_option_by_name_const(
+extern const bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_class_variant_with_selector_integer_signed_borrow_option_by_name_const(
const bt_field_class *field_class, const char *name);
extern const char *bt_field_class_variant_option_get_name(
const bt_field_class *field_class);
extern const bt_integer_range_set_unsigned *
-bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
- const bt_field_class_variant_with_selector_unsigned_option *option);
+bt_field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const(
+ const bt_field_class_variant_with_selector_integer_unsigned_option *option);
static inline
const bt_field_class_variant_option *
-bt_field_class_variant_with_selector_unsigned_option_as_option_const(
- const bt_field_class_variant_with_selector_unsigned_option *option)
+bt_field_class_variant_with_selector_integer_unsigned_option_as_option_const(
+ const bt_field_class_variant_with_selector_integer_unsigned_option *option)
{
return __BT_UPCAST_CONST(bt_field_class_variant_option, option);
}
extern const bt_integer_range_set_signed *
-bt_field_class_variant_with_selector_signed_option_borrow_ranges_const(
- const bt_field_class_variant_with_selector_signed_option *option);
+bt_field_class_variant_with_selector_integer_signed_option_borrow_ranges_const(
+ const bt_field_class_variant_with_selector_integer_signed_option *option);
static inline
const bt_field_class_variant_option *
-bt_field_class_variant_with_selector_signed_option_as_option_const(
- const bt_field_class_variant_with_selector_signed_option *option)
+bt_field_class_variant_with_selector_integer_signed_option_as_option_const(
+ const bt_field_class_variant_with_selector_integer_signed_option *option)
{
return __BT_UPCAST_CONST(bt_field_class_variant_option, option);
}
bt_field_class *var_field_class, const char *name,
bt_field_class *field_class);
-typedef enum bt_field_class_variant_with_selector_append_option_status {
+typedef enum bt_field_class_variant_with_selector_integer_append_option_status {
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_OK = __BT_FUNC_STATUS_OK,
-} bt_field_class_variant_with_selector_append_option_status;
+} bt_field_class_variant_with_selector_integer_append_option_status;
-extern bt_field_class_variant_with_selector_append_option_status
-bt_field_class_variant_with_selector_unsigned_append_option(
+extern bt_field_class_variant_with_selector_integer_append_option_status
+bt_field_class_variant_with_selector_integer_unsigned_append_option(
bt_field_class *var_field_class, const char *name,
bt_field_class *field_class,
const bt_integer_range_set_unsigned *range_set);
-extern bt_field_class_variant_with_selector_append_option_status
-bt_field_class_variant_with_selector_signed_append_option(
+extern bt_field_class_variant_with_selector_integer_append_option_status
+bt_field_class_variant_with_selector_integer_signed_append_option(
bt_field_class *var_field_class, const char *name,
bt_field_class *field_class,
const bt_integer_range_set_signed *range_set);
bt_field_variant_borrow_selected_class_option_const(
const bt_field *field);
-extern const bt_field_class_variant_with_selector_unsigned_option *
-bt_field_variant_with_unsigned_selector_borrow_selected_class_option_const(
+extern const bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_variant_with_unsigned_integer_selector_borrow_selected_class_option_const(
const bt_field *field);
-extern const bt_field_class_variant_with_selector_signed_option *
-bt_field_variant_with_signed_selector_borrow_selected_class_option_const(
+extern const bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_variant_with_signed_integer_selector_borrow_selected_class_option_const(
const bt_field *field);
#ifdef __cplusplus
typedef struct bt_field_class_enumeration_unsigned_mapping bt_field_class_enumeration_unsigned_mapping;
typedef struct bt_field_class_structure_member bt_field_class_structure_member;
typedef struct bt_field_class_variant_option bt_field_class_variant_option;
-typedef struct bt_field_class_variant_with_selector_signed_option bt_field_class_variant_with_selector_signed_option;
-typedef struct bt_field_class_variant_with_selector_unsigned_option bt_field_class_variant_with_selector_unsigned_option;
+typedef struct bt_field_class_variant_with_selector_integer_signed_option bt_field_class_variant_with_selector_integer_signed_option;
+typedef struct bt_field_class_variant_with_selector_integer_unsigned_option bt_field_class_variant_with_selector_integer_unsigned_option;
typedef struct bt_field_path bt_field_path;
typedef struct bt_field_path_item bt_field_path_item;
typedef struct bt_graph bt_graph;
from bt2.field_class import _OptionWithSignedIntegerSelectorFieldClass
from bt2.field_class import _VariantFieldClass
from bt2.field_class import _VariantFieldClassWithoutSelector
-from bt2.field_class import _VariantFieldClassWithSelector
-from bt2.field_class import _VariantFieldClassWithUnsignedSelector
-from bt2.field_class import _VariantFieldClassWithSignedSelector
+from bt2.field_class import _VariantFieldClassWithIntegerSelector
+from bt2.field_class import _VariantFieldClassWithUnsignedIntegerSelector
+from bt2.field_class import _VariantFieldClassWithSignedIntegerSelector
from bt2.field_class import _ArrayFieldClass
from bt2.field_class import _StaticArrayFieldClass
from bt2.field_class import _DynamicArrayFieldClass
from bt2.field_class import _OptionWithSignedIntegerSelectorFieldClassConst
from bt2.field_class import _VariantFieldClassConst
from bt2.field_class import _VariantFieldClassWithoutSelectorConst
-from bt2.field_class import _VariantFieldClassWithSelectorConst
-from bt2.field_class import _VariantFieldClassWithUnsignedSelectorConst
-from bt2.field_class import _VariantFieldClassWithSignedSelectorConst
+from bt2.field_class import _VariantFieldClassWithIntegerSelectorConst
+from bt2.field_class import _VariantFieldClassWithUnsignedIntegerSelectorConst
+from bt2.field_class import _VariantFieldClassWithSignedIntegerSelectorConst
from bt2.field_class import _ArrayFieldClassConst
from bt2.field_class import _StaticArrayFieldClassConst
from bt2.field_class import _DynamicArrayFieldClassConst
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionFieldConst,
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionFieldConst,
native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantFieldConst,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR: _VariantFieldConst,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR: _VariantFieldConst,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantFieldConst,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantFieldConst,
}
_TYPE_ID_TO_OBJ = {
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionField,
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionField,
native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantField,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR: _VariantField,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR: _VariantField,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantField,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantField,
}
_user_attributes = property(fset=_user_attributes)
-class _VariantFieldClassWithSelectorOptionConst(_VariantFieldClassOptionConst):
+class _VariantFieldClassWithIntegerSelectorOptionConst(_VariantFieldClassOptionConst):
def __init__(self, owning_var_fc, spec_opt_ptr):
self._spec_ptr = spec_opt_ptr
super().__init__(owning_var_fc, self._as_option_ptr(spec_opt_ptr))
return self._range_set_pycls._create_from_ptr_and_get_ref(range_set_ptr)
-class _VariantFieldClassWithSelectorOption(
- _VariantFieldClassWithSelectorOptionConst, _VariantFieldClassOption
+class _VariantFieldClassWithIntegerSelectorOption(
+ _VariantFieldClassWithIntegerSelectorOptionConst, _VariantFieldClassOption
):
pass
-class _VariantFieldClassWithSignedSelectorOptionConst(
- _VariantFieldClassWithSelectorOptionConst
+class _VariantFieldClassWithSignedIntegerSelectorOptionConst(
+ _VariantFieldClassWithIntegerSelectorOptionConst
):
_as_option_ptr = staticmethod(
- native_bt.field_class_variant_with_selector_signed_option_as_option_const
+ native_bt.field_class_variant_with_selector_integer_signed_option_as_option_const
)
_borrow_ranges_ptr = staticmethod(
- native_bt.field_class_variant_with_selector_signed_option_borrow_ranges_const
+ native_bt.field_class_variant_with_selector_integer_signed_option_borrow_ranges_const
)
_range_set_pycls = bt2_integer_range_set._SignedIntegerRangeSetConst
-class _VariantFieldClassWithSignedSelectorOption(
- _VariantFieldClassWithSignedSelectorOptionConst,
- _VariantFieldClassWithSelectorOption,
+class _VariantFieldClassWithSignedIntegerSelectorOption(
+ _VariantFieldClassWithSignedIntegerSelectorOptionConst,
+ _VariantFieldClassWithIntegerSelectorOption,
):
pass
-class _VariantFieldClassWithUnsignedSelectorOptionConst(
- _VariantFieldClassWithSelectorOptionConst
+class _VariantFieldClassWithUnsignedIntegerSelectorOptionConst(
+ _VariantFieldClassWithIntegerSelectorOptionConst
):
_as_option_ptr = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_option_as_option_const
+ native_bt.field_class_variant_with_selector_integer_unsigned_option_as_option_const
)
_borrow_ranges_ptr = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_option_borrow_ranges_const
+ native_bt.field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const
)
_range_set_pycls = bt2_integer_range_set._UnsignedIntegerRangeSetConst
-class _VariantFieldClassWithUnsignedSelectorOption(
- _VariantFieldClassWithUnsignedSelectorOptionConst,
- _VariantFieldClassWithSelectorOption,
+class _VariantFieldClassWithUnsignedIntegerSelectorOption(
+ _VariantFieldClassWithUnsignedIntegerSelectorOptionConst,
+ _VariantFieldClassWithIntegerSelectorOption,
):
pass
return self
-class _VariantFieldClassWithSelectorConst(_VariantFieldClassConst):
+class _VariantFieldClassWithIntegerSelectorConst(_VariantFieldClassConst):
_NAME = 'Const Variant (with selector)'
@property
return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
-class _VariantFieldClassWithSelector(
- _VariantFieldClassWithSelectorConst, _VariantFieldClass
+class _VariantFieldClassWithIntegerSelector(
+ _VariantFieldClassWithIntegerSelectorConst, _VariantFieldClass
):
_NAME = 'Variant (with selector)'
return self
-class _VariantFieldClassWithUnsignedSelectorConst(_VariantFieldClassWithSelectorConst):
- _NAME = 'Const Variant (with unsigned selector)'
+class _VariantFieldClassWithUnsignedIntegerSelectorConst(
+ _VariantFieldClassWithIntegerSelectorConst
+):
+ _NAME = 'Const Variant (with unsigned integer selector)'
_borrow_option_ptr_by_name = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_borrow_option_by_name_const
+ native_bt.field_class_variant_with_selector_integer_unsigned_borrow_option_by_name_const
)
_borrow_option_ptr_by_index = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_borrow_option_by_index_const
+ native_bt.field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const
)
- _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOptionConst
+ _variant_option_pycls = _VariantFieldClassWithUnsignedIntegerSelectorOptionConst
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
-class _VariantFieldClassWithUnsignedSelector(
- _VariantFieldClassWithUnsignedSelectorConst, _VariantFieldClassWithSelector
+class _VariantFieldClassWithUnsignedIntegerSelector(
+ _VariantFieldClassWithUnsignedIntegerSelectorConst,
+ _VariantFieldClassWithIntegerSelector,
):
- _NAME = 'Variant (with unsigned selector)'
- _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOption
+ _NAME = 'Variant (with unsigned integer selector)'
+ _variant_option_pycls = _VariantFieldClassWithUnsignedIntegerSelectorOption
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
_append_option = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_append_option
+ native_bt.field_class_variant_with_selector_integer_unsigned_append_option
)
-class _VariantFieldClassWithSignedSelectorConst(_VariantFieldClassWithSelectorConst):
- _NAME = 'Const Variant (with signed selector)'
+class _VariantFieldClassWithSignedIntegerSelectorConst(
+ _VariantFieldClassWithIntegerSelectorConst
+):
+ _NAME = 'Const Variant (with signed integer selector)'
_borrow_option_ptr_by_name = staticmethod(
- native_bt.field_class_variant_with_selector_signed_borrow_option_by_name_const
+ native_bt.field_class_variant_with_selector_integer_signed_borrow_option_by_name_const
)
_borrow_option_ptr_by_index = staticmethod(
- native_bt.field_class_variant_with_selector_signed_borrow_option_by_index_const
+ native_bt.field_class_variant_with_selector_integer_signed_borrow_option_by_index_const
)
- _variant_option_pycls = _VariantFieldClassWithSignedSelectorOptionConst
+ _variant_option_pycls = _VariantFieldClassWithSignedIntegerSelectorOptionConst
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
-class _VariantFieldClassWithSignedSelector(
- _VariantFieldClassWithSignedSelectorConst, _VariantFieldClassWithSelector
+class _VariantFieldClassWithSignedIntegerSelector(
+ _VariantFieldClassWithSignedIntegerSelectorConst,
+ _VariantFieldClassWithIntegerSelector,
):
- _NAME = 'Variant (with signed selector)'
- _variant_option_pycls = _VariantFieldClassWithSignedSelectorOption
+ _NAME = 'Variant (with signed integer selector)'
+ _variant_option_pycls = _VariantFieldClassWithSignedIntegerSelectorOption
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
_append_option = staticmethod(
- native_bt.field_class_variant_with_selector_signed_append_option
+ native_bt.field_class_variant_with_selector_integer_signed_append_option
)
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionWithUnsignedIntegerSelectorFieldClassConst,
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionWithSignedIntegerSelectorFieldClassConst,
native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantFieldClassWithoutSelectorConst,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR: _VariantFieldClassWithUnsignedSelectorConst,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR: _VariantFieldClassWithSignedSelectorConst,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantFieldClassWithUnsignedIntegerSelectorConst,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantFieldClassWithSignedIntegerSelectorConst,
}
_FIELD_CLASS_TYPE_TO_OBJ = {
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionWithUnsignedIntegerSelectorFieldClass,
native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionWithSignedIntegerSelectorFieldClass,
native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantFieldClassWithoutSelector,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR: _VariantFieldClassWithUnsignedSelector,
- native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR: _VariantFieldClassWithSignedSelector,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantFieldClassWithUnsignedIntegerSelector,
+ native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantFieldClassWithSignedIntegerSelector,
}
return "OPTION_WITH_SIGNED_INTEGER_SELECTOR";
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
return "VARIANT_WITHOUT_SELECTOR";
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- return "VARIANT_WITH_UNSIGNED_SELECTOR";
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
- return "VARIANT_WITH_SIGNED_SELECTOR";
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ return "VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR";
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
+ return "VARIANT_WITH_SIGNED_INTEGER_SELECTOR";
default:
return "(unknown)";
}
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
const struct bt_field_class_variant *var_fc =
(const void *) field_class;
PRFIELD(var_fc->common.named_fcs->len));
}
- if (field_class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- field_class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ if (field_class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ field_class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
const struct bt_field_class_variant_with_selector *var_with_sel_fc =
(const void *) var_fc;
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
const struct bt_field_variant *var_field = (const void *) field;
if (selector_fc->type == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ||
selector_fc->type == BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION) {
- fc_type = BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR;
+ fc_type = BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR;
} else {
- fc_type = BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR;
+ fc_type = BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR;
}
ret = init_named_field_classes_container(
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,
- expected_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR,
+ expected_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR,
&has_overlap);
if (status) {
/* ranges_overlap() logs errors */
return status;
}
-enum bt_field_class_variant_with_selector_append_option_status
-bt_field_class_variant_with_selector_unsigned_append_option(
+enum bt_field_class_variant_with_selector_integer_append_option_status
+bt_field_class_variant_with_selector_integer_unsigned_append_option(
struct bt_field_class *fc, const char *name,
struct bt_field_class *option_fc,
const struct bt_integer_range_set_unsigned *range_set)
{
return append_option_to_variant_with_selector_field_class(fc,
name, option_fc, (const void *) range_set,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR);
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR);
}
-enum bt_field_class_variant_with_selector_append_option_status
-bt_field_class_variant_with_selector_signed_append_option(
+enum bt_field_class_variant_with_selector_integer_append_option_status
+bt_field_class_variant_with_selector_integer_signed_append_option(
struct bt_field_class *fc, const char *name,
struct bt_field_class *option_fc,
const struct bt_integer_range_set_signed *range_set)
{
return append_option_to_variant_with_selector_field_class(fc,
name, option_fc, (const void *) range_set,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR);
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR);
}
uint64_t bt_field_class_variant_get_option_count(const struct bt_field_class *fc)
(void *) fc, index);
}
-const struct bt_field_class_variant_with_selector_unsigned_option *
-bt_field_class_variant_with_selector_unsigned_borrow_option_by_name_const(
+const struct bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_name_const(
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_VARIANT_WITH_UNSIGNED_SELECTOR,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_by_name(
(void *) fc, name);
}
-const struct bt_field_class_variant_with_selector_unsigned_option *
-bt_field_class_variant_with_selector_unsigned_borrow_option_by_index_const(
+const struct bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const(
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_VARIANT_WITH_UNSIGNED_SELECTOR,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_at_index(
(void *) fc, index);
}
-const struct bt_field_class_variant_with_selector_signed_option *
-bt_field_class_variant_with_selector_signed_borrow_option_by_name_const(
+const struct bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_class_variant_with_selector_integer_signed_borrow_option_by_name_const(
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_VARIANT_WITH_SIGNED_SELECTOR,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_by_name(
(void *) fc, name);
}
-const struct bt_field_class_variant_with_selector_signed_option *
-bt_field_class_variant_with_selector_signed_borrow_option_by_index_const(
+const struct bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_class_variant_with_selector_integer_signed_borrow_option_by_index_const(
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_VARIANT_WITH_SIGNED_SELECTOR,
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR,
"Field class");
return (const void *)
borrow_named_field_class_from_container_field_class_at_index(
}
const struct bt_integer_range_set_unsigned *
-bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
- const struct bt_field_class_variant_with_selector_unsigned_option *option)
+bt_field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const(
+ const struct bt_field_class_variant_with_selector_integer_unsigned_option *option)
{
const struct bt_field_class_variant_with_selector_option *opt =
(const void *) option;
}
const struct bt_integer_range_set_signed *
-bt_field_class_variant_with_selector_signed_option_borrow_ranges_const(
- const struct bt_field_class_variant_with_selector_signed_option *option)
+bt_field_class_variant_with_selector_integer_signed_option_borrow_ranges_const(
+ const struct bt_field_class_variant_with_selector_integer_signed_option *option)
{
const struct bt_field_class_variant_with_selector_option *opt =
(const void *) option;
switch (fc->type) {
case BT_FIELD_CLASS_TYPE_STRUCTURE:
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_named_field_class_container *container_fc =
(void *) fc;
switch (fc->type) {
case BT_FIELD_CLASS_TYPE_STRUCTURE:
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_named_field_class_container *container_fc =
(void *) fc;
#define _BT_ASSERT_PRE_FC_IS_VARIANT_COND(_fc) \
(((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR || \
- ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR || \
- ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR)
+ ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR || \
+ ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR)
#define _BT_ASSERT_PRE_FC_IS_VARIANT_FMT(_name) \
_name " is not a variant field class: %![fc-]+F"
#define _BT_ASSERT_PRE_FC_IS_VARIANT_WITH_SEL_COND(_fc) \
- (((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR || \
- ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR)
+ (((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR || \
+ ((const struct bt_field_class *) (_fc))->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR)
#define _BT_ASSERT_PRE_FC_IS_VARIANT_WITH_SEL_FMT(_name) \
_name " is not a variant field class with a selector: %![fc-]+F"
struct bt_field_class_structure_member;
struct bt_field_class_variant_option;
-struct bt_field_class_variant_with_selector_unsigned_option;
-struct bt_field_class_variant_with_selector_signed_option;
+struct bt_field_class_variant_with_selector_integer_unsigned_option;
+struct bt_field_class_variant_with_selector_integer_signed_option;
struct bt_field_class_named_field_class_container {
struct bt_field_class common;
[BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR] = create_option_field,
[BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR] = create_option_field,
[BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR] = create_variant_field,
- [BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR] = create_variant_field,
- [BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR] = create_variant_field,
+ [BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR] = create_variant_field,
+ [BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR] = create_variant_field,
};
static
[BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR] = destroy_option_field,
[BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR] = destroy_option_field,
[BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR] = destroy_variant_field,
- [BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR] = destroy_variant_field,
- [BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR] = destroy_variant_field,
+ [BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR] = destroy_variant_field,
+ [BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR] = destroy_variant_field,
};
struct bt_field_class *bt_field_borrow_class(struct bt_field *field)
return borrow_variant_field_selected_class_option(field);
}
-const struct bt_field_class_variant_with_selector_unsigned_option *
-bt_field_variant_with_unsigned_selector_borrow_selected_class_option_const(
+const struct bt_field_class_variant_with_selector_integer_unsigned_option *
+bt_field_variant_with_unsigned_integer_selector_borrow_selected_class_option_const(
const struct bt_field *field)
{
BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR, "Field");
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR, "Field");
return (const void *) borrow_variant_field_selected_class_option(field);
}
-const struct bt_field_class_variant_with_selector_signed_option *
-bt_field_variant_with_signed_selector_borrow_selected_class_option_const(
+const struct bt_field_class_variant_with_selector_integer_signed_option *
+bt_field_variant_with_signed_integer_selector_borrow_selected_class_option_const(
const struct bt_field *field)
{
BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field,
- BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR, "Field");
+ BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR, "Field");
return (const void *) borrow_variant_field_selected_class_option(field);
}
#define BT_ASSERT_PRE_DEV_FIELD_IS_VARIANT(_field, _name) \
BT_ASSERT_PRE_DEV( \
((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR || \
- ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR || \
- ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR, \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR || \
+ ((const struct bt_field *) (_field))->class->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR, \
_name " is not a variant field: %![field-]+f", (_field))
#define BT_ASSERT_PRE_DEV_FIELD_IS_SET(_field, _name) \
}
case BT_FIELD_CLASS_TYPE_STRUCTURE:
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_named_field_class_container *container_fc =
(void *) fc;
}
case BT_FIELD_CLASS_TYPE_STRUCTURE:
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_named_field_class_container *container_fc =
(void *) parent_fc;
fc->type == BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR ||
fc->type == BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR ||
fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR ||
- fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
is_valid = false;
goto end;
}
tgt_fc->type == BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR ||
tgt_fc->type == BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR ||
tgt_fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR ||
- tgt_fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- tgt_fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ tgt_fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ tgt_fc->type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
is_valid = false;
goto end;
}
break;
}
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_variant_with_selector *var_fc =
(void *) fc;
}
case BT_FIELD_CLASS_TYPE_STRUCTURE:
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
struct bt_field_class_named_field_class_container *container_fc =
(void *) fc;
bt_field_class_enumeration_signed_mapping_borrow_ranges_const(
mapping);
BT_ASSERT(range_set);
- ret = bt_field_class_variant_with_selector_signed_append_option(
+ ret = bt_field_class_variant_with_selector_integer_signed_append_option(
ir_fc, named_fc->name->str,
option_ir_fc, range_set);
} else {
bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const(
mapping);
BT_ASSERT(range_set);
- ret = bt_field_class_variant_with_selector_unsigned_append_option(
+ ret = bt_field_class_variant_with_selector_integer_unsigned_append_option(
ir_fc, named_fc->name->str,
option_ir_fc, range_set);
}
base_field, index);
break;
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
BT_ASSERT(index == 0);
next_field = bt_field_variant_borrow_selected_option_field(
base_field);
if (ir_var_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR) {
/* No ranges: we're done */
goto end;
- } if (ir_var_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR) {
- const bt_field_class_variant_with_selector_unsigned_option *var_opt =
- bt_field_class_variant_with_selector_unsigned_borrow_option_by_index_const(
+ } if (ir_var_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR) {
+ const bt_field_class_variant_with_selector_integer_unsigned_option *var_opt =
+ bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const(
ir_var_fc, opt_i);
opt_ranges =
- bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const(
var_opt);
} else {
- const bt_field_class_variant_with_selector_signed_option *var_opt =
- bt_field_class_variant_with_selector_signed_borrow_option_by_index_const(
+ const bt_field_class_variant_with_selector_integer_signed_option *var_opt =
+ bt_field_class_variant_with_selector_integer_signed_borrow_option_by_index_const(
ir_var_fc, opt_i);
opt_ranges =
- bt_field_class_variant_with_selector_signed_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_signed_option_borrow_ranges_const(
var_opt);
}
/* Find corresponding mapping by range set in selector FC */
for (i = 0; i < bt_field_class_enumeration_get_mapping_count(ir_tag_fc);
i++) {
- if (ir_var_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR) {
+ if (ir_var_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR) {
const bt_field_class_enumeration_mapping *mapping_base;
const bt_field_class_enumeration_unsigned_mapping *mapping;
const bt_integer_range_set_unsigned *mapping_ranges;
ir_fc_type = bt_field_class_get_type(fc->base.ir_fc);
opt_count = bt_field_class_variant_get_option_count(fc->base.ir_fc);
- if (ir_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- ir_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ if (ir_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ ir_fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
ir_selector_field_path = bt_field_class_variant_with_selector_borrow_selector_field_path_const(
fc->base.ir_fc);
BT_ASSERT(ir_selector_field_path);
ret = translate_option_field_class(ctx);
break;
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
ret = translate_variant_field_class(ctx);
break;
default:
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
bt_field_variant_select_option_field_by_index_status sel_opt_status;
uint64_t in_selected_option_idx;
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
const bt_field_class_variant_option *option;
goto error;
}
- if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR) {
- const bt_field_class_variant_with_selector_unsigned_option *spec_opt =
- bt_field_class_variant_with_selector_unsigned_borrow_option_by_index_const(
+ if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR) {
+ const bt_field_class_variant_with_selector_integer_unsigned_option *spec_opt =
+ bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const(
in_field_class, i);
const bt_integer_range_set_unsigned *ranges =
- bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const(
spec_opt);
- if (bt_field_class_variant_with_selector_unsigned_append_option(
+ if (bt_field_class_variant_with_selector_integer_unsigned_append_option(
out_field_class, option_name,
out_option_field_class, ranges) !=
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_OK) {
- BT_COMP_LOGE_STR("Cannot append option to variant field class with unsigned selector'");
+ BT_COMP_LOGE_STR("Cannot append option to variant field class with unsigned integer selector'");
BT_FIELD_CLASS_PUT_REF_AND_RESET(out_tag_field_class);
ret = -1;
goto error;
}
- } else if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
- const bt_field_class_variant_with_selector_signed_option *spec_opt =
- bt_field_class_variant_with_selector_signed_borrow_option_by_index_const(
+ } else if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
+ const bt_field_class_variant_with_selector_integer_signed_option *spec_opt =
+ bt_field_class_variant_with_selector_integer_signed_borrow_option_by_index_const(
in_field_class, i);
const bt_integer_range_set_signed *ranges =
- bt_field_class_variant_with_selector_signed_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_signed_option_borrow_ranges_const(
spec_opt);
- if (bt_field_class_variant_with_selector_signed_append_option(
+ if (bt_field_class_variant_with_selector_integer_signed_append_option(
out_field_class, option_name,
out_option_field_class, ranges) !=
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_OK) {
- BT_COMP_LOGE_STR("Cannot append option to variant field class with signed selector'");
+ BT_COMP_LOGE_STR("Cannot append option to variant field class with signed integer selector'");
BT_FIELD_CLASS_PUT_REF_AND_RESET(out_tag_field_class);
ret = -1;
goto error;
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
bt_field_class *out_sel_fc = NULL;
- if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
const bt_field_class *in_sel_fc;
const bt_field_path *sel_fp =
bt_field_class_variant_with_selector_borrow_selector_field_path_const(
in_field_class, out_field_class);
break;
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
ret = field_class_variant_copy(md_maps,
in_field_class, out_field_class);
break;
write_compound_member_name(ctx,
bt_field_class_variant_option_get_name(option));
- if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR) {
- const bt_field_class_variant_with_selector_unsigned_option *spec_opt =
- bt_field_class_variant_with_selector_unsigned_borrow_option_by_index_const(
+ if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR) {
+ const bt_field_class_variant_with_selector_integer_unsigned_option *spec_opt =
+ bt_field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const(
fc, index);
orig_ranges =
- bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const(
spec_opt);
is_signed = false;
- } else if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
- const bt_field_class_variant_with_selector_signed_option *spec_opt =
- bt_field_class_variant_with_selector_signed_borrow_option_by_index_const(
+ } else if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
+ const bt_field_class_variant_with_selector_integer_signed_option *spec_opt =
+ bt_field_class_variant_with_selector_integer_signed_borrow_option_by_index_const(
fc, index);
orig_ranges =
- bt_field_class_variant_with_selector_signed_option_borrow_ranges_const(
+ bt_field_class_variant_with_selector_integer_signed_option_borrow_ranges_const(
spec_opt);
is_signed = true;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
type = "Variant (no selector)";
break;
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- type = "Variant (unsigned selector)";
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ type = "Variant (unsigned integer selector)";
break;
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
- type = "Variant (signed selector)";
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
+ type = "Variant (signed integer selector)";
break;
default:
abort();
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
uint64_t option_count =
bt_field_class_variant_get_option_count(fc);
const bt_field_path *sel_field_path = NULL;
- if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR ||
- fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR) {
+ if (fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR ||
+ fc_type == BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR) {
sel_field_path =
bt_field_class_variant_with_selector_borrow_selector_field_path_const(
fc);
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
{
uint64_t option_count =
bt_field_class_variant_get_option_count(fc);
break;
}
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
write_field(ctx,
bt_field_variant_borrow_selected_option_field_const(
field), NULL);
case BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR:
return print_option(pretty, field, print_names);
case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR:
- case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR:
+ case BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR:
return print_variant(pretty, field, print_names);
case BT_FIELD_CLASS_TYPE_STATIC_ARRAY:
return print_array(pretty, field, print_names);
_create_default_field_class = _create_field_class
-class _VariantFieldClassWithSelectorTestCase:
+class _VariantFieldClassWithIntegerSelectorTestCase:
@staticmethod
def _const_value_setter(field):
field['variant'].selected_option_index = 0
class VariantFieldClassWithUnsignedSelectorTestCase(
- _VariantFieldClassWithSelectorTestCase, unittest.TestCase
+ _VariantFieldClassWithIntegerSelectorTestCase, unittest.TestCase
):
def _spec_set_up(self):
self._ranges1 = bt2.UnsignedIntegerRangeSet([(1, 4), (18, 47)])
class VariantFieldClassWithSignedSelectorTestCase(
- _VariantFieldClassWithSelectorTestCase, unittest.TestCase
+ _VariantFieldClassWithIntegerSelectorTestCase, unittest.TestCase
):
def _spec_set_up(self):
self._ranges1 = bt2.SignedIntegerRangeSet([(-10, -4), (18, 47)])
def test_has__VariantFieldClassWithoutSelector(self):
self._assert_in_bt2('_VariantFieldClassWithoutSelector')
- def test_has__VariantFieldClassWithSelector(self):
- self._assert_in_bt2('_VariantFieldClassWithSelector')
+ def test_has__VariantFieldClassWithIntegerSelector(self):
+ self._assert_in_bt2('_VariantFieldClassWithIntegerSelector')
- def test_has__VariantFieldClassWithUnsignedSelector(self):
- self._assert_in_bt2('_VariantFieldClassWithUnsignedSelector')
+ def test_has__VariantFieldClassWithUnsignedIntegerSelector(self):
+ self._assert_in_bt2('_VariantFieldClassWithUnsignedIntegerSelector')
- def test_has__VariantFieldClassWithSignedSelector(self):
- self._assert_in_bt2('_VariantFieldClassWithSignedSelector')
+ def test_has__VariantFieldClassWithSignedIntegerSelector(self):
+ self._assert_in_bt2('_VariantFieldClassWithSignedIntegerSelector')
def test_has__ArrayFieldClass(self):
self._assert_in_bt2('_ArrayFieldClass')
def test_has__VariantFieldClassWithoutSelectorConst(self):
self._assert_in_bt2('_VariantFieldClassWithoutSelectorConst')
- def test_has__VariantFieldClassWithSelectorConst(self):
- self._assert_in_bt2('_VariantFieldClassWithSelectorConst')
+ def test_has__VariantFieldClassWithIntegerSelectorConst(self):
+ self._assert_in_bt2('_VariantFieldClassWithIntegerSelectorConst')
- def test_has__VariantFieldClassWithUnsignedSelectorConst(self):
- self._assert_in_bt2('_VariantFieldClassWithUnsignedSelectorConst')
+ def test_has__VariantFieldClassWithUnsignedIntegerSelectorConst(self):
+ self._assert_in_bt2('_VariantFieldClassWithUnsignedIntegerSelectorConst')
- def test_has__VariantFieldClassWithSignedSelectorConst(self):
- self._assert_in_bt2('_VariantFieldClassWithSignedSelectorConst')
+ def test_has__VariantFieldClassWithSignedIntegerSelectorConst(self):
+ self._assert_in_bt2('_VariantFieldClassWithSignedIntegerSelectorConst')
def test_has__ArrayFieldClassConst(self):
self._assert_in_bt2('_ArrayFieldClassConst')
COSSETTE: [0]
PELCHAT: [1]
VOISINE: [2]
- var: Variant (unsigned selector) (3 options, Selector field path [Event payload: 0]):
+ var: Variant (unsigned integer selector) (3 options, Selector field path [Event payload: 0]):
COSSETTE: [0]: String
PELCHAT: [1]: String
VOISINE: [2]: String
COSSETTE: [0]
PELCHAT: [1]
_VOISINE: [2]
- var: Variant (unsigned selector) (3 options, Selector field path [Event payload: 0]):
+ var: Variant (unsigned integer selector) (3 options, Selector field path [Event payload: 0]):
COSSETTE: [0]: String
PELCHAT: [1]: String
VOISINE: [2]: String
_unsigned: [22]
_variant: [23]
_void: [24]
- var: Variant (unsigned selector) (28 options, Selector field path [Event payload: 0]):
+ var: Variant (unsigned integer selector) (28 options, Selector field path [Event payload: 0]):
align: [0]: String
callsite: [1]: String
const: [2]: String
COSSETTE: [0]
_PELCHAT: [1]
__PELCHAT: [2]
- var: Variant (unsigned selector) (3 options, Selector field path [Event payload: 0]):
+ var: Variant (unsigned integer selector) (3 options, Selector field path [Event payload: 0]):
COSSETTE: [0]: String
PELCHAT: [1]: String
_PELCHAT: [2]: String
COSSETTE: [0]
VOISINE: [2]
__PELCHAT: [1]
- var: Variant (unsigned selector) (3 options, Selector field path [Event payload: 0]):
+ var: Variant (unsigned integer selector) (3 options, Selector field path [Event payload: 0]):
COSSETTE: [0]: String
_PELCHAT: [1]: String
VOISINE: [2]: String