com.kuka.nav.command
Interface Commandable

All Known Subinterfaces:
MobileRobot

public interface Commandable

Central interface for issuing commands to a mobile robot.


Method Summary
 void addCommandStateListener(com.kuka.command.ICommandStateListener listener)
          Adds a state listener to the command pipe.
 void addRequestStateListener(RequestStateListener<RequestContainer> listener)
          Adds a state listener to request state changes.
 void cancelAll()
          Cancels all commands and requests, including those that have been started by another commanding instance and may still be running.
 void cancelAllCommands()
          Cancels all command execution containers which are currently executed or queued.
 void cancelAllRequests()
          Cancels all active request containers.
<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>>
boolean
canExecute(C command)
          Tests whether the command can be executed by this robot and if the parameters are correct for this robot.
<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>>
O
execute(C command)
          Issues a command to the robot and blocks until it is finished executing, i.e. the state of the corresponding container changed to NavExecutionState.FINISHED.
<R extends RequestContainer>
R
execute(Request<R> request)
          Issues a request to the robot and blocks till the request is first updated.
<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>>
O
executeAsync(C command)
          Issues a command to the robot and returns immediately so the command is executed asynchronously.
<R extends RequestContainer>
R
executeAsync(Request<R> request)
          Issues a request to the robot.
 Collection<com.kuka.command.ICommandExecutionContainer<?,?,?>> getAllCommands()
           
 Collection<RequestContainer> getAllRequests()
           
 void removeCommandStateListener(com.kuka.command.ICommandStateListener listener)
          Removes the given state listener from the command pipe.
 void removeRequestStateListener(RequestStateListener<RequestContainer> listener)
          Removes the given state listener from receiving request state changes.
 

Method Detail

canExecute

<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>> boolean canExecute(C command)
Tests whether the command can be executed by this robot and if the parameters are correct for this robot.

Type Parameters:
C - The command type.
O - The type of the command container.
Parameters:
command - A command.
Returns:
True if the configuration of the command is correct for this robot.

execute

<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>> O execute(C command)
Issues a command to the robot and blocks until it is finished executing, i.e. the state of the corresponding container changed to NavExecutionState.FINISHED.

Type Parameters:
C - The command type.
O - The type of the command container.
Parameters:
command - The command to execute.
Returns:
A container that provides information to the execution state of the command.

executeAsync

<C extends com.kuka.command.ICommand<C,O>,O extends com.kuka.command.ICommandExecutionContainer<C,?,?>> O executeAsync(C command)
Issues a command to the robot and returns immediately so the command is executed asynchronously.

Type Parameters:
C - The command type.
O - The type of the command container.
Parameters:
command - The command to execute.
Returns:
A container that provides information to the execution state of the command.

cancelAll

void cancelAll()
Cancels all commands and requests, including those that have been started by another commanding instance and may still be running.

The method blocks until all known containers have finished. After the execution of this method no more command execution containers are executed.


cancelAllCommands

void cancelAllCommands()
Cancels all command execution containers which are currently executed or queued.

The method blocks until all containers have finished. After the execution of this method no more command execution containers are executed. Future calls to the method ICommandPipe.execute(ICommand) and to the method ICommandPipe.executeAsync(ICommand) are ignored.


getAllCommands

Collection<com.kuka.command.ICommandExecutionContainer<?,?,?>> getAllCommands()
Returns:
containers for all queued and active commands

addCommandStateListener

void addCommandStateListener(com.kuka.command.ICommandStateListener listener)
Adds a state listener to the command pipe. The listener is called (asynchronous) whenever a command execution container changes its state.

Parameters:
listener - A state listener which is called (asynchronous) whenever a command execution container changes its state.

removeCommandStateListener

void removeCommandStateListener(com.kuka.command.ICommandStateListener listener)
Removes the given state listener from the command pipe.

Parameters:
listener - The state listener which has to be removed from the command pipe.

execute

<R extends RequestContainer> R execute(Request<R> request)
Issues a request to the robot and blocks till the request is first updated. Requests are always run asynchronously, requests can run indefinitely and requests can run in parallel.

Type Parameters:
R - The type of the result container.
Parameters:
request - The request to the robot.
Returns:
A result container that provides current information to the issued request.

executeAsync

<R extends RequestContainer> R executeAsync(Request<R> request)
Issues a request to the robot. Requests are always run asynchronously, requests can run indefinitely and requests can run in parallel.

Type Parameters:
R - The type of the result container.
Parameters:
request - The request to the robot.
Returns:
A result container that provides current information to the issued request.

cancelAllRequests

void cancelAllRequests()
Cancels all active request containers.


getAllRequests

Collection<RequestContainer> getAllRequests()
Returns:
containers for all active requests

addRequestStateListener

void addRequestStateListener(RequestStateListener<RequestContainer> listener)
Adds a state listener to request state changes.

Parameters:
listener - a state listener

removeRequestStateListener

void removeRequestStateListener(RequestStateListener<RequestContainer> listener)
Removes the given state listener from receiving request state changes.

Parameters:
listener - a state listener


Copyright © 2019. All rights reserved.