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

[20509] Update repository for Fast DDS 3.0.0 compatibility #148

Merged
merged 33 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ba35d39
[20509] Update repository for Fast DDS 3.0.0 compatibility
LuciaEchevarria99 Jun 18, 2024
50fa3b5
Fix compilation after rebase to FastDDS master
LuciaEchevarria99 Jun 26, 2024
92930c0
Change .h headers to .hpp and regenerate types
LuciaEchevarria99 Jul 3, 2024
396aea2
Change to FastDDS idl_serialize implementation
LuciaEchevarria99 Jul 16, 2024
47bb836
Fix replayer tests and record mcap with updated types
LuciaEchevarria99 Jul 16, 2024
3b1cdf1
Regenerate types and update to latest API breaks in FastDDS
LuciaEchevarria99 Jul 30, 2024
9df6fb5
Minor fixes and regenerate mcap for tests
LuciaEchevarria99 Aug 13, 2024
8926b85
Update log traces to new EPROSIMA_LOG macro
LuciaEchevarria99 Sep 3, 2024
52687bb
Refactor DynamicType serialization functions
LuciaEchevarria99 Sep 3, 2024
3c84fd8
Make cdr_message unique_ptr
LuciaEchevarria99 Sep 3, 2024
377bb24
Update README file explaining how to regenerate mcap file for tests
LuciaEchevarria99 Sep 3, 2024
49fd64a
Rename helloworld_file_info.md to README.md
LuciaEchevarria99 Sep 3, 2024
ba66e16
Remove unnecessary register_type_object_representation in CommandRece…
LuciaEchevarria99 Sep 3, 2024
47c6543
Minor changes: sort includes, add/delete notes...
LuciaEchevarria99 Sep 3, 2024
33bf17c
Restructure store_dynamic_type_ adding logWarnings in case of failure
LuciaEchevarria99 Sep 3, 2024
5dc1190
Update Controller
LuciaEchevarria99 Sep 4, 2024
1d2fdb5
Delete TypeLookupService example
LuciaEchevarria99 Sep 4, 2024
c5e840f
Implement type propagation policy
LuciaEchevarria99 Sep 5, 2024
e048a87
Accept v6 interfaces and interface names in whitelist (#154)
juanlofer-eprosima Sep 6, 2024
c324cd6
Abort storing types if retrieving or serializing one of them fails
LuciaEchevarria99 Sep 16, 2024
0db3fac
Fix tests
LuciaEchevarria99 Sep 16, 2024
4f65cf9
Update documentation
LuciaEchevarria99 Sep 16, 2024
47bb979
Refactor types deserialization
LuciaEchevarria99 Sep 16, 2024
00e4e67
Fix GTest includes
LuciaEchevarria99 Sep 16, 2024
0c28e83
Make replay_types_ protected
LuciaEchevarria99 Sep 16, 2024
d36a99a
Apply format suggested changes
LuciaEchevarria99 Sep 16, 2024
3156f86
Update McapHandler docstring
LuciaEchevarria99 Sep 16, 2024
de8215a
Remove publish-types in documentation examples
LuciaEchevarria99 Sep 16, 2024
ab8187a
Change mcap_data_msgs test
LuciaEchevarria99 Sep 17, 2024
78cfdc7
Fix tests
LuciaEchevarria99 Sep 17, 2024
7d3a546
Add DdsReplayer::deserialize_type_data_ docstring
LuciaEchevarria99 Sep 17, 2024
b8da53c
Uncrustify
LuciaEchevarria99 Sep 17, 2024
2f0f51d
Add note in McapFileCreationTest
LuciaEchevarria99 Sep 17, 2024
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
11 changes: 2 additions & 9 deletions controller/controller_tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,9 @@ if (BUILD_DDSRECORDER_CONTROLLER)
# Build and install types
###############################################################################

# Determine Fast DDS version
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
set(DDS_TYPES_VERSION "v1")
else()
set(DDS_TYPES_VERSION "v2")
endif()

# Add subdirectory based on Fast DDS version
add_subdirectory(ddstypes/${DDS_TYPES_VERSION}/DdsRecorderCommand)
add_subdirectory(ddstypes/${DDS_TYPES_VERSION}/DdsRecorderStatus)
add_subdirectory(ddstypes/DdsRecorderCommand)
add_subdirectory(ddstypes/DdsRecorderStatus)

###############################################################################
# Install Tool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ message(STATUS "Configuring python wrapper for types in DdsRecorderCommand...")
project(DdsRecorderCommand)

find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
DdsRecorderCommand.cxx
DdsRecorderCommandv1.cxx
DdsRecorderCommandPubSubTypes.cxx
DdsRecorderCommandTypeObjectSupport.cxx
)
if(WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE EPROSIMA_USER_DLL_EXPORT)
Expand All @@ -43,7 +42,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
target_link_libraries(${PROJECT_NAME}
PUBLIC
fastcdr
fastrtps
fastdds
)

