Skip to content

Commit

Permalink
Explicitly register type object in ContentFilteredTopicExample (#3594) (
Browse files Browse the repository at this point in the history
#3659)

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit c2b2d4d)

Co-authored-by: Miguel Company <[email protected]>
  • Loading branch information
mergify[bot] and MiguelCompany authored Aug 8, 2023
1 parent d8f19e1 commit c73b3e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
#include <fastdds/dds/publisher/qos/PublisherQos.hpp>

#include "HelloWorldTypeObject.h"

using namespace eprosima::fastdds::dds;

bool ContentFilteredTopicExamplePublisher::init()
{
// The default filter class requires the TypeObject to be registered
// (see https://fast-dds.docs.eprosima.com/en/latest/fastdds/dds_layer/topic/contentFilteredTopic/createContentFilteredTopic.html)
registerHelloWorldTypes();

// Initialize internal variables
matched_ = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
#include <fastdds/dds/subscriber/SampleInfo.hpp>

#include "HelloWorldTypeObject.h"

using namespace eprosima::fastdds::dds;

bool ContentFilteredTopicExampleSubscriber::init(
bool custom_filter)
{
// The default filter class requires the TypeObject to be registered
// (see https://fast-dds.docs.eprosima.com/en/latest/fastdds/dds_layer/topic/contentFilteredTopic/createContentFilteredTopic.html)
registerHelloWorldTypes();

// Initialize internal variables
matched_ = 0;

Expand Down

0 comments on commit c73b3e4

Please sign in to comment.