Class: Roby::PlanObject::DRoby
- Inherits:
-
BasicObject::DRoby
- Object
- BasicObject::DRoby
- Roby::PlanObject::DRoby
- Includes:
- LoggedPlanObject
- Defined in:
- lib/roby/distributed/proxy.rb,
lib/roby/log/dot.rb,
lib/roby/log/relations.rb
Overview
Base class for all marshalled plan objects.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
The model for this plan object.
-
#plan ⇒ Object
readonly
The plan of this object.
Attributes included from LoggedPlanObject
Attributes inherited from BasicObject::DRoby
Instance Method Summary collapse
- #display(display, graphics_item) ⇒ Object
- #display_create(display) ⇒ Object
- #display_events ⇒ Object
- #display_name(display) ⇒ Object
- #display_parent ⇒ Object
-
#initialize(remote_siblings, owners, model, plan) ⇒ DRoby
constructor
Create a DRoby object with the given information.
-
#to_s ⇒ Object
:nodoc:.
-
#update(peer, proxy) ⇒ Object
Update an existing proxy, using the information stored in this DRoby object.
Methods included from LoggedPlanObject
#apply_layout, #dot_label, #to_dot
Methods inherited from BasicObject::DRoby
#owners_to_s, #remote_siblings_to_s, #sibling_on
Constructor Details
#initialize(remote_siblings, owners, model, plan) ⇒ DRoby
Create a DRoby object with the given information. See also BasicObject::DRoby
67 68 69 70 |
# File 'lib/roby/distributed/proxy.rb', line 67 def initialize(remote_siblings, owners, model, plan) super(remote_siblings, owners) @model, @plan = model, plan end |
Instance Attribute Details
#model ⇒ Object (readonly)
The model for this plan object
61 62 63 |
# File 'lib/roby/distributed/proxy.rb', line 61 def model @model end |
#plan ⇒ Object (readonly)
The plan of this object
63 64 65 |
# File 'lib/roby/distributed/proxy.rb', line 63 def plan @plan end |
Instance Method Details
#display(display, graphics_item) ⇒ Object
14 15 |
# File 'lib/roby/log/relations.rb', line 14 def display(display, graphics_item) end |
#display_create(display) ⇒ Object
11 |
# File 'lib/roby/log/relations.rb', line 11 def display_create(display); end |
#display_events ⇒ Object
12 |
# File 'lib/roby/log/relations.rb', line 12 def display_events; ValueSet.new end |
#display_name(display) ⇒ Object
13 |
# File 'lib/roby/log/relations.rb', line 13 def display_name(display); remote_name end |
#display_parent ⇒ Object
10 |
# File 'lib/roby/log/relations.rb', line 10 def display_parent; end |
#to_s ⇒ Object
:nodoc:
72 73 74 |
# File 'lib/roby/distributed/proxy.rb', line 72 def to_s # :nodoc: "#<dRoby:#{model.ancestors.first.first}#{remote_siblings_to_s} plan=#{plan} owners=#{owners_to_s}>" end |
#update(peer, proxy) ⇒ Object
Update an existing proxy, using the information stored in this DRoby object.
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/roby/distributed/proxy.rb', line 78 def update(peer, proxy) super(peer, proxy) if proxy.root_object? if self.plan plan = peer.local_object(self.plan) return if proxy.plan == plan Distributed.update_all([plan, proxy]) do plan.discover(proxy) end end end end |