Public Member Functions | |
def | __init__ (self, args=None, sinks=(), **kwargs) |
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 | validate (self) |
![]() | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_value, traceback) |
def | __init__ (self, args=None, **kwargs) |
def | autodetect (cls, target) |
def | thread_excepthook (self, text, exc) |
Public Attributes | |
sinks | |
List of all combined sinks. More... | |
valid | |
![]() | |
args | |
source | |
inputs.Source instance bound to this sink More... | |
valid | |
Result of validate() More... | |
Static Public Attributes | |
dictionary | FLAG_CLASSES = {"PUBLISH": TopicSink, "CONSOLE": ConsoleSink, "APP": AppSink} |
Autobinding between argument flags and sink classes. More... | |
dictionary | FORMAT_CLASSES = {"bag": BagSink} |
Autobinding between --write TARGET format=FORMAT and sink classes. More... | |
![]() | |
DEFAULT_ARGS = dict(META=False) | |
Constructor argument defaults. More... | |
tuple | FILE_EXTENSIONS = () |
Auto-detection file extensions for subclasses, as (".ext", ) More... | |
Combines any number of sinks.
Definition at line 850 of file outputs.py.
def grepros.outputs.MultiSink.__init__ | ( | self, | |
args = None , |
|||
sinks = () , |
|||
** | kwargs | ||
) |
Accepts more arguments, given to the real sinks constructed. @param args arguments as namespace or dictionary, case-insensitive @param args.console print matches to console @param args.write [[target, format=FORMAT, key=value, ], ] @param args.publish publish matches to live topics @param args.app provide messages to given callback function @param sinks pre-created sinks, arguments will be ignored @param kwargs any and all arguments as keyword overrides, case-insensitive
Definition at line 859 of file outputs.py.
def grepros.outputs.MultiSink.bind | ( | self, | |
source | |||
) |
Attaches source to all sinks, sets thread_excepthook on all sinks.
Reimplemented from grepros.outputs.Sink.
Definition at line 910 of file outputs.py.
def grepros.outputs.MultiSink.close | ( | self | ) |
Closes all sinks.
Reimplemented from grepros.outputs.Sink.
Definition at line 923 of file outputs.py.
def grepros.outputs.MultiSink.emit | ( | self, | |
topic, | |||
msg, | |||
stamp = None , |
|||
match = None , |
|||
index = None |
|||
) |
Outputs ROS message to all sinks.
Reimplemented from grepros.outputs.Sink.
Definition at line 903 of file outputs.py.
def grepros.outputs.MultiSink.emit_meta | ( | self | ) |
Outputs source metainfo in one sink, if not already emitted.
Reimplemented from grepros.outputs.Sink.
Definition at line 896 of file outputs.py.
def grepros.outputs.MultiSink.flush | ( | self | ) |
Flushes all sinks.
Reimplemented from grepros.outputs.Sink.
Definition at line 928 of file outputs.py.
def grepros.outputs.MultiSink.is_highlighting | ( | self | ) |
Returns whether any sink requires highlighted matches.
Reimplemented from grepros.outputs.Sink.
Definition at line 933 of file outputs.py.
def grepros.outputs.MultiSink.validate | ( | self | ) |
Returns whether prerequisites are met for all sinks.
Reimplemented from grepros.outputs.Sink.
Definition at line 917 of file outputs.py.
|
static |
Autobinding between argument flags and sink classes.
Definition at line 854 of file outputs.py.
|
static |
Autobinding between --write TARGET format=FORMAT
and sink classes.
Definition at line 857 of file outputs.py.
grepros.outputs.MultiSink.sinks |
List of all combined sinks.
Definition at line 876 of file outputs.py.
grepros.outputs.MultiSink.valid |
Definition at line 873 of file outputs.py.