module Orocos::TaskContext::StateReader

Specialization of the OutputReader to read the task'ss state port. Its read method will return a state in the form of a symbol. For instance, the RUNTIME_ERROR state is returned as :RUNTIME_ERROR

StateReader objects are created by Orocos::TaskContext#state_reader

Attributes

state_symbols[RW]

Public Instance Methods

read(sample = nil) click to toggle source
Calls superclass method
# File lib/orocos/task_context.rb, line 157
def read(sample = nil)
    if value = super(sample)
        @state_symbols[value]
    end
end
read_new(sample = nil) click to toggle source
Calls superclass method
# File lib/orocos/task_context.rb, line 163
def read_new(sample = nil)
    if value = super(sample)
        @state_symbols[value]
    end
end
read_with_result(sample = nil, copy_old_data = false) click to toggle source
Calls superclass method
# File lib/orocos/task_context.rb, line 169
def read_with_result(sample = nil, copy_old_data = false)
    result, value = super
    if value
        return result, @state_symbols[value]
    else
        return result
    end
end