Class MoveJointCommand
java.lang.Object
|
+--Command
|
+--MoveJointCommand
- public class MoveJointCommand
- extends Command
A class that encapsulates a command to move a specific joint on the robot
to a specific joint angle.This class is a concrete implementation of the
Command class, and is a part of REMOTE's implementation of the Command
Pattern, as demonstrated in Gamma et al (page 236).
- See Also:
SimulationEngine
,
CommandQueue
Constructor Summary |
MoveJointCommand(int lineNumber,
java.lang.String name,
double variable)
Creates a new MoveJointCommand, which will move the named Joint to the
given joint angle. |
Method Summary |
void |
Execute()
Executes the Command's function. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MoveJointCommand
public MoveJointCommand(int lineNumber,
java.lang.String name,
double variable)
- Creates a new MoveJointCommand, which will move the named Joint to the
given joint angle.
- Parameters:
lineNumber
- the source line for this command.name
- the name of the joint to move.variable
- the destination of the joint variable.
Execute
public void Execute()
throws java.lang.Exception
- Executes the Command's function. The SimulationEngine will call this
method in order to activate the Command and effect change on either the
Robot's state or the state of the simulation.
- Throws:
- thrown - if an error occurs attempting to execute the command.
- Overrides:
- Execute in class Command