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

Bump Fast DDS 3.0 #180

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ project(microxrcedds VERSION "2.4.3")

set(_client_tag v2.4.3)
set(_client_version 2.4.3)
set(_agent_tag v2.4.3)
set(_agent_tag feature/fastdds3)
pablogs9 marked this conversation as resolved.
Show resolved Hide resolved
set(_gen_tag v2.0.2)

###############################################################################
Expand Down Expand Up @@ -75,7 +75,6 @@ endif()
if(UXRCE_BUILD_CI_TESTS)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND _test_command COMMAND ${CMAKE_CTEST_COMMAND} -VV -T MemCheck)
list(APPEND _test_command COMMAND ${CMAKE_CTEST_COMMAND} -VV -T Coverage)
endif()
endif()

Expand Down
5 changes: 1 addition & 4 deletions test/test/client_agent/ClientAgentCan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class AgentCan
case MiddlewareKind::FASTDDS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTDDS;
break;
case MiddlewareKind::FASTRTPS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTRTPS;
break;
case MiddlewareKind::CED:
middleware_ = eprosima::uxr::Middleware::Kind::CED;
break;
Expand All @@ -34,7 +31,7 @@ class AgentCan
~AgentCan()
{}

bool is_interface_up(const char * interface)
bool is_interface_up(const char * interface)
{
struct ifreq ifr;
int sock = socket(PF_CAN, SOCK_RAW, CAN_RAW);
Expand Down
82 changes: 1 addition & 81 deletions test/test/client_agent/ClientAgentInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationXMLBestEffort)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x01, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x01, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x01, UXR_STATUS_OK, 0));
Expand All @@ -48,11 +43,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationXMLReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -70,11 +60,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationBINBestEffort)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x01, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x01, UXR_STATUS_OK, 0));
Expand All @@ -92,11 +77,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationBINReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -114,11 +94,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationREFBestEffort)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTDDS>(1, 0x01, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTRTPS>(1, 0x01, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::CED>(1, 0x01, UXR_STATUS_OK, 0));
Expand All @@ -136,11 +111,6 @@ TEST_P(ClientAgentInteraction, NewEntitiesCreationREFReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -159,12 +129,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReuseXMLXMLReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REUSE));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REUSE));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -184,11 +148,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReuseBINBINReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REUSE));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand Down Expand Up @@ -216,12 +175,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReuseREFREFReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REUSE));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REUSE));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_ref<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -241,12 +194,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReplaceXMLXMLReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK, UXR_REPLACE));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, UXR_REPLACE));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -266,11 +213,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReplaceBINBINReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK, UXR_REPLACE));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -290,12 +232,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationNoReplaceXMLXMLReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_ERR_ALREADY_EXISTS, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_ERR_ALREADY_EXISTS, 0));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -315,11 +251,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationNoReplaceBINBINReliable)
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_ERR_ALREADY_EXISTS, 0));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -339,12 +270,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReplaceReuseXMLXMLReliabl
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REPLACE | UXR_REUSE));
break;
}
case MiddlewareKind::FASTRTPS:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK, 0));
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::FASTRTPS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REPLACE | UXR_REUSE));
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_xml<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -364,11 +289,6 @@ TEST_P(ClientAgentInteraction, ExistantEntitiesCreationReplaceReuseBINBINReliabl
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::FASTDDS>(1, 0x80, UXR_STATUS_OK_MATCHED, UXR_REPLACE | UXR_REUSE));
break;
}
case MiddlewareKind::FASTRTPS:
{
// Not implemented
break;
}
case MiddlewareKind::CED:
{
ASSERT_NO_FATAL_FAILURE(client_.create_entities_bin<MiddlewareKind::CED>(1, 0x80, UXR_STATUS_OK, 0));
Expand All @@ -395,7 +315,7 @@ GTEST_INSTANTIATE_TEST_MACRO(
ClientAgentInteraction,
::testing::Combine(
::testing::Values(Transport::UDP_IPV4_TRANSPORT, Transport::TCP_IPV4_TRANSPORT, Transport::UDP_IPV6_TRANSPORT, Transport::TCP_IPV6_TRANSPORT),
::testing::Values(MiddlewareKind::FASTDDS, MiddlewareKind::FASTRTPS, MiddlewareKind::CED)));
::testing::Values(MiddlewareKind::FASTDDS, MiddlewareKind::CED)));

GTEST_INSTANTIATE_TEST_MACRO(
CustomTransports,
Expand Down
9 changes: 3 additions & 6 deletions test/test/client_agent/ClientAgentInteraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ class Agent
case MiddlewareKind::FASTDDS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTDDS;
break;
case MiddlewareKind::FASTRTPS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTRTPS;
break;
case MiddlewareKind::CED:
middleware_ = eprosima::uxr::Middleware::Kind::CED;
break;
Expand Down Expand Up @@ -84,7 +81,7 @@ class Agent
{
// Do nothing
}


agent_custom_.reset(new eprosima::uxr::CustomAgent(
"custom_agent",
Expand Down Expand Up @@ -123,7 +120,7 @@ class Agent
ASSERT_TRUE(agent_custom_->start());
break;
}

}
}

