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

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

public abstract class SunriseConditionObserver
extends ConditionObserver
implements ICompoundEventListener

Class to observe 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.

Method Summary
 void disable()
          Stops observing conditions.
 void dispose()
          Disposes this condition observer.
protected  void disposeInternal()
          Disposes this condition observer.
 void enable()
          Starts observing conditions.
 boolean evaluateCondition()
          Evaluates if the condition has fired.
protected abstract  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.
 AbstractCondition getCondition()
          Gets the observed condition.
protected  String getEdgeName(IConditionListener listener)
          Sets name and executor of the corresponding edge.
 SPR getSPR()
          Returns the SPR.
 boolean isEnabled()
          Get the state of the condition observer.
 boolean isEnabledOnStart()
          Gets the initial state of the observer.
 void onCompoundEvent(SPR spr, Message message)
          Called when one of the SPR compounds has raised an event.
 void setConditionID(int conditionId)
          Method to initialize the condition ID value - the value will be provided.
protected  void setConditionService(SunriseConditionService service)
          Sets the condition service that is responsible for the life cycle of this condition observer.
 String toString()
           
 
Methods inherited from class com.kuka.roboticsAPI.conditionModel.ConditionObserver
getNotificationType, getRegisteredEdgeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setConditionService

protected void setConditionService(SunriseConditionService service)
Sets the condition service that is responsible for the life cycle of this condition observer.

Parameters:
service - the condition service

toString

public String toString()
Overrides:
toString in class Object

enable

public 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.

Specified by:
enable in class ConditionObserver

disable

public 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.

Specified by:
disable in class ConditionObserver

isEnabled

public 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.

Specified by:
isEnabled in class ConditionObserver
Returns:
True if the observer is enabled, false if not.

onCompoundEvent

public void onCompoundEvent(SPR spr,
                            Message message)
Called when one of the SPR compounds has raised an event.

Specified by:
onCompoundEvent in interface ICompoundEventListener
Parameters:
spr - The SPR whose compound has raised an event.
message - compound event message.
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.

getAndFillExecutor

protected abstract 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.

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.

getSPR

public SPR getSPR()
Returns the SPR.

Returns:
The respective SPR.

setConditionID

public void setConditionID(int conditionId)
Method to initialize the condition ID value - the value will be provided. at mapping time.

Parameters:
conditionId - condition ID
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.

getCondition

public AbstractCondition getCondition()
Gets the observed condition.

Overrides:
getCondition in class ConditionObserver
Returns:
The observed condition.

dispose

public void dispose()
Disposes this condition observer.

Specified by:
dispose in class ConditionObserver

disposeInternal

protected void disposeInternal()
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.


getEdgeName

protected String getEdgeName(IConditionListener listener)
Sets name and executor of the corresponding edge.

Parameters:
listener - Corresponding listener
Returns:
The specified edge listener
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.

evaluateCondition

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

Specified by:
evaluateCondition in class ConditionObserver
Returns:
True if the condition has fired, false if not.

isEnabledOnStart

public boolean isEnabledOnStart()
Gets the initial state of the observer.

Returns:
the initial state of the observer


Copyright © 2019. All rights reserved.