0
|
1 package alice.test.topology.aquarium.fx;
|
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
13
|
4 import alice.datasegment.CommandType;
|
|
5 import alice.datasegment.Receiver;
|
0
|
6
|
|
7 public class OtherNode extends CodeSegment{
|
13
|
8
|
|
9 private Receiver data1 = ids.create(CommandType.PEEK);
|
|
10 private Receiver data2 = ids.create(CommandType.PEEK);
|
|
11
|
|
12 public OtherNode(){
|
|
13 data1.setKey("width");
|
|
14 data2.setKey("mynum");
|
|
15 }
|
0
|
16
|
|
17 @Override
|
|
18 public void run() {
|
|
19 ods.put("local", "list", new RoutingTable("parent"));
|
|
20 new RegistRoutingTable();
|
18
|
21 ods.put("local", "MAXSIZE", 800);
|
0
|
22 ods.put("parent", "member", "ADD_MEM");
|
18
|
23 ods.put("parent", "CHILD", "ADD");
|
13
|
24 int startX = data1.asInteger() * data2.asInteger();
|
|
25 ods.put("local", "startX", startX);
|
18
|
26 new SendMessage();
|
|
27 new Share("MAXSIZE");
|
10
|
28 Aquarium aqua = new Aquarium();
|
|
29 aqua.run();
|
0
|
30 }
|
|
31
|
|
32 }
|