Add a generic get_value() implementation

Use get_value to get a field's value. Currently it does not support
compound types. Also it does not support floating point, since getting
a float's value is not implemented in babeltrace now.

Edit by Jérémie Galarneau: Arrays' value should not be returned using
get_char_array(). Implemented get_array_element_at() which returns a
Definition object corresponding to the array's element.

Exposed the bt_array_index function in the Python bindings

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Support for the sequence type

Add support for getting a sequence's value in the python binding.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add a python bindings sequence test

This example is meant to test whether we can get a sequence's values in
the python binding well or not. It is used in conjunction with the
sequence test in the dir tests/ctf-traces/succeed/sequence.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Remove Python 2 specific examples

These examples rely on the cairoplot module which is not compatible with
Python 3.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for floating point fields in the python bindings

get_value() now returns a floating point field's value.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for variant fields in the python bindings

get_value() now returns the variant's selected field's value
when called on a variant.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add support for structure fields in the Python bindings

get_value() returns a dictionary when the field is a structure.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>