@@ -26,6 +26,8 @@ public class YoVariableLoggerOptions
2626
2727 private boolean disableVideo = false ;
2828
29+ private boolean disableZEDLogging = false ;
30+
2931 private boolean flushAggressivelyToDisk = false ;
3032
3133 private boolean disableAutoDiscovery = false ;
@@ -41,53 +43,54 @@ public static YoVariableLoggerOptions parse(String[] args) throws JSAPException
4143 SimpleJSAP jsap = new SimpleJSAP ("YoVariabeLogger" ,
4244 "Logs YoVariables and video from a robot" ,
4345 new Parameter [] {new Switch ("disableVideo" , 'n' , "noVideo" , "Disable video recording" ),
44- new FlaggedOption ("logDirectory" ,
45- JSAP .STRING_PARSER ,
46- YoVariableLoggerOptions .defaultLogDirectory ,
47- JSAP .NOT_REQUIRED ,
48- 'd' ,
49- "directory" ,
50- "Directory where to save log files" ),
51- new FlaggedOption ("videoQuality" ,
52- JSAP .DOUBLE_PARSER ,
53- String .valueOf (YoVariableLoggerOptions .defaultVideoQuality ),
54- JSAP .NOT_REQUIRED ,
55- 'q' ,
56- "quality" ,
57- "Video quality for MJPEG" ),
58- new FlaggedOption ("videoCodec" ,
59- JSAP .STRING_PARSER ,
60- String .valueOf (defaultCodec ),
61- JSAP .NOT_REQUIRED ,
62- 'c' ,
63- "codec" ,
64- "Desired video codec. AV_CODEC_ID_H264 or AV_CODEC_ID_MJPEG" ),
65- new FlaggedOption ("crf" ,
66- JSAP .INTEGER_PARSER ,
67- String .valueOf (defaultCRF ),
68- JSAP .NOT_REQUIRED ,
69- 'r' ,
70- "crf" ,
71- "CRF (Constant rate factor) for H264. 0-51, 0 is lossless. Sane values are 18 to 28." ),
72- new FlaggedOption ("rotate" ,
73- JSAP .INTEGER_PARSER ,
74- "0" ,
75- JSAP .NOT_REQUIRED ,
76- 'o' ,
77- "rotate" ,
78- "Rotate logs in incoming folder, keep n logs. Set to zero to keep all logs." ),
79- new FlaggedOption ("allowManyInstances" ,
80- JSAP .BOOLEAN_PARSER ,
81- "false" ,
82- JSAP .NOT_REQUIRED ,
83- 'm' ,
84- "allowManyInstances" ,
85- "Allow more than one instance of the logger at once." ),
86- new Switch ("flushAggressivelyToDisk" ,
87- 's' ,
88- "sync" ,
89- "Aggressively flush data to disk. Reduces change of data loss but doesn't work on slow platters." ),
90- new Switch ("disableAutoDiscovery" , 'a' , "noDiscovery" , "Disable autodiscovery of clients." )});
46+ new Switch ("disableZEDLogging" , 'z' , "noZEDLogging" , "Disable ZED Logging" ),
47+ new FlaggedOption ("logDirectory" ,
48+ JSAP .STRING_PARSER ,
49+ YoVariableLoggerOptions .defaultLogDirectory ,
50+ JSAP .NOT_REQUIRED ,
51+ 'd' ,
52+ "directory" ,
53+ "Directory where to save log files" ),
54+ new FlaggedOption ("videoQuality" ,
55+ JSAP .DOUBLE_PARSER ,
56+ String .valueOf (YoVariableLoggerOptions .defaultVideoQuality ),
57+ JSAP .NOT_REQUIRED ,
58+ 'q' ,
59+ "quality" ,
60+ "Video quality for MJPEG" ),
61+ new FlaggedOption ("videoCodec" ,
62+ JSAP .STRING_PARSER ,
63+ String .valueOf (defaultCodec ),
64+ JSAP .NOT_REQUIRED ,
65+ 'c' ,
66+ "codec" ,
67+ "Desired video codec. AV_CODEC_ID_H264 or AV_CODEC_ID_MJPEG" ),
68+ new FlaggedOption ("crf" ,
69+ JSAP .INTEGER_PARSER ,
70+ String .valueOf (defaultCRF ),
71+ JSAP .NOT_REQUIRED ,
72+ 'r' ,
73+ "crf" ,
74+ "CRF (Constant rate factor) for H264. 0-51, 0 is lossless. Sane values are 18 to 28." ),
75+ new FlaggedOption ("rotate" ,
76+ JSAP .INTEGER_PARSER ,
77+ "0" ,
78+ JSAP .NOT_REQUIRED ,
79+ 'o' ,
80+ "rotate" ,
81+ "Rotate logs in incoming folder, keep n logs. Set to zero to keep all logs." ),
82+ new FlaggedOption ("allowManyInstances" ,
83+ JSAP .BOOLEAN_PARSER ,
84+ "false" ,
85+ JSAP .NOT_REQUIRED ,
86+ 'm' ,
87+ "allowManyInstances" ,
88+ "Allow more than one instance of the logger at once." ),
89+ new Switch ("flushAggressivelyToDisk" ,
90+ 's' ,
91+ "sync" ,
92+ "Aggressively flush data to disk. Reduces change of data loss but doesn't work on slow platters." ),
93+ new Switch ("disableAutoDiscovery" , 'a' , "noDiscovery" , "Disable autodiscovery of clients." )});
9194 JSAPResult config = jsap .parse (args );
9295 if (jsap .messagePrinted ())
9396 {
@@ -100,6 +103,7 @@ public static YoVariableLoggerOptions parse(String[] args) throws JSAPException
100103 options .setLogDirectory (config .getString ("logDirectory" ));
101104 options .setVideoQuality (config .getDouble ("videoQuality" ));
102105 options .setDisableVideo (config .getBoolean ("disableVideo" ));
106+ options .setDisableZEDLogging (config .getBoolean ("disableZEDLogging" ));
103107 options .setVideoCodec (CodecID .valueOf (config .getString ("videoCodec" )));
104108 options .setRotateLogs (config .getInt ("rotate" ));
105109 options .setAllowManyInstances (config .getBoolean ("allowManyInstances" ));
@@ -215,4 +219,13 @@ public void setDisableAutoDiscovery(boolean disableAutoDiscovery)
215219 this .disableAutoDiscovery = disableAutoDiscovery ;
216220 }
217221
222+ public boolean getDisableZEDLogging ()
223+ {
224+ return disableZEDLogging ;
225+ }
226+
227+ public void setDisableZEDLogging (boolean disableZEDLogging )
228+ {
229+ this .disableZEDLogging = disableZEDLogging ;
230+ }
218231}
0 commit comments