+bt_bool bt_field_bool_get_value(const struct bt_field *field)
+{
+ const struct bt_field_bool *bool_field = (const void *) field;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_IS_SET(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field, BT_FIELD_CLASS_TYPE_BOOL,
+ "Field");
+ return (bt_bool) bool_field->value;
+}
+
+void bt_field_bool_set_value(struct bt_field *field, bt_bool value)
+{
+ struct bt_field_bool *bool_field = (void *) field;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field, BT_FIELD_CLASS_TYPE_BOOL,
+ "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field");
+ bool_field->value = (bool) value;
+ bt_field_set_single(field, true);
+}
+
+uint64_t bt_field_bit_array_get_value_as_integer(const struct bt_field *field)
+{
+ const struct bt_field_bit_array *ba_field = (const void *) field;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_IS_SET(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field,
+ BT_FIELD_CLASS_TYPE_BIT_ARRAY, "Field");
+ return ba_field->value_as_int;
+}
+
+void bt_field_bit_array_set_value_as_integer(struct bt_field *field,
+ uint64_t value)
+{
+ struct bt_field_bit_array *ba_field = (void *) field;
+ struct bt_field_class_bit_array *ba_fc;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(field, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HAS_CLASS_TYPE(field,
+ BT_FIELD_CLASS_TYPE_BIT_ARRAY, "Field");
+ BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field");
+ ba_fc = (void *) field->class;
+ ba_field->value_as_int = value;
+
+ if (ba_fc->length < 64) {
+ /* Apply mask */
+ ba_field->value_as_int &= ((UINT64_C(1) << ba_fc->length) - 1);
+ }
+
+ bt_field_set_single(field, true);
+}
+
+int64_t bt_field_integer_signed_get_value(const struct bt_field *field)