com.kuka.roboticsAPI.controllerModel.sunrise
Class SprPrimitive

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.Primitive
      extended by com.kuka.roboticsAPI.controllerModel.sunrise.SprPrimitive
Direct Known Subclasses:
BrakeTestSprPrimitive, MotionSprPrimitive

public class SprPrimitive
extends Primitive

A Primitive consisting of exactly one SPR that has the same life cycle as the Primitive.

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
SprPrimitive(SunriseExecutionContainer container, SPR spr)
          Creates a new instance of this Primitive.
SprPrimitive(SunriseExecutionContainer container, SPR spr, boolean canResumeAfterPause)
          Creates a new instance of this Primitive.
 
Method Summary
 void cancel()
          Cancels the primitive.
 boolean canResumeAfterPause()
          Indicates that the corresponding SPR can be resumed after a pause.
 Collection<SPR> getAllSprs()
          Returns all SPRs that this Primitive consists of.
 SPR getSPR()
          Returns the SPR of this SprPrimitive.
protected  void handleSprStateChanged(SPR eventSpr, SPRState newState)
          Called when the state of the given SPR changed.
 String toString()
          
protected  void unregisterAllSprListener()
          Unregisters this primitive from ALL SPR state events.
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.Primitive
addStateListener, createFiredConditionInfo, getContainer, getRedundancy, getState, handleSprCompoundEvent, mapSunriseStateToCommandState, registerAsSprListener, removeStateListener, setState, stateFromSpr, unregisterAsSprListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SprPrimitive

public SprPrimitive(SunriseExecutionContainer container,
                    SPR spr)
Creates a new instance of this Primitive.

Parameters:
container - the container that this primitive belongs to
spr - the SPR that makes up this primitive. The SPR must be resumable after a pause.
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.

SprPrimitive

public SprPrimitive(SunriseExecutionContainer container,
                    SPR spr,
                    boolean canResumeAfterPause)
Creates a new instance of this Primitive.

Parameters:
container - the container that this primitive belongs to
spr - the SPR that makes up this primitive.
canResumeAfterPause - Indicates whether the SPR is resumable after a pause or not.
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 Detail

getSPR

public SPR getSPR()
Returns the SPR of this SprPrimitive.

Returns:
the SPR
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.

getAllSprs

public Collection<SPR> getAllSprs()
Returns all SPRs that this Primitive consists of.

Specified by:
getAllSprs in class Primitive
Returns:
all SPRs that this Primitive consists of
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.

toString

public String toString()

Overrides:
toString in class Object
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.

handleSprStateChanged

protected void handleSprStateChanged(SPR eventSpr,
                                     SPRState newState)
Description copied from class: Primitive
Called when the state of the given SPR changed.

Overrides:
handleSprStateChanged in class Primitive
Parameters:
eventSpr - The SPR which changed it's state.
newState - The new state of the SPR.

canResumeAfterPause

public boolean canResumeAfterPause()
Indicates that the corresponding SPR can be resumed after a pause.

Returns:
true, if the corresponding SPR can be resumed after a pause.
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.

cancel

public void cancel()
Cancels the primitive.

Cancels all SPRs belonging to the primitive.

Specified by:
cancel in class Primitive
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.

unregisterAllSprListener

protected void unregisterAllSprListener()
Description copied from class: Primitive
Unregisters this primitive from ALL SPR state events. SPR state events will no longer be forwarded to Primitive.handleSprStateChanged(SPR, SPRState) and Primitive.handleSprCompoundEvent(SPR, Message).

Specified by:
unregisterAllSprListener in class Primitive


Copyright © 2019. All rights reserved.