module Roby::Coordination::Models::FaultResponseTable

Definition of the metamodel for Coordination::FaultResponseTable

Public Instance Methods

each_task() { |task| ... } click to toggle source
Calls superclass method
# File lib/roby/coordination/models/fault_response_table.rb, line 51
def each_task
    return enum_for(:each_task) if !block_given?
    super
    each_fault_handler do |handler|
        if task = handler.replacement
            yield(task)
        end
    end
end
find_all_matching_handlers(exception) click to toggle source
# File lib/roby/coordination/models/fault_response_table.rb, line 14
def find_all_matching_handlers(exception)
    each_fault_handler.find_all do |h|
        h.execution_exception_matcher === exception
    end
end
method_missing(m, *args, &block) click to toggle source
Calls superclass method
# File lib/roby/coordination/models/fault_response_table.rb, line 65
def method_missing(m, *args, &block)
    if Queries::ExecutionExceptionMatcher.method_defined?(m)
        matcher = Queries::ExecutionExceptionMatcher.new
        matcher.send(m, *args, &block)
        matcher
    else super
    end
end
on_fault(exception_matcher, &block) click to toggle source
# File lib/roby/coordination/models/fault_response_table.rb, line 38
def on_fault(exception_matcher, &block)
    exception_matcher = exception_matcher.to_execution_exception_matcher
    action_model = Action.new(self)
    each_argument do |_, arg|
        action_model.required_arg(arg.name)
    end
    action_model, handler =
        create_coordination_action(action_model, Coordination::FaultHandler, &block)
    handler.execution_exception_matcher(exception_matcher)
    fault_handlers << handler
    handler
end
respond_to_missing?(m, include_private) click to toggle source
Calls superclass method
# File lib/roby/coordination/models/fault_response_table.rb, line 61
def respond_to_missing?(m, include_private)
    Queries::ExecutionExceptionMatcher.method_defined?(m) || super
end