Class: Host

Inherits:
NetworkElement show all
Defined in:
lib/network_entities/physical/host.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, ips = ["127.0.0.1"], mac = "9A:4A:43:D4:36:45", queue_capacity = -1)) ⇒ Host

Returns a new instance of Host.



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

def initialize(id, ips=["127.0.0.1"], mac="9A:4A:43:D4:36:45", queue_capacity=-1)		
	@ips = ips
	@mac = mac
	@queue_capacity = queue_capacity
	super id
end

Instance Attribute Details

#gateway_idObject

Returns the value of attribute gateway_id.



4
5
6
# File 'lib/network_entities/physical/host.rb', line 4

def gateway_id
  @gateway_id
end

#gateway_portObject

Returns the value of attribute gateway_port.



4
5
6
# File 'lib/network_entities/physical/host.rb', line 4

def gateway_port
  @gateway_port
end

#ipsObject

Returns the value of attribute ips.



4
5
6
# File 'lib/network_entities/physical/host.rb', line 4

def ips
  @ips
end

#macObject

Returns the value of attribute mac.



4
5
6
# File 'lib/network_entities/physical/host.rb', line 4

def mac
  @mac
end

#queue_capacityObject

Returns the value of attribute queue_capacity.



4
5
6
# File 'lib/network_entities/physical/host.rb', line 4

def queue_capacity
  @queue_capacity
end