Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
grepros.outputs.TopicSink Class Reference
Inheritance diagram for grepros.outputs.TopicSink:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

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

Static Public Attributes

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

Private Attributes

 _close_printed
 
 _pubs
 

Detailed Description

Publishes messages to ROS topics.

Definition at line 728 of file outputs.py.

Constructor & Destructor Documentation

◆ __init__()

def grepros.outputs.TopicSink.__init__ (   self,
  args = None,
**  kwargs 
)
@param   args                   arguments as namespace or dictionary, case-insensitive
@param   args.live              whether reading messages from live ROS topics
@param   args.queue_size_out    publisher queue size (default 10)
@param   args.publish_prefix    output topic prefix, prepended to input topic
@param   args.publish_suffix    output topic suffix, appended to output topic
@param   args.publish_fixname   single output topic name to publish to,
                        overrides prefix and suffix if given
@param   args.meta              whether to emit metainfo
@param   args.verbose           whether to emit debug information
@param   kwargs                 any and all arguments as keyword overrides, case-insensitive

Reimplemented from grepros.outputs.Sink.

Definition at line 735 of file outputs.py.

Member Function Documentation

◆ bind()

def grepros.outputs.TopicSink.bind (   self,
  source 
)
Attaches source to sink and blocks until connected to ROS.

Reimplemented from grepros.outputs.Sink.

Definition at line 775 of file outputs.py.

◆ close()

def grepros.outputs.TopicSink.close (   self)
Shuts down publishers.

Reimplemented from grepros.outputs.Sink.

Definition at line 797 of file outputs.py.

◆ emit()

def grepros.outputs.TopicSink.emit (   self,
  topic,
  msg,
  stamp = None,
  match = None,
  index = None 
)
Publishes message to output topic.

Reimplemented from grepros.outputs.Sink.

Definition at line 753 of file outputs.py.

◆ validate()

def grepros.outputs.TopicSink.validate (   self)
Returns whether ROS environment is set for publishing,
and output topic configuration is valid, emits error if not.

Reimplemented from grepros.outputs.Sink.

Definition at line 781 of file outputs.py.

Member Data Documentation

◆ _close_printed

grepros.outputs.TopicSink._close_printed
private

Definition at line 751 of file outputs.py.

◆ _pubs

grepros.outputs.TopicSink._pubs
private

Definition at line 750 of file outputs.py.

◆ DEFAULT_ARGS

grepros.outputs.TopicSink.DEFAULT_ARGS
static
Initial value:
= dict(LIVE=False, META=False, QUEUE_SIZE_OUT=10, PUBLISH_PREFIX="",
PUBLISH_SUFFIX="", PUBLISH_FIXNAME="", VERBOSE=False)

Constructor argument defaults.

Definition at line 732 of file outputs.py.

◆ valid

grepros.outputs.TopicSink.valid

Definition at line 794 of file outputs.py.


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


grepros
Author(s): Erki Suurjaak
autogenerated on Sat Jan 6 2024 03:11:30