Class: QueueProperty

Inherits:
Object
  • Object
show all
Defined in:
ruby/trema/packet-queue.rb

Direct Known Subclasses

MinRateQueue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property, len) ⇒ QueueProperty

Each queue is described by a set of properties, each of a specific type and configuration.

Parameters:

  • property (Number)

    property queue id.

  • len (Number)

    length in bytes of the property queue.



127
128
129
130
# File 'ruby/trema/packet-queue.rb', line 127

def initialize property, len
  @property = property
  @len = len
end

Instance Attribute Details

#lenNumber

length of property. If >= 8 minimum-rate type queue is defined.

Returns:

  • (Number)

    the value of attribute len.



118
119
120
# File 'ruby/trema/packet-queue.rb', line 118

def len
  @len
end

#propertyNumber

Property queue id. For minimum-rate type queue the property value is set to 1, otherwise defaults to zero.

Returns:

  • (Number)

    the value of attribute property.



114
115
116
# File 'ruby/trema/packet-queue.rb', line 114

def property
  @property
end

Instance Method Details

#to_sString

Returns text representation of its attributes (property,len).

Returns:

  • (String)

    text representation of its attributes (property,len).



135
136
137
# File 'ruby/trema/packet-queue.rb', line 135

def to_s
  "property: #{@property} len: #{@len} "
end