bt2: add "get supported MIP versions" method support
This patch makes the `bt2` package wrap the library's "get supported MIP
versions" component class method.
In a Python component class, it is expected that the optional
_user_get_supported_mip_versions() method returns either a
`bt2.UnsignedIntegerRangeSet` object or what such an object needs to be
constructed. In other words, the method can return, for example:
return [0, 1, (3, 5)]
Like in the library, the default _user_get_supported_mip_versions()
returns 0 (only protocol 0 supported):
def _user_get_supported_mip_versions(cls, params, obj, log_level):
return [0]
_bt_get_supported_mip_versions_from_native() returns a new reference on
this unsigned integer range set. Then, the native
component_class_get_supported_mip_versions() copies the ranges from the
returned range set to the range set to fill. I believe this makes
_user_get_supported_mip_versions() easier to use than receiving a range
set object and filling it like it's done in C.
The feature is not tested in this patch because the "get supported MIP
versions" method is not used within the library.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I9e0c6f0fcac23d2224401c1fb1c258f061642767
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1875
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.031697 seconds and 4 git commands to generate.