Class: Dread::Event

Inherits:
Trace
  • Object
show all
Includes:
Bitfield
Defined in:
lib/dread/event.rb

Direct Known Subclasses

EndpointEvent, GadgetEvent

Instance Attribute Summary

Attributes inherited from Trace

#cpu, #data, #function, #pid, #task, #timestamp

Instance Method Summary collapse

Methods included from Bitfield

#field

Methods inherited from Trace

#initialize, #to_s

Constructor Details

This class inherits a constructor from Dread::Trace

Instance Method Details

#decodeObject



15
16
17
# File 'lib/dread/event.rb', line 15

def decode
  data.split.last.to_i(16)
end

#endpoint?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/dread/event.rb', line 11

def endpoint?
  (decode & 1) == 0
end

#gadget?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/dread/event.rb', line 7

def gadget?
  (decode & 1) == 1
end