python: Add stream event context support
authorSimon Marchi <simon.marchi@polymtl.ca>
Sun, 19 Jun 2016 02:54:51 +0000 (22:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 25 Jul 2016 21:36:55 +0000 (17:36 -0400)
commit6b30e7f33df8f9f85e69fb7dc615f56de1ef082b
treeaca3cf5a9202308d82b0c07f4137e2da3a3b83af
parent8ac5a9dfd632d89af2ecd7ae011b580b90c128bd
python: Add stream event context support

This patch adds the possibility to get/set the event context type of a
stream class and set the stream context value of an event from Python.

From my experience, the value setter (Event.stream_context.setter) is
not so useful, since it looks like the context is already instanciated
when you create the event.  So in order to set the values in it, you
only need to get the existing instance and set its fields.  There is no
need to to re-assign the stream context instance to the event.  I still
put it there for completeness.

I added an example of the usage to the existing CTF writer Python
example.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/babeltrace/examples/ctf_writer.py
bindings/python/babeltrace/nativebt.i
bindings/python/babeltrace/writer.py
This page took 0.024516 seconds and 4 git commands to generate.