Class: Roby::Task

Inherits:
PlanObject show all
Extended by:
Distributed::DRobyTaskModel::Dump, Roby::TaskStructure::ModelConflicts
Includes:
Distributed::TaskNotifications, Log::TaskHooks, TaskOperations
Defined in:
lib/roby.rb,
lib/roby/query.rb,
lib/roby/task-operations.rb,
lib/roby/distributed/proxy.rb,
lib/roby/state/information.rb

Defined Under Namespace

Classes: DRoby

Constant Summary

Constants included from Log::TaskHooks

Log::TaskHooks::HOOKS

Constants included from Log::BasicObjectHooks

Log::BasicObjectHooks::HOOKS

Instance Attribute Summary

Attributes inherited from PlanObject

#executable, #plan, #removed_at

Attributes inherited from BasicObject

#distribute

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Roby::TaskStructure::ModelConflicts

conflicts_with, conflicts_with?

Methods included from Distributed::TaskNotifications

#updated_data

Methods included from TaskOperations

#+, #|

Methods included from Log::TaskHooks

#added_child_object, #removed_child_object

Methods inherited from PlanObject

#add_child_object, #apply_relation_changes, child_plan_object, #each_plan_child, #executable?, #finalized?, #forget_peer, #read_write?, #remotely_useful?, #removing_child_object, #replace_by, #replace_subplan_by, #root_object, #root_object?, #subscribed?, #update_on?, #updated_by?

Methods included from Distributed::RelationModificationHooks

#added_child_object, #removed_child_object

Methods included from Roby::Transactions::PlanObjectUpdates

#adding_child_object, #removing_child_object

Methods included from DirectedRelationSupport

#add_child_object, #add_parent_object, #check_is_relation, #related_objects, #relations, #remove_child_object, #remove_children, #remove_parent_object, #remove_parents, #remove_relations

Methods inherited from BasicObject

#add_sibling_for, #distribute?, distribute?, #finalized?, #forget_peer, #has_sibling_on?, #initialize_copy, local_only, #read_write?, #remotely_useful?, #remove_sibling_for, #self_owned?, #sibling_of, #sibling_on, #subscribe, #subscribed?, #update_on?, #updated?, #updated_by?, #updated_peers

Methods included from Log::BasicObjectHooks

#added_owner, #removed_owner

Class Method Details

._load(str) ⇒ Object

:nodoc:



212
213
214
# File 'lib/roby/distributed/proxy.rb', line 212

def self._load(str) # :nodoc:
    Marshal.load(str) 
end

.improves(info) ⇒ Object

This task will improve the information contained in info



50
# File 'lib/roby/state/information.rb', line 50

def self.improves(info); improved_information << info end

.improves?(info) ⇒ Boolean

Returns:



51
# File 'lib/roby/state/information.rb', line 51

def self.improves?(info); enum_for(:each_improved_information).any? { |i| info === i } end

.matchObject

Returns a TaskMatcher object



8
9
10
# File 'lib/roby/query.rb', line 8

def self.match
    TaskMatcher.new
end

.needs(info) ⇒ Object

This task is influenced by the information contained in info



45
# File 'lib/roby/state/information.rb', line 45

def self.needs(info); needed_information << info end

.needs?(info) ⇒ Boolean

Returns:



46
# File 'lib/roby/state/information.rb', line 46

def self.needs?(info); enum_for(:each_needed_information).any? { |i| info === i } end

Instance Method Details

#_dump(lvl) ⇒ Object

:nodoc:



209
210
211
# File 'lib/roby/distributed/proxy.rb', line 209

def _dump(lvl) # :nodoc:
    Marshal.dump(remote_id) 
end

#droby_dump(dest) ⇒ Object

Returns an intermediate representation of self suitable to be sent to the dest peer.



218
219
220
221
222
223
224
# File 'lib/roby/distributed/proxy.rb', line 218

def droby_dump(dest)
    DRoby.new(remote_siblings.droby_dump(dest), owners.droby_dump(dest),
        model.droby_dump(dest),  plan.droby_dump(dest), 
        Distributed.format(arguments, dest), Distributed.format(data, dest),
        :mission => mission?, :started => started?, 
        :finished => finished?, :success => success?)
end

#improves?(info) ⇒ Boolean

Returns:



52
# File 'lib/roby/state/information.rb', line 52

def improves?(info); self.model.improves?(info) end

#needs?(info) ⇒ Boolean

Returns:



47
# File 'lib/roby/state/information.rb', line 47

def needs?(info); self.model.needs?(info) end