Class: SDN::CLI::Simulator

Inherits:
Object
  • Object
show all
Defined in:
lib/sdn/cli/simulator.rb

Defined Under Namespace

Classes: MockMotor

Instance Method Summary collapse

Constructor Details

#initialize(port, address = nil) ⇒ Simulator

Returns a new instance of Simulator.



186
187
188
189
190
191
192
193
194
# File 'lib/sdn/cli/simulator.rb', line 186

def initialize(port, address = nil)
  sdn = Client.new(port)

  motor = MockMotor.new(sdn)
  motor.address = Message.parse_address(address) if address
  motor.node_type = :lt50

  motor.process
end