X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.simulator%2Fsrc%2Forg%2Fsimantics%2Fsimulator%2FIDynamicExperimentLocal.java;fp=bundles%2Forg.simantics.simulator%2Fsrc%2Forg%2Fsimantics%2Fsimulator%2FIDynamicExperimentLocal.java;h=2d3002db2ffea77f2484236cd439bce074d6cfd2;hp=0000000000000000000000000000000000000000;hb=14a4f7a9d486fba5be815e511fb2a497fca4eb70;hpb=751ee12501d220832b672dd433655a4d65806fd9 diff --git a/bundles/org.simantics.simulator/src/org/simantics/simulator/IDynamicExperimentLocal.java b/bundles/org.simantics.simulator/src/org/simantics/simulator/IDynamicExperimentLocal.java new file mode 100644 index 000000000..2d3002db2 --- /dev/null +++ b/bundles/org.simantics.simulator/src/org/simantics/simulator/IDynamicExperimentLocal.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2018 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.simulator; + +import org.simantics.databoard.binding.Binding; + +public interface IDynamicExperimentLocal extends IExperimentLocal { + + /** + * Starts or stops simulation depending on the + * parameter. + */ + public void simulate(boolean enabled); + + /** + * Simulates the experiment at lest the given period of time. + * Giving 0 as parameter simulates the experiment one 'step'. + * After the duration, the simulation is stopped. + */ + public void simulateDuration(double duration); + + void setVariableValueById(String id, Object value, Binding binding); + Object getVariableValueById(String id); + + double getSimulationTime(); + +}