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

[21129] Migrate fastrtps namespace to fastdds #141

Merged
merged 1 commit into from
Jun 18, 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/ShapeInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "eprosimashapesdemo/shapesdemo/ShapeDefinitions.h"
#include "types/ShapePubSubTypes.h"

using namespace eprosima::fastrtps;
using namespace eprosima::fastdds;

class Shape
{
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::fastrtps::Duration_t(lease_duration_value.toDouble() * 1e-3);
eprosima::fastdds::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::fastrtps::Duration_t(lease_duration_value.toDouble() * 1e-3);
eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SP->m_dw_qos.liveliness().announcement_period = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SP->m_dw_qos.deadline().period = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SP->m_dw_qos.lifespan().duration = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SSub->m_dr_qos.liveliness().lease_duration = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SSub->m_dr_qos.deadline().period = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
SSub->m_dr_qos.lifespan().duration = eprosima::fastdds::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::fastrtps::Duration_t(value.toDouble() * 1e-3);
eprosima::fastdds::Duration_t(value.toDouble() * 1e-3);
}

}
Expand Down
10 changes: 5 additions & 5 deletions src/shapesdemo/ShapeHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
using namespace eprosima::fastdds::rtps;

inline bool compareGUID(
eprosima::fastrtps::rtps::GUID_t& g1,
eprosima::fastrtps::rtps::GUID_t& g2)
GUID_t& g1,
GUID_t& g2)
{
for (uint8_t i = 0; i < 16; ++i)
{
Expand Down Expand Up @@ -57,8 +57,8 @@ inline bool compareGUID(
}

inline double Time_tAbsDiff2DoubleMillisec(
const Time_t& t1,
const Time_t& t2)
const eprosima::fastdds::Time_t& t1,
const eprosima::fastdds::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 Time_t& t)
const eprosima::fastdds::Time_t& t)
{
return ((double)t.fraction() / pow(2.0, 32) * pow(10.0, 3)) + (double)t.seconds * pow(10.0, 3);
}
Expand Down
1 change: 0 additions & 1 deletion src/shapesdemo/ShapesDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

using namespace eprosima::fastdds::dds;
using namespace eprosima::fastdds::rtps;
using namespace eprosima::fastrtps::rtps;

ShapesDemo::ShapesDemo(
MainWindow* mw)
Expand Down
4 changes: 2 additions & 2 deletions types/KeylessShapeTypePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "KeylessShapeTypeCdrAux.hpp"
#include "KeylessShapeTypeTypeObjectSupport.hpp"

using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t;
using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
using SerializedPayload_t = eprosima::fastdds::rtps::SerializedPayload_t;
using InstanceHandle_t = eprosima::fastdds::rtps::InstanceHandle_t;
using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t;

namespace shapes_demo_typesupport {
Expand Down
8 changes: 4 additions & 4 deletions types/KeylessShapeTypePubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ namespace shapes_demo_typesupport

eProsima_user_DllExport bool serialize(
void* data,
eprosima::fastrtps::rtps::SerializedPayload_t* payload) override
eprosima::fastdds::rtps::SerializedPayload_t* payload) override
{
return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION);
}

eProsima_user_DllExport bool serialize(
void* data,
eprosima::fastrtps::rtps::SerializedPayload_t* payload,
eprosima::fastdds::rtps::SerializedPayload_t* payload,
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;

eProsima_user_DllExport bool deserialize(
eprosima::fastrtps::rtps::SerializedPayload_t* payload,
eprosima::fastdds::rtps::SerializedPayload_t* payload,
void* data) override;

eProsima_user_DllExport std::function<uint32_t()> getSerializedSizeProvider(
Expand All @@ -84,7 +84,7 @@ namespace shapes_demo_typesupport

eProsima_user_DllExport bool getKey(
void* data,
eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
eprosima::fastdds::rtps::InstanceHandle_t* ihandle,
bool force_md5 = false) override;

eProsima_user_DllExport void* createData() override;
Expand Down
4 changes: 2 additions & 2 deletions types/ShapePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "ShapeCdrAux.hpp"
#include "ShapeTypeObjectSupport.hpp"

using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t;
using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
using SerializedPayload_t = eprosima::fastdds::rtps::SerializedPayload_t;
using InstanceHandle_t = eprosima::fastdds::rtps::InstanceHandle_t;
using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t;

ShapeTypePubSubType::ShapeTypePubSubType()
Expand Down
8 changes: 4 additions & 4 deletions types/ShapePubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ class ShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType

eProsima_user_DllExport bool serialize(
void* data,
eprosima::fastrtps::rtps::SerializedPayload_t* payload) override
eprosima::fastdds::rtps::SerializedPayload_t* payload) override
{
return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION);
}

eProsima_user_DllExport bool serialize(
void* data,
eprosima::fastrtps::rtps::SerializedPayload_t* payload,
eprosima::fastdds::rtps::SerializedPayload_t* payload,
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;

eProsima_user_DllExport bool deserialize(
eprosima::fastrtps::rtps::SerializedPayload_t* payload,
eprosima::fastdds::rtps::SerializedPayload_t* payload,
void* data) override;

eProsima_user_DllExport std::function<uint32_t()> getSerializedSizeProvider(
Expand All @@ -80,7 +80,7 @@ class ShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType

eProsima_user_DllExport bool getKey(
void* data,
eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
eprosima::fastdds::rtps::InstanceHandle_t* ihandle,
bool force_md5 = false) override;

eProsima_user_DllExport void* createData() override;
Expand Down