com.kuka.roboticsAPI.commandModel
Class Instruction

java.lang.Object
  extended by com.kuka.roboticsAPI.commandModel.AbstractControllerCommand
      extended by com.kuka.roboticsAPI.commandModel.Instruction
All Implemented Interfaces:
IControllerCommand
Direct Known Subclasses:
MotionInstruction

public class Instruction
extends AbstractControllerCommand

An instruction is a controller command which contains an action and a device.

If an instruction is executed, the controller to which the command is sent will be determined by the controller of the device of this instruction.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
Instruction(IAction action, Device device)
          Creates a new instruction out of the given action and the device.
 
Method Summary
 void acquireResources(ICommandContainer container)
          Asks the command to acquire it's resources that are needed for execution.
 IAction getAction()
          Gets the action for this instruction.
 Controller getController()
          Gets the controller to which the command is targeted.
 Device getDevice()
          Gets device for this instruction.
 ICommandRuntimeData getRuntimeData()
          Gets the runtime data object associated with the command.
 void releaseResources(ICommandContainer container)
          Tells the command to release it's resources.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Instruction

public Instruction(IAction action,
                   Device device)
Creates a new instruction out of the given action and the device.

Parameters:
action - The action for the instruction. null is not allowed.
device - The device for the instruction. null is not allowed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Method Detail

getController

public final Controller getController()
Gets the controller to which the command is targeted.

Returns:
The controller to which the command is targeted. null is not allowed!
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getDevice

public final Device getDevice()
Gets device for this instruction.

Returns:
Device for this instruction.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getAction

public IAction getAction()
Gets the action for this instruction.

Returns:
The action for this instruction.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

acquireResources

public void acquireResources(ICommandContainer container)
                      throws InterruptedException
Asks the command to acquire it's resources that are needed for execution.

This method can block until the resources are available. The method is called before the command is passed to the controller. Implementing classes should throw an exception if preparation fails.

Specified by:
acquireResources in interface IControllerCommand
Overrides:
acquireResources in class AbstractControllerCommand
Parameters:
container - The container which will be used for the execution of the command.
Throws:
InterruptedException - The method may throw an InterruptedException if waiting was interrupted.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

releaseResources

public void releaseResources(ICommandContainer container)
Tells the command to release it's resources.

Specified by:
releaseResources in interface IControllerCommand
Overrides:
releaseResources in class AbstractControllerCommand
Parameters:
container - The container which was used for the execution of the command.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

toString

public String toString()

Overrides:
toString in class Object
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getRuntimeData

public ICommandRuntimeData getRuntimeData()
Gets the runtime data object associated with the command.

Returns:
the runtime data associated with the command. Can be null.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.