Module: Syskit::Coordination::FaultResponseTableExtension

Defined in:
lib/syskit/coordination/fault_response_table_extension.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_monitoring_tablesArray<Object> (readonly)

Array of data monitoring table IDs, as returned by PlanExtension#use_data_monitoring_table

Returns:

  • (Array<Object>)

    array of data monitoring table IDs, as returned by PlanExtension#use_data_monitoring_table



12
13
14
# File 'lib/syskit/coordination/fault_response_table_extension.rb', line 12

def data_monitoring_tables
  @data_monitoring_tables
end

Instance Method Details

#attach_to(plan) ⇒ Object

Hook called when the table is attached on the plan

See Also:

  • Roby::Coordination::Actions#attach_to


27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/syskit/coordination/fault_response_table_extension.rb', line 27

def attach_to(plan)
    super if defined? super

    @data_monitoring_tables = Array.new
    model.each_data_monitoring_table do |tbl|
        data_args = tbl.arguments.map_value do |data_arg, fault_arg|
            if fault_arg.kind_of?(Roby::Coordination::Models::Variable)
                arguments[fault_arg.name]
            else fault_arg
            end
        end
        data_monitoring_tables << plan.use_data_monitoring_table(tbl.table, data_args)
    end
end

#ready?Boolean

Checks if the fault response table is connected to all its data sources

Returns:

  • (Boolean)


6
7
8
# File 'lib/syskit/coordination/fault_response_table_extension.rb', line 6

def ready?
    data_monitoring_tables.all?(:ready?)
end

#removed!Object

Hook called when the table is removed from the plan

See Also:

  • Roby::Coordination::FaultResponseTable#removed!


17
18
19
20
21
22
# File 'lib/syskit/coordination/fault_response_table_extension.rb', line 17

def removed!
    super
    data_monitoring_tables.each do |tbl|
        plan.remove_data_monitoring_table(tbl)
    end
end