|
grepros 1.3.0
grep for ROS bag files and live topics
|

Public Member Functions | |
| __init__ (self, args=None, **kwargs) | |
| close_output (self) | |
| ensure_rollover (self, topic, msg, stamp) | |
| format_output_meta (self) | |
| get_write_options (cls, label) | |
| make_filename (self) | |
| size (self) | |
| validate (self) | |
Public Attributes | |
| filename | |
| Current output file path. | |
Static Public Attributes | |
| DEFAULT_ARGS = dict(WRITE=None, WRITE_OPTIONS={}, VERBOSE=False) | |
| Constructor argument defaults. | |
| str | FILE_META_TEMPLATE = "{name} ({size})" |
| str | MULTI_META_TEMPLATE = "\n- {name} ({size}, {mcount}, {tcount})" |
| list | OPTIONS_TEMPLATES |
| Command-line help templates for rollover options, as [(name, text with s label placeholder)]. | |
| str | START_META_TEMPLATE = "{mcount} in {tcount} to " |
Provides output file rollover by size, duration, or message count.
Definition at line 347 of file outputs.py.
| __init__ | ( | self, | |
args = None, |
|||
| ** | kwargs | ||
| ) |
@param args arguments as namespace or dictionary, case-insensitive
@param args.write base name of output file to write if not using rollover-template
@param args.write_options {"rollover-size": bytes limit for individual output files,
"rollover-count": message limit for individual output files,
"rollover-duration": time span limit for individual output files,
as ROS duration or convertible seconds,
"rollover-template": output filename template, supporting
strftime format codes like "%H-%M-%S"
and "%(index)s" as output file index,
"overwrite": whether to overwrite existing file
(default false)}
@param args.verbose whether to emit debug information
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented in BagSink, HtmlSink, SqliteSink, and McapSink.
Definition at line 375 of file outputs.py.
| close_output | ( | self | ) |
Closes output file, if any.
Reimplemented in BagSink, HtmlSink, and McapSink.
Definition at line 469 of file outputs.py.
| ensure_rollover | ( | self, | |
| topic, | |||
| msg, | |||
| stamp | |||
| ) |
Closes current output file and prepares new filename if rollover limit reached.
Definition at line 439 of file outputs.py.
| format_output_meta | ( | self | ) |
Returns output file metainfo string, with names and sizes and message/topic counts.
Definition at line 486 of file outputs.py.
| get_write_options | ( | cls, | |
| label | |||
| ) |
Returns command-line help texts for rollover options, as [(name, help)].
Definition at line 528 of file outputs.py.
| make_filename | ( | self | ) |
Returns new filename for output, accounting for rollover template and overwrite.
Definition at line 474 of file outputs.py.
| size | ( | self | ) |
Returns current file size in bytes, or None if size lookup failed.
Reimplemented in BagSink, and SqliteSink.
Definition at line 519 of file outputs.py.
| validate | ( | self | ) |
Returns whether write options are valid, emits error if not, else populates options.
Reimplemented in BagSink, HtmlSink, SqliteSink, and McapSink.
Definition at line 399 of file outputs.py.
|
static |
Constructor argument defaults.
Definition at line 351 of file outputs.py.
|
static |
Definition at line 370 of file outputs.py.
| filename |
Current output file path.
Definition at line 396 of file outputs.py.
|
static |
Definition at line 372 of file outputs.py.
|
static |
Command-line help templates for rollover options, as [(name, text with s label placeholder)].
Definition at line 354 of file outputs.py.
|
static |
Definition at line 368 of file outputs.py.