###############################################################################
Expand Down Expand Up @@ -88,7 +87,7 @@ endif()

target_link_libraries(${${PROJECT_NAME}_MODULE}
Python3::Module
fastrtps
fastdds
${PROJECT_NAME}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,19 @@
// limitations under the License.

/*!
* @file DdsRecorderCommand.h
* @file DdsRecorderCommand.hpp
* This header file contains the declaration of the described types in the IDL file.
*
* This file was generated by the tool fastddsgen.
*/

#include <fastcdr/config.h>
#include "DdsRecorderCommandv1.h"
#ifndef FAST_DDS_GENERATED__DDSRECORDERCOMMAND_HPP
#define FAST_DDS_GENERATED__DDSRECORDERCOMMAND_HPP

#if FASTCDR_VERSION_MAJOR > 1

#ifndef _FAST_DDS_GENERATED_DDSRECORDERCOMMAND_H_
#define _FAST_DDS_GENERATED_DDSRECORDERCOMMAND_H_

#include <array>
#include <bitset>
#include <cstdint>
#include <map>
#include <string>
#include <vector>

#include <utility>
#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>



#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
Expand All @@ -64,17 +51,6 @@
#define DDSRECORDERCOMMAND_DllAPI
#endif // _WIN32

namespace eprosima {
namespace fastcdr {
class Cdr;
class CdrSizeCalculator;
} // namespace fastcdr
} // namespace eprosima





/*!
* @brief This class represents the structure DdsRecorderCommand defined by the user in the IDL file.
* @ingroup DdsRecorderCommand
Expand All @@ -86,107 +62,168 @@ class DdsRecorderCommand
/*!
* @brief Default constructor.
*/
eProsima_user_DllExport DdsRecorderCommand();
eProsima_user_DllExport DdsRecorderCommand()
{
}

/*!
* @brief Default destructor.
*/
eProsima_user_DllExport ~DdsRecorderCommand();
eProsima_user_DllExport ~DdsRecorderCommand()
{
}

/*!
* @brief Copy constructor.
* @param x Reference to the object DdsRecorderCommand that will be copied.
*/
eProsima_user_DllExport DdsRecorderCommand(
const DdsRecorderCommand& x);
const DdsRecorderCommand& x)
{
m_command = x.m_command;

m_args = x.m_args;

}

/*!
* @brief Move constructor.
* @param x Reference to the object DdsRecorderCommand that will be copied.
*/
eProsima_user_DllExport DdsRecorderCommand(
DdsRecorderCommand&& x) noexcept;
DdsRecorderCommand&& x) noexcept
{
m_command = std::move(x.m_command);
m_args = std::move(x.m_args);
}

/*!
* @brief Copy assignment.
* @param x Reference to the object DdsRecorderCommand that will be copied.
*/
eProsima_user_DllExport DdsRecorderCommand& operator =(
const DdsRecorderCommand& x);
const DdsRecorderCommand& x)
{

m_command = x.m_command;

m_args = x.m_args;

return *this;
}

/*!
* @brief Move assignment.
* @param x Reference to the object DdsRecorderCommand that will be copied.
*/
eProsima_user_DllExport DdsRecorderCommand& operator =(
DdsRecorderCommand&& x) noexcept;
DdsRecorderCommand&& x) noexcept
{

m_command = std::move(x.m_command);
m_args = std::move(x.m_args);
return *this;
}

/*!
* @brief Comparison operator.
* @param x DdsRecorderCommand object to compare.
*/
eProsima_user_DllExport bool operator ==(
const DdsRecorderCommand& x) const;
const DdsRecorderCommand& x) const
{
return (m_command == x.m_command &&
m_args == x.m_args);
}

/*!
* @brief Comparison operator.
* @param x DdsRecorderCommand object to compare.
*/
eProsima_user_DllExport bool operator !=(
const DdsRecorderCommand& x) const;
const DdsRecorderCommand& x) const
{
return !(*this == x);
}

