Method: AIX::Errlog::Entry#initialize

Defined in:
lib/aix/errlog/entry.rb

#initialize(raw) ⇒ Entry

Returns a new instance of Entry.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/aix/errlog/entry.rb', line 23

def initialize(raw)
  @magic = raw[:el_magic]
  @sequence = raw[:el_sequence]
  @label = raw[:el_label].to_s.freeze
  @timestamp = Time.at(raw[:el_timestamp]).freeze
  @crcid = raw[:el_crcid]
  @errdiag = raw[:el_errdiag]
  @machineid = raw[:el_machineid].to_s.freeze
  @nodeid = raw[:el_nodeid].to_s.freeze
  @class = raw[:el_class].to_s.freeze
  @type = raw[:el_type].to_s.freeze
  @resource = raw[:el_resource].to_s.freeze
  @rclass = raw[:el_rclass].to_s.freeze
  @rtype = raw[:el_rtype].to_s.freeze
  @vpd_ibm = raw[:el_vpd_ibm].to_s.freeze
  @vpd_user = raw[:el_vpd_user].to_s.freeze
  @in = raw[:el_in].to_s
  @connwhere = raw[:el_connwhere].to_s.freeze
  @flags = raw[:el_flags]
  length = raw[:el_detail_length]
  @raw_detail = raw[:el_detail_data].to_ptr.get_bytes(0, length).freeze
  length = raw[:el_symptom_length]
  @raw_symptom = raw[:el_symptom_data].to_ptr.get_bytes(0, length).freeze
  @dup_count = raw[:el_errdup][:ed_dupcount]
  @dup_time1 = Time.at(raw[:el_errdup][:ed_time1]).freeze
  @dup_time2 = Time.at(raw[:el_errdup][:ed_time2]).freeze
  @wparid = raw[:el_wparid].to_s.freeze
end