babeltrace2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/babeltrace2.gemspec +13 -0
- data/lib/babeltrace2.rb +49 -0
- data/lib/babeltrace2/error-reporting.rb +432 -0
- data/lib/babeltrace2/func-status.rb +26 -0
- data/lib/babeltrace2/graph/component-class-dev.rb +801 -0
- data/lib/babeltrace2/graph/component-class.rb +134 -0
- data/lib/babeltrace2/graph/component-descriptor-set.rb +78 -0
- data/lib/babeltrace2/graph/component.rb +362 -0
- data/lib/babeltrace2/graph/connection.rb +35 -0
- data/lib/babeltrace2/graph/graph.rb +523 -0
- data/lib/babeltrace2/graph/interrupter.rb +57 -0
- data/lib/babeltrace2/graph/message-iterator-class.rb +374 -0
- data/lib/babeltrace2/graph/message-iterator.rb +253 -0
- data/lib/babeltrace2/graph/message.rb +721 -0
- data/lib/babeltrace2/graph/port.rb +124 -0
- data/lib/babeltrace2/graph/private-query-executor.rb +4 -0
- data/lib/babeltrace2/graph/query-executor.rb +142 -0
- data/lib/babeltrace2/graph/self-component-class.rb +37 -0
- data/lib/babeltrace2/graph/self-component-port.rb +35 -0
- data/lib/babeltrace2/graph/self-component.rb +264 -0
- data/lib/babeltrace2/graph/self-message-iterator.rb +147 -0
- data/lib/babeltrace2/integer-range-set.rb +275 -0
- data/lib/babeltrace2/logging-defs.rb +19 -0
- data/lib/babeltrace2/logging.rb +77 -0
- data/lib/babeltrace2/plugin/plugin-dev.rb +335 -0
- data/lib/babeltrace2/plugin/plugin-loading.rb +459 -0
- data/lib/babeltrace2/trace-ir/clock-class.rb +258 -0
- data/lib/babeltrace2/trace-ir/clock-snapshot.rb +45 -0
- data/lib/babeltrace2/trace-ir/event-class.rb +292 -0
- data/lib/babeltrace2/trace-ir/event.rb +91 -0
- data/lib/babeltrace2/trace-ir/field-class.rb +1416 -0
- data/lib/babeltrace2/trace-ir/field-path.rb +123 -0
- data/lib/babeltrace2/trace-ir/field.rb +871 -0
- data/lib/babeltrace2/trace-ir/packet.rb +57 -0
- data/lib/babeltrace2/trace-ir/stream-class.rb +425 -0
- data/lib/babeltrace2/trace-ir/stream.rb +137 -0
- data/lib/babeltrace2/trace-ir/trace-class.rb +343 -0
- data/lib/babeltrace2/trace-ir/trace.rb +321 -0
- data/lib/babeltrace2/types.rb +667 -0
- data/lib/babeltrace2/util.rb +23 -0
- data/lib/babeltrace2/value.rb +869 -0
- data/lib/babeltrace2/version.rb +126 -0
- metadata +105 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
module Babeltrace2
|
2
|
+
attach_function :bt_packet_create,
|
3
|
+
[ :bt_stream_handle ],
|
4
|
+
:bt_packet_handle
|
5
|
+
|
6
|
+
attach_function :bt_packet_borrow_stream,
|
7
|
+
[ :bt_packet_handle ],
|
8
|
+
:bt_stream_handle
|
9
|
+
|
10
|
+
attach_function :bt_packet_borrow_stream_const,
|
11
|
+
[ :bt_packet_handle ],
|
12
|
+
:bt_stream_handle
|
13
|
+
|
14
|
+
attach_function :bt_packet_borrow_context_field,
|
15
|
+
[ :bt_packet_handle ],
|
16
|
+
:bt_field_handle
|
17
|
+
|
18
|
+
attach_function :bt_packet_borrow_context_field_const,
|
19
|
+
[ :bt_packet_handle ],
|
20
|
+
:bt_field_handle
|
21
|
+
|
22
|
+
attach_function :bt_packet_get_ref,
|
23
|
+
[ :bt_packet_handle ],
|
24
|
+
:void
|
25
|
+
|
26
|
+
attach_function :bt_packet_put_ref,
|
27
|
+
[ :bt_packet_handle ],
|
28
|
+
:void
|
29
|
+
|
30
|
+
class BTPacket < BTSharedObject
|
31
|
+
@get_ref = :bt_packet_get_ref
|
32
|
+
@put_ref = :bt_packet_put_ref
|
33
|
+
|
34
|
+
def initialize(handle = nil, retain: true, auto_release: true,
|
35
|
+
stream: nil)
|
36
|
+
if handle
|
37
|
+
super(handle, retain: retain, auto_release: auto_release)
|
38
|
+
else
|
39
|
+
handle = Babeltrace2.bt_packet_create(stream)
|
40
|
+
raise Babeltrace2.process_error if handle.null?
|
41
|
+
super(handle)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def get_stream
|
46
|
+
BTStream.new(Babeltrace2.bt_packet_borrow_stream(@handle), retain: true)
|
47
|
+
end
|
48
|
+
alias stream get_stream
|
49
|
+
|
50
|
+
def get_context_field
|
51
|
+
handle = Babeltrace2.bt_packet_borrow_context_field(@handle)
|
52
|
+
return nil if handle.null?
|
53
|
+
BTField.from_handle(handle)
|
54
|
+
end
|
55
|
+
alias context_field get_context_field
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,425 @@
|
|
1
|
+
module Babeltrace2
|
2
|
+
attach_function :bt_stream_class_create,
|
3
|
+
[ :bt_trace_class_handle ],
|
4
|
+
:bt_stream_class_handle
|
5
|
+
|
6
|
+
attach_function :bt_stream_class_create_with_id,
|
7
|
+
[ :bt_trace_class_handle, :uint64 ],
|
8
|
+
:bt_stream_class_handle
|
9
|
+
|
10
|
+
attach_function :bt_stream_class_borrow_trace_class,
|
11
|
+
[ :bt_stream_class_handle ],
|
12
|
+
:bt_trace_class_handle
|
13
|
+
|
14
|
+
attach_function :bt_stream_class_borrow_trace_class_const,
|
15
|
+
[ :bt_stream_class_handle ],
|
16
|
+
:bt_trace_class_handle
|
17
|
+
|
18
|
+
attach_function :bt_stream_class_get_event_class_count,
|
19
|
+
[ :bt_stream_class_handle ],
|
20
|
+
:uint64
|
21
|
+
|
22
|
+
attach_function :bt_stream_class_borrow_event_class_by_index,
|
23
|
+
[ :bt_stream_class_handle, :uint64 ],
|
24
|
+
:bt_event_class_handle
|
25
|
+
|
26
|
+
attach_function :bt_stream_class_borrow_event_class_by_index_const,
|
27
|
+
[ :bt_stream_class_handle, :uint64 ],
|
28
|
+
:bt_event_class_handle
|
29
|
+
|
30
|
+
attach_function :bt_stream_class_borrow_event_class_by_id,
|
31
|
+
[ :bt_stream_class_handle, :uint64 ],
|
32
|
+
:bt_event_class_handle
|
33
|
+
|
34
|
+
attach_function :bt_stream_class_borrow_event_class_by_id_const,
|
35
|
+
[ :bt_stream_class_handle, :uint64 ],
|
36
|
+
:bt_event_class_handle
|
37
|
+
|
38
|
+
attach_function :bt_stream_class_get_id,
|
39
|
+
[ :bt_stream_class_handle ],
|
40
|
+
:uint64
|
41
|
+
|
42
|
+
BT_STREAM_CLASS_SET_NAME_STATUS_OK = BT_FUNC_STATUS_OK
|
43
|
+
BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR = BT_FUNC_STATUS_MEMORY_ERROR
|
44
|
+
BTStreamClassSetNameStatus = enum :bt_stream_class_set_name_status,
|
45
|
+
[ :BT_STREAM_CLASS_SET_NAME_STATUS_OK,
|
46
|
+
BT_STREAM_CLASS_SET_NAME_STATUS_OK,
|
47
|
+
:BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR,
|
48
|
+
BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR ]
|
49
|
+
|
50
|
+
attach_function :bt_stream_class_set_name,
|
51
|
+
[ :bt_stream_class_handle, :string ],
|
52
|
+
:bt_stream_class_set_name_status
|
53
|
+
|
54
|
+
attach_function :bt_stream_class_get_name,
|
55
|
+
[ :bt_stream_class_handle ],
|
56
|
+
:string
|
57
|
+
|
58
|
+
BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK = BT_FUNC_STATUS_OK
|
59
|
+
BTStreamClassSetDefaultClockClassStatus =
|
60
|
+
enum :bt_stream_class_set_default_clock_class_status,
|
61
|
+
[ :BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK,
|
62
|
+
BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK ]
|
63
|
+
|
64
|
+
attach_function :bt_stream_class_set_default_clock_class,
|
65
|
+
[ :bt_stream_class_handle, :bt_clock_class_handle ],
|
66
|
+
:bt_stream_class_set_default_clock_class_status
|
67
|
+
|
68
|
+
attach_function :bt_stream_class_borrow_default_clock_class,
|
69
|
+
[ :bt_stream_class_handle ],
|
70
|
+
:bt_clock_class_handle
|
71
|
+
|
72
|
+
attach_function :bt_stream_class_borrow_default_clock_class_const,
|
73
|
+
[ :bt_stream_class_handle ],
|
74
|
+
:bt_clock_class_handle
|
75
|
+
|
76
|
+
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK = BT_FUNC_STATUS_OK
|
77
|
+
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR = BT_FUNC_STATUS_MEMORY_ERROR
|
78
|
+
BTStreamClassSetFieldClassStatus =
|
79
|
+
enum :bt_stream_class_set_field_class_status,
|
80
|
+
[ :BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK,
|
81
|
+
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK,
|
82
|
+
:BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR,
|
83
|
+
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR ]
|
84
|
+
|
85
|
+
attach_function :bt_stream_class_set_packet_context_field_class,
|
86
|
+
[ :bt_stream_class_handle, :bt_field_class_handle ],
|
87
|
+
:bt_stream_class_set_field_class_status
|
88
|
+
|
89
|
+
attach_function :bt_stream_class_borrow_packet_context_field_class,
|
90
|
+
[ :bt_stream_class_handle ],
|
91
|
+
:bt_field_class_handle
|
92
|
+
|
93
|
+
attach_function :bt_stream_class_borrow_packet_context_field_class_const,
|
94
|
+
[ :bt_stream_class_handle ],
|
95
|
+
:bt_field_class_handle
|
96
|
+
|
97
|
+
attach_function :bt_stream_class_set_event_common_context_field_class,
|
98
|
+
[ :bt_stream_class_handle, :bt_field_class_handle ],
|
99
|
+
:bt_stream_class_set_field_class_status
|
100
|
+
|
101
|
+
attach_function :bt_stream_class_borrow_event_common_context_field_class,
|
102
|
+
[ :bt_stream_class_handle ],
|
103
|
+
:bt_field_class_handle
|
104
|
+
|
105
|
+
attach_function :bt_stream_class_borrow_event_common_context_field_class_const,
|
106
|
+
[ :bt_stream_class_handle ],
|
107
|
+
:bt_field_class_handle
|
108
|
+
|
109
|
+
attach_function :bt_stream_class_set_assigns_automatic_event_class_id,
|
110
|
+
[ :bt_stream_class_handle, :bt_bool ],
|
111
|
+
:void
|
112
|
+
|
113
|
+
attach_function :bt_stream_class_assigns_automatic_event_class_id,
|
114
|
+
[ :bt_stream_class_handle ],
|
115
|
+
:bt_bool
|
116
|
+
|
117
|
+
attach_function :bt_stream_class_set_assigns_automatic_stream_id,
|
118
|
+
[ :bt_stream_class_handle, :bt_bool ],
|
119
|
+
:void
|
120
|
+
|
121
|
+
attach_function :bt_stream_class_assigns_automatic_stream_id,
|
122
|
+
[ :bt_stream_class_handle ],
|
123
|
+
:bt_bool
|
124
|
+
|
125
|
+
attach_function :bt_stream_class_set_supports_packets,
|
126
|
+
[ :bt_stream_class_handle, :bt_bool,
|
127
|
+
:bt_bool, :bt_bool ],
|
128
|
+
:void
|
129
|
+
|
130
|
+
attach_function :bt_stream_class_supports_packets,
|
131
|
+
[ :bt_stream_class_handle ],
|
132
|
+
:bt_bool
|
133
|
+
|
134
|
+
attach_function :bt_stream_class_packets_have_beginning_default_clock_snapshot,
|
135
|
+
[ :bt_stream_class_handle ],
|
136
|
+
:bt_bool
|
137
|
+
|
138
|
+
attach_function :bt_stream_class_packets_have_end_default_clock_snapshot,
|
139
|
+
[ :bt_stream_class_handle ],
|
140
|
+
:bt_bool
|
141
|
+
|
142
|
+
attach_function :bt_stream_class_set_supports_discarded_events,
|
143
|
+
[ :bt_stream_class_handle, :bt_bool, :bt_bool ],
|
144
|
+
:void
|
145
|
+
|
146
|
+
attach_function :bt_stream_class_supports_discarded_events,
|
147
|
+
[ :bt_stream_class_handle ],
|
148
|
+
:bt_bool
|
149
|
+
|
150
|
+
attach_function :bt_stream_class_discarded_events_have_default_clock_snapshots,
|
151
|
+
[ :bt_stream_class_handle ],
|
152
|
+
:bt_bool
|
153
|
+
|
154
|
+
attach_function :bt_stream_class_set_supports_discarded_packets,
|
155
|
+
[ :bt_stream_class_handle, :bt_bool, :bt_bool ],
|
156
|
+
:void
|
157
|
+
|
158
|
+
attach_function :bt_stream_class_supports_discarded_packets,
|
159
|
+
[ :bt_stream_class_handle ],
|
160
|
+
:bt_bool
|
161
|
+
|
162
|
+
attach_function :bt_stream_class_discarded_packets_have_default_clock_snapshots,
|
163
|
+
[ :bt_stream_class_handle ],
|
164
|
+
:bt_bool
|
165
|
+
|
166
|
+
attach_function :bt_stream_class_set_user_attributes,
|
167
|
+
[ :bt_stream_class_handle, :bt_value_map_handle ],
|
168
|
+
:void
|
169
|
+
|
170
|
+
attach_function :bt_stream_class_borrow_user_attributes,
|
171
|
+
[ :bt_stream_class_handle ],
|
172
|
+
:bt_value_map_handle
|
173
|
+
|
174
|
+
attach_function :bt_stream_class_borrow_user_attributes_const,
|
175
|
+
[ :bt_stream_class_handle ],
|
176
|
+
:bt_value_map_handle
|
177
|
+
|
178
|
+
attach_function :bt_stream_class_get_ref,
|
179
|
+
[ :bt_stream_class_handle ],
|
180
|
+
:void
|
181
|
+
|
182
|
+
attach_function :bt_stream_class_put_ref,
|
183
|
+
[ :bt_stream_class_handle ],
|
184
|
+
:void
|
185
|
+
|
186
|
+
class BTStreamClass < BTSharedObject
|
187
|
+
SetNameStatus = BTStreamClassSetNameStatus
|
188
|
+
SetDefaultClockClassStatus = BTStreamClassSetDefaultClockClassStatus
|
189
|
+
SetFieldClassStatus = BTStreamClassSetFieldClassStatus
|
190
|
+
@get_ref = :bt_stream_class_get_ref
|
191
|
+
@put_ref = :bt_stream_class_put_ref
|
192
|
+
|
193
|
+
def initialize(handle = nil, retain: true, auto_release: true,
|
194
|
+
trace_class: nil, id: nil)
|
195
|
+
if handle
|
196
|
+
super(handle, retain: retain, auto_release: auto_release)
|
197
|
+
else
|
198
|
+
handle = if id
|
199
|
+
Babeltrace2.bt_stream_class_create_with_id(trace_class, id)
|
200
|
+
else
|
201
|
+
Babeltrace2.bt_stream_class_create(trace_class)
|
202
|
+
end
|
203
|
+
raise Babeltrace2.process_error if handle.null?
|
204
|
+
super(handle, retain: false)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
def get_trace_class
|
209
|
+
BTTraceClass.new(Babeltrace2.bt_stream_class_borrow_trace_class(@handle), retain: true)
|
210
|
+
end
|
211
|
+
alias trace_class get_trace_class
|
212
|
+
|
213
|
+
def get_event_class_count
|
214
|
+
Babeltrace2.bt_stream_class_get_event_class_count(@handle)
|
215
|
+
end
|
216
|
+
alias event_class_count get_event_class_count
|
217
|
+
|
218
|
+
def get_event_class_by_index(index)
|
219
|
+
count = event_class_count
|
220
|
+
index += count if count < 0
|
221
|
+
return nil if index >= count || index < 0
|
222
|
+
BTEventClass.new(
|
223
|
+
Babeltrace2.bt_stream_class_borrow_event_class_by_index(@handle, index), retain: true)
|
224
|
+
end
|
225
|
+
|
226
|
+
def get_event_class_by_id(id)
|
227
|
+
handle = Babeltrace2.bt_stream_class_borrow_event_class_by_id(@handle, id)
|
228
|
+
return nil if handle.null?
|
229
|
+
BTEventClass.new(handle, retain: true)
|
230
|
+
end
|
231
|
+
|
232
|
+
def get_id
|
233
|
+
Babeltrace2.bt_stream_class_get_id(@handle)
|
234
|
+
end
|
235
|
+
alias id get_id
|
236
|
+
|
237
|
+
def set_name(name)
|
238
|
+
res = Babeltrace2.bt_stream_class_set_name(@handle, name)
|
239
|
+
raise Babeltrace2.process_error(res) if res != :BT_STREAM_CLASS_SET_NAME_STATUS_OK
|
240
|
+
self
|
241
|
+
end
|
242
|
+
|
243
|
+
def name=(name)
|
244
|
+
set_name(name)
|
245
|
+
name
|
246
|
+
end
|
247
|
+
|
248
|
+
def get_name
|
249
|
+
Babeltrace2.bt_stream_class_get_name(@handle)
|
250
|
+
end
|
251
|
+
alias name get_name
|
252
|
+
|
253
|
+
def set_default_clock_class(clock_class)
|
254
|
+
res = Babeltrace2.bt_stream_class_set_default_clock_class(@handle, clock_class)
|
255
|
+
raise Babeltrace2.process_error(res) if res != :BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK
|
256
|
+
self
|
257
|
+
end
|
258
|
+
|
259
|
+
def default_clock_class=(clock_class)
|
260
|
+
set_default_clock_class(clock_class)
|
261
|
+
clock_class
|
262
|
+
end
|
263
|
+
|
264
|
+
def get_default_clock_class
|
265
|
+
handle = Babeltrace2.bt_stream_class_borrow_default_clock_class(@handle)
|
266
|
+
return nil if handle.null?
|
267
|
+
BTClockClass.new(handle, retain: true)
|
268
|
+
end
|
269
|
+
alias default_clock_class get_default_clock_class
|
270
|
+
|
271
|
+
def set_packet_context_field_class(field_class)
|
272
|
+
res = Babeltrace2.bt_stream_class_set_packet_context_field_class(
|
273
|
+
@handle, field_class)
|
274
|
+
raise Babeltrace2.process_error(res) if res != :BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK
|
275
|
+
self
|
276
|
+
end
|
277
|
+
|
278
|
+
def packet_context_field_class=(field_class)
|
279
|
+
set_packet_context_field_class(field_class)
|
280
|
+
field_class
|
281
|
+
end
|
282
|
+
|
283
|
+
def get_packet_context_field_class
|
284
|
+
handle = Babeltrace2.bt_stream_class_borrow_packet_context_field_class(@handle)
|
285
|
+
return nil if handle.null?
|
286
|
+
BTFieldClass.from_handle(handle)
|
287
|
+
end
|
288
|
+
alias packet_context_field_class get_packet_context_field_class
|
289
|
+
|
290
|
+
def set_event_common_context_field_class(field_class)
|
291
|
+
res = Babeltrace2.bt_stream_class_set_event_common_context_field_class(
|
292
|
+
@handle, field_class)
|
293
|
+
raise Babeltrace2.process_error(res) if res != :BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK
|
294
|
+
self
|
295
|
+
end
|
296
|
+
|
297
|
+
def event_common_context_field_class=(field_class)
|
298
|
+
set_event_common_context_field_class(field_class)
|
299
|
+
field_class
|
300
|
+
end
|
301
|
+
|
302
|
+
def get_event_common_context_field_class
|
303
|
+
handle = Babeltrace2.bt_stream_class_borrow_event_common_context_field_class(@handle)
|
304
|
+
return nil if handle.null?
|
305
|
+
BTFieldClass.from_handle(handle)
|
306
|
+
end
|
307
|
+
alias event_common_context_field_class get_event_common_context_field_class
|
308
|
+
|
309
|
+
def set_assigns_automatic_event_class_id(assigns_automatic_event_class_id)
|
310
|
+
Babeltrace2.bt_stream_class_set_assigns_automatic_event_class_id(
|
311
|
+
@handle, assigns_automatic_event_class_id ? BT_TRUE : BT_FALSE)
|
312
|
+
self
|
313
|
+
end
|
314
|
+
|
315
|
+
def assigns_automatic_event_class_id=(assigns_automatic_event_class_id)
|
316
|
+
set_assigns_automatic_event_class_id(assigns_automatic_event_class_id)
|
317
|
+
assigns_automatic_event_class_id
|
318
|
+
end
|
319
|
+
|
320
|
+
def assigns_automatic_event_class_id
|
321
|
+
Babeltrace2.bt_stream_class_assigns_automatic_event_class_id(@handle) != BT_FALSE
|
322
|
+
end
|
323
|
+
alias assigns_automatic_event_class_id? assigns_automatic_event_class_id
|
324
|
+
|
325
|
+
def set_assigns_automatic_stream_id(assigns_automatic_stream_id)
|
326
|
+
Babeltrace2.bt_stream_class_set_assigns_automatic_stream_id(
|
327
|
+
@handle, assigns_automatic_stream_id ? BT_TRUE : BT_FALSE)
|
328
|
+
self
|
329
|
+
end
|
330
|
+
|
331
|
+
def assigns_automatic_stream_id=(assigns_automatic_stream_id)
|
332
|
+
set_assigns_automatic_stream_id(assigns_automatic_stream_id)
|
333
|
+
assigns_automatic_stream_id
|
334
|
+
end
|
335
|
+
|
336
|
+
def assigns_automatic_stream_id
|
337
|
+
Babeltrace2.bt_stream_class_assigns_automatic_stream_id(@handle) != BT_FALSE
|
338
|
+
end
|
339
|
+
alias assigns_automatic_stream_id? assigns_automatic_stream_id
|
340
|
+
|
341
|
+
def set_supports_packets(supports_packets,
|
342
|
+
with_beginning_default_clock_snapshot: false,
|
343
|
+
with_end_default_clock_snapshot: false)
|
344
|
+
Babeltrace2.bt_stream_class_set_supports_packets(@handle,
|
345
|
+
supports_packets ? BT_TRUE : BT_FALSE,
|
346
|
+
with_beginning_default_clock_snapshot ? BT_TRUE : BT_FALSE,
|
347
|
+
with_end_default_clock_snapshot ? BT_TRUE : BT_FALSE)
|
348
|
+
self
|
349
|
+
end
|
350
|
+
|
351
|
+
def supports_packets
|
352
|
+
Babeltrace2.bt_stream_class_supports_packets(@handle) != BT_FALSE
|
353
|
+
end
|
354
|
+
alias supports_packets? supports_packets
|
355
|
+
|
356
|
+
def packets_have_beginning_default_clock_snapshot
|
357
|
+
Babeltrace2.bt_stream_class_packets_have_beginning_default_clock_snapshot(@handle) != BT_FALSE
|
358
|
+
end
|
359
|
+
alias packets_have_beginning_default_clock_snapshot? packets_have_beginning_default_clock_snapshot
|
360
|
+
|
361
|
+
def packets_have_end_default_clock_snapshot
|
362
|
+
Babeltrace2.bt_stream_class_packets_have_end_default_clock_snapshot(@handle) != BT_FALSE
|
363
|
+
end
|
364
|
+
alias packets_have_end_default_clock_snapshot? packets_have_end_default_clock_snapshot
|
365
|
+
|
366
|
+
def set_supports_discarded_events(supports_discarded_events,
|
367
|
+
with_default_clock_snapshots: false)
|
368
|
+
Babeltrace2.bt_stream_class_set_supports_discarded_events(
|
369
|
+
@handle, supports_discarded_events ? BT_TRUE : BT_FALSE,
|
370
|
+
with_default_clock_snapshots ? BT_TRUE : BT_FALSE)
|
371
|
+
self
|
372
|
+
end
|
373
|
+
|
374
|
+
def supports_discarded_events
|
375
|
+
Babeltrace2.bt_stream_class_supports_discarded_events(@handle) != BT_FALSE
|
376
|
+
end
|
377
|
+
alias supports_discarded_events? supports_discarded_events
|
378
|
+
|
379
|
+
def discarded_events_have_default_clock_snapshots
|
380
|
+
Babeltrace2.bt_stream_class_discarded_events_have_default_clock_snapshots(@handle) != BT_FALSE
|
381
|
+
end
|
382
|
+
alias discarded_events_have_default_clock_snapshots? discarded_events_have_default_clock_snapshots
|
383
|
+
|
384
|
+
def set_supports_discarded_packets(supports_discarded_packets,
|
385
|
+
with_default_clock_snapshots: false)
|
386
|
+
Babeltrace2.bt_stream_class_set_supports_discarded_packets(
|
387
|
+
@handle, supports_discarded_packets ? BT_TRUE : BT_FALSE,
|
388
|
+
with_default_clock_snapshots ? BT_TRUE : BT_FALSE)
|
389
|
+
self
|
390
|
+
end
|
391
|
+
|
392
|
+
def supports_discarded_packets
|
393
|
+
Babeltrace2.bt_stream_class_supports_discarded_packets(@handle) != BT_FALSE
|
394
|
+
end
|
395
|
+
alias supports_discarded_packets? supports_discarded_packets
|
396
|
+
|
397
|
+
def discarded_packets_have_default_clock_snapshots
|
398
|
+
Babeltrace2.bt_stream_class_discarded_packets_have_default_clock_snapshots(@handle) != BT_FALSE
|
399
|
+
end
|
400
|
+
alias discarded_packets_have_default_clock_snapshots? discarded_packets_have_default_clock_snapshots
|
401
|
+
|
402
|
+
def set_user_attributes(user_attributes)
|
403
|
+
Babeltrace2.bt_stream_class_set_user_attributes(@handle, BTValue.from_value(user_attributes))
|
404
|
+
self
|
405
|
+
end
|
406
|
+
|
407
|
+
def user_attributes=(user_attributes)
|
408
|
+
set_user_attributes(user_attributes)
|
409
|
+
user_attributes
|
410
|
+
end
|
411
|
+
|
412
|
+
def get_user_attributes
|
413
|
+
BTValueMap.new(Babeltrace2.bt_stream_class_borrow_user_attributes(@handle), retain: true)
|
414
|
+
end
|
415
|
+
alias user_attributes get_user_attributes
|
416
|
+
|
417
|
+
def create_stream(trace, id: nil)
|
418
|
+
BTStream.new(stream_class: @handle, trace: trace, id: nil)
|
419
|
+
end
|
420
|
+
|
421
|
+
def create_event_class(id: nil)
|
422
|
+
BTEventClass.new(stream_class: @handle, id: nil)
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|