diff src/alice/test/codesegment/local/TestCodeSegment.java @ 119:f84e1684c6be working

put NULL in CS
author sugi
date Thu, 26 Jul 2012 15:43:57 +0900
parents a8f77957a477
children 2b991e8b7fc0
line wrap: on
line diff
--- a/src/alice/test/codesegment/local/TestCodeSegment.java	Sat Jul 21 11:22:20 2012 +0900
+++ b/src/alice/test/codesegment/local/TestCodeSegment.java	Thu Jul 26 15:43:57 2012 +0900
@@ -3,11 +3,12 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.fishmodel.beta.Routing;
-import alice.test.topology.fishmodel.beta.RoutingTable;
+import alice.test.topology.fishmodel.alpha.FishPoint;
 
 public class TestCodeSegment extends CodeSegment {
 	
+	static int count = 0;
+	
 	// create input datasegment arg1
 	Receiver arg1 = ids.create(CommandType.PEEK);
 	public TestCodeSegment(){
@@ -19,24 +20,19 @@
 	
 	@Override
 	public void run() {
-		RoutingTable RT = arg1.asClass(RoutingTable.class);
-		Routing newRouting = new Routing(this.arg1.from);
-		
-		RT.table.add(newRouting);
-		System.out.println("index = " + arg1.index);
+		FishPoint fp = this.arg1.asClass(FishPoint.class);
+		//System.out.println("index = " + arg1.index);
+		System.out.println("count = " + count);
 		System.out.println("data = " + arg1.val);
 		System.out.println(arg1.val.getType());
 		
-		for (Routing r : RT.table) {
-			System.out.println("name;"+r.name);
-		}
-		
-		
+		/*
 		if (arg1.index == 10) {
 			System.exit(0);
 			return;
 		}
-		
+		*/
+		//FP.setXY(FP.getX()+1.0f,FP.getY());
 		/*
 		TestCodeSegment cs = new TestCodeSegment();
 		cs.arg1.setKey("key1", arg1.index);
@@ -44,7 +40,13 @@
 		
 		new TestCodeSegment(arg1.index);
 		// DataSegment.get("local").update
-		ods.update("local", "key1", RT);
+		
+		if (count++>1000) {
+			System.out.println(count);
+			
+		}
+		ods.update("local", "key1", fp);
+		
 	}
 
 }