class Roby::DRoby::V5::TaskEventGeneratorDumper::DRoby

An intermediate representation of TaskEventGenerator objects suitable to be sent to our peers.

Attributes

emitted[R]

True if the generator has already emitted once at the time TaskEventGenerator#droby_dump has been called.

remote_siblings[R]

This event's siblings

symbol[R]

The event name

task[R]

An object representing the task of this generator on our remote peer.

Public Class Methods

new(remote_siblings, emitted, task, symbol) click to toggle source

Create a new DRoby object with the given information

# File lib/roby/droby/v5/droby_dump.rb, line 409
def initialize(remote_siblings, emitted, task, symbol)
    @remote_siblings = remote_siblings
    @emitted = emitted
    @task   = task
    @symbol = symbol
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 422
def proxy(peer)
    task  = peer.local_object(self.task)
    event = task.event(symbol)
    if emitted && !event.emitted?
        event.instance_eval { @emitted = true }
    end
    event
end