Package ptolemy.domains.tdl.kernel
Class TDLAction
- java.lang.Object
 - 
- ptolemy.domains.tdl.kernel.TDLAction
 
 
- 
public class TDLAction extends java.lang.ObjectA TDL action. Used in the TDLActionsGraph.- Since:
 - Ptolemy II 8.0
 - Version:
 - $Id$
 - Author:
 - Patricia Derler
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTDLAction.TDLActionComparatorA class that compares two TDL actions. 
- 
Field Summary
Fields Modifier and Type Field Description intactionTypeType of TDL action.static intAFTERMODESWITCHIf a mode switch is not taken, this is the next action.static intAFTERTASKOUTPUTSThe action after a task is output.static intEXECUTETASKExecute a task.static intMODESWITCHTest a mode switch guard and execute the mode switch if the guard evaluates to true.java.lang.ObjectobjectActor the TDL action has to be performed on.static intREADINPUTRead the input of a task.static intREADSENSORRead a sensor value which is the input of a TDLModule.TimetimeTime stamp for the TDL action.static intWRITEACTUATORWrite actuator which is the output of a TDLModule.static intWRITEOUTPUTWrite output of a task. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()Return a hash code value for this action.booleansameActionAs(TDLAction action, Time modePeriod)Return true if two actions are the same.java.lang.StringtoString() 
 - 
 
- 
- 
Field Detail
- 
WRITEOUTPUT
public static final int WRITEOUTPUT
Write output of a task.- See Also:
 - Constant Field Values
 
 
- 
WRITEACTUATOR
public static final int WRITEACTUATOR
Write actuator which is the output of a TDLModule.- See Also:
 - Constant Field Values
 
 
- 
MODESWITCH
public static final int MODESWITCH
Test a mode switch guard and execute the mode switch if the guard evaluates to true.- See Also:
 - Constant Field Values
 
 
- 
AFTERMODESWITCH
public static final int AFTERMODESWITCH
If a mode switch is not taken, this is the next action. It does not do anything but is required for the TDL ActionsGraph.- See Also:
 - Constant Field Values
 
 
- 
READSENSOR
public static final int READSENSOR
Read a sensor value which is the input of a TDLModule.- See Also:
 - Constant Field Values
 
 
- 
READINPUT
public static final int READINPUT
Read the input of a task.- See Also:
 - Constant Field Values
 
 
- 
EXECUTETASK
public static final int EXECUTETASK
Execute a task.- See Also:
 - Constant Field Values
 
 
- 
AFTERTASKOUTPUTS
public static final int AFTERTASKOUTPUTS
The action after a task is output.- See Also:
 - Constant Field Values
 
 
- 
time
public Time time
Time stamp for the TDL action. 
- 
actionType
public int actionType
Type of TDL action. This is one of the constants defined above. 
- 
object
public java.lang.Object object
Actor the TDL action has to be performed on. 
 - 
 
- 
Constructor Detail
- 
TDLAction
public TDLAction(Time time, int actionType, java.lang.Object actor)
Create a new TDLGraphNode.- Parameters:
 time- Time stamp the TDL action has to be done at.actionType- Type of TDL action.actor- Actor on which the TDL action has to be performed on.
 
 - 
 
- 
Method Detail
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
Return a hash code value for this action.- Overrides:
 hashCodein classjava.lang.Object- Returns:
 - A hash code value for this token.
 
 
- 
sameActionAs
public boolean sameActionAs(TDLAction action, Time modePeriod)
Return true if two actions are the same.- Parameters:
 action- The action to compare against this actionmodePeriod- The mode period.- Returns:
 - true if the times are equal (==), the TDL actions are equal (==) and the action times are equal (==).
 
 
 - 
 
 -