grepros 1.3.0
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
AppSink Class Reference
Inheritance diagram for AppSink:
Inheritance graph

Public Member Functions

 __init__ (self, args=None, **kwargs)
 
 emit (self, topic, msg, stamp=None, match=None, index=None)
 
 emit_meta (self)
 
 is_highlighting (self)
 
 validate (self)
 
- Public Member Functions inherited from Sink
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_value, traceback)
 
 autodetect (cls, target)
 
 bind (self, source)
 
 close (self)
 
 configure (self, args=None, **kwargs)
 
 flush (self)
 
 thread_excepthook (self, text, exc)
 

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 851 of file outputs.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from Sink.

Definition at line 857 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 879 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 870 of file outputs.py.

◆ is_highlighting()

is_highlighting (   self)
Returns whether emitted matches are highlighted.

Reimplemented from Sink.

Definition at line 886 of file outputs.py.

◆ validate()

validate (   self)
Returns whether callbacks are valid, emits error if not.

Reimplemented from Sink.

Definition at line 890 of file outputs.py.

Member Data Documentation

◆ args

args

Definition at line 895 of file outputs.py.

◆ DEFAULT_ARGS

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

Constructor argument defaults.

Definition at line 855 of file outputs.py.

◆ valid

valid

Definition at line 893 of file outputs.py.


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