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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:21 +0000 (11:58 -0400)
commitcae164a6d277c44eba67c2bd5ff2955a23241fb6
tree4dae7dfa888e48daceb92763120fe870b78b2faa
parentce95c60bc6b7683b24c7eee35bf0f2a9ee19d0dc
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.026668 seconds and 4 git commands to generate.