com.kuka.roboticsAPI.controllerModel.sunrise
Class SunriseApplication

java.lang.Object
  extended by com.kuka.roboticsAPI.applicationModel.tasks.RoboticsAPITask
      extended by com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication
          extended by com.kuka.roboticsAPI.controllerModel.sunrise.SunriseApplication
All Implemented Interfaces:
IRoboticsAPIApplication, ILegacyRoboticsAPITask, com.kuka.task.IRoboticsAPITask

public abstract class SunriseApplication
extends RoboticsAPIApplication

Base class for a native Sunrise application using just SPRs. This class provides the known methods of the SunriseAPI like execute, update or cancel.

This element is not in its final state and might change in future versions.

Constructor Summary
protected SunriseApplication()
          For subclasses.
protected SunriseApplication(RoboticsAPIContext context)
          For subclasses.
 
Method Summary
 void cancel(SPR spr)
          Cancels the given SPR.
 void chooseController(String controllerName)
          Sets the controller for this Sunrise application.
 ICommandContainer execute(SPR spr)
          Executes the given SPR synchronously.
 ICommandContainer execute(SPR spr, boolean blocking)
          Executes the given SPR.
 Message execute(SSR ssr)
          Executes a SSR.
 void execute(SSR ssr, boolean blocking)
          Executes a SSR.
 SunriseController getController()
          Gets the sunrise controller used in this application.
 SunriseExecutionService getExecutionService()
          Gets the Sunrise execution service used in this application.
 NameserverProxy getNameserver()
          Returns the nameserver instance used for this application.
 SunriseRequestService getRequestService()
          Gets the Sunrise request service used in this application.
 void update(SPR spr)
          Updates the given SPR.
 
Methods inherited from class com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication
createFromTemplate, getApplicationControl, getApplicationUI, getFrame, getRecovery, onApplicationStateChanged, runApplication
 
Methods inherited from class com.kuka.roboticsAPI.applicationModel.tasks.RoboticsAPITask
dispose, getApplicationData, getContext, getController, getDevice, getDevice, getLogger, getObserverManager, getRobot, getRobot, getTaskFunction, getTaskManager, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.kuka.roboticsAPI.applicationModel.tasks.ILegacyRoboticsAPITask
getContext, getLogger
 
Methods inherited from interface com.kuka.task.IRoboticsAPITask
dispose, initialize, run
 

Constructor Detail

SunriseApplication

protected SunriseApplication(RoboticsAPIContext context)
For subclasses.

Parameters:
context - The context of this application.

SunriseApplication

protected SunriseApplication()
For subclasses. Creates an application with the default context connected to the RoboticsAPI.config.xml file within the project.

Method Detail

getController

public final SunriseController getController()
Gets the sunrise controller used in this application.

Returns:
The sunrise controller used in this application.
This element is not in its final state and might change in future versions.

getExecutionService

public final SunriseExecutionService getExecutionService()
Gets the Sunrise execution service used in this application.

Returns:
The Sunrise execution service used in this application.
This element is not in its final state and might change in future versions.

getRequestService

public final SunriseRequestService getRequestService()
Gets the Sunrise request service used in this application.

Returns:
The Sunrise request service used in this application.
This element is not in its final state and might change in future versions.

update

public final void update(SPR spr)
Updates the given SPR. Only works of the application is initialized correctly with the setup method.

Parameters:
spr - The SPR which should be updated.
This element is not in its final state and might change in future versions.

cancel

public final void cancel(SPR spr)
Cancels the given SPR. Only works of the application is initialized correctly with the setup method.

Parameters:
spr - The SPR which should be cancelled.
This element is not in its final state and might change in future versions.

execute

public final Message execute(SSR ssr)
Executes a SSR. This method will block the calling thread until the SSR request is complete or a 5 seconds timeout occurs.

Parameters:
ssr - The SSR which should be sent. null is not allowed.
Returns:
The message response of Sunrise.
This element is not in its final state and might change in future versions.

execute

public final void execute(SSR ssr,
                          boolean blocking)
Executes a SSR. You can choose to wait until the SSR is finished or to continue without having the result immediately available. The result will be available in the response message of the SSR (ssr.getResponseMessage()).

Parameters:
ssr - The SSR which should be sent. null is not allowed.
blocking - Indicates if this method should block until the request is complete, or not.
This element is not in its final state and might change in future versions.

execute

public final ICommandContainer execute(SPR spr,
                                       boolean blocking)
Executes the given SPR. Only works of the application is initialized correctly with the setup method.

Parameters:
spr - The SPR which should be executed.
blocking - True if the execution should block until the SPR is finished.
Returns:
The container for the SPR. You can use this container for synchronization issues.
Throws:
com.kuka.common.ThreadInterruptedException - if the execution was interrupted while waiting for end of execution
This element is not in its final state and might change in future versions.

execute

public final ICommandContainer execute(SPR spr)
Executes the given SPR synchronously. Only works of the application is initialized correctly with the setup method.

Parameters:
spr - The SPR which should be executed.
Returns:
The container for the SPR. You can use this container for synchronization issues.
This element is not in its final state and might change in future versions.

getNameserver

public final NameserverProxy getNameserver()
Returns the nameserver instance used for this application.

Returns:
The nameserver instance used for this application.
This element is not in its final state and might change in future versions.

chooseController

public final void chooseController(String controllerName)
Sets the controller for this Sunrise application.

Parameters:
controllerName - The name of the sunrise controller (this is the name in the xml file).
This element is not in its final state and might change in future versions.


Copyright © 2019. All rights reserved.