Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21321] Update references to Time_t and Duration_t #165

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/eprosimashapesdemo/shapesdemo/ShapeHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion include/eprosimashapesdemo/shapesdemo/ShapeInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/qt/publishdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/qt/subscribedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
}

}
Expand Down
6 changes: 3 additions & 3 deletions src/shapesdemo/ShapeHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down
Loading