rclcpp  master
C++ ROS Client Library API
Public Types | Public Member Functions | List of all members
rclcpp::ParameterEventsFilter Class Reference

#include <parameter_events_filter.hpp>

Public Types

enum  EventType { EventType::NEW, EventType::DELETED, EventType::CHANGED }
 
using EventPair = std::pair< EventType, rcl_interfaces::msg::Parameter * >
 Used for the listed results. More...
 

Public Member Functions

 ParameterEventsFilter (rcl_interfaces::msg::ParameterEvent::SharedPtr event, const std::vector< std::string > &names, const std::vector< EventType > &types)
 Construct a filtered view of a parameter event. More...
 
const std::vector< EventPair > & get_events () const
 Get the result of the filter. More...
 

Member Typedef Documentation

◆ EventPair

using rclcpp::ParameterEventsFilter::EventPair = std::pair<EventType, rcl_interfaces::msg::Parameter *>

Used for the listed results.

Member Enumeration Documentation

◆ EventType

Enumerator
NEW 
DELETED 
CHANGED 

Constructor & Destructor Documentation

◆ ParameterEventsFilter()

rclcpp::ParameterEventsFilter::ParameterEventsFilter ( rcl_interfaces::msg::ParameterEvent::SharedPtr  event,
const std::vector< std::string > &  names,
const std::vector< EventType > &  types 
)

Construct a filtered view of a parameter event.

Parameters
[in]eventThe parameter event message to filter.
[in]namesA list of parameter names of interest.
[in]typesA list of the types of parameter events of iterest. EventType NEW, DELETED, or CHANGED

Example Usage:

If you have recieved a parameter event and are only interested in parameters foo and bar being added or changed but don't care about deletion.

Member Function Documentation

◆ get_events()

const std::vector<EventPair>& rclcpp::ParameterEventsFilter::get_events ( ) const

Get the result of the filter.

Returns
A std::vector<EventPair> of all matching parameter changes in this event.

The documentation for this class was generated from the following file:
rclcpp::ParameterEventsFilter::EventType::CHANGED
@ CHANGED
rclcpp::ParameterEventsFilter
Definition: parameter_events_filter.hpp:34
rclcpp::ParameterEventsFilter::EventType::NEW
@ NEW