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

[20998] Record data in SQL #144

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3c543f7
[20509] Update repository for Fast DDS 3.0.0 compatibility
LuciaEchevarria99 Jun 18, 2024
3bc2971
Fix compilation after rebase to FastDDS master
LuciaEchevarria99 Jun 26, 2024
0c3f073
Change .h headers to .hpp and regenerate types
LuciaEchevarria99 Jul 3, 2024
fc30c83
Change to FastDDS idl_serialize implementation
LuciaEchevarria99 Jul 16, 2024
5c92158
Move exceptions to a folder
Tempate May 7, 2024
04fa0d1
Strip serializing methods from the McapHandler
Tempate May 7, 2024
82ceb00
Strip time utils from the McapHandler
Tempate May 8, 2024
c80db8f
Strip state transitions and buffer management from the McapHandler
Tempate May 9, 2024
1904c67
Strip dynamic types management from the McapHandler
Tempate May 10, 2024
29afbb5
Strip new sample generic processing from the McapHandler
Tempate May 10, 2024
10d3068
Update includes in McapHandler and BaseHandler
Tempate May 10, 2024
597295c
Strip non-mcap-related from the McapHandlerConfiguration
Tempate May 10, 2024
bf2a0d8
Strip generic file processing methods from the McapWriter
Tempate May 13, 2024
2f61526
Use the BaseWriter in the McapHandler
Tempate May 13, 2024
e3a23a5
Use the BaseHandler in the DdsRecorder
Tempate May 13, 2024
b900671
PoC: record data in SQLite
Tempate May 14, 2024
b25f882
Store DdsTopics in a table
Tempate May 17, 2024
404e7ad
Strip state transitions and IParticipant methods from the McapReaderP…
Tempate May 20, 2024
61e5164
Rename DynamicTypes to Types
Tempate May 21, 2024
3c5fbcd
Store a message's key in SQL
Tempate May 21, 2024
41548fd
Strip deserializing methods from the DdsReplayer
Tempate May 23, 2024
ebdd61a
Generalize time_utils between the DDS Recorder and Replayer
Tempate May 24, 2024
78de7fc
Strip MCAP summary processing from the DdsReplayer
Tempate May 24, 2024
9ebbdfd
PoC: replay data from SQLite
Tempate May 24, 2024
155cbb6
Avoid creating a payload when replaying a message in a topic without …
Tempate May 24, 2024
1e275c3
Strip MCAP message processing from the DdsReplayer
Tempate May 27, 2024
25bb91f
Replay messages according to their log_time
Tempate May 27, 2024
cfecd23
Merge Serializer and Deserializer into a single class
Tempate May 28, 2024
abd8d82
Rename McapReaderParticipantConfiguration to BaseReaderParticipantCon…
Tempate May 28, 2024
3dd2754
Fix assert for ROS 2 topics
Tempate Jun 7, 2024
b7e27c9
Move resource limits tests to MCAP
Tempate Jun 7, 2024
62be8a9
FileCreationTests for SQL
Tempate Jun 7, 2024
78743f0
Strip recording methods from McapFileCreationTest
Tempate Jun 7, 2024
4e4446b
Only write dynamic types in SQL when closing the file
Tempate Jun 7, 2024
60af701
Store & read whether topics & types were formatted for ROS 2
Tempate Jun 11, 2024
b25c832
LogErrorTest for SQL
Tempate Jun 11, 2024
aa37d10
Fix McapLogErrorTest
Tempate Jun 11, 2024
f5768ab
Strip replaying methods from McapFileReadTest & McapFileReadWithTypeTest
Tempate Jun 13, 2024
a7f41ce
FileReadTest for SQL
Tempate Jun 13, 2024
7c787d2
Identify topics in SQL by the topic_name, type_name pair
Tempate Jun 13, 2024
ae8737b
Fix comments and logs incorrectly referring to MCAP
Tempate Jun 13, 2024
5d06eba
Identify messages by their writer GUID and sequence number
Tempate Jun 14, 2024
babdf2f
Rebase fix
Tempate Jun 27, 2024
350f322
Store a message's key in SQL with v3.0
Tempate Jul 1, 2024
e18bb16
Write SQL samples in bulk
Tempate Jul 2, 2024
7a45dd0
Refactor Yaml configuration
Tempate Jul 3, 2024
7630fb5
Fix the check when setting the current file size
Tempate Jul 3, 2024
8ab4f8b
Save data in CDR & JSON format
Tempate Jul 4, 2024
b6ae665
Refactor documentation
Tempate Jul 8, 2024
b4277d6
Rebase fix
Tempate Jul 17, 2024
508b90b
Tests for data-format
Tempate Jul 22, 2024
ecd77eb
Fixes to the DDS Replayer tests
Tempate Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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,10 +19,10 @@
* This file was generated by the tool fastddsgen.
*/

#ifndef _FAST_DDS_GENERATED_DDSRECORDERCOMMANDCDRAUX_HPP_
#define _FAST_DDS_GENERATED_DDSRECORDERCOMMANDCDRAUX_HPP_
#ifndef FAST_DDS_GENERATED__DDSRECORDERCOMMANDCDRAUX_HPP
#define FAST_DDS_GENERATED__DDSRECORDERCOMMANDCDRAUX_HPP

#include "DdsRecorderCommand.h"
#include "DdsRecorderCommand.hpp"

constexpr uint32_t DdsRecorderCommand_max_cdr_typesize {524UL};
constexpr uint32_t DdsRecorderCommand_max_key_cdr_typesize {0UL};
Expand All @@ -34,8 +34,6 @@ namespace fastcdr {
class Cdr;
class CdrSizeCalculator;



eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const DdsRecorderCommand& data);
Expand All @@ -44,5 +42,5 @@ eProsima_user_DllExport void serialize_key(
} // namespace fastcdr
} // namespace eprosima

#endif // _FAST_DDS_GENERATED_DDSRECORDERCOMMANDCDRAUX_HPP_
#endif // FAST_DDS_GENERATED__DDSRECORDERCOMMANDCDRAUX_HPP

Loading