module LibComponent::Pin

Common module to Input and Output

Public Instance Methods

buffer=(time_) click to toggle source
# File lib/openplacos/libcomponent.rb, line 36
def buffer=(time_)
  self.extend(Buffer)
  @buffer_time = time_
  @buffer_last_value = Time.new(0)
end
introspect() click to toggle source

Return introspect object that can be delivered to openplacos server

# File lib/openplacos/libcomponent.rb, line 20
def introspect
  iface = Hash.new
  pin = Hash.new
  meth = Array.new
  
  if self.respond_to?(:read)
    meth << "read"
  end
  if self.respond_to?(:write)
    meth << "write"
  end
  iface[@interface] = meth
  pin[@name] = iface
  return pin
end
set_component(component_) click to toggle source
# File lib/openplacos/libcomponent.rb, line 15
def set_component(component_)
  @component=component_
end