/*!
* @brief This function copies the value in member command
* @param _command New value to be copied in member command
*/
eProsima_user_DllExport void command(
const std::string& _command);
const std::string& _command)
{
m_command = _command;
}

/*!
* @brief This function moves the value in member command
* @param _command New value to be moved in member command
*/
eProsima_user_DllExport void command(
std::string&& _command);
std::string&& _command)
{
m_command = std::move(_command);
}

/*!
* @brief This function returns a constant reference to member command
* @return Constant reference to member command
*/
eProsima_user_DllExport const std::string& command() const;
eProsima_user_DllExport const std::string& command() const
{
return m_command;
}

/*!
* @brief This function returns a reference to member command
* @return Reference to member command
*/
eProsima_user_DllExport std::string& command();
eProsima_user_DllExport std::string& command()
{
return m_command;
}


/*!
* @brief This function copies the value in member args
* @param _args New value to be copied in member args
*/
eProsima_user_DllExport void args(
const std::string& _args);
const std::string& _args)
{
m_args = _args;
}

/*!
* @brief This function moves the value in member args
* @param _args New value to be moved in member args
*/
eProsima_user_DllExport void args(
std::string&& _args);
std::string&& _args)
{
m_args = std::move(_args);
}

/*!
* @brief This function returns a constant reference to member args
* @return Constant reference to member args
*/
eProsima_user_DllExport const std::string& args() const;
eProsima_user_DllExport const std::string& args() const
{
return m_args;
}

/*!
* @brief This function returns a reference to member args
* @return Reference to member args
*/
eProsima_user_DllExport std::string& args();
eProsima_user_DllExport std::string& args()
{
return m_args;
}



private:

Expand All @@ -195,8 +232,6 @@ class DdsRecorderCommand

};

#endif // _FAST_DDS_GENERATED_DDSRECORDERCOMMAND_H_

#endif // _FAST_DDS_GENERATED_DDSRECORDERCOMMAND_HPP_


#endif // FASTCDR_VERSION_MAJOR > 1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
* This file was generated by the tool fastddsgen.
*/

%module DdsRecorderCommand
%module(moduleimport="if __import__('os').name == 'nt': import win32api; win32api.LoadLibrary('DdsRecorderCommand.dll')\nif __package__ or '.' in __name__:\n from . import _DdsRecorderCommandWrapper\nelse:\n import _DdsRecorderCommandWrapper") DdsRecorderCommand

// If using windows in debug, it would try to use python_d, which would not be found.
%begin %{
#ifdef _MSC_VER
#define SWIG_PYTHON_INTERPRETER_NO_DEBUG
#endif
#include <exception>
%}

// SWIG helper modules
%include "stdint.i"
Expand All @@ -35,20 +43,18 @@

// Macro declarations
// Any macro used on the Fast DDS header files will give an error if it is not redefined here
#define RTPS_DllAPI
#define FASTDDS_EXPORTED_API
#define eProsima_user_DllExport


%{
#include "DdsRecorderCommand.h"
#include "DdsRecorderCommand.hpp"

#include <fastdds/dds/core/LoanableSequence.hpp>
%}

%include <fastcdr/config.h>
#if FASTCDR_VERSION_MAJOR > 1
%import(module="fastdds") "fastcdr/xcdr/optional.hpp"
#endif
%import(module="fastdds") "fastdds/dds/core/LoanableCollection.hpp"
%import(module="fastdds") "fastdds/dds/core/LoanableTypedCollection.hpp"
%import(module="fastdds") "fastdds/dds/core/LoanableSequence.hpp"
Expand All @@ -65,8 +71,6 @@ namespace swig {
}
%enddef



////////////////////////////////////////////////////////
// Binding for class DdsRecorderCommand
////////////////////////////////////////////////////////
Expand All @@ -79,6 +83,7 @@ namespace swig {
// Avoid a warning ignoring all but one
%ignore DdsRecorderCommand::command(std::string&&);


// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
Expand All @@ -89,6 +94,7 @@ namespace swig {

%ignore DdsRecorderCommand::args(std::string&&);


// Overloaded getter methods shadow each other and are equivalent in python
// Const accesors produced constant enums instead of arrays/dictionaries when used
// We ignore them to prevent this
Expand All @@ -114,8 +120,8 @@ namespace swig {


// Include the class interfaces
%include "DdsRecorderCommand.h"
%include "DdsRecorderCommandv1.h"
%include "DdsRecorderCommand.hpp"

// Include the corresponding TopicDataType
%include "DdsRecorderCommandPubSubTypes.i"

Loading
Loading