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