Method: Roby::Application.host_options_set_defaults

Defined in:
lib/roby/app.rb

.host_options_set_defaults(options) ⇒ Object

Fill defaults in the option hash setup by host_options

This must be called if interface_versions is set



723
724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/roby/app.rb', line 723

def self.host_options_set_defaults(options)
    return unless options[:interface_version]

    if options[:interface_version] == 1
        options[:host] ||= Roby.app.shell_interface_host || "localhost"
        options[:port] ||= Roby.app.shell_interface_port ||
                           Interface::DEFAULT_PORT
    else
        options[:host] ||= Roby.app.shell_interface_v2_host || "localhost"
        options[:port] ||= Roby.app.shell_interface_v2_port ||
                           Interface::DEFAULT_PORT
    end
end