Skip to content

Commit

Permalink
Refs #20543: Add explicit status mask arguments
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed Mar 12, 2024
1 parent 032c8fe commit c366a69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/cpp/hello_world/Publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions examples/cpp/hello_world/Subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions examples/cpp/hello_world/SubscriberWaitset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit c366a69

Please sign in to comment.