class Orocos::TaskContextAttribute

Attributes

dynamic_operation[R]

Returns the operation that has to be called if this is an dynamic propery. Nil otherwise

Public Class Methods

new(task, name, orocos_type_name) click to toggle source
Calls superclass method
# File lib/orocos/task_context.rb, line 15
def initialize(task, name, orocos_type_name)
    super
    if task.has_operation?(opname = "__orogen_set#{name.capitalize}")
        @dynamic_operation = task.operation(opname)
    end
end

Public Instance Methods

do_write_dynamic(value) click to toggle source
# File lib/orocos/task_context.rb, line 22
def do_write_dynamic(value)
    if !@dynamic_operation.callop(value)
        raise PropertyChangeRejected, "the change of property #{name} was rejected by the remote task"
    end
end
dynamic?() click to toggle source
# File lib/orocos/task_context.rb, line 13
def dynamic?; !!@dynamic_operation end