class Syskit::LiveProperty
Syskit-side representation of the property of an actual live task
Attributes
remote_property[RW]
The remote property
It is used as a cache mechanism, and should never be used directly. It is initialized and accessed by the API on {TaskContext}
task_context[R]
The underlying task context
Public Class Methods
new(task_context, name, type)
click to toggle source
Calls superclass method
# File lib/syskit/live_property.rb, line 18 def initialize(task_context, name, type) super(name, type) @task_context = task_context @remote_property = nil end
Public Instance Methods
logged?()
click to toggle source
Whether this property is being logged
# File lib/syskit/live_property.rb, line 14 def logged? !!log_stream end
needs_commit?()
click to toggle source
Whether this property needs to be written on the remote side
# File lib/syskit/live_property.rb, line 25 def needs_commit? @value && (!@remote_value || (@value != @remote_value)) end
raw_write(value, _timestap = nil)
click to toggle source
Update this property with a Typelib object
The object's type and value will not be checked
Calls superclass method
# File lib/syskit/live_property.rb, line 46 def raw_write(value, _timestap = nil) super task_context.queue_property_update_if_needed end
write(value, _timestamp = nil)
click to toggle source
Request updating this property with the given value
The property will be updated only at the task's configuration time, or when Syskit::TaskContext#commit_properties is called.
@param [Typelib::Type,Object] value the property value @param [Time] _timestamp ignored, for compatibility with
{Orocos::Property}
Calls superclass method
# File lib/syskit/live_property.rb, line 37 def write(value, _timestamp = nil) if task_context.would_use_property_update? super end end