class Roby::DRoby::V5::EventGeneratorDumper::DRoby
An intermediate representation of EventGenerator
objects suitable to be sent to our peers.
Attributes
controlable[R]
True if the generator is controlable
emitted[R]
True if the generator has already been emitted once at the time EventGenerator#droby_dump
has been called.
Public Class Methods
new(remote_siblings, owners, model, plan_id, controlable, emitted)
click to toggle source
Create a DRoby
object with the given information. See also PlanObject::DRoby
Calls superclass method
Roby::DRoby::V5::PlanObjectDumper::DRoby::new
# File lib/roby/droby/v5/droby_dump.rb, line 335 def initialize(remote_siblings, owners, model, plan_id, controlable, emitted) super(remote_siblings, owners, model, plan_id) @controlable, @emitted = controlable, emitted end
Public Instance Methods
proxy(peer)
click to toggle source
Create a new proxy which maps the object of peer
represented by this communication intermediate.
# File lib/roby/droby/v5/droby_dump.rb, line 342 def proxy(peer) local_object = peer.local_object(model).new(plan: local_plan(peer)) if controlable local_object.command = lambda { } end local_object end
update(peer, proxy, fresh_proxy: false)
click to toggle source
Updates an already existing proxy using the information contained in this object.
Calls superclass method
Roby::DRoby::V5::DistributedObjectDumper::DRoby#update
# File lib/roby/droby/v5/droby_dump.rb, line 352 def update(peer, proxy, fresh_proxy: false) super if emitted && !proxy.emitted? proxy.instance_eval { @emitted = true } end end