de.cau.cs.kieler.synccharts.sim.ptolemy
Class ExecutePtolemyModel

java.lang.Object
  extended by de.cau.cs.kieler.synccharts.sim.ptolemy.ExecutePtolemyModel

public class ExecutePtolemyModel
extends Object

The class ExecutePtolemyModel implements the PtolemyExecutor. This is the component that enables loading and executing (generated) Ptolemy models.

Rating red

Nested Class Summary
 class ExecutePtolemyModel.ModelOutput
           
 
Constructor Summary
ExecutePtolemyModel(String PtolemyModel)
          Instantiates a new ExecutePtolemyModel.
 
Method Summary
 void executionInitialize()
          Execution initialize.
 void executionStep()
          Trigger the execution to perform another step.
 void executionStop()
           
 String getActiveStates()
          Gets the currently active state as URIFragment.
 String getActiveTransitions()
          Gets the currently active state as URIFragment.
 String[] getInterfaceSignals()
           
 String[] getModelOutputAbsentSignals()
           
 String[] getModelOutputPresentSignals()
           
 boolean isSignalPresent(String signalName)
           
 void setData(JSONObject jSONObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutePtolemyModel

public ExecutePtolemyModel(String PtolemyModel)
Instantiates a new ExecutePtolemyModel.

Parameters:
PtolemyModel - the Ptolemy model to execute
Method Detail

setData

public void setData(JSONObject jSONObject)

isSignalPresent

public boolean isSignalPresent(String signalName)

getInterfaceSignals

public String[] getInterfaceSignals()

getModelOutputPresentSignals

public String[] getModelOutputPresentSignals()

getModelOutputAbsentSignals

public String[] getModelOutputAbsentSignals()

getActiveStates

public String getActiveStates()
Gets the currently active state as URIFragment.

Returns:
the current state

getActiveTransitions

public String getActiveTransitions()
Gets the currently active state as URIFragment.

Returns:
the current state

executionStep

public void executionStep()
                   throws KiemExecutionException
Trigger the execution to perform another step. This is done asynchronously meaning that the step is not immediately performed but whenever the executing thread is able to perform the next one.

If the executionStop() method is called before this step is actually performed it wont be performed!

If any KiemExecutionException was thrown in the #run() method of the thread then it is thrown in here. Note that this exception normally happened in any step performed before the current one but only now will be brought to the users or KIEM attention.

Throws:
KiemExecutionException - a KiemExecutionException

executionStop

public void executionStop()

executionInitialize

public void executionInitialize()
                         throws KiemInitializationException
Execution initialize.

Throws:
KiemInitializationException