Class: Router

Inherits:
NetworkElement show all
Defined in:
lib/network_entities/physical/router.rb

Instance Attribute Summary collapse

Attributes inherited from NetworkElement

#id, #in_elements, #my_number, #out_elements

Instance Method Summary collapse

Methods inherited from NetworkElement

#increase_quantity_in_one

Methods included from SerializeBehavior

#transform_to_output_representation, #validate_concrete_builder

Constructor Details

#initialize(id, priority_weights = [1], buffer = -1)) ⇒ Router

Returns a new instance of Router.



7
8
9
10
11
# File 'lib/network_entities/physical/router.rb', line 7

def initialize(id, priority_weights=[1], buffer=-1)
    @priority_weights = priority_weights
    @buffer = buffer
    super id
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



5
6
7
# File 'lib/network_entities/physical/router.rb', line 5

def buffer
  @buffer
end

#priority_weightsObject (readonly)

Returns the value of attribute priority_weights.



5
6
7
# File 'lib/network_entities/physical/router.rb', line 5

def priority_weights
  @priority_weights
end