class Vizkit::ConnectorPort
Public Class Methods
new(task,signature,options)
click to toggle source
Calls superclass method
Vizkit::ConnectorObject.new
# File lib/vizkit/connector_objects.rb, line 333 def initialize(task,signature,options) super() @port = task.port(signature) end
Public Instance Methods
argument_types()
click to toggle source
# File lib/vizkit/connector_objects.rb, line 352 def argument_types end
argument_types=(*value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 349 def argument_types=(*value) end
argument_types?(*value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 346 def argument_types?(*value) end
arity=(value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 338 def arity=(value) raise ArgumentError "only an arity of one is supported for ports" unless value == 1 end
arity?(value)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 342 def arity?(value) value == 1 end
name()
click to toggle source
# File lib/vizkit/connector_objects.rb, line 355 def name @port.name end
on_data(options,&block)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 375 def on_data(options,&block) @port.on_data options, &block end
read(options,*args,&block)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 359 def read(options,*args,&block) raise ArgumentError,"wrong number of arguments" unless args.size == 0 @port.read options,&block end
write(options,*args,&block)
click to toggle source
# File lib/vizkit/connector_objects.rb, line 364 def write(options,*args,&block) raise ArgumentError,"got #{args.size} number of arguments. Ports only support one argument for writing" unless args.size == 1 arg = args.first arg = if arg.is_a?(Qt::Variant) && arg.to_ruby? arg.to_ruby else arg end @port.write arg,options,&block end