Class: Babeltrace2::BTMessage::DiscardedEvents
- Inherits:
-
Babeltrace2::BTMessage
- Object
- Babeltrace2::BTObject
- Babeltrace2::BTSharedObject
- Babeltrace2::BTMessage
- Babeltrace2::BTMessage::DiscardedEvents
- Defined in:
- lib/babeltrace2/graph/message.rb
Constant Summary
Constants inherited from Babeltrace2::BTMessage
StreamClockSnapshotState, Type
Instance Attribute Summary
Attributes inherited from Babeltrace2::BTObject
Instance Method Summary collapse
- #count=(count) ⇒ Object
- #get_beginning_default_clock_snapshot ⇒ Object (also: #beginning_default_clock_snapshot)
- #get_count ⇒ Object (also: #count)
- #get_end_default_clock_snapshot ⇒ Object (also: #end_default_clock_snapshot)
- #get_stream ⇒ Object (also: #stream)
- #get_stream_class_default_clock_class ⇒ Object (also: #stream_class_default_clock_class)
-
#initialize(handle = nil, retain: true, auto_release: true, self_message_iterator: nil, stream: nil, beginning_clock_snapshot_value: nil, end_clock_snapshot_value: nil) ⇒ DiscardedEvents
constructor
A new instance of DiscardedEvents.
- #set_count(count) ⇒ Object
Methods inherited from Babeltrace2::BTMessage
Methods inherited from Babeltrace2::BTSharedObject
Methods inherited from Babeltrace2::BTObject
Constructor Details
#initialize(handle = nil, retain: true, auto_release: true, self_message_iterator: nil, stream: nil, beginning_clock_snapshot_value: nil, end_clock_snapshot_value: nil) ⇒ DiscardedEvents
Returns a new instance of DiscardedEvents.
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/babeltrace2/graph/message.rb', line 490 def initialize(handle = nil, retain: true, auto_release: true, self_message_iterator: nil, stream: nil, beginning_clock_snapshot_value: nil, end_clock_snapshot_value: nil) if handle super(handle, retain: retain, auto_release: auto_release) else handle = if beginning_clock_snapshot_value && end_clock_snapshot_value Babeltrace2.( , stream, beginning_clock_snapshot_value, end_clock_snapshot_value) else Babeltrace2.( , stream) end raise Babeltrace2.process_error if handle.null? super(handle) end end |
Instance Method Details
#count=(count) ⇒ Object
539 540 541 542 |
# File 'lib/babeltrace2/graph/message.rb', line 539 def count=(count) set_count(count) count end |
#get_beginning_default_clock_snapshot ⇒ Object Also known as: beginning_default_clock_snapshot
516 517 518 519 |
# File 'lib/babeltrace2/graph/message.rb', line 516 def get_beginning_default_clock_snapshot handle = Babeltrace2.(@handle) BTClockSnapshot.new(handle) end |
#get_count ⇒ Object Also known as: count
544 545 546 547 548 549 |
# File 'lib/babeltrace2/graph/message.rb', line 544 def get_count ptr = FFI::MemoryPointer.new(:pointer) res = Babeltrace2.(@handle, ptr) return nil if res == :BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE ptr.read_uint64 end |
#get_end_default_clock_snapshot ⇒ Object Also known as: end_default_clock_snapshot
522 523 524 525 |
# File 'lib/babeltrace2/graph/message.rb', line 522 def get_end_default_clock_snapshot handle = Babeltrace2.(@handle) BTClockSnapshot.new(handle) end |
#get_stream ⇒ Object Also known as: stream
510 511 512 513 |
# File 'lib/babeltrace2/graph/message.rb', line 510 def get_stream handle = Babeltrace2.(@handle) BTStream.new(handle, retain: true, auto_release: true) end |
#get_stream_class_default_clock_class ⇒ Object Also known as: stream_class_default_clock_class
528 529 530 531 |
# File 'lib/babeltrace2/graph/message.rb', line 528 def get_stream_class_default_clock_class handle = Babeltrace2.(@handle) BTClockClass.new(handle, retain: true, auto_release: true) end |
#set_count(count) ⇒ Object
534 535 536 537 |
# File 'lib/babeltrace2/graph/message.rb', line 534 def set_count(count) Babeltrace2.(@handle, count) self end |