You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(60) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(7) |
Feb
(23) |
Mar
(1) |
Apr
(12) |
May
|
Jun
(12) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jsa...@us...> - 2008-11-13 15:54:55
|
Revision: 97 http://flexotask.svn.sourceforge.net/flexotask/?rev=97&view=rev Author: jsauerbach Date: 2008-11-13 15:54:52 +0000 (Thu, 13 Nov 2008) Log Message: ----------- Fix bug in tooltip display for connection modes. Modified Paths: -------------- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java 2008-11-12 21:46:22 UTC (rev 96) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/Connection.java 2008-11-13 15:54:52 UTC (rev 97) @@ -101,8 +101,8 @@ /** The name of the class that is this connection's type */ private String type = ""; - /** The name of this connection's mode */ - private Integer mode = FlexotaskConnectionMode.DEEPCLONE.asIndex(); + /** The mode of this connection */ + private FlexotaskConnectionMode mode = FlexotaskConnectionMode.DEEPCLONE; /** * Create a connection between two tasks @@ -199,7 +199,7 @@ case ID: return getName(); case MODE: - return mode; + return mode.asIndex(); default: return null; } @@ -316,13 +316,8 @@ } labels.add(typeLabel); Label modeLabel = new Label(); - if (type.length() == 0) { - modeLabel.setIcon(WARNING_IMAGE); - modeLabel.setText("Missing mode information"); - } else { - modeLabel.setIcon(OK_IMAGE); - modeLabel.setText("Mode=" + mode); - } + modeLabel.setIcon(OK_IMAGE); + modeLabel.setText("Mode=" + mode); labels.add(modeLabel); if (source instanceof NormalTask) { StringBuilder sb = new StringBuilder("SourcePort=" + getSourcePortName()); @@ -351,7 +346,7 @@ * Get the mode of this connection * @return the mode */ - public Integer getMode() + public FlexotaskConnectionMode getMode() { return mode; } @@ -492,7 +487,7 @@ setType(""); return; case MODE: - setMode(FlexotaskConnectionMode.DEEPCLONE.asIndex()); + setMode(FlexotaskConnectionMode.DEEPCLONE); return; case ID: setName(null); @@ -632,7 +627,7 @@ setType(value == null ? null : value.toString()); break; case MODE: - setMode((Integer) value); + setMode(FlexotaskConnectionMode.getConnectionMode((Integer) value)); break; case ID: setName(value == null ? null : value.toString()); @@ -682,7 +677,7 @@ * Set the model of this connection * @param model the mode to set */ - public void setMode(Integer mode) + public void setMode(FlexotaskConnectionMode mode) { this.mode = mode; computeToolTipAndColor(); @@ -715,7 +710,7 @@ builder.append("' target='").append(target.getName()); builder.append("' targetPort='").append(targetPortName); builder.append("' targetPortBuffering='").append(targetPortBuffering); - builder.append("' mode='").append(FlexotaskConnectionMode.getConnectionMode(mode)); + builder.append("' mode='").append(mode); builder.append("' type='").append(type).append("'>"); addTimingData(builder, newline); builder.append(newline).append("</Connection>"); Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java 2008-11-12 21:46:22 UTC (rev 96) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java 2008-11-13 15:54:52 UTC (rev 97) @@ -52,7 +52,6 @@ import com.ibm.realtime.flexotask.editor.dialogs.ClassListPropertyDescriptor; import com.ibm.realtime.flexotask.editor.dialogs.ClassListCellEditor.ClassList; import com.ibm.realtime.flexotask.template.FlexotaskCommunicatorTemplate; -import com.ibm.realtime.flexotask.template.FlexotaskConnectionMode; import com.ibm.realtime.flexotask.template.FlexotaskConnectionTemplate; import com.ibm.realtime.flexotask.template.FlexotaskPredicateTemplate; import com.ibm.realtime.flexotask.template.FlexotaskStableMode; @@ -255,7 +254,7 @@ conn.setTargetPortName(eTarget.getInputPortNames()[eConn.getInputPortToWrite()]); conn.setTargetPortBuffering(eTarget.getInputPortBuffering()[eConn.getInputPortToWrite()]); conn.setType(eSource.getOutputPortTypes()[eConn.getOutputPortToRead()]); - conn.setMode(eConn.getConnectionMode().asIndex()); + conn.setMode(eConn.getConnectionMode()); setTimingData(conn, eConn.getTimingData()); } loaded(); @@ -574,7 +573,7 @@ return new FlexotaskConnectionTemplate(conn.getName(), getTimingData(conn), sourceEnds.get(conn), conn.getSourceIndex(), targetEnds.get(conn), conn.getTargetIndex(), - FlexotaskConnectionMode.getConnectionMode(conn.getMode())); + conn.getMode()); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 21:46:27
|
Revision: 96 http://flexotask.svn.sourceforge.net/flexotask/?rev=96&view=rev Author: jsauerbach Date: 2008-11-12 21:46:22 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Ignore some working files while documentation is being developed Property Changed: ---------------- trunk/flexotask/doc/ Property changes on: trunk/flexotask/doc ___________________________________________________________________ Modified: svn:ignore - com resources package-list *.css allclasses-frame.html allclasses-noframe.html constant-values.html help-doc.html index.html overview-frame.html overview-summary.html serialized-form.html + com resources package-list *.css allclasses-frame.html allclasses-noframe.html constant-values.html help-doc.html index.html overview-frame.html overview-summary.html serialized-form.html exotaskProgramming.txt screenshots.htm This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 21:44:33
|
Revision: 95 http://flexotask.svn.sourceforge.net/flexotask/?rev=95&view=rev Author: jsauerbach Date: 2008-11-12 21:44:28 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Fix flaw in method for determining that a project already has a flexotask classpath. It was always concluding 'yes' before. Modified Paths: -------------- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/ConvertToFlexotaskProject.java Modified: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/ConvertToFlexotaskProject.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/ConvertToFlexotaskProject.java 2008-11-12 21:43:22 UTC (rev 94) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/ConvertToFlexotaskProject.java 2008-11-12 21:44:28 UTC (rev 95) @@ -21,13 +21,15 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.jdt.core.IClasspathContainer; +import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; @@ -102,8 +104,7 @@ } } IJavaProject javaProject = JavaCore.create(project); - IClasspathContainer classpathContainer = JavaCore.getClasspathContainer(FlexotaskClasspathInitializer.CONTAINER_PATH, javaProject); - boolean haveLibraries = classpathContainer != null; /* Indicates that the project has the Flexotask libraries in its classpath */ + boolean haveLibraries = hasFlexotaskClasspath(javaProject); IFolder generated = project.getFolder("generated"); /* Present information to the user if some or all of the actions are unnecessary and get permission @@ -134,6 +135,26 @@ } /** + * Method to test whether a project already has a Flexotask classpath container + * @param project the IJavaProject to test + * @return true iff the Flexotask classpath container is configured + * @throws JavaModelException + */ + private boolean hasFlexotaskClasspath(IJavaProject project) throws JavaModelException { + IClasspathEntry[] entries = project.getRawClasspath(); + for (int i = 0; i < entries.length; i++) { + IClasspathEntry entry = entries[i]; + if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { + IPath containerPath = entry.getPath(); + if (containerPath.segmentCount() == 2 && FlexotaskClasspathInitializer.CONTAINER_ID.equals(containerPath.segment(0))) { + return true; + } + } + } + return false; + } + + /** * Interact with the user depending on the current state of the project. If the project is already fully converted, just inform the user * of that fact and do nothing. * @param haveNature true iff the project already has the FlexotaskNature This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 21:43:27
|
Revision: 94 http://flexotask.svn.sourceforge.net/flexotask/?rev=94&view=rev Author: jsauerbach Date: 2008-11-12 21:43:22 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Further progress on documentation. Modified Paths: -------------- trunk/flexotask/doc/flexotaskProgramming.html Added Paths: ----------- trunk/flexotask/doc/initialProperties.jpg Modified: trunk/flexotask/doc/flexotaskProgramming.html =================================================================== --- trunk/flexotask/doc/flexotaskProgramming.html 2008-11-12 19:40:34 UTC (rev 93) +++ trunk/flexotask/doc/flexotaskProgramming.html 2008-11-12 21:43:22 UTC (rev 94) @@ -17,7 +17,7 @@ distributers, and instrumentation for Flexible Task Graphs), <em>core development</em> (contributing to the evolution of the Flexible Task Graphs programming model and its supporting code), and <em>tool -developement </em> (creating new tools to generate Flexible Task +development </em> (creating new tools to generate Flexible Task Graph templates). <p>The following outline will help you find relevant information. @@ -34,6 +34,7 @@ </ul> <li><a href="#application">Notes for Application Programmers</a> <ul> +<li><a href="#creating"></a>Creating and Converting Flexotask Projects</a> <li><a href="#simReal">Simulated and real-time execution modes</a> <ul> <li><a href="#obtainingJ9Bridge">Obtaining the Runtime to use with IBM WebSphere Real Time</a> @@ -43,12 +44,13 @@ <li><a href="#templates">Constructing Templates</a> <ul> <li><a href="#templateAPI">The Template API</a> +<li><a href="#editor">The Flexotask Editor</a> </ul> <li><a href="#tasks">Writing Flexotasks</a> </ul> </ul> -<br><hr><br><h2><a name="post-install"></a>Post-Install Testing</h2> +<br><hr><h2><a name="post-install"></a>Post-Install Testing</h2> <p>Everyone should perform this step to ensure that Flexible Task Graphs have been correctly installed. @@ -76,7 +78,7 @@ that the <b>JUnit</b> view eventually shows (after about a minute) that all tests ran successfully. -<br><hr><br><h2><a name="papers"></a>Relevant papers</h2> +<br><hr><h2><a name="papers"></a>Relevant papers</h2> <p>The Flexible Task Graph systems is described in a paper in LCTES 2008, and the four programming models that it consolidates are each @@ -104,7 +106,7 @@ R. Guerraoui, J. Vitek, published in OOPSLA 2007 </ul> -<br><hr><br><h2><a name="samples"></a>The Samples</h2> +<br><hr><h2><a name="samples"></a>The Samples</h2> <p>The <b>flexotask-functiontest</b> project will run as a JUnit test for quick verification after system changes, but it is deliberately @@ -113,7 +115,7 @@ occupies a package. The procedure for creating this project is described under <a href="#post-install">post-install testing</a>. -<br><hr><br><h3><a name="pendulum"></a>The Inverted Pendulum example from the +<br><hr><h3><a name="pendulum"></a>The Inverted Pendulum example from the LCTES 2007 Exotasks Paper</h3> <p>The package for this example is called <b>lctes2007</b> The example @@ -177,7 +179,7 @@ Flexotask editor to complete the example. This limitation may be removed soon if someone wants to work on eliminating it. -<br><hr><br><h3><a name="modes"></a>A Multiple Mode Example also illustrating +<br><hr><h3><a name="modes"></a>A Multiple Mode Example also illustrating Simple Parameters</h3> <p>The <b>modes</b> example illustrates the more advanced of the two @@ -214,7 +216,7 @@ class) but they use the parameter as an <b>Integer</b> comparand to cause the two predicates to perform different tests. -<br><hr><br><h3><a name="communicating"></a>A Weakly Isolated Task Graph +<br><hr><h3><a name="communicating"></a>A Weakly Isolated Task Graph (Communicating Parameters)</h3> <p>The <b>communicating</b> example is an example of how a Flexible @@ -242,7 +244,7 @@ href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html">FlexotaskXMLParser</a> class programmatically. -<br><hr><br><h3><a name="types"></a>An Example for Experimenting with allowed Data Types</h3> +<br><hr><h3><a name="types"></a>An Example for Experimenting with allowed Data Types</h3> <p>The <b>types</b> example illustrates that both <b>ArrayList</b> and <b>HashMap</b> are acceptable types to be passed between Flexotasks @@ -260,7 +262,7 @@ <b>Main</b> class of this example constructs the graph directly and then validates it. The editor and XML parser were not used anywhere in the development cycle. -<br><hr><br><h3><a name="highfreq"></a>The High Frequency Reader Example from the LCTES 2008 Paper</h3> +<br><hr><h3><a name="highfreq"></a>The High Frequency Reader Example from the LCTES 2008 Paper</h3> <p>The <b>highfreqread</b> example closely resembles the code used to collect the data for Section 5.1 of our Flexible Task Graphs paper @@ -292,13 +294,90 @@ running in the same virtual machine with the task graph. </ul> -<br><hr><br><h2><a name="application"></a>Notes for Application Programmers</h2> +<br><hr><h2><a name="application"></a>Notes for Application Programmers</h2> <p>This section provides information that is of use for writing and testing actual Flexotask applications. -<br><hr><br><h3><a name="simReal"></a>Simulated and real-time execution modes</h3> +<br><hr><h3><a name="creating"></a>Creating and Converting Flexotask Projects</h3> +<p>Flexotask development requires Eclipse projects that are configured +with a special builder, a special classpath container, and an extra +binary folder. Immediately after installation you should have created +an example project (<b>flexotask-functiontest</b>) which has these +characteristics, but that project was created as a special case by the +Flexotask development-time support. This section deals with the more +general task of creating Flexotask-enabled projects for doing your own +work. + +<p>To make a simple Java project (not a PDE project) that is +Flexotask-enabled, choose <b>File→New→Project</b>. Under +the <b>Flexotask</b> category, select <b>Flexotask Project</b>. The +rest of the project creation dialog is exactly like creating any Java +project. The resulting project will have these special +characteristics. + +<ol> +<li>You will see a <b>Flexotask Libraries</b> entry immediately under +your <b>JRE System Library</b> entry in the Package Explorer's view of +the project (you might not see this if you have <b>Libraries from +External</b> filtered out of your Package Explorer view). If you open +the <b>Flexotask Libraries</b> entry you will see that it contains (at +least) <b>flexotask.jar</b>, <b>realtimeAnalysis.jar</b>, and +<b>bcel-5.2.jar</b>. If the project is at the 1.5 language compliance +level or higher, then you will also see an entry for +<b>flexotaskGeneric.jar</b>. This provides versions of some API +classes that support Java generics. In order to support running on +older VMs for some embedded systems, the Flexotask development +environment will work when the language compliance level is set below +1.5 and will generate code for older VMs. In that case, the +<b>flexotaskGeneric.jar</b> is omitted and you will not be able to use +Java generics in conjunction with the Flexotask API. As far as the +Flexotask support is concerned, you can change the compliance level at +any time. + +<li>You will see an extra folder <b>generated</b> which will remain +empty unless and until you write one or more classes that inherit from +<a +href="com/ibm/realtime/flexotask/AtomicFlexotask.html">AtomicFlexotask</a>. +If the <b>generated</b> folder becomes non-empty, you will need to +bear this in mind when exporting a <b>jar</b> file from your project +to run on another machine. Classes from the <b>generated</b> binary +folder must take precedence over classes in the normal <b>bin</b> +folder. One way to build a correct jar file is shown in the Ant +script <b>export.xml</b> in the <b>flexotask-functiontest</b> project. + +<li>The project has an additional builder that will check your +Flexotasks for correctness during development and will rewrite any +<b>AtomicFlexotask</b> classes into the <b>generated</b> directory. +At present, this builder writes to the console, so you may have noticed +its presence when it issued messages like the following: +<pre> +Running Flexotask Builder ... + +No Flexotasks found in project. + +Completed checking of Flexotask code in 0.0 seconds. +Validation time: 0 Rewriting time: 0 +</pre> +</ol> + +<p>Once you have a Flexotask project, you can add PDE support, if +needed, by right-clicking on the project in the Package Explorer then +selecting <b>PDE Tools→Convert Projects to Plugin Projects</b>. + +<p>You can also add Flexotask support to any non-Flexotask Java +project (including a PDE project) by right-clicking on the project in +the Package Explorer then selecting <b>Convert to Flexotask +Project</b>. + +<p>The Flexotask Graphical Editor is meant to be used in conjunction +with Flexotask-enabled projects but technically it becomes bound to +any file with the suffix <b>.ftg</b> whether that file is in a +Flexotask project or not. + +<br><hr><h3><a name="simReal"></a>Simulated and real-time execution modes</h3> + <p>When you test a Flexotask program under Eclipse, you are running in "simulated" mode. That is, <ul> @@ -370,7 +449,7 @@ <a href="#testingRuntime">below</a> which also provides general information about running programs in the real-time execution mode. -<br><hr><br><h4><a name="obtainingJ9Bridge"></a>Obtaining the Runtime to +<br><hr><h4><a name="obtainingJ9Bridge"></a>Obtaining the Runtime to Use with IBM WebSphere Real Time</h4> <p>This procedure is only necessary if you installed Flexible Task @@ -381,7 +460,7 @@ <p>Use the Eclipse Update Manager to obtain the support. The procedure differs somewhat between Eclipse 3.3.x and Eclipse 3.4.x. -<br><hr><br><h5>Obtaining the IBM Runtime using Eclipse 3.3.x</h5> +<br><hr><h5>Obtaining the IBM Runtime using Eclipse 3.3.x</h5> <p><p>Select <b>Help→Software Updates→Find And Install</b>, then select <b>Search For New Features to Install</b> and @@ -391,7 +470,7 @@ <b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and select it. Complete the dialog to install the feature. -<br><hr><br><h5>Obtaining the IBM Runtime using Eclipse 3.4.x</h5> +<br><hr><h5>Obtaining the IBM Runtime using Eclipse 3.4.x</h5> <p><p>Select <b>Help→Software Updates</b>, then select the <b>Available Software</b> tab. If you don't see the update site @@ -402,7 +481,7 @@ <b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and select it. Complete the dialog to install the feature. -<br><hr><br><h4><a name="obtainingWRT"></a>Obtaining The IBM WebSphere Real Time VM Itself</h4> +<br><hr><h4><a name="obtainingWRT"></a>Obtaining The IBM WebSphere Real Time VM Itself</h4> <p>You can download copies of the IBM WebSphere Real Time VM from <a href="http://www.ibm.com/developerworks/java/jdk/linux/download.html">IBM @@ -428,7 +507,7 @@ will work if they have the real-time capabilities (the suffix -rt indicates this). -<br><hr><br><h4><a name="testingRuntime"></a>Testing and Using the Real-Time Runtime</h4> +<br><hr><h4><a name="testingRuntime"></a>Testing and Using the Real-Time Runtime</h4> <p>The <b>flexotask-functiontest</b> project provides a script for packaging itself as a <b>jar</b> file so that you can repeat the same @@ -467,7 +546,7 @@ <p>This example should be readily extended to running your own programs. -<br><hr><br><h3><a name="templates"></a>Constructing Templates</h3> +<br><hr><h3><a name="templates"></a>Constructing Templates</h3> <p>A Flexible Task Graph starts out its life as a <em>template</em> which is then validated and instantiated by the system. The template @@ -514,7 +593,7 @@ the target system has an XML parser. </ol> -<br><hr><br><h4><a name="templateAPI"></a>The Template API</h4> +<br><hr><h4><a name="templateAPI"></a>The Template API</h4> <p>For fast reference to subsections, use this outline. <ul> @@ -524,21 +603,25 @@ <li><a href="#templatePredicates">Adding Predicates to a Template</a> <li><a href="#templateCommunicators">Adding Communicators to a Template</a> <li><a href="#templateConnections">Adding Connections to a Template</a> +<li><a href="#templateStable">Adding Stable Classes to the Template</a> </ul> <p>To begin the construction of a template, use <b>new FlexotaskTemplate()</b>. From this starting point, you add global -properties, tasks, and connections. Tasks include normal tasks, +properties, tasks, connections, and stable classes. Tasks include normal tasks, predicates, and communicators. -<br><hr><br><h5><a name="templateGlobal"></a>Template Global Properties</h5> +<br><hr><h5><a name="templateGlobal"></a>Template Global Properties</h5> <p>Methods that manipulate global properties include <ul> <li><b>setAllocating</b> to establish whether tasks of the graph are allowed to allocate (default is <b>true</b>) -<li><b>setStableMode</b> to establish how storage in the task's private memory area is to be partitioned -into stable and transient areas (default is to make all storage stable, as in the Exotasks model) +<li><b>setStableMode</b> to establish how storage in the task's +private memory area is to be partitioned into stable and transient +areas (default is to make all storage stable, as in the Exotasks +model). This property, and the related list of stable classes in the +template, is discussed <a href="#templateStable">later</a>. <li><b>setSynchronizing</b> to establish whether tasks of the graph are allowed to use Java synchronized methods and blocks (default is @@ -584,7 +667,7 @@ Daniel Iercan at the University of Salzburg, which is in the process of being converted into a Flexotask timing grammar. -<br><hr><br><h5><a name="templateTasks"></a>Adding Tasks to a Template</h5> +<br><hr><h5><a name="templateTasks"></a>Adding Tasks to a Template</h5> <p>Most generally, tasks may be "normal" tasks, predicates or communicators. This section describes how to add normal tasks. @@ -652,7 +735,7 @@ using <b>new SimpleTimingAnnotation(offset)</b> but the javadoc describes some more advanced options. -<br><hr><br><h5><a name="templatePorts"></a>Adding Ports to a Task</h5> +<br><hr><h5><a name="templatePorts"></a>Adding Ports to a Task</h5> <p>The least error-prone way to specify ports programmatically is as follows. @@ -681,7 +764,7 @@ These can be used when the number of ports is small and most port names and buffering attributes are defaulted. -<br><hr><br><h5><a name="templatePredicates"></a>Adding Predicates to a Template</h5> +<br><hr><h5><a name="templatePredicates"></a>Adding Predicates to a Template</h5> <p>To add a predicate task, first create a default, empty, <a href="com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.html">FlexotaskPredicateTemplate</a> @@ -705,7 +788,7 @@ annotation so that the predicate can assume its expect role in controlling mode switches. -<br><hr><br><h5><a name="templateCommunicators"></a>Adding Communicators to a Template</h5> +<br><hr><h5><a name="templateCommunicators"></a>Adding Communicators to a Template</h5> <p>To add a communicator task, first create a default, empty, <a href="com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.html">FlexotaskCommunicatorTemplate</a> @@ -727,7 +810,7 @@ a fixed implementation provided by the system. It is always weakly isolated and that property cannot be changed. -<br><hr><br><h5><a name="templateConnections"></a>Adding Connections to a Template</h5> +<br><hr><h5><a name="templateConnections"></a>Adding Connections to a Template</h5> <p>To add a connection, first create a default, empty, <a href="com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.html">FlexotaskConnectionTemplate</a> @@ -775,7 +858,82 @@ basis as tasks. </ul> -<br><hr><br><h3><a name="tasks"></a>Writing Flexotasks</h3> +<br><hr><h5><a name="templateStable"></a>Adding Stable Classes to the Template</h5> +<p>In the Flexible Task Graphs model, newly allocated objects are +assigned to stable or transient storage within the Flexotask private +memory area based on their classes (see Section 2.2 of the LCTES 2008 +paper). This assignment is done either implicitly or explicitly, and +there are both two different implicit mechanisms and two different +explicit mechanisms. + +<p>Note that if you do not call the <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#setStableMode(com.ibm.realtime.flexotask.template.FlexotaskStableMode)">setStableMode</a> +function on the template or if you set the stable mode to <a +href="com/ibm/realtime/flexotask/template/FlexotaskStableMode.html#DEFAULT">FlexotaskStableMode.DEFAULT</a>, +then all classes are implicitly stable. This means that you are +relying on scheduled garbage collection of the Flexotask private heaps +to ensure that you don't run out of memory (or else your Flexotasks +don't allocate anything). When there is a reasonable amount of slack +in your real-time schedule, this works fine (as in the Exotask model). +But, when there is little slack, the scheduled garbage collections +might not be able to keep up unless you also take steps to limit the +stable allocation rate by choosing one of the other options. + +<p>If you set the stable mode to <a +href="com/ibm/realtime/flexotask/template/FlexotaskStableMode.html#INFER">FlexotaskStableMode.INFER</a>, +then the system will infer the smallest safe set of stable classes and +mark other classes as transient. While this result is sometimes +optimal and often good, it has the disadvantage of hiding what is +going on. It is difficult to know exactly what the storage +utilization of your program really is and whether you will therefore +run out of resources on some pathological execution. + +<p>The remaining two options are <em>explicit</em> in that you declare +exactly what classes you intend to be stable. For Flexotask programs +that are written largely from scratch we provide <a +href="com/ibm/realtime/flexotask/template/FlexotaskStableMode.html#MARKER">FlexotaskStableMode.MARKER</a>, +which requires that all stable classes must (directly or indirectly) +implement the marker interface <a +href="com/ibm/realtime/flexotask/Stable.html">Stable</a>. The +validator will then check that no stable class has transient data +members. + +<p>For Flexotask programs that use existing classes, where those +classes must be designated as stable but you do not wish to make all +classes stable, we permit the stable classes to be listed explicitly +in the template. Set the stable mode to <a +href="com/ibm/realtime/flexotask/template/FlexotaskStableMode.html#MANUAL">FlexotaskStableMode.MANUAL</a>. +Then, add the names of all stable classes to the <b>Set</b> obtained +by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#getStableClasses()">getStableClasses()</a> +on the template. In a Java 1.5 (or later) project, +<b>getStableClasses()</b> returns a <b>Set<String></b> instead +of a raw <b>Set</b>. + +<br><hr><h4><a name="editor"></a>The Flexotask Editor</h4> + +<p>To use the Flexotask Editor, just create a file with the extension +<b>.ftg</b> (for example, using <b>File→New→File</b>). +The editor become the default editor for that file and will help you +create an XML-format Flexotask template stored in that file. In +choosing the folder to contain the <b>.ftg</b> file, bear in mind your +intended use. If you plan to parse the file directly using the <a +href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html#parseStream(java.io.InputStream)">parseStream</a> method of <b>FlexotaskXMLParser</b>, it is +useful to put it in the same package folder as the class that will use +it (examples of this design pattern can be found in +<b>communicating.Main</b> in the <b>flexotask-functiontest</b> +project). + +<p>When the editor first comes up has a blank canvas, a gear-like icon +on the tab, and a flyout palette at the upper right. A Properties +view is created if you don't already have one, and it is unburied if +you do have one. You use this Properties view to augment information +in the editor's graphical view. The initial properties view will look +something like this. +<p><img width=377 height=134 src="initialProperties.jpg"/> + +<br><hr><h3><a name="tasks"></a>Writing Flexotasks</h3> + </body> </html> Added: trunk/flexotask/doc/initialProperties.jpg =================================================================== (Binary files differ) Property changes on: trunk/flexotask/doc/initialProperties.jpg ___________________________________________________________________ Added: svn:mime-type + image/jpeg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 19:40:37
|
Revision: 93 http://flexotask.svn.sourceforge.net/flexotask/?rev=93&view=rev Author: jsauerbach Date: 2008-11-12 19:40:34 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Respond immediately when the compliance level of the project changes by adding or removing the generic library from the classpath container Modified Paths: -------------- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/FlexotaskClasspathInitializer.java Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/FlexotaskClasspathInitializer.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/FlexotaskClasspathInitializer.java 2008-11-12 17:01:21 UTC (rev 92) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/FlexotaskClasspathInitializer.java 2008-11-12 19:40:34 UTC (rev 93) @@ -20,16 +20,24 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ProjectScope; +import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; import org.eclipse.jdt.core.ClasspathContainerInitializer; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.pde.core.plugin.IPluginBase; import org.eclipse.pde.core.plugin.IPluginElement; import org.eclipse.pde.core.plugin.IPluginExtension; @@ -38,6 +46,9 @@ import org.eclipse.pde.core.plugin.IPluginObject; import org.eclipse.pde.core.plugin.ISharedPluginModel; import org.eclipse.pde.core.plugin.PluginRegistry; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; import org.osgi.framework.Bundle; import org.osgi.framework.Version; @@ -48,7 +59,7 @@ /** The id of this container */ public static final String CONTAINER_ID= "com.ibm.realtime.flexotask.editor.classpath"; - /** The two-segment path used to designate this container in some contexts */ + /** The two-segment path used to designate this container in some contexts */ public final static IPath CONTAINER_PATH = new Path(CONTAINER_ID).append("1.0"); /** The id of the realtime analysis plugin and hence its bundle */ @@ -59,18 +70,23 @@ /** The id of the flexotask generic plugin and hence its bundle */ public final static String FLEXOTASK_GENERIC_PLUGIN = "com.ibm.realtime.flexotask.generic"; - + /** File that is used as the debugging assistance file (built by all flexotask projects that may be put in a classpath container) */ public static final String DEBUG_FILE = "debug.zip"; + /** The preference key that indicates the Java compliance level */ + private final static String COMPLIANCE_KEY = "org.eclipse.jdt.core.compiler.compliance"; + /** Special flag to allow the mechanism for running under a debugger itself to be debugged */ private static final boolean DEBUG_DEBUGGING = Boolean.valueOf(System.getProperty("FLEXOTASK_DEBUG_DEBUGGING")); - private static final String SOURCE_EXTENSION_POINT = "org.eclipse.pde.core.source"; + /** The extension point for adding sources to the PDE */ + private static final String SOURCE_EXTENSION_POINT = "org.eclipse.pde.core.source"; + /** The set of source paths provided by the PDE */ private static IPath[] sourcePaths; - /** + /** * A 0-argument constructor is required */ public FlexotaskClasspathInitializer() {} @@ -83,8 +99,21 @@ !CONTAINER_ID.equals(containerPath.segment(0))) { return; } - List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>(); - String compliance = project.getOption("org.eclipse.jdt.core.compiler.compliance", true); + reInitialize(containerPath, project); + IEclipsePreferences preferences = new ProjectScope(project.getProject()).getNode(JavaCore.PLUGIN_ID); + preferences.addPreferenceChangeListener(new ComplianceChangeListener(containerPath, project)); + } + + /** + * Working subroutine of initialize(), also called when the compliance preference of the project changes + * @param containerPath the container path to use + * @param project the JavaProject to use + * @throws CoreException if anything goes wrong + */ + private void reInitialize(IPath containerPath, IJavaProject project) throws CoreException + { + List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>(); + String compliance = project.getOption(COMPLIANCE_KEY, true); if (compliance.compareTo("1.4") > 0) { addPluginClasspath(entryList, FLEXOTASK_GENERIC_PLUGIN); } @@ -95,7 +124,7 @@ IClasspathContainer container = new FlexotaskClasspath(entries, containerPath); JavaCore.setClasspathContainer(containerPath, new IJavaProject[]{project}, new IClasspathContainer[]{container}, null); - } + } /** * Utility to add a plugin's contribution to an accumulating classpath @@ -191,8 +220,8 @@ } return null; } - - /** + + /** * Convert a source archive name to a full relative path using Eclipse conventions for source plugins. * This closely resembles a similar function in the PDE that is not accessible from outside the PDE * implementation. @@ -216,7 +245,7 @@ return null; } } - + /** * Compute all the paths to places that might have source. This code is based on similar code in the * PDE that is not accessible from outside. It is not actually as complete since it does not take into @@ -253,4 +282,54 @@ } return sourcePaths; } + + /** + * A PreferenceChangeListener to notice when the compliance level of a project changes + */ + private final class ComplianceChangeListener implements IPreferenceChangeListener + { + /** The container path to use for reinitialization */ + private IPath containerPath; + + /** The project whose changes are being listened for */ + private IJavaProject project; + + /** + * Make a new ComplianceChangeListener + * @param containerPath container path to use for reinitialization + * @param project project whose changes are being listened for + */ + ComplianceChangeListener(IPath containerPath, IJavaProject project) + { + this.containerPath = containerPath; + this.project = project; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent) + */ + public void preferenceChange(PreferenceChangeEvent event) + { + String key = event.getKey(); + if (COMPLIANCE_KEY.equals(key)) { + try { + reInitialize(containerPath, project); + } catch (CoreException e) { + IStatus status = e.getStatus(); + if (status == null) { + status = new Status(Status.ERROR, EEditPlugin.ID, e.getMessage(), e); + } + ResourcesPlugin.getPlugin().getLog().log(status); + final IStatus istatus = status; + Display display = PlatformUI.getWorkbench().getDisplay(); + final Shell shell = display.getActiveShell(); + display.syncExec(new Runnable() { + public void run() { + ErrorDialog.openError(shell, "Error updating classpath", istatus.getMessage(), istatus); + } + }); + } + } + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 17:01:30
|
Revision: 92 http://flexotask.svn.sourceforge.net/flexotask/?rev=92&view=rev Author: jsauerbach Date: 2008-11-12 17:01:21 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Add package description for vm package Added Paths: ----------- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/package.html Added: trunk/flexotask/src/com/ibm/realtime/flexotask/vm/package.html =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/package.html (rev 0) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/vm/package.html 2008-11-12 17:01:21 UTC (rev 92) @@ -0,0 +1,6 @@ +<body> +Contains classes to be implemented in close conjunction with native code in the Java VM to +obtain true real time behavior + +<p>These classes are not part of the Flexotask public API. +</body> \ No newline at end of file Property changes on: trunk/flexotask/src/com/ibm/realtime/flexotask/vm/package.html ___________________________________________________________________ Added: svn:mime-type + text/html Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 17:00:29
|
Revision: 91 http://flexotask.svn.sourceforge.net/flexotask/?rev=91&view=rev Author: jsauerbach Date: 2008-11-12 17:00:25 +0000 (Wed, 12 Nov 2008) Log Message: ----------- eliminate eclipse builder warnings Modified Paths: -------------- trunk/flexotask/build.properties trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java trunk/flexotask-generic/build.properties trunk/flexotask-tuningfork/build.properties Modified: trunk/flexotask/build.properties =================================================================== --- trunk/flexotask/build.properties 2008-11-12 17:00:09 UTC (rev 90) +++ trunk/flexotask/build.properties 2008-11-12 17:00:25 UTC (rev 91) @@ -1,7 +1,6 @@ output.. = bin/ bin.includes = META-INF/,\ - flexotask.jar,\ - flexotasksrc.zip + flexotask.jar source.flexotask.jar = src/ Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java 2008-11-12 17:00:09 UTC (rev 90) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java 2008-11-12 17:00:25 UTC (rev 91) @@ -15,8 +15,8 @@ import com.ibm.realtime.analysis.Service; import com.ibm.realtime.flexotask.system.FlexotaskSystemSupport; +import com.ibm.realtime.flexotask.system.StableArrayImpl; import com.ibm.realtime.flexotask.system.TransactionalOperations; -import com.ibm.realtime.flexotask.util.Notifier; /** * Define the methods that bridge between the Flexotask Java support and the underlying support that must Modified: trunk/flexotask-generic/build.properties =================================================================== --- trunk/flexotask-generic/build.properties 2008-11-12 17:00:09 UTC (rev 90) +++ trunk/flexotask-generic/build.properties 2008-11-12 17:00:25 UTC (rev 91) @@ -1,7 +1,6 @@ output.. = bin/ bin.includes = META-INF/,\ - flexotaskGeneric.jar,\ - flexotaskGenericsrc.zip + flexotaskGeneric.jar source.flexotaskGeneric.jar = src/ Modified: trunk/flexotask-tuningfork/build.properties =================================================================== --- trunk/flexotask-tuningfork/build.properties 2008-11-12 17:00:09 UTC (rev 90) +++ trunk/flexotask-tuningfork/build.properties 2008-11-12 17:00:25 UTC (rev 91) @@ -1,7 +1,6 @@ output.. = bin/ bin.includes = META-INF/,\ flexotaskTuningFork.jar,\ - flexotaskTuningForksrc.zip,\ plugin.xml source.flexotaskTuningFork.jar = src/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 17:00:12
|
Revision: 90 http://flexotask.svn.sourceforge.net/flexotask/?rev=90&view=rev Author: jsauerbach Date: 2008-11-12 17:00:09 +0000 (Wed, 12 Nov 2008) Log Message: ----------- eliminate eclipse builder warnings Modified Paths: -------------- trunk/flexotask-devtest/build.properties Modified: trunk/flexotask-devtest/build.properties =================================================================== --- trunk/flexotask-devtest/build.properties 2008-11-12 16:41:11 UTC (rev 89) +++ trunk/flexotask-devtest/build.properties 2008-11-12 17:00:09 UTC (rev 90) @@ -1,4 +1,5 @@ -source.. = src/ +source.. = src/,\ + tst/ output.. = bin/ bin.includes = META-INF/,\ . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 16:41:16
|
Revision: 89 http://flexotask.svn.sourceforge.net/flexotask/?rev=89&view=rev Author: jsauerbach Date: 2008-11-12 16:41:11 +0000 (Wed, 12 Nov 2008) Log Message: ----------- API and javadoc cleanup, including some minor interface changes (mostly renamings). Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/AbstractFlexotaskTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPortTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskStableMode.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java trunk/flexotask/src/com/ibm/realtime/flexotask/timing/simple/SimpleTimingAnnotation.java trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java trunk/flexotask-functiontest/src/types/Main.java trunk/flexotask-generic/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/system/FlexotaskValidator.java 2008-11-12 16:41:11 UTC (rev 89) @@ -223,7 +223,7 @@ if (controller instanceof AtomicFlexotaskController) { FlexotaskTaskTemplate task = (FlexotaskTaskTemplate) entry.getKey(); try { - Class guardClass = CodeValidator.resolveClass(task.getGuard(), cl); + Class guardClass = CodeValidator.resolveClass((task.getImplementationClass() + "$Guard"), cl); AtomicFlexotaskGuard guard = (AtomicFlexotaskGuard) guardClass.newInstance(); AtomicFlexotaskBase atomicTask = (AtomicFlexotaskBase) ((FlexotaskControllerImpl) controller).root.getTask(); guard.setDelegate((AtomicFlexotask) atomicTask); Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/AbstractFlexotaskTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/AbstractFlexotaskTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/AbstractFlexotaskTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -112,7 +112,7 @@ ans.append("ans.setSynchronizing(").append(String.valueOf(synchronizing)).append(");"); ans.append("ans.setStableMode(com.ibm.realtime.flexotask.template.FlexotaskStableMode.getStableMode(\"") .append(stableMode.toString()).append("\"));"); - if (stableMode != FlexotaskStableMode.AUTO) { + if (stableMode != FlexotaskStableMode.MARKER) { for (Iterator iter = stableClasses.iterator(); iter.hasNext();) { String classname = (String) iter.next(); ans.append("ans.getStableClasses().add(").append(classname).append(");").append(newline); @@ -186,15 +186,25 @@ } /** - * @return the size of the tasks set. + * Get the number of tasks (equivalent to getTasks().size()) + * @return the number of tasks */ - public int getTaskSize() { + public int getNumberOfTasks() { return tasks.size(); } /** - * @return timingData. + * Get the number of connections (equivalent to getConnections().size()) + * @return the number of connections */ + public int getNumberOfConnections() { + return connections.size(); + } + + /** + * Get the FlexotaskGlobalTimingData for this template + * @return the timing data + */ public FlexotaskGlobalTimingData getTimingData() { return timingData; } Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -71,58 +71,40 @@ } /** - * Illegal in a communicator, whose ports are always called in0 and out0 + * Illegal in a communicator, whose ports are fixed by design * @throws IllegalArgumentException unconditionally */ - public void setInputPortNames(String[] inputPortNames) - { + public void setInputPorts(FlexotaskPortTemplate[] inputPorts) { throw new IllegalArgumentException(); } /** - * Illegal in a communicator, whose port types are determined by setParameterType + * Illegal in a communicator, whose ports are fixed by design * @throws IllegalArgumentException unconditionally */ - public void setInputPortTypes(String[] inputPortTypes) - { + public void setInputPorts(String[] inputPortTypes, + boolean[] inputPortBuffering, String[] inputPortNames) { throw new IllegalArgumentException(); } /** - * Illegal in a communicator + * Illegal in a communicator, whose ports are fixed by design * @throws IllegalArgumentException unconditionally */ - public void setInputPortBuffering(boolean[] isBuffered) { - throw new IllegalArgumentException(); - } - - /** - * Illegal in a communicator, whose ports are always called in0 and out0 - * @throws IllegalArgumentException unconditionally - */ - public void setOutputPortNames(String[] outputPortNames) - { + public void setOutputPorts(FlexotaskPortTemplate[] outputPorts) { throw new IllegalArgumentException(); } /** - * Illegal in a communicator, whose port types are determined by setParameterType + * Illegal in a communicator, whose ports are fixed by design * @throws IllegalArgumentException unconditionally */ - public void setOutputPortTypes(String[] outputPortTypes) - { + public void setOutputPorts(String[] outputPortTypes, + boolean[] outputPortBuffering, String[] outputPortNames) { throw new IllegalArgumentException(); } /** - * Illegal in a communicator - * @throws IllegalArgumentException unconditionally - */ - public void setOutputPortBuffering(boolean[] isBuffered) { - throw new IllegalArgumentException(); - } - - /** * In a communicator, the parameterType (class) is the type of the communicator's ports and buffer. */ public void setParameterType(String parameterType) @@ -132,8 +114,8 @@ FlexotaskPortTemplate outputPort = new FlexotaskPortTemplate(); inputPort.setPortType(parameterType); outputPort.setPortType(parameterType); - super.setInputPortGroup(new FlexotaskPortTemplate[] {inputPort}); - super.setOutputPortGroup(new FlexotaskPortTemplate[] {outputPort}); + super.setInputPorts(new FlexotaskPortTemplate[] {inputPort}); + super.setOutputPorts(new FlexotaskPortTemplate[] {outputPort}); } /** Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.java 2008-11-12 16:41:11 UTC (rev 89) @@ -14,13 +14,21 @@ package com.ibm.realtime.flexotask.template; /** - * Represents the possible modes which a connection driver can move objects. - * Possible modes are: + * Represents the possible ways in which object references can be transmitted across connections. + * The semantics depend both on the connection mode and on where the objects reside. + * <p>Objects may reside in a Flexotask private heap + * or on the public heap (the latter objects are reference-immutable and pinned; they are reached either + * from legal static fields or from the parameters passed to weakly isolated Flexotasks). + * + * <p>Possible modes are: * <ul> - * <li>BYREF - indicating that objects are moved by reference. - * <li>DEEPCLONE - indicates that objects are moved by deep-cloning them. - * <li>HYBRID - indicates that objects are moved by reference for the - * pinned, heap-allocated objects, and otherwise by deep-cloning. + * <li>BYREF - indicating that only objects on the public heap may be transmitted; all such + * objects are transmitted by reference. Attempts to transmit other objects cause an + * IllegalArgumentException at the time an object is stored in an output port. + * <li>DEEPCLONE - indicates that all objects are transmitted by deep-cloning them, regardless of where + * they reside; the result is always a new object. + * <li>HYBRID - indicates that objects are transmitted by reference if they reside on the public heap + * and by deep-cloning if they reside in the Flexotask private memory space * </ul> * */ Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -41,7 +41,7 @@ private FlexotaskConnectionMode mode = FlexotaskConnectionMode.DEEPCLONE; /** - * Specify a new FlexotaskConnectionSTemplate in one step + * Specify a new FlexotaskConnectionTemplate in one step * @param name a name for this connection (if null, a useful stylized name is generated) * @param timingData information that provides timing semantics for the graph, typically used * by the scheduler Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPortTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPortTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPortTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -30,7 +30,7 @@ private FlexotaskTaskTemplate containerTask; /** - * constructor + * Create a new, empty, Port template. At least the type must be specified subsequently. */ public FlexotaskPortTemplate() { portType = ""; @@ -38,23 +38,24 @@ } /** + * Get the task to which the port has been assigned or null if the port has never teen assigned to a task * @return the task containing this port */ - public FlexotaskTaskTemplate getContainerTask() { + public FlexotaskTaskTemplate getContainingTask() { return containerTask; } /** - * Get the input port buffering - * @return the input port buffering + * Query whether or not the port is buffered + * @return true iff the port is buffered */ - public boolean getPortBuffer() { + public boolean isBuffered() { return this.portBuffer; } /** - * Get the input port name - * @return the input port name + * Get the port name + * @return the port name */ public String getPortName() { @@ -62,8 +63,8 @@ } /** - * Get the input port type - * @return the input port type + * Get the port type + * @return the port type (as a String class name) */ public String getPortType() { @@ -71,25 +72,29 @@ } /** - * @return whether this port is an input port of a task + * Determine whether this port is the input port of a task + * @return true if the port is the input port of a task and false if it is not (meaning either that + * it is the output port of a task or has never been assigned to task) */ public boolean isInput() { - return getContainerTask().isInputPort(this); + return containerTask == null ? false : containerTask.isInputPort(this); } /** - * @return whether this port is an output port of a task + * Determine whether this port is the output port of a task + * @return true if the port is the output port of a task and false if it is not (meaning either that + * it is the input port of a task or has never been assigned to task) */ public boolean isOutput() { - return getContainerTask().isOutputPort(this); + return containerTask == null ? false : containerTask.isOutputPort(this); } /** - * Set the input port buffering - * @param portBuffer true if the input port is buffered, false otherwise + * Set the port buffering + * @param buffered true if the port is to be buffered, false otherwise */ - public void setPortBuffer(boolean portBuffer) { - this.portBuffer = portBuffer; + public void setBuffered(boolean buffered) { + this.portBuffer = buffered; } /** Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -74,7 +74,7 @@ ans.setName(getName()); /* Don't copy the timing data or graphics */ ans.setImplementationClass(getImplementationClass()); - ans.setInputPortGroup((FlexotaskPortTemplate[]) getInputPortGroup().toArray()); + ans.setInputPorts(getInputPorts()); ans.setParameterType(getParameterType()); ans.setParameterValue(getParameterValue()); ans.setWeaklyIsolated(isWeaklyIsolated()); Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskStableMode.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskStableMode.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskStableMode.java 2008-11-12 16:41:11 UTC (rev 89) @@ -14,34 +14,34 @@ package com.ibm.realtime.flexotask.template; /** - * Indicator class for the stable mode of a flexotask template, ie., how the - * type checker deals with stable classes. There are four different modes: + * Describes the policy for dividing the Flexotask private memory area into a stable + * heap and a transient area. * <ol> - * <li>AUTO -- the type checker considers only classes implementing the <code> - * Stable</code> marker interface, their subclasses and any Flexotask - * subclasses as stable. - * <li>INFER -- the type checker infers all stable classes from a simple set - * of rules; any Flexotask subclasses, their non-primitive and non-primitive - * array fields and their subclasses are considered stable. - * <li>MANUAL -- the type checker only considers classes that are pre-specified - * and provided to the type checker as stable. - * <li>DEFAULT -- the type checker considers all classes as stable. + * <li>DEFAULT -- all classes are stable. + * <li>MARKER -- the classes implementing the <code>Stable</code> marker interface, and their subclasses, + * are considered stable. All others are transient. + * <li>INFER -- the validator infers the smallest set of stable classes such that the rules governing + * stable and transient storage are not violated. All others are transient. + * <li>MANUAL -- stable classes are explicitly listed in the template. All others are transient. * </ol> */ public final class FlexotaskStableMode { - /** Indicates the mode in which the checker will use marker interfaces to infer - * stable classes */ - public static final FlexotaskStableMode AUTO = new FlexotaskStableMode("auto"); - /** Indicates the mode in which the checker will infer stable classes only from - * their uses */ + /** Indicates that the classes implementing the <code>Stable</code> marker interface, and their subclasses, + * are considered stable while all others are transient. + */ + public static final FlexotaskStableMode MARKER = new FlexotaskStableMode("marker"); + /** Indicates that the validator should infer the smallest set of stable classes such that the rules + * governing stable and transient storage are not violated, with all others transient. + */ public static final FlexotaskStableMode INFER = new FlexotaskStableMode("infer"); - /** Indicates the mode in which the user will provide complete and explicit list - * of stable classes*/ + /** Indicates that stable classes are explicitly listed in the template, with all others transient. + */ public static final FlexotaskStableMode MANUAL = new FlexotaskStableMode("manual"); - /** Indicates the mode in which all classes are default to stable */ + /** Indicates that all classes are stable (this is the default if no FlexotaskStableMode is declared for a + * template) */ public static final FlexotaskStableMode DEFAULT = new FlexotaskStableMode("default"); /** The array of all possible modes */ - private static final FlexotaskStableMode[] modes = { AUTO, INFER, MANUAL, DEFAULT }; + private static final FlexotaskStableMode[] modes = { MARKER, INFER, MANUAL, DEFAULT }; /** The current mode category of this instance */ private final String mode; @@ -75,7 +75,7 @@ /** * Returns the <code>FlexotaskStableMode</code> singleton object corresponding - * to the provided mode + * to the provided mode. * @param mode the name of the mode * @return the corresponding FlexotaskStableMode instance * @throws IllegalArgumentException if provided mode is illegal. Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -13,11 +13,10 @@ */ package com.ibm.realtime.flexotask.template; -import java.util.LinkedList; /** * Specifies one Flexotask within an FlexotaskTemplate. Used directly - * for user-defined exotasks that are not predicates. To create a predicate or communicator, + * for user-defined Flexotasks that are not predicates. To create a predicate or communicator, * use FlexotaskPredicateTemplate or FlexotaskCommunicatorTemplate, both of which * specialize this class. */ @@ -27,28 +26,28 @@ private String implementationClass; /** The port templates representing input ports, in declaration order */ - private FlexotaskPortTemplate[] inputPortGroup; + private FlexotaskPortTemplate[] inputPorts; /** The port templates representing output ports, in declaration order */ - private FlexotaskPortTemplate[] outputPortGroup; + private FlexotaskPortTemplate[] outputPorts; /** A String that becomes the value of the graphics='...' attribute when converted to XML. - * Used to support the exotask graphical editor. Ignored otherwise. + * Used to support the Flexotask graphical editor. Ignored otherwise. */ private String graphics; - /** Indicates that this is a weakly isolated exotask (its parameter, if any, must be ref-immutable and is not + /** Indicates that this is a weakly isolated Flexotask (its parameter, if any, must be ref-immutable and is not * deep-copied). Its presence in the graph means that all getstatic checks for the graph will require * only ref-immutability and not full immutability. */ private boolean weaklyIsolated; - /** The type of the exotask's default parameter value in this specification. If null, the exotask + /** The type of the Flexotask's default parameter value in this specification. If null, the Flexotask * has no default parameter, though it may still have a runtime parameter. */ private String parameterType; - /** The value expression of the exotask's default parameter (ignored if parameterType is null) */ + /** The value expression of the Flexotask's default parameter (ignored if parameterType is null) */ private String parameterValue; // @see com.ibm.realtime.flexotask.template.FlexotaskTemplateElement#generateSource() @@ -58,18 +57,18 @@ .append("=new FlexotaskTaskTemplate();").append(newline); getCommonSource(ans); getCommonTaskSource(ans); - if (outputPortGroup != null && outputPortGroup.length > 0) { - ans.append(getName()).append(".setOutputPortGroup(new String[]{"); - for (int i = 0; i < outputPortGroup.length; i++) { - ans.append("\"").append(outputPortGroup[i].getPortType()).append("\","); + if (outputPorts != null && outputPorts.length > 0) { + ans.append(getName()).append(".setOutputPorts(new String[]{"); + for (int i = 0; i < outputPorts.length; i++) { + ans.append("\"").append(outputPorts[i].getPortType()).append("\","); } ans.append("},new boolean[]{"); - for (int i = 0; i < outputPortGroup.length; i++) { - ans.append(outputPortGroup[i].getPortBuffer()).append(","); + for (int i = 0; i < outputPorts.length; i++) { + ans.append(outputPorts[i].isBuffered()).append(","); } ans.append("},new String[]{"); - for (int i = 0; i < outputPortGroup.length; i++) { - ans.append("\"").append(outputPortGroup[i].getPortName()).append("\","); + for (int i = 0; i < outputPorts.length; i++) { + ans.append("\"").append(outputPorts[i].getPortName()).append("\","); } ans.append("});").append(newline); } @@ -86,12 +85,12 @@ String[] outputNames = getOutputPortNames(); for (int i = 0; i < inputNames.length; i++) { ans.append(" <Input id='").append(inputNames[i]).append("' type='") - .append(inputPortGroup[i].getPortType()).append("' isBuffered='").append(inputPortGroup[i].getPortBuffer()) + .append(inputPorts[i].getPortType()).append("' isBuffered='").append(inputPorts[i].isBuffered()) .append("'/>").append(newline); } for (int i = 0; i < outputNames.length; i++) { ans.append(" <Output id='").append(outputNames[i]).append("' type='") - .append(outputPortGroup[i].getPortType()).append("' isBuffered='").append(outputPortGroup[i].getPortBuffer()) + .append(outputPorts[i].getPortType()).append("' isBuffered='").append(outputPorts[i].isBuffered()) .append("'/>").append(newline); } getTimingDataXML(ans); @@ -119,65 +118,63 @@ * Get a specific input port template * @param index the index of the desired template, in declaration order * @return the input port in this task associated with the given index + * @throws ArrayIndexOutOfBoundsException */ public FlexotaskPortTemplate getInputPort(int index) { - return inputPortGroup[index]; + return inputPorts[index]; } /** * Get a specific output port template * @param index the index of the desired template, in declaration order * @return the output port in this task associated with the given index + * @throws ArrayIndexOutOfBoundsException */ public FlexotaskPortTemplate getOutputPort(int index) { - return outputPortGroup[index]; + return outputPorts[index]; } /** - * @return the size of the input port group + * Get the number of input ports (equivalent to getInputPorts().length) + * @return the number of input ports */ - public int getInputPortSize() { - if (inputPortGroup == null) + public int getNumberOfInputPorts() { + if (inputPorts == null) return 0; else - return inputPortGroup.length; + return inputPorts.length; } /** - * @return the size of the output port group + * Get the number of output ports (equivalent to getOutputPorts().length) + * @return the number of output ports */ - public int getOutputPortSize() { - if (outputPortGroup == null) + public int getNumberOfOutputPorts() { + if (outputPorts == null) return 0; else - return outputPortGroup.length; + return outputPorts.length; } /** - * @return the whole input port group stored in a LinkedList data structure + * Get the entire array of input ports + * @return the array of FlexotaskPortTemplate objects representing the input ports */ - public LinkedList getInputPortGroup() { - LinkedList inputPortList = new LinkedList(); - for (int i = 0; i < getInputPortSize(); i++) { - inputPortList.add(inputPortGroup[i]); - } - return inputPortList; + public FlexotaskPortTemplate[] getInputPorts() { + return inputPorts; } /** - * @return the whole output port group stored in a LinkedList data structure + * Get the entire array of output ports + * @return the array of FlexotaskPortTemplate objects representing the output ports */ - public LinkedList getOutputPortGroup() { - LinkedList outputPortList = new LinkedList(); - for (int i = 0; i < getOutputPortSize(); i++) { - outputPortList.add(outputPortGroup[i]); - } - return outputPortList; + public FlexotaskPortTemplate[] getOutputPorts() { + return outputPorts; } /** - * Get the the type (class) of the default parameter. The default parameter is passed to the initialize - * method even if no parameter is specified dynamically + * Get the the type (class name) of the default parameter. The default parameter is passed to the initialize + * method if no parameter is specified dynamically * @return the String class name of the default parameter's type or the empty String if unspecified */ public String getParameterType() @@ -187,7 +184,8 @@ /** * Get the value of the default parameter as a string. The default parameter is passed to the initialize - * method even if no parameter is specified dynamically + * method if no parameter is specified dynamically. See {@link #setParameterValue(String)} for the syntax of this + * expression. * @return the parameter, in string format, or the empty String if unspecified */ public String getParameterValue() @@ -195,8 +193,8 @@ return parameterValue != null ? parameterValue : ""; } - /** Test whether this is a weakly isolated exotask. If so, its parameter, if any, must be ref-immutable - * and is not deep-copied. The presence of a weakly isolated exotask in the graph means that all + /** Test whether this is a weakly isolated Flexotask. If so, its parameter, if any, must be ref-immutable + * and is not deep-copied. The presence of a weakly isolated Flexotask in the graph means that all * getstatic checks for the graph will require only ref-immutability and not full immutability. * @return true if weakly isolated, false if strongly isolated */ @@ -208,15 +206,14 @@ /** * Determine if a port of this task is an input port * @param port the port to test as a FlexotaskPortTemplate - * @return true if the given port in this task is indeed an input port in this task - * if this port is not found + * @return true if the given port in this task is indeed an input port in this task, false otherwise */ public boolean isInputPort(FlexotaskPortTemplate port) { boolean foundFlag = false; int i = 0; - if (inputPortGroup != null) { - while (i < inputPortGroup.length && foundFlag == false) { - if (inputPortGroup[i].equals(port)) { + if (inputPorts != null) { + while (i < inputPorts.length && foundFlag == false) { + if (inputPorts[i].equals(port)) { foundFlag = true; } i++; @@ -228,16 +225,14 @@ /** * Determine if a port of this task is an output port * @param port the port to test as a FlexotaskPortTemplate - * @return true if the given port in this task is indeed an output port in this task - * if this port is not found. - * Notice, if this port does not belong in this task at all, the end result would still be false. + * @return true if the given port in this task is indeed an output port in this task, false otherwise */ public boolean isOutputPort(FlexotaskPortTemplate port) { boolean foundFlag = false; - if (outputPortGroup != null) { + if (outputPorts != null) { int i = 0; - while (i < outputPortGroup.length && foundFlag == false) { - if (outputPortGroup[i].equals(port)) { + while (i < outputPorts.length && foundFlag == false) { + if (outputPorts[i].equals(port)) { foundFlag = true; } i++; @@ -267,7 +262,7 @@ /** * Set the the type (class) of the default parameter. The default parameter is passed to the initialize - * method even if no parameter is specified dynamically + * method if no parameter is specified dynamically * @param parameterType the String class name of the default parameter's type */ public void setParameterType(String parameterType) @@ -277,7 +272,7 @@ /** * Set the value expression of the default parameter. The default parameter is passed to the initialize - * method even if no parameter is specified dynamically. In a communicator, the default parameter is used to + * method if no parameter is specified dynamically. In a communicator, the default parameter is used to * initialize the communicator's input and output ports. In any case, the value expression is converted to * an Object as follows * <ol><li>If the parameterType is java.lang.String the parameterValue is used as is @@ -297,8 +292,8 @@ this.parameterValue = parameterValue; } - /** Set whether or not this is a weakly isolated exotask. If set, the exotask's parameter, if any, must be - * ref-immutable and is not deep-copied. The presence of a weakly isolated exotask in the graph means that all + /** Set whether or not this is a weakly isolated Flexotask. If set, the Flexotask's parameter, if any, must be + * ref-immutable and is not deep-copied. The presence of a weakly isolated Flexotask in the graph means that all * getstatic checks for the graph will require only ref-immutability and not full immutability. * @param weaklyIsolated true to set weak isolation, false for strong isolation (the default) */ @@ -326,9 +321,9 @@ { builder.append(getName()).append(".setImplementationClass(\"").append(getImplementationClass()) .append("\");").append(newline); - if (inputPortGroup != null && inputPortGroup.length > 0) { + if (inputPorts != null && inputPorts.length > 0) { String[] inputPortTypes = getInputPortTypes(); - builder.append(getName()).append(".setInputPortGroup(new String[]{"); + builder.append(getName()).append(".setInputPorts(new String[]{"); for (int i = 0; i < inputPortTypes.length; i++) { builder.append("\"").append(inputPortTypes[i]).append("\","); } @@ -386,14 +381,8 @@ ans.setName(getName()); /* Don't copy the timing data or graphics */ ans.setImplementationClass(implementationClass); - ans.setInputPortGroup(inputPortGroup); - ans.setOutputPortGroup(outputPortGroup); -// ans.setInputPortTypes(inputPortTypes); -// ans.setInputPortNames(inputPortNames); -// ans.setInputPortBuffering(inputPortBuffering); -// ans.setOutputPortTypes(outputPortTypes); -// ans.setOutputPortNames(outputPortNames); -// ans.setOutputPortBuffering(outputPortBuffering); + ans.setInputPorts(inputPorts); + ans.setOutputPorts(outputPorts); ans.setWeaklyIsolated(weaklyIsolated); ans.setParameterType(parameterType); ans.setParameterValue(parameterValue); @@ -401,71 +390,74 @@ } /** - * Get the class that should be instantiated as a guard object iff this Flexotask is an AtomicFlexotask. - * This name is deterministic based on the implementation class name. - * @return the name of the guard class + * Set the input ports directly from an array of port templates + * @param inputPorts the input ports as an array of FlexotaskPortTemplate */ - public String getGuard() { - return getImplementationClass() + "$Guard"; + public void setInputPorts(FlexotaskPortTemplate[] inputPorts) { + this.inputPorts = inputPorts; } /** - * set the input port group given a string of port templates - * @param inputPortGroup + * Set the input ports by specifying the types, port buffering property, and names of the ports in separate arrays. + * A useful alternative for tools and generator functions. Arrays must be of the same length, although the buffering and + * names arrays may be null, implying defaults. + * @param inputPortTypes the input port types as class names in the intended index order + * @param inputPortBuffering the input port buffering properties of the ports in the intended index order or null if all ports are + * unbuffered + * @param inputPortNames the input port names in the intended index order or null if all ports have the default generated names + * in0..inN */ - public void setInputPortGroup(FlexotaskPortTemplate[] inputPortGroup) { - this.inputPortGroup = inputPortGroup; - } - - /** - * set the input port group by specifying the three types at the types, buffering, and names in one method. - * Notice they are in a specific order. - */ - public void setInputPortGroup(String[] inputPortTypes, boolean[] inputPortBuffering, String[] inputPortNames) { + public void setInputPorts(String[] inputPortTypes, boolean[] inputPortBuffering, String[] inputPortNames) { if (inputPortBuffering != null && inputPortBuffering.length != inputPortTypes.length) { throw new IllegalArgumentException("Arrays must be of the same length"); } if (inputPortNames != null && inputPortNames.length != inputPortTypes.length) { throw new IllegalArgumentException("Arrays must be of the same length"); } - inputPortGroup = new FlexotaskPortTemplate[inputPortTypes.length]; - for (int i = 0; i < inputPortGroup.length; i++) { + inputPorts = new FlexotaskPortTemplate[inputPortTypes.length]; + for (int i = 0; i < inputPorts.length; i++) { FlexotaskPortTemplate port = new FlexotaskPortTemplate(); port.setPortType(inputPortTypes[i]); port.setPortName(inputPortNames == null ? "in" + i : inputPortNames[i]); - port.setPortBuffer(inputPortBuffering == null ? false : inputPortBuffering[i]); + port.setBuffered(inputPortBuffering == null ? false : inputPortBuffering[i]); port.setContainerTask(this); - inputPortGroup[i] = port; + inputPorts[i] = port; } } /** - * set the output port group given an array of port templates - * @param outputPortGroup the array of port templates to set + * Set the output ports directly from an array of port templates + * @param outputPorts the output ports as an array of FlexotaskPortTemplate */ - public void setOutputPortGroup(FlexotaskPortTemplate[] outputPortGroup) { - this.outputPortGroup = outputPortGroup; + public void setOutputPorts(FlexotaskPortTemplate[] outputPorts) { + this.outputPorts = outputPorts; } /** - * set the output port group by specifying the three types at the types, buffering, and names in one method. - * Notice they are in a specific order. + * Set the output ports by specifying the types, port buffering property, and names of the ports in separate arrays. + * A useful alternative for tools and generator functions. Arrays must be of the same length, although the buffering and + * names arrays may be null, implying defaults. + * @param outputPortTypes the output port types as class names in the intended index order + * @param outputPortBuffering the output port buffering properties of the ports in the intended index order or null if all ports are + * unbuffered + * @param outputPortNames the output port names in the intended index order or null if all ports have the default generated names + * out0..outN */ - public void setOutputPortGroup(String[] outputPortTypes, boolean[] outputPortBuffering, String[] outputPortNames) { + public void setOutputPorts(String[] outputPortTypes, boolean[] outputPortBuffering, String[] outputPortNames) { if (outputPortBuffering != null && outputPortBuffering.length != outputPortTypes.length) { throw new IllegalArgumentException("Arrays must be of the same length"); } if (outputPortNames != null && outputPortNames.length != outputPortTypes.length) { throw new IllegalArgumentException("Arrays must be of the same length"); } - outputPortGroup = new FlexotaskPortTemplate[outputPortTypes.length]; - for (int i = 0; i < outputPortGroup.length; i++) { + outputPorts = new FlexotaskPortTemplate[outputPortTypes.length]; + for (int i = 0; i < outputPorts.length; i++) { FlexotaskPortTemplate port = new FlexotaskPortTemplate(); port.setPortType(outputPortTypes[i]); port.setPortName(outputPortNames == null ? "out" + i : outputPortNames[i]); - port.setPortBuffer(outputPortBuffering == null ? false : outputPortBuffering[i]); + port.setBuffered(outputPortBuffering == null ? false : outputPortBuffering[i]); port.setContainerTask(this); - outputPortGroup[i] = port; + outputPorts[i] = port; } } @@ -475,13 +467,13 @@ */ public String[] getInputPortNames() { - if (inputPortGroup == null) { + if (inputPorts == null) { return new String[0]; } - String[] portNames = new String[inputPortGroup.length]; - for (int i = 0; i < inputPortGroup.length; i++) { - if (inputPortGroup[i].getPortName() != null) - portNames[i] = inputPortGroup[i].getPortName(); + String[] portNames = new String[inputPorts.length]; + for (int i = 0; i < inputPorts.length; i++) { + if (inputPorts[i].getPortName() != null) + portNames[i] = inputPorts[i].getPortName(); else portNames[i] = "in"+i; } @@ -493,22 +485,26 @@ * @return the inputPorts as a (possibly empty) array of strings (never null) */ public String[] getInputPortTypes() { - if (inputPortGroup == null) { + if (inputPorts == null) { return new String[0]; } - String[] portTypes = new String[inputPortGroup.length]; - for (int i = 0; i < inputPortGroup.length; i++) { - portTypes[i] = inputPortGroup[i].getPortType(); + String[] portTypes = new String[inputPorts.length]; + for (int i = 0; i < inputPorts.length; i++) { + portTypes[i] = inputPorts[i].getPortType(); } return portTypes; } - /** return the index of a particular port within this task */ + /** Determine the index of a particular input port within this task + * @param port the port template object whose index is desired + * @return the index of the port if found + * @throws IllegalArgumentException if not found + */ public int getInputPortIndex(FlexotaskPortTemplate port) throws IllegalArgumentException { int i = 0; boolean foundFlag = false; - while (i < inputPortGroup.length && foundFlag == false) { - if (inputPortGroup[i].equals(port)) { + while (i < inputPorts.length && foundFlag == false) { + if (inputPorts[i].equals(port)) { foundFlag = true; } i++; @@ -524,12 +520,12 @@ * @return the array of booleans indicating which of the input ports are buffered */ public boolean[] getInputPortBuffering() { - if (inputPortGroup == null) { + if (inputPorts == null) { return new boolean[0]; } - boolean[] buffering = new boolean[inputPortGroup.length]; - for (int i = 0; i < inputPortGroup.length; i++) { - buffering[i] = inputPortGroup[i].getPortBuffer(); + boolean[] buffering = new boolean[inputPorts.length]; + for (int i = 0; i < inputPorts.length; i++) { + buffering[i] = inputPorts[i].isBuffered(); } return buffering; } @@ -540,13 +536,13 @@ */ public String[] getOutputPortNames() { - if (outputPortGroup == null) { + if (outputPorts == null) { return new String[0]; } - String[] portNames = new String[outputPortGroup.length]; - for (int i = 0; i < outputPortGroup.length; i++) { - if (outputPortGroup[i].getPortName() != null) - portNames[i] = outputPortGroup[i].getPortName(); + String[] portNames = new String[outputPorts.length]; + for (int i = 0; i < outputPorts.length; i++) { + if (outputPorts[i].getPortName() != null) + portNames[i] = outputPorts[i].getPortName(); else portNames[i] = "out"+i; } @@ -558,22 +554,26 @@ * @return the outputPorts as a (possibly empty) array of strings (never null) */ public String[] getOutputPortTypes() { - if (outputPortGroup == null) { + if (outputPorts == null) { return new String[0]; } - String[] portTypes = new String[outputPortGroup.length]; - for (int i = 0; i < outputPortGroup.length; i++) { - portTypes[i] = outputPortGroup[i].getPortType(); + String[] portTypes = new String[outputPorts.length]; + for (int i = 0; i < outputPorts.length; i++) { + portTypes[i] = outputPorts[i].getPortType(); } return portTypes; } - /** return the index of a particular port within this task */ + /** Determine the index of a particular output port within this task + * @param port the port template object whose index is desired + * @return the index of the port if found + * @throws IllegalArgumentException if not found + */ public int getOutputPortIndex(FlexotaskPortTemplate port) throws IllegalArgumentException{ int i = 0; boolean foundFlag = false; - while (i < outputPortGroup.length && foundFlag == false) { - if (outputPortGroup[i].equals(port)) { + while (i < outputPorts.length && foundFlag == false) { + if (outputPorts[i].equals(port)) { foundFlag = true; } i++; @@ -589,12 +589,12 @@ * @return the array of booleans indicating which of the output ports are buffered */ public boolean[] getOutputPortBuffering() { - if (outputPortGroup == null) { + if (outputPorts == null) { return new boolean[0]; } - boolean[] buffering = new boolean[outputPortGroup.length]; - for (int i = 0; i < outputPortGroup.length; i++) { - buffering[i] = outputPortGroup[i].getPortBuffer(); + boolean[] buffering = new boolean[outputPorts.length]; + for (int i = 0; i < outputPorts.length; i++) { + buffering[i] = outputPorts[i].isBuffered(); } return buffering; } Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -18,29 +18,70 @@ /** * A specification of an entire graph of Flexotasks, graph inputs, - * graph outputs, and connections. An FlexotaskTemplate is + * graph outputs, and connections. A FlexotaskTemplate is * validated as a whole and instantiated as a whole. The resulting instance is passed * to the scheduler as a whole to obtain the graph's FlexotaskRunner. * This class exists in both a generic and non-generic version depending on the - * level of the Java compiler you are using + * level of the Java compiler you are using. The generic version returns parameterized + * Set and Iterator results instead of raw ones. */ public class FlexotaskTemplate extends AbstractFlexotaskTemplate { + /** Create a new FlexotaskTemplate with no tasks, no connections, no stable classes, no timing data, + * and default values of all properties. + * All templates are built incrementally starting with this constructor. + */ + public FlexotaskTemplate() {} + + /** + * Gets the entire set of connections for this template, as a mutable Set. The result is never null, but + * is empty for a new template and may be added to. + * @return the current set of FlexotaskConnectionTemplate objects describing the connections + */ public Set getConnections() { return getConnectionsImpl(); } + + /** + * Gets the set of connections originating from a particular port, which must be a valid output port of a task in this template + * (else the result will always be empty). The resulting Iterator is not mutable. + * @param task the FlexotaskTaskTemplate describing the originating task + * @param portIndex a zero-origin index into the output ports of the originating task, thereby designating a specific output port + * @return the set of FlexotaskConnectionTemplate objects describing the connections that originate from the given port + */ public Iterator getConnectionsFrom(FlexotaskTaskTemplate task, int portIndex) { return getConnectionsFromImpl(task, portIndex); } + + /** + * Gets the set of connections terminating at a particular port, which must be a valid input port of a task in this template + * (else the result will always be empty). The resulting Iterator is not mutable. + * @param task the FlexotaskTaskTemplate describing the terminating task + * @param portIndex a zero-origin index into the input ports of the originating task, thereby designating a specific input port + * @return the set of FlexotaskConnectionTemplate objects describing the connections that terminate at the given port + */ public Iterator getConnectionsTo(FlexotaskTaskTemplate task, int portIndex) { return getConnectionsToImpl(task, portIndex); } + + /** + * Gets the set of stable classes declared for this template, as a mutable Set. The result is never null, but + * is empty for a new template and may be added to. This set is only significant if the template has had its stable mode + * property set to <b>FlexotaskStableMode.MANUAL</b>. + * @return the current set of stable classes, as fully qualified String class names + */ public Set getStableClasses() { return getStableClassesImpl(); } + + /** + * Gets the set of tasks in this template, as a mutable Set. The result is never null, but + * is empty for a new template and may be added to. + * @return the current set of FlexotaskTaskTemplate objects describing the tasks + */ public Set getTasks() { return getTasksImpl(); Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/timing/simple/SimpleTimingAnnotation.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/timing/simple/SimpleTimingAnnotation.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/timing/simple/SimpleTimingAnnotation.java 2008-11-12 16:41:11 UTC (rev 89) @@ -38,16 +38,29 @@ private Map modeMap; /** - * Construct an empty SimpleTimingAnnotation to be augmented via addMode calls + * Construct an empty SimpleTimingAnnotation to be augmented via addMode calls. This constructor is + * generally only used when there are multiple modes. It allows for incrementally defining the offsets + * that a task has in different modes. */ public SimpleTimingAnnotation() { modeMap = new HashMap(); } + + /** + * Construct a new SimpleTimingAnnotation specifying just an offset. This is the most common + * case when using the single mode variant of the TT timing grammar + * @param offset the offset that this element has within the period (in nanoseconds) + */ + public SimpleTimingAnnotation(long offset) + { + this(new long[]{offset}); + } /** - * Construct a new SimpleTimingAnnotation for the unnamed mode - * @param offsets the offsets that this element has in the overall period + * Construct a new SimpleTimingAnnotation for the unnamed single mode but with multiple offsets. + * This consructor is used when a task or connection is to execute more than one in the period + * @param offsets the offsets that this element has in the overall period (in nanoseconds) */ public SimpleTimingAnnotation(long[] offsets) { Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.java 2008-11-12 16:41:11 UTC (rev 89) @@ -515,13 +515,13 @@ task = new FlexotaskPredicateTemplate(); } else { task = new FlexotaskTaskTemplate(); - task.setOutputPortGroup(outputClasses, outputPortBuffering, outputNames); + task.setOutputPorts(outputClasses, outputPortBuffering, outputNames); } task.setWeaklyIsolated("weak".equalsIgnoreCase(isolation)); task.setName(id); task.setTimingData(timingData); task.setImplementationClass(implementation); - task.setInputPortGroup(inputClasses, inputPortBuffering, inputNames); + task.setInputPorts(inputClasses, inputPortBuffering, inputNames); if (parameterType.length() > 0) { task.setParameterType(parameterType); } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TaskDiagram.java 2008-11-12 16:41:11 UTC (rev 89) @@ -90,7 +90,7 @@ /** The stable classes iff stableMode is MANUAL */ private List<String> stableClasses = new ArrayList<String>(); /** The possible stable modes */ - private FlexotaskStableMode[] stableModes = {FlexotaskStableMode.DEFAULT, FlexotaskStableMode.AUTO, FlexotaskStableMode.MANUAL, FlexotaskStableMode.INFER}; + private FlexotaskStableMode[] stableModes = {FlexotaskStableMode.DEFAULT, FlexotaskStableMode.MARKER, FlexotaskStableMode.MANUAL, FlexotaskStableMode.INFER}; /** The editor-friendly names for the stable modes, in the same order as previous */ private static final String[] stableModeEditorNames = { "all classes stable", "use marker interface", "listed explicitly", "inferred" }; @@ -595,7 +595,7 @@ kind = "flexotask"; /* non-predicate flexotask has output ports, communicating, and admits as well as the usual things */ String[][] outDecls = getPortDecls(task.getOutputPortDeclarations()); - ans.setOutputPortGroup(outDecls[0], getPortBufferingDecls(task.getOutputPortDeclarations()), outDecls[1]); + ans.setOutputPorts(outDecls[0], getPortBufferingDecls(task.getOutputPortDeclarations()), outDecls[1]); } /* all normal flexotasks have name, timing data, input ports, implementation, parameterType, parameterValue, * and isolation */ @@ -603,7 +603,7 @@ ans.setTimingData(getTimingData(task)); ans.setImplementationClass(nonEmpty(task.getImplementation(), "implementation on " + kind)); String[][] inDecls = getPortDecls(task.getInputPortDeclarations()); - ans.setInputPortGroup(inDecls[0], getPortBufferingDecls(task.getInputPortDeclarations()), inDecls[1]); + ans.setInputPorts(inDecls[0], getPortBufferingDecls(task.getInputPortDeclarations()), inDecls[1]); ans.setParameterType(task.getParameterType()); ans.setParameterValue(task.getParameterValue()); ans.setWeaklyIsolated(task.isCommunicating()); Modified: trunk/flexotask-functiontest/src/types/Main.java =================================================================== --- trunk/flexotask-functiontest/src/types/Main.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask-functiontest/src/types/Main.java 2008-11-12 16:41:11 UTC (rev 89) @@ -41,12 +41,12 @@ FlexotaskTaskTemplate source = new FlexotaskTaskTemplate(); source.setName("source"); source.setImplementationClass(DataSource.class.getName()); - source.setOutputPortGroup(new String[] {Object.class.getName()}, null, null); + source.setOutputPorts(new String[] {Object.class.getName()}, null, null); spec.getTasks().add(source); FlexotaskTaskTemplate sink = new FlexotaskTaskTemplate(); sink.setName("sink"); sink.setImplementationClass(DataSink.class.getName()); - sink.setInputPortGroup(new String[] {Object.class.getName()}, null, null); + sink.setInputPorts(new String[] {Object.class.getName()}, null, null); sink.setTimingData(new SimpleTimingAnnotation(new long[]{ 10 * MILLISECOND })); spec.getTasks().add(sink); FlexotaskConnectionTemplate conn = new FlexotaskConnectionTemplate(); Modified: trunk/flexotask-generic/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java =================================================================== --- trunk/flexotask-generic/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java 2008-11-12 16:40:46 UTC (rev 88) +++ trunk/flexotask-generic/src/com/ibm/realtime/flexotask/template/FlexotaskTemplate.java 2008-11-12 16:41:11 UTC (rev 89) @@ -18,7 +18,7 @@ /** * A specification of an entire graph of Flexotasks, graph inputs, - * graph outputs, and connections. An FlexotaskTemplate is + * graph outputs, and connections. A FlexotaskTemplate is * validated as a whole and instantiated as a whole. The resulting instance is passed * to the scheduler as a whole to obtain the graph's FlexotaskRunner. * This class exists in both a generic and non-generic version depending on the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 16:40:50
|
Revision: 88 http://flexotask.svn.sourceforge.net/flexotask/?rev=88&view=rev Author: jsauerbach Date: 2008-11-12 16:40:46 +0000 (Wed, 12 Nov 2008) Log Message: ----------- API and javadoc cleanup, including some minor interface changes (mostly renamings). Modified Paths: -------------- trunk/flexotask-devtest/tst/devtime/test1/TestMyFlexotask.java Modified: trunk/flexotask-devtest/tst/devtime/test1/TestMyFlexotask.java =================================================================== --- trunk/flexotask-devtest/tst/devtime/test1/TestMyFlexotask.java 2008-11-12 16:40:13 UTC (rev 87) +++ trunk/flexotask-devtest/tst/devtime/test1/TestMyFlexotask.java 2008-11-12 16:40:46 UTC (rev 88) @@ -37,7 +37,7 @@ reset(); try { - CodeAnalysisResult result = doValidation(classNames, FlexotaskStableMode.AUTO); + CodeAnalysisResult result = doValidation(classNames, FlexotaskStableMode.MARKER); assertTrue(result.getStableClasses().size() == 1); assertTrue(result.getFlexotaskClasses().size() == 1); assertTrue(result.getLiveClasses().size() == 1); @@ -93,7 +93,7 @@ TypeRuleViolationException exception = null; CodeAnalysisResult result = null; try { - result = doValidation(classNames, FlexotaskStableMode.AUTO); + result = doValidation(classNames, FlexotaskStableMode.MARKER); } catch (TypeRuleViolationException e) { exception = e; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-12 16:40:24
|
Revision: 87 http://flexotask.svn.sourceforge.net/flexotask/?rev=87&view=rev Author: jsauerbach Date: 2008-11-12 16:40:13 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Programmer's guide further progress: documentation of template API and other cleanups and improvements. Modified Paths: -------------- trunk/flexotask/doc/flexotaskProgramming.html Modified: trunk/flexotask/doc/flexotaskProgramming.html =================================================================== --- trunk/flexotask/doc/flexotaskProgramming.html 2008-11-11 20:26:31 UTC (rev 86) +++ trunk/flexotask/doc/flexotaskProgramming.html 2008-11-12 16:40:13 UTC (rev 87) @@ -41,11 +41,14 @@ <li><a href="#testingRuntime">Testing and Using the Real-Time Runtime</a> </ul> <li><a href="#templates">Constructing Templates</a> +<ul> +<li><a href="#templateAPI">The Template API</a> +</ul> <li><a href="#tasks">Writing Flexotasks</a> </ul> </ul> -<h2><a name="post-install"></a>Post-Install Testing</h2> +<br><hr><br><h2><a name="post-install"></a>Post-Install Testing</h2> <p>Everyone should perform this step to ensure that Flexible Task Graphs have been correctly installed. @@ -73,7 +76,7 @@ that the <b>JUnit</b> view eventually shows (after about a minute) that all tests ran successfully. -<h2><a name="papers"></a>Relevant papers</h2> +<br><hr><br><h2><a name="papers"></a>Relevant papers</h2> <p>The Flexible Task Graph systems is described in a paper in LCTES 2008, and the four programming models that it consolidates are each @@ -101,7 +104,7 @@ R. Guerraoui, J. Vitek, published in OOPSLA 2007 </ul> -<h2><a name="samples"></a>The Samples</h2> +<br><hr><br><h2><a name="samples"></a>The Samples</h2> <p>The <b>flexotask-functiontest</b> project will run as a JUnit test for quick verification after system changes, but it is deliberately @@ -110,7 +113,7 @@ occupies a package. The procedure for creating this project is described under <a href="#post-install">post-install testing</a>. -<h3><a name="pendulum"></a>The Inverted Pendulum example from the +<br><hr><br><h3><a name="pendulum"></a>The Inverted Pendulum example from the LCTES 2007 Exotasks Paper</h3> <p>The package for this example is called <b>lctes2007</b> The example @@ -174,7 +177,7 @@ Flexotask editor to complete the example. This limitation may be removed soon if someone wants to work on eliminating it. -<h3><a name="modes"></a>A Multiple Mode Example also illustrating +<br><hr><br><h3><a name="modes"></a>A Multiple Mode Example also illustrating Simple Parameters</h3> <p>The <b>modes</b> example illustrates the more advanced of the two @@ -211,7 +214,7 @@ class) but they use the parameter as an <b>Integer</b> comparand to cause the two predicates to perform different tests. -<h3><a name="communicating"></a>A Weakly Isolated Task Graph +<br><hr><br><h3><a name="communicating"></a>A Weakly Isolated Task Graph (Communicating Parameters)</h3> <p>The <b>communicating</b> example is an example of how a Flexible @@ -239,7 +242,7 @@ href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html">FlexotaskXMLParser</a> class programmatically. -<h3><a name="types"></a>An Example for Experimenting with allowed Data Types</h3> +<br><hr><br><h3><a name="types"></a>An Example for Experimenting with allowed Data Types</h3> <p>The <b>types</b> example illustrates that both <b>ArrayList</b> and <b>HashMap</b> are acceptable types to be passed between Flexotasks @@ -251,13 +254,13 @@ transmitted between the two Flexotasks. <p>This example also illustrates that a <a -href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html">FlexotaskTemplate</a> +href="com/ibm/realtime/flexotask/template/package-summary.html">FlexotaskTemplate</a> can be built up programmatically (the <b>Generator</b> classes in the <b>lctes2007</b> and <b>modes</b> examples do this internally). The <b>Main</b> class of this example constructs the graph directly and then validates it. The editor and XML parser were not used anywhere in the development cycle. -<h3><a name="highfreq"></a>The High Frequency Reader Example from the LCTES 2008 Paper</h3> +<br><hr><br><h3><a name="highfreq"></a>The High Frequency Reader Example from the LCTES 2008 Paper</h3> <p>The <b>highfreqread</b> example closely resembles the code used to collect the data for Section 5.1 of our Flexible Task Graphs paper @@ -289,12 +292,12 @@ running in the same virtual machine with the task graph. </ul> -<h2><a name="application"></a>Notes for Application Programmers</h2> +<br><hr><br><h2><a name="application"></a>Notes for Application Programmers</h2> <p>This section provides information that is of use for writing and testing actual Flexotask applications. -<h3><a name="simReal"></a>Simulated and real-time execution modes</h3> +<br><hr><br><h3><a name="simReal"></a>Simulated and real-time execution modes</h3> <p>When you test a Flexotask program under Eclipse, you are running in "simulated" mode. That is, @@ -341,7 +344,8 @@ <p><img width=441 height=136 src="runtimeExportError.jpg"></p> <p>This means you do not have the plugin to generate the parts of the -runtime needed for real-time execution. Follow the procedure in <a +runtime needed for real-time execution. Choose <b>Cancel</b>, then +cancel the main export wizard and follow the procedure in <a href="#obtainingJ9Bridge">the next subsection</a>. <p>If you do have the necessary IBM support, you will get something @@ -366,7 +370,7 @@ <a href="#testingRuntime">below</a> which also provides general information about running programs in the real-time execution mode. -<h4><a name="obtainingJ9Bridge"></a>Obtaining the Runtime to +<br><hr><br><h4><a name="obtainingJ9Bridge"></a>Obtaining the Runtime to Use with IBM WebSphere Real Time</h4> <p>This procedure is only necessary if you installed Flexible Task @@ -377,7 +381,7 @@ <p>Use the Eclipse Update Manager to obtain the support. The procedure differs somewhat between Eclipse 3.3.x and Eclipse 3.4.x. -<h5>Obtaining the IBM Runtime using Eclipse 3.3.x</h5> +<br><hr><br><h5>Obtaining the IBM Runtime using Eclipse 3.3.x</h5> <p><p>Select <b>Help→Software Updates→Find And Install</b>, then select <b>Search For New Features to Install</b> and @@ -387,7 +391,7 @@ <b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and select it. Complete the dialog to install the feature. -<h5>Obtaining the IBM Runtime using Eclipse 3.4.x</h5> +<br><hr><br><h5>Obtaining the IBM Runtime using Eclipse 3.4.x</h5> <p><p>Select <b>Help→Software Updates</b>, then select the <b>Available Software</b> tab. If you don't see the update site @@ -398,7 +402,7 @@ <b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and select it. Complete the dialog to install the feature. -<h4><a name="obtainingWRT"></a>Obtaining The IBM WebSphere Real Time VM Itself</h4> +<br><hr><br><h4><a name="obtainingWRT"></a>Obtaining The IBM WebSphere Real Time VM Itself</h4> <p>You can download copies of the IBM WebSphere Real Time VM from <a href="http://www.ibm.com/developerworks/java/jdk/linux/download.html">IBM @@ -409,14 +413,13 @@ you choose the Java 6 version, note that you must use the "WebSphere Real Time" product, <em>not</em> the "WebSphere Soft Real Time" product. Flexotask support for the soft real time product may be -offered in the future. +offered in the future. Our supplied runtime will also +work with some still-older versions of WRT (Version 1 SR1 and SR2) if +you have obtained these at an earlier time. <p>The Flexible Task Graphs code was most extensively tested with -Version 1 SR3 but we are working to achieve equivalent results on -Version 2 and it mostly seems to work. Our supplied runtime will also -work with some still-older versions of WRT (Version 1 SR1 and SR2) if -you have obtained these at an earlier time. However, we will not -spend much effort debugging on those versions. +Version 1 SR3 but the same functionality appears to work on Version 2 +and we will emphasize support for the latest version in the long run. <p>To use WRT effectively with these releases you need a Linux kernel at version 2.6.21 or later. Version 2 of WRT was tested with Red Hat @@ -425,12 +428,13 @@ will work if they have the real-time capabilities (the suffix -rt indicates this). -<h4><a name="testingRuntime"></a>Testing and Using the Real-Time Runtime</h4> +<br><hr><br><h4><a name="testingRuntime"></a>Testing and Using the Real-Time Runtime</h4> <p>The <b>flexotask-functiontest</b> project provides a script for -packing the necessary tests into a <b>jar</b> file. Locate the file -<b>export.xml</b>, right click and select <b>Run As→Ant -Build</b>. Refresh the project and find the file +packaging itself as a <b>jar</b> file so that you can repeat the same +JUnit tests that you ran under Eclipse, this time using a real-time +VM. Locate the file <b>export.xml</b>, right click and select <b>Run +As→Ant Build</b>. Refresh the project and find the file <b>flexotaskFunctionTest.jar</b>. Copy this file to the Linux machine on which you have IBM WebSphere Real Time installed and to which you exported your Flexotask runtime. @@ -463,9 +467,315 @@ <p>This example should be readily extended to running your own programs. -<h3><a name="templates"></a>Constructing Templates</h3> +<br><hr><br><h3><a name="templates"></a>Constructing Templates</h3> -<h3><a name="tasks"></a>Writing Flexotasks</h3> +<p>A Flexible Task Graph starts out its life as a <em>template</em> +which is then validated and instantiated by the system. The template +describes +<ol> +<li>the tasks that will make up the task graph (at least one) +<li>the input and output <em>ports</em> of those tasks (if any) +<li>the connections between the ports (if any) +<li>the Java classes that implement each task +<li>(optionally) a parameter to use as part of the initialization of each task +</ol> +The template as a whole, plus the specification of each task, port, +and connection, has certain properties that can assume certain values. +Some (but not all) of these properties are <em>timing annotations</em> +whose syntax depends on the selected <em>timing grammar</em> for the +template. +<p>Templates have both an XML representation and a runtime +representation as a tree of Java classes. There are at present three +scenarios for creating templates and making them available at runtime. + +<ol> +<li>The runtime representation of a template can be created +programmatically using the API provided by the <a +href="com/ibm/realtime/flexotask/template/package-summary.html">com.ibm.realtime.flexotask.template</a> +package. This approach is suitable for small simple graphs, +particularly single-task graphs. + +<li>A template can be created with the Flexotask Editor, saved as XML, +and then converted by the <a +href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html#main(java.lang.String[])">FlexotaskXMLParser +main program</a> into Java source. The Java source is then compiled +into a class whose static <b>generateGraph()</b> method is invoked to +create the runtime representation of the template. This approach is +suitable for large task graphs, especially when the target virtual +machine is an embedded system that lacks an XML parser. + +<li>A template can be created with the Flexotask Editor, saved as XML, +and then parsed directly from XML to the runtime representation using +the <b>parse</b>, <b>parsefile</b>, <b>parseStream</b>, or +<b>parseString</b> method of <a +href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html">FlexotaskXMLParser</a>. +This approach is the most straightforward for large task graphs when +the target system has an XML parser. +</ol> + +<br><hr><br><h4><a name="templateAPI"></a>The Template API</h4> + +<p>For fast reference to subsections, use this outline. +<ul> +<li><a href="#templateGlobal">Template Global Properties</a> +<li><a href="#templateTasks">Adding Tasks to a Template</a> +<li><a href="#templatePorts">Adding Ports to a Task</a> +<li><a href="#templatePredicates">Adding Predicates to a Template</a> +<li><a href="#templateCommunicators">Adding Communicators to a Template</a> +<li><a href="#templateConnections">Adding Connections to a Template</a> +</ul> + +<p>To begin the construction of a template, use <b>new +FlexotaskTemplate()</b>. From this starting point, you add global +properties, tasks, and connections. Tasks include normal tasks, +predicates, and communicators. + +<br><hr><br><h5><a name="templateGlobal"></a>Template Global Properties</h5> + +<p>Methods that manipulate global properties include +<ul> +<li><b>setAllocating</b> to establish whether tasks of the graph are allowed to allocate (default is <b>true</b>) + +<li><b>setStableMode</b> to establish how storage in the task's private memory area is to be partitioned +into stable and transient areas (default is to make all storage stable, as in the Exotasks model) + +<li><b>setSynchronizing</b> to establish whether tasks of the graph +are allowed to use Java synchronized methods and blocks (default is +<b>true</b>, but if the graph is strongly isolated, then the +synchronization will have no effect). + +<li><b>setTimingData</b> to establish the timing grammar for the graph +and any global properties that go with that timing grammar. More on +this below. +</ul> + +There is more detail on these options <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html">in +the javadoc</a>. + +<p>An additional global property of a template is whether the +resulting graph is weakly or strongly isolated. There is no API for +setting or interrogating this property. Instead, the property is +inferred from task properties. If any task in the graph is weakly +isolated, then the graph is weakly isolated. If all tasks of the +graph are strongly isolated, then the graph is strongly isolated. + +<p>The <b>TimingData</b> property of a template must be set if the +template is to be schedulable. The argument to <b>setTimingData</b> +must be a class that extends <a +href="com/ibm/realtime/flexotask/timing/FlexotaskGlobalTimingData.html">FlexotaskGlobalTimingData</a>. +Note that <em>all</em> of the methods defined in the abstract parent class are +for use by aspects of the implementation: all of the "interesting" +information is determined by the particular concrete implementation that you +choose. In the core Flexible Task Graphs system, we provide <a +href="com/ibm/realtime/flexotask/timing/simple/Period.html">Period</a> +and <a +href="com/ibm/realtime/flexotask/timing/simple/ModeList.html">ModeList</a>, +both of which cause one of the built-in <em>time triggered</em> timing +grammars to apply to the rest of template. The former assigns a +period of execution to the entire graph. The latter establishes one +or more <em>modes</em>, each of which has its own period and contains +a subset of the tasks in the graph. Other timing grammars exist and +will (we hope) become available as plugins. These include a streaming +grammar developed by Jesper Spring as part of his thesis at EPFL, a +PTIDES grammar being developed by Jia Zou and Edward Lee at UC +Berkeley, and an HTL grammar originally developed for Exotasks by +Daniel Iercan at the University of Salzburg, which is in the process +of being converted into a Flexotask timing grammar. + +<br><hr><br><h5><a name="templateTasks"></a>Adding Tasks to a Template</h5> + +<p>Most generally, tasks may be "normal" tasks, predicates or +communicators. This section describes how to add normal tasks. +Predicates and communicators are discussed separately. + +<p>To add a normal task, first create a default, empty, <a +href="com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.html">FlexotaskTaskTemplate</a> +with <b>new FlexotaskTaskTemplate()</b>. Finish initializing it, then +add it to the <b>Set</b> obtained by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#getTasks()">getTasks()</a> +on the main template. In a Java 1.5 (or later) project, <b>getTasks()</b> +returns a <b>Set<FlexotaskTaskTemplate></b> instead of a raw +<b>Set</b>. + +<p>A task has properties, and optionally input and output ports. Each +port has some properties. + +<p>Task global properties are as follows. +<ul> +<li><b>setName</b> establishes a name for the task. Every task in a +Flexible Task Graph must have a unique name. + +<li><b>setImplementationClass</b> establishes the implementation class +for the task. The argument is a String but it must name a class that +implements <a +href="com/ibm/realtime/flexotask/Flexotask.html">Flexotask</a> (either +directly or by implementing a subinterface or by extending another +class, which might be the special abstract class <a +href="com/ibm/realtime/flexotask/AtomicFlexotask.html">AtomicFlexotask</a>). + +<li><b>setParameterType</b> establishes the type of a default +parameter that will be declared statically as part of the template and +passed to the task's <b>initialize</b> method if (and only if) no +parameter is supplied at runtime via the parameter map + +<li><b>setParameterValue</b> establishes the value of a default +parameter whose type is given by <b>setParameterType</b>. + +<li><b>setWeaklyIsolated</b> establishes whether the task is strongly +or weakly isolated. The default (contradicting what is stated in the +paper) is strong isolation (this may change in the future). + +<li><b>setTimingData</b> establishes a timing annotation for the task. +More on this below. +</ul> +There is more detail on these options <a +href="com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.html">in +the javadoc</a>. + +<p>The <b>ParameterType</b> and <b>ParameterName</b> properties form a +pair; if one is specified, both must be specified. + +<p>Not all tasks necessarily need timing annotations. Whether they +need them, and what timing annotation to use, is determined by the +timing grammar (which is, in turn determined by the +<b>setTimingData</b> call on the main template). A timing annotation +applied to a task or connection must extend <a +href="com/ibm/realtime/flexotask/timing/FlexotaskTimingData.html">FlexotaskTimingData</a>. +As is the case with the global timing data, all of the interesting +properties are determined by the timing grammar. With the time +triggered grammars, the only annotation that can apply to a normal +task is <a +href="com/ibm/realtime/flexotask/timing/simple/SimpleTimingAnnotation.html">SimpleTimingAnnotation</a>. +The simplest usage is to assign exactly one time offset to the task +using <b>new SimpleTimingAnnotation(offset)</b> but the javadoc +describes some more advanced options. + +<br><hr><br><h5><a name="templatePorts"></a>Adding Ports to a Task</h5> + +<p>The least error-prone way to specify ports programmatically is as follows. + +<ol> +<li>Create a <a +href="com/ibm/realtime/flexotask/template/FlexotaskPortTemplate.html">FlexotaskPortTemplate</a> +for each port. + +<li>Set the name, type, and buffering properties of each port via its +template. The type is required. Buffering defaults to <b>false</b> +(unbuffered). The name defaults to a system generated name based on +the type of port and its index position amongst the ports of the task. + +<li>Create the array of input port templates in the desired index +order and add it to the task template by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.html#setInputPorts(com.ibm.realtime.flexotask.template.FlexotaskPortTemplate[])">the +<b>setInputPorts</b> function for that form of argument</a>. + +<li>Do the same with the output ports, calling <b>setOutputPorts</b> +instead. +</ol> + +<p>There are also convenience forms of <a +href="com/ibm/realtime/flexotask/template/FlexotaskTaskTemplate.html#setInputPorts(java.lang.String[],%20boolean[],%20java.lang.String[])">setInputPorts</a> +and <b>setOutputPorts</b> that bypass the creation of port templates. +These can be used when the number of ports is small and most port +names and buffering attributes are defaulted. + +<br><hr><br><h5><a name="templatePredicates"></a>Adding Predicates to a Template</h5> + +<p>To add a predicate task, first create a default, empty, <a +href="com/ibm/realtime/flexotask/template/FlexotaskPredicateTemplate.html">FlexotaskPredicateTemplate</a> +with <b>new FlexotaskPredicateTemplate()</b>. Finish initializing it, then, since a predicate is a task, +add it to the <b>Set</b> obtained by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#getTasks()">getTasks()</a> +on the main template. In a Java 1.5 (or later) project, <b>getTasks()</b> +returns a <b>Set<FlexotaskTaskTemplate></b> instead of a raw +<b>Set</b>. A predicate template is a subclass of task template. + +<p>A predicate may not have output ports, and its implementation class +must implement <a +href="com/ibm/realtime/flexotask/FlexotaskPredicate.html">FlexotaskPredicate</a> +Otherwise, the initialization of a predicate template follows the same +pattern as a task template. + +<p>The timing data for a predicate will often differ from that of a +normal task because predicates are intended to affect the scheduler. +In the TT timing grammar, predicates must be assigned a <a +href="com/ibm/realtime/flexotask/timing/simple/SimpleModeSwitch.html">SimpleModeSwitch</a> +annotation so that the predicate can assume its expect role in +controlling mode switches. + +<br><hr><br><h5><a name="templateCommunicators"></a>Adding Communicators to a Template</h5> + +<p>To add a communicator task, first create a default, empty, <a +href="com/ibm/realtime/flexotask/template/FlexotaskCommunicatorTemplate.html">FlexotaskCommunicatorTemplate</a> +with <b>new FlexotaskCommunicatorTemplate()</b>. Finish initializing +it, then, since a communicator is a task, add it to the <b>Set</b> +obtained by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#getTasks()">getTasks()</a> +on the main template. In a Java 1.5 (or later) project, <b>getTasks()</b> +returns a <b>Set<FlexotaskTaskTemplate></b> instead of +a raw <b>Set</b>. A communicator template is a subclass of task +template. + +<p>To initialize a communicator template, <b>setName</b> and +<b>setParameterType</b> <em>must</em> be called, while +<b>setParameterValue</b> and <b>setTimingData</b> <em>may</em> be +called. Most other aspects of task template initialization are +illegal for communicators: the parameter type determines the types of +its two ports and no other ports may be specified. A communicator has +a fixed implementation provided by the system. It is always weakly +isolated and that property cannot be changed. + +<br><hr><br><h5><a name="templateConnections"></a>Adding Connections to a Template</h5> + +<p>To add a connection, first create a default, empty, <a +href="com/ibm/realtime/flexotask/template/FlexotaskConnectionTemplate.html">FlexotaskConnectionTemplate</a> +with <b>new FlexotaskConnectionTemplate()</b>. Finish initializing +it, then add it to the <b>Set</b> obtained by calling <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html#getConnections()">getConnections()</a> +on the main template. In a Java 1.5 (or later) project, +<b>getConnections()</b> returns a +<b>Set<FlexotaskConnectionTemplate></b> instead of a raw +<b>Set</b>. There is also a convenience constructor that permits the +creation of a connection template in one step, since these templates +are usually created after all the tasks have been specified. + +<p>A connection has the following properties. +<ul> +<li><b>setName</b> provides an optional name for the connection. If +no name is supplied, the system will generate a convenient name. +Connection names are generally only important in diagnostic messages. + +<li><b>setInput</b> (required) establishes the task whose output port +provides the input to the connection + +<li><b>setOutputPortToRead</b> specifies the particular output port of +the input task that should be read. If not specified, the first (or +only) output port is assumed. + +<li><b>setOutput</b> (required) establishes the task whose input port +will receive the output of the connection + +<li><b>setInputPortToWrite</b> specifies the particular input port of +the output task that should be written. If not specified, the first (or +only) input port is assumed. + +<li><b>setConnectionMode</b> specifies how object references are +transmitted on the connection. The three options ("by reference", "by +deep clone" and "hybrid") are described in detail in the description +of the <a +href="com/ibm/realtime/flexotask/template/FlexotaskConnectionMode.html">FlexotaskConnectionMode</a> +class. + +<li><b>setTimingData</b> establishes a timing annotation for the +connection. Not all connections need timing annotations and not all +timing grammars even allow connections to have timing annotations. In +the TT timing grammar, connections can have annotations on the same +basis as tasks. +</ul> + +<br><hr><br><h3><a name="tasks"></a>Writing Flexotasks</h3> + </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 20:26:33
|
Revision: 86 http://flexotask.svn.sourceforge.net/flexotask/?rev=86&view=rev Author: jsauerbach Date: 2008-11-11 20:26:31 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Improve title bar to be more informative Modified Paths: -------------- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java Modified: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java 2008-11-11 17:30:00 UTC (rev 85) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java 2008-11-11 20:26:31 UTC (rev 86) @@ -61,8 +61,7 @@ */ public void addPages() { mainPage = new WizardNewProjectCreationPage("project"); - mainPage.setTitle("Create a Flexotask Project"); - mainPage.setDescription("Create a Flexotask Project in the Workspace or external location"); + mainPage.setTitle("Create the Flexible Task Graphs Function Test and Samples Project"); mainPage.setInitialProjectName("flexotask-functiontest"); addPage(mainPage); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 17:30:04
|
Revision: 85 http://flexotask.svn.sourceforge.net/flexotask/?rev=85&view=rev Author: jsauerbach Date: 2008-11-11 17:30:00 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Update documentation Modified Paths: -------------- trunk/flexotask/doc/flexotaskProgramming.html Added Paths: ----------- trunk/flexotask/doc/runtimeExportDialog.jpg trunk/flexotask/doc/runtimeExportError.jpg Modified: trunk/flexotask/doc/flexotaskProgramming.html =================================================================== --- trunk/flexotask/doc/flexotaskProgramming.html 2008-11-11 16:12:11 UTC (rev 84) +++ trunk/flexotask/doc/flexotaskProgramming.html 2008-11-11 17:30:00 UTC (rev 85) @@ -4,7 +4,468 @@ <title>Flexible Task Graphs Programmer and Developer's Guide</title> </head> <body> -<h1>Flexible Task Graphs Programmer and Developer's Guide</h1> -<p>Under construction. +<h1>Flexible Task Graphs Programmer and Developer's Guide</h1> + +<p>If you are reading this, you have successfully installed the +Flexible Task Graphs feature in your Eclipse IDE. + +<p>These high level instructions complement the detailed <a +href="index.html">javadoc</a> for the Flexible Task Graphs API. They +include sections to support <em>application programming</em> (using +Flexible Task Graphs to develop real-time Java control applications), +<em>system extension</em> (writing new schedulers, timing grammars, +distributers, and instrumentation for Flexible Task Graphs), <em>core +development</em> (contributing to the evolution of the Flexible Task +Graphs programming model and its supporting code), and <em>tool +developement </em> (creating new tools to generate Flexible Task +Graph templates). + +<p>The following outline will help you find relevant information. +<ul> +<li><a href="#post-install">Post-Install Testing</a> +<li><a href="#papers">Relevant Papers</a> +<li><a href="#samples">The Samples</a> +<ul> +<li><a href="#pendulum">The Inverted Pendulum Example from the LCTES 2007 Exotasks Paper</a> +<li><a href="#modes">A Multiple Mode Example also illustrating Simple Parameters</a> +<li><a href="#communicating">A Weakly Isolated Task Graph (Communicating Parameters)</a> +<li><a href="#types">An Example for Experimenting with allowed Data Types</a> +<li><a href="#highfreq">The High Frequency Reader Example from the LCTES 2008 Paper</a> +</ul> +<li><a href="#application">Notes for Application Programmers</a> +<ul> +<li><a href="#simReal">Simulated and real-time execution modes</a> +<ul> +<li><a href="#obtainingJ9Bridge">Obtaining the Runtime to use with IBM WebSphere Real Time</a> +<li><a href="#obtainingWRT">Obtaining the IBM WebSphere Real Time VM Itself</a> +<li><a href="#testingRuntime">Testing and Using the Real-Time Runtime</a> +</ul> +<li><a href="#templates">Constructing Templates</a> +<li><a href="#tasks">Writing Flexotasks</a> +</ul> +</ul> + +<h2><a name="post-install"></a>Post-Install Testing</h2> + +<p>Everyone should perform this step to ensure that Flexible Task +Graphs have been correctly installed. + +<p>Choose <b>File→New→Project</b>. Under the +<b>Flexotask</b> category, select <b>Flexotask Function Test and +Samples Project</b>. If these options do not appear on the <b>New +Project</b> wizard page, your installation did not work. Submit a <a +href="http://sourceforge.net/tracker/?atid=1119822&group_id=242572">support +request</a> for help. + +<p>You should see a Java project creation wizard page with the project +name <b>flexotask-functiontest</b> filled in. You may change the +location or name, although we recommend keeping the name. Press +<b>Finish</b>. + +<p>If the resulting project is not created or built successfully, +there may be a problem with your installation. +Submit a <a +href="http://sourceforge.net/tracker/?atid=1119822&group_id=242572">support +request</a> for help. + +<p>Right click on the new project and select <b>Run As→JUnit +Test</b>. Ignore what shows in the <b>Console</b> view but make sure +that the <b>JUnit</b> view eventually shows (after about a minute) +that all tests ran successfully. + +<h2><a name="papers"></a>Relevant papers</h2> + +<p>The Flexible Task Graph systems is described in a paper in LCTES +2008, and the four programming models that it consolidates are each +described in an earlier paper. Here are links to all five papers. + +<ul> +<li><a href="http://portal.acm.org/citation.cfm?id=1375659">Flexible +task graphs: a unified restricted thread programming model for +java</a> by Joshua Auerbach, David F. Bacon, Rachid Guerraoui, Jesper +Honig Spring, and Jan Vitek, published in LCTES 2008. +<li><a +href="http://portal.acm.org/citation.cfm?id=1133255.1134015">Eventrons: +a Safe Programming Construct for High-frequency Hard Real-time +Applications</a> by D. Spoonhower, J. Auerbach, D. F. Bacon, P. +Cheng, and D. Grove, published in PLDI 2006. +<li><a href="http://portal.acm.org/citation.cfm?id=1254775">Java Takes +Flight: Time-portable Real-time Programming with Exotasks</a> by +J.Auerbach, D. F. Bacon, D. T. Iercan, C. M. Kirsch, V. T. Rajan, +H. R. Roeck, and R. Trummer, published in LCTES 2007 +<li><a href="http://portal.acm.org/citation.cfm?id=1254837">Reflexes: +abstractions for highly responsive systems</a> by J. Spring, F. Pizlo, +R. Guerraoui, and J. Vitek, published in VEE 2007. +<li><a href="http://portal.acm.org/citation.cfm?id=1297043">Streamflex: +high-throughput stream programming in java</a> by J. Spring, J. Privat, +R. Guerraoui, J. Vitek, published in OOPSLA 2007 +</ul> + +<h2><a name="samples"></a>The Samples</h2> + +<p>The <b>flexotask-functiontest</b> project will run as a JUnit test +for quick verification after system changes, but it is deliberately +structured as a set of individual sample programs that can be +inspected for guidance on how to get started. Each sample program +occupies a package. The procedure for creating this project is +described under <a href="#post-install">post-install testing</a>. + +<h3><a name="pendulum"></a>The Inverted Pendulum example from the +LCTES 2007 Exotasks Paper</h3> + +<p>The package for this example is called <b>lctes2007</b> The example +does not do anything very exciting but it allows you to do the +following. + +<ol> +<li>Inspect the Flexotask Template using the Flexotask editor. Double +click on the file <b>Example.ftg</b> in the package folder. + +<li>Look at the code of each Flexotask by double clicking on it the editor. + +<li>Look at the main program code to run the task graph. Note the use +of the <b>Generator</b> class which is discussed below. +</ol> + +<p>One of the source files in this example (<b>Generator.java</b>) is +machine-generated. The main program obtains the Flexotask template +corresponding to <b>Example.ftg</b> by executing +<b>Generator.generateGraph()</b>. This is only one of several ways to +obtain the template at runtime but it combines the advantages of (1) +working on embedded systems that don't have an XML parser and (2) +using the <b>Example.ftg</b> file created by the graphical editor +instead of a programmatic API to obtain the template. + +<p>Take a look at the file <b>generators.xml</b>. You will see something like +this: + +<pre> +<java classname="com.ibm.realtime.flexotask.tools.FlexotaskXMLParser" + dir="${basedir}/src/lctes2007/" fork="yes"> + <classpath> + <pathelement path="${flexotask.library}"/> + </classpath> + <arg value="Example.ftg"/> + <arg value="Generator"/> + <arg value="lctes2007"/> +</java> +</pre> + +<p>The program <b>FlexotaskXMLParser.main()</b> will convert a +Flexotask template into a "generator class" for use at runtime. +Details on the syntax are in <a +href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html#main(java.lang.String[])">the +javadoc</a>. The special <b>Ant</b> property <b>flexotask.library</b> +will make this program available in a build script. + +<p>The <b>lctes2007</b> example illustrates a current limitation of the Flexotask +editor (but not of the programming model). If you open +<b>Example.ftg</b> in the editor and click on the first connection, +you will note that the connection data type is <b>double[]</b> (as in +the paper). The code of <b>Sensor</b> and <b>Compute</b> indeed +assumes this, and the example executes correctly. However, if you had +tried to enter this example from scratch, you would find that the +<b>Class selection</b> dialog (based on the standard Eclipse <b>Open +Type</b> dialog) does not permit the specification of array classes. +To specify array classes in a template, simply bypass the editor. In +the editor, enter an arbitrary class such as <b>Object</b>. Then, +edit the resulting <b>Example.ftg</b> file with a text editor, change +<b>java.lang.Object</b> to <b>double[]</b>. Then, return to the +Flexotask editor to complete the example. This limitation may be +removed soon if someone wants to work on eliminating it. + +<h3><a name="modes"></a>A Multiple Mode Example also illustrating +Simple Parameters</h3> + +<p>The <b>modes</b> example illustrates the more advanced of the two +supplied timing grammars. When you examine <b>modes/Example.ftg</b> +in the Flexotask editor, you will see that it employs the <b>TT +Multi-Mode</b> grammar, which permits the program to be divided into +<i>modes</i>. A mode is simply a subset of the graph that is active +at a particular time; by switching modes, the program can change which +subset is active. A Flexotask can belong to multiple modes. For +example, while <b>downTask</b> belongs only to the <b>countDown</b> +mode and <b>upTask</b> belongs only the <b>countUp</b> mode, the +<b>counter</b> task belongs to both. As illustrated, different modes +can have different periods, and a task can have different timing +offsets in the different modes to which it belongs. + +<p>This example also shows the two special task types available in the +model, <i>communicators</i> and <i>predicates</i> (which were called +<i>conditions</i> in the LCTES 2007 Exotasks paper). A predicate +controls the switching from one mode to another, based on the value +returned by its <b>isTrue</b> method and its <b>targetMode</b> +property. A communicator is just a typed buffer that holds a value +between periods. Communicators also have a special role to play in +writing distributers and may be special to certain timing grammars +(the HTL timing grammar used for Exotasks gave a special role to +communicators; this grammar has not yet been converted to work with +the Flexotask model but may be available soon). + +<p>Finally, the example illustrates one useful role for parameters. +This example is strongly isolated, so the parameters passed to the two +predicates are passed "by value" (ie, they are cloned) and cannot be +used to communicate with other Java threads. But, they are used in a +more traditional sense to parameterize the behavior of the predicates. +Both predicates share the same implementation (the <b>Equals</b> +class) but they use the parameter as an <b>Integer</b> comparand to +cause the two predicates to perform different tests. + +<h3><a name="communicating"></a>A Weakly Isolated Task Graph +(Communicating Parameters)</h3> + +<p>The <b>communicating</b> example is an example of how a Flexible +Task Graph can use pinned reference-immutable objects and the exchange +of scalar values with the rest of the Java application. In this +example, the tasks <b>T1, T2,</b> and <b>T3</b> are strongly isolated +while <b>Input</b> and <b>Output</b> are weakly isolated. The +implementation Flexotask classes of the two "edge" tasks +(<b>InputHandler</b> and <b>OutputHandler</b>, respectively), use the +simplest possible example of a reference-immutable object (an +<b>int[]</b> of length 1) to pass integer values to and from the +outside. As a result, this example is able to pass values into the +graph for processing and get "answers" out the other end. + +<p>This example also differs from the previous two in that it does not +use a <b>Generator</b> class but instead relies on directly parsing the XML +in <b>Example.ftg</b>. In the main program you will see the following. + +<pre> +InputStream in = Main.class.getResourceAsStream("Example.ftg"); +FlexotaskTemplate spec = FlexotaskXMLParser.parseStream(in); +</pre> + +This is one of several ways to use the <a +href="com/ibm/realtime/flexotask/tools/FlexotaskXMLParser.html">FlexotaskXMLParser</a> +class programmatically. + +<h3><a name="types"></a>An Example for Experimenting with allowed Data Types</h3> + +<p>The <b>types</b> example illustrates that both <b>ArrayList</b> and +<b>HashMap</b> are acceptable types to be passed between Flexotasks +(and used within them). It also provides a starting point for +experimenting with more types (see the <b>switch</b> statements in +both <b>DataSource</b> and <b>DataSink</b>). Note that the type of +the connection between the two tasks is <b>java.lang.Object</b> which +permits any type legal for use within an Flexible Task Graph to be +transmitted between the two Flexotasks. + +<p>This example also illustrates that a <a +href="com/ibm/realtime/flexotask/template/FlexotaskTemplate.html">FlexotaskTemplate</a> +can be built up programmatically (the <b>Generator</b> classes in the +<b>lctes2007</b> and <b>modes</b> examples do this internally). The +<b>Main</b> class of this example constructs the graph directly and then validates it. +The editor and XML parser were not used anywhere in the development cycle. + +<h3><a name="highfreq"></a>The High Frequency Reader Example from the LCTES 2008 Paper</h3> + +<p>The <b>highfreqread</b> example closely resembles the code used to +collect the data for Section 5.1 of our Flexible Task Graphs paper +published in LCTES 2008. Like the <b>types</b> example, the +<b>Main</b> class in this example constructs its +<b>FlexotaskTemplate</b> programmatically. + +<p>A number of flexotask features are shown. + +<ul> +<li>The Flexotask in this example (<b>HighFreqReader</b>) extends +<b>AtomicFlexotask</b> and implements <b>HighFreqReaderIntf</b>, which +extends <b>ExternalMethods</b>. Thus, this Flexotask follows the +design pattern for atomic Flexotasks as discussed in Section 2.3.2 of +the paper. + +<li>The template created in the main program uses the <em>manual</em> +approach to establishing the stable and transient classes (see Section +2.2 of the paper). The classes specifically added to the template are +stable and others are transient. + +<li>The main program also illustrates the use of the <a +href="com/ibm/realtime/flexotask/tracing/package-summary.html">tracing +support</a> provided with the Flexible Task Graphs system. + +<li>To aid in evaluating the performance of this (and other) Flexotask +applications, we provide a copy of the <b>MemoryAllocator</b> class +which simulates the effect of an allocation-intensive application +running in the same virtual machine with the task graph. +</ul> + +<h2><a name="application"></a>Notes for Application Programmers</h2> + +<p>This section provides information that is of use for writing and +testing actual Flexotask applications. + +<h3><a name="simReal"></a>Simulated and real-time execution modes</h3> + +<p>When you test a Flexotask program under Eclipse, you are running in +"simulated" mode. That is, +<ul> +<li>the task graph is being run by ordinary +threads that have no special rights and are paused by the garbage collector + +<li>the "private memory areas" of the Flexotasks are fictional and +everything is, in fact, allocated on the public heap + +<li>scheduling is not real-time +</ul> + +Simulated execution gives you a opportunity to find non-time-related +errors and to check that your code is "valid" in Flexotask terms (does +not violate any of the Flexotask restrictions). But, eventually, you +will want to run your program in real-time mode, which must take place +under an OS with real-time capabilities and using a Java VM that +supports the Flexotask real-time VM interfaces. + +<p>Currently, the only real-time platform for which full support +exists is RT Linux with the IBM WebSphere Real Time VM (WRT). Other +platforms could be supported in the future if other VM vendors (or +open source VM projects) choose to implement the <a +href="com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.html">FlexotaskVMBridge</a> +interface. If you installed Flexible Task Graphs starting from the +instructions on IBM alphaWorks, you will have the necessary software +for running on WRT. Otherwise you will need to obtain the IBM runtime +for that platform as described <a +href="#obtainingJ9Bridge">below</a>. + +<p>Although you <em>can</em> configure Eclipse to run on the same +platform as the real-time VM, we generally assume that you will switch +to a "batch" mode of execution for this later phase of testing. The +Flexotask development system provides a wizard that will generate a +runtime for you to run in the real-time environment. If you are not +actively developing or extending the Flexotask system (if you are just +doing application programming) you should only have to do this runtime +generation step once, after which you just use the resulting runtime +for all of your real-time execution. + +<p>Select <b>File→Export→Flexotask→Flexotask +Runtime</b>. You may get something like this: +<p><img width=441 height=136 src="runtimeExportError.jpg"></p> + +<p>This means you do not have the plugin to generate the parts of the +runtime needed for real-time execution. Follow the procedure in <a +href="#obtainingJ9Bridge">the next subsection</a>. + +<p>If you do have the necessary IBM support, you will get something +more like this: + +<p><img width=472 height=550 src="runtimeExportDialog.jpg"></p> + +<p>Select a destination archive (zip) file or directory. If you have +remotely mounted a file system from your target real-time platform, +you can export directly into this file system. However, if you are +running Eclipse on windows and the target platform is Unix +(e.g. Linux), the file permissions may come out wrong when exporting +to a directory. You can avoid this problem by exporting to an archive +file and then unzipping it on the target platform (or you can fix the +permissions manually using <b>chmod</b> on the target platform). + +<p>The generated runtime is only useful in conjunction with a licensed +copy of WRT running on a real-time Linux kernel. For more information +see <a href="#obtainingWRT">below</a>. + +<p>The generated runtime can be tested using the procedure described +<a href="#testingRuntime">below</a> which also provides general +information about running programs in the real-time execution mode. + +<h4><a name="obtainingJ9Bridge"></a>Obtaining the Runtime to +Use with IBM WebSphere Real Time</h4> + +<p>This procedure is only necessary if you installed Flexible Task +Graphs exclusively from the open-source update site on SourceForge. +If you used the installation procedure supplied by IBM alphaWorks you +will already have this support. + +<p>Use the Eclipse Update Manager to obtain the support. The +procedure differs somewhat between Eclipse 3.3.x and Eclipse 3.4.x. + +<h5>Obtaining the IBM Runtime using Eclipse 3.3.x</h5> + +<p><p>Select <b>Help→Software Updates→Find And +Install</b>, then select <b>Search For New Features to Install</b> and +click <b>Next</b>. You should see an update site labeled <b>IBM +Flexible Task Graphs Runtime Update Site</b>. Select (only) that site +and click <b>Finish</b>. <p>Drill down to the feature labelled +<b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and +select it. Complete the dialog to install the feature. + +<h5>Obtaining the IBM Runtime using Eclipse 3.4.x</h5> + +<p><p>Select <b>Help→Software Updates</b>, then select the +<b>Available Software</b> tab. If you don't see the update site +labelled <b>IBM Flexible Task Graphs Runtime Update Site</b>, click on +<b>Manage Sites</b> and then add a checkmark to the needed site to +make it visible. Click <b>Ok</b> and the site should now be visible +in the main dialog. <p>Drill down to the feature labelled +<b>Flexible Task Graphs Runtime for IBM WebSphere Real Time</b> and +select it. Complete the dialog to install the feature. + +<h4><a name="obtainingWRT"></a>Obtaining The IBM WebSphere Real Time VM Itself</h4> + +<p>You can download copies of the IBM WebSphere Real Time VM from <a +href="http://www.ibm.com/developerworks/java/jdk/linux/download.html">IBM +DeveloperWorks</a>. You will need to establish an IBM id, answer some +survey questions, and adhere to the terms of the license. As of this +writing there are two versions available: Version 1 (SR3) implements +the Java 5 language. Version 2 implements the Java 6 language. If +you choose the Java 6 version, note that you must use the "WebSphere +Real Time" product, <em>not</em> the "WebSphere Soft Real Time" +product. Flexotask support for the soft real time product may be +offered in the future. + +<p>The Flexible Task Graphs code was most extensively tested with +Version 1 SR3 but we are working to achieve equivalent results on +Version 2 and it mostly seems to work. Our supplied runtime will also +work with some still-older versions of WRT (Version 1 SR1 and SR2) if +you have obtained these at an earlier time. However, we will not +spend much effort debugging on those versions. + +<p>To use WRT effectively with these releases you need a Linux kernel +at version 2.6.21 or later. Version 2 of WRT was tested with Red Hat +Enterprise MRG V1 (2.6.24.7-74.el5rt) and with SUSE Linux Enterprise +Real Time 10 (2.6.22.19-0.12-rt). However, other recent Linux kernels +will work if they have the real-time capabilities (the suffix -rt +indicates this). + +<h4><a name="testingRuntime"></a>Testing and Using the Real-Time Runtime</h4> + +<p>The <b>flexotask-functiontest</b> project provides a script for +packing the necessary tests into a <b>jar</b> file. Locate the file +<b>export.xml</b>, right click and select <b>Run As→Ant +Build</b>. Refresh the project and find the file +<b>flexotaskFunctionTest.jar</b>. Copy this file to the Linux machine +on which you have IBM WebSphere Real Time installed and to which you +exported your Flexotask runtime. + +<p>The following instructions apply whenever you are running +Flexotasks in real-time mode. + +<ul> +<li>Set the environment variable <b>WRT_HOME</b> to the full path of the directory created by +installing WRT. + +<li>Set the environment variable <b>FTG_HOME</b> to the full path of the directory containing +the Flexotask runtime (this is either the directory you exported to or the directory created +by unzipping the archive you exported to). +</ul> + +<p>To run the function test (assuming that +<b>flexotaskFunctionTest.jar</b> resides in the local directory): + +<pre> +$FTG_HOME/bin/ejava -jar flexotaskFunctionTest.jar +</pre> + +That is, the <b>ejava</b> (or <b>ejavaw</b>) launchers substitute for +the normal <b>java</b> and <b>javaw</b> launchers and have the same +syntax. They automatically add the necessary libraries and natives to +the various paths used by WRT and invoke WRT to run your Flexotask +program. + +<p>This example should be readily extended to running your own +programs. + +<h3><a name="templates"></a>Constructing Templates</h3> + +<h3><a name="tasks"></a>Writing Flexotasks</h3> + </body> </html> Added: trunk/flexotask/doc/runtimeExportDialog.jpg =================================================================== (Binary files differ) Property changes on: trunk/flexotask/doc/runtimeExportDialog.jpg ___________________________________________________________________ Added: svn:mime-type + image/jpeg Added: trunk/flexotask/doc/runtimeExportError.jpg =================================================================== (Binary files differ) Property changes on: trunk/flexotask/doc/runtimeExportError.jpg ___________________________________________________________________ Added: svn:mime-type + image/jpeg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 16:12:15
|
Revision: 84 http://flexotask.svn.sourceforge.net/flexotask/?rev=84&view=rev Author: jsauerbach Date: 2008-11-11 16:12:11 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Ignore files generated by equinox p2 utility Property Changed: ---------------- trunk/flexotask-update/ Property changes on: trunk/flexotask-update ___________________________________________________________________ Modified: svn:ignore - features plugins + features plugins artifacts.xml content.xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 11:00:45
|
Revision: 83 http://flexotask.svn.sourceforge.net/flexotask/?rev=83&view=rev Author: jsauerbach Date: 2008-11-11 11:00:38 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Mark runtime providers according to whether they supply a vm bridge and add warning/cancel dialog if there is none or too many (eventually we will need the ability to pick from amongst multiples). Modified Paths: -------------- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java 2008-11-11 10:59:21 UTC (rev 82) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java 2008-11-11 11:00:38 UTC (rev 83) @@ -43,4 +43,12 @@ { return "Open source runtime components, including ESystem and NativeIO"; } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.dialogs.RuntimeProvider#isVMBridge() + */ + public boolean isVMBridge() + { + return false; + } } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java 2008-11-11 10:59:21 UTC (rev 82) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java 2008-11-11 11:00:38 UTC (rev 83) @@ -81,16 +81,33 @@ */ public void addPages() { + int vmBridges = 0; StringBuilder builder = new StringBuilder("This runtime will contain:\n"); RuntimeProvider[] providers = getRuntimeProviders(); for (int i = 0; i < providers.length; i++) { builder.append(" ").append(providers[i].getDescription()).append("\n"); + if (providers[i].isVMBridge()) { + vmBridges++; + } } builder.append(" Standard Java libraries for the Flexotask API\n"); LibraryProvider[] libraries = GlobalTiming.getAllProviders(); for (int i = 0; i < libraries.length; i++) { builder.append(" ").append(libraries[i].getDescription()).append("\n"); } + if (vmBridges != 1) { + boolean ok; + if (vmBridges == 0) { + ok = MessageDialog.openConfirm(getShell(), "Problem Detected", + "No providers of real-time VM behavior have been registered; generated runtime will not be real-time"); + } else { + ok = MessageDialog.openConfirm(getShell(), "Problem Detected", + "There are " + vmBridges + " providers of real-time VM behavior (current system expects only one). Results may be inconsistent"); + } + if (!ok) { + return; + } + } page = new RuntimeExportWizardPage(builder.toString()); addPage(page); } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java 2008-11-11 10:59:21 UTC (rev 82) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java 2008-11-11 11:00:38 UTC (rev 83) @@ -30,4 +30,10 @@ * @return this provider's one-sentence self-description of what it provides */ public String getDescription(); + + /** + * @return true iff his RuntimeProvider provides the FlexotaskVMBridge service (e.g. supports true real-time + * execution) + */ + public boolean isVMBridge(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 10:59:31
|
Revision: 82 http://flexotask.svn.sourceforge.net/flexotask/?rev=82&view=rev Author: jsauerbach Date: 2008-11-11 10:59:21 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Generalize doc build to cover all packages in com.ibm.realtime.flexotask.* Modified Paths: -------------- trunk/flexotask/javadoc.xml Modified: trunk/flexotask/javadoc.xml =================================================================== --- trunk/flexotask/javadoc.xml 2008-11-11 10:58:11 UTC (rev 81) +++ trunk/flexotask/javadoc.xml 2008-11-11 10:59:21 UTC (rev 82) @@ -4,7 +4,7 @@ <javadoc access="public" author="false" useexternalfile="true" overview="doc/flexotaskOverview.html" classpath="bin;..\realtime-analysis\bin;..\realtime-analysis\bcel-5.1.jar" destdir="doc" nodeprecated="true" nodeprecatedlist="true" noindex="true" nonavbar="true" notree="true" - packagenames="com.ibm.realtime.flexotask.validation,com.ibm.realtime.flexotask.util,com.ibm.realtime.flexotask.scheduling.simple,com.ibm.realtime.flexotask.timing.simple,com.ibm.realtime.flexotask,com.ibm.realtime.flexotask.timing,com.ibm.realtime.flexotask.distribution,com.ibm.realtime.flexotask.tools,com.ibm.realtime.flexotask.template,com.ibm.realtime.flexotask.scheduling,com.ibm.realtime.flexotask.tracing,com.ibm.realtime.xrts,com.ibm.realtime.flexotask.cloning" + packagenames="com.ibm.realtime.flexotask.*" source="1.3" sourcepath="src" splitindex="false" use="false" version="false"/> </target> <target name="zipdoc" depends="javadoc"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-11 10:58:22
|
Revision: 81 http://flexotask.svn.sourceforge.net/flexotask/?rev=81&view=rev Author: jsauerbach Date: 2008-11-11 10:58:11 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Minor javadoc corrections to get cross-references right. Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java 2008-11-10 20:40:32 UTC (rev 80) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/vm/FlexotaskVMBridge.java 2008-11-11 10:58:11 UTC (rev 81) @@ -28,7 +28,7 @@ public static final int NORMAL_MEMORY = 0; /** Indicator passed to createMemorySpace to indicate the scheduler heap */ public static final int SCHEDULER_MEMORY = 1; - /** @see FlexotaskSystemSupport#allocateStablePrimitiveArray(Class, int, StableArray) */ + /** @see FlexotaskSystemSupport#allocateStablePrimitiveArray(Class, int, StableArrayImpl) */ Object allocateStablePrimitiveArray(Class type, int size); /** @see FlexotaskSystemSupport#becomeFlexotaskThread(boolean) */ void becomeFlexotaskThread(boolean state); @@ -72,7 +72,7 @@ long getLongArrayElement(long[] object, int index); /** @see TransactionalOperations#getLongField(Object, int) */ long getLongField(Object object, int index); - /** @see FlexotaskSystemSupport#getObjectMonitor(Notifier) */ + /** @see FlexotaskSystemSupport#getObjectMonitor(Object) */ long getMonitor(Object object); /** @see TransactionalOperations#getReferenceArrayElement(Object[], int) */ Object getReferenceArrayElement(Object[] object, int index); @@ -90,7 +90,7 @@ void nanosleep(long nextDeadline); /** @see FlexotaskSystemSupport#nanoTime() */ long nanoTime(); - /** @see FlexotaskSystemSupport#notifyIfWaiting(Notifier) */ + /** @see FlexotaskSystemSupport#notifyIfWaiting(Object, long) */ void notifyIfWaiting(long monitor); /** @see FlexotaskSystemSupport#pin(Object[]) */ boolean pin(Object[] toPin); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 20:40:36
|
Revision: 80 http://flexotask.svn.sourceforge.net/flexotask/?rev=80&view=rev Author: jsauerbach Date: 2008-11-10 20:40:32 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Include more descriptive information when exporting a runtime. Add getDescription() methods to RuntimeProvider and LibraryProvider to support this. Adjust the getDescription() results on some TimingGrammarProviders to be consistent. Modified Paths: -------------- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizardPage.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/GlobalTiming.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/LibraryProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TimingGrammarProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleModelessGrammarProvider.java trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleMultiModeGrammarProvider.java trunk/flexotask-tuningfork/src/com/ibm/realtime/flexotask/tuningfork/TuningforkLibraryProvider.java Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/OpenRuntimeProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -13,14 +13,6 @@ */ package com.ibm.realtime.flexotask.editor.dialogs; -import java.io.File; -import java.io.IOException; -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.Platform; -import org.osgi.framework.Bundle; - import com.ibm.realtime.flexotask.editor.EEditPlugin; /** @@ -43,4 +35,12 @@ { return "openRuntimeProvider.zip"; } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.dialogs.RuntimeProvider#getDescription() + */ + public String getDescription() + { + return "Open source runtime components, including ESystem and NativeIO"; + } } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizard.java 2008-11-10 20:40:32 UTC (rev 80) @@ -57,6 +57,7 @@ import com.ibm.realtime.flexotask.editor.EEditPlugin; import com.ibm.realtime.flexotask.editor.FlexotaskClasspathInitializer; import com.ibm.realtime.flexotask.editor.model.GlobalTiming; +import com.ibm.realtime.flexotask.editor.model.LibraryProvider; /** * Export a Flexotask Runtime based contributed libraries, including a special NativeRuntime provider @@ -80,7 +81,17 @@ */ public void addPages() { - page = new RuntimeExportWizardPage(); + StringBuilder builder = new StringBuilder("This runtime will contain:\n"); + RuntimeProvider[] providers = getRuntimeProviders(); + for (int i = 0; i < providers.length; i++) { + builder.append(" ").append(providers[i].getDescription()).append("\n"); + } + builder.append(" Standard Java libraries for the Flexotask API\n"); + LibraryProvider[] libraries = GlobalTiming.getAllProviders(); + for (int i = 0; i < libraries.length; i++) { + builder.append(" ").append(libraries[i].getDescription()).append("\n"); + } + page = new RuntimeExportWizardPage(builder.toString()); addPage(page); } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizardPage.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizardPage.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeExportWizardPage.java 2008-11-10 20:40:32 UTC (rev 80) @@ -32,6 +32,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Text; import com.ibm.realtime.flexotask.editor.EEditPlugin; @@ -79,13 +80,21 @@ /** Checkbox indicating that the user wants the destination to be overwritten without prompting */ private Button overwrite; + + /** The extended description (distinct from the shorter one in the title bar) */ + private String description; + + /** Text control for displaying the extended description */ + private Text descriptionText; /** * Create a new RuntimeExportWizardPage + * @param description the text to display giving a high level view of what will be in the runtime */ - RuntimeExportWizardPage() + RuntimeExportWizardPage(String description) { super("FlexotaskRuntime"); + this.description = description; setTitle("Export Flexotask Runtime"); setDescription("Export a Flexotask runtime for a real-time VM using existing plugins and flexotask PDE projects"); } @@ -102,10 +111,16 @@ IDialogSettings settings = getSettings(); String toDirectory = settings.get(EXPORT_DIRECTORY); boolean useDirectory = toDirectory == null || "true".equals(toDirectory); //$NON-NLS-1$ + + descriptionText = new Text(control, SWT.WRAP | SWT.READ_ONLY); + descriptionText.setText(description); + GridData gd = new GridData(); + gd.horizontalSpan = 2; + descriptionText.setLayoutData(gd); chooseDirectory = new Button(control, SWT.RADIO); chooseDirectory.setText("Directory:"); - GridData gd = new GridData(); + gd = new GridData(); gd.horizontalSpan = 2; chooseDirectory.setLayoutData(gd); chooseDirectory.setSelection(useDirectory); Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/dialogs/RuntimeProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -25,4 +25,9 @@ * @return this provider's contribution to the runtime as the absolute path name of a zip archive */ public String contribute(); + + /** + * @return this provider's one-sentence self-description of what it provides + */ + public String getDescription(); } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/GlobalTiming.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/GlobalTiming.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/GlobalTiming.java 2008-11-10 20:40:32 UTC (rev 80) @@ -47,32 +47,17 @@ private static LibraryProvider[] libraries; /** - * Get the set of grammars in the workspace, initializing from the extension registry the - * first time around. + * Get an annotator class to annotate a specific ModelElement + * @param element the element to be annotated + * @return a LocalTiming annotator for that element or null if that type of element cannot + * be annotated in this grammar */ - public static TimingGrammarProvider[] getGrammars() + public abstract LocalTiming getElementAnnotator(ModelElement element); + + // @see com.ibm.realtime.flexotask.editor.model.ModelElement#nextTempName() + String nextTempName() { - if (grammars == null) { - IExtensionRegistry registry = Platform.getExtensionRegistry(); - IExtensionPoint extensionPoint = registry.getExtensionPoint(GRAMMAR_EXTENSION); - if (extensionPoint == null) { - grammars = new TimingGrammarProvider[0]; - } else { - IConfigurationElement points[] = extensionPoint.getConfigurationElements(); - List<TimingGrammarProvider> grammarList = new ArrayList<TimingGrammarProvider>(); - for (int i = 0; i < points.length; i++) { - IConfigurationElement point = points[i]; - TimingGrammarProvider tgp; - try { - tgp = (TimingGrammarProvider) point.createExecutableExtension("class"); - grammarList.add(tgp); - } catch (CoreException e) { - } - } - grammars = (TimingGrammarProvider[]) grammarList.toArray(new TimingGrammarProvider[0]); - } - } - return grammars; + return "gt"; } // @see com.ibm.realtime.flexotask.editor.model.ModelElement#toEditSessionXML(java.lang.StringBuilder, java.lang.String) @@ -86,12 +71,17 @@ } /** - * Get an annotator class to annotate a specific ModelElement - * @param element the element to be annotated - * @return a LocalTiming annotator for that element or null if that type of element cannot - * be annotated in this grammar + * Get the paths of the runtime libraries (including parsers and schedulers) of all the + * supported timing grammars and simple library providers. + * @param accumulator the list in which classpath entries are to be accumulated */ - public abstract LocalTiming getElementAnnotator(ModelElement element); + public static void addToClasspath(List<IClasspathEntry> accumulator) throws CoreException + { + LibraryProvider[] providers = getAllProviders(); + for (int i = 0; i < providers.length; i++) { + providers[i].addToClasspath(accumulator); + } + } /** * Find the correct GlobalTiming for a given FlexotaskGlobalTimingData @@ -111,44 +101,11 @@ return null; } - // @see com.ibm.realtime.flexotask.editor.model.ModelElement#nextTempName() - String nextTempName() - { - return "gt"; - } - /** - * Get the FlexotaskTimingDataParsers of all the supported timing grammars - * @return an array of FlexotaskTimingDataParsers, one element from each timing grammar provider - */ - public static FlexotaskTimingDataParser[] getParsers() - { - TimingGrammarProvider[] grammars = getGrammars(); - FlexotaskTimingDataParser[] ans = new FlexotaskTimingDataParser[grammars.length]; - for (int i = 0; i < ans.length; i++) { - ans[i] = grammars[i].getParser(); - } - return ans; - } - - /** - * Get the paths of the runtime libraries (including parsers and schedulers) of all the - * supported timing grammars and simple library providers. - * @param accumulator the list in which classpath entries are to be accumulated - */ - public static void addToClasspath(List<IClasspathEntry> accumulator) throws CoreException - { - LibraryProvider[] providers = getAllProviders(); - for (int i = 0; i < providers.length; i++) { - providers[i].addToClasspath(accumulator); - } - } - - /** * Collect all the library providers in the system, including grammar providers * @return all library providers as an array */ - private static LibraryProvider[] getAllProviders() + public static LibraryProvider[] getAllProviders() { if (libraries == null) { List<LibraryProvider> providers = new ArrayList<LibraryProvider>(); @@ -174,4 +131,47 @@ } return libraries; } + + /** + * Get the set of grammars in the workspace, initializing from the extension registry the + * first time around. + */ + public static TimingGrammarProvider[] getGrammars() + { + if (grammars == null) { + IExtensionRegistry registry = Platform.getExtensionRegistry(); + IExtensionPoint extensionPoint = registry.getExtensionPoint(GRAMMAR_EXTENSION); + if (extensionPoint == null) { + grammars = new TimingGrammarProvider[0]; + } else { + IConfigurationElement points[] = extensionPoint.getConfigurationElements(); + List<TimingGrammarProvider> grammarList = new ArrayList<TimingGrammarProvider>(); + for (int i = 0; i < points.length; i++) { + IConfigurationElement point = points[i]; + TimingGrammarProvider tgp; + try { + tgp = (TimingGrammarProvider) point.createExecutableExtension("class"); + grammarList.add(tgp); + } catch (CoreException e) { + } + } + grammars = (TimingGrammarProvider[]) grammarList.toArray(new TimingGrammarProvider[0]); + } + } + return grammars; + } + + /** + * Get the FlexotaskTimingDataParsers of all the supported timing grammars + * @return an array of FlexotaskTimingDataParsers, one element from each timing grammar provider + */ + public static FlexotaskTimingDataParser[] getParsers() + { + TimingGrammarProvider[] grammars = getGrammars(); + FlexotaskTimingDataParser[] ans = new FlexotaskTimingDataParser[grammars.length]; + for (int i = 0; i < ans.length; i++) { + ans[i] = grammars[i].getParser(); + } + return ans; + } } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/LibraryProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/LibraryProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/LibraryProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -35,4 +35,11 @@ * @throws CoreException if needed entries could not be added */ void addToClasspath(List<IClasspathEntry> accumulator) throws CoreException; + + /** + * Get the description to use for this library in various dialogs (if the LibraryProvider is also a TimingGrammarProvider, this + * description will also be used in the Tools palette of the editor) + * @return the appropriate description as a string + */ + String getDescription(); } Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TimingGrammarProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TimingGrammarProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/model/TimingGrammarProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -30,12 +30,6 @@ String getLabel(); /** - * Get the description to use for this grammar in the tools palette - * @return the appropriate description as a string - */ - String getDescription(); - - /** * Get the Class to use as a template class in the tools palette. This class must extend * GlobalTiming. * @return the appropriate Class Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleModelessGrammarProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleModelessGrammarProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleModelessGrammarProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -32,7 +32,7 @@ // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getDescription() public String getDescription() { - return "Use time-triggered grammar with a single unnamed mode"; + return "Time-triggered grammar with a single unnamed mode"; } // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getGlobalTiming(com.ibm.realtime.flexotask.timing.FlexotaskTimingData) Modified: trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleMultiModeGrammarProvider.java =================================================================== --- trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleMultiModeGrammarProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-editor/src/com/ibm/realtime/flexotask/editor/timing/simple/SimpleMultiModeGrammarProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -32,7 +32,7 @@ // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getDescription() public String getDescription() { - return "Use time-triggered grammar with multiple modes"; + return "Time-triggered grammar with multiple modes"; } // @see com.ibm.realtime.flexotask.editor.model.TimingGrammarProvider#getGlobalTiming(com.ibm.realtime.flexotask.timing.FlexotaskTimingData) Modified: trunk/flexotask-tuningfork/src/com/ibm/realtime/flexotask/tuningfork/TuningforkLibraryProvider.java =================================================================== --- trunk/flexotask-tuningfork/src/com/ibm/realtime/flexotask/tuningfork/TuningforkLibraryProvider.java 2008-11-10 17:42:04 UTC (rev 79) +++ trunk/flexotask-tuningfork/src/com/ibm/realtime/flexotask/tuningfork/TuningforkLibraryProvider.java 2008-11-10 20:40:32 UTC (rev 80) @@ -43,4 +43,12 @@ FlexotaskClasspathInitializer.addPluginClasspath(accumulator, TUNINGFORK_VIANATIVE_LIBRARY); FlexotaskClasspathInitializer.addPluginClasspath(accumulator, TUNINGFORK_LIBRARY); } + + /* (non-Javadoc) + * @see com.ibm.realtime.flexotask.editor.model.LibraryProvider#getDescription() + */ + public String getDescription() + { + return "Tracing support for TuningFork"; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 17:42:06
|
Revision: 79 http://flexotask.svn.sourceforge.net/flexotask/?rev=79&view=rev Author: jsauerbach Date: 2008-11-10 17:42:04 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Be a little less aggressive in rebuilding the generators ... the previous config was annoyingly repetitive. Modified Paths: -------------- trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch trunk/flexotask-functiontest/.project Modified: trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch =================================================================== --- trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch 2008-11-10 16:50:26 UTC (rev 78) +++ trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch 2008-11-10 17:42:04 UTC (rev 79) @@ -15,7 +15,7 @@ <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="flexotask-functiontest"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/flexotask-functiontest/generators.xml}"/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/flexotask-functiontest}"/> </launchConfiguration> Modified: trunk/flexotask-functiontest/.project =================================================================== --- trunk/flexotask-functiontest/.project 2008-11-10 16:50:26 UTC (rev 78) +++ trunk/flexotask-functiontest/.project 2008-11-10 17:42:04 UTC (rev 79) @@ -7,7 +7,7 @@ <buildSpec> <buildCommand> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>auto,full,incremental,</triggers> + <triggers>full,incremental,</triggers> <arguments> <dictionary> <key>LaunchConfigHandle</key> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 16:50:29
|
Revision: 78 http://flexotask.svn.sourceforge.net/flexotask/?rev=78&view=rev Author: jsauerbach Date: 2008-11-10 16:50:26 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Add functiontest and its plugin to the core project set. Delete the tests project set since it now has only one remaining member. Modified Paths: -------------- trunk/flexotask-features/coreProjects.psf Removed Paths: ------------- trunk/flexotask-features/tests.psf Modified: trunk/flexotask-features/coreProjects.psf =================================================================== --- trunk/flexotask-features/coreProjects.psf 2008-11-10 16:43:47 UTC (rev 77) +++ trunk/flexotask-features/coreProjects.psf 2008-11-10 16:50:26 UTC (rev 78) @@ -4,6 +4,8 @@ <project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask,flexotask"/> <project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-development,flexotask-development"/> <project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-editor,flexotask-editor"/> +<project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-functiontest,flexotask-functiontest"/> +<project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-functiontest-plugin,flexotask-functiontest-plugin"/> <project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-generic,flexotask-generic"/> <project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/realtime-analysis,realtime-analysis"/> </provider> Deleted: trunk/flexotask-features/tests.psf =================================================================== --- trunk/flexotask-features/tests.psf 2008-11-10 16:43:47 UTC (rev 77) +++ trunk/flexotask-features/tests.psf 2008-11-10 16:50:26 UTC (rev 78) @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<psf version="2.0"> -<provider id="org.tigris.subversion.subclipse.core.svnnature"> -<project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-devtest,flexotask-devtest"/> -<project reference="0.9.3,https://flexotask.svn.sourceforge.net/svnroot/flexotask/trunk/flexotask-functiontest,flexotask-functiontest"/> -</provider> -</psf> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 16:43:59
|
Revision: 77 http://flexotask.svn.sourceforge.net/flexotask/?rev=77&view=rev Author: jsauerbach Date: 2008-11-10 16:43:47 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Ignore Generator.java files in the future (they were accidentally checked in before but have been removed from the repository). Property Changed: ---------------- trunk/flexotask-functiontest/src/lctes2007/ trunk/flexotask-functiontest/src/modes/ Property changes on: trunk/flexotask-functiontest/src/lctes2007 ___________________________________________________________________ Added: svn:ignore + Generator.java Property changes on: trunk/flexotask-functiontest/src/modes ___________________________________________________________________ Added: svn:ignore + Generator.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 16:37:01
|
Revision: 76 http://flexotask.svn.sourceforge.net/flexotask/?rev=76&view=rev Author: jsauerbach Date: 2008-11-10 16:36:44 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Remove Generator.java files from repository. Fix auto build config to run more frequently and to use the same VM. Modified Paths: -------------- trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch trunk/flexotask-functiontest/.project Modified: trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch =================================================================== --- trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch 2008-11-10 16:26:30 UTC (rev 75) +++ trunk/flexotask-functiontest/.externalToolBuilders/Build Flexotask Template Generators.launch 2008-11-10 16:36:44 UTC (rev 76) @@ -2,6 +2,7 @@ <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/flexotask-functiontest/generators.xml"/> </listAttribute> @@ -14,7 +15,7 @@ <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="flexotask-functiontest"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/flexotask-functiontest/generators.xml}"/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value=""/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/flexotask-functiontest}"/> </launchConfiguration> Modified: trunk/flexotask-functiontest/.project =================================================================== --- trunk/flexotask-functiontest/.project 2008-11-10 16:26:30 UTC (rev 75) +++ trunk/flexotask-functiontest/.project 2008-11-10 16:36:44 UTC (rev 76) @@ -7,7 +7,7 @@ <buildSpec> <buildCommand> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>full,incremental,</triggers> + <triggers>auto,full,incremental,</triggers> <arguments> <dictionary> <key>LaunchConfigHandle</key> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 16:26:33
|
Revision: 75 http://flexotask.svn.sourceforge.net/flexotask/?rev=75&view=rev Author: jsauerbach Date: 2008-11-10 16:26:30 +0000 (Mon, 10 Nov 2008) Log Message: ----------- A generated file that should not be in the repository Removed Paths: ------------- trunk/flexotask-functiontest/src/modes/Generator.java Deleted: trunk/flexotask-functiontest/src/modes/Generator.java =================================================================== --- trunk/flexotask-functiontest/src/modes/Generator.java 2008-11-10 16:25:08 UTC (rev 74) +++ trunk/flexotask-functiontest/src/modes/Generator.java 2008-11-10 16:26:30 UTC (rev 75) @@ -1,70 +0,0 @@ -package modes; -import com.ibm.realtime.flexotask.template.*; -public class Generator{ -public static FlexotaskTemplate generateGraph(){ -FlexotaskTemplate ans = new FlexotaskTemplate(); -FlexotaskCommunicatorTemplate counter=new FlexotaskCommunicatorTemplate(); -counter.setName("counter"); -counter.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp","countDown",}, new long[][]{new long[]{50000000L,},new long[]{100000000L,},})); -counter.setParameterType("java.lang.Integer"); -counter.setParameterValue("0"); -ans.getTasks().add(counter); -FlexotaskPredicateTemplate switchDownToUp=new FlexotaskPredicateTemplate(); -switchDownToUp.setName("switchDownToUp"); -switchDownToUp.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleModeSwitch(new String[]{"countDown",}, "countUp")); -switchDownToUp.setImplementationClass("modes.Equals"); -switchDownToUp.setInputPortGroup(new String[]{"java.lang.Integer",},new boolean[]{false,},new String[]{"in",}); -switchDownToUp.setParameterType("java.lang.Integer"); -switchDownToUp.setParameterValue("0"); -switchDownToUp.setWeaklyIsolated(false); -ans.getTasks().add(switchDownToUp); -FlexotaskPredicateTemplate switchUpToDown=new FlexotaskPredicateTemplate(); -switchUpToDown.setName("switchUpToDown"); -switchUpToDown.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleModeSwitch(new String[]{"countUp",}, "countDown")); -switchUpToDown.setImplementationClass("modes.Equals"); -switchUpToDown.setInputPortGroup(new String[]{"java.lang.Integer",},new boolean[]{false,},new String[]{"in",}); -switchUpToDown.setParameterType("java.lang.Integer"); -switchUpToDown.setParameterValue("100"); -switchUpToDown.setWeaklyIsolated(false); -ans.getTasks().add(switchUpToDown); -FlexotaskTaskTemplate downTask=new FlexotaskTaskTemplate(); -downTask.setName("downTask"); -downTask.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countDown",}, new long[][]{new long[]{},})); -downTask.setImplementationClass("modes.DownCounter"); -downTask.setInputPortGroup(new String[]{"java.lang.Integer",},new boolean[]{false,},new String[]{"oldCounter",}); -downTask.setParameterType(""); -downTask.setParameterValue(""); -downTask.setWeaklyIsolated(false); -downTask.setOutputPortGroup(new String[]{"java.lang.Integer","java.lang.Integer",},new boolean[]{false,false,},new String[]{"output","newCounter",}); -ans.getTasks().add(downTask); -FlexotaskTaskTemplate Reporter=new FlexotaskTaskTemplate(); -Reporter.setName("Reporter"); -Reporter.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp","countDown",}, new long[][]{new long[]{50000000L,},new long[]{100000000L,},})); -Reporter.setImplementationClass("modes.Report"); -Reporter.setInputPortGroup(new String[]{"java.lang.Integer",},new boolean[]{false,},new String[]{"in0",}); -Reporter.setParameterType(""); -Reporter.setParameterValue(""); -Reporter.setWeaklyIsolated(false); -ans.getTasks().add(Reporter); -FlexotaskTaskTemplate upTask=new FlexotaskTaskTemplate(); -upTask.setName("upTask"); -upTask.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp",}, new long[][]{new long[]{},})); -upTask.setImplementationClass("modes.UpCounter"); -upTask.setInputPortGroup(new String[]{"java.lang.Integer",},new boolean[]{false,},new String[]{"oldCounter",}); -upTask.setParameterType(""); -upTask.setParameterValue(""); -upTask.setWeaklyIsolated(false); -upTask.setOutputPortGroup(new String[]{"java.lang.Integer","java.lang.Integer",},new boolean[]{false,false,},new String[]{"output","newCounter",}); -ans.getTasks().add(upTask); -ans.getConnections().add(new FlexotaskConnectionTemplate("upTask_Reporter",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp",}, new long[][]{new long[]{},}),upTask,0,Reporter,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("downTask_Reporter",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countDown",}, new long[][]{new long[]{},}),downTask,0,Reporter,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("upTask_counter",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp",}, new long[][]{new long[]{},}),upTask,1,counter,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("downTask_switchDownToUp",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countDown",}, new long[][]{new long[]{},}),downTask,0,switchDownToUp,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("upTask_switchUpToDown",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp",}, new long[][]{new long[]{},}),upTask,0,switchUpToDown,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("counter_downTask",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countDown",}, new long[][]{new long[]{},}),counter,0,downTask,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("counter_upTask",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countUp",}, new long[][]{new long[]{},}),counter,0,upTask,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("downTask_counter",new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{"countDown",}, new long[][]{new long[]{},}),downTask,1,counter,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.setTimingData(new com.ibm.realtime.flexotask.timing.simple.ModeList(new String[]{"countUp", "countDown"}, new long[]{50000000L, 100000000L})); -ans.setAllocating(true);ans.setSynchronizing(true);ans.setStableMode(com.ibm.realtime.flexotask.template.FlexotaskStableMode.getStableMode("default"));return ans; -} -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-10 16:25:13
|
Revision: 74 http://flexotask.svn.sourceforge.net/flexotask/?rev=74&view=rev Author: jsauerbach Date: 2008-11-10 16:25:08 +0000 (Mon, 10 Nov 2008) Log Message: ----------- This is a generated file and should not be committed to the repository Removed Paths: ------------- trunk/flexotask-functiontest/src/lctes2007/Generator.java Deleted: trunk/flexotask-functiontest/src/lctes2007/Generator.java =================================================================== --- trunk/flexotask-functiontest/src/lctes2007/Generator.java 2008-11-08 17:49:01 UTC (rev 73) +++ trunk/flexotask-functiontest/src/lctes2007/Generator.java 2008-11-10 16:25:08 UTC (rev 74) @@ -1,38 +0,0 @@ -package lctes2007; -import com.ibm.realtime.flexotask.template.*; -public class Generator{ -public static FlexotaskTemplate generateGraph(){ -FlexotaskTemplate ans = new FlexotaskTemplate(); -FlexotaskTaskTemplate Sensor=new FlexotaskTaskTemplate(); -Sensor.setName("Sensor"); -Sensor.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{null}, new long[][]{new long[]{0L,},})); -Sensor.setImplementationClass("lctes2007.Sensor"); -Sensor.setParameterType(""); -Sensor.setParameterValue(""); -Sensor.setWeaklyIsolated(false); -Sensor.setOutputPortGroup(new String[]{"double[]",},new boolean[]{false,},new String[]{"out0",}); -ans.getTasks().add(Sensor); -FlexotaskTaskTemplate Actuator=new FlexotaskTaskTemplate(); -Actuator.setName("Actuator"); -Actuator.setTimingData(new com.ibm.realtime.flexotask.timing.simple.SimpleTimingAnnotation(new String[]{null}, new long[][]{new long[]{10000000L,},})); -Actuator.setImplementationClass("lctes2007.Actuator"); -Actuator.setInputPortGroup(new String[]{"java.lang.Double",},new boolean[]{false,},new String[]{"in0",}); -Actuator.setParameterType(""); -Actuator.setParameterValue(""); -Actuator.setWeaklyIsolated(false); -ans.getTasks().add(Actuator); -FlexotaskTaskTemplate Compute=new FlexotaskTaskTemplate(); -Compute.setName("Compute"); -Compute.setImplementationClass("lctes2007.Compute"); -Compute.setInputPortGroup(new String[]{"double[]",},new boolean[]{false,},new String[]{"in0",}); -Compute.setParameterType(""); -Compute.setParameterValue(""); -Compute.setWeaklyIsolated(false); -Compute.setOutputPortGroup(new String[]{"java.lang.Double",},new boolean[]{false,},new String[]{"out0",}); -ans.getTasks().add(Compute); -ans.getConnections().add(new FlexotaskConnectionTemplate("Sensor_Compute",null,Sensor,0,Compute,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.getConnections().add(new FlexotaskConnectionTemplate("Compute_Actuator",null,Compute,0,Actuator,0,com.ibm.realtime.flexotask.template.FlexotaskConnectionMode.getConnectionMode("deepclone"))); -ans.setTimingData(new com.ibm.realtime.flexotask.timing.simple.Period(30000000L)); -ans.setAllocating(true);ans.setSynchronizing(true);ans.setStableMode(com.ibm.realtime.flexotask.template.FlexotaskStableMode.getStableMode("default"));return ans; -} -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsa...@us...> - 2008-11-08 17:49:04
|
Revision: 73 http://flexotask.svn.sourceforge.net/flexotask/?rev=73&view=rev Author: jsauerbach Date: 2008-11-08 17:49:01 +0000 (Sat, 08 Nov 2008) Log Message: ----------- Automated generation of test project for those without repository access. Modified Paths: -------------- trunk/flexotask-development/plugin.xml Added Paths: ----------- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java Modified: trunk/flexotask-development/plugin.xml =================================================================== --- trunk/flexotask-development/plugin.xml 2008-11-08 17:48:32 UTC (rev 72) +++ trunk/flexotask-development/plugin.xml 2008-11-08 17:49:01 UTC (rev 73) @@ -16,6 +16,14 @@ name="Flexotask Project" project="true"> </wizard> + <wizard + category="com.ibm.realtime.flexotask" + class="com.ibm.realtime.flexotask.development.wizards.MakeFunctionTestWizard" + icon="icons/icon.gif" + id="com.ibm.realtime.flexotask.devplugin.wizards.MakeFunctionTestWizard" + name="Flexotask Function Test and Samples Project" + project="true"> + </wizard> </extension> <extension Added: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java (rev 0) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java 2008-11-08 17:49:01 UTC (rev 73) @@ -0,0 +1,161 @@ +/* + * This file is part of Flexible Task Graphs + * (http://sourceforge.net/projects/flexotasks) + * + * Copyright (c) 2006 - 2008 IBM Corporation. + * 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: + * IBM Corporation - initial API and implementation + */ +package com.ibm.realtime.flexotask.development.wizards; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.net.URL; +import java.util.zip.ZipFile; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.actions.WorkspaceModifyOperation; +import org.eclipse.ui.dialogs.IOverwriteQuery; +import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.ui.wizards.datatransfer.ImportOperation; +import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider; +import org.osgi.framework.Bundle; + +import com.ibm.realtime.flexotask.editor.EEditPlugin; + +/** + * A specialized newWizard (actually based most closely on the project import wizard) for generating + * the flexotask-functiontest project. + */ +public class MakeFunctionTestWizard extends Wizard implements INewWizard, IOverwriteQuery { + private static final String FUNCTIONTEST_PLUGIN_ID = "com.ibm.realtime.flexotask.functiontest"; + private static final String FUNCTIONTEST_ZIPFILE = "flexotaskFunctionTest.zip"; + private WizardNewProjectCreationPage mainPage; + + /* (non-Javadoc) + * @see org.eclipse.jface.wizard.Wizard#addPages() + */ + public void addPages() { + mainPage = new WizardNewProjectCreationPage("project"); + mainPage.setTitle("Create a Flexotask Project"); + mainPage.setDescription("Create a Flexotask Project in the Workspace or external location"); + mainPage.setInitialProjectName("flexotask-functiontest"); + addPage(mainPage); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection) + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + // set icon + ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin( + "FlexotaskBuilder", "icons/logo.gif"); + setDefaultPageImageDescriptor(image); + setNeedsProgressMonitor(true); + setWindowTitle("New Flexotask Function Test and Samples Project"); + } + + /* (non-Javadoc) + * @see org.eclipse.jface.wizard.Wizard#performFinish() + */ + public boolean performFinish() { + WorkspaceModifyOperation op = new WorkspaceModifyOperation() { + protected void execute(IProgressMonitor monitor) throws CoreException, + InvocationTargetException, InterruptedException { + doFinish(monitor); + } + }; + try { + getContainer().run(false, true, op); + } catch (InvocationTargetException e) { + Throwable exception = e.getTargetException(); + IStatus status = null; + if (exception instanceof CoreException) { + status = ((CoreException) exception).getStatus(); + } + if (status == null) { + status = new Status(Status.ERROR, EEditPlugin.ID, exception.getMessage(), exception); + } + ResourcesPlugin.getPlugin().getLog().log(status); + ErrorDialog.openError(getShell(), "Error during project creation", status.getMessage(), status); + } catch (InterruptedException e) { + return false; + } + return true; + } + + /* (non-Javadoc) + * @see org.eclipse.ui.dialogs.IOverwriteQuery#queryOverwrite(java.lang.String) + */ + public String queryOverwrite(String pathString) { + return YES; + } + + /** + * Subroutine containing the logic of performFinish, running under a WorkspaceModifyOperation + * @throws InvocationTargetException if a subsidiary operation throws one + * @throws InterruptedException if a subsidiary operation throws one (due to cancellation) + * @throws CoreException if a subsidiary operation throws one + */ + private void doFinish(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, CoreException + { + IProject project = mainPage.getProjectHandle(); + IProjectDescription desc = project.getWorkspace().newProjectDescription(project.getName()); + if (!mainPage.useDefaults()) { + desc.setLocation(mainPage.getLocationPath()); + } + project.create(desc, new SubProgressMonitor(monitor, 1)); + project.open(new SubProgressMonitor(monitor, 1)); + ZipFileStructureProvider provider = new ZipFileStructureProvider(getZipFile()); + Object root = provider.getRoot(); + ImportOperation op = new ImportOperation(project.getFullPath(), root, provider, this, provider.getChildren(root)); + op.setContext(getShell()); + op.run(monitor); + } + + /** + * Subroutine to find and return the ZipFile containing the flexotask-functiontest project image + * @return a ZipFile containing the flexotask-functiontest project image + * @throws CoreException if the ZipFile could not be located + */ + private ZipFile getZipFile() throws CoreException { + Bundle bundle = Platform.getBundle(FUNCTIONTEST_PLUGIN_ID); + URL entryURL = bundle.getEntry("/"); + File rootLoc; + try { + entryURL = FileLocator.toFileURL(entryURL); + rootLoc = new File(entryURL.getPath()).getAbsoluteFile(); + if (rootLoc.exists()) { + IPath root = Path.fromOSString(rootLoc.getAbsolutePath()); + return new ZipFile(root.append(FUNCTIONTEST_ZIPFILE).toString()); + } + } catch (IOException e) { + throw new CoreException(new Status(Status.ERROR, EEditPlugin.ID, e.getMessage(), e)); + } + throw new CoreException(new Status(Status.ERROR, EEditPlugin.ID, rootLoc + " does not exist")); + } +} Property changes on: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/wizards/MakeFunctionTestWizard.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |