Classes | |
class | SourceMessage |
Returned from read() as (topic name, ROS message, ROS timestamp object). More... | |
Public Member Functions | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_value, traceback) |
def | __init__ (self, args=None, **kwargs) |
def | __iter__ (self) |
def | bind (self, sink) |
def | close (self) |
def | close_batch (self) |
def | format_message_meta (self, topic, msg, stamp, index=None) |
def | format_meta (self) |
def | get_batch (self) |
def | get_message_class (self, typename, typehash=None) |
def | get_message_definition (self, msg_or_type) |
def | get_message_meta (self, topic, msg, stamp, index=None) |
def | get_message_type_hash (self, msg_or_type) |
def | get_meta (self) |
def | is_processable (self, topic, msg, stamp, index=None) |
def | notify (self, status) |
def | read (self) |
def | thread_excepthook (self, text, exc) |
def | validate (self) |
Public Attributes | |
args | |
bar | |
ProgressBar instance, if any. More... | |
preprocess | |
Apply all filter arguments when reading, not only topic and type. More... | |
sink | |
outputs.Sink instance bound to this source More... | |
topics | |
All topics in source, as {(topic, typenane, typehash): total message count or None}. More... | |
valid | |
Result of validate() More... | |
Static Public Attributes | |
DEFAULT_ARGS | |
Constructor argument defaults. More... | |
string | MESSAGE_META_TEMPLATE = "{topic} #{index} ({type} {dt} {stamp})" |
Template for message metainfo line. More... | |
Private Member Functions | |
def | _parse_patterns (self) |
Private Attributes | |
_counts | |
_hashes | |
_patterns | |
_processables | |
_topics | |
def grepros.inputs.Source.__init__ | ( | self, | |
args = None , |
|||
** | kwargs | ||
) |
@param args arguments as namespace or dictionary, case-insensitive @param args.start_time earliest timestamp of messages to read @param args.end_time latest timestamp of messages to read @param args.unique emit messages that are unique in topic @param args.select_field message fields to use for uniqueness if not all @param args.noselect_field message fields to skip for uniqueness @param args.nth_message read every Nth message in topic @param args.nth_interval minimum time interval between messages in topic @param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented in grepros.inputs.AppSource, grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.__enter__ | ( | self | ) |
def grepros.inputs.Source.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback | |||
) |
def grepros.inputs.Source.__iter__ | ( | self | ) |
|
private |
def grepros.inputs.Source.bind | ( | self, | |
sink | |||
) |
Attaches sink to source
Reimplemented in grepros.inputs.TopicSource.
def grepros.inputs.Source.close | ( | self | ) |
Shuts down input, closing any files or connections.
Reimplemented in grepros.inputs.AppSource, grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.close_batch | ( | self | ) |
Shuts down input batch if any (like bagfile), else all input.
Reimplemented in grepros.inputs.BagSource.
def grepros.inputs.Source.format_message_meta | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns message metainfo string.
Reimplemented in grepros.inputs.BagSource.
def grepros.inputs.Source.format_meta | ( | self | ) |
Returns source metainfo string.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.get_batch | ( | self | ) |
Returns source batch identifier if any (like bagfile name if BagSource).
Reimplemented in grepros.inputs.BagSource.
def grepros.inputs.Source.get_message_class | ( | self, | |
typename, | |||
typehash = None |
|||
) |
Returns message type class.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.get_message_definition | ( | self, | |
msg_or_type | |||
) |
Returns ROS message type definition full text, including subtype definitions.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.get_message_meta | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns message metainfo data dict.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.get_message_type_hash | ( | self, | |
msg_or_type | |||
) |
Returns ROS message type MD5 hash.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.get_meta | ( | self | ) |
Returns source metainfo data dict.
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.is_processable | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns whether message passes source filters.
Reimplemented in grepros.inputs.AppSource, grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.notify | ( | self, | |
status | |||
) |
Reports match status of last produced message.
Reimplemented in grepros.inputs.BagSource.
def grepros.inputs.Source.read | ( | self | ) |
Yields messages from source, as (topic, msg, ROS time).
Reimplemented in grepros.inputs.AppSource, grepros.inputs.TopicSource, and grepros.inputs.BagSource.
def grepros.inputs.Source.thread_excepthook | ( | self, | |
text, | |||
exc | |||
) |
def grepros.inputs.Source.validate | ( | self | ) |
Returns whether source prerequisites are met (like ROS environment for TopicSource).
Reimplemented in grepros.inputs.TopicSource, and grepros.inputs.BagSource.
|
static |
|
static |
grepros.inputs.Source.preprocess |
grepros.inputs.Source.sink |
outputs.Sink instance bound to this source
grepros.inputs.Source.topics |
grepros.inputs.Source.valid |
Result of validate()