|
1 | 1 | package us.ihmc.robotDataLogger.logger; |
2 | 2 |
|
3 | | -import java.io.File; |
4 | | -import java.io.FileNotFoundException; |
5 | | -import java.io.FileOutputStream; |
6 | | -import java.io.IOException; |
7 | | -import java.nio.ByteBuffer; |
8 | | -import java.nio.LongBuffer; |
9 | | -import java.nio.channels.FileChannel; |
10 | | -import java.util.ArrayList; |
11 | | -import java.util.List; |
12 | | -import java.util.concurrent.ExecutionException; |
13 | | -import java.util.concurrent.ExecutorService; |
14 | | -import java.util.concurrent.Executors; |
15 | | -import java.util.concurrent.Future; |
16 | | -import java.util.concurrent.TimeUnit; |
17 | | -import java.util.concurrent.TimeoutException; |
18 | | -import java.util.function.Consumer; |
19 | | - |
20 | 3 | import us.ihmc.commons.Conversions; |
21 | 4 | import us.ihmc.commons.MathTools; |
22 | 5 | import us.ihmc.idl.serializers.extra.YAMLSerializer; |
23 | 6 | import us.ihmc.log.LogTools; |
24 | | -import us.ihmc.robotDataLogger.Announcement; |
25 | | -import us.ihmc.robotDataLogger.CameraConfiguration; |
26 | | -import us.ihmc.robotDataLogger.CameraSettings; |
27 | | -import us.ihmc.robotDataLogger.CameraSettingsLoader; |
28 | | -import us.ihmc.robotDataLogger.Handshake; |
29 | | -import us.ihmc.robotDataLogger.HandshakeFileType; |
30 | | -import us.ihmc.robotDataLogger.HandshakePubSubType; |
31 | | -import us.ihmc.robotDataLogger.YoVariableClientInterface; |
32 | | -import us.ihmc.robotDataLogger.YoVariablesUpdatedListener; |
| 7 | +import us.ihmc.robotDataLogger.*; |
33 | 8 | import us.ihmc.robotDataLogger.handshake.LogHandshake; |
34 | 9 | import us.ihmc.robotDataLogger.handshake.YoVariableHandshakeParser; |
35 | 10 | import us.ihmc.robotDataLogger.jointState.JointState; |
|
40 | 15 | import us.ihmc.tools.compression.SnappyUtils; |
41 | 16 | import us.ihmc.yoVariables.variable.YoVariable; |
42 | 17 |
|
| 18 | +import java.io.File; |
| 19 | +import java.io.FileNotFoundException; |
| 20 | +import java.io.FileOutputStream; |
| 21 | +import java.io.IOException; |
| 22 | +import java.nio.ByteBuffer; |
| 23 | +import java.nio.LongBuffer; |
| 24 | +import java.nio.channels.FileChannel; |
| 25 | +import java.util.ArrayList; |
| 26 | +import java.util.List; |
| 27 | +import java.util.concurrent.*; |
| 28 | +import java.util.function.Consumer; |
| 29 | + |
43 | 30 | public class YoVariableLoggerListener implements YoVariablesUpdatedListener |
44 | 31 | { |
45 | 32 | /** |
@@ -434,12 +421,12 @@ public void disconnected() |
434 | 421 | yoVariableSummarizer.writeData(new File(tempDirectory, summaryFilename)); |
435 | 422 | } |
436 | 423 |
|
| 424 | + doneListener.accept(request); |
| 425 | + |
437 | 426 | tempDirectory.renameTo(finalDirectory); |
438 | 427 |
|
439 | 428 | // This gets printed here because it's been successful and is the final location of the log directory |
440 | 429 | LogTools.info("Log is saved as: " + finalDirectory); |
441 | | - |
442 | | - doneListener.accept(request); |
443 | 430 | } |
444 | 431 |
|
445 | 432 | if (alreadyShutDown) |
|
0 commit comments