com.kuka.roboticsAPI.conditionModel
Class ConditionObserver

java.lang.Object
  extended by com.kuka.roboticsAPI.conditionModel.ConditionObserver
Direct Known Subclasses:
SunriseConditionObserver

public abstract class ConditionObserver
extends Object

Class for observing conditions.


Constructor Summary
protected ConditionObserver(ICondition condition, NotificationType notificationType, IConditionListener listener)
          Creates a new condition observer.
 
Method Summary
abstract  void disable()
          Stops observing conditions.
abstract  void dispose()
          Disposes this condition observer.
abstract  void enable()
          Starts observing conditions.
abstract  boolean evaluateCondition()
          Evaluates if the condition has fired.
 ICondition getCondition()
          Gets the observed condition.
 NotificationType getNotificationType()
          Gets the notification type which defines when and how often events are sent.
 IConditionListener getRegisteredEdgeListener()
          Gets the registered edge listener of a condition observer.
abstract  boolean isEnabled()
          Get the state of the condition observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionObserver

protected ConditionObserver(ICondition condition,
                            NotificationType notificationType,
                            IConditionListener listener)
Creates a new condition observer. The condition observer must be enabled to start to observe.

Parameters:
condition - The condition to observe.
notificationType - Notification options of the ConditionObserver
listener - The edge listener.
See Also:
enable(), disable()
Method Detail

enable

public abstract void enable()
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.


disable

public abstract void disable()
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.


isEnabled

public abstract boolean isEnabled()
Get the state of the condition observer. 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.

Returns:
True if the observer is enabled, false if not.

getCondition

public ICondition getCondition()
Gets the observed condition.

Returns:
The observed condition.

getNotificationType

public NotificationType getNotificationType()
Gets the notification type which defines when and how often events are sent.

Returns:
Notification options of the ConditionObserver

getRegisteredEdgeListener

public IConditionListener getRegisteredEdgeListener()
Gets the registered edge listener of a condition observer. An edge listener will registered by creating a new condition observer.

Returns:
The registered edge listener

evaluateCondition

public abstract boolean evaluateCondition()
Evaluates if the condition has fired.

Returns:
True if the condition has fired, false if not.

dispose

public abstract void dispose()
Disposes this condition observer.



Copyright © 2019. All rights reserved.