com.kuka.roboticsAPI.controllerModel.sunrise.conditions
Class SunriseConditionService

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.ControllerService
      extended by com.kuka.roboticsAPI.controllerModel.ConditionService
          extended by com.kuka.roboticsAPI.controllerModel.sunrise.conditions.SunriseConditionService

public class SunriseConditionService
extends ConditionService

Class to create and remove condition observers.

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
SunriseConditionService()
           
 
Method Summary
 ConditionObserver createAndEnableConditionObserver(ICondition condition, NotificationType notificationType, IConditionListener edgeListener)
          Creates and enables a condition observer.
 ConditionObserver createConditionObserver(ICondition condition, NotificationType notificationType, IConditionListener edgeListener)
          Creates a condition observer.
static SunriseConditionObserver createNewObserver(ICondition condition, NotificationType notificationType, IConditionListener edgeListener, SunriseExecutionService executionService, IContainerStateListener containerStateListener, boolean isEnabledOnStart)
          This function is only used by the framework.
protected  void dispose()
          Disposes this service.
 List<ConditionObserver> getConditionObservers()
          Get a collection of all registered condition observers.
 SunriseController getController()
          Gets the controller associated with this service.
 void removeConditionObserver(ConditionObserver observer)
          Removes the corresponding condition observer.
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.ControllerService
getContext, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunriseConditionService

public SunriseConditionService()
Method Detail

createConditionObserver

public ConditionObserver createConditionObserver(ICondition condition,
                                                 NotificationType notificationType,
                                                 IConditionListener edgeListener)
Description copied from class: ConditionService
Creates a condition observer.

Specified by:
createConditionObserver in class ConditionService
Parameters:
condition - Condition to be observed
notificationType - Notification options of the ConditionObserver
edgeListener - Corresponding edge listener
Returns:
the condition observer

createAndEnableConditionObserver

public ConditionObserver createAndEnableConditionObserver(ICondition condition,
                                                          NotificationType notificationType,
                                                          IConditionListener edgeListener)
Description copied from class: ConditionService
Creates and enables a condition observer.

Specified by:
createAndEnableConditionObserver in class ConditionService
Parameters:
condition - Condition to be observed
notificationType - Notification options of the ConditionObserver
edgeListener - Corresponding edge listener
Returns:
the condition observer

createNewObserver

public static SunriseConditionObserver createNewObserver(ICondition condition,
                                                         NotificationType notificationType,
                                                         IConditionListener edgeListener,
                                                         SunriseExecutionService executionService,
                                                         IContainerStateListener containerStateListener,
                                                         boolean isEnabledOnStart)
This function is only used by the framework. Please use create createConditionObserver(com.kuka.roboticsAPI.conditionModel.ICondition, com.kuka.roboticsAPI.conditionModel.NotificationType, com.kuka.roboticsAPI.conditionModel.IConditionListener) for creating new ConditionObservers.

Creates a new SunriseConditionObserver and sends the necessary SPR to Sunrise.

NOTE: The state of the ConditionObserver and the corresponding SPR is NOT managed by the SunriseConditionService. So if this function is used, you have to call the dispose()-function all by yourself. Also note, that ConditionObservers, which are created by this function, will not count into the maximum number of allowed condition observers.

Parameters:
condition - The condition for the observer.
notificationType - The notification type, on which the condition should react
edgeListener - The EdgeListener which implements the callback-functions.
executionService - The SunriseExecutionService to send the corresponding SPR.
containerStateListener - The ContainerListener to monitor the execution of the SPR.
isEnabledOnStart - The initial state of the condition observer (enabled or disabled)
Returns:
the created SunriseConditionObserver
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.

removeConditionObserver

public void removeConditionObserver(ConditionObserver observer)
Description copied from class: ConditionService
Removes the corresponding condition observer.

Specified by:
removeConditionObserver in class ConditionService
Parameters:
observer - The corresponding condition observer to be removed

dispose

protected void dispose()
Description copied from class: ControllerService
Disposes this service. May be overridden by subclasses.

Overrides:
dispose in class ControllerService

getController

public SunriseController getController()
Description copied from class: ControllerService
Gets the controller associated with this service.

Overrides:
getController in class ControllerService
Returns:
The controller associated with this service.

getConditionObservers

public List<ConditionObserver> getConditionObservers()
Get a collection of all registered condition observers.

Specified by:
getConditionObservers in class ConditionService
Returns:
Collection of Sunrise condition observers


Copyright © 2019. All rights reserved.