]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/scl/Simantics/Simulation.scl
Merge changes I78c3a258,I7bf72f04
[simantics/platform.git] / bundles / org.simantics.modeling / scl / Simantics / Simulation.scl
index 4935fafcd043c547853d18984e15eab1380e272c..e61b161ad18b2b54186a17498379228d2a274b38 100644 (file)
@@ -6,10 +6,25 @@ importJava "org.simantics.simulation.experiment.ExperimentUtil" where
     stepExperiment :: IExperiment -> Double -> <Proc> ()
     simulateExperiment :: IExperiment -> Boolean -> <Proc> ()
     disposeExperiment :: IExperiment -> <Proc> ()
-    possibleActiveRunVariable ::Resource -> <ReadGraph> Variable
+    refreshExperiment :: IExperiment -> <ReadGraph> ()
+    getExperimentState :: IExperiment -> <ReadGraph> ExperimentState
+    possibleActiveRunVariable ::Resource -> <ReadGraph> Maybe Variable
+    activateExperiment :: Resource -> <WriteGraph> Resource
+    createExperimentRun :: Resource -> <WriteGraph> Resource
+    createExperimentRunWithType :: Resource -> Resource -> <WriteGraph> Resource
+    activateRun :: Resource -> <WriteGraph> ()
+
+activateExperimentAction :: Resource -> <Proc> ()
+activateExperimentAction experiment = do
+  syncWrite (\() -> activateExperiment experiment)
+  ()
     
 importJava "org.simantics.simulation.experiment.IExperiment" where
     data IExperiment
+
+importJava "org.simantics.simulation.experiment.ExperimentState" where
+    data ExperimentState
+    INITIALIZING, RUNNING, STOPPED, DISPOSED :: ExperimentState
     
 experimentFromRun :: Variable -> <ReadGraph> IExperiment
 experimentFromRun run = (run#iExperiment) :: IExperiment
\ No newline at end of file