Class: LibComponent::DbusOutput
- Inherits:
-
DBus::ProxyObject
- Object
- DBus::ProxyObject
- LibComponent::DbusOutput
- Defined in:
- lib/openplacos/libcomponent.rb
Class Method Summary collapse
-
.create_dbusoutputs_from_introspect(intro_, component_) ⇒ Object
Create all dbus I/O for this pin.
Instance Method Summary collapse
-
#initialize(bus_, name_) ⇒ DbusOutput
constructor
A new instance of DbusOutput.
Constructor Details
#initialize(bus_, name_) ⇒ DbusOutput
Returns a new instance of DbusOutput.
443 444 445 446 447 |
# File 'lib/openplacos/libcomponent.rb', line 443 def initialize(bus_,name_) @name = name_ @bus = bus_ super(@bus,"org.openplacos.server.internal",@name) end |
Class Method Details
.create_dbusoutputs_from_introspect(intro_, component_) ⇒ Object
Create all dbus I/O for this pin. Called internally by component
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/openplacos/libcomponent.rb', line 451 def self.create_dbusoutputs_from_introspect(intro_,component_) pin = Array.new intro_.each { |name, definition| p = self.new(component_.bus,"/#{component_.name}#{name}") begin p.introspect rescue DBus::Error LibError.quit(255, "From #{component_.name}: Introspect of pin /#{component_.name}#{name} failed \nOpenplacos server is probably unreachable") rescue LibError.quit_server(255, "From #{component_.name}: Introspect of pin /#{component_.name}#{name} failed \n") end definition.each_key { |iface| component_output = component_.get_output_iface(name,iface) component_output.connect(p) } pin << p } return pin end |