Module: Syskit::TaskContext::Proxying
- Defined in:
- lib/syskit/task_context.rb
Instance Method Summary collapse
-
#commit_transaction ⇒ Object
Create dynamically instantiated ports on the real task.
- #transaction_modifies_static_ports? ⇒ Boolean
Instance Method Details
#commit_transaction ⇒ Object
Create dynamically instantiated ports on the real task
1120 1121 1122 1123 1124 1125 |
# File 'lib/syskit/task_context.rb', line 1120 def commit_transaction super if defined? super if specialized_model? Syskit::Models.merge_orogen_task_context_models(__getobj__.model.orogen_model, [model.orogen_model]) end end |
#transaction_modifies_static_ports? ⇒ Boolean
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/syskit/task_context.rb', line 1127 def transaction_modifies_static_ports? new_connections_to_static = Hash.new each_concrete_input_connection do |source_task, source_port, sink_port, policy| if find_input_port(sink_port).static? sources = (new_connections_to_static[sink_port] ||= Set.new) sources << [source_task.orocos_name, source_port] end end each_concrete_output_connection do |source_port, sink_port, sink_task, policy| if find_output_port(source_port).static? sinks = (new_connections_to_static[source_port] ||= Set.new) sinks << [sink_task.orocos_name, sink_port] end end current_connections_to_static = Hash.new ActualDataFlow.each_in_neighbour(orocos_task) do |source_task| # Transactions neither touch ActualDataFlow nor the # task-to-orocos_task mapping. It's safe to check it # straight. connections = ActualDataFlow.edge_info(source_task, orocos_task) connections.each_key do |source_port, sink_port| if ActualDataFlow.static?(orocos_task, sink_port) sources = (current_connections_to_static[sink_port] ||= Set.new) sources << [source_task.name, source_port] end end end ActualDataFlow.each_out_neighbour(orocos_task) do |sink_task| # Transactions neither touch ActualDataFlow nor the # task-to-orocos_task mapping. It's safe to check it # straight. connections = ActualDataFlow.edge_info(orocos_task, sink_task) connections.each_key do |source_port, sink_port| if ActualDataFlow.static?(orocos_task, source_port) sinks = (current_connections_to_static[source_port] ||= Set.new) sinks << [sink_task.name, sink_port] end end end current_connections_to_static != new_connections_to_static end |