|
def | __init__ (self, args=None, **kwargs) |
|
def | autodetect (cls, target) |
|
def | close (self) |
|
def | close_output (self) |
|
def | emit (self, topic, msg, stamp=None, match=None, index=None) |
|
def | size (self) |
|
def | validate (self) |
|
def | __enter__ (self) |
|
def | __exit__ (self, exc_type, exc_value, traceback) |
|
def | bind (self, source) |
|
def | emit_meta (self) |
|
def | flush (self) |
|
def | is_highlighting (self) |
|
def | thread_excepthook (self, text, exc) |
|
def | ensure_rollover (self, topic, msg, stamp) |
|
def | format_output_meta (self) |
|
def | get_write_options (cls, label) |
|
def | make_filename (self) |
|
|
| DEFAULT_ARGS = dict(META=False, WRITE_OPTIONS={}, VERBOSE=False) |
| Constructor argument defaults. More...
|
|
| DEFAULT_ARGS = dict(META=False) |
| Constructor argument defaults. More...
|
|
tuple | FILE_EXTENSIONS = () |
| Auto-detection file extensions for subclasses, as (".ext", ) More...
|
|
| DEFAULT_ARGS = dict(VERBOSE=False, WRITE=None, WRITE_OPTIONS={}) |
| Constructor argument defaults. More...
|
|
string | FILE_META_TEMPLATE = "{name} ({size})" |
|
string | 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)]. More...
|
|
string | START_META_TEMPLATE = "{mcount} in {tcount} to " |
|
Writes messages to bagfile.
Definition at line 591 of file outputs.py.
◆ __init__()
def grepros.outputs.BagSink.__init__ |
( |
|
self, |
|
|
|
args = None , |
|
|
** |
kwargs |
|
) |
| |
@param args arguments as namespace or dictionary, case-insensitive;
or a single path as the ROS bagfile to write,
or a stream or {@link grepros.api.Bag Bag} instance to write to
@param args.write name of ROS bagfile to create or append to,
or a stream to write to
@param args.write_options {"overwrite": whether to overwrite existing file
(default false),
"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}
@param args.meta whether to emit metainfo
@param args.verbose whether to emit debug information
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented from grepros.outputs.Sink.
Definition at line 597 of file outputs.py.
◆ _ensure_open()
def grepros.outputs.BagSink._ensure_open |
( |
|
self | ) |
|
|
private |
Opens output file if not already open.
Definition at line 691 of file outputs.py.
◆ autodetect()
def grepros.outputs.BagSink.autodetect |
( |
|
cls, |
|
|
|
target |
|
) |
| |
◆ close()
def grepros.outputs.BagSink.close |
( |
|
self | ) |
|
◆ close_output()
def grepros.outputs.BagSink.close_output |
( |
|
self | ) |
|
◆ emit()
def grepros.outputs.BagSink.emit |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp = None , |
|
|
|
match = None , |
|
|
|
index = None |
|
) |
| |
◆ size()
def grepros.outputs.BagSink.size |
( |
|
self | ) |
|
◆ validate()
def grepros.outputs.BagSink.validate |
( |
|
self | ) |
|
Returns whether write options are valid and ROS environment set, emits error if not.
Reimplemented from grepros.outputs.Sink.
Definition at line 646 of file outputs.py.
◆ _bag
grepros.outputs.BagSink._bag |
|
private |
◆ _close_printed
grepros.outputs.BagSink._close_printed |
|
private |
◆ _is_pathed
grepros.outputs.BagSink._is_pathed |
|
private |
◆ _overwrite
grepros.outputs.BagSink._overwrite |
|
private |
◆ DEFAULT_ARGS
grepros.outputs.BagSink.DEFAULT_ARGS = dict(META=False, WRITE_OPTIONS={}, VERBOSE=False) |
|
static |
Constructor argument defaults.
Definition at line 595 of file outputs.py.
◆ filename
grepros.outputs.BagSink.filename |
◆ valid
grepros.outputs.BagSink.valid |
The documentation for this class was generated from the following file: