| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_262) on Thu Oct 29 15:52:02 GMT 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>TimeManagement (Eclipse MOSAIC Parent 20.0 API)</title> |
| <meta name="date" content="2020-10-29"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="TimeManagement (Eclipse MOSAIC Parent 20.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/TimeManagement.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/eclipse/mosaic/rti/api/RtiAmbassador.html" title="interface in org.eclipse.mosaic.rti.api"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/eclipse/mosaic/rti/api/WatchDog.html" title="interface in org.eclipse.mosaic.rti.api"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/mosaic/rti/api/TimeManagement.html" target="_top">Frames</a></li> |
| <li><a href="TimeManagement.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.eclipse.mosaic.rti.api</div> |
| <h2 title="Interface TimeManagement" class="title">Interface TimeManagement</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../org/eclipse/mosaic/rti/time/AbstractTimeManagement.html" title="class in org.eclipse.mosaic.rti.time">AbstractTimeManagement</a>, <a href="../../../../../org/eclipse/mosaic/rti/time/MultiThreadedTimeManagement.html" title="class in org.eclipse.mosaic.rti.time">MultiThreadedTimeManagement</a>, <a href="../../../../../org/eclipse/mosaic/rti/time/SequentialTimeManagement.html" title="class in org.eclipse.mosaic.rti.time">SequentialTimeManagement</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">TimeManagement</span></pre> |
| <div class="block">The time management is responsible for continuing the simulation process and |
| synchronizing participating simulators. During runtime, each simulator |
| schedules events and waits for an approval before executing the corresponding |
| simulation steps.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#finishSimulationRun-int-">finishSimulationRun</a></span>(int statusCode)</code> |
| <div class="block">The method is called once after the simulation has reached the end time.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#getEndTime--">getEndTime</a></span>()</code> |
| <div class="block">Getter for end time.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#getNextEventTimestamp--">getNextEventTimestamp</a></span>()</code> |
| <div class="block">Returns the time stamp of the next event.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#getSimulationTime--">getSimulationTime</a></span>()</code> |
| <div class="block">Getter for current simulation time.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#requestAdvanceTime-java.lang.String-long-long-byte-">requestAdvanceTime</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> federateId, |
| long time, |
| long lookahead, |
| byte priority)</code> |
| <div class="block">Stores a schedulable event representing the requested time.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#runSimulation--">runSimulation</a></span>()</code> |
| <div class="block">Runs the simulation.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#startExternalWatchDog-java.lang.String-int-">startExternalWatchDog</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> simId, |
| int port)</code> |
| <div class="block">Starts the external watchdog thread.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/eclipse/mosaic/rti/api/WatchDog.html" title="interface in org.eclipse.mosaic.rti.api">WatchDog</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#startWatchDog-java.lang.String-int-">startWatchDog</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> simId, |
| int maxIdleTime)</code> |
| <div class="block">Starts the watchdog thread.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/mosaic/rti/api/TimeManagement.html#updateWatchDog--">updateWatchDog</a></span>()</code> |
| <div class="block">Updates the watchdog thread to show that wa are still alive.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="runSimulation--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>runSimulation</h4> |
| <pre>void runSimulation() |
| throws <a href="../../../../../org/eclipse/mosaic/rti/api/InternalFederateException.html" title="class in org.eclipse.mosaic.rti.api">InternalFederateException</a>, |
| <a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></pre> |
| <div class="block">Runs the simulation. When this method is called, the runtime |
| infrastructure runs the simulation based on the joined federates. This |
| method returns after the whole simulation is finished!</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/eclipse/mosaic/rti/api/InternalFederateException.html" title="class in org.eclipse.mosaic.rti.api">InternalFederateException</a></code> - an exception inside of a joined federate occurs</dd> |
| <dd><code><a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></code> - a parameter has an invalid value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="requestAdvanceTime-java.lang.String-long-long-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>requestAdvanceTime</h4> |
| <pre>void requestAdvanceTime(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> federateId, |
| long time, |
| long lookahead, |
| byte priority) |
| throws <a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></pre> |
| <div class="block">Stores a schedulable event representing the requested time. When the event |
| is scheduled the associated federate ambassador is called by the time |
| management.<br /> |
| This method is to be called only by an <code>RtiAmbassador</code> |
| instance!</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>federateId</code> - unique string identifying the calling federate</dd> |
| <dd><code>time</code> - requested time</dd> |
| <dd><code>lookahead</code> - time after the requested time in which the calling federate |
| will not schedule any further events or send any interactions</dd> |
| <dd><code>priority</code> - priority of the event<br /> |
| only events with equal priority are scheduled in parallel |
| even if they have the same time</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></code> - an exception if a parameter has an invalid value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="finishSimulationRun-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>finishSimulationRun</h4> |
| <pre>void finishSimulationRun(int statusCode) |
| throws <a href="../../../../../org/eclipse/mosaic/rti/api/InternalFederateException.html" title="class in org.eclipse.mosaic.rti.api">InternalFederateException</a></pre> |
| <div class="block">The method is called once after the simulation has reached the end time. |
| It calls the finishSimulation method of all joined federates.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>statusCode</code> - the status code number describing the success or failure of the simulation</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/eclipse/mosaic/rti/api/InternalFederateException.html" title="class in org.eclipse.mosaic.rti.api">InternalFederateException</a></code> - an exception inside of a joined federate occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="startWatchDog-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>startWatchDog</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nonnull.html?is-external=true" title="class or interface in javax.annotation">@Nonnull</a> |
| <a href="../../../../../org/eclipse/mosaic/rti/api/WatchDog.html" title="interface in org.eclipse.mosaic.rti.api">WatchDog</a> startWatchDog(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> simId, |
| int maxIdleTime)</pre> |
| <div class="block">Starts the watchdog thread.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>simId</code> - Id of the simulation</dd> |
| <dd><code>maxIdleTime</code> - Period of idle time in seconds after which the thread reacts</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new <a href="../../../../../org/eclipse/mosaic/rti/api/WatchDog.html" title="interface in org.eclipse.mosaic.rti.api"><code>WatchDog</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="startExternalWatchDog-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>startExternalWatchDog</h4> |
| <pre>void startExternalWatchDog(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> simId, |
| int port)</pre> |
| <div class="block">Starts the external watchdog thread.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>simId</code> - Id of the simulation</dd> |
| <dd><code>port</code> - Connection port.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="updateWatchDog--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>updateWatchDog</h4> |
| <pre>void updateWatchDog()</pre> |
| <div class="block">Updates the watchdog thread to show that wa are still alive.</div> |
| </li> |
| </ul> |
| <a name="getSimulationTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSimulationTime</h4> |
| <pre>long getSimulationTime()</pre> |
| <div class="block">Getter for current simulation time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the current simulation time</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEndTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEndTime</h4> |
| <pre>long getEndTime()</pre> |
| <div class="block">Getter for end time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>end time of the running simulation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNextEventTimestamp--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getNextEventTimestamp</h4> |
| <pre>long getNextEventTimestamp() |
| throws <a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></pre> |
| <div class="block">Returns the time stamp of the next event.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>time stamp of the next event</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/eclipse/mosaic/rti/api/IllegalValueException.html" title="class in org.eclipse.mosaic.rti.api">IllegalValueException</a></code> - a parameter has an invalid value</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/TimeManagement.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/eclipse/mosaic/rti/api/RtiAmbassador.html" title="interface in org.eclipse.mosaic.rti.api"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/eclipse/mosaic/rti/api/WatchDog.html" title="interface in org.eclipse.mosaic.rti.api"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/mosaic/rti/api/TimeManagement.html" target="_top">Frames</a></li> |
| <li><a href="TimeManagement.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2020 <a href="https://www.fokus.fraunhofer.de/">Fraunhofer FOKUS</a>. All rights reserved.</small></p> |
| </body> |
| </html> |