Class: Babeltrace2::BTMessage
- Inherits:
-
BTSharedObject
- Object
- BTObject
- BTSharedObject
- Babeltrace2::BTMessage
- Defined in:
- lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb,
lib/babeltrace2/graph/message.rb
Direct Known Subclasses
DiscardedEvents, DiscardedPackets, Event, MessageIteratorInactivity, PacketBeginning, PacketEnd, StreamBeginning, StreamEnd
Defined Under Namespace
Classes: DiscardedEvents, DiscardedPackets, Event, MessageIteratorInactivity, PacketBeginning, PacketEnd, StreamBeginning, StreamEnd
Constant Summary collapse
- Type =
BTMessageType- StreamClockSnapshotState =
BTMessageStreamClockSnapshotState
Instance Attribute Summary
Attributes inherited from BTObject
Class Method Summary collapse
Instance Method Summary collapse
- #get_type ⇒ Object (also: #type)
Methods inherited from BTSharedObject
Methods inherited from BTObject
Constructor Details
This class inherits a constructor from Babeltrace2::BTSharedObject
Class Method Details
.from_handle(handle, retain: true, auto_release: true) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/babeltrace2/graph/message.rb', line 45 def self.from_handle(handle, retain: true, auto_release: true) case Babeltrace2.(handle) when :BT_MESSAGE_TYPE_STREAM_BEGINNING StreamBeginning when :BT_MESSAGE_TYPE_STREAM_END StreamEnd when :BT_MESSAGE_TYPE_EVENT Event when :BT_MESSAGE_TYPE_PACKET_BEGINNING PacketBeginning when :BT_MESSAGE_TYPE_PACKET_END PacketEnd when :BT_MESSAGE_TYPE_DISCARDED_EVENTS DiscardedEvents when :BT_MESSAGE_TYPE_DISCARDED_PACKETS DiscardedPackets when :BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY MessageIteratorInactivity else raise Error.new("unknown message type") end.new(handle, retain: retain, auto_release: auto_release) end |
Instance Method Details
#get_type ⇒ Object Also known as: type
68 69 70 |
# File 'lib/babeltrace2/graph/message.rb', line 68 def get_type Babeltrace2.(@handle) end |