rqt_console.filters.message_filter module
- class rqt_console.filters.message_filter.MessageFilter(*args: Any, **kwargs: Any)
Bases:
BaseFilter
Contains filter logic for a message filter. If the regex flag is False.
simple ‘is this in that’ text matching is used on _text. If the regex flag is True _text is treated as a regular expression with one exception. If it does not start with a ^ a .* is appended, and if it does not end with a $ then a .* is added to the end. The filter_changed signal should be connected to a slot which notifies the overall filtering system that it needs to reevaluate all entries.
- has_filter()
- set_regex(checked)
Set the _regex.
- Parameters:
checked – boolean flag to set ‘’bool’’
- Emits filter_changed_signal:
If _enabled is true
- set_text(text)
Set the _text.
- Parameters:
text – text to set ‘’str’’
- Emits filter_changed_signal:
If _enabled is true
- test_message(message)
Test if the message matches the filter.
If the regex flag is False simple ‘is this in that’ text matching is used on _text. If the regex flag is True _text is treated as a regular expression with one exception. If it does not start with a ^ a .* is appended, and if it does not end with a $ then a .* is added to the end.
- Parameters:
message – the message to be tested against the filters, ‘’Message’’
- Returns:
True if the message matches, ‘’bool’’