class Roby::Coordination::Models::Event
A representation of an event on the execution context's task
Attributes
symbol[R]
@return [Symbol] the event's symbol
task[R]
@return [Coordination::Models::Task] The task this event is defined on
Public Class Methods
new(task, symbol)
click to toggle source
# File lib/roby/coordination/models/event.rb, line 11 def initialize(task, symbol) @task, @symbol = task, symbol.to_sym end
Public Instance Methods
==(other)
click to toggle source
# File lib/roby/coordination/models/event.rb, line 20 def ==(other) other.kind_of?(self.class) && other.symbol == symbol && other.task == task end
forward_to(root_event)
click to toggle source
When running in this event's state, forward this event to the given root task event
# File lib/roby/coordination/models/event.rb, line 28 def forward_to(root_event) if !root_event.task.respond_to?(:coordination_model) raise NotRootEvent, "can only forward to a root event" end root_event.task.coordination_model. forward task, self, root_event end
new(execution_context)
click to toggle source
@return [Coordination::Base::Event]
# File lib/roby/coordination/models/event.rb, line 16 def new(execution_context) Coordination::Event.new(execution_context, self) end
to_s()
click to toggle source
# File lib/roby/coordination/models/event.rb, line 36 def to_s; "#{task}.#{symbol}_event" end