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