class Roby::Actions::Interface
Functionality to gather information about the actions available on a given Roby
app
Actions
are simply methods of arity zero or one, preceded by a call to describe. The methods can modify the current plan (available as plan
) and must return the Roby::Task
instance that will be used to represent the action during execution
class Iface < Roby::Actions::Interface describe "makes the robot turn" def robot_turn end end
Attributes
plan[R]
The plan to which this action interface adds tasks
Public Class Methods
new(plan)
click to toggle source
# File lib/roby/actions/interface.rb, line 23 def initialize(plan) @plan = plan end
Public Instance Methods
action_script(task, &block)
click to toggle source
# File lib/roby/actions/interface.rb, line 36 def action_script(task, &block) model = Coordination::ActionScript. new_submodel(action_interface: self.model, root: task.model) model.parse(&block) model.new(task) end
action_state_machine(task, &block)
click to toggle source
# File lib/roby/actions/interface.rb, line 29 def action_state_machine(task, &block) model = Coordination::ActionStateMachine. new_submodel(action_interface: self.model, root: task.model) model.parse(&block) model.new(task) end
model()
click to toggle source
# File lib/roby/actions/interface.rb, line 27 def model; self.class end