sink.text.details: print bit array field classes and fields
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 13 Aug 2019 22:57:41 +0000 (18:57 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 15 Aug 2019 15:41:44 +0000 (11:41 -0400)
The component prints bit array fields as unsigned integer fields with a
forced hexadecimal base.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: If97e1f05161377c6f8fa3d56e87ad2cc10cb32e2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1910
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/plugins/text/details/write.c

index 6cc9428591d32b43e14fc3f2f7f792cf0156b0c5..6f3d69d796b2d096fa019775324638f0d938d6e2 100644 (file)
@@ -780,6 +780,9 @@ void write_field_class(struct details_write_ctx *ctx, const bt_field_class *fc)
        case BT_FIELD_CLASS_TYPE_BOOL:
                type = "Boolean";
                break;
+       case BT_FIELD_CLASS_TYPE_BIT_ARRAY:
+               type = "Bit array";
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
                type = "Unsigned integer";
                break;
@@ -1520,6 +1523,12 @@ void write_field(struct details_write_ctx *ctx, const bt_field *field,
                write_sp(ctx);
                write_bool_prop_value(ctx, bt_field_bool_get_value(field));
                break;
+       case BT_FIELD_CLASS_TYPE_BIT_ARRAY:
+               format_uint(buf, bt_field_bit_array_get_value_as_integer(field),
+                       16);
+               write_sp(ctx);
+               write_uint_str_prop_value(ctx, buf);
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
        case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION:
        case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
This page took 0.026011 seconds and 4 git commands to generate.