Class: Subscription

Subscription()

- Class representing a ROS 2 Subscription

Members

isRaw :boolean

Type:
  • boolean
Source:

topic :string

Type:
  • string
Source:

Methods

clearContentFilter() → {boolean}

Clear the current content-filter. No filtering is to be applied.
Source:
Returns:
- True if successful; false otherwise
Type
boolean

hasContentFilter() → {boolean}

Test if the RMW supports content-filtered topics and that this subscription has an active wellformed content-filter.
Source:
Returns:
True if content-filtering will be applied; otherwise false.
Type
boolean

setContentFilter(contentFilter) → {boolean}

If the RMW supports content-filtered topics set this subscription's content-filter.
Parameters:
Name Type Description
contentFilter object The content-filter description.
Properties
Name Type Attributes Description
expression string Specifies the criteria to select messages of interest. It is similar to the WHERE part of an SQL clause. Clear the current contentFilter if the expression is undefined or an empty string.
parameters Array.<object> <optional>
Array of objects that give values to the ‘parameters’ (i.e., "%n" tokens) in the filter_expression. The number of supplied parameters must fit with the requested values in the filter_expression (i.e., the number of %n tokens). default: undefined.
Source:
See:
Returns:
- True if successful; false otherwise
Type
boolean