Writes messages to CSV files, each topic to a separate file.
More...
|
| __init__ (self, args=None, **kwargs) |
|
| close (self) |
| Closes output file(s), if any.
|
|
| emit (self, topic, msg, stamp=None, match=None, index=None) |
| Writes message to output file.
|
|
| validate (self) |
| Returns whether arguments and overwrite option are valid, and file base is writable.
|
|
| __init__ (self, args=None, **kwargs) |
|
| __enter__ (self) |
| Context manager entry.
|
|
| __exit__ (self, exc_type, exc_value, traceback) |
| Context manager exit, closes sink.
|
|
| autodetect (cls, target) |
| Returns true if target is recognizable as output for this sink class.
|
|
| bind (self, source) |
| Attaches source to sink.
|
|
| close (self) |
| Shuts down output, closing any files or connections.
|
|
| configure (self, args=None, **kwargs) |
| Updates sink configuration.
|
|
| emit (self, topic, msg, stamp=None, match=None, index=None) |
| Outputs ROS message.
|
|
| emit_meta (self) |
| Outputs source metainfo like bag header as debug stream, if not already emitted.
|
|
| flush (self) |
| Writes out any pending data to disk.
|
|
| is_highlighting (self) |
| Returns whether this sink requires highlighted matches.
|
|
| thread_excepthook (self, text, exc) |
| Handles exception, used by background threads.
|
|
| validate (self) |
| Returns whether sink prerequisites are met (like ROS environment set if LiveSink).
|
|
|
| DEFAULT_ARGS = dict(EMIT_FIELD=(), META=False, NOEMIT_FIELD=(), WRITE_OPTIONS={}, VERBOSE=False) |
| Constructor argument defaults.
|
|
tuple | FILE_EXTENSIONS = (".csv", ) |
| Auto-detection file extensions.
|
|
| DEFAULT_ARGS = dict(META=False) |
| Constructor argument defaults.
|
|
tuple | FILE_EXTENSIONS = () |
| Auto-detection file extensions for subclasses, as (".ext", )
|
|
Writes messages to CSV files, each topic to a separate file.
Definition at line 29 of file csv.py.
◆ __init__()
__init__ |
( |
|
self, |
|
|
|
args = None , |
|
|
** |
kwargs |
|
) |
| |
- Parameters
-
args | arguments as namespace or dictionary, case-insensitive; or a single path as the base name of CSV files to write |
args.emit_field | message fields to emit in output if not all |
args.noemit_field | message fields to skip in output |
args.write | base name of CSV files to write, will add topic name like "name.__my__topic.csv" for "/my/topic", will add counter like "name.__my__topic.2.csv" if exists |
args.write_options | {"overwrite": whether to overwrite existing files (default false)} |
args.meta | whether to emit metainfo |
args.verbose | whether to emit debug information |
kwargs | any and all arguments as keyword overrides, case-insensitive |
Reimplemented from Sink.
Definition at line 53 of file csv.py.
◆ close()
Closes output file(s), if any.
Reimplemented from Sink.
Definition at line 95 of file csv.py.
◆ emit()
emit |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp = None , |
|
|
|
match = None , |
|
|
|
index = None |
|
) |
| |
Writes message to output file.
Reimplemented from Sink.
Definition at line 69 of file csv.py.
◆ validate()
Returns whether arguments and overwrite option are valid, and file base is writable.
Reimplemented from Sink.
Definition at line 79 of file csv.py.
◆ close
◆ DEFAULT_ARGS
DEFAULT_ARGS = dict(EMIT_FIELD=(), META=False, NOEMIT_FIELD=(), WRITE_OPTIONS={}, VERBOSE=False) |
|
static |
Constructor argument defaults.
Definition at line 36 of file csv.py.
◆ FILE_EXTENSIONS
tuple FILE_EXTENSIONS = (".csv", ) |
|
static |
Auto-detection file extensions.
Definition at line 33 of file csv.py.
◆ valid
The documentation for this class was generated from the following file: