module Syskit::Coordination::PortHandling
Port access code for instance-level task objects
Public Instance Methods
find_port(port_name)
click to toggle source
# File lib/syskit/coordination/port_handling.rb, line 9 def find_port(port_name) if model_port = model.find_port(port_name) case model_port when Syskit::Models::OutputPort OutputPort.new(model_port, model_port.component_model.bind(self)) when Syskit::Models::InputPort InputPort.new(model_port, model_port.component_model.bind(self)) end end end
find_through_method_missing(m, args)
click to toggle source
Calls superclass method
# File lib/syskit/coordination/port_handling.rb, line 36 def find_through_method_missing(m, args) MetaRuby::DSLs.find_through_method_missing(self, m, args, '_port' => :find_port) || super end
has_port?()
click to toggle source
# File lib/syskit/coordination/port_handling.rb, line 5 def has_port? !!model.find_port(port_name) end
has_through_method_missing?(m)
click to toggle source
Calls superclass method
# File lib/syskit/coordination/port_handling.rb, line 32 def has_through_method_missing?(m) MetaRuby::DSLs.has_through_method_missing?(self, m, '_port' => :has_port?) || super end
self_port_to_component_port(port)
click to toggle source
# File lib/syskit/coordination/port_handling.rb, line 20 def self_port_to_component_port(port) port_model = port.model model_object = port_model.component_model component_model = model_object.model if respond_to?(:parent) component_model.resolve_child(parent.resolve).self_port_to_component_port(port) else component_model.resolve(self.resolve).self_port_to_component_port(port) end end