lib: add bt_get_{greatest_operative,maximal}_mip_version() functions
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 22:40:50 +0000 (18:40 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 13 Aug 2019 00:28:02 +0000 (20:28 -0400)
commit00c988c958149f894567a1c41d480127425bfb3e
tree0ac10cefb12fb6df87a4080d6fcbce172c6f19ab
parent2c938e2f136edc56a08f1c6fd8a1557c1803b09e
lib: add bt_get_{greatest_operative,maximal}_mip_version() functions

This patch adds the bt_get_greatest_operative_mip_version() and
bt_get_maximal_mip_version() functions.

The bt_get_greatest_operative_mip_version() accepts a set of component
descriptors and returns, on success, the (greatest) operative message
interchange protocol (MIP) version for all those descriptors.

bt_get_greatest_operative_mip_version() can fail if any component class's "get
supported MIP versions" fails. It can also return
`BT_GET_OPERATIVE_MIP_VERSION_STATUS_NO_MATCH` if any component
descriptor does not support MIP version 0, the only MIP version
currently supported by the the library.

bt_get_maximal_mip_version() returns the maximal MIP version supported
by the library (currently 0).

The purpose of both functions is to be used eventually to create a graph
of which all the components and the library itself operate using a
specific MIP. You can use bt_get_greatest_operative_mip_version() to find the
greatest compatible MIP version to be used by that set of component
descriptors, or you can use bt_get_maximal_mip_version() to get the
greatest MIP version possible for that library.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: If3875b3d76ddca2b4d58a18a829394eadb3bcd39
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1872
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
include/Makefile.am
include/babeltrace2/babeltrace.h
include/babeltrace2/func-status.h
include/babeltrace2/graph/mip.h [new file with mode: 0644]
src/lib/func-status.h
src/lib/graph/Makefile.am
src/lib/graph/component-descriptor-set.h
src/lib/graph/mip.c [new file with mode: 0644]
This page took 0.025419 seconds and 4 git commands to generate.