Skip to content

Commit

Permalink
Merge pull request #393 from eProsima/release/1.7.1
Browse files Browse the repository at this point in the history
Release 1.7.1 [4458]
  • Loading branch information
richiware authored Feb 20, 2019
2 parents 27b5933 + 10a80d6 commit f2516be
Show file tree
Hide file tree
Showing 145 changed files with 7,690 additions and 4,560 deletions.
30 changes: 19 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,22 @@ set(${PROJECT_NAME}_DESCRIPTION "eProsima ${PROJECT_NAME_LARGE} library provides

message(STATUS "Configuring ${PROJECT_NAME_LARGE}")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "To change de version modify the file configure.ac")
message(STATUS "To change the version modify the file configure.ac")

###############################################################################
# Generation of windows installers.
###############################################################################
option(EPROSIMA_INSTALLER "Activate the creation of a build to create windows installers" OFF)

###############################################################################
# eProsima build options
###############################################################################
option(EPROSIMA_BUILD "Activate internal building" OFF)

if(EPROSIMA_INSTALLER)
set(EPROSIMA_BUILD ON)
endif()

###############################################################################
# Warning level
###############################################################################
Expand All @@ -112,13 +121,21 @@ if(MSVC OR MSVC_IDE)
if(EPROSIMA_EXTRA_CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EPROSIMA_EXTRA_CMAKE_CXX_FLAGS}")
endif()

if(EPROSIMA_BUILD)
string(REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
endif()

if(EPROSIMA_BUILD)
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
endif()

###############################################################################
Expand All @@ -134,6 +151,7 @@ endif()
# Test system configuration
###############################################################################
include(${PROJECT_SOURCE_DIR}/cmake/common/check_configuration.cmake)
set(FORCE_CXX "11")
check_stdcxx()
check_compile_feature()
check_endianness()
Expand Down Expand Up @@ -164,16 +182,6 @@ else()
set(LICENSE_INSTALL_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME} CACHE PATH "Installation directory for licenses")
endif()

###############################################################################
# eProsima build options
###############################################################################
option(EPROSIMA_BUILD "Activate internal building" OFF)

if(EPROSIMA_INSTALLER)
set(EPROSIMA_BUILD ON)
endif()


###############################################################################
# Internal debug messages
###############################################################################
Expand Down
16 changes: 12 additions & 4 deletions cmake/common/check_configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,38 @@ macro(check_stdcxx)
set(HAVE_CXX1Y 0)
set(HAVE_CXX11 0)
set(HAVE_CXX0X 0)
if(SUPPORTS_CXX14)
if(SUPPORTS_CXX14 AND (NOT FORCE_CXX OR "${FORCE_CXX}" STREQUAL "14"))
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++14>)
set(HAVE_CXX14 1)
set(HAVE_CXX1Y 1)
set(HAVE_CXX11 1)
set(HAVE_CXX0X 1)
elseif(NOT SUPPORTS_CXX14 AND FORCE_CXX AND "${FORCE_CXX}" STREQUAL "14")
message(FATAL_ERROR "Force to support stdc++14 but not supported by the compiler")
else()
check_cxx_compiler_flag(-std=c++1y SUPPORTS_CXX1Y)
if(SUPPORTS_CXX1Y)
if(SUPPORTS_CXX1Y AND (NOT FORCE_CXX OR "${FORCE_CXX}" STREQUAL "1Y"))
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++1y>)
set(HAVE_CXX1Y 1)
set(HAVE_CXX11 1)
set(HAVE_CXX0X 1)
elseif(NOT SUPPORTS_CXX1Y AND FORCE_CXX AND "${FORCE_CXX}" STREQUAL "1Y")
message(FATAL_ERROR "Force to support stdc++1y but not supported by the compiler")
else()
check_cxx_compiler_flag(-std=c++11 SUPPORTS_CXX11)
if(SUPPORTS_CXX11)
if(SUPPORTS_CXX11 AND (NOT FORCE_CXX OR "${FORCE_CXX}" STREQUAL "11"))
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)
set(HAVE_CXX11 1)
set(HAVE_CXX0X 1)
elseif(NOT SUPPORTS_CXX11 AND FORCE_CXX AND "${FORCE_CXX}" STREQUAL "11")
message(FATAL_ERROR "Force to support stdc++11 but not supported by the compiler")
else()
check_cxx_compiler_flag(-std=c++0x SUPPORTS_CXX0X)
if(SUPPORTS_CXX0X)
if(SUPPORTS_CXX0X AND (NOT FORCE_CXX OR "${FORCE_CXX}" STREQUAL "0X"))
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++0x>)
set(HAVE_CXX0X 1)
elseif(NOT SUPPORTS_CXX0X AND FORCE_CXX AND "${FORCE_CXX}" STREQUAL "0X")
message(FATAL_ERROR "Force to support stdc++0x but not supported by the compiler")
else()
set(HAVE_CXX0X 0)
endif()
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#
m4_define([version_major],[1])
m4_define([version_minor],[7])
m4_define([version_micro],[0])
m4_define([version_micro],[1])

