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

java.lang.Object
  extended by com.kuka.roboticsAPI.conditionModel.ConditionObserver
      extended by com.kuka.roboticsAPI.controllerModel.sunrise.conditions.SunriseConditionObserver
          extended by com.kuka.roboticsAPI.controllerModel.sunrise.conditions.SunriseTriggerConditionObserver
All Implemented Interfaces:
com.kuka.common.events.IEventListener, ICompoundEventListener, IContainerStateListener

public class SunriseTriggerConditionObserver
extends SunriseConditionObserver
implements IContainerStateListener

Class to observe trigger conditions specific for Sunrise.

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
SunriseTriggerConditionObserver(ICondition condition, ITriggerAction listener, SPR spr, AbstractMotionContainer motionContainer, RequestService requestService)
          Constructor to create a sunrise trigger observer.
 
Method Summary
 void disable()
          Stops observing conditions.
protected  void disposeInternal()
          Disposes this condition observer.
 void enable()
          Starts observing conditions.
 boolean evaluateCondition()
          Evaluates if the condition has fired.
protected  com.kuka.roboticsAPI.controllerModel.sunrise.conditions.EdgeListenerExecutor getAndFillExecutor(Message message, Date time, int missedEvents, boolean conditionValue)
          Gets the executor for the executor for the this type of condition and fills it with the executor specific data from the message.
 ITriggerAction getRegisteredEdgeListener()
          Gets the registered edge listener of a condition observer.
 void onStateChanged(IExecutionContainer container, ExecutionState state)
          Called when the state of the container changed it's state.
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.conditions.SunriseConditionObserver
dispose, getCondition, getEdgeName, getSPR, isEnabled, isEnabledOnStart, onCompoundEvent, setConditionID, setConditionService, toString
 
Methods inherited from class com.kuka.roboticsAPI.conditionModel.ConditionObserver
getNotificationType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SunriseTriggerConditionObserver

public SunriseTriggerConditionObserver(ICondition condition,
                                       ITriggerAction listener,
                                       SPR spr,
                                       AbstractMotionContainer motionContainer,
                                       RequestService requestService)
Constructor to create a sunrise trigger observer.

Parameters:
condition - The condition
listener - The listener for observing.
spr - The SPR.
motionContainer - the motion container that owns the trigger condition observer.
requestService - the request service for enabling / disabling the events.
Method Detail

getRegisteredEdgeListener

public ITriggerAction getRegisteredEdgeListener()
Description copied from class: ConditionObserver
Gets the registered edge listener of a condition observer. An edge listener will registered by creating a new condition observer.

Overrides:
getRegisteredEdgeListener in class ConditionObserver
Returns:
The registered edge listener

getAndFillExecutor

protected com.kuka.roboticsAPI.controllerModel.sunrise.conditions.EdgeListenerExecutor getAndFillExecutor(Message message,
                                                                                                          Date time,
                                                                                                          int missedEvents,
                                                                                                          boolean conditionValue)
Description copied from class: SunriseConditionObserver
Gets the executor for the executor for the this type of condition and fills it with the executor specific data from the message.

Specified by:
getAndFillExecutor in class SunriseConditionObserver
Parameters:
message - the message containing condition event specific data.
time - the condition event time
missedEvents - the amount of missed events
conditionValue - the value of the condition.
Returns:
the executor for the event.

onStateChanged

public void onStateChanged(IExecutionContainer container,
                           ExecutionState state)
Description copied from interface: IContainerStateListener
Called when the state of the container changed it's state.

Specified by:
onStateChanged in interface IContainerStateListener
Parameters:
container - The container which changed it's state.
state - The actual state of the container.

enable

public void enable()
Description copied from class: SunriseConditionObserver
Starts observing conditions. Enabled means that the registered listener is being notified about occurring events, disabled means that events are only counted. The number of missed events will be sent with the next notification.

Overrides:
enable in class SunriseConditionObserver

disable

public void disable()
Description copied from class: SunriseConditionObserver
Stops observing conditions. Enabled means that the registered listener is being notified about occurring events, disabled means that events are only counted. The number of missed events will be sent with the next notification.

Overrides:
disable in class SunriseConditionObserver

evaluateCondition

public boolean evaluateCondition()
Description copied from class: ConditionObserver
Evaluates if the condition has fired.

Overrides:
evaluateCondition in class SunriseConditionObserver
Returns:
True if the condition has fired, false if not.

disposeInternal

protected void disposeInternal()
Description copied from class: SunriseConditionObserver
Disposes this condition observer.

This method is intended to be called when disposing this observer directly, or when this observer is removed from the condition service.

Overrides:
disposeInternal in class SunriseConditionObserver


Copyright © 2019. All rights reserved.