Class: Syskit::Robot::DeviceInstance
- Defined in:
- lib/syskit/robot/device_instance.rb
Overview
A DeviceInstance object is used to represent an actual device on the system
It is returned by Robot.device
Direct Known Subclasses
Instance Method Summary collapse
-
#doc ⇒ String
Gets or sets a documentation string for this device.
- #instanciate(plan, context = DependencyInjectionContext.new, options = Hash.new) ⇒ Object
-
#period ⇒ Float
Gets or sets the device period.
- #to_action ⇒ Object
Instance Method Details
#doc ⇒ String
Gets or sets a documentation string for this device
20 |
# File 'lib/syskit/robot/device_instance.rb', line 20 dsl_attribute(:doc) { |s| s.to_str if s } |
#instanciate(plan, context = DependencyInjectionContext.new, options = Hash.new) ⇒ Object
47 48 49 |
# File 'lib/syskit/robot/device_instance.rb', line 47 def instanciate(plan, context = DependencyInjectionContext.new, = Hash.new) to_instance_requirements.instanciate(plan, context, ) end |
#period ⇒ Float
Gets or sets the device period
The device period is the amount of time there is between two samples coming from the device. The value is a floating-point value in seconds.
15 |
# File 'lib/syskit/robot/device_instance.rb', line 15 dsl_attribute(:period) { |v| Float(v) } |
#to_action ⇒ Object
43 44 45 |
# File 'lib/syskit/robot/device_instance.rb', line 43 def to_action to_instance_requirements.to_action end |