|
def | _clear_data (self) |
|
def | _configure_flags (self, highlight=None) |
|
def | _generate (self) |
|
def | _generate_context (self, topickey, before=False) |
|
def | _has_in_window (self, topickey, length, status, full=False) |
|
def | _is_max_done (self) |
|
def | _is_processable (self, topic, msg, stamp) |
|
def | _parse_patterns (self) |
|
def | _prepare (self, source, sink=None, highlight=None) |
|
def | _prune_data (self, topickey) |
|
def | _register_message (self, topickey, msgid, msg, stamp) |
|
ROS message grepper.
In highlighted results, message field values that match search criteria are modified
to wrap the matching parts in {@link grepros.common.MatchMarkers MatchMarkers} tags,
with numeric field values converted to strings beforehand.
Definition at line 26 of file search.py.
def grepros.search.Scanner.__init__ |
( |
|
self, |
|
|
|
args = None , |
|
|
** |
kwargs |
|
) |
| |
@param args arguments as namespace or dictionary, case-insensitive
@param args.pattern pattern(s) to find in message field values
@param args.fixed_string pattern contains ordinary strings, not regular expressions
@param args.case use case-sensitive matching in pattern
@param args.invert select messages not matching pattern
@param args.highlight highlight matched values
@param args.before number of messages of leading context to emit before match
@param args.after number of messages of trailing context to emit after match
@param args.context number of messages of leading and trailing context to emit
around match, overrides args.before and args.after
@param args.max_count number of matched messages to emit (per file if bag input)
@param args.max_per_topic number of matched messages to emit from each topic
@param args.max_topics number of topics to emit matches from
@param args.nth_match emit every Nth match in topic
@param args.select_field message fields to use in matching if not all
@param args.noselect_field message fields to skip in matching
@param args.match_wrapper string to wrap around matched values in find() and match(),
both sides if one value, start and end if more than one,
or no wrapping if zero values (default "**")
@param kwargs any and all arguments as keyword overrides, case-insensitive
<!--sep-->
Additional arguments when using match() or find(grepros.api.Bag):
@param args.topic ROS topics to read if not all
@param args.type ROS message types to read if not all
@param args.skip_topic ROS topics to skip
@param args.skip_type ROS message types to skip
@param args.start_time earliest timestamp of messages to read
@param args.end_time latest timestamp of messages to read
@param args.start_index message index within topic to start from
@param args.end_index message index within topic to stop at
@param args.unique emit messages that are unique in topic
@param args.nth_message read every Nth message in topic
@param args.nth_interval minimum time interval between messages in topic
@param args.condition Python expressions that must evaluate as true
for message to be processable, see ConditionMixin
@param args.progress whether to print progress bar
@param args.stop_on_error stop execution on any error like unknown message type
Definition at line 48 of file search.py.
def grepros.search.Scanner.find |
( |
|
self, |
|
|
|
source, |
|
|
|
highlight = None |
|
) |
| |
Yields matched and context messages from source.
@param source inputs.Source or api.Bag instance
@param highlight whether to highlight matched values in message fields,
defaults to flag from constructor
@return GrepMessage namedtuples of
(topic, message, timestamp, match, index in topic),
where match is matched optionally highlighted message
or `None` if yielding a context message
Definition at line 116 of file search.py.