X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fscl%2FSimantics%2FSimulation.scl;h=e61b161ad18b2b54186a17498379228d2a274b38;hp=4935fafcd043c547853d18984e15eab1380e272c;hb=b000e272429e157638c0384878b07b8dcd758472;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.modeling/scl/Simantics/Simulation.scl b/bundles/org.simantics.modeling/scl/Simantics/Simulation.scl index 4935fafcd..e61b161ad 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Simulation.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Simulation.scl @@ -6,10 +6,25 @@ importJava "org.simantics.simulation.experiment.ExperimentUtil" where stepExperiment :: IExperiment -> Double -> () simulateExperiment :: IExperiment -> Boolean -> () disposeExperiment :: IExperiment -> () - possibleActiveRunVariable ::Resource -> Variable + refreshExperiment :: IExperiment -> () + getExperimentState :: IExperiment -> ExperimentState + possibleActiveRunVariable ::Resource -> Maybe Variable + activateExperiment :: Resource -> Resource + createExperimentRun :: Resource -> Resource + createExperimentRunWithType :: Resource -> Resource -> Resource + activateRun :: Resource -> () + +activateExperimentAction :: Resource -> () +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 -> IExperiment experimentFromRun run = (run#iExperiment) :: IExperiment \ No newline at end of file