babeltrace(1): add --connect option and connection management
This patch adds the --connect option to connect component instances
by name (and optional port name):
--connect SRC[SRCPORT]:DST[DSTPORT]
Example:
babeltrace convert --source a.a --name A1 --source a.a --name A2
--sink b.b --name B
--connect A1.port:B
--connect A2.port:B.other-port
The code in babeltrace-cfg-connect.c validates that:
1. All the endpoint specified in connection arguments exist.
2. All connections are in the correct direction (source to filter,
source to sink, filter to filter, filter to sink).
3. SRC and DST are not the same above.
4. All component instances are connected (no orphan component).
5. There's no duplicate connection.
There's a remaining validation to be done: ensure that there's no cycle
in the graph created by those connections.
If no --connect options are specified, babeltrace-cfg-connect.c connects
the component instances automatically:
1. It gives a unique name to unnamed component instances. The automatic
name is TYPE-PLUGIN.COMPCLS.INDEX, where:
TYPE:
`source`, `filter`, or `sink`
PLUGIN:
Plugin name
COMPCLS:
Component class name
INDEX:
Automatic index to avoid collisions
2. It creates a multiplexer filter component configuration
(`utils.mux`).
3. It connects the default ports of all the configured sources to the
default port of this multiplexer filter.
4. It connects this multiplexer filter to the default ports of all the
configured sinks.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025686 seconds and 4 git commands to generate.