|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
de.cau.cs.kieler.synccharts.sim.ptolemy.SyncchartsSimDataComponent
public class SyncchartsSimDataComponent
The class SimpleRailCtrl DataComponent implements a KIELER Execution Manager DataComponent.
Within its initialize()
method it performs the model2model Xtend transformation to
create a semantically equivalent but executable Ptolemy model out of the SimpleRailCtrl EMF model
instance. It also loads the Ptolemy model within a PtolemyExecutor and adapts the port and host
for connecting to the model railway simulation engine.
Within its step(JSONObject)
method it then triggers a step of the PtolemyExecutor.
Because this is done asynchronously the triggering of a consecutive step may lead to an
KiemExecutionError be thrown that was initially the consequence of the last (async) call to the
step method of the PtolemyExecutor.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent |
---|
MASTER_CMD_MACROSTEP, MASTER_CMD_PAUSE, MASTER_CMD_RUN, MASTER_CMD_STEP, MASTER_CMD_STEPBACK, MASTER_CMD_STOP |
Constructor Summary | |
---|---|
SyncchartsSimDataComponent()
Instantiates a new SimpleRailCtrl DataComponent for the KIELER Execution Manager. |
Method Summary | |
---|---|
void |
bringProblemsViewToFront()
|
void |
checkProperties(KiemProperty[] properties)
This method is intended to check if the properties are set correctly. |
void |
initialize()
Initialize. |
boolean |
isObserver()
To check whether the DataComponent is an observer. |
boolean |
isProducer()
To check whether the DataComponent is a producer. |
void |
loadAndExecuteModel()
|
IStatus |
Model2ModelTransformation(KielerProgressMonitor monitor)
Transform KIELER SimpleRailCtrl model into a semantically equivalent Ptolemy model. |
JSONObject |
provideInitialVariables()
Provide (local) interface variables and possible initial values. |
KiemProperty[] |
provideProperties()
Provide properties for this component. |
URL |
resolveBundelFile(String relativePath)
|
JSONObject |
step(JSONObject jSONObject)
Step method for a DataObserver and a DataPrroducer. |
void |
wrapup()
Wrap-up. |
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent |
---|
getInitialVariables, provideFilterKeysJSON, setInitialVariables |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SyncchartsSimDataComponent()
Method Detail |
---|
public IStatus Model2ModelTransformation(KielerProgressMonitor monitor) throws KiemInitializationException
progressBar
- if true a progress bar is displayed
KiemInitializationException
- the kiem initialization exceptionpublic JSONObject step(JSONObject jSONObject) throws KiemExecutionException
IJSONObjectDataComponent
KiemExecutionException
that is then catched by the execution manager an brought to
the user's attention.
jSONObject
- the concrete JSONObject of input data (if observer)
KiemExecutionException
- a KiemExecutionExceptionpublic JSONObject provideInitialVariables() throws KiemInitializationException
JSONObjectDataComponent
JSONObjectDataComponent.getInitialVariables()
method.
provideInitialVariables
in class JSONObjectDataComponent
KiemInitializationException
- if a property prevents the execution of this DataComponent this error should be
thrownpublic URL resolveBundelFile(String relativePath)
public void loadAndExecuteModel() throws KiemInitializationException
KiemInitializationException
public void initialize() throws KiemInitializationException
IDataComponent
KiemInitializationException
.
KiemInitializationException
- a KiemInitializationExceptionpublic void bringProblemsViewToFront()
public boolean isObserver()
IDataComponent
public boolean isProducer()
IDataComponent
public void wrapup()
IDataComponent
KiemInitializationException
.
public KiemProperty[] provideProperties()
AbstractDataComponent
provideProperties
in class AbstractDataComponent
public void checkProperties(KiemProperty[] properties) throws KiemPropertyException
AbstractDataComponent
checkProperties
in class AbstractDataComponent
properties
- the properties with the current user settings
KiemPropertyException
- if a property prevents the execution of this DataComponent this error should be
thrown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |