From 6f2a1e0776662ae472d844499eba218d60a5d8c7 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 12 Mar 2024 17:13:20 +0100 Subject: [PATCH] Refs #20543: Add explicit status mask arguments Signed-off-by: JesusPoderoso --- examples/cpp/hello_world/Publisher.cpp | 6 +++--- examples/cpp/hello_world/Subscriber.cpp | 6 +++--- examples/cpp/hello_world/SubscriberWaitset.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/cpp/hello_world/Publisher.cpp b/examples/cpp/hello_world/Publisher.cpp index 308fc7c4610..bee64531215 100644 --- a/examples/cpp/hello_world/Publisher.cpp +++ b/examples/cpp/hello_world/Publisher.cpp @@ -47,7 +47,7 @@ HelloWorldPublisher::HelloWorldPublisher() // Create the participant auto factory = DomainParticipantFactory::get_instance(); - participant_ = factory->create_participant_with_default_profile(); + participant_ = factory->create_participant_with_default_profile(nullptr, StatusMask::none()); if (participant_ == nullptr) { throw std::runtime_error("Participant initialization failed"); @@ -59,7 +59,7 @@ HelloWorldPublisher::HelloWorldPublisher() // Create the publisher PublisherQos pub_qos = PUBLISHER_QOS_DEFAULT; participant_->get_default_publisher_qos(pub_qos); - publisher_ = participant_->create_publisher(pub_qos); + publisher_ = participant_->create_publisher(pub_qos, nullptr, StatusMask::none()); if (publisher_ == nullptr) { throw std::runtime_error("Publisher initialization failed"); @@ -77,7 +77,7 @@ HelloWorldPublisher::HelloWorldPublisher() // Create the data writer DataWriterQos writer_qos = DATAWRITER_QOS_DEFAULT; publisher_->get_default_datawriter_qos(writer_qos); - writer_ = publisher_->create_datawriter(topic_, writer_qos, this); + writer_ = publisher_->create_datawriter(topic_, writer_qos, this, StatusMask::all()); if (writer_ == nullptr) { throw std::runtime_error("DataWriter initialization failed"); diff --git a/examples/cpp/hello_world/Subscriber.cpp b/examples/cpp/hello_world/Subscriber.cpp index aafae52432d..4520f4a5470 100644 --- a/examples/cpp/hello_world/Subscriber.cpp +++ b/examples/cpp/hello_world/Subscriber.cpp @@ -46,7 +46,7 @@ HelloWorldSubscriber::HelloWorldSubscriber() { // Create the participant auto factory = DomainParticipantFactory::get_instance(); - participant_ = factory->create_participant_with_default_profile(); + participant_ = factory->create_participant_with_default_profile(nullptr, StatusMask::none()); if (participant_ == nullptr) { throw std::runtime_error("Participant initialization failed"); @@ -58,7 +58,7 @@ HelloWorldSubscriber::HelloWorldSubscriber() // Create the subscriber SubscriberQos sub_qos = SUBSCRIBER_QOS_DEFAULT; participant_->get_default_subscriber_qos(sub_qos); - subscriber_ = participant_->create_subscriber(sub_qos); + subscriber_ = participant_->create_subscriber(sub_qos, nullptr, StatusMask::none()); if (subscriber_ == nullptr) { throw std::runtime_error("Subscriber initialization failed"); @@ -76,7 +76,7 @@ HelloWorldSubscriber::HelloWorldSubscriber() // Create the reader DataReaderQos reader_qos = DATAREADER_QOS_DEFAULT; subscriber_->get_default_datareader_qos(reader_qos); - reader_ = subscriber_->create_datareader(topic_, reader_qos, this); + reader_ = subscriber_->create_datareader(topic_, reader_qos, this, StatusMask::all()); if (reader_ == nullptr) { throw std::runtime_error("DataReader initialization failed"); diff --git a/examples/cpp/hello_world/SubscriberWaitset.cpp b/examples/cpp/hello_world/SubscriberWaitset.cpp index 9dbc38b9e53..2239a2d8c78 100644 --- a/examples/cpp/hello_world/SubscriberWaitset.cpp +++ b/examples/cpp/hello_world/SubscriberWaitset.cpp @@ -48,7 +48,7 @@ HelloWorldSubscriberWaitset::HelloWorldSubscriberWaitset() { // Create the participant auto factory = DomainParticipantFactory::get_instance(); - participant_ = factory->create_participant_with_default_profile(); + participant_ = factory->create_participant_with_default_profile(nullptr, StatusMask::none()); if (participant_ == nullptr) { throw std::runtime_error("Participant initialization failed"); @@ -60,7 +60,7 @@ HelloWorldSubscriberWaitset::HelloWorldSubscriberWaitset() // Create the subscriber SubscriberQos sub_qos = SUBSCRIBER_QOS_DEFAULT; participant_->get_default_subscriber_qos(sub_qos); - subscriber_ = participant_->create_subscriber(sub_qos); + subscriber_ = participant_->create_subscriber(sub_qos, nullptr, StatusMask::none()); if (subscriber_ == nullptr) { throw std::runtime_error("Subscriber initialization failed"); @@ -78,7 +78,7 @@ HelloWorldSubscriberWaitset::HelloWorldSubscriberWaitset() // Create the reader DataReaderQos reader_qos = DATAREADER_QOS_DEFAULT; subscriber_->get_default_datareader_qos(reader_qos); - reader_ = subscriber_->create_datareader(topic_, reader_qos); + reader_ = subscriber_->create_datareader(topic_, reader_qos, nullptr, StatusMask::all()); if (reader_ == nullptr) { throw std::runtime_error("DataReader initialization failed");