Class: LibComponent::DebugOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/openplacos/libcomponent.rb

Overview

a class for debugging which print the output

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name_) ⇒ DebugOutput

Returns a new instance of DebugOutput.



477
478
479
# File 'lib/openplacos/libcomponent.rb', line 477

def initialize(name_)
  @name = name_
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



475
476
477
# File 'lib/openplacos/libcomponent.rb', line 475

def name
  @name
end

Class Method Details

.create_dbusoutputs_from_introspect(intro_, component_) ⇒ Object



485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/openplacos/libcomponent.rb', line 485

def self.create_dbusoutputs_from_introspect(intro_,component_)
  pin = Array.new
  intro_.each { |name, definition|
    p = self.new("/#{component_.name}#{name}")
    
    definition.each_key { |iface|
      component_output = component_.get_output_iface(name,iface)
      component_output.connect(p)
    }
    pin << p
  }
  return pin
end

Instance Method Details

#[](propname) ⇒ Object



481
482
483
# File 'lib/openplacos/libcomponent.rb', line 481

def [](propname)
  return self
end

#read(*args) ⇒ Object



499
500
501
502
# File 'lib/openplacos/libcomponent.rb', line 499

def read(*args)
  puts "Read on #{self.name} : #{args.inspect}"
  return [0]      
end

#write(*args) ⇒ Object



504
505
506
507
# File 'lib/openplacos/libcomponent.rb', line 504

def write(*args)
  puts "Write on #{self.name} : #{args.inspect}"
  return [0]
end