annotate src/alice/test/topology/aquarium/fx/UpdateData.java @ 26:650c0f1270a3

add package alice.topology.manager.keeparive
author sugi
date Tue, 05 Nov 2013 03:57:09 +0900
parents 43ae0c87885b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
1 package alice.test.topology.aquarium.fx;
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
2
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
3 import alice.codesegment.CodeSegment;
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
4 import alice.datasegment.CommandType;
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
5 import alice.datasegment.Receiver;
4
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
6
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
7 public class UpdateData extends CodeSegment {
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
8
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
9 private Receiver data1 = ids.create(CommandType.PEEK);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
10 private Receiver data2 = ids.create(CommandType.TAKE);
4
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
11
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
12 public UpdateData(FishData fd){
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
13 ods.put("local", "diff", fd);
20
e095732
parents: 17
diff changeset
14 data1.setKey("FISH0");
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
15 data2.setKey("diff");
4
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
16 }
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
17
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
18 @Override
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
19 public void run() {
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
20 FishData fd1 = data1.asClass(FishData.class);
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
21 FishData fd2 = data2.asClass(FishData.class);
17
9bacc8b30c4b minor change
e095732
parents: 16
diff changeset
22
15
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
23 fd1.SetXYZ(fd1.getX()+fd2.getX(),
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
24 fd1.getY()+fd2.getY(),
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
25 fd1.getZ()+fd2.getZ());
3458bde834d3 remove NullPointerException
e095732
parents: 8
diff changeset
26 ods.update("local", data1.key, fd1);
16
5e6d40908c60 delete bug
e095732
parents: 15
diff changeset
27
4
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
28 }
50d77513d52e Platform runLater must use for handling instance from other thread (Not on FX application thread )
e095732
parents:
diff changeset
29 }