@@ -56,29 +56,6 @@ LatencyTestPublisher::LatencyTestPublisher()
56
56
57
57
LatencyTestPublisher::~LatencyTestPublisher ()
58
58
{
59
- // Static type endpoints shpuld have been removed for each payload iteration
60
- if (dynamic_types_)
61
- {
62
- destroy_data_endpoints ();
63
- }
64
- else if (nullptr != data_writer_
65
- || nullptr != data_reader_
66
- || nullptr != latency_data_pub_topic_
67
- || nullptr != latency_data_sub_topic_
68
- || !latency_data_type_)
69
- {
70
- EPROSIMA_LOG_ERROR (LATENCYPUBLISHER, " ERROR unregistering the DATA type and/or removing the endpoints" );
71
- }
72
-
73
- subscriber_->delete_datareader (command_reader_);
74
- participant_->delete_subscriber (subscriber_);
75
-
76
- publisher_->delete_datawriter (command_writer_);
77
- participant_->delete_publisher (publisher_);
78
-
79
- participant_->delete_topic (latency_command_sub_topic_);
80
- participant_->delete_topic (latency_command_pub_topic_);
81
-
82
59
std::string TestCommandType (" TestCommandType" );
83
60
participant_->unregister_type (TestCommandType);
84
61
@@ -677,6 +654,32 @@ void LatencyTestPublisher::run()
677
654
}
678
655
}
679
656
657
+ void LatencyTestPublisher::destroy_user_entities ()
658
+ {
659
+ // Static type endpoints shpuld have been removed for each payload iteration
660
+ if (dynamic_types_)
661
+ {
662
+ destroy_data_endpoints ();
663
+ }
664
+ else if (nullptr != data_writer_
665
+ || nullptr != data_reader_
666
+ || nullptr != latency_data_pub_topic_
667
+ || nullptr != latency_data_sub_topic_
668
+ || !latency_data_type_)
669
+ {
670
+ EPROSIMA_LOG_ERROR (LATENCYPUBLISHER, " ERROR unregistering the DATA type and/or removing the endpoints" );
671
+ }
672
+
673
+ subscriber_->delete_datareader (command_reader_);
674
+ participant_->delete_subscriber (subscriber_);
675
+
676
+ publisher_->delete_datawriter (command_writer_);
677
+ participant_->delete_publisher (publisher_);
678
+
679
+ participant_->delete_topic (latency_command_sub_topic_);
680
+ participant_->delete_topic (latency_command_pub_topic_);
681
+ }
682
+
680
683
void LatencyTestPublisher::export_csv (
681
684
const std::string& data_name,
682
685
const std::string& str_reliable,
0 commit comments