Return event fields by field name

Since a field may be present both in an event and its stream's scope, this returns
a list which contains all the fields by the name. The examples are also changed
to match this new API.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Remove the unnecessary underscore prefix

When getting the fields of an event by name, it is not necessary
to add an underscore prefix. This removes the underscore prefix of
the field names in the examples.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Support getting the value of enums

Use 'get_enum_str' to get the string matching the current enumeration.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Use a unique name to get a field's value

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.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Add sequence test

Current tests do not cover sequence type in the babeltrace tests. This patch
adds an test that includes the sequence type.

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Support for the sequence type

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

Signed-off-by: Xiaona Han <xiaonahappy13@163.com>
Add a sequence test in the python binding

This example is to test whether we can get a sequence's value 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>
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>