Class: Babeltrace2::BTMessage::DiscardedPackets
- Inherits:
-
Babeltrace2::BTMessage
- Object
- Babeltrace2::BTObject
- Babeltrace2::BTSharedObject
- Babeltrace2::BTMessage
- Babeltrace2::BTMessage::DiscardedPackets
- 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) ⇒ DiscardedPackets
constructor
A new instance of DiscardedPackets.
- #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) ⇒ DiscardedPackets
Returns a new instance of DiscardedPackets.
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/babeltrace2/graph/message.rb', line 595 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
644 645 646 647 |
# File 'lib/babeltrace2/graph/message.rb', line 644 def count=(count) set_count(count) count end |
#get_beginning_default_clock_snapshot ⇒ Object Also known as: beginning_default_clock_snapshot
621 622 623 624 |
# File 'lib/babeltrace2/graph/message.rb', line 621 def get_beginning_default_clock_snapshot handle = Babeltrace2.(@handle) BTClockSnapshot.new(handle) end |
#get_count ⇒ Object Also known as: count
649 650 651 652 653 654 |
# File 'lib/babeltrace2/graph/message.rb', line 649 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
627 628 629 630 |
# File 'lib/babeltrace2/graph/message.rb', line 627 def get_end_default_clock_snapshot handle = Babeltrace2.(@handle) BTClockSnapshot.new(handle) end |
#get_stream ⇒ Object Also known as: stream
615 616 617 618 |
# File 'lib/babeltrace2/graph/message.rb', line 615 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
633 634 635 636 |
# File 'lib/babeltrace2/graph/message.rb', line 633 def get_stream_class_default_clock_class handle = Babeltrace2.(@handle) BTClockClass.new(handle, retain: true, auto_release: true) end |
#set_count(count) ⇒ Object
639 640 641 642 |
# File 'lib/babeltrace2/graph/message.rb', line 639 def set_count(count) Babeltrace2.(@handle, count) self end |