Function rmw_fastrtps_shared_cpp::create_datareader

Function Documentation

bool rmw_fastrtps_shared_cpp::create_datareader(const eprosima::fastdds::dds::DataReaderQos &datareader_qos, const rmw_subscription_options_t *subscription_options, eprosima::fastdds::dds::Subscriber *subscriber, eprosima::fastdds::dds::TopicDescription *des_topic, CustomDataReaderListener *listener, eprosima::fastdds::dds::DataReader **data_reader)

Create data reader.

Parameters:
  • datareader_qos[in] QoS of data reader.

  • subscription_options[in] Options of the subscription.

  • subscriber[in] A subsciber to create the data reader.

  • des_topic[in] TopicDescription returned by find_and_check_topic_and_type.

  • listener[in] The listener of the data reader.

  • data_reader[out] Will hold the pointer to the data reader.

Returns:

true when the data reader was created

Returns:

false when the data reader could not be created