Public Member Functions | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_value, traceback) |
def | __init__ (self, args=None, **kwargs) |
def | autodetect (cls, target) |
def | bind (self, source) |
def | close (self) |
def | emit (self, topic, msg, stamp=None, match=None, index=None) |
def | emit_meta (self) |
def | flush (self) |
def | is_highlighting (self) |
def | thread_excepthook (self, text, exc) |
def | validate (self) |
Public Attributes | |
args | |
source | |
inputs.Source instance bound to this sink More... | |
valid | |
Result of validate() More... | |
Static Public Attributes | |
DEFAULT_ARGS = dict(META=False) | |
Constructor argument defaults. More... | |
tuple | FILE_EXTENSIONS = () |
Auto-detection file extensions for subclasses, as (".ext", ) More... | |
Private Member Functions | |
def | _ensure_stamp_index (self, topic, msg, stamp=None, index=None) |
Private Attributes | |
_batch_meta | |
_counts | |
Output base class.
Definition at line 32 of file outputs.py.
def grepros.outputs.Sink.__init__ | ( | self, | |
args = None , |
|||
** | kwargs | ||
) |
@param args arguments as namespace or dictionary, case-insensitive @param args.meta whether to emit metainfo @param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented in grepros.outputs.AppSink, grepros.outputs.TopicSink, grepros.outputs.BagSink, grepros.plugins.mcap.McapSink, grepros.outputs.ConsoleSink, grepros.plugins.parquet.ParquetSink, grepros.plugins.auto.postgres.PostgresSink, grepros.plugins.auto.dbbase.BaseDataSink, grepros.plugins.auto.sqlite.SqliteSink, grepros.plugins.sql.SqlSink, grepros.plugins.auto.html.HtmlSink, and grepros.plugins.auto.csv.CsvSink.
Definition at line 41 of file outputs.py.
def grepros.outputs.Sink.__enter__ | ( | self | ) |
Context manager entry.
Definition at line 56 of file outputs.py.
def grepros.outputs.Sink.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback | |||
) |
Context manager exit, closes sink.
Definition at line 60 of file outputs.py.
|
private |
Returns (stamp, index) populated with current ROS time and topic index if `None`.
Definition at line 115 of file outputs.py.
def grepros.outputs.Sink.autodetect | ( | cls, | |
target | |||
) |
Returns true if target is recognizable as output for this sink class.
Reimplemented in grepros.outputs.BagSink, and grepros.plugins.auto.postgres.PostgresSink.
Definition at line 110 of file outputs.py.
def grepros.outputs.Sink.bind | ( | self, | |
source | |||
) |
Attaches source to sink.
Reimplemented in grepros.outputs.MultiSink, and grepros.outputs.TopicSink.
Definition at line 84 of file outputs.py.
def grepros.outputs.Sink.close | ( | self | ) |
Shuts down output, closing any files or connections.
Reimplemented in grepros.outputs.MultiSink, grepros.outputs.TopicSink, grepros.outputs.BagSink, grepros.plugins.mcap.McapSink, grepros.plugins.parquet.ParquetSink, grepros.plugins.auto.html.HtmlSink, grepros.plugins.auto.dbbase.BaseDataSink, grepros.plugins.sql.SqlSink, and grepros.plugins.auto.csv.CsvSink.
Definition at line 93 of file outputs.py.
def grepros.outputs.Sink.emit | ( | self, | |
topic, | |||
msg, | |||
stamp = None , |
|||
match = None , |
|||
index = None |
|||
) |
Outputs ROS message. @param topic full name of ROS topic the message is from @param msg ROS message @param stamp message ROS timestamp, if not current ROS time @param match ROS message with values tagged with match markers if matched, else None @param index message index in topic, if any
Reimplemented in grepros.outputs.MultiSink, grepros.outputs.AppSink, grepros.outputs.TopicSink, grepros.outputs.BagSink, grepros.plugins.mcap.McapSink, grepros.outputs.ConsoleSink, grepros.plugins.parquet.ParquetSink, grepros.plugins.auto.dbbase.BaseDataSink, grepros.plugins.auto.sqlite.SqliteSink, grepros.plugins.sql.SqlSink, grepros.plugins.auto.html.HtmlSink, and grepros.plugins.auto.csv.CsvSink.
Definition at line 71 of file outputs.py.
def grepros.outputs.Sink.emit_meta | ( | self | ) |
Outputs source metainfo like bag header as debug stream, if not already emitted.
Reimplemented in grepros.outputs.MultiSink, grepros.outputs.AppSink, and grepros.outputs.ConsoleSink.
Definition at line 64 of file outputs.py.
def grepros.outputs.Sink.flush | ( | self | ) |
Writes out any pending data to disk.
Reimplemented in grepros.outputs.MultiSink, and grepros.plugins.auto.html.HtmlSink.
Definition at line 98 of file outputs.py.
def grepros.outputs.Sink.is_highlighting | ( | self | ) |
Returns whether this sink requires highlighted matches.
Reimplemented in grepros.outputs.MultiSink, grepros.outputs.AppSink, grepros.outputs.ConsoleSink, and grepros.plugins.auto.html.HtmlSink.
Definition at line 105 of file outputs.py.
def grepros.outputs.Sink.thread_excepthook | ( | self, | |
text, | |||
exc | |||
) |
Handles exception, used by background threads.
Definition at line 101 of file outputs.py.
def grepros.outputs.Sink.validate | ( | self | ) |
Returns whether sink prerequisites are met (like ROS environment set if TopicSink).
Reimplemented in grepros.outputs.MultiSink, grepros.outputs.TopicSink, grepros.outputs.BagSink, grepros.plugins.mcap.McapSink, grepros.plugins.parquet.ParquetSink, grepros.plugins.auto.html.HtmlSink, grepros.plugins.auto.dbbase.BaseDataSink, grepros.plugins.auto.postgres.PostgresSink, grepros.plugins.auto.sqlite.SqliteSink, grepros.plugins.sql.SqlSink, and grepros.plugins.auto.csv.CsvSink.
Definition at line 88 of file outputs.py.
|
private |
Definition at line 47 of file outputs.py.
|
private |
Definition at line 48 of file outputs.py.
grepros.outputs.Sink.args |
Definition at line 50 of file outputs.py.
|
static |
Constructor argument defaults.
Definition at line 39 of file outputs.py.
|
static |
Auto-detection file extensions for subclasses, as (".ext", )
Definition at line 36 of file outputs.py.
grepros.outputs.Sink.source |
inputs.Source instance bound to this sink
Definition at line 54 of file outputs.py.
grepros.outputs.Sink.valid |
Result of validate()
Definition at line 52 of file outputs.py.