Exception: Syskit::Test::NetworkManipulation::NoConfigureFixedPoint

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/syskit/test/network_manipulation.rb

Defined Under Namespace

Classes: Info

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tasks) ⇒ NoConfigureFixedPoint

Returns a new instance of NoConfigureFixedPoint



784
785
786
787
788
789
790
791
792
793
794
795
# File 'lib/syskit/test/network_manipulation.rb', line 784

def initialize(tasks)
    @tasks = tasks
    @info = Hash.new
    tasks.each do |t|
        precedence = t.start_event.parent_objects(Roby::EventStructure::SyskitConfigurationPrecedence).to_a
        missing = precedence.find_all { |ev| !ev.emitted? }
        info[t] = Info.new(
            t.ready_for_setup?,
            t.list_unset_arguments,
            precedence, missing)
    end
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info



781
782
783
# File 'lib/syskit/test/network_manipulation.rb', line 781

def info
  @info
end

#tasksObject (readonly)

Returns the value of attribute tasks



780
781
782
# File 'lib/syskit/test/network_manipulation.rb', line 780

def tasks
  @tasks
end

Instance Method Details

#pretty_print(pp) ⇒ Object



796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
# File 'lib/syskit/test/network_manipulation.rb', line 796

def pretty_print(pp)
    pp.text "cannot find an ordering to configure #{tasks.size} tasks"
    tasks.each do |t|
        pp.breakable
        t.pretty_print(pp)

        info = self.info[t]
        pp.nest(2) do
            pp.breakable
            pp.text "ready_for_setup? #{info.ready_for_setup}"
            pp.breakable
            if info.missing_arguments.empty?
                pp.text "is fully instanciated"
            else
                pp.text "missing_arguments: #{info.missing_arguments.join(", ")}"
            end

            pp.breakable
            if info.precedence.empty?
                pp.text "has no should_configure_after constraint"
            else
                pp.text "is waiting for #{info.missing.size} events to happen before continuing, among #{info.precedence.size}"
                pp.nest(2) do
                    info.missing.each do |ev|
                        pp.breakable
                        ev.pretty_print(pp)
                    end
                end
            end
        end
    end
end