com.kuka.roboticsAPI.controllerModel.sunrise.predefinedCompounds
Class RemoteModule

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.api.SPRComponent
      extended by com.kuka.roboticsAPI.controllerModel.sunrise.api.Module
          extended by com.kuka.roboticsAPI.controllerModel.sunrise.predefinedCompounds.RemoteModule
All Implemented Interfaces:
com.kuka.common.events.IEventListener, com.kuka.common.IDataEquatable, IExpressionSegment, ISprComponent, ISPRStateListener, IMessageHandler, ISegment
Direct Known Subclasses:
CartesianVelocityModule, JointVelocityModule

public abstract class RemoteModule
extends Module
implements IMessageHandler, ISPRStateListener

Base class for module with an online remote connection to a java module.

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.

Field Summary
protected static int ERROR
          Indicates that an error occurred in the life cycle method.
protected static int READYFORNEXTSTATE
          Indicates that the module is ready for the next life cycle state.
protected static int SUCCESS
          Indicates that no error occurred in the life cycle method.
 
Constructor Summary
protected RemoteModule(SPR spr, Controller controller)
          Creates a new remote module.
 
Method Summary
protected  int active()
          Called when the SPR is in Active.
protected  InPort addInPort(String name, ISerializableType value)
          Adds an inport to this module.
protected  OutPort addOutPort(String name, ISerializableType value)
          Adds an outport to this module.
 void connectionLost()
          Called to indicate that the connection was lost.
protected  int getCycleRate()
          Gets the cycle rate of this remote module in milliseconds.
 OutPort getWatchdogAlarm()
          Gets the watchdog outport for this remote module to make assignments.
 int getWatchdogTolerance()
          Gets the watchdog tolerance.
 void handleMessage(Message message)
          Handles the given message.
protected  boolean isFailOnCycleRateExceed()
          Gets if the module goes in invalid of cycle rate exceeded.
protected  int maintaining()
          Called when the SPR is in Maintaining.
protected  boolean needsMaintaining()
          Checks whether this module needs the maintaining phase.
protected  void needsMaintaining(boolean needsMaintaining)
          Sets the flag whether this module needs the maintaining phase.
protected  void onSerialization()
          Called when the SPR in which this compound is added, is serialized.
 void onSPRStateChanged(SPR spr, SPRState newState)
          Called when the state of the given SPR changed.
protected  void setCycleRate(int cycleMillis)
          Sets the cycle rate of this remote module in milliseconds.
protected  void setFailOnCycleRateExceed(boolean failOnCycleRateExceed)
          Sets if the module should go in invalid if cycle rate exceeded.
protected  void setWatchdogTolerance(int watchdogToleranceMillis)
          Sets the tolerance of the watchdog.
protected  int tuning()
          Called when the SPR is in Tuning.
protected  int tuningFinished()
          Called when the SPR is in TuningFinished.
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.api.Module
getComponentType, getComponentVersion
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.api.SPRComponent
addInPort, addInPort, addOutPort, addOutPort, addParameter, getChecksum, getExpressionSegmentString, getInPort, getInPorts, getInstanceName, getName, getOutPort, getOutPorts, getParameter, getParameterList, getSPR, hasSameDataAs, onAsyncEvent, onFinished, onInitialize, onSPRStateChanged, onSPRStateChangedSync, setInstanceName, setName, toString, tryGetParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR

protected static final int ERROR
Indicates that an error occurred in the life cycle method.

See Also:
Constant Field Values

SUCCESS

protected static final int SUCCESS
Indicates that no error occurred in the life cycle method.

See Also:
Constant Field Values

READYFORNEXTSTATE

protected static final int READYFORNEXTSTATE
Indicates that the module is ready for the next life cycle state.

See Also:
Constant Field Values
Constructor Detail

RemoteModule

protected RemoteModule(SPR spr,
                       Controller controller)
Creates a new remote module.

Parameters:
spr - The SPR to which this module belongs.
controller - The controller for this module.
Method Detail

getWatchdogAlarm

public OutPort getWatchdogAlarm()
Gets the watchdog outport for this remote module to make assignments.

Returns:
The watchdog outport for this remote module to make assignments.
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.

getCycleRate

protected int getCycleRate()
Gets the cycle rate of this remote module in milliseconds.

Returns:
The cycle rate of this remote module in milliseconds.

setCycleRate

protected void setCycleRate(int cycleMillis)
Sets the cycle rate of this remote module in milliseconds.

Parameters:
cycleMillis - The cycle rate of this remote module in milliseconds.

needsMaintaining

protected void needsMaintaining(boolean needsMaintaining)
Sets the flag whether this module needs the maintaining phase.

Parameters:
needsMaintaining - True if this module needs the maintaining phase.

needsMaintaining

protected boolean needsMaintaining()
Checks whether this module needs the maintaining phase.

Returns:
True if this module needs the maintaining phase.

getWatchdogTolerance

public int getWatchdogTolerance()
Gets the watchdog tolerance.

Returns:
The watchdog tolerance.
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.

setWatchdogTolerance

protected void setWatchdogTolerance(int watchdogToleranceMillis)
Sets the tolerance of the watchdog.

Parameters:
watchdogToleranceMillis - The tolerance of the watchdog

isFailOnCycleRateExceed

protected boolean isFailOnCycleRateExceed()
Gets if the module goes in invalid of cycle rate exceeded.

Returns:
True if the module goes in invalid of cycle rate exceeded.

setFailOnCycleRateExceed

protected void setFailOnCycleRateExceed(boolean failOnCycleRateExceed)
Sets if the module should go in invalid if cycle rate exceeded.

Parameters:
failOnCycleRateExceed - True if module should go in invalid.

addOutPort

protected final OutPort addOutPort(String name,
                                   ISerializableType value)
Adds an outport to this module.

Parameters:
name - The name of the port.
value - The value for this port.
Returns:
The created port.

addInPort

protected final InPort addInPort(String name,
                                 ISerializableType value)
Adds an inport to this module.

Parameters:
name - The name of the port.
value - The value for this port.
Returns:
The created port.

onSerialization

protected void onSerialization()
Description copied from class: SPRComponent
Called when the SPR in which this compound is added, is serialized.

Overrides:
onSerialization in class SPRComponent

tuning

protected int tuning()
Called when the SPR is in Tuning.

Returns:
ReadyForNextState if SPR is ready for active, Success otherwise or Error.

tuningFinished

protected int tuningFinished()
Called when the SPR is in TuningFinished.

Returns:
ReadyForNextState if SPR is ready for active, Success otherwise or Error.

active

protected int active()
Called when the SPR is in Active.

Returns:
Success otherwise or Error.

maintaining

protected int maintaining()
Called when the SPR is in Maintaining.

Returns:
ReadyForNextState if SPR is ready to finish, Success otherwise or Error.

handleMessage

public void handleMessage(Message message)
Handles the given message.

Specified by:
handleMessage in interface IMessageHandler
Parameters:
message - The message to be handled. Will never be null.
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.

onSPRStateChanged

public void onSPRStateChanged(SPR spr,
                              SPRState newState)
Called when the state of the given SPR changed.

Specified by:
onSPRStateChanged in interface ISPRStateListener
Parameters:
spr - The SPR which changed it's state.
newState - The new state of 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.

connectionLost

public void connectionLost()
Called to indicate that the connection was lost.

Specified by:
connectionLost in interface IMessageHandler
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.


Copyright © 2019. All rights reserved.