changeset 106:c84a2b4a877a working

add LooKData.java
author sugi
date Tue, 03 Jul 2012 16:01:36 +0900
parents 993a9f194615
children a8f77957a477
files scripts/movement_run.sh scripts/share_run.sh src/alice/test/topology/movement/LookData.java
diffstat 3 files changed, 41 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/movement_run.sh	Tue Jul 03 15:58:08 2012 +0900
+++ b/scripts/movement_run.sh	Tue Jul 03 16:01:36 2012 +0900
@@ -9,7 +9,7 @@
 cnt=0
 while [ $cnt -lt $max ]
 do
-    java -cp ../Alice.jar alice.test.topology.movement.FishMovementTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/fishmovement${cnt}.log -level debug > ./output/std_fishmovement${cnt}.log &
+    java -cp ../Alice.jar alice.test.topology.movement.FishMovementTopology -host flere210.st.ie.u-ryukyu.ac.jp -port 10000 -p `expr 20000 + $cnt` -log ./output/fishmovement${cnt}.log -level debug > ./output/std_fishmovement${cnt}.log &
     cnt=`expr $cnt + 1`
 done
 wait
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/share_run.sh	Tue Jul 03 16:01:36 2012 +0900
@@ -0,0 +1,15 @@
+#!/bin/bash
+max=$1
+child_num=$2
+ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot
+dot -Tpng ./topology/tree.dot > ./topology/tree.png
+open ./topology/tree.png
+java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log &
+
+cnt=0
+while [ $cnt -lt $max ]
+do
+    java -cp ../Alice.jar alice.test.topology.share.FishMovementTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/share${cnt}.log -level debug > ./output/std_share${cnt}.log &
+    cnt=`expr $cnt + 1`
+done
+wait
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/movement/LookData.java	Tue Jul 03 16:01:36 2012 +0900
@@ -0,0 +1,25 @@
+package alice.test.topology.movement;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class LookData extends CodeSegment{
+	
+	private Receiver data = ids.create(CommandType.PEEK);
+	String key;
+	public LookData(String key,int index){
+		this.key = key;
+		this.data.setKey("local", key, index);
+	}
+	
+	@Override
+	public void run(){
+		System.out.println(data.val);
+		new LookData(this.key,this.data.index);
+						
+	}
+	
+
+}