Class: PacketViaDMEM::Header::Sent

Inherits:
Object
  • Object
show all
Defined in:
lib/packet_via_dmem/header/sent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#colorObject

Returns the value of attribute color.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def color
  @color
end

#decrement_referenceObject

Returns the value of attribute decrement_reference.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def decrement_reference
  @decrement_reference
end

#drop_hashObject

Returns the value of attribute drop_hash.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def drop_hash
  @drop_hash
end

#fragment_infoObject

Returns the value of attribute fragment_info.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def fragment_info
  @fragment_info
end

#increment_referenceObject

Returns the value of attribute increment_reference.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def increment_reference
  @increment_reference
end

#lifeObject

Returns the value of attribute life.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def life
  @life
end

#magic1Object

Returns the value of attribute magic1.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def magic1
  @magic1
end

#magic2Object

Returns the value of attribute magic2.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def magic2
  @magic2
end

#magic3Object

Returns the value of attribute magic3.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def magic3
  @magic3
end

#msg_typeObject

Returns the value of attribute msg_type.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def msg_type
  @msg_type
end

#offsetObject

Returns the value of attribute offset.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def offset
  @offset
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def port
  @port
end

#prequeue_priorityObject

Returns the value of attribute prequeue_priority.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def prequeue_priority
  @prequeue_priority
end

#queue_drop_opcodeObject

Returns the value of attribute queue_drop_opcode.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def queue_drop_opcode
  @queue_drop_opcode
end

#queue_numberObject

Returns the value of attribute queue_number.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def queue_number
  @queue_number
end

#queue_systemObject

Returns the value of attribute queue_system.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def queue_system
  @queue_system
end

#statisticsObject

Returns the value of attribute statistics.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def statistics
  @statistics
end

#tableObject

Returns the value of attribute table.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def table
  @table
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/packet_via_dmem/header/sent.rb', line 4

def type
  @type
end

Instance Method Details

#to_s(packet_number = 1) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/packet_via_dmem/header/sent.rb', line 24

def to_s(packet_number=1)
  str = ''
  str << '# TX %03d # ' % packet_number
  str << (statistics ? 'S' : 's')
  str << (increment_reference ? 'I' : 'i')
  str << (fragment_info ? 'F' : 'f')
  str << (drop_hash ? 'H' : 'h')
  str << (decrement_reference ? 'D' : 'd')
  str << (prequeue_priority ? 'P' : 'p')
  str << ' # '
  str << 'port: %x (%s) # '   % [port, port.divmod(64).join('/')]
  str << 'type: %x # '        % type
  str << 'QoS: %d@%d # '      % [queue_number, queue_system]
  str << "QueueDropOp: %d\n"  % [queue_drop_opcode]
  str << '#          '
  str << 'color: %d # '       % color
  str << 'offset: %d # '      % offset
  str << 'table: %d # '       % table
  str << 'life: %d # '        % life
  str << 'magic: '
  str << '%x/%x'              % [magic1, magic2] if magic1
  str << '/%x'                % magic3 if magic3
  str
end