Class: Roby::TaskModelTag

Inherits:
Object show all
Defined in:
lib/roby/distributed/protocol.rb

Defined Under Namespace

Classes: DRoby

Constant Summary collapse

@@local_to_remote =
Hash.new
@@remote_to_local =
Hash.new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.local_to_remoteObject



57
# File 'lib/roby/distributed/protocol.rb', line 57

def self.local_to_remote; @@local_to_remote end

.remote_to_localObject



58
# File 'lib/roby/distributed/protocol.rb', line 58

def self.remote_to_local; @@remote_to_local end

Instance Method Details

#droby_dump(dest) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/roby/distributed/protocol.rb', line 104

def droby_dump(dest)
    unless @__droby_marshalled__
  tagdef = ancestors.map do |mod|
      if mod.instance_of?(Roby::TaskModelTag)
    unless id = TaskModelTag.local_to_remote[mod]
        id = [mod.name, mod.remote_id]
    end
    id
      end
  end
  tagdef.compact!
  @__droby_marshalled__ = DRoby.new(tagdef.reverse)
    end
    @__droby_marshalled__
end