Class: Orocos::Property

Inherits:
TaskContextAttribute show all
Defined in:
lib/orocos/async/orocos.rb,
lib/orocos/task_context.rb

Instance Attribute Summary

Attributes inherited from TaskContextAttribute

#dynamic_operation

Attributes inherited from AttributeBase

#log_port, #log_stream, #name, #orocos_type_name, #task, #type

Instance Method Summary collapse

Methods inherited from TaskContextAttribute

#do_write_dynamic, #dynamic?, #initialize

Methods inherited from AttributeBase

#==, #doc, #doc?, #ensure_type_available, #full_name, #initialize, #log_current_value, #log_value, #new_sample, #pretty_print, #raw_read, #read, #type_name, #write

Constructor Details

This class inherits a constructor from Orocos::TaskContextAttribute

Instance Method Details

#do_read(type_name, value) ⇒ Object



41
42
43
# File 'lib/orocos/task_context.rb', line 41

def do_read(type_name, value)
    task.do_property_read(name, type_name, value)
end

#do_write(type_name, value, direct: false) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/orocos/task_context.rb', line 34

def do_write(type_name, value, direct: false)
    if !direct && dynamic?
        do_write_dynamic(value)
    else
        task.do_property_write(name, type_name, value)
    end
end

#log_metadataObject



30
31
32
# File 'lib/orocos/task_context.rb', line 30

def 
    super.merge('rock_stream_type' => 'property')
end

#to_async(options = Hash.new) ⇒ Object



40
41
42
43
44
45
# File 'lib/orocos/async/orocos.rb', line 40

def to_async(options = Hash.new)
    if use = options.delete(:use)
        Orocos::Async::CORBA::Property.new(use,self,options)
    else to_async(Hash[:use => task.to_async].merge(options))
    end
end

#to_proxy(options = Hash.new) ⇒ Object



47
48
49
# File 'lib/orocos/async/orocos.rb', line 47

def to_proxy(options = Hash.new)
    task.to_proxy(options).property(name,:type => type)
end