Module: Roby::LoggedPlanObject

Included in:
LoggedTask, PlanObject::DRoby
Defined in:
lib/roby/log/dot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dot_idObject (readonly)

Returns the value of attribute dot_id.



122
123
124
# File 'lib/roby/log/dot.rb', line 122

def dot_id
  @dot_id
end

Instance Method Details

#apply_layout(positions, display) ⇒ Object

Applys the layout in positions to this particular object



134
135
136
137
138
139
140
141
142
# File 'lib/roby/log/dot.rb', line 134

def apply_layout(positions, display)
    return unless display.displayed?(self)
    if p = positions[dot_id]
	raise "no graphics for #{self}" unless graphics_item = display[self]
	graphics_item.pos = p
    else
	STDERR.puts "WARN: #{self} has not been layouted"
    end
end

#dot_label(display) ⇒ Object



124
# File 'lib/roby/log/dot.rb', line 124

def dot_label(display); display_name(display) end

#to_dot(display, io) ⇒ Object

Adds the dot definition for this object in io



127
128
129
130
131
# File 'lib/roby/log/dot.rb', line 127

def to_dot(display, io)
    return unless display.displayed?(self)
    @dot_id ||= "plan_object_#{io.layout_id(self)}"
    io << "  #{dot_id}[label=\"#{dot_label(display).split("\n").join('\n')}\"];\n"
end