|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.sunrise.api.SPRComponent
public abstract class SPRComponent
A SPR component is part of an SPR an provides outports for the data-flow and has inports which can be connected with outports of other SPR components. A SPR component can also have parameters.
Each SPR component will have a unique instance name. The API will ensure, that each SPR component will have such a unique name. But if the user wants to have a special name, he can set this name.
| Constructor Summary | |
|---|---|
protected |
SPRComponent()
Creates a new compound with no instance name. |
protected |
SPRComponent(String name)
Creates a new compound with a unique instance name. |
| Method Summary | ||
|---|---|---|
InPort |
addInPort(InPort port)
Adds a inport to this compound. |
|
InPort |
addInPort(String name)
Adds an inport to this compound. |
|
OutPort |
addOutPort(OutPort port)
Adds a outport to this compound. |
|
OutPort |
addOutPort(String name)
Adds a outport to this compound. |
|
|
addParameter(String name,
T value)
Adds a new parameter to this compound. |
|
int |
getChecksum()
Returns the checksum for the segment. |
|
abstract String |
getComponentType()
Gets the type of this component. |
|
abstract String |
getComponentVersion()
Gets the version of this component. |
|
String |
getExpressionSegmentString(String tag)
Gets the runtime value of an expression segment. |
|
InPort |
getInPort(String name)
Gets the inport with the specified name. |
|
List<InPort> |
getInPorts()
Gets the inports of this compound. |
|
String |
getInstanceName()
Gets the instance name of this compound. |
|
String |
getName()
Gets the name of this compound. |
|
OutPort |
getOutPort(String name)
Gets the outport with the specified name. |
|
List<OutPort> |
getOutPorts()
Gets the outports of this compound. |
|
Parameter<?> |
getParameter(String name)
Gets the parameter with the specified name. |
|
ParameterList |
getParameterList()
Gets the parameter list of this compound. |
|
SPR |
getSPR()
Gets the parent SPR. |
|
boolean |
hasSameDataAs(Object obj)
|
|
void |
onAsyncEvent(Message msg)
Called when a compound event was received. |
|
protected void |
onFinished()
Called when the SPR in which this compound is added, is finished. |
|
void |
onInitialize()
Called when the SPR-runtime is initialized. |
|
protected void |
onSerialization()
Called when the SPR in which this compound is added, is serialized. |
|
void |
onSPRStateChanged(SPRState newState)
Called when the SPR-runtime state changes (called asynchronously). |
|
void |
onSPRStateChangedSync(SPRState newState)
Called when the SPR-runtime state changes (called synchronously). |
|
void |
setInstanceName(String instanceName)
Sets the instance name of this compound. |
|
void |
setName(String name)
Sets the name of this compound. |
|
String |
toString()
|
|
Parameter<?> |
tryGetParameter(String name)
Tries to get the parameter with the specified name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SPRComponent(String name)
name - The name of the compound.protected SPRComponent()
| Method Detail |
|---|
public final <T> Parameter<T> addParameter(String name,
T value)
T - The type of the parameter.name - The name of the parameter.value - The value of the parameter.
public final ParameterList getParameterList()
public final Parameter<?> getParameter(String name)
name - The name of the parameter. null is not allowed.
public final Parameter<?> tryGetParameter(String name)
name - The name of the parameter. null is not allowed.
public final InPort addInPort(String name)
name - The name of the inport.
public InPort addInPort(InPort port)
port - The inport to add.
public final OutPort addOutPort(String name)
name - The name of the outport.
public OutPort addOutPort(OutPort port)
port - The outport to add.
public final List<InPort> getInPorts()
public final List<OutPort> getOutPorts()
public final OutPort getOutPort(String name)
name - The name of the port. null is not allowed.
public final InPort getInPort(String name)
name - The name of the port. null is not allowed.
public void setInstanceName(String instanceName)
instanceName - The instance name for this compound.public String getInstanceName()
getInstanceName in interface ISprComponentpublic String toString()
toString in class Objectpublic final String getName()
getName in interface ISprComponentpublic final void setName(String name)
name - The name of this compound. null is not allowed.protected void onSerialization()
protected void onFinished()
public void onInitialize()
public void onAsyncEvent(Message msg)
msg - Message containing compound eventpublic void onSPRStateChanged(SPRState newState)
newState - the new SPR statepublic void onSPRStateChangedSync(SPRState newState)
newState - the new SPR statepublic abstract String getComponentType()
getComponentType in interface ISegmentpublic int getChecksum()
getChecksum in interface ISegmentpublic abstract String getComponentVersion()
getComponentVersion in interface ISegmentpublic boolean hasSameDataAs(Object obj)
hasSameDataAs in interface com.kuka.common.IDataEquatablepublic SPR getSPR()
getSPR in interface ISprComponentpublic String getExpressionSegmentString(String tag)
IExpressionSegment
getExpressionSegmentString in interface IExpressionSegmenttag - An identifier which specifies the requested value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||