Class: Syskit::Models::OutputPort

Inherits:
Port show all
Defined in:
lib/syskit/models/port.rb

Constant Summary

Constants inherited from Port

Port::OROGEN_MODEL_EXCLUDED_FORWARDINGS

Instance Attribute Summary

Attributes inherited from Port

#component_model, #max_sizes, #name, #orogen_model, #type

Instance Method Summary collapse

Methods inherited from Port

#==, #attach, #can_connect_to?, #connect_to, #connected_to?, #initialize, #input?, #instanciate, #max_marshalling_size, #method_missing, #new_sample, #pretty_print, #resolve_data_source, #respond_to_missing?, #same_port?, #short_name, #static?, #to_component_port, #to_orocos_port, #to_s, #try_to_component_port

Constructor Details

This class inherits a constructor from Syskit::Models::Port

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Syskit::Models::Port

Instance Method Details

#bind(component) ⇒ Object



228
229
230
# File 'lib/syskit/models/port.rb', line 228

def bind(component)
    Syskit::OutputPort.new(self, component_model.bind(component))
end

#output?Boolean

Returns:

  • (Boolean)


232
# File 'lib/syskit/models/port.rb', line 232

def output?; true end

#reader(policy = Hash.new) ⇒ Object



234
235
236
# File 'lib/syskit/models/port.rb', line 234

def reader(policy = Hash.new)
    OutputReader.new(self, policy)
end

#to_state_variable_model(field, name) ⇒ Object

This is needed to use the Port to represent a data source on the component's state as e.g.

state.position = Component.pose_samples_port


221
222
223
224
225
226
# File 'lib/syskit/models/port.rb', line 221

def to_state_variable_model(field, name)
    model = Roby::StateVariableModel.new(field, name)
    model.type = type
    model.data_source = self
    model
end