Skip to content

Commit

Permalink
Fix to the Convoy demo
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Kit <kit@d3s.mff.cuni.cz>
  • Loading branch information
Michal Kit committed Nov 30, 2012
1 parent d9d6916 commit cc49d39
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
4 changes: 4 additions & 0 deletions jdeeco-demo/META-INF/CLOUD.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_06-b24 (Oracle Corporation)
Export-Package: cz.cuni.mff.d3s.deeco.demo.cloud
5 changes: 5 additions & 0 deletions jdeeco-demo/META-INF/CONVOY.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.7.0_06-b24 (Oracle Corporation)
Export-Package: cz.cuni.mff.d3s.deeco.demo.convoy

11 changes: 5 additions & 6 deletions jdeeco-demo/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<target name="cloud-local" description="Runs the cloud demo">
<java classname="cz.cuni.mff.d3s.deeco.demo.cloud.LocalLauncherCloudNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/cloud.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="${river}/lib/jsk-lib.jar"/>
<pathelement location="${river}/lib/jsk-platform.jar"/>
Expand All @@ -65,7 +65,7 @@
<target name="convoy-local" description="Runs the convoy demo">
<java classname="cz.cuni.mff.d3s.deeco.demo.convoy.LocalLauncherConvoyNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/convoy.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="${river}/lib/jsk-lib.jar"/>
<pathelement location="${river}/lib/jsk-platform.jar"/>
Expand All @@ -81,7 +81,7 @@
<antcall target="start-ar"/>
<java classname="cz.cuni.mff.d3s.deeco.demo.cloud.TSLauncherCloudNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/cloud.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="${river}/lib/jsk-lib.jar"/>
<pathelement location="${river}/lib/jsk-platform.jar"/>
Expand All @@ -98,7 +98,7 @@
<antcall target="start-ar"/>
<java classname="cz.cuni.mff.d3s.deeco.demo.convoy.TSLauncherConvoyNoJPF" fork="true">
<classpath>
<pathelement location="${dist}/demo.jar"/>
<pathelement location="${dist}/convoy.jar"/>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="${river}/lib/jsk-lib.jar"/>
<pathelement location="${river}/lib/jsk-platform.jar"/>
Expand All @@ -115,10 +115,9 @@
<antcall target="ant-jdeeco-core"/>
<ant antfile="build.xml" dir="jdeeco-demo" target="dist-cloud-demo"/>
<java fork="true" classname="cz.cuni.mff.d3s.deeco.runtime.PreLauncher" dir="${dist}">
<arg value="cloud-demo.jar"/>
<arg value="cloud.jar"/>
<classpath>
<pathelement location="${dist}/jdeeco.jar"/>
<pathelement location="${libs}/bcel-5.2.jar"/>
</classpath>
</java>
<java fork="true" jar="${jpf}/build/RunJPF.jar" dir="${dist}">
Expand Down
9 changes: 9 additions & 0 deletions jdeeco-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
Expand All @@ -37,6 +38,10 @@
<includes>
<include>**/cloud/*</include>
</includes>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestFile>META-INF/CLOUD.MF</manifestFile>
</archive>
</configuration>
</execution>
<execution>
Expand All @@ -50,6 +55,10 @@
<includes>
<include>**/convoy/*</include>
</includes>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestFile>META-INF/CONVOY.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import cz.cuni.mff.d3s.deeco.annotations.DEECoEnsembleMembership;
import cz.cuni.mff.d3s.deeco.annotations.DEECoIn;
import cz.cuni.mff.d3s.deeco.annotations.DEECoOut;
import cz.cuni.mff.d3s.deeco.annotations.DEECoPeriodicScheduling;
import cz.cuni.mff.d3s.deeco.annotations.DEECoTriggered;
import cz.cuni.mff.d3s.deeco.ensemble.Ensemble;
import cz.cuni.mff.d3s.deeco.knowledge.Knowledge;
Expand All @@ -34,6 +35,7 @@
*
*/
@DEECoEnsemble
@DEECoPeriodicScheduling(1000)
public class ConvoyEnsemble extends Ensemble {

// must be public, static and extend Knowledge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import cz.cuni.mff.d3s.deeco.annotations.DEECoIn;
import cz.cuni.mff.d3s.deeco.annotations.DEECoInOut;
import cz.cuni.mff.d3s.deeco.annotations.DEECoInitialize;
import cz.cuni.mff.d3s.deeco.annotations.DEECoPeriodicScheduling;
import cz.cuni.mff.d3s.deeco.annotations.DEECoProcess;
import cz.cuni.mff.d3s.deeco.annotations.DEECoTriggered;
import cz.cuni.mff.d3s.deeco.knowledge.ComponentKnowledge;
Expand Down Expand Up @@ -53,6 +54,7 @@ public static ComponentKnowledge getInitialKnowledge() {
}

@DEECoProcess
@DEECoPeriodicScheduling(3000)
public static void process(@DEECoInOut("path") Path path,
@DEECoInOut("battery") OutWrapper<Integer> battery,
@DEECoIn("convoyRobot") @DEECoTriggered String convoyRobot) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static ComponentKnowledge getInitialKnowledge() {
/*
* Input: path, crossingRobots, convoyRobot Output: path
*/
@DEECoPeriodicScheduling(8000)
@DEECoPeriodicScheduling(3000)
@DEECoProcess
public static void process(@DEECoInOut("path") Path path,
@DEECoInOut("battery") OutWrapper<Integer> battery) {
Expand Down

0 comments on commit cc49d39

Please sign in to comment.