# HG changeset patch # User e095732 # Date 1359536245 -32400 # Node ID 5f9709c253f7d77e55b39c4fd586c08b50f2d873 # Parent f842f414655bb8ca5c50c926542182c134087c65 add width diff -r f842f414655b -r 5f9709c253f7 src/alice/test/topology/aquarium/fx/AddObject.java --- a/src/alice/test/topology/aquarium/fx/AddObject.java Tue Jan 29 17:59:13 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/AddObject.java Wed Jan 30 17:57:25 2013 +0900 @@ -45,7 +45,7 @@ new SetTranslation(iv ,iv.getId()); list.add(iv); if (mynum == 0) new PositionController(iv.getId()); - new Share(iv.getId()); + new Share(iv.getId() ,10); } System.out.println("Create OBJ " + objCnt); System.out.println(list); diff -r f842f414655b -r 5f9709c253f7 src/alice/test/topology/aquarium/fx/CheckMyName.java --- a/src/alice/test/topology/aquarium/fx/CheckMyName.java Tue Jan 29 17:59:13 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/CheckMyName.java Wed Jan 30 17:57:25 2013 +0900 @@ -19,14 +19,16 @@ public void run() { String name = host.asString(); Matcher matcher = pattern.matcher(name); + matcher.find(); - matcher.find(); int num = new Integer(matcher.group(2)); + ods.put("local", "mynum", num); + ods.put("local", "width", 800); if (num==0) { new TopNode().execute(); } else { - new OtherNode().execute(); + new OtherNode(); } } diff -r f842f414655b -r 5f9709c253f7 src/alice/test/topology/aquarium/fx/OtherNode.java --- a/src/alice/test/topology/aquarium/fx/OtherNode.java Tue Jan 29 17:59:13 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/OtherNode.java Wed Jan 30 17:57:25 2013 +0900 @@ -1,8 +1,18 @@ package alice.test.topology.aquarium.fx; import alice.codesegment.CodeSegment; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; public class OtherNode extends CodeSegment{ + + private Receiver data1 = ids.create(CommandType.PEEK); + private Receiver data2 = ids.create(CommandType.PEEK); + + public OtherNode(){ + data1.setKey("width"); + data2.setKey("mynum"); + } @Override public void run() { @@ -10,6 +20,9 @@ new RegistRoutingTable(); ods.put("parent", "member", "ADD_MEM"); + int startX = data1.asInteger() * data2.asInteger(); + ods.put("local", "startX", startX); + ods.put("local", "objCnt", 5); Aquarium aqua = new Aquarium(); aqua.run();