class Orocos::RobyPlugin::AmbiguousAutoConnection

Attributes

composition_model[R]

The composition model in which the automatic connection was to be computed

inputs[R]

The set of input candidates

outputs[R]

The set of output candidates

type_name[R]

The type name of the ports are involved

Public Class Methods

new(composition_model, type_name, inputs, outputs) click to toggle source
# File lib/orocos/roby/exceptions.rb, line 536
def initialize(composition_model, type_name, inputs, outputs)
    @composition_model, @type_name, @inputs, @outputs =
        composition_model, type_name, inputs, outputs
end

Public Instance Methods

pretty_print(pp) click to toggle source
# File lib/orocos/roby/exceptions.rb, line 557
def pretty_print(pp)
    pp.text "there is an ambiguity while automatically computing connections in #{composition_model.short_name}"
    pp.breakable
    pp.text "the considered port type is #{type_name}"
    pp.breakable
    pp.text "involved outputs:"
    pretty_print_ports(pp, outputs)
    pp.breakable
    pp.text "involved inputs:"
    pretty_print_ports(pp, inputs)
end
pretty_print_ports(pp, port_set) click to toggle source
# File lib/orocos/roby/exceptions.rb, line 541
def pretty_print_ports(pp, port_set)
    pp.nest(2) do
        pp.breakable
        pp.seplist(port_set) do |port_description|
            child_name, port_name = port_description
            child_spec   = composition_model.find_child(child_name)
            child_models = child_spec.models.map(&:short_name)
            pp.text "#{child_name}.#{port_name} where"
            pp.nest(2) do
                pp.breakable
                pp.text "#{child_name}'s model is #{child_models.join(", ")}"
            end
        end
    end
end