common: remove `prio-heap.{c,h}`
[babeltrace.git] / doc / man / babeltrace2-query-babeltrace.support-info.7.txt
CommitLineData
e70712b3
PP
1= babeltrace2-query-babeltrace.support-info(7)
2:manpagetype: query object
3:revdate: 14 September 2019
4
5
6== NAME
7
8babeltrace2-query-babeltrace.support-info - Babeltrace 2's support info
9query object
10
11
12== DESCRIPTION
13
14The `babeltrace.support-info` Babeltrace~2 query object indicates,
15for a given source component class, whether or not its instance can
16handle a given input, and if so, what's the confidence of this support.
17
18Said input can be a simple string, an existing file path, or an existing
19directory path. Components which expect some form of URI can handle a
20string input, while components which expect an existing file or
21directory can handle a file/directory path input.
22
23When the source component class's query method replies that its
24component can handle a given input, it can also specify the name of a
25group in which to put that input. All the inputs of a given group, for a
26given component class, should be passed when instantiating the component
27class as its nlparam:inputs initialization parameter (array of strings).
28
29The man:babeltrace2-convert(1) command queries this object from specific
30source component classes to find the most appropriate for a given
31non-option argument.
32
33
34== PARAMETERS
35
36param:input='INPUT' vtype:[string]::
37 Check input 'INPUT'.
38+
39Depending on the param:type parameter, this is a simple string, a file
40path, or a directory path.
41
42param:type=(`string` | `file` | `directory`) vtype:[string]::
43 Input type, one of:
44+
45--
46`string`::
47 param:input parameter is a simple string.
48
49`file`::
50 param:input parameter is a file path.
51
52`directory`::
53 param:input parameter is a directory path.
54+
55It is expected that the query method does not recurse into this
56directory: the result object indicates whether or not the component
57class supports this specific directory (param:input).
58--
59
60
61== RESULT OBJECT
62
63The result object can be one of:
64
65* [[simple-real]]A simple real value which is the weight, between 0 and
66 1, of the support by the component class for the given input.
67+
68A weight of 0 means the input is unsupported while a weight of 1 means
69it's fully supported. Any value in between shows how confident the
70component class is about the support of the given input.
71
72* A map with a weight and an optional group name.
73
74When it's a map, the expected entries are:
75
76qres:group='GROUP-NAME' vtype:[optional string]::
77 Put the given input into a group named 'GROUP-NAME' for this
78 component class.
79+
80If this entry is missing, then the given input gets its own, unique
81group.
82
83qres:weight='WEIGHT' vtype:[real]::
84 Weight, between 0 and 1, of the support by the component class for
85 the given input.
86+
87The semantics are the same as when the result object is a
88<<simple-real,simple real value>>.
89
90
91== EXAMPLES
92
93=== Query parameters
94
95.String input.
96====
97[source,yaml]
98----
99input: net://relayd177/host/node23/active
100type: string
101----
102====
103
104.File path input.
105====
106[source,yaml]
107----
108input: /home/user/traces/2019-08-26/quad.tr
109type: file
110----
111====
112
113=== Result object
114
115.Simple weight (unique group).
116====
117[source,yaml]
118----
1190.5
120----
121====
122
123.Weight and specific group.
124====
125[source,yaml]
126----
127group: 63a4b7e5-37f0-4254-a048-a0cff9e5b761
128weight: 0.75
129----
130====
131
132.Weight within a map (unique group).
133====
134[source,yaml]
135----
136weight: 0.6
137----
138====
139
140
141include::common-footer.txt[]
142
143
144== SEE ALSO
145
146man:babeltrace2-intro(7),
147man:babeltrace2-query(1),
148man:babeltrace2-convert(1)
This page took 0.057763 seconds and 4 git commands to generate.