From c2365c91625eba6082e050d9477dd1908ed0214c Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Mon, 15 Jul 2024 13:23:11 +0200 Subject: [PATCH] Refs #21321: Update references to Time_t and Duration_t Signed-off-by: Mario Dominguez --- include/eprosimashapesdemo/shapesdemo/ShapeHistory.h | 2 +- include/eprosimashapesdemo/shapesdemo/ShapeInfo.h | 2 +- src/qt/publishdialog.cpp | 10 +++++----- src/qt/subscribedialog.cpp | 8 ++++---- src/shapesdemo/ShapeHistory.cpp | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/eprosimashapesdemo/shapesdemo/ShapeHistory.h b/include/eprosimashapesdemo/shapesdemo/ShapeHistory.h index 9f13805..111fd0a 100644 --- a/include/eprosimashapesdemo/shapesdemo/ShapeHistory.h +++ b/include/eprosimashapesdemo/shapesdemo/ShapeHistory.h @@ -50,7 +50,7 @@ class ShapeFilter int32_t m_minX; int32_t m_maxY; int32_t m_minY; - Duration_t m_minimumSeparation; + eprosima::fastdds::dds::Duration_t m_minimumSeparation; bool m_useContentFilter; bool m_useTimeFilter; diff --git a/include/eprosimashapesdemo/shapesdemo/ShapeInfo.h b/include/eprosimashapesdemo/shapesdemo/ShapeInfo.h index 0bc4631..81d174b 100644 --- a/include/eprosimashapesdemo/shapesdemo/ShapeInfo.h +++ b/include/eprosimashapesdemo/shapesdemo/ShapeInfo.h @@ -68,7 +68,7 @@ class Shape ShapeType m_shape; TYPESHAPE m_type; - Time_t m_time; + eprosima::fastdds::dds::Time_t m_time; float m_dirX; float m_dirY; bool m_changeDir; diff --git a/src/qt/publishdialog.cpp b/src/qt/publishdialog.cpp index 7fac6fc..1d07e4b 100644 --- a/src/qt/publishdialog.cpp +++ b/src/qt/publishdialog.cpp @@ -127,7 +127,7 @@ void PublishDialog::on_button_OkCancel_accepted() if (lease_duration_value.toDouble() > 0) { SP->m_dw_qos.liveliness().lease_duration = - eprosima::fastdds::Duration_t(lease_duration_value.toDouble() * 1e-3); + eprosima::fastdds::dds::Duration_t(lease_duration_value.toDouble() * 1e-3); } } @@ -140,14 +140,14 @@ void PublishDialog::on_button_OkCancel_accepted() SP->m_dw_qos.liveliness().lease_duration != c_TimeInfinite) { SP->m_dw_qos.liveliness().announcement_period = - eprosima::fastdds::Duration_t(lease_duration_value.toDouble() * 1e-3); + eprosima::fastdds::dds::Duration_t(lease_duration_value.toDouble() * 1e-3); } else { QString value = this->ui->lineEdit_announcementPeriod->text(); if (value.toDouble() > 0) { - SP->m_dw_qos.liveliness().announcement_period = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SP->m_dw_qos.liveliness().announcement_period = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } @@ -196,7 +196,7 @@ void PublishDialog::on_button_OkCancel_accepted() QString value = this->ui->lineEdit_Deadline->text(); if (value.toDouble() > 0) { - SP->m_dw_qos.deadline().period = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SP->m_dw_qos.deadline().period = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } @@ -210,7 +210,7 @@ void PublishDialog::on_button_OkCancel_accepted() QString value = this->ui->lineEdit_Lifespan->text(); if (value.toDouble() > 0) { - SP->m_dw_qos.lifespan().duration = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SP->m_dw_qos.lifespan().duration = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } diff --git a/src/qt/subscribedialog.cpp b/src/qt/subscribedialog.cpp index 11f210d..bc47be2 100644 --- a/src/qt/subscribedialog.cpp +++ b/src/qt/subscribedialog.cpp @@ -139,7 +139,7 @@ void SubscribeDialog::on_buttonBox_accepted() if (value.toDouble() > 0) { // Liveliness is retrieving by user in ms and is stored in s - SSub->m_dr_qos.liveliness().lease_duration = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SSub->m_dr_qos.liveliness().lease_duration = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } @@ -164,7 +164,7 @@ void SubscribeDialog::on_buttonBox_accepted() QString value = this->ui->lineEdit_Deadline->text(); if (value.toDouble() > 0) { - SSub->m_dr_qos.deadline().period = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SSub->m_dr_qos.deadline().period = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } @@ -178,7 +178,7 @@ void SubscribeDialog::on_buttonBox_accepted() QString value = this->ui->lineEdit_Lifespan->text(); if (value.toDouble() > 0) { - SSub->m_dr_qos.lifespan().duration = eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + SSub->m_dr_qos.lifespan().duration = eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } @@ -220,7 +220,7 @@ void SubscribeDialog::on_buttonBox_accepted() if (value.toInt() > 0) { SSub->m_dr_qos.time_based_filter().minimum_separation = - eprosima::fastdds::Duration_t(value.toDouble() * 1e-3); + eprosima::fastdds::dds::Duration_t(value.toDouble() * 1e-3); } } diff --git a/src/shapesdemo/ShapeHistory.cpp b/src/shapesdemo/ShapeHistory.cpp index c080bc3..f2abb53 100644 --- a/src/shapesdemo/ShapeHistory.cpp +++ b/src/shapesdemo/ShapeHistory.cpp @@ -57,8 +57,8 @@ inline bool compareGUID( } inline double Time_tAbsDiff2DoubleMillisec( - const eprosima::fastdds::Time_t& t1, - const eprosima::fastdds::Time_t& t2) + const eprosima::fastdds::dds::Time_t& t1, + const eprosima::fastdds::dds::Time_t& t2) { double result = 0; result += (double)abs((t2.seconds - t1.seconds) * 1000); @@ -67,7 +67,7 @@ inline double Time_tAbsDiff2DoubleMillisec( } inline double Time_t2MilliSecondsDouble( - const eprosima::fastdds::Time_t& t) + const eprosima::fastdds::dds::Time_t& t) { return ((double)t.fraction() / pow(2.0, 32) * pow(10.0, 3)) + (double)t.seconds * pow(10.0, 3); }