Skip to content

Commit

Permalink
Release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogs9 authored Oct 14, 2024
2 parents 6734a50 + 7771222 commit fb879a3
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 133 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

project(microxrcedds VERSION "2.4.3")
project(microxrcedds VERSION "3.0.0")

set(_client_tag v2.4.3)
set(_client_version 2.4.3)
set(_agent_tag v2.4.3)
set(_client_tag v3.0.0)
set(_client_version 3.0.0)
set(_agent_tag v3.0.0)
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
4 changes: 2 additions & 2 deletions test/test/client_agent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

cmake_host_system_information(RESULT HOSTNAME_SUFFIX QUERY HOSTNAME)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DEFAULT_FASTRTPS_PROFILES.xml.in
${CMAKE_CURRENT_BINARY_DIR}/DEFAULT_FASTRTPS_PROFILES.xml
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DEFAULT_FASTDDS_PROFILES.xml.in
${CMAKE_CURRENT_BINARY_DIR}/DEFAULT_FASTDDS_PROFILES.xml
@ONLY
)

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
Loading

0 comments on commit fb879a3

Please sign in to comment.