Mercurial > hg > Database > Alice
diff src/alice/test/topology/movement/CheckMyName.java @ 105:993a9f194615 working
success share TEST
author | sugi |
---|---|
date | Tue, 03 Jul 2012 15:58:08 +0900 |
parents | df786bf8f036 |
children |
line wrap: on
line diff
--- a/src/alice/test/topology/movement/CheckMyName.java Tue Jul 03 15:55:27 2012 +0900 +++ b/src/alice/test/topology/movement/CheckMyName.java Tue Jul 03 15:58:08 2012 +0900 @@ -6,11 +6,13 @@ import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; +import alice.test.topology.share.CheckLocalIndex; +import alice.test.topology.share.CheckParentIndex; public class CheckMyName extends CodeSegment { Receiver host = ids.create(CommandType.PEEK); Pattern pattern = Pattern.compile("^(node|cli)([0-9]+)$"); - + String key = "fish"; @Override public void run(){ @@ -24,12 +26,14 @@ if (type.equals("cli")){ System.out.println("cli"+cliNum); - + ods.update("local", key, new FishPoint(0.0f,0.0f)); MakeFrame frame = new MakeFrame(); MakeObject obj3 = new MakeObject(frame); frame.register(obj3); - new CheckFishLocation(obj3,"fish3X"); + new CheckFishLocation(obj3,key,0); + new CheckLocalIndex(key,0); + new CheckParentIndex(key,0); /* MakeObject obj = new MakeObject(frame); frame.register(obj); @@ -38,9 +42,17 @@ }else if(type.equals("node")){ System.out.println("node0"); - ods.update("local", "fish3X", new FishPoint(0.0f,0.0f)); + ods.update("local", key, new FishPoint(0.0f,0.0f)); //ods.update("local", "fish1X", new FishPoint(-1.0f,0.0f)); - + if(cliNum == 0){ + new LookData(key,0); + } else { + new CheckLocalIndex(key,0); + new CheckParentIndex(key,0); + + } + + } }