grepros 1.2.2
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
AppSink Class Reference

Provides messages to callback function. More...

Inheritance diagram for AppSink:
Inheritance graph

Public Member Functions

 __init__ (self, args=None, **kwargs)
 
 emit (self, topic, msg, stamp=None, match=None, index=None)
 Registers message and invokes registered emit callback, if any.
 
 emit_meta (self)
 Invokes registered metaemit callback, if any, and not already invoked.
 
 is_highlighting (self)
 Returns whether emitted matches are highlighted.
 
 validate (self)
 Returns whether callbacks are valid, emits error if not.
 
- Public Member Functions inherited from Sink
 __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).
 

Public Attributes

 args
 
 valid
 
- Public Attributes inherited from Sink
 args
 
 source
 inputs.Source instance bound to this sink
 
 valid
 Result of validate()
 

Static Public Attributes

 DEFAULT_ARGS = dict(EMIT=None, METAEMIT=None, HIGHLIGHT=False)
 Constructor argument defaults.
 
- Static Public Attributes inherited from Sink
 DEFAULT_ARGS = dict(META=False)
 Constructor argument defaults.
 
tuple FILE_EXTENSIONS = ()
 Auto-detection file extensions for subclasses, as (".ext", )
 

Detailed Description

Provides messages to callback function.

Definition at line 867 of file outputs.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  args = None,
**  kwargs 
)
Parameters
argsarguments as namespace or dictionary, case-insensitive; or emit callback
args.emitcallback(topic, msg, stamp, highlighted msg, index in topic), if any
args.metaemitcallback(metadata dict) if any, invoked before first emit from source batch
args.highlightwhether to expect highlighted matching fields from source messages
kwargsany and all arguments as keyword overrides, case-insensitive

Reimplemented from Sink.

Definition at line 882 of file outputs.py.

Member Function Documentation

◆ emit()

emit (   self,
  topic,
  msg,
  stamp = None,
  match = None,
  index = None 
)

Registers message and invokes registered emit callback, if any.

Reimplemented from Sink.

Definition at line 896 of file outputs.py.

◆ emit_meta()

emit_meta (   self)

Invokes registered metaemit callback, if any, and not already invoked.

Reimplemented from Sink.

Definition at line 887 of file outputs.py.

◆ is_highlighting()

is_highlighting (   self)

Returns whether emitted matches are highlighted.

Reimplemented from Sink.

Definition at line 903 of file outputs.py.

◆ validate()

validate (   self)

Returns whether callbacks are valid, emits error if not.

Reimplemented from Sink.

Definition at line 907 of file outputs.py.

Member Data Documentation

◆ args

args

Definition at line 912 of file outputs.py.

◆ DEFAULT_ARGS

DEFAULT_ARGS = dict(EMIT=None, METAEMIT=None, HIGHLIGHT=False)
static

Constructor argument defaults.

Definition at line 871 of file outputs.py.

◆ valid

valid

Definition at line 910 of file outputs.py.


The documentation for this class was generated from the following file: