Mercurial > hg > Database > Alice
view src/main/java/alice/test/topology/fish/AssignStartX.java @ 547:e91a574b69de dispose
remove index
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 18 Aug 2015 16:15:17 +0900 |
parents | aefbe41fcf12 |
children |
line wrap: on
line source
package alice.test.topology.fish; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class AssignStartX extends CodeSegment { public Receiver routing = ids.create(CommandType.PEEK); public int startX; public AssignStartX(int startX) { this.startX = startX; } @Override public void run() { System.out.println("AssignStartX: " + startX); RoutingTable routing = this.routing.asClass(RoutingTable.class); int x = startX; System.out.println("RoutingTable: " + this.routing.getVal()); /*if (this.index >= this.routing.index) { AssignStartX cs = new AssignStartX(startX, index); cs.routing.setKey("local", "routing", this.routing.index); return; }*/ for (Routing r : routing.table) { System.out.println(r.name); ods.update(r.name, "startX", x); System.out.println("Assign: " + r.name + ".startX = " + x); x += r.width; } PeekStartX cs = new PeekStartX(); cs.startX.setKey("local", "startX", this); } }