Class: LibComponent::DbusInput
- Inherits:
-
DBus::Object
- Object
- DBus::Object
- LibComponent::DbusInput
- Defined in:
- lib/openplacos/libcomponent.rb
Class Method Summary collapse
-
.create_dbusinputs_from_introspect(intro_, component_) ⇒ Object
Create all dbus I/O for this pin.
Instance Method Summary collapse
-
#initialize(name) ⇒ DbusInput
constructor
A new instance of DbusInput.
Constructor Details
#initialize(name) ⇒ DbusInput
Returns a new instance of DbusInput.
400 401 402 |
# File 'lib/openplacos/libcomponent.rb', line 400 def initialize(name) super(name) end |
Class Method Details
.create_dbusinputs_from_introspect(intro_, component_) ⇒ Object
Create all dbus I/O for this pin. Called internally by component
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/openplacos/libcomponent.rb', line 406 def self.create_dbusinputs_from_introspect(intro_,component_) pin = Array.new intro_.each { |name, definition| p = self.new(name) definition.each { |iface, meths| component_input = component_.get_input_iface(name,iface) p.singleton_class.instance_eval do dbus_interface "org.openplacos.#{iface}" do meths.each { |m| add_dbusmethod m.to_sym do |*args| return component_input.send(m+"_lib",*args) end } end end } pin << p } return pin end |