|
| | __init__ (self, args=None, **kwargs) |
| |
| | emit (self, topic, msg, stamp=None, match=None, index=None) |
| | Writes message to database.
|
| |
| | validate (self) |
| | Returns whether "commit-interval" and "nesting" in args.write_options have valid value, if any, and file is writable; parses "message-yaml" and "overwrite" from args.write_options.
|
| |
| | __init__ (self, args=None, **kwargs) |
| |
| | close (self) |
| | Closes database connection, if any, emits metainfo.
|
| |
| | close_output (self) |
| | Closes database connection, if any, executing any pending statements.
|
| |
| | emit (self, topic, msg, stamp=None, match=None, index=None) |
| | Writes message to database.
|
| |
| | validate (self) |
| | Returns whether args.write_options has valid values, if any.
|
| |
| | __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).
|
| |
| | __init__ (self, args=None, **kwargs) |
| |
| | close (self) |
| | Clears data structures.
|
| |
| | validate (self) |
| | Returns whether arguments are valid.
|
| |
| | __init__ (self, args=None, **kwargs) |
| |
| | close_output (self) |
| | Closes output file, if any.
|
| |
| | ensure_rollover (self, topic, msg, stamp) |
| | Closes current output file and prepares new filename if rollover limit reached.
|
| |
| | format_output_meta (self) |
| | Returns output file metainfo string, with names and sizes and message/topic counts.
|
| |
| | get_write_options (cls, label) |
| | Returns command-line help texts for rollover options, as [(name, help)].
|
| |
| | make_filename (self) |
| | Returns new filename for output, accounting for rollover template and overwrite.
|
| |
| | validate (self) |
| | Returns whether write options are valid, emits error if not, else populates options.
|
| |
|
| | DEFAULT_ARGS = dict(META=False, WRITE_OPTIONS={}, VERBOSE=False) |
| | Constructor argument defaults.
|
| |
| str | ENGINE = "SQLite" |
| | Database engine name.
|
| |
| tuple | FILE_EXTENSIONS = (".sqlite", ".sqlite3") |
| | Auto-detection file extensions.
|
| |
| int | MAX_INT = 2**63 - 1 |
| | Maximum integer size supported in SQLite, higher values inserted as string.
|
| |
| int | COMMIT_INTERVAL = 1000 |
| | Number of emits between commits; 0 is autocommit.
|
| |
| | DEFAULT_ARGS = dict(META=False, WRITE_OPTIONS={}, VERBOSE=False) |
| | Constructor argument defaults.
|
| |
| | ENGINE = None |
| | Database engine name, overridden in subclasses.
|
| |
| list | MESSAGE_TYPE_BASECOLS |
| | Default columns for pkg/MsgType tables.
|
| |
| list | MESSAGE_TYPE_NESTCOLS |
| | Additional default columns for pkg/MsgType tables with nesting output.
|
| |
| list | MESSAGE_TYPE_TOPICCOLS |
| | Default topic-related columns for pkg/MsgType tables.
|
| |
| | DEFAULT_ARGS = dict(META=False) |
| | Constructor argument defaults.
|
| |
| tuple | FILE_EXTENSIONS = () |
| | Auto-detection file extensions for subclasses, as (".ext", )
|
| |
| | DEFAULT_ARGS = dict(WRITE_OPTIONS={}) |
| | Constructor argument defaults.
|
| |
| str | DEFAULT_DIALECT = "sqlite" |
| | Default SQL dialect used if dialect not specified.
|
| |
| dict | DIALECTS |
| | Supported SQL dialects and options.
|
| |
| list | KEYWORDS |
| | Words that need quoting if in name context, like table name.
|
| |
| | 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 " |
| |
Writes messages to an SQLite database.
Output will have:
- table "messages", with all messages as serialized binary data
- table "types", with message definitions
- table "topics", with topic information
plus:
table "pkg/MsgType" for each message type, with detailed fields, and JSON fields for arrays of nested subtypes, with foreign keys if nesting else subtype values as JSON dictionaries; plus underscore-prefixed fields for metadata, like _topic as the topic name.
If launched with nesting-option, tables will also be created for each nested message type.
- view "/topic/full/name" for each topic, selecting from the message type table
Definition at line 49 of file sqlite.py.