AC_INIT([fastrtps], [version_major.version_minor.version_micro], [[email protected]], [eProsima FastRTPS], [http://eprosima.com/])
CONFIG_ARGS="$*"
Expand Down
34 changes: 2 additions & 32 deletions examples/C++/Benchmark/BenchmarkPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <fastrtps/utils/eClock.h>
#include <fastrtps/utils/IPLocator.h>

#include <thread>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

Expand Down Expand Up @@ -93,27 +95,11 @@ bool BenchMarkPublisher::init(int transport, ReliabilityQosPolicyKind reliabilit
}
else if (transport == 2)
{
uint32_t kind = LOCATOR_KIND_TCPv4;
PParam.rtps.useBuiltinTransports = false;

Locator_t unicast_locator;
unicast_locator.kind = kind;
IPLocator::setIPv4(unicast_locator, "127.0.0.1");
unicast_locator.port = 5100;
IPLocator::setLogicalPort(unicast_locator, 7410);
PParam.rtps.defaultUnicastLocatorList.push_back(unicast_locator); // Publisher's data channel

Locator_t meta_locator;
meta_locator.kind = kind;
IPLocator::setIPv4(meta_locator, "127.0.0.1");
meta_locator.port = 5100;
IPLocator::setLogicalPort(meta_locator, 7402);
PParam.rtps.builtin.metatrafficUnicastLocatorList.push_back(meta_locator); // Publisher's meta channel

std::shared_ptr<TCPv4TransportDescriptor> descriptor = std::make_shared<TCPv4TransportDescriptor>();
descriptor->sendBufferSize = 8912896; // 8.5Mb
descriptor->receiveBufferSize = 8912896; // 8.5Mb
descriptor->set_WAN_address("127.0.0.1");
descriptor->add_listener_port(5100);
PParam.rtps.userTransports.push_back(descriptor);
}
Expand All @@ -123,27 +109,11 @@ bool BenchMarkPublisher::init(int transport, ReliabilityQosPolicyKind reliabilit
}
else if (transport == 4)
{
uint32_t kind = LOCATOR_KIND_TCPv6;
PParam.rtps.useBuiltinTransports = false;

Locator_t unicast_locator;
unicast_locator.kind = kind;
IPLocator::setIPv6(unicast_locator, "::1");
unicast_locator.port = 5100;
IPLocator::setLogicalPort(unicast_locator, 7410);
PParam.rtps.defaultUnicastLocatorList.push_back(unicast_locator); // Publisher's data channel

Locator_t meta_locator;
meta_locator.kind = kind;
IPLocator::setIPv6(meta_locator, "::1");
meta_locator.port = 5100;
IPLocator::setLogicalPort(meta_locator, 7402);
PParam.rtps.builtin.metatrafficUnicastLocatorList.push_back(meta_locator); // Publisher's meta channel

std::shared_ptr<TCPv6TransportDescriptor> descriptor = std::make_shared<TCPv6TransportDescriptor>();
descriptor->sendBufferSize = 8912896; // 8.5Mb
descriptor->receiveBufferSize = 8912896; // 8.5Mb
//descriptor->set_WAN_address("127.0.0.1");
descriptor->add_listener_port(5100);
PParam.rtps.userTransports.push_back(descriptor);
}
Expand Down
3 changes: 3 additions & 0 deletions examples/C++/Benchmark/BenchmarkPublisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include "Benchmark_medium.h"
#include "Benchmark_big.h"

#include <chrono>
#include <atomic>

class BenchMarkPublisher {
public:
BenchMarkPublisher();
Expand Down
38 changes: 2 additions & 36 deletions examples/C++/Benchmark/BenchmarkSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,7 @@ bool BenchMarkSubscriber::init(int transport, ReliabilityQosPolicyKind reliabili
initial_peer_locator.kind = kind;
IPLocator::setIPv4(initial_peer_locator, "127.0.0.1");
initial_peer_locator.port = 5100;
IPLocator::setLogicalPort(initial_peer_locator, 7402);
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's meta channel
IPLocator::setLogicalPort(initial_peer_locator, 7410);
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's meta channel

Locator_t unicast_locator;
unicast_locator.kind = kind;
IPLocator::setIPv4(unicast_locator, "127.0.0.1");
unicast_locator.port = 5100;
IPLocator::setLogicalPort(unicast_locator, 7411);
PParam.rtps.defaultUnicastLocatorList.push_back(unicast_locator); // Subscriber's data channel

Locator_t meta_locator;
meta_locator.kind = kind;
IPLocator::setIPv4(meta_locator, "127.0.0.1");
meta_locator.port = 5100;
IPLocator::setLogicalPort(meta_locator, 7403);
PParam.rtps.builtin.metatrafficUnicastLocatorList.push_back(meta_locator); // Subscriber's meta channel
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's channel

PParam.rtps.useBuiltinTransports = false;
std::shared_ptr<TCPv4TransportDescriptor> descriptor = std::make_shared<TCPv4TransportDescriptor>();
Expand All @@ -111,24 +94,7 @@ bool BenchMarkSubscriber::init(int transport, ReliabilityQosPolicyKind reliabili
initial_peer_locator.kind = kind;
IPLocator::setIPv6(initial_peer_locator, "::1");
initial_peer_locator.port = 5100;
IPLocator::setLogicalPort(initial_peer_locator, 7402);
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's meta channel
IPLocator::setLogicalPort(initial_peer_locator, 7410);
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's meta channel

Locator_t unicast_locator;
unicast_locator.kind = kind;
IPLocator::setIPv6(unicast_locator, "::1");
unicast_locator.port = 5100;
IPLocator::setLogicalPort(unicast_locator, 7411);
PParam.rtps.defaultUnicastLocatorList.push_back(unicast_locator); // Subscriber's data channel

Locator_t meta_locator;
meta_locator.kind = kind;
IPLocator::setIPv6(meta_locator, "::1");
meta_locator.port = 5100;
IPLocator::setLogicalPort(meta_locator, 7403);
PParam.rtps.builtin.metatrafficUnicastLocatorList.push_back(meta_locator); // Subscriber's meta channel
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator); // Publisher's channel

PParam.rtps.useBuiltinTransports = false;
std::shared_ptr<TCPv6TransportDescriptor> descriptor = std::make_shared<TCPv6TransportDescriptor>();
Expand Down
2 changes: 2 additions & 0 deletions examples/C++/DynamicHelloWorldExample/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <fastrtps/types/MemberDescriptor.h>
#include <fastrtps/types/DynamicType.h>

#include <thread>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

Expand Down
2 changes: 2 additions & 0 deletions examples/C++/HelloWorldExample/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <fastrtps/Domain.h>
#include <fastrtps/utils/eClock.h>

#include <thread>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

Expand Down
15 changes: 11 additions & 4 deletions examples/C++/HelloWorldExampleTCP/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
#include <fastrtps/utils/eClock.h>
#include <fastrtps/utils/IPLocator.h>

#include <thread>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

HelloWorldPublisher::HelloWorldPublisher():mp_participant(nullptr),
mp_publisher(nullptr)
HelloWorldPublisher::HelloWorldPublisher()
: mp_participant(nullptr)
, mp_publisher(nullptr)
{


}

bool HelloWorldPublisher::init(const std::string &wan_ip, unsigned short port)
Expand Down Expand Up @@ -68,7 +69,9 @@ bool HelloWorldPublisher::init(const std::string &wan_ip, unsigned short port)
mp_participant = Domain::createParticipant(PParam);

if (mp_participant == nullptr)
{
return false;
}
//REGISTER THE TYPE

Domain::registerType(mp_participant, &m_type);
Expand All @@ -87,7 +90,9 @@ bool HelloWorldPublisher::init(const std::string &wan_ip, unsigned short port)
Wparam.qos.m_reliability.kind = RELIABLE_RELIABILITY_QOS;
mp_publisher = Domain::createPublisher(mp_participant, Wparam, (PublisherListener*)&m_listener);
if (mp_publisher == nullptr)
{
return false;
}

return true;
}
Expand Down Expand Up @@ -132,7 +137,9 @@ void HelloWorldPublisher::runThread(uint32_t samples, long sleep_ms)
for (uint32_t i = 0; i < samples; ++i)
{
if (!publish())
{
--i;
}
else
{
std::cout << "[RTCP] Message: " << m_Hello.message() << " with index: " << m_Hello.index() << " SENT" << std::endl;
Expand Down
8 changes: 6 additions & 2 deletions examples/C++/HelloWorldExampleTCP/HelloWorldSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ bool HelloWorldSubscriber::init(const std::string &wan_ip, unsigned short port)

mp_participant = Domain::createParticipant(PParam);
if (mp_participant == nullptr)
{
return false;
}

//REGISTER THE TYPE
Domain::registerType(mp_participant, &m_type);
Expand All @@ -85,10 +87,10 @@ bool HelloWorldSubscriber::init(const std::string &wan_ip, unsigned short port)
Rparam.qos.m_reliability.kind = RELIABLE_RELIABILITY_QOS;
Rparam.qos.m_durability.kind = TRANSIENT_LOCAL_DURABILITY_QOS;
mp_subscriber = Domain::createSubscriber(mp_participant, Rparam, (SubscriberListener*)&m_listener);

if (mp_subscriber == nullptr)
{
return false;

}

return true;
}
Expand Down Expand Up @@ -138,5 +140,7 @@ void HelloWorldSubscriber::run(uint32_t number)
{
std::cout << "[RTCP] Subscriber running until " << number << "samples have been received" << std::endl;
while (number < this->m_listener.n_samples)
{
eClock::my_sleep(500);
}
}
Loading

0 comments on commit f2516be

Please sign in to comment.