Expand Down Expand Up @@ -155,7 +152,7 @@ class Agent
case Transport::CUSTOM_WITH_FRAMING:
{
ASSERT_TRUE(agent_custom_->stop());
break;
break;
}
}
}
Expand Down
23 changes: 10 additions & 13 deletions test/test/client_agent/ClientAgentSerial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class AgentSerial
case MiddlewareKind::FASTDDS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTDDS;
break;
case MiddlewareKind::FASTRTPS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTRTPS;
break;
case MiddlewareKind::CED:
middleware_ = eprosima::uxr::Middleware::Kind::CED;
break;
Expand All @@ -50,13 +47,13 @@ class AgentSerial
case Transport::MULTISERIAL_TRANSPORT:
{
struct termios attr = ClientSerial::init_termios(baudrate);

std::vector<std::string> devs;
for (size_t i = 0; i < client_number; i++)
{
devs.push_back(port_name);
}

agent_multiserial_.reset(new eprosima::uxr::MultiTermiosAgent(devs, O_RDWR | O_NOCTTY, attr, 0, middleware_));
ASSERT_TRUE(agent_multiserial_->start());
break;
Expand Down Expand Up @@ -118,7 +115,7 @@ class ClientAgentSerial : public ::testing::TestWithParam<std::tuple<Transport,
, transport_(std::get<0>(GetParam()))
, clients_multiserial_{}
, agent_(transport_, (MiddlewareKind) std::get<1>(GetParam()))
{
{
for (size_t i = 0; i < agent_.client_number; i++)
{
ClientSerial auxcli(0.0f, 8);
Expand All @@ -131,15 +128,15 @@ class ClientAgentSerial : public ::testing::TestWithParam<std::tuple<Transport,

void SetUp() override
{
agent_.start();
agent_.start();

switch (transport_)
{
case Transport::SERIAL_TRANSPORT:
{
int masterfd = agent_.getfd();
grantpt(masterfd);
unlockpt(masterfd);
unlockpt(masterfd);
ASSERT_NO_FATAL_FAILURE(client_serial_.init_transport(transport_, ptsname(masterfd), NULL));
break;
}
Expand All @@ -151,10 +148,10 @@ class ClientAgentSerial : public ::testing::TestWithParam<std::tuple<Transport,
for (size_t i = 0; i < masterfd.size(); i++)
{
grantpt(masterfd[i]);
unlockpt(masterfd[i]);
unlockpt(masterfd[i]);
ASSERT_NO_FATAL_FAILURE(clients_multiserial_[i].init_transport(transport_, ptsname(masterfd[i]), NULL));
}

break;
}
}
Expand All @@ -175,17 +172,17 @@ class ClientAgentSerial : public ::testing::TestWithParam<std::tuple<Transport,
{
ASSERT_NO_FATAL_FAILURE(clients_multiserial_[i].close_transport(transport_));
}

}
}

agent_.stop();
}

protected:
Transport transport_;
AgentSerial agent_;

std::vector<ClientSerial> clients_multiserial_;
ClientSerial client_serial_;
};
Expand Down
4 changes: 0 additions & 4 deletions test/test/common/EntitiesInfo.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ static constexpr const char* fast_datareader_xml =
enum class MiddlewareKind : uint8_t
{
FASTDDS,
FASTRTPS,
CED
};

Expand Down Expand Up @@ -108,9 +107,6 @@ struct EntitiesInfo<MiddlewareKind::FASTDDS>
static constexpr const char* datareader_xml = fast_datareader_xml;
};

template<>
struct EntitiesInfo<MiddlewareKind::FASTRTPS> : public EntitiesInfo<MiddlewareKind::FASTDDS> {};

template<>
struct EntitiesInfo<MiddlewareKind::CED>
{
Expand Down
5 changes: 1 addition & 4 deletions test/test/discovery/DiscoveryIntegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class DiscoveryIntegration : public ::testing::TestWithParam<std::tuple<Transpor
case MiddlewareKind::FASTDDS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTDDS;
break;
case MiddlewareKind::FASTRTPS:
middleware_ = eprosima::uxr::Middleware::Kind::FASTRTPS;
break;
case MiddlewareKind::CED:
middleware_ = eprosima::uxr::Middleware::Kind::CED;
break;
Expand Down Expand Up @@ -177,7 +174,7 @@ GTEST_INSTANTIATE_TEST_MACRO(
DiscoveryIntegration,
::testing::Combine(
::testing::Values(Transport::UDP_IPV4_TRANSPORT, Transport::UDP_IPV6_TRANSPORT, Transport::TCP_IPV4_TRANSPORT, Transport::TCP_IPV6_TRANSPORT),
::testing::Values(MiddlewareKind::FASTDDS, MiddlewareKind::FASTRTPS, MiddlewareKind::CED)));
::testing::Values(MiddlewareKind::FASTDDS, MiddlewareKind::CED)));

int main(int args, char** argv)
{
Expand Down
Loading