lijinliang 2 years ago
parent
commit
896abef80d
100 changed files with 71 additions and 27705 deletions
  1. 1 0
      sh/envInstall.sh
  2. 0 73
      src/detection/detection_lidar_PointPillars_MultiHead/.gitignore
  3. 0 294
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Ctracker.cpp
  4. 0 292
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Ctracker.h
  5. 0 723
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/HungarianAlg.cpp
  6. 0 39
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/HungarianAlg.h
  7. 0 873
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Kalman.cpp
  8. 0 120
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Kalman.h
  9. 0 65
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/ShortPathCalculator.h
  10. 0 159
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Tracking.hpp
  11. 0 147
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/defines.h
  12. 0 492
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/track.cpp
  13. 0 303
      src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/track.h
  14. 0 246
      src/detection/detection_lidar_PointPillars_MultiHead_1025/cfgs/cbgs_pp_multihead.yaml
  15. 0 141
      src/detection/detection_lidar_PointPillars_MultiHead_1025/common.h
  16. 0 181
      src/detection/detection_lidar_PointPillars_MultiHead_1025/detection_lidar_PointPillars_MultiHead.pro
  17. 0 376
      src/detection/detection_lidar_PointPillars_MultiHead_1025/main.cpp
  18. 0 422
      src/detection/detection_lidar_PointPillars_MultiHead_1025/nms.cu
  19. 0 64
      src/detection/detection_lidar_PointPillars_MultiHead_1025/nms.h
  20. 0 507
      src/detection/detection_lidar_PointPillars_MultiHead_1025/pointpillars.cc
  21. 0 287
      src/detection/detection_lidar_PointPillars_MultiHead_1025/pointpillars.h
  22. 0 383
      src/detection/detection_lidar_PointPillars_MultiHead_1025/postprocess.cu
  23. 0 125
      src/detection/detection_lidar_PointPillars_MultiHead_1025/postprocess.h
  24. 0 410
      src/detection/detection_lidar_PointPillars_MultiHead_1025/preprocess.cu
  25. 0 138
      src/detection/detection_lidar_PointPillars_MultiHead_1025/preprocess.h
  26. 0 73
      src/detection/detection_lidar_PointPillars_MultiHead_1025/scatter.cu
  27. 0 77
      src/detection/detection_lidar_PointPillars_MultiHead_1025/scatter.h
  28. 1 1
      src/driver/driver_lidar_rs16/main.cpp
  29. 67 36
      src/driver/driver_lidar_rs32/driver_lidar_rs32.pro
  30. 1 1
      src/driver/driver_lidar_rs32/lidar_driver_rs32.h
  31. 1 1
      src/tool/PerceptionShow/mainwindow.cpp
  32. 0 2939
      thirdpartylib/FastRTPS/include/fastcdr/Cdr.h
  33. 0 312
      thirdpartylib/FastRTPS/include/fastcdr/FastBuffer.h
  34. 0 1756
      thirdpartylib/FastRTPS/include/fastcdr/FastCdr.h
  35. 0 53
      thirdpartylib/FastRTPS/include/fastcdr/config.h
  36. 0 53
      thirdpartylib/FastRTPS/include/fastcdr/config.h.in
  37. 0 66
      thirdpartylib/FastRTPS/include/fastcdr/eProsima_auto_link.h
  38. 0 85
      thirdpartylib/FastRTPS/include/fastcdr/exceptions/BadParamException.h
  39. 0 98
      thirdpartylib/FastRTPS/include/fastcdr/exceptions/Exception.h
  40. 0 85
      thirdpartylib/FastRTPS/include/fastcdr/exceptions/NotEnoughMemoryException.h
  41. 0 69
      thirdpartylib/FastRTPS/include/fastcdr/fastcdr_dll.h
  42. 0 63
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/ReplyHeader.hpp
  43. 0 63
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/RequestHeader.hpp
  44. 0 46
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/Types.hpp
  45. 0 292
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp
  46. 0 89
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp
  47. 0 90
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.hpp
  48. 0 425
      thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp
  49. 0 149
      thirdpartylib/FastRTPS/include/fastdds/dds/core/Entity.hpp
  50. 0 1582
      thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/ParameterTypes.hpp
  51. 0 2704
      thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/QosPolicies.hpp
  52. 0 88
      thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/ReaderDataLifecycleQosPolicy.hpp
  53. 0 70
      thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/WriterDataLifecycleQosPolicy.hpp
  54. 0 56
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/BaseStatus.hpp
  55. 0 65
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp
  56. 0 83
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp
  57. 0 59
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp
  58. 0 55
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/MatchedStatus.hpp
  59. 0 41
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp
  60. 0 71
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/SampleRejectedStatus.hpp
  61. 0 254
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/StatusMask.hpp
  62. 0 42
      thirdpartylib/FastRTPS/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp
  63. 0 612
      thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipant.hpp
  64. 0 233
      thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipantFactory.hpp
  65. 0 169
      thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipantListener.hpp
  66. 0 97
      thirdpartylib/FastRTPS/include/fastdds/dds/domain/qos/DomainParticipantFactoryQos.hpp
  67. 0 293
      thirdpartylib/FastRTPS/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp
  68. 0 60
      thirdpartylib/FastRTPS/include/fastdds/dds/log/Colors.hpp
  69. 0 77
      thirdpartylib/FastRTPS/include/fastdds/dds/log/FileConsumer.hpp
  70. 0 321
      thirdpartylib/FastRTPS/include/fastdds/dds/log/Log.hpp
  71. 0 46
      thirdpartylib/FastRTPS/include/fastdds/dds/log/StdoutConsumer.hpp
  72. 0 309
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/DataWriter.hpp
  73. 0 114
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/DataWriterListener.hpp
  74. 0 303
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/Publisher.hpp
  75. 0 62
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/PublisherListener.hpp
  76. 0 810
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/DataWriterQos.hpp
  77. 0 197
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/PublisherQos.hpp
  78. 0 151
      thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/WriterQos.hpp
  79. 0 305
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/DataReader.hpp
  80. 0 152
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/DataReaderListener.hpp
  81. 0 109
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/SampleInfo.hpp
  82. 0 307
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/Subscriber.hpp
  83. 0 74
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/SubscriberListener.hpp
  84. 0 819
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp
  85. 0 155
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/ReaderQos.hpp
  86. 0 198
      thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp
  87. 0 155
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/Topic.hpp
  88. 0 299
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicDataType.hpp
  89. 0 105
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicDescription.hpp
  90. 0 73
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicListener.hpp
  91. 0 224
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/TypeSupport.hpp
  92. 0 509
      thirdpartylib/FastRTPS/include/fastdds/dds/topic/qos/TopicQos.hpp
  93. 0 115
      thirdpartylib/FastRTPS/include/fastdds/rtps/Endpoint.h
  94. 0 202
      thirdpartylib/FastRTPS/include/fastdds/rtps/RTPSDomain.h
  95. 0 124
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/EndpointAttributes.h
  96. 0 90
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/HistoryAttributes.h
  97. 0 124
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/PropertyPolicy.h
  98. 0 178
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp
  99. 0 471
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h
  100. 0 111
      thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/ReaderAttributes.h

+ 1 - 0
sh/envInstall.sh

@@ -1,3 +1,4 @@
+echo "nvidia" | sudo -S apt update
 echo "nvidia" | sudo -S  apt install -y vim gedit terminator net-tools
 # ADC develop ENV required
 echo "nvidia" | sudo -S apt install patchelf -y

+ 0 - 73
src/detection/detection_lidar_PointPillars_MultiHead/.gitignore

@@ -1,73 +0,0 @@
-# This file is used to ignore files which are generated
-# ----------------------------------------------------------------------------
-
-*~
-*.autosave
-*.a
-*.core
-*.moc
-*.o
-*.obj
-*.orig
-*.rej
-*.so
-*.so.*
-*_pch.h.cpp
-*_resource.rc
-*.qm
-.#*
-*.*#
-core
-!core/
-tags
-.DS_Store
-.directory
-*.debug
-Makefile*
-*.prl
-*.app
-moc_*.cpp
-ui_*.h
-qrc_*.cpp
-Thumbs.db
-*.res
-*.rc
-/.qmake.cache
-/.qmake.stash
-
-# qtcreator generated files
-*.pro.user*
-
-# xemacs temporary files
-*.flc
-
-# Vim temporary files
-.*.swp
-
-# Visual Studio generated files
-*.ib_pdb_index
-*.idb
-*.ilk
-*.pdb
-*.sln
-*.suo
-*.vcproj
-*vcproj.*.*.user
-*.ncb
-*.sdf
-*.opensdf
-*.vcxproj
-*vcxproj.*
-
-# MinGW generated files
-*.Debug
-*.Release
-
-# Python byte code
-*.pyc
-
-# Binaries
-# --------
-*.dll
-*.exe
-

+ 0 - 294
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Ctracker.cpp

@@ -1,294 +0,0 @@
-#include "Ctracker.h"
-///
-/// \brief CTracker::CTracker
-/// Tracker. Manage tracks. Create, remove, update.
-/// \param settings
-///
-CTracker::CTracker(TrackerSettings& settings)
-{
-    m_settings = settings;
-}
-///
-/// \brief CTracker::CTracker
-/// Tracker. Manage tracks. Create, remove, update.
-/// \param settings
-///
-CTracker::CTracker(const TrackerSettings& settings)
-    :
-      m_settings(settings),
-      m_nextTrackID(0)
-{
-    ShortPathCalculator* spcalc = nullptr;
-    SPSettings spSettings = { settings.m_distThres, 12 };
-    switch (m_settings.m_matchType)
-    {
-    case tracking::MatchHungrian:
-        spcalc = new SPHungrian(spSettings);
-        break;
-        //    case tracking::MatchBipart:
-        //        spcalc = new SPBipart(spSettings);
-        //        break;
-    }
-    assert(spcalc != nullptr);
-    m_SPCalculator = std::unique_ptr<ShortPathCalculator>(spcalc);
-}
-
-///
-/// \brief CTracker::~CTracker
-///
-CTracker::~CTracker(void)
-{
-}
-///
-/// \brief CTracker::setSettings
-/// Tracker. Manage tracks. Create, remove, update.
-/// \param settings
-///
-void CTracker::setSettings(TrackerSettings& settings)
-{
-    m_settings = settings;
-    m_nextTrackID = 0;
-    ShortPathCalculator* spcalc = nullptr;
-    SPSettings spSettings = { settings.m_distThres, 12 };
-    switch (m_settings.m_matchType)
-    {
-    case tracking::MatchHungrian:
-        spcalc = new SPHungrian(spSettings);
-        break;
-        //    case tracking::MatchBipart:
-        //        spcalc = new SPBipart(spSettings);
-        //        break;
-    }
-    assert(spcalc != nullptr);
-    m_SPCalculator = std::unique_ptr<ShortPathCalculator>(spcalc);
-}
-///
-/// \brief CTracker::Update
-/// \param regions
-/// \param currFrame
-/// \param fps
-///
-void CTracker::Update(
-        const regions_t& regions,
-        cv::UMat currFrame,
-        float fps
-        )
-{
-    UpdateTrackingState(regions, currFrame, fps);
-
-    currFrame.copyTo(m_prevFrame);
-}
-
-///
-/// \brief CTracker::UpdateTrackingState
-/// \param regions
-/// \param currFrame
-/// \param fps
-///
-void CTracker::UpdateTrackingState(
-        const regions_t& regions,
-        cv::UMat currFrame,
-        float fps
-        )
-{
-    const size_t N = m_tracks.size();	// Tracking objects
-    const size_t M = regions.size();	// Detections or regions
-
-    assignments_t assignment(N, -1); // Assignments regions -> tracks
-
-    if (!m_tracks.empty())
-    {
-        // Distance matrix between all tracks to all regions
-        distMatrix_t costMatrix(N * M);
-        const track_t maxPossibleCost = 1e3;//static_cast<track_t>(currFrame.cols * currFrame.rows);
-        track_t maxCost = 0;
-        CreateDistaceMatrix(regions, costMatrix, maxPossibleCost, maxCost, currFrame);
-
-        // Solving assignment problem (shortest paths)
-        m_SPCalculator->Solve(costMatrix, N, M, assignment, maxCost);//row->col(trackid->regionid)
-
-        // clean assignment from pairs with large distance
-        for (size_t i = 0; i < assignment.size(); i++)
-        {
-            if (assignment[i] != -1)
-            {
-#ifdef DEBUG_SHOW
-                std::cout<<costMatrix[i + assignment[i] * N]<<", ";
-#endif
-                if (costMatrix[i + assignment[i] * N] > m_settings.m_distThres)
-                {
-                    assignment[i] = -1;
-                    m_tracks[i]->SkippedFrames()++;
-                }
-            }
-            else
-            {
-#ifdef DEBUG_SHOW
-                std::cout<<-1<<", ";
-#endif
-                // If track have no assigned detect, then increment skipped frames counter.
-                m_tracks[i]->SkippedFrames()++;
-            }
-        }
-#ifdef DEBUG_SHOW
-                std::cout<<std::endl;
-#endif
-        // If track didn't get detects long time, remove it.
-        for (size_t i = 0; i < m_tracks.size();)
-        {
-            if (m_tracks[i]->SkippedFrames() > m_settings.m_maximumAllowedSkippedFrames ||
-                    m_tracks[i]->IsStaticTimeout(cvRound(fps * (m_settings.m_maxStaticTime - m_settings.m_minStaticTime))))
-            {
-                m_tracks.erase(m_tracks.begin() + i);
-                assignment.erase(assignment.begin() + i);
-            }
-            else
-            {
-                ++i;
-            }
-        }
-    }
-
-    // Search for unassigned detects and start new tracks for them.
-    for (size_t i = 0; i < regions.size(); ++i)
-    {
-        if (find(assignment.begin(), assignment.end(), i) == assignment.end())
-        {
-            m_tracks.push_back(std::make_unique<CTrack>(regions[i],
-                                                        m_settings.m_kalmanType,
-                                                        m_settings.m_dt,
-                                                        m_settings.m_accelNoiseMag,
-                                                        m_settings.m_useAcceleration,
-                                                        m_nextTrackID++%500,
-                                                        i,
-                                                        m_settings.m_filterGoal,
-                                                        m_settings.m_lostTrackType));
-        }
-    }
-
-    // Update Kalman Filters state
-    const ptrdiff_t stop_i = static_cast<ptrdiff_t>(assignment.size());
-#pragma omp parallel for
-    for (ptrdiff_t i = 0; i < stop_i; ++i)
-    {
-        // If track updated less than one time, than filter state is not correct.
-        if (assignment[i] != -1) // If we have assigned detect, then update using its coordinates,
-        {
-            m_tracks[i]->DetectedFrames()++;
-            m_tracks[i]->SkippedFrames() = 0;
-            m_tracks[i]->Update(
-                        regions[assignment[i]], true,
-                    m_settings.m_maxTraceLength,
-                    m_prevFrame, currFrame,
-                    m_settings.m_useAbandonedDetection ? cvRound(m_settings.m_minStaticTime * fps) : 0);
-        }
-        else				     // if not continue using predictions
-        {
-            m_tracks[i]->Update(CRegion(), false, m_settings.m_maxTraceLength, m_prevFrame, currFrame, 0);
-        }
-        m_tracks[i]->m_regionID = assignment[i];
-    }
-}
-
-///
-/// \brief CTracker::CreateDistaceMatrix
-/// \param regions
-/// \param costMatrix
-/// \param maxPossibleCost
-/// \param maxCost
-///
-void CTracker::CreateDistaceMatrix(const regions_t& regions, distMatrix_t& costMatrix, track_t maxPossibleCost, track_t& maxCost, cv::UMat currFrame)
-{
-    const size_t N = m_tracks.size();	// Tracking objects
-    maxCost = 0;
-
-    for (size_t i = 0; i < N; ++i)
-    {
-        const auto& track = m_tracks[i];
-
-        // Calc predicted area for track
-//        cv::Size_<track_t> minRadius;
-//        if (m_settings.m_minAreaRadiusPix < 0)
-//        {
-//            minRadius.width = m_settings.m_minAreaRadiusK * track->LastRegion().m_rect.size.width;
-//            minRadius.height = m_settings.m_minAreaRadiusK * track->LastRegion().m_rect.size.height;
-//        }
-//        else
-//        {
-//            minRadius.width = m_settings.m_minAreaRadiusPix;
-//            minRadius.height = m_settings.m_minAreaRadiusPix;
-//        }
-        //cv::RotatedRect predictedArea = track->CalcPredictionEllipse(minRadius);
-
-        // Calc distance between track and regions
-        for (size_t j = 0; j < regions.size(); ++j)
-        {
-            const auto& reg = regions[j];
-
-            auto dist = maxPossibleCost;
-            if (reg.m_type==-1?(m_settings.CheckType(m_tracks[i]->LastRegion().m_type_name, reg.m_type_name)):(m_settings.CheckType(m_tracks[i]->LastRegion().m_type, reg.m_type)))
-            {
-                dist = 0;
-                size_t ind = 0;
-                if (m_settings.m_distType[ind] > 0.0f && ind == tracking::DistCenters)
-                {
-#if 0
-                    track_t ellipseDist = track->IsInsideArea(reg.m_rrect.center, predictedArea);
-                    if (ellipseDist > 1)
-                        dist += m_settings.m_distType[ind];
-                    else
-                        dist += ellipseDist * m_settings.m_distType[ind];
-#else
-                    dist += m_settings.m_distType[ind] * track->CalcDistCenter(reg);
-#endif
-                }
-                ++ind;
-
-                if (m_settings.m_distType[ind] > 0.0f && ind == tracking::DistRects)
-                {
-#if 0
-                    track_t ellipseDist = track->IsInsideArea(reg.m_rect.center, predictedArea);
-                    if (ellipseDist < 1)
-                    {
-                        track_t dw = track->WidthDist(reg);
-                        track_t dh = track->HeightDist(reg);
-                        dist += m_settings.m_distType[ind] * (1 - (1 - ellipseDist) * (dw + dh) * 0.5f);
-                    }
-                    else
-                    {
-                        dist += m_settings.m_distType[ind];
-                    }
-                    //std::cout << "dist = " << dist << ", ed = " << ellipseDist << ", dw = " << dw << ", dh = " << dh << std::endl;
-#else
-                    dist += m_settings.m_distType[ind] * track->CalcDistRect(reg);
-#endif
-                }
-                ++ind;
-                if (m_settings.m_distType[ind] > 0.0f && ind == tracking::DistRect3Ds)
-                {
-#if 0
-                    track_t ellipseDist = track->IsInsideArea(reg.m_rect.center, predictedArea);
-                    if (ellipseDist < 1)
-                    {
-                        track_t dw = track->WidthDist(reg);
-                        track_t dh = track->HeightDist(reg);
-                        dist += m_settings.m_distType[ind] * (1 - (1 - ellipseDist) * (dw + dh) * 0.5f);
-                    }
-                    else
-                    {
-                        dist += m_settings.m_distType[ind];
-                    }
-                    //std::cout << "dist = " << dist << ", ed = " << ellipseDist << ", dw = " << dw << ", dh = " << dh << std::endl;
-#else
-                    dist += m_settings.m_distType[ind] * track->CalcDistRect3D(reg);
-#endif
-                }
-                ++ind;
-                assert(ind == tracking::DistsCount);
-            }
-            costMatrix[i + j * N] = dist;
-            if (dist > maxCost)
-                maxCost = dist;
-        }
-    }
-}

+ 0 - 292
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Ctracker.h

@@ -1,292 +0,0 @@
-#pragma once
-#include <iostream>
-#include <vector>
-#include <memory>
-#include <array>
-#include <deque>
-#include <numeric>
-#include <map>
-#include <set>
-
-#include "defines.h"
-#include "track.h"
-#include "ShortPathCalculator.h"
-
-// ----------------------------------------------------------------------
-
-///
-/// \brief The TrackerSettings struct
-///
-struct TrackerSettings
-{
-    tracking::KalmanType m_kalmanType = tracking::KalmanLinear;
-    tracking::FilterGoal m_filterGoal = tracking::FilterCenter;
-    tracking::LostTrackType m_lostTrackType = tracking::TrackNone;
-    tracking::MatchType m_matchType = tracking::MatchHungrian;
-
-	std::array<track_t, tracking::DistsCount> m_distType;
-
-    ///
-    /// \brief m_dt
-    /// Time step for Kalman
-    ///
-    track_t m_dt = 1.0f;
-
-    ///
-    /// \brief m_accelNoiseMag
-    /// Noise magnitude for Kalman
-    ///
-    track_t m_accelNoiseMag = 0.1f;
-
-	///
-	/// \brief m_useAcceleration
-	/// Constant velocity or constant acceleration motion model
-	///
-	bool m_useAcceleration = false;
-
-    ///
-    /// \brief m_distThres
-    /// Distance threshold for Assignment problem: from 0 to 1
-    ///
-    track_t m_distThres = 0.8f;
-
-    ///
-    /// \brief m_minAreaRadius
-    /// Minimal area radius in pixels for objects centers
-    ///
-    track_t m_minAreaRadiusPix = 20.f;
-
-	///
-	/// \brief m_minAreaRadius
-	/// Minimal area radius in ration for object size.. Used if m_minAreaRadiusPix < 0
-	///
-	track_t m_minAreaRadiusK = 0.5f;
-
-    ///
-    /// \brief m_maximumAllowedSkippedFrames
-    /// If the object don't assignment more than this frames then it will be removed
-    ///
-    size_t m_maximumAllowedSkippedFrames = 25;
-
-    ///
-    /// \brief m_maxTraceLength
-    /// The maximum trajectory length
-    ///
-    size_t m_maxTraceLength = 50;
-
-    ///
-    /// \brief m_useAbandonedDetection
-    /// Detection abandoned objects
-    ///
-    bool m_useAbandonedDetection = false;
-
-    ///
-    /// \brief m_minStaticTime
-    /// After this time (in seconds) the object is considered abandoned
-    ///
-    int m_minStaticTime = 5;
-    ///
-    /// \brief m_maxStaticTime
-    /// After this time (in seconds) the abandoned object will be removed
-    ///
-    int m_maxStaticTime = 25;
-
-	///
-	/// \brief m_nearTypes
-	/// Object types that can be matched while tracking
-	///
-    std::map<int, std::set<int>> m_nearTypes;
-
-    std::map<std::string, std::set<std::string>> m_nearTypeNames;
-
-	///
-	TrackerSettings()
-	{
-        m_distType[tracking::DistCenters] = 0.5f;
-        m_distType[tracking::DistRects] = 0.5f;
-        m_distType[tracking::DistRect3Ds] = 0.f;
-
-		assert(CheckDistance());
-	}
-
-	///
-	bool CheckDistance() const
-	{
-		track_t sum = std::accumulate(m_distType.begin(), m_distType.end(), 0.0f);
-        track_t maxOne = std::max(1.0f, std::fabs(sum));
-		return std::fabs(sum - 1.0f) <= std::numeric_limits<track_t>::epsilon() * maxOne;
-	}
-
-	///
-	bool SetDistances(std::array<track_t, tracking::DistsCount> distType)
-	{
-		bool res = true;
-		auto oldDists = m_distType;
-		m_distType = distType;
-		if (!CheckDistance())
-		{
-			m_distType = oldDists;
-			res = false;
-		}
-		return res;
-	}
-
-	///
-	bool SetDistance(tracking::DistType distType)
-	{
-		std::fill(m_distType.begin(), m_distType.end(), 0.0f);
-		m_distType[distType] = 1.f;
-		return true;
-	}
-
-	///
-    void AddNearTypes(const int& type1, const int& type2, bool sym)
-	{
-        auto AddOne = [&](const int& type1, const int& type2)
-		{
-			auto it = m_nearTypes.find(type1);
-			if (it == std::end(m_nearTypes))
-			{
-                m_nearTypes[type1] = std::set<int>{ type2 };
-			}
-			else
-			{
-				it->second.insert(type2);
-			}
-		};
-		AddOne(type1, type2);
-		if (sym)
-        {
-			AddOne(type2, type1);
-        }
-	}
-
-	///
-    bool CheckType(const int& type1, const int& type2) const
-	{
-        bool res = type1==-1 || type2==-1 || (type1 == type2);
-		if (!res)
-		{
-			auto it = m_nearTypes.find(type1);
-			if (it != std::end(m_nearTypes))
-			{
-				res = it->second.find(type2) != std::end(it->second);
-			}
-		}
-		return res;
-	}
-
-    ///
-    void AddNearTypes(const std::string& type1, const std::string& type2, bool sym)
-    {
-        auto AddOne = [&](const std::string& type1, const std::string& type2)
-        {
-            auto it = m_nearTypeNames.find(type1);
-            if (it == std::end(m_nearTypeNames))
-            {
-                m_nearTypeNames[type1] = std::set<std::string>{ type2 };
-            }
-            else
-            {
-                it->second.insert(type2);
-            }
-        };
-        AddOne(type1, type2);
-        if (sym)
-        {
-            AddOne(type2, type1);
-        }
-    }
-
-    ///
-    bool CheckType(const std::string& type1, const std::string& type2) const
-    {
-        bool res = type1.empty() || type2.empty() || (type1 == type2);
-        if (!res)
-        {
-            auto it = m_nearTypeNames.find(type1);
-            if (it != std::end(m_nearTypeNames))
-            {
-                res = it->second.find(type2) != std::end(it->second);
-            }
-        }
-        return res;
-    }
-};
-
-///
-/// \brief The CTracker class
-///
-class CTracker
-{
-public:
-    CTracker(TrackerSettings& settings);
-    CTracker(const TrackerSettings& settings);
-    CTracker(const CTracker&) = delete;
-    CTracker(CTracker&&) = delete;
-	CTracker& operator=(const CTracker&) = delete;
-	CTracker& operator=(CTracker&&) = delete;
-	
-	~CTracker(void);
-    void setSettings(TrackerSettings& settings);
-    void Update(const regions_t& regions, cv::UMat currFrame, float fps);
-
-    ///
-    /// \brief CanGrayFrameToTrack
-    /// \return
-    ///
-    bool CanGrayFrameToTrack() const
-    {
-        bool needColor = (m_settings.m_lostTrackType == tracking::LostTrackType::TrackNone);
-        return !needColor;
-    }
-
-	///
-	/// \brief CanColorFrameToTrack
-	/// \return
-	///
-	bool CanColorFrameToTrack() const
-	{
-		return true;
-	}
-
-    ///
-    /// \brief GetTracksCount
-    /// \return
-    ///
-	size_t GetTracksCount() const
-	{
-		return m_tracks.size();
-	}
-    ///
-    /// \brief GetTracks
-    /// \return
-    ///
-	std::vector<TrackingObject> GetTracks() const
-	{
-		std::vector<TrackingObject> tracks;
-		if (!m_tracks.empty())
-		{
-			tracks.reserve(m_tracks.size());
-			for (const auto& track : m_tracks)
-			{
-                tracks.push_back(track->ConstructObject());
-			}
-		}
-		return tracks;
-	}
-
-private:
-    TrackerSettings m_settings;
-
-	tracks_t m_tracks;
-
-    size_t m_nextTrackID;
-
-    cv::UMat m_prevFrame;
-
-    std::unique_ptr<ShortPathCalculator> m_SPCalculator;
-
-    void CreateDistaceMatrix(const regions_t& regions, distMatrix_t& costMatrix, track_t maxPossibleCost, track_t& maxCost, cv::UMat currFrame);
-    void UpdateTrackingState(const regions_t& regions, cv::UMat currFrame, float fps);
-};

+ 0 - 723
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/HungarianAlg.cpp

@@ -1,723 +0,0 @@
-#include "HungarianAlg.h"
-#include <limits>
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-AssignmentProblemSolver::AssignmentProblemSolver()
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-AssignmentProblemSolver::~AssignmentProblemSolver()
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-track_t AssignmentProblemSolver::Solve(
-	const distMatrix_t& distMatrixIn,
-	size_t nOfRows,
-	size_t nOfColumns,
-	std::vector<int>& assignment,
-	TMethod Method
-	)
-{
-	assignment.resize(nOfRows, -1);
-
-	track_t cost = 0;
-
-	switch (Method)
-	{
-	case optimal:
-		assignmentoptimal(assignment, cost, distMatrixIn, nOfRows, nOfColumns);
-		break;
-
-	case many_forbidden_assignments:
-		assignmentsuboptimal1(assignment, cost, distMatrixIn, nOfRows, nOfColumns);
-		break;
-
-	case without_forbidden_assignments:
-		assignmentsuboptimal2(assignment, cost, distMatrixIn, nOfRows, nOfColumns);
-		break;
-	}
-
-	return cost;
-}
-// --------------------------------------------------------------------------
-// Computes the optimal assignment (minimum overall costs) using Munkres algorithm.
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::assignmentoptimal(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns)
-{
-	// Generate distance cv::Matrix 
-	// and check cv::Matrix elements positiveness :)
-
-	// Total elements number
-	size_t nOfElements = nOfRows * nOfColumns;
-	// Memory allocation
-	track_t* distMatrix = (track_t *)malloc(nOfElements * sizeof(track_t));
-
-    if (distMatrix == nullptr)
-    {
-        return;
-    }
-
-	// Pointer to last element
-	track_t* distMatrixEnd = distMatrix + nOfElements;
-
-	for (size_t row = 0; row < nOfElements; row++)
-	{
-        track_t value = distMatrixIn[row];
-		assert(value >= 0);
-		distMatrix[row] = value;
-	}
-
-	// Memory allocation
-	bool* coveredColumns = (bool*)calloc(nOfColumns, sizeof(bool));
-	bool* coveredRows = (bool*)calloc(nOfRows, sizeof(bool));
-	bool* starMatrix = (bool*)calloc(nOfElements, sizeof(bool));
-	bool* primeMatrix = (bool*)calloc(nOfElements, sizeof(bool));
-	bool* newStarMatrix = (bool*)calloc(nOfElements, sizeof(bool)); /* used in step4 */
-
-	/* preliminary steps */
-	if (nOfRows <= nOfColumns)
-	{
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			/* find the smallest element in the row */
-            track_t* distMatrixTemp = distMatrix + row;
-			track_t  minValue = *distMatrixTemp;
-			distMatrixTemp += nOfRows;
-			while (distMatrixTemp < distMatrixEnd)
-			{
-				track_t value = *distMatrixTemp;
-				if (value < minValue)
-				{
-					minValue = value;
-				}
-				distMatrixTemp += nOfRows;
-			}
-			/* subtract the smallest element from each element of the row */
-			distMatrixTemp = distMatrix + row;
-			while (distMatrixTemp < distMatrixEnd)
-			{
-				*distMatrixTemp -= minValue;
-				distMatrixTemp += nOfRows;
-			}
-		}
-		/* Steps 1 and 2a */
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			for (size_t col = 0; col < nOfColumns; col++)
-			{
-				if (distMatrix[row + nOfRows*col] == 0)
-				{
-					if (!coveredColumns[col])
-					{
-						starMatrix[row + nOfRows * col] = true;
-						coveredColumns[col] = true;
-						break;
-					}
-				}
-			}
-		}
-	}
-	else /* if(nOfRows > nOfColumns) */
-	{
-		for (size_t col = 0; col < nOfColumns; col++)
-		{
-			/* find the smallest element in the column */
-			track_t* distMatrixTemp = distMatrix + nOfRows*col;
-			track_t* columnEnd = distMatrixTemp + nOfRows;
-			track_t  minValue = *distMatrixTemp++;
-			while (distMatrixTemp < columnEnd)
-			{
-				track_t value = *distMatrixTemp++;
-				if (value < minValue)
-				{
-					minValue = value;
-				}
-			}
-			/* subtract the smallest element from each element of the column */
-			distMatrixTemp = distMatrix + nOfRows*col;
-			while (distMatrixTemp < columnEnd)
-			{
-				*distMatrixTemp++ -= minValue;
-			}
-		}
-		/* Steps 1 and 2a */
-		for (size_t col = 0; col < nOfColumns; col++)
-		{
-			for (size_t row = 0; row < nOfRows; row++)
-			{
-				if (distMatrix[row + nOfRows*col] == 0)
-				{
-					if (!coveredRows[row])
-					{
-						starMatrix[row + nOfRows*col] = true;
-						coveredColumns[col] = true;
-						coveredRows[row] = true;
-						break;
-					}
-				}
-			}
-		}
-
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			coveredRows[row] = false;
-		}
-	}
-	/* move to step 2b */
-	step2b(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, (nOfRows <= nOfColumns) ? nOfRows : nOfColumns);
-	/* compute cost and remove invalid assignments */
-	computeassignmentcost(assignment, cost, distMatrixIn, nOfRows);
-	/* free allocated memory */
-	free(distMatrix);
-	free(coveredColumns);
-	free(coveredRows);
-	free(starMatrix);
-	free(primeMatrix);
-	free(newStarMatrix);
-	return;
-}
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::buildassignmentvector(assignments_t& assignment, bool *starMatrix, size_t nOfRows, size_t nOfColumns)
-{
-    for (size_t row = 0; row < nOfRows; row++)
-	{
-        for (size_t col = 0; col < nOfColumns; col++)
-		{
-			if (starMatrix[row + nOfRows * col])
-			{
-				assignment[row] = static_cast<int>(col);
-				break;
-			}
-		}
-	}
-}
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::computeassignmentcost(const assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows)
-{
-	for (size_t row = 0; row < nOfRows; row++)
-	{
-		const int col = assignment[row];
-		if (col >= 0)
-		{
-			cost += distMatrixIn[row + nOfRows * col];
-		}
-	}
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::step2a(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim)
-{
-    bool *starMatrixTemp, *columnEnd;
-    /* cover every column containing a starred zero */
-    for (size_t col = 0; col < nOfColumns; col++)
-    {
-        starMatrixTemp = starMatrix + nOfRows * col;
-        columnEnd = starMatrixTemp + nOfRows;
-        while (starMatrixTemp < columnEnd)
-        {
-            if (*starMatrixTemp++)
-            {
-                coveredColumns[col] = true;
-                break;
-            }
-        }
-    }
-    /* move to step 3 */
-	step2b(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, minDim);
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::step2b(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim)
-{
-	/* count covered columns */
-    size_t nOfCoveredColumns = 0;
-    for (size_t col = 0; col < nOfColumns; col++)
-	{
-		if (coveredColumns[col])
-		{
-			nOfCoveredColumns++;
-		}
-	}
-	if (nOfCoveredColumns == minDim)
-	{
-		/* algorithm finished */
-		buildassignmentvector(assignment, starMatrix, nOfRows, nOfColumns);
-	}
-	else
-	{
-		/* move to step 3 */
-		step3_5(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, minDim);
-	}
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::step3_5(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim)
-{
-	for (;;)
-	{
-		/* step 3 */
-		bool zerosFound = true;
-		while (zerosFound)
-		{
-			zerosFound = false;
-			for (size_t col = 0; col < nOfColumns; col++)
-			{
-				if (!coveredColumns[col])
-				{
-					for (size_t row = 0; row < nOfRows; row++)
-					{
-						if ((!coveredRows[row]) && (distMatrix[row + nOfRows*col] == 0))
-						{
-							/* prime zero */
-							primeMatrix[row + nOfRows*col] = true;
-							/* find starred zero in current row */
-							size_t starCol = 0;
-							for (; starCol < nOfColumns; starCol++)
-							{
-								if (starMatrix[row + nOfRows * starCol])
-								{
-									break;
-								}
-							}
-							if (starCol == nOfColumns) /* no starred zero found */
-							{
-								/* move to step 4 */
-								step4(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, minDim, row, col);
-								return;
-							}
-							else
-							{
-								coveredRows[row] = true;
-								coveredColumns[starCol] = false;
-								zerosFound = true;
-								break;
-							}
-						}
-					}
-				}
-			}
-		}
-		/* step 5 */
-        track_t h = std::numeric_limits<track_t>::max();
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			if (!coveredRows[row])
-			{
-				for (size_t col = 0; col < nOfColumns; col++)
-				{
-					if (!coveredColumns[col])
-					{
-                        const track_t value = distMatrix[row + nOfRows*col];
-						if (value < h)
-						{
-							h = value;
-						}
-					}
-				}
-			}
-		}
-		/* add h to each covered row */
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			if (coveredRows[row])
-			{
-				for (size_t col = 0; col < nOfColumns; col++)
-				{
-					distMatrix[row + nOfRows*col] += h;
-				}
-			}
-		}
-		/* subtract h from each uncovered column */
-		for (size_t col = 0; col < nOfColumns; col++)
-		{
-			if (!coveredColumns[col])
-			{
-				for (size_t row = 0; row < nOfRows; row++)
-				{
-					distMatrix[row + nOfRows*col] -= h;
-				}
-			}
-		}
-	}
-}
-
-// --------------------------------------------------------------------------
-//
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::step4(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim, size_t row, size_t col)
-{
-	const size_t nOfElements = nOfRows * nOfColumns;
-	/* generate temporary copy of starMatrix */
-	for (size_t n = 0; n < nOfElements; n++)
-	{
-		newStarMatrix[n] = starMatrix[n];
-	}
-	/* star current zero */
-	newStarMatrix[row + nOfRows*col] = true;
-	/* find starred zero in current column */
-	size_t starCol = col;
-	size_t starRow = 0;
-	for (; starRow < nOfRows; starRow++)
-	{
-		if (starMatrix[starRow + nOfRows * starCol])
-		{
-			break;
-		}
-	}
-	while (starRow < nOfRows)
-	{
-		/* unstar the starred zero */
-		newStarMatrix[starRow + nOfRows*starCol] = false;
-		/* find primed zero in current row */
-		size_t primeRow = starRow;
-		size_t primeCol = 0;
-		for (; primeCol < nOfColumns; primeCol++)
-		{
-			if (primeMatrix[primeRow + nOfRows * primeCol])
-			{
-				break;
-			}
-		}
-		/* star the primed zero */
-		newStarMatrix[primeRow + nOfRows*primeCol] = true;
-		/* find starred zero in current column */
-		starCol = primeCol;
-		for (starRow = 0; starRow < nOfRows; starRow++)
-		{
-			if (starMatrix[starRow + nOfRows * starCol])
-			{
-				break;
-			}
-		}
-	}
-	/* use temporary copy as new starMatrix */
-	/* delete all primes, uncover all rows */
-    for (size_t n = 0; n < nOfElements; n++)
-	{
-		primeMatrix[n] = false;
-		starMatrix[n] = newStarMatrix[n];
-	}
-    for (size_t n = 0; n < nOfRows; n++)
-	{
-		coveredRows[n] = false;
-	}
-	/* move to step 2a */
-	step2a(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, minDim);
-}
-
-// --------------------------------------------------------------------------
-// Computes a suboptimal solution. Good for cases without forbidden assignments.
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::assignmentsuboptimal2(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns)
-{
-	/* make working copy of distance Matrix */
-	const size_t nOfElements = nOfRows * nOfColumns;
-	track_t* distMatrix = (track_t*)malloc(nOfElements * sizeof(track_t));
-	for (size_t n = 0; n < nOfElements; n++)
-	{
-		distMatrix[n] = distMatrixIn[n];
-	}
-
-	/* recursively search for the minimum element and do the assignment */
-	for (;;)
-	{
-		/* find minimum distance observation-to-track pair */
-		track_t minValue = std::numeric_limits<track_t>::max();
-		size_t tmpRow = 0;
-		size_t tmpCol = 0;
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			for (size_t col = 0; col < nOfColumns; col++)
-			{
-				const track_t value = distMatrix[row + nOfRows*col];
-				if (value != std::numeric_limits<track_t>::max() && (value < minValue))
-				{
-					minValue = value;
-					tmpRow = row;
-					tmpCol = col;
-				}
-			}
-		}
-
-		if (minValue != std::numeric_limits<track_t>::max())
-		{
-			assignment[tmpRow] = static_cast<int>(tmpCol);
-			cost += minValue;
-			for (size_t n = 0; n < nOfRows; n++)
-			{
-				distMatrix[n + nOfRows*tmpCol] = std::numeric_limits<track_t>::max();
-			}
-			for (size_t n = 0; n < nOfColumns; n++)
-			{
-				distMatrix[tmpRow + nOfRows*n] = std::numeric_limits<track_t>::max();
-			}
-		}
-		else
-		{
-			break;
-		}
-	}
-
-	free(distMatrix);
-}
-// --------------------------------------------------------------------------
-// Computes a suboptimal solution. Good for cases with many forbidden assignments.
-// --------------------------------------------------------------------------
-void AssignmentProblemSolver::assignmentsuboptimal1(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns)
-{
-	/* make working copy of distance Matrix */
-	const size_t nOfElements = nOfRows * nOfColumns;
-	track_t* distMatrix = (track_t *)malloc(nOfElements * sizeof(track_t));
-    for (size_t n = 0; n < nOfElements; n++)
-	{
-		distMatrix[n] = distMatrixIn[n];
-	}
-
-	/* allocate memory */
-	int* nOfValidObservations = (int *)calloc(nOfRows, sizeof(int));
-	int* nOfValidTracks = (int *)calloc(nOfColumns, sizeof(int));
-
-	/* compute number of validations */
-	bool infiniteValueFound = false;
-	bool finiteValueFound = false;
-	for (size_t row = 0; row < nOfRows; row++)
-	{
-		for (size_t col = 0; col < nOfColumns; col++)
-		{
-			if (distMatrix[row + nOfRows*col] != std::numeric_limits<track_t>::max())
-			{
-				nOfValidTracks[col] += 1;
-				nOfValidObservations[row] += 1;
-				finiteValueFound = true;
-			}
-			else
-			{
-				infiniteValueFound = true;
-			}
-		}
-	}
-
-	if (infiniteValueFound)
-	{
-		if (!finiteValueFound)
-		{
-            /* free allocated memory */
-            free(nOfValidObservations);
-            free(nOfValidTracks);
-            free(distMatrix);
-
-			return;
-		}
-		bool repeatSteps = true;
-
-		while (repeatSteps)
-		{
-			repeatSteps = false;
-
-			/* step 1: reject assignments of multiply validated tracks to singly validated observations		 */
-			for (size_t col = 0; col < nOfColumns; col++)
-			{
-				bool singleValidationFound = false;
-				for (size_t row = 0; row < nOfRows; row++)
-				{
-					if (distMatrix[row + nOfRows * col] != std::numeric_limits<track_t>::max() && (nOfValidObservations[row] == 1))
-					{
-						singleValidationFound = true;
-						break;
-					}
-				}
-				if (singleValidationFound)
-				{
-					for (size_t nestedRow = 0; nestedRow < nOfRows; nestedRow++)
-						if ((nOfValidObservations[nestedRow] > 1) && distMatrix[nestedRow + nOfRows * col] != std::numeric_limits<track_t>::max())
-						{
-							distMatrix[nestedRow + nOfRows * col] = std::numeric_limits<track_t>::max();
-							nOfValidObservations[nestedRow] -= 1;
-							nOfValidTracks[col] -= 1;
-							repeatSteps = true;
-						}
-				}
-			}
-
-			/* step 2: reject assignments of multiply validated observations to singly validated tracks */
-			if (nOfColumns > 1)
-			{
-				for (size_t row = 0; row < nOfRows; row++)
-				{
-					bool singleValidationFound = false;
-                    for (size_t col = 0; col < nOfColumns; col++)
-					{
-						if (distMatrix[row + nOfRows*col] != std::numeric_limits<track_t>::max() && (nOfValidTracks[col] == 1))
-						{
-							singleValidationFound = true;
-							break;
-						}
-					}
-
-					if (singleValidationFound)
-					{
-						for (size_t col = 0; col < nOfColumns; col++)
-						{
-							if ((nOfValidTracks[col] > 1) && distMatrix[row + nOfRows*col] != std::numeric_limits<track_t>::max())
-							{
-								distMatrix[row + nOfRows*col] = std::numeric_limits<track_t>::max();
-								nOfValidObservations[row] -= 1;
-								nOfValidTracks[col] -= 1;
-								repeatSteps = true;
-							}
-						}
-					}
-				}
-			}
-		} /* while(repeatSteps) */
-
-		/* for each multiply validated track that validates only with singly validated  */
-		/* observations, choose the observation with minimum distance */
-        for (size_t row = 0; row < nOfRows; row++)
-		{
-			if (nOfValidObservations[row] > 1)
-			{
-				bool allSinglyValidated = true;
-				track_t minValue = std::numeric_limits<track_t>::max();
-				size_t tmpCol = 0;
-                for (size_t col = 0; col < nOfColumns; col++)
-				{
-					const track_t value = distMatrix[row + nOfRows*col];
-					if (value != std::numeric_limits<track_t>::max())
-					{
-						if (nOfValidTracks[col] > 1)
-						{
-							allSinglyValidated = false;
-							break;
-						}
-						else if ((nOfValidTracks[col] == 1) && (value < minValue))
-						{
-							tmpCol = col;
-							minValue = value;
-						}
-					}
-				}
-
-				if (allSinglyValidated)
-				{
-					assignment[row] = static_cast<int>(tmpCol);
-					cost += minValue;
-					for (size_t n = 0; n < nOfRows; n++)
-					{
-						distMatrix[n + nOfRows*tmpCol] = std::numeric_limits<track_t>::max();
-					}
-					for (size_t n = 0; n < nOfColumns; n++)
-					{
-						distMatrix[row + nOfRows*n] = std::numeric_limits<track_t>::max();
-					}
-				}
-			}
-		}
-
-		// for each multiply validated observation that validates only with singly validated  track, choose the track with minimum distance
-        for (size_t col = 0; col < nOfColumns; col++)
-		{
-			if (nOfValidTracks[col] > 1)
-			{
-				bool allSinglyValidated = true;
-				track_t minValue = std::numeric_limits<track_t>::max();
-				size_t tmpRow = 0;
-				for (size_t row = 0; row < nOfRows; row++)
-				{
-					const track_t value = distMatrix[row + nOfRows*col];
-					if (value != std::numeric_limits<track_t>::max())
-					{
-						if (nOfValidObservations[row] > 1)
-						{
-							allSinglyValidated = false;
-							break;
-						}
-						else if ((nOfValidObservations[row] == 1) && (value < minValue))
-						{
-							tmpRow = row;
-							minValue = value;
-						}
-					}
-				}
-
-				if (allSinglyValidated)
-				{
-					assignment[tmpRow] = static_cast<int>(col);
-					cost += minValue;
-					for (size_t n = 0; n < nOfRows; n++)
-					{
-						distMatrix[n + nOfRows*col] = std::numeric_limits<track_t>::max();
-					}
-					for (size_t n = 0; n < nOfColumns; n++)
-					{
-						distMatrix[tmpRow + nOfRows*n] = std::numeric_limits<track_t>::max();
-					}
-				}
-			}
-		}
-	} /* if(infiniteValueFound) */
-
-
-	/* now, recursively search for the minimum element and do the assignment */
-	for (;;)
-	{
-		/* find minimum distance observation-to-track pair */
-		track_t minValue = std::numeric_limits<track_t>::max();
-		size_t tmpRow = 0;
-		size_t tmpCol = 0;
-		for (size_t row = 0; row < nOfRows; row++)
-		{
-			for (size_t col = 0; col < nOfColumns; col++)
-			{
-				const track_t value = distMatrix[row + nOfRows*col];
-				if (value != std::numeric_limits<track_t>::max() && (value < minValue))
-				{
-					minValue = value;
-					tmpRow = row;
-					tmpCol = col;
-				}
-			}
-		}
-
-		if (minValue != std::numeric_limits<track_t>::max())
-		{
-			assignment[tmpRow] = static_cast<int>(tmpCol);
-			cost += minValue;
-			for (size_t n = 0; n < nOfRows; n++)
-			{
-				distMatrix[n + nOfRows*tmpCol] = std::numeric_limits<track_t>::max();
-			}
-			for (size_t n = 0; n < nOfColumns; n++)
-			{
-				distMatrix[tmpRow + nOfRows*n] = std::numeric_limits<track_t>::max();
-			}
-		}
-		else
-		{
-			break;
-		}
-	}
-
-	/* free allocated memory */
-	free(nOfValidObservations);
-	free(nOfValidTracks);
-	free(distMatrix);
-}

+ 0 - 39
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/HungarianAlg.h

@@ -1,39 +0,0 @@
-#include <vector>
-#include <iostream>
-#include <limits>
-#include <time.h>
-#include "defines.h"
-// http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=hungarianAlgorithm
-
-///
-/// \brief The AssignmentProblemSolver class
-///
-class AssignmentProblemSolver
-{
-private:
-	// Computes the optimal assignment (minimum overall costs) using Munkres algorithm.
-	void assignmentoptimal(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns);
-	void buildassignmentvector(assignments_t& assignment, bool *starMatrix, size_t nOfRows, size_t nOfColumns);
-	void computeassignmentcost(const assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows);
-	void step2a(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim);
-	void step2b(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim);
-	void step3_5(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim);
-	void step4(assignments_t& assignment, track_t *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, size_t nOfRows, size_t nOfColumns, size_t minDim, size_t row, size_t col);
-
-	// Computes a suboptimal solution. Good for cases with many forbidden assignments.
-	void assignmentsuboptimal1(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns);
-	// Computes a suboptimal solution. Good for cases with many forbidden assignments.
-	void assignmentsuboptimal2(assignments_t& assignment, track_t& cost, const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns);
-
-public:
-	enum TMethod
-	{
-		optimal,
-		many_forbidden_assignments,
-		without_forbidden_assignments
-	};
-
-	AssignmentProblemSolver();
-	~AssignmentProblemSolver();
-	track_t Solve(const distMatrix_t& distMatrixIn, size_t nOfRows, size_t nOfColumns, assignments_t& assignment, TMethod Method = optimal);
-};

+ 0 - 873
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Kalman.cpp

@@ -1,873 +0,0 @@
-#include "Kalman.h"
-#include <iostream>
-#include <vector>
-
-//---------------------------------------------------------------------------
-TKalmanFilter::TKalmanFilter(
-        tracking::KalmanType type,
-	    bool useAcceleration,
-        track_t deltaTime, // time increment (lower values makes target more "massive")
-        track_t accelNoiseMag
-        )
-    :
-      m_type(type),
-      m_initialized(false),
-      m_deltaTime(deltaTime),
-      m_deltaTimeMin(deltaTime),
-      m_deltaTimeMax(2 * deltaTime),
-      m_lastDist(0),
-      m_accelNoiseMag(accelNoiseMag),
-	  m_useAcceleration(useAcceleration)
-{
-    m_deltaStep = (m_deltaTimeMax - m_deltaTimeMin) / m_deltaStepsCount;
-}
-
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinear(cv::Point3f xy0, cv::Point3f xyv0)
-{
-    // We don't know acceleration, so, assume it to process noise.
-    // But we can guess, the range of acceleration values thich can be achieved by tracked object.
-    // Process noise. (standard deviation of acceleration: m/s^2)
-    // shows, woh much target can accelerate.
-
-    // 4 state variables, 2 measurements
-    m_linearKalman.init(4, 2, 0, El_t);
-    // Transition cv::Matrix
-    m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(4, 4) <<
-                                        1, 0, m_deltaTime, 0,
-                                        0, 1, 0, m_deltaTime,
-                                        0, 0, 1, 0,
-                                        0, 0, 0, 1);
-
-    // init...
-    m_lastPointResult = xy0;
-    m_linearKalman.statePre.at<track_t>(0) = xy0.x;  // x
-    m_linearKalman.statePre.at<track_t>(1) = xy0.y;  // y
-    m_linearKalman.statePre.at<track_t>(2) = xyv0.x; // vx
-    m_linearKalman.statePre.at<track_t>(3) = xyv0.y; // vy
-
-    m_linearKalman.statePost.at<track_t>(0) = xy0.x;
-    m_linearKalman.statePost.at<track_t>(1) = xy0.y;
-    m_linearKalman.statePost.at<track_t>(2) = xyv0.x;
-    m_linearKalman.statePost.at<track_t>(3) = xyv0.y;
-
-    cv::setIdentity(m_linearKalman.measurementMatrix);
-
-    m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(4, 4) <<
-                                       pow(m_deltaTime,4.0)/4.0	,0						,pow(m_deltaTime,3.0)/2.0		,0,
-                                       0						,pow(m_deltaTime,4.0)/4.0	,0							,pow(m_deltaTime,3.0)/2.0,
-                                       pow(m_deltaTime,3.0)/2.0	,0						,pow(m_deltaTime,2.0)			,0,
-                                       0						,pow(m_deltaTime,3.0)/2.0	,0							,pow(m_deltaTime,2.0));
-
-
-    m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-    cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-    cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-    m_initialized = true;
-}
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinear(cv::Rect_<track_t> rect0, Point_t rectv0)
-{
-    // We don't know acceleration, so, assume it to process noise.
-    // But we can guess, the range of acceleration values thich can be achieved by tracked object.
-    // Process noise. (standard deviation of acceleration: m/s^2)
-    // shows, woh much target can accelerate.
-
-    // 8 state variables (x, y, vx, vy, width, height, vw, vh), 4 measurements (x, y, width, height)
-    m_linearKalman.init(8, 4, 0, El_t);
-    // Transition cv::Matrix
-    m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(8, 8) <<
-                                        1, 0, 0, 0, m_deltaTime, 0,           0,           0,
-                                        0, 1, 0, 0, 0,           m_deltaTime, 0,           0,
-                                        0, 0, 1, 0, 0,           0,           m_deltaTime, 0,
-                                        0, 0, 0, 1, 0,           0,           0,           m_deltaTime,
-                                        0, 0, 0, 0, 1,           0,           0,           0,
-                                        0, 0, 0, 0, 0,           1,           0,           0,
-                                        0, 0, 0, 0, 0,           0,           1,           0,
-                                        0, 0, 0, 0, 0,           0,           0,           1);
-
-    // init...
-    m_linearKalman.statePre.at<track_t>(0) = rect0.x;      // x
-    m_linearKalman.statePre.at<track_t>(1) = rect0.y;      // y
-    m_linearKalman.statePre.at<track_t>(2) = rect0.width;  // width
-    m_linearKalman.statePre.at<track_t>(3) = rect0.height; // height
-    m_linearKalman.statePre.at<track_t>(4) = rectv0.x;     // dx
-    m_linearKalman.statePre.at<track_t>(5) = rectv0.y;     // dy
-    m_linearKalman.statePre.at<track_t>(6) = 0;            // dw
-    m_linearKalman.statePre.at<track_t>(7) = 0;            // dh
-
-    m_linearKalman.statePost.at<track_t>(0) = rect0.x;
-    m_linearKalman.statePost.at<track_t>(1) = rect0.y;
-    m_linearKalman.statePost.at<track_t>(2) = rect0.width;
-    m_linearKalman.statePost.at<track_t>(3) = rect0.height;
-    m_linearKalman.statePost.at<track_t>(4) = rectv0.x;
-    m_linearKalman.statePost.at<track_t>(5) = rectv0.y;
-    m_linearKalman.statePost.at<track_t>(6) = 0;
-    m_linearKalman.statePost.at<track_t>(7) = 0;
-
-    cv::setIdentity(m_linearKalman.measurementMatrix);
-
-    track_t n1 = pow(m_deltaTime, 4.f) / 4.f;
-    track_t n2 = pow(m_deltaTime, 3.f) / 2.f;
-    track_t n3 = pow(m_deltaTime, 2.f);
-    m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(8, 8) <<
-                                       n1, 0,  0,  0,  n2, 0,  0,  0,
-                                       0,  n1, 0,  0,  0,  n2, 0,  0,
-                                       0,  0,  n1, 0,  0,  0,  n2, 0,
-                                       0,  0,  0,  n1, 0,  0,  0,  n2,
-                                       n2, 0,  0,  0,  n3, 0,  0,  0,
-                                       0,  n2, 0,  0,  0,  n3, 0,  0,
-                                       0,  0,  n2, 0,  0,  0,  n3, 0,
-                                       0,  0,  0,  n2, 0,  0,  0,  n3);
-
-    m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-    cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-    cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-    m_initialized = true;
-}
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinear3D(Rect3D rect0, cv::Point3f rectv0)
-{
-    // We don't know acceleration, so, assume it to process noise.
-    // But we can guess, the range of acceleration values thich can be achieved by tracked object.
-    // Process noise. (standard deviation of acceleration: m/s^2)
-    // shows, woh much target can accelerate.
-
-    // 14 state variables (x, y, z, width, height, length, yaw, d...), 7 measurements (x, y, z, width, height, length, yaw)
-    m_linearKalman.init(14, 7, 0, El_t);
-    // Transition cv::Matrix
-    m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(14, 14) <<
-                                        1, 0, 0, 0, 0, 0, 0, m_deltaTime, 0,           0,           0,           0,           0,           0,
-                                        0, 1, 0, 0, 0, 0, 0, 0,           m_deltaTime, 0,           0,           0,           0,           0,
-                                        0, 0, 1, 0, 0, 0, 0, 0,           0,           m_deltaTime, 0,           0,           0,           0,
-                                        0, 0, 0, 1, 0, 0, 0, 0,           0,           0,           m_deltaTime, 0,           0,           0,
-                                        0, 0, 0, 0, 1, 0, 0, 0,           0,           0,           0,           m_deltaTime, 0,           0,
-                                        0, 0, 0, 0, 0, 1, 0, 0,           0,           0,           0,           0,           m_deltaTime, 0,
-                                        0, 0, 0, 0, 0, 0, 1, 0,           0,           0,           0,           0,           0,           m_deltaTime,
-                                        0, 0, 0, 0, 0, 0, 0, 1,           0,           0,           0,           0,           0,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           1,           0,           0,           0,           0,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           0,           1,           0,           0,           0,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           0,           0,           1,           0,           0,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           0,           0,           0,           1,           0,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           0,           0,           0,           0,           1,           0,
-                                        0, 0, 0, 0, 0, 0, 0, 0,           0,           0,           0,           0,           0,           1);
-
-    // init...
-    m_linearKalman.statePre.at<track_t>(0) = rect0.center.x;      // x
-    m_linearKalman.statePre.at<track_t>(1) = rect0.center.y;      // y
-    m_linearKalman.statePre.at<track_t>(2) = rect0.center.z;      // z
-    m_linearKalman.statePre.at<track_t>(3) = rect0.size.width;  // width
-    m_linearKalman.statePre.at<track_t>(4) = rect0.size.height; // height
-    m_linearKalman.statePre.at<track_t>(5) = rect0.size.length; // length
-    m_linearKalman.statePre.at<track_t>(6) = rect0.yaw; // yaw
-    m_linearKalman.statePre.at<track_t>(7) = rectv0.x;     // dx
-    m_linearKalman.statePre.at<track_t>(8) = rectv0.y;     // dy
-    m_linearKalman.statePre.at<track_t>(9) = 0;            // dz
-    m_linearKalman.statePre.at<track_t>(10) = 0;            // dw
-    m_linearKalman.statePre.at<track_t>(11) = 0;            // dh
-    m_linearKalman.statePre.at<track_t>(12) = 0;            // dl
-    m_linearKalman.statePre.at<track_t>(13) = 0;            // dyaw
-
-    m_linearKalman.statePost.at<track_t>(0) = rect0.center.x;
-    m_linearKalman.statePost.at<track_t>(1) = rect0.center.y;
-    m_linearKalman.statePost.at<track_t>(2) = rect0.center.z;
-    m_linearKalman.statePost.at<track_t>(3) = rect0.size.width;
-    m_linearKalman.statePost.at<track_t>(4) = rect0.size.height;
-    m_linearKalman.statePost.at<track_t>(5) = rect0.size.length;
-    m_linearKalman.statePost.at<track_t>(6) = rect0.yaw;
-    m_linearKalman.statePost.at<track_t>(7) = rectv0.x;
-    m_linearKalman.statePost.at<track_t>(8) = rectv0.y;
-    m_linearKalman.statePost.at<track_t>(9) = 0;
-    m_linearKalman.statePost.at<track_t>(10) = 0;
-    m_linearKalman.statePost.at<track_t>(11) = 0;
-    m_linearKalman.statePost.at<track_t>(12) = 0;
-    m_linearKalman.statePost.at<track_t>(13) = 0;
-
-    cv::setIdentity(m_linearKalman.measurementMatrix);
-
-    track_t n1 = pow(m_deltaTime, 4.f) / 4.f;
-    track_t n2 = pow(m_deltaTime, 3.f) / 2.f;
-    track_t n3 = pow(m_deltaTime, 2.f);
-    m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(14, 14) <<
-                                       n1, 0,  0,  0,  0,  0,  0,  n2, 0,  0,  0,  0,  0,  0,
-                                       0,  n1, 0,  0,  0,  0,  0,  0,  n2, 0,  0,  0,  0,  0,
-                                       0,  0,  n1, 0,  0,  0,  0,  0,  0,  n2, 0,  0,  0,  0,
-                                       0,  0,  0,  n1, 0,  0,  0,  0,  0,  0,  n2, 0,  0,  0,
-                                       0,  0,  0,  0,  n1, 0,  0,  0,  0,  0,  0,  n2, 0,  0,
-                                       0,  0,  0,  0,  0,  n1, 0,  0,  0,  0,  0,  0,  n2, 0,
-                                       0,  0,  0,  0,  0,  0,  n1, 0,  0,  0,  0,  0,  0,  n2,
-                                       n2, 0,  0,  0,  0,  0,  0,  n3, 0,  0,  0,  0,  0,  0,
-                                       0,  n2, 0,  0,  0,  0,  0,  0,  n3, 0,  0,  0,  0,  0,
-                                       0,  0,  n2, 0,  0,  0,  0,  0,  0,  n3, 0,  0,  0,  0,
-                                       0,  0,  0,  n2, 0,  0,  0,  0,  0,  0,  n3, 0,  0,  0,
-                                       0,  0,  0,  0,  n2, 0,  0,  0,  0,  0,  0,  n3, 0,  0,
-                                       0,  0,  0,  0,  0,  n2, 0,  0,  0,  0,  0,  0,  n3, 0,
-                                       0,  0,  0,  0,  0,  0,  n2, 0,  0,  0,  0,  0,  0,  n3);
-
-    m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-    cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-    cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-    m_initialized = true;
-}
-
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinearAcceleration(cv::Point3f xy0, cv::Point3f xyv0)
-{
-	// 6 state variables, 2 measurements
-	m_linearKalman.init(6, 2, 0, El_t);
-	// Transition cv::Matrix
-	const track_t dt = m_deltaTime;
-	const track_t dt2 = 0.5f * m_deltaTime * m_deltaTime;
-	m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(6, 6) <<
-		1, 0, dt, 0,  dt2, 0,
-		0, 1, 0,  dt, 0,   dt2,
-		0, 0, 1,  0,  dt,  0,
-		0, 0, 0,  1,  0,   dt,
-	    0, 0, 0,  0,  1,   0,
-	    0, 0, 0,  0,  0,   1);
-
-	// init...
-	m_lastPointResult = xy0;
-	m_linearKalman.statePre.at<track_t>(0) = xy0.x;  // x
-	m_linearKalman.statePre.at<track_t>(1) = xy0.y;  // y
-	m_linearKalman.statePre.at<track_t>(2) = xyv0.x; // vx
-	m_linearKalman.statePre.at<track_t>(3) = xyv0.y; // vy
-	m_linearKalman.statePre.at<track_t>(4) = 0;      // ax
-	m_linearKalman.statePre.at<track_t>(5) = 0;      // ay
-
-	m_linearKalman.statePost.at<track_t>(0) = xy0.x;
-	m_linearKalman.statePost.at<track_t>(1) = xy0.y;
-	m_linearKalman.statePost.at<track_t>(2) = xyv0.x;
-	m_linearKalman.statePost.at<track_t>(3) = xyv0.y;
-	m_linearKalman.statePost.at<track_t>(4) = 0;
-	m_linearKalman.statePost.at<track_t>(5) = 0;
-
-	cv::setIdentity(m_linearKalman.measurementMatrix);
-
-	track_t n1 = pow(m_deltaTime, 4.f) / 4.f;
-	track_t n2 = pow(m_deltaTime, 3.f) / 2.f;
-	track_t n3 = pow(m_deltaTime, 2.f);
-	m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(6, 6) <<
-		n1, 0, n2, 0, n2, 0,
-		0, n1, 0, n2, 0, n2,
-		n2, 0, n3, 0, n3, 0,
-		0, n2, 0, n3, 0, n3,
-		0, 0, n2, 0, n3, 0,
-		0, 0, 0, n2, 0, n3);
-
-	m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-	cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-	cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-	m_initialized = true;
-}
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinearAcceleration(cv::Rect_<track_t> rect0, Point_t rectv0)
-{
-    // 12 state variables (x, y, vx, vy, ax, ay, width, height, vw, vh, aw, ah), 4 measurements (x, y, width, height)
-    m_linearKalman.init(12, 4, 0, El_t);
-    // Transition cv::Matrix
-    const track_t dt = m_deltaTime;
-    const track_t dt2 = 0.5f * m_deltaTime * m_deltaTime;
-    m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(12, 12) <<
-        1, 0, 0, 0, dt, 0,  0,  0,  dt2, 0,   dt2, 0,
-        0, 1, 0, 0, 0,  dt, 0,  0,  0,   dt2, 0,   dt2,
-        0, 0, 1, 0, 0,  0,  dt, 0,  0,   0,   dt2, 0,
-        0, 0, 0, 1, 0,  0,  0,  dt, 0,   0,   0,   dt2,
-        0, 0, 0, 0, 1,  0,  0,  0,  dt,  0,   0,   0,
-        0, 0, 0, 0, 0,  1,  0,  0,  0,   dt,  0,   0,
-        0, 0, 0, 0, 0,  0,  1,  0,  0,   0,   dt,  0,
-        0, 0, 0, 0, 0,  0,  0,  1,  0,   0,   0,   dt,
-        0, 0, 0, 0, 0,  0,  0,  0,  1,   0,   0,   0,
-        0, 0, 0, 0, 0,  0,  0,  0,  0,   1,   0,   0,
-        0, 0, 0, 0, 0,  0,  0,  0,  0,   0,   0,   1);
-
-    // init...
-    m_linearKalman.statePre.at<track_t>(0) = rect0.x;      // x
-    m_linearKalman.statePre.at<track_t>(1) = rect0.y;      // y
-    m_linearKalman.statePre.at<track_t>(2) = rect0.width;  // width
-    m_linearKalman.statePre.at<track_t>(3) = rect0.height; // height
-    m_linearKalman.statePre.at<track_t>(4) = rectv0.x;     // dx
-    m_linearKalman.statePre.at<track_t>(5) = rectv0.y;     // dy
-    m_linearKalman.statePre.at<track_t>(6) = 0;            // dw
-    m_linearKalman.statePre.at<track_t>(7) = 0;            // dh
-    m_linearKalman.statePre.at<track_t>(8) = 0;            // ax
-    m_linearKalman.statePre.at<track_t>(9) = 0;            // ay
-    m_linearKalman.statePre.at<track_t>(10) = 0;           // aw
-    m_linearKalman.statePre.at<track_t>(11) = 0;           // ah
-
-    m_linearKalman.statePost.at<track_t>(0) = rect0.x;
-    m_linearKalman.statePost.at<track_t>(1) = rect0.y;
-    m_linearKalman.statePost.at<track_t>(2) = rect0.width;
-    m_linearKalman.statePost.at<track_t>(3) = rect0.height;
-    m_linearKalman.statePost.at<track_t>(4) = rectv0.x;
-    m_linearKalman.statePost.at<track_t>(5) = rectv0.y;
-    m_linearKalman.statePost.at<track_t>(6) = 0;
-    m_linearKalman.statePost.at<track_t>(7) = 0;
-    m_linearKalman.statePost.at<track_t>(8) = 0;
-    m_linearKalman.statePost.at<track_t>(9) = 0;
-    m_linearKalman.statePost.at<track_t>(10) = 0;
-    m_linearKalman.statePost.at<track_t>(11) = 0;
-
-    cv::setIdentity(m_linearKalman.measurementMatrix);
-
-    track_t n1 = pow(m_deltaTime, 4.f) / 4.f;
-    track_t n2 = pow(m_deltaTime, 3.f) / 2.f;
-    track_t n3 = pow(m_deltaTime, 2.f);
-    m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(12, 12) <<
-        n1, 0, 0, 0, n2, 0, 0, 0, n2, 0, n2,
-        0, n1, 0, 0, 0, n2, 0, 0, 0, n2, 0, n2,
-        0, 0, n1, 0, 0, 0, n2, 0, 0, 0, n2, 0,
-        0, 0, 0, n1, 0, 0, 0, n2, 0, 0, 0, n2,
-        n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, n3, 0,
-        0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, n3,
-        0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0,
-        0, 0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3,
-        n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, 0, 0,
-        0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, 0,
-        0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0,
-        0, 0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3);
-
-    m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-    cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-    cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-    m_initialized = true;
-}
-//---------------------------------------------------------------------------
-void TKalmanFilter::CreateLinearAcceleration3D(Rect3D rect0, cv::Point3f rectv0)
-{
-	// 12 state variables (x, y, vx, vy, ax, ay, width, height, vw, vh, aw, ah), 4 measurements (x, y, width, height)
-	m_linearKalman.init(12, 4, 0, El_t);
-	// Transition cv::Matrix
-	const track_t dt = m_deltaTime;
-	const track_t dt2 = 0.5f * m_deltaTime * m_deltaTime;
-	m_linearKalman.transitionMatrix = (cv::Mat_<track_t>(12, 12) <<
-		1, 0, 0, 0, dt, 0,  0,  0,  dt2, 0,   dt2, 0,
-		0, 1, 0, 0, 0,  dt, 0,  0,  0,   dt2, 0,   dt2,
-		0, 0, 1, 0, 0,  0,  dt, 0,  0,   0,   dt2, 0,
-		0, 0, 0, 1, 0,  0,  0,  dt, 0,   0,   0,   dt2,
-		0, 0, 0, 0, 1,  0,  0,  0,  dt,  0,   0,   0,
-		0, 0, 0, 0, 0,  1,  0,  0,  0,   dt,  0,   0,
-		0, 0, 0, 0, 0,  0,  1,  0,  0,   0,   dt,  0,
-		0, 0, 0, 0, 0,  0,  0,  1,  0,   0,   0,   dt,
-		0, 0, 0, 0, 0,  0,  0,  0,  1,   0,   0,   0,
-		0, 0, 0, 0, 0,  0,  0,  0,  0,   1,   0,   0,
-		0, 0, 0, 0, 0,  0,  0,  0,  0,   0,   0,   1);
-
-	// init...
-    m_linearKalman.statePre.at<track_t>(0) = rect0.center.x;      // x
-    m_linearKalman.statePre.at<track_t>(1) = rect0.center.y;      // y
-    m_linearKalman.statePre.at<track_t>(2) = rect0.size.width;  // width
-    m_linearKalman.statePre.at<track_t>(3) = rect0.size.height; // height
-	m_linearKalman.statePre.at<track_t>(4) = rectv0.x;     // dx
-	m_linearKalman.statePre.at<track_t>(5) = rectv0.y;     // dy
-	m_linearKalman.statePre.at<track_t>(6) = 0;            // dw
-	m_linearKalman.statePre.at<track_t>(7) = 0;            // dh
-	m_linearKalman.statePre.at<track_t>(8) = 0;            // ax
-	m_linearKalman.statePre.at<track_t>(9) = 0;            // ay
-	m_linearKalman.statePre.at<track_t>(10) = 0;           // aw
-	m_linearKalman.statePre.at<track_t>(11) = 0;           // ah
-
-    m_linearKalman.statePost.at<track_t>(0) = rect0.center.x;
-    m_linearKalman.statePost.at<track_t>(1) = rect0.center.y;
-    m_linearKalman.statePost.at<track_t>(2) = rect0.size.width;
-    m_linearKalman.statePost.at<track_t>(3) = rect0.size.height;
-	m_linearKalman.statePost.at<track_t>(4) = rectv0.x;
-	m_linearKalman.statePost.at<track_t>(5) = rectv0.y;
-	m_linearKalman.statePost.at<track_t>(6) = 0;
-	m_linearKalman.statePost.at<track_t>(7) = 0;
-	m_linearKalman.statePost.at<track_t>(8) = 0;
-	m_linearKalman.statePost.at<track_t>(9) = 0;
-	m_linearKalman.statePost.at<track_t>(10) = 0;
-	m_linearKalman.statePost.at<track_t>(11) = 0;
-
-	cv::setIdentity(m_linearKalman.measurementMatrix);
-
-	track_t n1 = pow(m_deltaTime, 4.f) / 4.f;
-	track_t n2 = pow(m_deltaTime, 3.f) / 2.f;
-	track_t n3 = pow(m_deltaTime, 2.f);
-	m_linearKalman.processNoiseCov = (cv::Mat_<track_t>(12, 12) <<
-		n1, 0, 0, 0, n2, 0, 0, 0, n2, 0, n2,
-		0, n1, 0, 0, 0, n2, 0, 0, 0, n2, 0, n2,
-		0, 0, n1, 0, 0, 0, n2, 0, 0, 0, n2, 0,
-		0, 0, 0, n1, 0, 0, 0, n2, 0, 0, 0, n2,
-		n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, n3, 0,
-		0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, n3,
-		0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0,
-		0, 0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3,
-		n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, 0, 0,
-		0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0, 0,
-		0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3, 0,
-		0, 0, 0, n2, 0, 0, 0, n3, 0, 0, 0, n3);
-
-	m_linearKalman.processNoiseCov *= m_accelNoiseMag;
-
-	cv::setIdentity(m_linearKalman.measurementNoiseCov, cv::Scalar::all(0.1));
-
-	cv::setIdentity(m_linearKalman.errorCovPost, cv::Scalar::all(.1));
-
-	m_initialized = true;
-}
-
-//---------------------------------------------------------------------------
-cv::Point3f TKalmanFilter::GetPointPrediction()
-{
-    if (m_initialized)
-    {
-        cv::Mat prediction;
-
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-            prediction = m_linearKalman.predict();
-            break;
-        }
-
-        m_lastPointResult = cv::Point3f(prediction.at<track_t>(0), prediction.at<track_t>(1), prediction.at<track_t>(2));
-    }
-    else
-    {
-
-    }
-    return m_lastPointResult;
-}
-
-//---------------------------------------------------------------------------
-cv::Point3f TKalmanFilter::Update(cv::Point3f pt, bool dataCorrect)
-{
-    if (!m_initialized)
-    {
-        if (m_initialPoints.size() < MIN_INIT_VALS)
-        {
-            if (dataCorrect)
-            {
-                m_initialPoints.push_back(pt);
-                m_lastPointResult = pt;
-            }
-        }
-        if (m_initialPoints.size() == MIN_INIT_VALS)
-        {
-            track_t kx = 0;
-            track_t bx = 0;
-            track_t ky = 0;
-            track_t by = 0;
-            get_lin_regress_params(m_initialPoints, 0, MIN_INIT_VALS, kx, bx, ky, by);//predict p,v
-            cv::Point3f xy0(kx * (MIN_INIT_VALS - 1) + bx, ky * (MIN_INIT_VALS - 1) + by, m_lastPointResult.z);
-            cv::Point3f xyv0(kx, ky,0);
-
-            switch (m_type)
-            {
-            case tracking::KalmanLinear:
-                if (m_useAcceleration)
-					CreateLinearAcceleration(xy0, xyv0);
-				else
-					CreateLinear(xy0, xyv0);
-                break;
-            }
-            m_lastDist = 0;
-        }
-    }
-
-    if (m_initialized)
-    {
-        cv::Mat measurement(2, 1, Mat_t(1));
-        if (!dataCorrect)
-        {
-            measurement.at<track_t>(0) = m_lastPointResult.x;  //update using prediction
-            measurement.at<track_t>(1) = m_lastPointResult.y;
-        }
-        else
-        {
-            measurement.at<track_t>(0) = pt.x;  //update using measurements
-            measurement.at<track_t>(1) = pt.y;
-        }
-        // Correction
-        cv::Mat estimated;
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-        {
-            estimated = m_linearKalman.correct(measurement);
-
-            // Inertia correction
-			if (!m_useAcceleration)
-			{
-				track_t currDist = sqrtf(sqr(estimated.at<track_t>(0) - pt.x) + sqr(estimated.at<track_t>(1) - pt.y));
-				if (currDist > m_lastDist)
-				{
-					m_deltaTime = std::min(m_deltaTime + m_deltaStep, m_deltaTimeMax);
-				}
-				else
-				{
-					m_deltaTime = std::max(m_deltaTime - m_deltaStep, m_deltaTimeMin);
-				}
-				m_lastDist = currDist;
-
-				m_linearKalman.transitionMatrix.at<track_t>(0, 2) = m_deltaTime;
-				m_linearKalman.transitionMatrix.at<track_t>(1, 3) = m_deltaTime;
-			}
-            break;
-        }
-        }
-
-        m_lastPointResult.x = estimated.at<track_t>(0);   //update using measurements
-        m_lastPointResult.y = estimated.at<track_t>(1);
-    }
-    else
-    {
-        if (dataCorrect)
-        {
-            m_lastPointResult = pt;
-        }
-    }
-    return m_lastPointResult;
-}
-//---------------------------------------------------------------------------
-cv::Rect TKalmanFilter::GetRectPrediction()
-{
-    if (m_initialized)
-    {
-        cv::Mat prediction;
-
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-            prediction = m_linearKalman.predict();
-            break;
-        }
-
-        m_lastRectResult = cv::Rect_<track_t>(prediction.at<track_t>(0), prediction.at<track_t>(1), prediction.at<track_t>(2), prediction.at<track_t>(3));
-    }
-    else
-    {
-
-    }
-    return cv::Rect(static_cast<int>(m_lastRectResult.x), static_cast<int>(m_lastRectResult.y), static_cast<int>(m_lastRectResult.width), static_cast<int>(m_lastRectResult.height));
-}
-
-//---------------------------------------------------------------------------
-cv::Rect TKalmanFilter::Update(cv::Rect rect, bool dataCorrect)
-{
-    if (!m_initialized)
-    {
-        if (m_initialRects.size() < MIN_INIT_VALS)
-        {
-            if (dataCorrect)
-            {
-                m_initialRects.push_back(rect);
-                m_lastRectResult.x = static_cast<track_t>(rect.x);
-                m_lastRectResult.y = static_cast<track_t>(rect.y);
-                m_lastRectResult.width = static_cast<track_t>(rect.width);
-                m_lastRectResult.height = static_cast<track_t>(rect.height);
-            }
-        }
-        if (m_initialRects.size() == MIN_INIT_VALS)
-        {
-            std::vector<Point_t> initialPoints;
-            Point_t averageSize(0, 0);
-            for (const auto& r : m_initialRects)
-            {
-                initialPoints.emplace_back(static_cast<track_t>(r.x), static_cast<track_t>(r.y));
-                averageSize.x += r.width;
-                averageSize.y += r.height;
-            }
-            averageSize.x /= MIN_INIT_VALS;
-            averageSize.y /= MIN_INIT_VALS;
-
-            track_t kx = 0;
-            track_t bx = 0;
-            track_t ky = 0;
-            track_t by = 0;
-            get_lin_regress_params(initialPoints, 0, MIN_INIT_VALS, kx, bx, ky, by);
-            cv::Rect_<track_t> rect0(kx * (MIN_INIT_VALS - 1) + bx, ky * (MIN_INIT_VALS - 1) + by, averageSize.x, averageSize.y);
-            Point_t rectv0(kx, ky);
-
-            switch (m_type)
-            {
-            case tracking::KalmanLinear:
-                if (m_useAcceleration)
-                    CreateLinearAcceleration(rect0, rectv0);
-                else
-                    CreateLinear(rect0, rectv0);
-                break;
-            }
-        }
-    }
-
-    if (m_initialized)
-    {
-        cv::Mat measurement(4, 1, Mat_t(1));
-        if (!dataCorrect)
-        {
-            measurement.at<track_t>(0) = m_lastRectResult.x;  // update using prediction
-            measurement.at<track_t>(1) = m_lastRectResult.y;
-            measurement.at<track_t>(2) = m_lastRectResult.width;
-            measurement.at<track_t>(3) = m_lastRectResult.height;
-        }
-        else
-        {
-            measurement.at<track_t>(0) = static_cast<track_t>(rect.x);  // update using measurements
-            measurement.at<track_t>(1) = static_cast<track_t>(rect.y);
-            measurement.at<track_t>(2) = static_cast<track_t>(rect.width);
-            measurement.at<track_t>(3) = static_cast<track_t>(rect.height);
-        }
-        // Correction
-        cv::Mat estimated;
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-        {
-            estimated = m_linearKalman.correct(measurement);
-
-            m_lastRectResult.x = estimated.at<track_t>(0);   //update using measurements
-            m_lastRectResult.y = estimated.at<track_t>(1);
-            m_lastRectResult.width = estimated.at<track_t>(2);
-            m_lastRectResult.height = estimated.at<track_t>(3);
-
-            // Inertia correction
-            if (!m_useAcceleration)
-            {
-                track_t currDist = sqrtf(sqr(estimated.at<track_t>(0) - rect.x) + sqr(estimated.at<track_t>(1) - rect.y) + sqr(estimated.at<track_t>(2) - rect.width) + sqr(estimated.at<track_t>(3) - rect.height));
-                if (currDist > m_lastDist)
-                {
-                    m_deltaTime = std::min(m_deltaTime + m_deltaStep, m_deltaTimeMax);
-                }
-                else
-                {
-                    m_deltaTime = std::max(m_deltaTime - m_deltaStep, m_deltaTimeMin);
-                }
-                m_lastDist = currDist;
-
-                m_linearKalman.transitionMatrix.at<track_t>(0, 4) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(1, 5) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(2, 6) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(3, 7) = m_deltaTime;
-            }
-            break;
-        }
-        }
-    }
-    else
-    {
-        if (dataCorrect)
-        {
-            m_lastRectResult.x = static_cast<track_t>(rect.x);
-            m_lastRectResult.y = static_cast<track_t>(rect.y);
-            m_lastRectResult.width = static_cast<track_t>(rect.width);
-            m_lastRectResult.height = static_cast<track_t>(rect.height);
-        }
-    }
-    return cv::Rect(static_cast<int>(m_lastRectResult.x), static_cast<int>(m_lastRectResult.y), static_cast<int>(m_lastRectResult.width), static_cast<int>(m_lastRectResult.height));
-}
-//---------------------------------------------------------------------------
-Rect3D TKalmanFilter::GetRect3DPrediction()
-{
-    if (m_initialized)
-    {
-        cv::Mat prediction;
-
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-            prediction = m_linearKalman.predict();
-            break;
-        }
-
-        m_lastRect3DResult = Rect3D(cv::Point3f(prediction.at<track_t>(0), prediction.at<track_t>(1), prediction.at<track_t>(2)), Size3D(prediction.at<track_t>(3), prediction.at<track_t>(4), prediction.at<track_t>(5)), prediction.at<track_t>(6));
-    }
-    else
-    {
-
-    }
-    return m_lastRect3DResult;
-}
-
-//---------------------------------------------------------------------------
-Rect3D TKalmanFilter::Update(Rect3D rect, bool dataCorrect)
-{
-    if (!m_initialized)
-    {
-        if (m_initialRect3Ds.size() < MIN_INIT_VALS)
-        {
-            if (dataCorrect)
-            {
-                m_initialRect3Ds.push_back(rect);
-                m_lastRect3DResult.center.x = static_cast<track_t>(rect.center.x);
-                m_lastRect3DResult.center.y = static_cast<track_t>(rect.center.y);
-                m_lastRect3DResult.center.z = static_cast<track_t>(rect.center.z);
-                m_lastRect3DResult.size.width = static_cast<track_t>(rect.size.width);
-                m_lastRect3DResult.size.height = static_cast<track_t>(rect.size.height);
-                m_lastRect3DResult.size.length = static_cast<track_t>(rect.size.length);
-                m_lastRect3DResult.yaw = static_cast<track_t>(rect.yaw);
-            }
-        }
-        if (m_initialRect3Ds.size() == MIN_INIT_VALS)
-        {
-            std::vector<Point_t> initialPoints;
-            cv::Point3f averageSize(0, 0, 0);
-            float averageZ = 0;
-            float averageYaw = 0;
-            for (const auto& r : m_initialRect3Ds)
-            {
-                initialPoints.emplace_back(static_cast<track_t>(r.center.x), static_cast<track_t>(r.center.y));
-                averageZ += r.center.z;
-                averageSize.x += r.size.width;
-                averageSize.y += r.size.height;
-                averageSize.z += r.size.length;
-                averageYaw += r.yaw;
-            }
-            averageZ /= MIN_INIT_VALS;
-            averageSize.x /= MIN_INIT_VALS;
-            averageSize.y /= MIN_INIT_VALS;
-            averageSize.z /= MIN_INIT_VALS;
-            averageYaw /= MIN_INIT_VALS;
-
-            track_t kx = 0;
-            track_t bx = 0;
-            track_t ky = 0;
-            track_t by = 0;
-            get_lin_regress_params(initialPoints, 0, MIN_INIT_VALS, kx, bx, ky, by);
-            Rect3D rect0(cv::Point3f(kx * (MIN_INIT_VALS - 1) + bx, ky * (MIN_INIT_VALS - 1) + by, averageZ), Size3D(averageSize.x, averageSize.y,averageSize.z), averageYaw);
-            cv::Point3f rectv0(kx, ky, 0);
-
-            switch (m_type)
-            {
-            case tracking::KalmanLinear:
-				if (m_useAcceleration)
-                    CreateLinearAcceleration3D(rect0, rectv0);
-				else
-                    CreateLinear3D(rect0, rectv0);
-                break;
-            }
-        }
-    }
-
-    if (m_initialized)
-    {
-        cv::Mat measurement(7, 1, Mat_t(1));
-        if (!dataCorrect)
-        {
-            measurement.at<track_t>(0) = m_lastRect3DResult.center.x;  // update using prediction
-            measurement.at<track_t>(1) = m_lastRect3DResult.center.y;
-            measurement.at<track_t>(2) = m_lastRect3DResult.center.z;
-            measurement.at<track_t>(3) = m_lastRect3DResult.size.width;
-            measurement.at<track_t>(4) = m_lastRect3DResult.size.height;
-            measurement.at<track_t>(5) = m_lastRect3DResult.size.length;
-            measurement.at<track_t>(6) = m_lastRect3DResult.yaw;
-        }
-        else
-        {
-            measurement.at<track_t>(0) = static_cast<track_t>(rect.center.x);  // update using measurements
-            measurement.at<track_t>(1) = static_cast<track_t>(rect.center.y);
-            measurement.at<track_t>(2) = static_cast<track_t>(rect.center.z);
-            measurement.at<track_t>(3) = static_cast<track_t>(rect.size.width);
-            measurement.at<track_t>(4) = static_cast<track_t>(rect.size.height);
-            measurement.at<track_t>(5) = static_cast<track_t>(rect.size.length);
-            measurement.at<track_t>(6) = static_cast<track_t>(rect.yaw);
-        }
-        // Correction
-        cv::Mat estimated;
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-        {
-            estimated = m_linearKalman.correct(measurement);
-
-            m_lastRect3DResult.center.x = estimated.at<track_t>(0);   //update using measurements
-            m_lastRect3DResult.center.y = estimated.at<track_t>(1);
-            m_lastRect3DResult.center.z = estimated.at<track_t>(2);
-            m_lastRect3DResult.size.width = estimated.at<track_t>(3);
-            m_lastRect3DResult.size.height = estimated.at<track_t>(4);
-            m_lastRect3DResult.size.length = estimated.at<track_t>(5);
-            m_lastRect3DResult.yaw = estimated.at<track_t>(6);
-
-            // Inertia correction
-			if (!m_useAcceleration)
-			{
-                track_t currDist = sqrtf(sqr(estimated.at<track_t>(0) - rect.center.x) + sqr(estimated.at<track_t>(1) - rect.center.y)+ sqr(estimated.at<track_t>(2) - rect.center.z) + sqr(estimated.at<track_t>(3) - rect.size.width) + sqr(estimated.at<track_t>(4) - rect.size.height) + sqr(estimated.at<track_t>(5) - rect.size.length) + sqr(estimated.at<track_t>(6) - rect.yaw));
-				if (currDist > m_lastDist)
-				{
-					m_deltaTime = std::min(m_deltaTime + m_deltaStep, m_deltaTimeMax);
-				}
-				else
-				{
-					m_deltaTime = std::max(m_deltaTime - m_deltaStep, m_deltaTimeMin);
-				}
-				m_lastDist = currDist;
-
-                m_linearKalman.transitionMatrix.at<track_t>(0, 7) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(1, 8) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(2, 9) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(3, 10) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(4, 11) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(5, 12) = m_deltaTime;
-                m_linearKalman.transitionMatrix.at<track_t>(6, 13) = m_deltaTime;
-			}
-            break;
-        }
-        }
-    }
-    else
-    {
-        if (dataCorrect)
-        {
-            m_lastRect3DResult.center.x = static_cast<track_t>(rect.center.x);
-            m_lastRect3DResult.center.y = static_cast<track_t>(rect.center.y);
-            m_lastRect3DResult.center.z = static_cast<track_t>(rect.center.z);
-            m_lastRect3DResult.size.width = static_cast<track_t>(rect.size.width);
-            m_lastRect3DResult.size.height = static_cast<track_t>(rect.size.height);
-            m_lastRect3DResult.size.length = static_cast<track_t>(rect.size.length);
-            m_lastRect3DResult.yaw = static_cast<track_t>(rect.yaw);
-        }
-    }
-    return m_lastRect3DResult;
-}
-
-//---------------------------------------------------------------------------
-cv::Vec<track_t, 2> TKalmanFilter::GetVelocity() const
-{
-    cv::Vec<track_t, 2> res(0, 0);
-    if (m_initialized)
-    {
-        switch (m_type)
-        {
-        case tracking::KalmanLinear:
-        {
-            if (m_linearKalman.statePre.rows > 3)
-            {
-                int indX = 2;
-                int indY = 3;
-                if (m_linearKalman.statePre.rows > 5)
-                {
-                    indX = 4;
-                    indY = 5;
-                    if (m_linearKalman.statePre.rows > 8)
-                    {
-                        indX = 7;
-                        indY = 8;
-                    }
-                    res[0] = m_linearKalman.statePre.at<track_t>(indX);
-                    res[1] = m_linearKalman.statePre.at<track_t>(indY);
-                }
-            }
-            break;
-        }
-
-        }
-    }
-    return res;
-}

+ 0 - 120
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Kalman.h

@@ -1,120 +0,0 @@
-#pragma once
-#include "defines.h"
-#include <memory>
-#include <deque>
-
-#include <opencv2/opencv.hpp>
-
-///
-/// \brief The TKalmanFilter class
-/// http://www.morethantechnical.com/2011/06/17/simple-kalman-filter-for-tracking-using-opencv-2-2-w-code/
-///
-class TKalmanFilter
-{
-public:
-    TKalmanFilter(tracking::KalmanType type, bool useAcceleration, track_t deltaTime, track_t accelNoiseMag);
-    ~TKalmanFilter() = default;
-
-    cv::Point3f GetPointPrediction();
-    cv::Point3f Update(cv::Point3f pt, bool dataCorrect);
-
-    cv::Rect GetRectPrediction();
-    cv::Rect Update(cv::Rect rect, bool dataCorrect);
-
-    Rect3D GetRect3DPrediction();
-    Rect3D Update(Rect3D rect, bool dataCorrect);
-
-	cv::Vec<track_t, 2> GetVelocity() const;
-
-private:
-    tracking::KalmanType m_type = tracking::KalmanLinear;
-    cv::KalmanFilter m_linearKalman;
-    static const size_t MIN_INIT_VALS = 4;
-    std::deque<cv::Point3f> m_initialPoints;
-    cv::Point3f m_lastPointResult;
-
-    std::deque<cv::Rect> m_initialRects;
-    cv::Rect_<track_t> m_lastRectResult;
-    cv::Rect_<track_t> m_lastRect;
-
-    std::deque<Rect3D> m_initialRect3Ds;
-    Rect3D m_lastRect3DResult;
-    cv::Rect_<track_t> m_lastRect3D;
-
-    bool m_initialized = false;
-    track_t m_deltaTime = 0.2f;
-    track_t m_deltaTimeMin = 0.2f;
-    track_t m_deltaTimeMax = 2 * 0.2f;
-    track_t m_lastDist = 0;
-    track_t m_deltaStep = 0;
-    static const int m_deltaStepsCount = 20;
-    track_t m_accelNoiseMag = 0.5f;
-	bool m_useAcceleration = false; // If set true then will be used motion model x(t) = x0 + v0 * t + a * t^2 / 2
-
-	// Constant velocity model
-    void CreateLinear(cv::Point3f xy0, cv::Point3f xyv0);
-    void CreateLinear(cv::Rect_<track_t> rect0, Point_t rectv0);
-    void CreateLinear3D(Rect3D rect0, cv::Point3f rectv0);
-
-	// Constant acceleration model
-	// https://www.mathworks.com/help/driving/ug/linear-kalman-filters.html
-    void CreateLinearAcceleration(cv::Point3f xy0, cv::Point3f xyv0);
-    void CreateLinearAcceleration(cv::Rect_<track_t> rect0, Point_t rectv0);
-    void CreateLinearAcceleration3D(Rect3D rect0, cv::Point3f rectv0);
-};
-
-//---------------------------------------------------------------------------
-///
-/// \brief sqr
-/// \param val
-/// \return
-///
-template<class T> inline
-T sqr(T val)
-{
-    return val * val;
-}
-
-///
-/// \brief get_lin_regress_params
-/// \param in_data
-/// \param start_pos
-/// \param in_data_size
-/// \param kx
-/// \param bx
-/// \param ky
-/// \param by
-///
-template<typename T, typename CONT>
-void get_lin_regress_params(
-        const CONT& in_data,
-        size_t start_pos,
-        size_t in_data_size,
-        T& kx, T& bx, T& ky, T& by)
-{
-    T m1(0.), m2(0.);
-    T m3_x(0.), m4_x(0.);
-    T m3_y(0.), m4_y(0.);
-
-    const T el_count = static_cast<T>(in_data_size - start_pos);
-    for (size_t i = start_pos; i < in_data_size; ++i)
-    {
-        m1 += i;
-        m2 += sqr(i);
-
-        m3_x += in_data[i].x;
-        m4_x += i * in_data[i].x;
-
-        m3_y += in_data[i].y;
-        m4_y += i * in_data[i].y;
-    }
-    T det_1 = 1 / (el_count * m2 - sqr(m1));
-
-    m1 *= -1;
-
-    kx = det_1 * (m1 * m3_x + el_count * m4_x);
-    bx = det_1 * (m2 * m3_x + m1 * m4_x);
-
-    ky = det_1 * (m1 * m3_y + el_count * m4_y);
-    by = det_1 * (m2 * m3_y + m1 * m4_y);
-}

+ 0 - 65
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/ShortPathCalculator.h

@@ -1,65 +0,0 @@
-#pragma once
-#include "defines.h"
-#include "HungarianAlg.h"
-
-///
-/// \brief The SPSettings struct
-///
-struct SPSettings
-{
-    track_t m_distThres = 0.8f;
-    size_t m_maxHistory = 10;
-};
-
-///
-/// \brief The ShortPathCalculator class
-///
-class ShortPathCalculator
-{
-public:
-    ShortPathCalculator(const SPSettings& settings)
-        : m_settings(settings)
-    {
-    }
-    virtual ~ShortPathCalculator()
-    {
-    }
-
-    virtual void Solve(const distMatrix_t& costMatrix, size_t N, size_t M, assignments_t& assignment, track_t maxCost) = 0;
-protected:
-    SPSettings m_settings;
-};
-
-///
-/// \brief The SPHungrian class
-///
-class SPHungrian : public ShortPathCalculator
-{
-public:
-    SPHungrian(const SPSettings& settings)
-        : ShortPathCalculator(settings)
-    {
-    }
-
-    void Solve(const distMatrix_t& costMatrix, size_t N, size_t M, assignments_t& assignment, track_t /*maxCost*/)
-    {
-        m_solver.Solve(costMatrix, N, M, assignment, AssignmentProblemSolver::optimal);
-    }
-
-private:
-    AssignmentProblemSolver m_solver;
-};
-
-///
-/// \brief The SPBipart class
-///
-//class SPBipart : public ShortPathCalculator
-//{
-//public:
-//    SPBipart(const SPSettings& settings)
-//        : ShortPathCalculator(settings)
-//    {
-//    }
-
-//    void Solve(const distMatrix_t& costMatrix, size_t N, size_t M, assignments_t& assignment, track_t maxCost);
-//};

+ 0 - 159
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/Tracking.hpp

@@ -1,159 +0,0 @@
-#pragma once
-#include "objectarray.pb.h"
-#include "Ctracker.h"
-#include <iostream>
-#include <vector>
-#define FPS 8 
-#define MIN_DETECTEDFRAMES 5
-///
-/// \brief 跟踪器参数设置
-///
-bool InitTracker(CTracker& tracker)
-{
-    TrackerSettings settings;
-    settings.SetDistance(tracking::DistRect3Ds); // 代价矩阵:两中心点之间的距离
-    settings.m_kalmanType = tracking::KalmanLinear; // 滤波器类型:卡尔曼线性滤波器
-    settings.m_filterGoal = tracking::FilterRect3D; // 滤波对象:Rect3D
-    settings.m_lostTrackType = tracking::TrackNone; // 丢失了的目标,不再追踪
-    settings.m_matchType = tracking::MatchHungrian; // 匹配算法:匈牙利
-    settings.m_dt = 1.f; // 卡尔曼滤波器的时间步长
-    settings.m_accelNoiseMag = 0.5f; // 卡尔曼的噪声放大器
-    settings.m_distThres = 30.f; // 匹配算法中的距离阈值
-    settings.m_minAreaRadiusPix = -1.f;//frame.rows / 20.f; // 目标的最小面积半径(像素)
-    settings.m_maximumAllowedSkippedFrames = 3; // 被跟踪目标允许未匹配到的最大次数,当超过这一数值,该目标的跟踪器将被移除
-    settings.m_maxTraceLength = 5; // 最大跟踪长度,即历史轨迹保留的最大长度
-
-    tracker.setSettings(settings);
-
-    return true;
-}
-
-///
-/// \brief 对融合后的目标进行跟踪,并以跟踪后的最优估计值更新融合目标的状态信息
-///
-iv::lidar::objectarray Tracking(iv::lidar::objectarray& lidarobjvec, CTracker& tracker)
-{
-#ifdef DEBUG_SHOW
-    std::cout<<"-------------------------------------------------"<<std::endl;
-#endif
-    iv::lidar::objectarray trackedobjvec;
-    trackedobjvec.clear_obj();
-    trackedobjvec.set_timestamp(lidarobjvec.timestamp());
-    regions_t regions;
-    cv::Point3f pointXYZ;
-    for(int i = 0;i<lidarobjvec.obj_size();i++)
-    {
-        pointXYZ.x = lidarobjvec.obj(i).centroid().x();
-        pointXYZ.y = lidarobjvec.obj(i).centroid().y();
-        pointXYZ.z = lidarobjvec.obj(i).centroid().z();
-        Rect3D rect;
-        rect.center = pointXYZ;
-        rect.size.width = lidarobjvec.obj(i).dimensions().x();//w
-        rect.size.height = lidarobjvec.obj(i).dimensions().y();//l
-        rect.size.length = lidarobjvec.obj(i).dimensions().z();//h
-        rect.yaw = lidarobjvec.obj(i).tyaw();
-        CRegion region = CRegion(rect,lidarobjvec.obj(i).mntype(),lidarobjvec.obj(i).score());
-        regions.push_back(region);
-#ifdef DEBUG_SHOW
-        std::cout<<"old id:"<<i<<std::endl;
-        std::cout<<"old type:"<<lidarobjvec.obj(i).mntype()<<std::endl;
-        std::cout<<"old x,y,z,w,h,l,yaw:"<<rect.center.x<<","<<rect.center.y<<","<<rect.center.z<<"  "<<rect.size.width<<","<<rect.size.height<<","<<rect.size.length<<"  "<<rect.yaw<<std::endl;
-#endif
-
-    }
-    tracker.Update(regions, cv::UMat(), 30);
-    auto tracks = tracker.GetTracks();
-#ifdef DEBUG_SHOW
-    std::cout<<"detect size, tracker size:"<<regions.size()<<","<<tracks.size()<<std::endl;
-#endif
-    for (size_t i = 0; i < tracks.size(); i++)
-    {
-        const auto& track = tracks[i];
-        if(track.m_detectedFrames < MIN_DETECTEDFRAMES) continue;
-        int obj_id = track.m_regionID;
-        iv::lidar::lidarobject lidar_object;
-        if(obj_id != -1) // 当前融合目标成功匹配上跟踪器中的已有目标,则根据跟踪所得的最优估计值更新融合目标状态
-        {
-            lidar_object = lidarobjvec.obj(obj_id);
-            lidar_object.set_id(track.m_ID);
-
-            iv::lidar::PointXYZ centroid;
-            iv::lidar::PointXYZ *centerpoint;
-            centroid.set_x(track.m_rect.center.x);
-            centroid.set_y(track.m_rect.center.y);
-            centroid.set_z(track.m_rect.center.z);
-            centerpoint=lidar_object.mutable_centroid();
-            centerpoint->CopyFrom(centroid);
-/* not update */
-//            iv::lidar::Dimension dimension;
-//            iv::lidar::Dimension *obj_dimension;
-//            dimension.set_x(track.m_rect.size.width);
-//            dimension.set_y(track.m_rect.size.height);
-//            dimension.set_z(track.m_rect.size.length);
-//            obj_dimension=lidar_object.mutable_dimensions();
-//            obj_dimension->CopyFrom(dimension);
-
-//            lidar_object.set_tyaw(track.m_rect.yaw);
-
-            iv::lidar::VelXY vel_relative;
-            iv::lidar::VelXY *velrelative;
-            vel_relative.set_x(track.m_velocity[0]*FPS);
-            vel_relative.set_y(track.m_velocity[1]*FPS);
-            velrelative = lidar_object.mutable_vel_relative();
-            velrelative->CopyFrom(vel_relative);
-
-            iv::lidar::lidarobject *pe = trackedobjvec.add_obj();
-            pe->CopyFrom(lidar_object);
-        }else{ // 当前时刻没有融合目标与跟踪器中的已有目标匹配上,则将跟踪器中已有目标的预测结果增加到融合结果中            
-            lidar_object.set_id(track.m_ID);
-            lidar_object.set_mntype(track.m_region.m_type);
-            lidar_object.set_score(track.m_region.m_confidence);
-
-            iv::lidar::PointXYZ centroid;
-            iv::lidar::PointXYZ *centerpoint;
-            centroid.set_x(track.m_rect.center.x);
-            centroid.set_y(track.m_rect.center.y);
-            centroid.set_z(track.m_rect.center.z);
-            centerpoint=lidar_object.mutable_centroid();
-            centerpoint->CopyFrom(centroid);
-
-            iv::lidar::Dimension dimension;
-            iv::lidar::Dimension *obj_dimension;
-            dimension.set_x(track.m_region.m_rect.size.width);
-            dimension.set_y(track.m_region.m_rect.size.height);
-            dimension.set_z(track.m_region.m_rect.size.length);
-            obj_dimension=lidar_object.mutable_dimensions();
-            obj_dimension->CopyFrom(dimension);
-
-            lidar_object.set_tyaw(track.m_region.m_rect.yaw);
-
-            iv::lidar::VelXY vel_relative;
-            iv::lidar::VelXY *velrelative;
-            vel_relative.set_x(track.m_velocity[0]*FPS);
-            vel_relative.set_y(track.m_velocity[1]*FPS);
-            velrelative = lidar_object.mutable_vel_relative();
-            velrelative->CopyFrom(vel_relative);
-
-            iv::lidar::lidarobject *pe = trackedobjvec.add_obj();
-            pe->CopyFrom(lidar_object);
-        }
-#ifdef DEBUG_SHOW
-        std::cout<<"id:"<<lidar_object.id()<<"  "<<obj_id<<std::endl;
-        std::cout<<"type:"<<lidar_object.mntype()<<std::endl;
-        std::cout<<"update x,y,z,w,h,l,yaw,vx,vy:"<<lidar_object.centroid().x()<<","<<lidar_object.centroid().y()<<","<<lidar_object.centroid().z()<<"  "<<lidar_object.dimensions().x()<<","<<lidar_object.dimensions().y()<<","<<lidar_object.dimensions().z()<<"  "<<lidar_object.tyaw()<<"  "<<lidar_object.vel_relative().x()<<","<<lidar_object.vel_relative().y()<<std::endl;
-#endif
-    }
-#ifdef DEBUG_SHOW
-    std::cout<<"trackedobjvec size:"<<trackedobjvec.obj_size()<<std::endl;
-#endif
-    //    for (size_t i = 0; i < trackedobjvec.obj_size(); i++)
-    //    {
-    //        iv::lidar::lidarobject lidar_object;
-    //        lidar_object = trackedobjvec.obj(i);
-    //        std::cout<<"historical size:"<<lidar_object.point_historical_size()<<std::endl;
-    //    }
-    regions.clear();
-    tracks.clear();
-    return trackedobjvec;
-}
-

+ 0 - 147
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/defines.h

@@ -1,147 +0,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-#include <map>
-#include <opencv2/opencv.hpp>
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-typedef float track_t;
-typedef cv::Point_<track_t> Point_t;
-#define El_t CV_32F
-#define Mat_t CV_32FC
-
-typedef std::vector<int> assignments_t;
-typedef std::vector<track_t> distMatrix_t;
-typedef struct Size3D{
-    Size3D()
-    {
-    }
-    Size3D(float w, float h, float l)
-        :
-          width(w),
-          height(h),
-          length(l)
-    {
-    }
-    float length;
-    float width;
-    float height;
-} Size3D;
-typedef struct Rect3D{
-    Rect3D()
-    {
-    }
-    Rect3D(cv::Point3f c, Size3D s, float y)
-        :
-          center(c),
-          size(s),
-          yaw(y)
-    {
-    }
-    cv::Point3f center;
-    Size3D size;
-    float yaw;
-} Rect3D;
-///
-/// \brief config_t
-///
-typedef std::multimap<std::string, std::string> config_t;
-
-///
-/// \brief The CRegion class
-///
-class CRegion
-{
-public:
-    CRegion()
-        : m_type(-1), m_type_name(""), m_confidence(-1)
-    {
-    }
-
-    CRegion(const Rect3D& rect, const int& type, float confidence)
-        : m_rect(rect), m_type(type), m_confidence(confidence)
-    {
-        RBRect();
-    }
-
-    CRegion(const Rect3D& rect, const std::string& type, float confidence)
-        : m_rect(rect), m_type_name(type), m_confidence(confidence)
-    {
-        RBRect();
-    }
-    Rect3D m_rect;
-    cv::RotatedRect m_rrect;
-    cv::Rect m_brect;
-    int m_type = -1;
-    std::string m_type_name = "";
-    float m_confidence = -1;
-private:
-    ///
-    /// \brief B2RRect
-    /// \return
-    ///
-    cv::RotatedRect RBRect()
-    {
-        m_rrect = cv::RotatedRect(Point_t(m_rect.center.x,m_rect.center.y), cv::Size(m_rect.size.width,m_rect.size.height), 0);
-        m_brect = cv::Rect(m_rect.center.x-m_rect.size.width/2,m_rect.center.y-m_rect.size.height/2, m_rect.size.width,m_rect.size.height);
-        return m_rrect;
-    }
-};
-
-typedef std::vector<CRegion> regions_t;
-
-///
-///
-///
-namespace tracking
-{
-
-///
-/// \brief The DistType enum
-///
-enum DistType
-{
-    DistCenters,   // Euclidean distance between centers, pixels
-    DistRects,     // Euclidean distance between bounding rectangles, pixels
-    DistRect3Ds,     // Euclidean distance between bounding rectangles, pixels
-	DistsCount
-};
-
-///
-/// \brief The FilterGoal enum
-///
-enum FilterGoal
-{
-    FilterCenter, // x,y
-    FilterRect,   // x,y,w,h
-    FilterRect3D  // x,y,z,w,h,l,yaw
-};
-
-///
-/// \brief The KalmanType enum
-///
-enum KalmanType
-{
-    KalmanLinear
-};
-
-///
-/// \brief The MatchType enum
-///
-enum MatchType
-{
-    MatchHungrian
-};
-
-///
-/// \brief The LostTrackType enum
-///
-enum LostTrackType
-{
-    TrackNone
-};
-}

+ 0 - 492
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/track.cpp

@@ -1,492 +0,0 @@
-#include "track.h"
-
-//#include "dat/dat_tracker.hpp"
-
-///
-/// \brief CTrack
-/// \param pt
-/// \param region
-/// \param deltaTime
-/// \param accelNoiseMag
-/// \param trackID
-/// \param filterObjectSize
-/// \param externalTrackerForLost
-///
-CTrack::CTrack(const CRegion& region,
-        tracking::KalmanType kalmanType,
-        track_t deltaTime,
-        track_t accelNoiseMag,
-        bool useAcceleration,
-        size_t trackID,
-        size_t regionID,
-        tracking::FilterGoal filterGoal,
-        tracking::LostTrackType externalTrackerForLost
-        )
-    :
-      m_trackID(trackID),
-      m_regionID(regionID),
-      m_skippedFrames(0),
-      m_lastRegion(region),
-      m_predictionPoint(region.m_rect.center),
-      m_predictionRect(region.m_rrect),
-      m_predictionRect3D(region.m_rect),
-      m_kalman(kalmanType, useAcceleration, deltaTime, accelNoiseMag),
-      m_filterGoal(filterGoal),
-      m_outOfTheFrame(false),
-      m_externalTrackerForLost(externalTrackerForLost)
-{
-    if (filterGoal == tracking::FilterRect)
-        m_kalman.Update(region.m_brect, true);
-    else if(filterGoal == tracking::FilterRect3D)
-        m_kalman.Update(region.m_rect, true);
-    else
-        m_kalman.Update(m_predictionPoint, true);
-
-    m_trace.push_back(m_predictionPoint, m_predictionPoint);
-}
-
-///
-/// \brief CTrack::CalcDistCenter
-/// \param reg
-/// \return
-///
-track_t CTrack::CalcDistCenter(const CRegion& reg) const
-{
-    cv::Point3f diff = m_predictionPoint - reg.m_rect.center;
-    return sqrtf(sqr(diff.x) + sqr(diff.y));
-}
-///
-/// \brief CTrack::CalcDistRect
-/// \param reg
-/// \return
-///
-track_t CTrack::CalcDistRect(const CRegion& reg) const
-{
-    std::array<track_t, 5> diff;
-    diff[0] = reg.m_rrect.center.x - m_lastRegion.m_rrect.center.x;
-    diff[1] = reg.m_rrect.center.y - m_lastRegion.m_rrect.center.y;
-    diff[2] = static_cast<track_t>(m_lastRegion.m_rrect.size.width - reg.m_rrect.size.width);
-    diff[3] = static_cast<track_t>(m_lastRegion.m_rrect.size.height - reg.m_rrect.size.height);
-    diff[4] = static_cast<track_t>(m_lastRegion.m_rrect.angle - reg.m_rrect.angle);
-
-    track_t dist = 0;
-    for (size_t i = 0; i < diff.size(); ++i)
-    {
-        dist += sqr(diff[i]);
-    }
-    return sqrtf(dist);
-}
-///
-/// \brief CTrack::CalcDistRect3D
-/// \param reg
-/// \return
-///
-track_t CTrack::CalcDistRect3D(const CRegion& reg) const
-{
-    std::array<track_t, 7> diff;
-    diff[0] = reg.m_rect.center.x - m_lastRegion.m_rect.center.x;
-    diff[1] = reg.m_rect.center.y - m_lastRegion.m_rect.center.y;
-    diff[2] = 0;//reg.m_rect.center.z - m_lastRegion.m_rect.center.z;
-    diff[3] = static_cast<track_t>(m_lastRegion.m_rect.size.width - reg.m_rect.size.width);
-    diff[4] = static_cast<track_t>(m_lastRegion.m_rect.size.height - reg.m_rect.size.height);
-    diff[5] = static_cast<track_t>(m_lastRegion.m_rect.size.length - reg.m_rect.size.length);
-    diff[6] = 0;//static_cast<track_t>(m_lastRegion.m_rect.yaw - reg.m_rect.yaw);
-
-    track_t dist = 0;
-    for (size_t i = 0; i < diff.size(); ++i)
-    {
-        dist += sqr(diff[i]);
-    }
-    return sqrtf(dist);
-}
-
-///
-/// \brief CTrack::Update
-/// \*param region
-/// \param dataCorrect
-/// \param max_trace_length
-/// \param prevFrame
-/// \param currFrame
-/// \param trajLen
-///
-void CTrack::Update(
-        const CRegion& region,
-        bool dataCorrect,
-        size_t max_trace_length,
-        cv::UMat prevFrame,
-        cv::UMat currFrame,
-        int trajLen
-        )
-{
-    if (m_filterGoal == tracking::FilterRect) // Kalman filter for object coordinates and size
-        RectUpdate(region, dataCorrect, prevFrame, currFrame);
-    if (m_filterGoal == tracking::FilterRect3D) // Kalman filter for object coordinates and size
-        Rect3DUpdate(region, dataCorrect, prevFrame, currFrame);
-    else // Kalman filter only for object center
-        PointUpdate(region.m_rect.center, region.m_rrect.size, dataCorrect, currFrame.size());
-
-    if (dataCorrect)
-    {
-        //std::cout << m_lastRegion.m_brect << " - " << region.m_brect << std::endl;
-
-        m_lastRegion = region;
-        m_trace.push_back(m_predictionPoint, region.m_rect.center);
-
-        CheckStatic(trajLen, currFrame, region);
-    }
-    else
-    {
-        m_trace.push_back(m_predictionPoint);
-    }
-
-    if (m_trace.size() > max_trace_length)
-        m_trace.pop_front(m_trace.size() - max_trace_length);
-}
-
-///
-/// \brief CTrack::IsStatic
-/// \return
-///
-bool CTrack::IsStatic() const
-{
-    return m_isStatic;
-}
-
-///
-/// \brief CTrack::IsStaticTimeout
-/// \param framesTime
-/// \return
-///
-bool CTrack::IsStaticTimeout(int framesTime) const
-{
-    return (m_staticFrames > framesTime);
-}
-
-///
-/// \brief CTrack::IsOutOfTheFrame
-/// \return
-///
-bool CTrack::IsOutOfTheFrame() const
-{
-    return m_outOfTheFrame;
-}
-
-///
-//cv::RotatedRect CTrack::CalcPredictionEllipse(cv::Size_<track_t> minRadius) const
-//{
-//    // Move ellipse to velocity
-//    auto velocity = m_kalman.GetVelocity();
-//    Point_t d(3.f * velocity[0], 3.f * velocity[1]);
-
-//    cv::RotatedRect rrect(m_predictionPoint, cv::Size2f(std::max(minRadius.width, fabs(d.x)), std::max(minRadius.height, fabs(d.y))), 0);
-
-//    if (fabs(d.x) + fabs(d.y) > 4) // pix
-//    {
-//        if (fabs(d.x) > 0.0001f)
-//        {
-//            track_t l = std::min(rrect.size.width, rrect.size.height) / 3;
-
-//            track_t p2_l = sqrtf(sqr(d.x) + sqr(d.y));
-//            rrect.center.x = l * d.x / p2_l + m_predictionPoint.x;
-//            rrect.center.y = l * d.y / p2_l + m_predictionPoint.y;
-
-//            rrect.angle = atanf(d.y / d.x);
-//        }
-//        else
-//        {
-//            rrect.center.y += d.y / 3;
-//            rrect.angle = static_cast<float>(CV_PI / 2.);
-//        }
-//    }
-//    return rrect;
-//}
-
-///
-/// \brief CTrack::IsInsideArea
-///        If result <= 1 then center of the object is inside ellipse with prediction and velocity
-/// \param pt
-/// \return
-///
-track_t CTrack::IsInsideArea(const Point_t& pt, const cv::RotatedRect& rrect) const
-{
-    Point_t pt_(pt.x - rrect.center.x, pt.y - rrect.center.y);
-    track_t r = sqrtf(sqr(pt_.x) + sqr(pt_.y));
-    track_t t = (r > 1) ? acosf(pt_.x / r) : 0;
-    track_t t_ = t - rrect.angle;
-    Point_t pt_rotated(r * cosf(t_), r * sinf(t_));
-
-    return sqr(pt_rotated.x) / sqr(rrect.size.width) + sqr(pt_rotated.y) / sqr(rrect.size.height);
-}
-
-///
-/// \brief CTrack::WidthDist
-/// \param reg
-/// \return
-///
-track_t CTrack::WidthDist(const CRegion& reg) const
-{
-    if (m_lastRegion.m_rect.size.width < reg.m_rect.size.width)
-        return m_lastRegion.m_rect.size.width / reg.m_rect.size.width;
-    else
-        return reg.m_rect.size.width / m_lastRegion.m_rect.size.width;
-}
-
-///
-/// \brief CTrack::HeightDist
-/// \param reg
-/// \return
-///
-track_t CTrack::HeightDist(const CRegion& reg) const
-{
-    if (m_lastRegion.m_rect.size.height < reg.m_rect.size.height)
-        return m_lastRegion.m_rect.size.height / reg.m_rect.size.height;
-    else
-        return reg.m_rect.size.height / m_lastRegion.m_rect.size.height;
-}
-
-///
-/// \brief CTrack::CheckStatic
-/// \param trajLen
-/// \return
-///
-bool CTrack::CheckStatic(int trajLen, cv::UMat currFrame, const CRegion& region)
-{
-    if (!trajLen || static_cast<int>(m_trace.size()) < trajLen)
-    {
-        m_isStatic = false;
-        m_staticFrames = 0;
-        m_staticFrame = cv::UMat();
-    }
-    else
-    {
-        track_t kx = 0;
-        track_t bx = 0;
-        track_t ky = 0;
-        track_t by = 0;
-        get_lin_regress_params(m_trace, m_trace.size() - trajLen, m_trace.size(), kx, bx, ky, by);
-        track_t speed = sqrt(sqr(kx * trajLen) + sqr(ky * trajLen));
-        const track_t speedThresh = 10;
-        if (speed < speedThresh)
-        {
-            if (!m_isStatic)
-            {
-                m_staticFrame = currFrame.clone();
-                m_staticRect = region.m_rect;
-            }
-
-            ++m_staticFrames;
-            m_isStatic = true;
-        }
-        else
-        {
-            m_isStatic = false;
-            m_staticFrames = 0;
-            m_staticFrame = cv::UMat();
-        }
-    }
-
-    return m_isStatic;
-}
-
-///
-/// \brief GetLastRect
-/// \return
-///
-Rect3D CTrack::GetLastRect() const
-{
-    if (m_filterGoal == tracking::FilterRect)
-        return Rect3D(cv::Point3f(m_predictionRect.center.x,m_predictionRect.center.y,0),Size3D(m_predictionRect.boundingRect().width,m_predictionRect.boundingRect().height,0),0);
-    else if(m_filterGoal == tracking::FilterRect3D)
-        return m_predictionRect3D;
-    else
-        return Rect3D(cv::Point3f(m_predictionPoint.x, m_predictionPoint.y,0),Size3D(0,0,0),0);
-
-}
-///
-/// \brief CTrack::LastRegion
-/// \return
-///
-const CRegion& CTrack::LastRegion() const
-{
-    return m_lastRegion;
-}
-
-///
-/// \brief CTrack::ConstructObject
-/// \return
-///
-TrackingObject CTrack::ConstructObject() const
-{
-    return TrackingObject(GetLastRect(), m_lastRegion, m_trackID, m_regionID, m_trace, IsStatic(), IsOutOfTheFrame(), m_kalman.GetVelocity(), m_detectedFrames);
-}
-
-///
-/// \brief CTrack::SkippedFrames
-/// \return
-///
-size_t CTrack::SkippedFrames() const
-{
-    return m_skippedFrames;
-}
-
-///
-/// \brief CTrack::SkippedFrames
-/// \return
-///
-size_t& CTrack::SkippedFrames()
-{
-    return m_skippedFrames;
-}
-///
-/// \brief CTrack::DetectedFrames
-/// \return
-///
-size_t& CTrack::DetectedFrames()
-{
-    return m_detectedFrames;
-}
-///
-/// \brief RectUpdate
-/// \param region
-/// \param dataCorrect
-/// \param prevFrame
-/// \param currFrame
-///
-void CTrack::RectUpdate(
-        const CRegion& region,
-        bool dataCorrect,
-        cv::UMat prevFrame,
-        cv::UMat currFrame
-        )
-{
-    m_kalman.GetRectPrediction();
-
-    bool recalcPrediction = true;
-
-    auto Clamp = [](int& v, int& size, int hi) -> int
-    {
-        int res = 0;
-
-        if (size < 1)
-            size = 0;
-
-        if (v < 0)
-        {
-            res = v;
-            v = 0;
-            return res;
-        }
-        else if (v + size > hi - 1)
-        {
-            res = v;
-            v = hi - 1 - size;
-            if (v < 0)
-            {
-                size += v;
-                v = 0;
-            }
-            res -= v;
-            return res;
-        }
-        return res;
-    };
-
-    auto UpdateRRect = [&](cv::Rect prevRect, cv::Rect newRect)
-    {
-        m_predictionRect.center.x += newRect.x - prevRect.x;
-        m_predictionRect.center.y += newRect.y - prevRect.y;
-        m_predictionRect.size.width *= newRect.width / static_cast<float>(prevRect.width);
-        m_predictionRect.size.height *= newRect.height / static_cast<float>(prevRect.height);
-    };
-
-    switch (m_externalTrackerForLost)
-    {
-    case tracking::TrackNone:
-        break;
-    }
-
-    if (recalcPrediction)
-        UpdateRRect(m_predictionRect.boundingRect(), m_kalman.Update(region.m_brect, dataCorrect));
-
-    cv::Rect brect = m_predictionRect.boundingRect();
-    int dx = Clamp(brect.x, brect.width, currFrame.cols);
-    int dy = Clamp(brect.y, brect.height, currFrame.rows);
-
-    m_outOfTheFrame = (dx != 0) || (dy != 0) || (brect.width < 2) || (brect.height < 2);
-
-    m_predictionPoint = cv::Point3f(m_predictionRect.center.x,m_predictionRect.center.y,0);
-
-    //std::cout << "brect = " << brect << ", dx = " << dx << ", dy = " << dy << ", outOfTheFrame = " << m_outOfTheFrame << ", predictionPoint = " << m_predictionPoint << std::endl;
-}
-///
-/// \brief Rect3DUpdate
-/// \param region
-/// \param dataCorrect
-/// \param prevFrame
-/// \param currFrame
-///
-void CTrack::Rect3DUpdate(
-        const CRegion& region,
-        bool dataCorrect,
-        cv::UMat prevFrame,
-        cv::UMat currFrame
-        )
-{
-    m_kalman.GetRect3DPrediction();
-
-    switch (m_externalTrackerForLost)
-    {
-    case tracking::TrackNone:
-        break;
-    }
-
-    m_predictionRect3D = m_kalman.Update(region.m_rect, dataCorrect);
-
-    m_predictionPoint = m_predictionRect3D.center;
-
-    //std::cout << "brect = " << brect << ", dx = " << dx << ", dy = " << dy << ", outOfTheFrame = " << m_outOfTheFrame << ", predictionPoint = " << m_predictionPoint << std::endl;
-}
-
-///
-/// \brief PointUpdate
-/// \param pt
-/// \param dataCorrect
-///
-void CTrack::PointUpdate(
-        const cv::Point3f& pt,
-        const cv::Size& newObjSize,
-        bool dataCorrect,
-        const cv::Size& frameSize
-        )
-{
-    m_kalman.GetPointPrediction();
-
-    m_predictionPoint = m_kalman.Update(pt, dataCorrect);
-
-    if (dataCorrect)
-    {
-        const int a1 = 1;
-        const int a2 = 9;
-        m_predictionRect.size.width = (a1 * newObjSize.width + a2 * m_predictionRect.size.width) / (a1 + a2);
-        m_predictionRect.size.height = (a1 * newObjSize.height + a2 * m_predictionRect.size.height) / (a1 + a2);
-    }
-
-    auto Clamp = [](track_t& v, int hi) -> bool
-    {
-        if (v < 0)
-        {
-            v = 0;
-            return true;
-        }
-        else if (hi && v > hi - 1)
-        {
-            v = static_cast<track_t>(hi - 1);
-            return true;
-        }
-        return false;
-    };
-    auto p = m_predictionPoint;
-    m_outOfTheFrame = Clamp(p.x, frameSize.width) || Clamp(p.y, frameSize.height) || (m_predictionRect.size.width < 2) || (m_predictionRect.size.height < 2);
-
-    //std::cout << "predictionRect = " << m_predictionRect.boundingRect() << ", outOfTheFrame = " << m_outOfTheFrame << ", predictionPoint = " << m_predictionPoint << std::endl;
-}

+ 0 - 303
src/detection/detection_lidar_PointPillars_MultiHead_1025/Tracker/track.h

@@ -1,303 +0,0 @@
-#pragma once
-#include <iostream>
-#include <vector>
-#include <deque>
-#include <memory>
-#include <array>
-
-#ifdef USE_OCV_KCF
-#include <opencv2/tracking.hpp>
-#endif
-
-#include "defines.h"
-#include "Kalman.h"
-
-// --------------------------------------------------------------------------
-///
-/// \brief The TrajectoryPoint struct
-///
-struct TrajectoryPoint
-{
-    ///
-    /// \brief TrajectoryPoint
-    ///
-    TrajectoryPoint()
-        : m_hasRaw(false)
-    {
-    }
-
-    ///
-    /// \brief TrajectoryPoint
-    /// \param prediction
-    ///
-    TrajectoryPoint(const cv::Point3f& prediction)
-        :
-          m_hasRaw(false),
-          m_prediction(prediction)
-    {
-    }
-
-    ///
-    /// \brief TrajectoryPoint
-    /// \param prediction
-    /// \param raw
-    ///
-    TrajectoryPoint(const cv::Point3f& prediction, const cv::Point3f& raw)
-        :
-          m_hasRaw(true),
-          m_prediction(prediction),
-          m_raw(raw)
-    {
-    }
-
-    bool m_hasRaw = false;
-    cv::Point3f m_prediction;
-    cv::Point3f m_raw;
-};
-
-// --------------------------------------------------------------------------
-///
-/// \brief The Trace class
-///
-class Trace
-{
-public:
-    ///
-    /// \brief operator []
-    /// \param i
-    /// \return
-    ///
-    const cv::Point3f& operator[](size_t i) const
-    {
-        return m_trace[i].m_prediction;
-    }
-
-    ///
-    /// \brief operator []
-    /// \param i
-    /// \return
-    ///
-    cv::Point3f& operator[](size_t i)
-    {
-        return m_trace[i].m_prediction;
-    }
-
-    ///
-    /// \brief at
-    /// \param i
-    /// \return
-    ///
-    const TrajectoryPoint& at(size_t i) const
-    {
-        return m_trace[i];
-    }
-
-    ///
-    /// \brief size
-    /// \return
-    ///
-    size_t size() const
-    {
-        return m_trace.size();
-    }
-
-    ///
-    /// \brief push_back
-    /// \param prediction
-    ///
-    void push_back(const cv::Point3f& prediction)
-    {
-        m_trace.emplace_back(prediction);
-    }
-    void push_back(const cv::Point3f& prediction, const cv::Point3f& raw)
-    {
-        m_trace.emplace_back(prediction, raw);
-    }
-
-    ///
-    /// \brief pop_front
-    /// \param count
-    ///
-    void pop_front(size_t count)
-    {
-        if (count < size())
-            m_trace.erase(m_trace.begin(), m_trace.begin() + count);
-        else
-            m_trace.clear();
-    }
-
-    ///
-    /// \brief GetRawCount
-    /// \param lastPeriod
-    /// \return
-    ///
-    size_t GetRawCount(size_t lastPeriod) const
-    {
-        size_t res = 0;
-
-        size_t i = 0;
-        if (lastPeriod < m_trace.size())
-            i = m_trace.size() - lastPeriod;
-
-        for (; i < m_trace.size(); ++i)
-        {
-            if (m_trace[i].m_hasRaw)
-                ++res;
-        }
-
-        return res;
-    }
-
-private:
-    std::deque<TrajectoryPoint> m_trace;
-};
-
-// --------------------------------------------------------------------------
-///
-/// \brief The TrackingObject class
-///
-struct TrackingObject
-{
-    Rect3D m_rect;           // Coordinates
-    CRegion m_region;         // detect region
-    Trace m_trace;                     // Trajectory
-    size_t m_ID = 0;                   // Objects ID
-    size_t m_regionID = 0;                   // Objects ID
-    bool m_isStatic = false;           // Object is abandoned
-    bool m_outOfTheFrame = false;      // Is object out of freme
-    cv::Vec<track_t, 2> m_velocity;    // pixels/sec
-    size_t m_detectedFrames = 0;       // detected frames' count
-    ///
-    TrackingObject(const Rect3D& rect, const CRegion& region, size_t ID, size_t regionID, const Trace& trace,
-                   bool isStatic, bool outOfTheFrame, cv::Vec<track_t, 2> velocity, size_t detectedFrames)
-        :
-          m_rect(rect), m_region(region), m_ID(ID), m_regionID(regionID), m_isStatic(isStatic), m_outOfTheFrame(outOfTheFrame), m_velocity(velocity), m_detectedFrames(detectedFrames)
-    {
-        for (size_t i = 0; i < trace.size(); ++i)
-        {
-            auto tp = trace.at(i);
-            if (tp.m_hasRaw)
-                m_trace.push_back(tp.m_prediction, tp.m_raw);
-            else
-                m_trace.push_back(tp.m_prediction);
-        }
-    }
-    ///
-    bool IsRobust(int minTraceSize, float minRawRatio, cv::Size2f sizeRatio) const
-    {
-        bool res = m_trace.size() > static_cast<size_t>(minTraceSize);
-        res &= m_trace.GetRawCount(m_trace.size() - 1) / static_cast<float>(m_trace.size()) > minRawRatio;
-        if (sizeRatio.width + sizeRatio.height > 0)
-        {
-            float sr = m_rect.size.width / m_rect.size.height;
-            if (sizeRatio.width > 0)
-                res &= (sr > sizeRatio.width);
-
-            if (sizeRatio.height > 0)
-                res &= (sr < sizeRatio.height);
-        }
-        if (m_outOfTheFrame)
-            res = false;
-
-        return res;
-    }
-};
-
-// --------------------------------------------------------------------------
-///
-/// \brief The CTrack class
-///
-class CTrack
-{
-public:
-    CTrack(const CRegion& region,
-           tracking::KalmanType kalmanType,
-           track_t deltaTime,
-           track_t accelNoiseMag,
-           bool useAcceleration,
-           size_t trackID,
-           size_t regionID,
-           tracking::FilterGoal filterObjectGoal,
-           tracking::LostTrackType externalTrackerForLost);
-
-    ///
-    /// \brief CalcDist
-    /// Euclidean distance in pixels between objects centres on two N and N+1 frames
-    /// \param reg
-    /// \return
-    ///
-    track_t CalcDistCenter(const CRegion& reg) const;
-    ///
-    /// \brief CalcDist
-    /// Euclidean distance in pixels between object contours on two N and N+1 frames
-    /// \param reg
-    /// \return
-    ///
-    track_t CalcDistRect(const CRegion& reg) const;
-    ///
-    /// \brief CalcDist
-    /// Euclidean distance in pixels between object contours on two N and N+1 frames
-    /// \param reg
-    /// \return
-    ///
-    track_t CalcDistRect3D(const CRegion& reg) const;
-
-    //cv::RotatedRect CalcPredictionEllipse(cv::Size_<track_t> minRadius) const;
-    ///
-    /// \brief IsInsideArea
-    /// Test point inside in prediction area: prediction area + object velocity
-    /// \param pt
-    /// \param minVal
-    /// \return
-    ///
-    track_t IsInsideArea(const Point_t& pt, const cv::RotatedRect& rrect) const;
-    track_t WidthDist(const CRegion& reg) const;
-    track_t HeightDist(const CRegion& reg) const;
-
-    void Update(const CRegion& region, bool dataCorrect, size_t max_trace_length, cv::UMat prevFrame, cv::UMat currFrame, int trajLen);
-
-    bool IsStatic() const;
-    bool IsStaticTimeout(int framesTime) const;
-    bool IsOutOfTheFrame() const;
-
-    Rect3D GetLastRect() const;
-
-    const cv::Point3f& AveragePoint() const;
-    cv::Point3f& AveragePoint();
-    const CRegion& LastRegion() const;
-    size_t SkippedFrames() const;
-    size_t& SkippedFrames();
-    size_t& DetectedFrames();
-
-    TrackingObject ConstructObject() const;
-public:
-    size_t m_regionID = 0;
-private:
-    Trace m_trace;
-    size_t m_trackID = 0;
-    size_t m_skippedFrames = 0;
-    size_t m_detectedFrames = 0;
-    CRegion m_lastRegion;
-
-    cv::Point3f m_predictionPoint;
-    cv::RotatedRect m_predictionRect;
-    Rect3D m_predictionRect3D;
-    TKalmanFilter m_kalman;
-    tracking::FilterGoal m_filterGoal = tracking::FilterCenter;
-    bool m_outOfTheFrame = false;
-
-    tracking::LostTrackType m_externalTrackerForLost;
-
-    void RectUpdate(const CRegion& region, bool dataCorrect, cv::UMat prevFrame, cv::UMat currFrame);
-    void Rect3DUpdate(const CRegion& region, bool dataCorrect, cv::UMat prevFrame, cv::UMat currFrame);
-    void PointUpdate(const cv::Point3f& pt, const cv::Size& newObjSize, bool dataCorrect, const cv::Size& frameSize);
-
-    bool CheckStatic(int trajLen, cv::UMat currFrame, const CRegion& region);
-    bool m_isStatic = false;
-    int m_staticFrames = 0;
-    cv::UMat m_staticFrame;
-    Rect3D m_staticRect;
-};
-
-typedef std::vector<std::unique_ptr<CTrack>> tracks_t;
-

+ 0 - 246
src/detection/detection_lidar_PointPillars_MultiHead_1025/cfgs/cbgs_pp_multihead.yaml

@@ -1,246 +0,0 @@
-CLASS_NAMES: ['car','truck', 'construction_vehicle', 'bus', 'trailer',
-              'barrier', 'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone']
-
-DATA_CONFIG:
-    _BASE_CONFIG_: cfgs/dataset_configs/nuscenes_dataset.yaml
-
-    POINT_CLOUD_RANGE: [-51.2, -51.2, -5.0, 51.2, 51.2, 3.0]
-    DATA_PROCESSOR:
-        -   NAME: mask_points_and_boxes_outside_range
-            REMOVE_OUTSIDE_BOXES: True
-
-        -   NAME: shuffle_points
-            SHUFFLE_ENABLED: {
-                'train': True,
-                'test': True
-            }
-
-        -   NAME: transform_points_to_voxels
-            VOXEL_SIZE: [0.2, 0.2, 8.0]
-            MAX_POINTS_PER_VOXEL: 20
-            MAX_NUMBER_OF_VOXELS: {
-                'train': 30000,
-                'test': 30000
-            }
-
-MODEL:
-    NAME: PointPillar
-
-    VFE:
-        NAME: PillarVFE
-        WITH_DISTANCE: False
-        USE_ABSLOTE_XYZ: True
-        USE_NORM: True
-        NUM_FILTERS: [64]
-
-    MAP_TO_BEV:
-        NAME: PointPillarScatter
-        NUM_BEV_FEATURES: 64
-
-    BACKBONE_2D:
-        NAME: BaseBEVBackbone
-        LAYER_NUMS: [3, 5, 5]
-        LAYER_STRIDES: [2, 2, 2]
-        NUM_FILTERS: [64, 128, 256]
-        UPSAMPLE_STRIDES: [0.5, 1, 2]
-        NUM_UPSAMPLE_FILTERS: [128, 128, 128]
-
-    DENSE_HEAD:
-        NAME: AnchorHeadMulti
-        CLASS_AGNOSTIC: False
-
-        DIR_OFFSET: 0.78539
-        DIR_LIMIT_OFFSET: 0.0
-        NUM_DIR_BINS: 2
-
-        USE_MULTIHEAD: True
-        SEPARATE_MULTIHEAD: True
-        ANCHOR_GENERATOR_CONFIG: [
-            {
-                'class_name': car,
-                'anchor_sizes': [[4.63, 1.97, 1.74]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-0.95],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.6,
-                'unmatched_threshold': 0.45
-            },
-            {
-                'class_name': truck,
-                'anchor_sizes': [[6.93, 2.51, 2.84]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-0.6],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.55,
-                'unmatched_threshold': 0.4
-            },
-            {
-                'class_name': construction_vehicle,
-                'anchor_sizes': [[6.37, 2.85, 3.19]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-0.225],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.5,
-                'unmatched_threshold': 0.35
-            },
-            {
-                'class_name': bus,
-                'anchor_sizes': [[10.5, 2.94, 3.47]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-0.085],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.55,
-                'unmatched_threshold': 0.4
-            },
-            {
-                'class_name': trailer,
-                'anchor_sizes': [[12.29, 2.90, 3.87]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [0.115],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.5,
-                'unmatched_threshold': 0.35
-            },
-            {
-                'class_name': barrier,
-                'anchor_sizes': [[0.50, 2.53, 0.98]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-1.33],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.55,
-                'unmatched_threshold': 0.4
-            },
-            {
-                'class_name': motorcycle,
-                'anchor_sizes': [[2.11, 0.77, 1.47]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-1.085],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.5,
-                'unmatched_threshold': 0.3
-            },
-            {
-                'class_name': bicycle,
-                'anchor_sizes': [[1.70, 0.60, 1.28]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-1.18],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.5,
-                'unmatched_threshold': 0.35
-            },
-            {
-                'class_name': pedestrian,
-                'anchor_sizes': [[0.73, 0.67, 1.77]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-0.935],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.6,
-                'unmatched_threshold': 0.4
-            },
-            {
-                'class_name': traffic_cone,
-                'anchor_sizes': [[0.41, 0.41, 1.07]],
-                'anchor_rotations': [0, 1.57],
-                'anchor_bottom_heights': [-1.285],
-                'align_center': False,
-                'feature_map_stride': 4,
-                'matched_threshold': 0.6,
-                'unmatched_threshold': 0.4
-            },
-        ]
-
-        SHARED_CONV_NUM_FILTER: 64
-
-        RPN_HEAD_CFGS: [
-            {
-                'HEAD_CLS_NAME': ['car'],
-            },
-            {
-                'HEAD_CLS_NAME': ['truck', 'construction_vehicle'],
-            },
-            {
-                'HEAD_CLS_NAME': ['bus', 'trailer'],
-            },
-            {
-                'HEAD_CLS_NAME': ['barrier'],
-            },
-            {
-                'HEAD_CLS_NAME': ['motorcycle', 'bicycle'],
-            },
-            {
-                'HEAD_CLS_NAME': ['pedestrian', 'traffic_cone'],
-            },
-        ]
-        SEPARATE_REG_CONFIG: 
-            NUM_MIDDLE_CONV: 1
-            NUM_MIDDLE_FILTER: 64
-            REG_LIST: ['reg:2', 'height:1', 'size:3', 'angle:2', 'velo:2']
-
-        TARGET_ASSIGNER_CONFIG:
-            NAME: AxisAlignedTargetAssigner
-            POS_FRACTION: -1.0
-            SAMPLE_SIZE: 512
-            NORM_BY_NUM_EXAMPLES: False
-            MATCH_HEIGHT: False
-            BOX_CODER: ResidualCoder
-            BOX_CODER_CONFIG: {
-                'code_size': 9,
-                'encode_angle_by_sincos': True
-            }
-
-
-        LOSS_CONFIG:
-            REG_LOSS_TYPE: WeightedL1Loss
-            LOSS_WEIGHTS: {
-                'pos_cls_weight': 1.0,
-                'neg_cls_weight': 2.0,
-                'cls_weight': 1.0,
-                'loc_weight': 0.25,
-                'dir_weight': 0.2,
-                'code_weights': [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2]
-            }
-
-    POST_PROCESSING:
-        RECALL_THRESH_LIST: [0.3, 0.5, 0.7]
-        SCORE_THRESH: 0.1
-        OUTPUT_RAW_SCORE: False
-
-        EVAL_METRIC: kitti
-
-        NMS_CONFIG:
-            MULTI_CLASSES_NMS: True
-            NMS_TYPE: nms_gpu
-            NMS_THRESH: 0.2
-            NMS_PRE_MAXSIZE: 1000
-            NMS_POST_MAXSIZE: 83
-
-
-OPTIMIZATION:
-    BATCH_SIZE_PER_GPU: 4
-    NUM_EPOCHS: 20
-
-    OPTIMIZER: adam_onecycle
-    LR: 0.001
-    WEIGHT_DECAY: 0.01
-    MOMENTUM: 0.9
-
-    MOMS: [0.95, 0.85]
-    PCT_START: 0.4
-    DIV_FACTOR: 10
-    DECAY_STEP_LIST: [35, 45]
-    LR_DECAY: 0.1
-    LR_CLIP: 0.0000001
-
-    LR_WARMUP: False
-    WARMUP_EPOCH: 1
-
-    GRAD_NORM_CLIP: 10

+ 0 - 141
src/detection/detection_lidar_PointPillars_MultiHead_1025/common.h

@@ -1,141 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-
-#pragma once
-
-// headers in STL
-#include <stdio.h>
-#include <assert.h>
-#include <iostream>
-#include <fstream>
-#include <string>
-#include <vector>
-// headers in CUDA
-#include "cuda_runtime_api.h"
-
-using namespace std;
-// using MACRO to allocate memory inside CUDA kernel
-#define NUM_3D_BOX_CORNERS_MACRO 8
-
-#define NUM_2D_BOX_CORNERS_MACRO 4
-
-#define NUM_THREADS_MACRO 64
-
-// need to be changed when num_threads_ is changed
-
-#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
-
-#define GPU_CHECK(ans)                    \
-  {                                       \
-    GPUAssert((ans), __FILE__, __LINE__); \
-  }
-inline void GPUAssert(cudaError_t code, const char *file, int line,
-                      bool abort = true)
-{
-  if (code != cudaSuccess)
-  {
-    fprintf(stderr, "GPUassert: %s %s %d\n", cudaGetErrorString(code), file,
-            line);
-    if (abort)
-      exit(code);
-  }
-};
-
-template <typename T>
-void HOST_SAVE(T *array, int size, string filename, string root = "../test/result", string postfix = ".txt")
-{
-  string filepath = root + "/" + filename + postfix;
-  if (postfix == ".bin")
-  {
-    fstream file(filepath, ios::out | ios::binary);
-    file.write(reinterpret_cast<char *>(array), sizeof(size * sizeof(T)));
-    file.close();
-    std::cout << "|>>>|  Data has been written in " << filepath << "  |<<<|" << std::endl;
-    return;
-  }
-  else if (postfix == ".txt")
-  {
-    ofstream file(filepath, ios::out);
-    for (int i = 0; i < size; ++i)
-      file << array[i] << " ";
-    file.close();
-    std::cout << "|>>>|  Data has been written in " << filepath << "  |<<<|" << std::endl;
-    return;
-  }
-};
-
-template <typename T>
-void DEVICE_SAVE(T *array, int size, string filename, string root = "../test/result", string postfix = ".txt")
-{
-  T *temp_ = new T[size];
-  cudaMemcpy(temp_, array, size * sizeof(T), cudaMemcpyDeviceToHost);
-  HOST_SAVE<T>(temp_, size, filename, root, postfix);
-  delete[] temp_;
-};
-
-
-// int TXTtoArrary( float* &points_array , string file_name , int num_feature = 4)
-// {
-//   ifstream InFile;
-//   InFile.open(file_name.data());
-//   assert(InFile.is_open());
-
-//   vector<float> temp_points;
-//   string c;
-
-//   while (!InFile.eof())
-//   {
-//       InFile >> c;
-
-//       temp_points.push_back(atof(c.c_str()));
-//   }
-//   points_array = new float[temp_points.size()];
-//   for (int i = 0 ; i < temp_points.size() ; ++i) {
-//     points_array[i] = temp_points[i];
-//   }
-
-//   InFile.close();  
-//   return temp_points.size() / num_feature;
-// };

+ 0 - 181
src/detection/detection_lidar_PointPillars_MultiHead_1025/detection_lidar_PointPillars_MultiHead.pro

@@ -1,181 +0,0 @@
-QT -= gui
-
-CONFIG += c++14 console
-CONFIG -= app_bundle
-
-QMAKE_CXXFLAGS += -std=gnu++17
-QMAKE_LFLAGS += -no-pie  -Wl,--no-as-needed
-
-# The following define makes your compiler emit warnings if you use
-# any feature of Qt which as been marked deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-#DEFINES += DEBUG_SHOW
-# You can also make your code fail to compile if you use deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
-
-SOURCES += main.cpp \
-    pointpillars.cc \
-    ../../include/msgtype/object.pb.cc \
-    ../../include/msgtype/objectarray.pb.cc \
-    Tracker/Ctracker.cpp \
-    Tracker/HungarianAlg.cpp \
-    Tracker/Kalman.cpp \
-    Tracker/track.cpp
-
-DISTFILES += \
-    nms.cu \
-    postprocess.cu \
-    preprocess.cu \
-    scatter.cu
-
-HEADERS += \
-    common.h \
-    nms.h \
-    pointpillars.h \
-    postprocess.h \
-    preprocess.h \
-    scatter.h \
-    ../../include/msgtype/object.pb.h \
-    ../../include/msgtype/objectarray.pb.h \
-    Tracker/Ctracker.h \
-    Tracker/defines.h \
-    Tracker/HungarianAlg.h \
-    Tracker/Kalman.h \
-    Tracker/ShortPathCalculator.h \
-    Tracker/track.h \
-    Tracker/Tracking.hpp
-
-INCLUDEPATH+=Tracker
-
-CUDA_SOURCES +=  \
-    nms.cu \
-    postprocess.cu \
-    preprocess.cu \
-    scatter.cu
-
-CUDA_SDK = "/usr/local/cuda/"   # cudaSDK路径
-
-CUDA_DIR = "/usr/local/cuda/"            # CUDA tookit路径
-
-SYSTEM_NAME = linux         # 自己系统环境 'Win32', 'x64', or 'Win64'
-
-SYSTEM_TYPE = 64           #操作系统位数 '32' or '64',
-
-CUDA_ARCH = sm_72         # cuda架构, for example 'compute_10', 'compute_11', 'sm_10'
-
-NVCC_OPTIONS = --use_fast_math --compiler-options "-fPIC"
-
-
-# include paths
-
-INCLUDEPATH += $$CUDA_DIR/include
-#INCLUDEPATH += /usr/local/cuda-10.0/targets/aarch64-linux/include/crt
-
-# library directories
-
-QMAKE_LIBDIR += $$CUDA_DIR/lib/
-
-CUDA_OBJECTS_DIR = ./
-
-# The following library conflicts with something in Cuda
-
-#QMAKE_LFLAGS_RELEASE = /NODEFAULTLIB:msvcrt.lib
-
-#QMAKE_LFLAGS_DEBUG   = /NODEFAULTLIB:msvcrtd.lib
-
-# Add the necessary libraries
-
-CUDA_LIBS =  cudart cufft
-
-# The following makes sure all path names (which often include spaces) are put between quotation marks
-
-CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
-
-NVCC_LIBS = $$join(CUDA_LIBS,' -l','-l', '')
-
-#LIBS += $$join(CUDA_LIBS,'.so ', '', '.so')
-
-# Configuration of the Cuda compiler
-
-CONFIG(debug, debug|release) {
-
-    # Debug mode
-
-    cuda_d.input = CUDA_SOURCES
-
-    cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
-
-    cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
-
-    cuda_d.dependency_type = TYPE_C
-
-    QMAKE_EXTRA_COMPILERS += cuda_d
-
-}
-
-else {
-
-    # Release mode
-
-    cuda.input = CUDA_SOURCES
-
-    cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
-
-    cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -O3 -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
-
-    cuda.dependency_type = TYPE_C
-
-    QMAKE_EXTRA_COMPILERS += cuda
-
-}
-
-
-LIBS += -L/usr/local/cuda-10.2/targets/aarch64-linux/lib
-
-LIBS += -lcudart -lcufft -lyaml-cpp
-
-#LIBS += -L/home/adc/soft/cudnn-10.2-linux-x64-v7.6.5.32/cuda/lib64 -lcudnn
-
-LIBS +=  -lmyelin -lnvinfer -lnvonnxparser -lnvcaffe_parser
-
-#LIBS += -L/home/nvidia/git/libtorch_gpu-1.6.0-linux-aarch64/lib -ltorch_cuda  -ltorch -lc10 -ltorch_cpu
-
-unix:INCLUDEPATH += /usr/include/eigen3
-unix:INCLUDEPATH += /usr/include/pcl-1.7
-unix:INCLUDEPATH += /usr/include/pcl-1.8
-
-!include(../../../include/common.pri ) {
-    error( "Couldn't find the common.pri file!" )
-}
-
-!include(../../../include/ivprotobuf.pri ) {
-    error( "Couldn't find the ivprotobuf.pri file!" )
-}
-
-LIBS += -lboost_system
-
-unix:LIBS +=  -lpcl_common\
-        -lpcl_features\
-        -lpcl_filters\
-        -lpcl_io\
-        -lpcl_io_ply\
-        -lpcl_kdtree\
-        -lpcl_keypoints\
-        -lpcl_octree\
-        -lpcl_outofcore\
-        -lpcl_people\
-        -lpcl_recognition\
-        -lpcl_registration\
-        -lpcl_sample_consensus\
-        -lpcl_search\
-        -lpcl_segmentation\
-        -lpcl_surface\
-        -lpcl_tracking\
-        -lpcl_visualization
-
-INCLUDEPATH += /usr/include/opencv4/
-LIBS += /usr/lib/aarch64-linux-gnu/libopencv*.so

+ 0 - 376
src/detection/detection_lidar_PointPillars_MultiHead_1025/main.cpp

@@ -1,376 +0,0 @@
-#include <QCoreApplication>
-#include <QDateTime>
-#include <iostream>
-#include "pointpillars.h"
-#include <iostream>
-#include <pcl/point_cloud.h>
-#include <pcl/point_types.h>
-#include <pcl/io/io.h>
-#include <pcl/io/pcd_io.h>
-#include "xmlparam.h"
-#include "modulecomm.h"
-#include "ivfault.h"
-#include "ivlog.h"
-#include "ivexit.h"
-#include "ivversion.h"
-#include <thread>
-#include "objectarray.pb.h"
-//#include "ivbacktrace.h"
-#include "Tracking.hpp"
-iv::Ivfault *gfault = nullptr;
-iv::Ivlog *givlog = nullptr;
-
-std::thread * gpthread;
-PointPillars * pPillars = nullptr ;
-void * gpa;
-void * gpdetect;
-int gnothavedatatime = 0;
-const int kNumPointFeature = 5;
-const int kOutputNumBoxFeature = 7;
-std::string gstrinput;
-std::string gstroutput;
-
-TrackerSettings settings;
-CTracker tracker(settings);
-bool m_isTrackerInitialized = false;
-
-void PclToArray(
-        const pcl::PointCloud<pcl::PointXYZI>::Ptr& in_pcl_pc_ptr,
-        float* out_points_array, const float normalizing_factor) {
-    for (size_t i = 0; i < in_pcl_pc_ptr->size(); ++i) {
-        pcl::PointXYZI point = in_pcl_pc_ptr->at(i);
-        out_points_array[i * 4 + 0] = point.x;
-        out_points_array[i * 4 + 1] = point.y;
-        out_points_array[i * 4 + 2] = point.z;
-        out_points_array[i * 4 + 3] =
-                static_cast<float>(point.intensity / normalizing_factor);
-    }
-}
-
-void PclXYZITToArray(
-        const pcl::PointCloud<pcl::PointXYZI>::Ptr& in_pcl_pc_ptr,
-        float* out_points_array, const float normalizing_factor) {
-    for (size_t i = 0; i < in_pcl_pc_ptr->size(); ++i) {
-        pcl::PointXYZI point = in_pcl_pc_ptr->at(i);
-        out_points_array[i * 5 + 0] = point.x;
-        out_points_array[i * 5 + 1] = point.y;
-        out_points_array[i * 5 + 2] = point.z;
-        out_points_array[i * 5 + 3] =
-                static_cast<float>(point.intensity / normalizing_factor);
-        out_points_array[i * 5 + 4] = 0;
-    }
-}
-
-void GetLidarObj(std::vector<float> out_detections,std::vector<int> out_labels,
-                 std::vector<float> out_scores,iv::lidar::objectarray & lidarobjvec)
-{
-    int i;
-    int obj_size = out_detections.size()/kOutputNumBoxFeature;
-    //    givlog->verbose("OBJ","object size is %d",obj_size);
-    for(i=0;i<obj_size;i++)
-    {
-        iv::lidar::lidarobject lidarobj;
-        if (out_scores.at(i) < 0.10) continue;
-
-        lidarobj.set_tyaw(out_detections.at(i*7+6));
-        iv::lidar::PointXYZ centroid;
-        iv::lidar::PointXYZ * _centroid;
-        centroid.set_x(out_detections.at(i*7));
-        centroid.set_y(out_detections.at(i*7+1));
-        centroid.set_z(out_detections.at(i*7+2));
-        _centroid = lidarobj.mutable_centroid();
-        _centroid->CopyFrom(centroid);
-
-        iv::lidar::PointXYZ min_point;
-        iv::lidar::PointXYZ * _min_point;
-        min_point.set_x(0);
-        min_point.set_y(0);
-        min_point.set_z(0);
-        _min_point = lidarobj.mutable_min_point();
-        _min_point->CopyFrom(min_point);
-
-        iv::lidar::PointXYZ max_point;
-        iv::lidar::PointXYZ * _max_point;
-        max_point.set_x(0);
-        max_point.set_y(0);
-        max_point.set_z(0);
-        _max_point = lidarobj.mutable_max_point();
-        _max_point->CopyFrom(max_point);
-
-        iv::lidar::PointXYZ position;
-        iv::lidar::PointXYZ * _position;
-        position.set_x(out_detections.at(i*7));
-        position.set_y(out_detections.at(i*7+1));
-        position.set_z(out_detections.at(i*7+2));
-        _position = lidarobj.mutable_position();
-        _position->CopyFrom(position);
-        lidarobj.set_mntype(out_labels.at(i));
-        // label 2  8
-        if(out_labels.at(i)==2){
-            lidarobj.set_mntype(8);
-        }else if(out_labels.at(i)==8){
-            lidarobj.set_mntype(2);
-        }
-        lidarobj.set_score(out_scores.at(i));
-        lidarobj.add_type_probs(out_scores.at(i));
-
-        iv::lidar::PointXYZI point_cloud;
-        iv::lidar::PointXYZI * _point_cloud;
-        point_cloud.set_x(out_detections.at(i*7));
-        point_cloud.set_y(out_detections.at(i*7+1));
-        point_cloud.set_z(out_detections.at(i*7+2));
-        point_cloud.set_i(0);
-
-        _point_cloud = lidarobj.add_cloud();
-        _point_cloud->CopyFrom(point_cloud);
-
-        iv::lidar::Dimension ld;
-        iv::lidar::Dimension * pld;
-        ld.set_x(out_detections.at(i*7+3));// w
-        ld.set_y(out_detections.at(i*7+4));// l
-        ld.set_z(out_detections.at(i*7+5));// h
-        pld = lidarobj.mutable_dimensions();
-        pld->CopyFrom(ld);
-
-        //        std::cout<<"x y z   :  "<<out_detections.at(i*7+3)<<"    "<< out_detections.at(i*7+4)<<"    "<<out_detections.at(i*7+5)<<std::endl;
-        iv::lidar::lidarobject * po = lidarobjvec.add_obj();
-        po->CopyFrom(lidarobj);
-    }
-
-}
-
-void DectectOnePCD(const pcl::PointCloud<pcl::PointXYZI>::Ptr &pc_ptr)
-{
-    std::shared_ptr<float> points_array_ptr = std::shared_ptr<float>(new float[pc_ptr->size() * kNumPointFeature]);
-    //   float* points_array = new float[pc_ptr->size() * kNumPointFeature];
-    PclXYZITToArray(pc_ptr, points_array_ptr.get(), 1.0);
-
-    int    in_num_points = pc_ptr->width;
-
-    std::vector<float> out_detections;
-    std::vector<int> out_labels;
-    std::vector<float> out_scores;
-
-    QTime xTime;
-
-    xTime.start();
-
-    cudaDeviceSynchronize();
-    pPillars->DoInference(points_array_ptr.get(), in_num_points, &out_detections, &out_labels , &out_scores);
-    cudaDeviceSynchronize();
-
-    //    givlog->verbose("obj size is %d", num_objects);
-    //    std::cout<<"obj size is "<<num_objects<<std::endl;
-
-    //    std::vector<iv::lidar::lidarobject> lidarobjvec;
-    iv::lidar::objectarray lidarobjvec;
-    GetLidarObj(out_detections,out_labels,out_scores,lidarobjvec);
-
-    double timex = pc_ptr->header.stamp;
-    timex = timex/1000.0;
-    lidarobjvec.set_timestamp(pc_ptr->header.stamp);
-    //---------------------------------------------  init tracker  -------------------------------------------------
-    if (!m_isTrackerInitialized)
-    {
-        m_isTrackerInitialized = InitTracker(tracker);
-        if (!m_isTrackerInitialized)
-        {
-            std::cerr << "Tracker initialize error!!!" << std::endl;
-        }
-    }
-    iv::lidar::objectarray trackedobjvec = Tracking(lidarobjvec, tracker);
-    //    std::<<"track    end"<<std::endl;
-
-    //    --------------------------------------------  end tracking  --------------------------------------------------
-    int ntlen;
-    std::string out = trackedobjvec.SerializeAsString();
-    iv::modulecomm::ModuleSendMsg(gpdetect,out.data(),out.length());
-
-    //    givlog->verbose("lenth is %d",out.length());
-}
-
-void ListenPointCloud(const char *strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
-{
-    //    std::cout<<" is  ok  ------------  "<<std::endl;
-    if(nSize <=16)return;
-    unsigned int * pHeadSize = (unsigned int *)strdata;
-    if(*pHeadSize > nSize)
-    {
-        givlog->verbose("ListenPointCloud data is small headsize = %d, data size is %d", *pHeadSize, nSize);
-        std::cout<<"ListenPointCloud data is small headsize ="<<*pHeadSize<<"  data size is"<<nSize<<std::endl;
-    }
-
-    gnothavedatatime = 0;
-    QTime xTime;
-    xTime.start();
-
-    pcl::PointCloud<pcl::PointXYZI>::Ptr point_cloud(
-                new pcl::PointCloud<pcl::PointXYZI>());
-    int nNameSize;
-    nNameSize = *pHeadSize - 4-4-8;
-    char * strName = new char[nNameSize+1];strName[nNameSize] = 0;
-    std::shared_ptr<char> str_ptr;
-    str_ptr.reset(strName);
-    memcpy(strName,(char *)((char *)strdata +4),nNameSize);
-    point_cloud->header.frame_id = strName;
-    memcpy(&point_cloud->header.seq,(char *)strdata+4+nNameSize,4);
-    memcpy(&point_cloud->header.stamp,(char *)strdata+4+nNameSize+4,8);
-    int nPCount = (nSize - *pHeadSize)/sizeof(pcl::PointXYZI);
-    int i;
-    pcl::PointXYZI * p;
-    p = (pcl::PointXYZI *)((char *)strdata + *pHeadSize);
-    for(i=0;i<nPCount;i++)
-    {
-        pcl::PointXYZI xp;
-        memcpy(&xp,p,sizeof(pcl::PointXYZI));
-        xp.z = xp.z;
-        point_cloud->push_back(xp);
-        p++;
-    }
-
-    DectectOnePCD(point_cloud);
-    std::cout<<"time is "<<(QDateTime::currentMSecsSinceEpoch() % 1000)<<" "<<xTime.elapsed()<<std::endl;
-    gfault->SetFaultState(0, 0, "ok");
-
-}
-
-bool gbstate = true;
-void statethread()
-{
-    int nstate = 0;
-    int nlaststate = 0;
-    while (gbstate)
-    {
-        std::this_thread::sleep_for(std::chrono::milliseconds(10));
-        if(gnothavedatatime < 100000) gnothavedatatime++;
-
-        if (gnothavedatatime  < 100){
-            nstate = 0;
-        }
-        if (gnothavedatatime > 1000)
-        {
-            nstate = 1;
-        }
-        if (gnothavedatatime > 6000)
-        {
-            nstate = 2;
-        }
-        if (nstate != nlaststate) {
-            switch (nstate) {
-            case 0:
-                givlog->info("detection_lidar_pointpillar is ok");
-                gfault->SetFaultState(0,0,"data is ok.");
-                break;
-            case 1:
-                givlog->info(" more than 10 seconds not have lidar pointcloud.");
-                gfault->SetFaultState(1,1,"more than 10 seconds not have lidar pointcloud.");
-                break;
-            case 2:
-                givlog->info(" more than 60 seconds not have lidar pointcloud.");
-                gfault->SetFaultState(2,2, "more than 60 seconds not have lidar pointcloud.");
-                break;
-            default:
-                break;
-            }
-        }
-    }
-}
-
-void exitfunc()
-{
-    gbstate = false;
-    gpthread->join();
-    std::cout<<" state thread closed."<<std::endl;
-    iv::modulecomm::Unregister(gpa);
-    iv::modulecomm::Unregister(gpdetect);
-    std::cout<<"exit func complete"<<std::endl;
-}
-#include <QFile>
-bool trtisexist(std::string strpfe,std::string strbackbone)
-{
-    QFile xFile;
-    xFile.setFileName(strpfe.data());
-    if(xFile.exists() == false)
-    {
-        return false;
-    }
-    xFile.setFileName(strbackbone.data());
-    if(xFile.exists() == false)
-    {
-        return false;
-    }
-    return true;
-}
-int main(int argc, char *argv[])
-{
-    QCoreApplication a(argc, argv);
-
-    //    RegisterIVBackTrace();
-    tracker.setSettings(settings);
-    gfault = new iv::Ivfault("lidar_pointpillar");
-    givlog = new iv::Ivlog("lidar_pointpillar");
-
-    gfault->SetFaultState(0,0,"pointpillar initialize. ");
-
-    char * strhome = getenv("HOME");
-    std::string pfe_file = strhome;
-    pfe_file += "/models/lidar/cbgs_pp_multihead_pfe.onnx";
-    std::string pfe_trt_file = pfe_file.substr(0, pfe_file.find(".")) + ".trt";
-
-    std::string backbone_file = strhome;
-    backbone_file += "/models/lidar/cbgs_pp_multihead_backbone.onnx";
-    std::string backbone_trt_file = backbone_file.substr(0, backbone_file.find(".")) + ".trt";
-
-    bool btrtexist = trtisexist(pfe_trt_file,backbone_trt_file);
-
-
-    QString strpath = QCoreApplication::applicationDirPath();
-    std::string pp_config = strpath.toStdString() ;
-    pp_config += "/cfgs/cbgs_pp_multihead.yaml";
-    if (argc < 2)
-        strpath = strpath + "/detection_lidar_pointpillar.xml";
-    else
-        strpath = argv[1];
-
-    std::cout<<pp_config<<std::endl;
-
-    iv::xmlparam::Xmlparam xparam(strpath.toStdString());
-    pfe_file = xparam.GetParam("pfe_file",pfe_file.data());
-    backbone_file = xparam.GetParam("backbone_file",backbone_file.data());
-    gstrinput = xparam.GetParam("input","lidar_pc");
-    gstroutput = xparam.GetParam("output","lidar_pointpillar");
-
-    if(btrtexist == false)
-    {
-
-        std::cout<<"use onnx model."<<std::endl;
-        pPillars = new PointPillars(
-                    0.4,
-                    0.2,
-                    true,
-                    pfe_file,
-                    backbone_file,
-                    pp_config
-                    );
-    }
-    else
-    {
-        std::cout<<"use trt model."<<std::endl;
-        pPillars = new PointPillars(
-                    0.1,
-                    0.2,
-                    false,
-                    pfe_trt_file,
-                    backbone_trt_file,
-                    pp_config
-                    );
-    }
-    std::cout<<"PointPillars Init OK."<<std::endl;
-
-    gpa = iv::modulecomm::RegisterRecv(gstrinput.data(),ListenPointCloud);
-    gpdetect = iv::modulecomm::RegisterSend(gstroutput.data(), 10000000,1);
-    gpthread = new std::thread(statethread);
-
-    iv::ivexit::RegIVExitCall(exitfunc);
-    return a.exec();
-}

+ 0 - 422
src/detection/detection_lidar_PointPillars_MultiHead_1025/nms.cu

@@ -1,422 +0,0 @@
-/*
-3D IoU Calculation and Rotated NMS(modified from 2D NMS written by others)
-Written by Shaoshuai Shi
-All Rights Reserved 2019-2020.
-*/
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-#include <stdio.h>
-#include "nms.h"
-#include "common.h"
-#define THREADS_PER_BLOCK 16
-#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
-
-// #define DEBUG
-const int THREADS_PER_BLOCK_NMS = sizeof(unsigned long long) * 8;
-const float EPS = 1e-8;
-struct Point {
-    float x, y;
-    __device__ Point() {}
-    __device__ Point(double _x, double _y){
-        x = _x, y = _y;
-    }
-
-    __device__ void set(float _x, float _y){
-        x = _x; y = _y;
-    }
-
-    __device__ Point operator +(const Point &b)const{
-        return Point(x + b.x, y + b.y);
-    }
-
-    __device__ Point operator -(const Point &b)const{
-        return Point(x - b.x, y - b.y);
-    }
-};
-
-__device__ inline float cross(const Point &a, const Point &b){
-    return a.x * b.y - a.y * b.x;
-}
-
-__device__ inline float cross(const Point &p1, const Point &p2, const Point &p0){
-    return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
-}
-
-__device__ int check_rect_cross(const Point &p1, const Point &p2, const Point &q1, const Point &q2){
-    int ret = min(p1.x,p2.x) <= max(q1.x,q2.x)  &&
-              min(q1.x,q2.x) <= max(p1.x,p2.x) &&
-              min(p1.y,p2.y) <= max(q1.y,q2.y) &&
-              min(q1.y,q2.y) <= max(p1.y,p2.y);
-    return ret;
-}
-
-__device__ inline int check_in_box2d(const float *box, const Point &p){
-    //params: (7) [x, y, z, dx, dy, dz, heading]
-    const float MARGIN = 1e-2;
-
-    float center_x = box[0], center_y = box[1];
-    float angle_cos = cos(-box[6]), angle_sin = sin(-box[6]);  // rotate the point in the opposite direction of box
-    float rot_x = (p.x - center_x) * angle_cos + (p.y - center_y) * (-angle_sin);
-    float rot_y = (p.x - center_x) * angle_sin + (p.y - center_y) * angle_cos;
-
-    return (fabs(rot_x) < box[3] / 2 + MARGIN && fabs(rot_y) < box[4] / 2 + MARGIN);
-}
-
-__device__ inline int intersection(const Point &p1, const Point &p0, const Point &q1, const Point &q0, Point &ans){
-    // fast exclusion
-    if (check_rect_cross(p0, p1, q0, q1) == 0) return 0;
-
-    // check cross standing
-    float s1 = cross(q0, p1, p0);
-    float s2 = cross(p1, q1, p0);
-    float s3 = cross(p0, q1, q0);
-    float s4 = cross(q1, p1, q0);
-
-    if (!(s1 * s2 > 0 && s3 * s4 > 0)) return 0;
-
-    // calculate intersection of two lines
-    float s5 = cross(q1, p1, p0);
-    if(fabs(s5 - s1) > EPS){
-        ans.x = (s5 * q0.x - s1 * q1.x) / (s5 - s1);
-        ans.y = (s5 * q0.y - s1 * q1.y) / (s5 - s1);
-
-    }
-    else{
-        float a0 = p0.y - p1.y, b0 = p1.x - p0.x, c0 = p0.x * p1.y - p1.x * p0.y;
-        float a1 = q0.y - q1.y, b1 = q1.x - q0.x, c1 = q0.x * q1.y - q1.x * q0.y;
-        float D = a0 * b1 - a1 * b0;
-
-        ans.x = (b0 * c1 - b1 * c0) / D;
-        ans.y = (a1 * c0 - a0 * c1) / D;
-    }
-
-    return 1;
-}
-
-__device__ inline void rotate_around_center(const Point &center, const float angle_cos, const float angle_sin, Point &p){
-    float new_x = (p.x - center.x) * angle_cos + (p.y - center.y) * (-angle_sin) + center.x;
-    float new_y = (p.x - center.x) * angle_sin + (p.y - center.y) * angle_cos + center.y;
-    p.set(new_x, new_y);
-}
-
-__device__ inline int point_cmp(const Point &a, const Point &b, const Point &center){
-    return atan2(a.y - center.y, a.x - center.x) > atan2(b.y - center.y, b.x - center.x);
-}
-
-__device__ inline float box_overlap(const float *box_a, const float *box_b){
-    // params box_a: [x, y, z, dx, dy, dz, heading]
-    // params box_b: [x, y, z, dx, dy, dz, heading]
-
-    float a_angle = box_a[6], b_angle = box_b[6];
-    float a_dx_half = box_a[3] / 2, b_dx_half = box_b[3] / 2, a_dy_half = box_a[4] / 2, b_dy_half = box_b[4] / 2;
-    float a_x1 = box_a[0] - a_dx_half, a_y1 = box_a[1] - a_dy_half;
-    float a_x2 = box_a[0] + a_dx_half, a_y2 = box_a[1] + a_dy_half;
-    float b_x1 = box_b[0] - b_dx_half, b_y1 = box_b[1] - b_dy_half;
-    float b_x2 = box_b[0] + b_dx_half, b_y2 = box_b[1] + b_dy_half;
-
-    Point center_a(box_a[0], box_a[1]);
-    Point center_b(box_b[0], box_b[1]);
-
-#ifdef DEBUG
-    printf("a: (%.3f, %.3f, %.3f, %.3f, %.3f), b: (%.3f, %.3f, %.3f, %.3f, %.3f)\n", a_x1, a_y1, a_x2, a_y2, a_angle,
-           b_x1, b_y1, b_x2, b_y2, b_angle);
-    printf("center a: (%.3f, %.3f), b: (%.3f, %.3f)\n", center_a.x, center_a.y, center_b.x, center_b.y);
-#endif
-
-    Point box_a_corners[5];
-    box_a_corners[0].set(a_x1, a_y1);
-    box_a_corners[1].set(a_x2, a_y1);
-    box_a_corners[2].set(a_x2, a_y2);
-    box_a_corners[3].set(a_x1, a_y2);
-
-    Point box_b_corners[5];
-    box_b_corners[0].set(b_x1, b_y1);
-    box_b_corners[1].set(b_x2, b_y1);
-    box_b_corners[2].set(b_x2, b_y2);
-    box_b_corners[3].set(b_x1, b_y2);
-
-    // get oriented corners
-    float a_angle_cos = cos(a_angle), a_angle_sin = sin(a_angle);
-    float b_angle_cos = cos(b_angle), b_angle_sin = sin(b_angle);
-
-    for (int k = 0; k < 4; k++){
-#ifdef DEBUG
-        printf("before corner %d: a(%.3f, %.3f), b(%.3f, %.3f) \n", k, box_a_corners[k].x, box_a_corners[k].y, box_b_corners[k].x, box_b_corners[k].y);
-#endif
-        rotate_around_center(center_a, a_angle_cos, a_angle_sin, box_a_corners[k]);
-        rotate_around_center(center_b, b_angle_cos, b_angle_sin, box_b_corners[k]);
-#ifdef DEBUG
-        printf("corner %d: a(%.3f, %.3f), b(%.3f, %.3f) \n", k, box_a_corners[k].x, box_a_corners[k].y, box_b_corners[k].x, box_b_corners[k].y);
-#endif
-    }
-
-    box_a_corners[4] = box_a_corners[0];
-    box_b_corners[4] = box_b_corners[0];
-
-    // get intersection of lines
-    Point cross_points[16];
-    Point poly_center;
-    int cnt = 0, flag = 0;
-
-    poly_center.set(0, 0);
-    for (int i = 0; i < 4; i++){
-        for (int j = 0; j < 4; j++){
-            flag = intersection(box_a_corners[i + 1], box_a_corners[i], box_b_corners[j + 1], box_b_corners[j], cross_points[cnt]);
-            if (flag){
-                poly_center = poly_center + cross_points[cnt];
-                cnt++;
-#ifdef DEBUG
-                printf("Cross points (%.3f, %.3f): a(%.3f, %.3f)->(%.3f, %.3f), b(%.3f, %.3f)->(%.3f, %.3f) \n",
-                    cross_points[cnt - 1].x, cross_points[cnt - 1].y,
-                    box_a_corners[i].x, box_a_corners[i].y, box_a_corners[i + 1].x, box_a_corners[i + 1].y,
-                    box_b_corners[i].x, box_b_corners[i].y, box_b_corners[i + 1].x, box_b_corners[i + 1].y);
-#endif
-            }
-        }
-    }
-
-    // check corners
-    for (int k = 0; k < 4; k++){
-        if (check_in_box2d(box_a, box_b_corners[k])){
-            poly_center = poly_center + box_b_corners[k];
-            cross_points[cnt] = box_b_corners[k];
-            cnt++;
-#ifdef DEBUG
-                printf("b corners in a: corner_b(%.3f, %.3f)", cross_points[cnt - 1].x, cross_points[cnt - 1].y);
-#endif
-        }
-        if (check_in_box2d(box_b, box_a_corners[k])){
-            poly_center = poly_center + box_a_corners[k];
-            cross_points[cnt] = box_a_corners[k];
-            cnt++;
-#ifdef DEBUG
-                printf("a corners in b: corner_a(%.3f, %.3f)", cross_points[cnt - 1].x, cross_points[cnt - 1].y);
-#endif
-        }
-    }
-
-    poly_center.x /= cnt;
-    poly_center.y /= cnt;
-
-    // sort the points of polygon
-    Point temp;
-    for (int j = 0; j < cnt - 1; j++){
-        for (int i = 0; i < cnt - j - 1; i++){
-            if (point_cmp(cross_points[i], cross_points[i + 1], poly_center)){
-                temp = cross_points[i];
-                cross_points[i] = cross_points[i + 1];
-                cross_points[i + 1] = temp;
-            }
-        }
-    }
-
-#ifdef DEBUG
-    printf("cnt=%d\n", cnt);
-    for (int i = 0; i < cnt; i++){
-        printf("All cross point %d: (%.3f, %.3f)\n", i, cross_points[i].x, cross_points[i].y);
-    }
-#endif
-
-    // get the overlap areas
-    float area = 0;
-    for (int k = 0; k < cnt - 1; k++){
-        area += cross(cross_points[k] - cross_points[0], cross_points[k + 1] - cross_points[0]);
-    }
-
-    return fabs(area) / 2.0;
-}
-
-__device__ inline float iou_bev(const float *box_a, const float *box_b){
-    // params box_a: [x, y, z, dx, dy, dz, heading]
-    // params box_b: [x, y, z, dx, dy, dz, heading]
-    float sa = box_a[3] * box_a[4];
-    float sb = box_b[3] * box_b[4];
-    float s_overlap = box_overlap(box_a, box_b);
-    return s_overlap / fmaxf(sa + sb - s_overlap, EPS);
-}
-
-__global__ void boxes_overlap_kernel(const int num_a, const float *boxes_a, const int num_b, const float *boxes_b, float *ans_overlap){
-    // params boxes_a: (N, 7) [x, y, z, dx, dy, dz, heading]
-    // params boxes_b: (M, 7) [x, y, z, dx, dy, dz, heading]
-    const int a_idx = blockIdx.y * THREADS_PER_BLOCK + threadIdx.y;
-    const int b_idx = blockIdx.x * THREADS_PER_BLOCK + threadIdx.x;
-
-    if (a_idx >= num_a || b_idx >= num_b){
-        return;
-    }
-    const float * cur_box_a = boxes_a + a_idx * 7;
-    const float * cur_box_b = boxes_b + b_idx * 7;
-    float s_overlap = box_overlap(cur_box_a, cur_box_b);
-    ans_overlap[a_idx * num_b + b_idx] = s_overlap;
-}
-
-__global__ void boxes_iou_bev_kernel(const int num_a, const float *boxes_a, const int num_b, const float *boxes_b, float *ans_iou){
-    // params boxes_a: (N, 7) [x, y, z, dx, dy, dz, heading]
-    // params boxes_b: (M, 7) [x, y, z, dx, dy, dz, heading]
-    const int a_idx = blockIdx.y * THREADS_PER_BLOCK + threadIdx.y;
-    const int b_idx = blockIdx.x * THREADS_PER_BLOCK + threadIdx.x;
-
-    if (a_idx >= num_a || b_idx >= num_b){
-        return;
-    }
-
-    const float * cur_box_a = boxes_a + a_idx * 7;
-    const float * cur_box_b = boxes_b + b_idx * 7;
-    float cur_iou_bev = iou_bev(cur_box_a, cur_box_b);
-    ans_iou[a_idx * num_b + b_idx] = cur_iou_bev;
-}
-
-__global__ void nms_kernel(const int boxes_num, const float nms_overlap_thresh,
-                           const float *boxes, unsigned long long *mask){
-    //params: boxes (N, 7) [x, y, z, dx, dy, dz, heading]
-    //params: mask (N, N/THREADS_PER_BLOCK_NMS)
-
-    const int row_start = blockIdx.y;
-    const int col_start = blockIdx.x;
-
-    // if (row_start > col_start) return;
-
-    const int row_size = fminf(boxes_num - row_start * THREADS_PER_BLOCK_NMS, THREADS_PER_BLOCK_NMS);
-    const int col_size = fminf(boxes_num - col_start * THREADS_PER_BLOCK_NMS, THREADS_PER_BLOCK_NMS);
-
-    __shared__ float block_boxes[THREADS_PER_BLOCK_NMS * 7];
-
-    if (threadIdx.x < col_size) {
-        block_boxes[threadIdx.x * 7 + 0] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 0];
-        block_boxes[threadIdx.x * 7 + 1] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 1];
-        block_boxes[threadIdx.x * 7 + 2] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 2];
-        block_boxes[threadIdx.x * 7 + 3] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 3];
-        block_boxes[threadIdx.x * 7 + 4] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 4];
-        block_boxes[threadIdx.x * 7 + 5] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 5];
-        block_boxes[threadIdx.x * 7 + 6] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 6];
-    }
-    __syncthreads();
-
-    if (threadIdx.x < row_size) {
-        const int cur_box_idx = THREADS_PER_BLOCK_NMS * row_start + threadIdx.x;
-        const float *cur_box = boxes + cur_box_idx * 7;
-
-        int i = 0;
-        unsigned long long t = 0;
-        int start = 0;
-        if (row_start == col_start) {
-          start = threadIdx.x + 1;
-        }
-        for (i = start; i < col_size; i++) {
-            if (iou_bev(cur_box, block_boxes + i * 7) > nms_overlap_thresh){
-                t |= 1ULL << i;
-            }
-        }
-        const int col_blocks = DIVUP(boxes_num, THREADS_PER_BLOCK_NMS);
-        mask[cur_box_idx * col_blocks + col_start] = t;
-    }
-}
-
-
-__device__ inline float iou_normal(float const * const a, float const * const b) {
-    //params: a: [x, y, z, dx, dy, dz, heading]
-    //params: b: [x, y, z, dx, dy, dz, heading]
-
-    float left = fmaxf(a[0] - a[3] / 2, b[0] - b[3] / 2), right = fminf(a[0] + a[3] / 2, b[0] + b[3] / 2);
-    float top = fmaxf(a[1] - a[4] / 2, b[1] - b[4] / 2), bottom = fminf(a[1] + a[4] / 2, b[1] + b[4] / 2);
-    float width = fmaxf(right - left, 0.f), height = fmaxf(bottom - top, 0.f);
-    float interS = width * height;
-    float Sa = a[3] * a[4];
-    float Sb = b[3] * b[4];
-    return interS / fmaxf(Sa + Sb - interS, EPS);
-}
-
-
-__global__ void nms_normal_kernel(const int boxes_num, const float nms_overlap_thresh,
-                           const float *boxes, unsigned long long *mask){
-    //params: boxes (N, 7) [x, y, z, dx, dy, dz, heading]
-    //params: mask (N, N/THREADS_PER_BLOCK_NMS)
-
-    const int row_start = blockIdx.y;
-    const int col_start = blockIdx.x;
-
-    // if (row_start > col_start) return;
-
-    const int row_size = fminf(boxes_num - row_start * THREADS_PER_BLOCK_NMS, THREADS_PER_BLOCK_NMS);
-    const int col_size = fminf(boxes_num - col_start * THREADS_PER_BLOCK_NMS, THREADS_PER_BLOCK_NMS);
-
-    __shared__ float block_boxes[THREADS_PER_BLOCK_NMS * 7];
-
-    if (threadIdx.x < col_size) {
-        block_boxes[threadIdx.x * 7 + 0] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 0];
-        block_boxes[threadIdx.x * 7 + 1] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 1];
-        block_boxes[threadIdx.x * 7 + 2] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 2];
-        block_boxes[threadIdx.x * 7 + 3] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 3];
-        block_boxes[threadIdx.x * 7 + 4] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 4];
-        block_boxes[threadIdx.x * 7 + 5] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 5];
-        block_boxes[threadIdx.x * 7 + 6] = boxes[(THREADS_PER_BLOCK_NMS * col_start + threadIdx.x) * 7 + 6];
-    }
-    __syncthreads();
-
-    if (threadIdx.x < row_size) {
-        const int cur_box_idx = THREADS_PER_BLOCK_NMS * row_start + threadIdx.x;
-        const float *cur_box = boxes + cur_box_idx * 7;
-
-        int i = 0;
-        unsigned long long t = 0;
-        int start = 0;
-        if (row_start == col_start) {
-          start = threadIdx.x + 1;
-        }
-        for (i = start; i < col_size; i++) {
-            if (iou_normal(cur_box, block_boxes + i * 7) > nms_overlap_thresh){
-                t |= 1ULL << i;
-            }
-        }
-        const int col_blocks = DIVUP(boxes_num, THREADS_PER_BLOCK_NMS);
-        mask[cur_box_idx * col_blocks + col_start] = t;
-    }
-}
-
-
-NmsCuda::NmsCuda(const int num_threads, const int num_box_corners,
-    const float nms_overlap_threshold)
-: num_threads_(num_threads),
-  num_box_corners_(num_box_corners),
-  nms_overlap_threshold_(nms_overlap_threshold) {}
-
-void NmsCuda::DoNmsCuda(const int host_filter_count,
-    float *dev_sorted_box_for_nms, long *out_keep_inds,
-    int *out_num_to_keep) {
-
-    const int col_blocks = DIVUP(host_filter_count, num_threads_);
-    unsigned long long *dev_mask = NULL;
-    GPU_CHECK(cudaMalloc(&dev_mask, host_filter_count * col_blocks * sizeof(unsigned long long)));    
-
-    dim3 blocks(DIVUP(host_filter_count, num_threads_),
-                DIVUP(host_filter_count, num_threads_));
-    dim3 threads(num_threads_);
-
-    nms_kernel<<<blocks, threads>>>(host_filter_count, nms_overlap_threshold_, dev_sorted_box_for_nms, dev_mask);
-    // postprocess for nms output
-    std::vector<unsigned long long> host_mask(host_filter_count * col_blocks);
-    GPU_CHECK(cudaMemcpy(&host_mask[0], dev_mask,
-            sizeof(unsigned long long) * host_filter_count * col_blocks,
-            cudaMemcpyDeviceToHost));
-    std::vector<unsigned long long> remv(col_blocks);
-    memset(&remv[0], 0, sizeof(unsigned long long) * col_blocks);
-
-    for (int i = 0; i < host_filter_count; ++i) {
-        int nblock = i / num_threads_;
-        int inblock = i % num_threads_;
-
-        if (!(remv[nblock] & (1ULL << inblock))) {
-            out_keep_inds[(*out_num_to_keep)++] = i;
-            unsigned long long *p = &host_mask[0] + i * col_blocks;
-            for (int j = nblock; j < col_blocks; ++j) {
-                remv[j] |= p[j];
-            }
-        }
-    }
-    GPU_CHECK(cudaFree(dev_mask));
-}

+ 0 - 64
src/detection/detection_lidar_PointPillars_MultiHead_1025/nms.h

@@ -1,64 +0,0 @@
-
-/*
-3D IoU Calculation and Rotated NMS(modified from 2D NMS written by others)
-Written by Shaoshuai Shi
-All Rights Reserved 2019-2020.
-*/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-class NmsCuda {
- private:
-  const int num_threads_;
-  const int num_box_corners_;
-  const float nms_overlap_threshold_;
-
- public:
-  /**
-   * @brief Constructor
-   * @param[in] num_threads Number of threads when launching cuda kernel
-   * @param[in] num_box_corners Number of corners for 2D box
-   * @param[in] nms_overlap_threshold IOU threshold for NMS
-   * @details Captital variables never change after the compile, Non-captital
-   * variables could be chaned through rosparam
-   */
-  NmsCuda(const int num_threads, const int num_box_corners,
-          const float nms_overlap_threshold);
-
-  /**
-   * @brief GPU Non-Maximum Suppresion for network output
-   * @param[in] host_filter_count Number of filtered output
-   * @param[in] dev_sorted_box_for_nms Bounding box output sorted by score
-   * @param[out] out_keep_inds Indexes of selected bounding box
-   * @param[out] out_num_to_keep Number of kept bounding boxes
-   * @details NMS in GPU and postprocessing for selecting box in CPU
-   */
-  void DoNmsCuda(const int host_filter_count, float* dev_sorted_box_for_nms,
-                 long* out_keep_inds, int* out_num_to_keep);
-};

+ 0 - 507
src/detection/detection_lidar_PointPillars_MultiHead_1025/pointpillars.cc

@@ -1,507 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-
-
-#include "pointpillars.h"
-
-#include <chrono>
-#include <iostream>
-#include <iostream>
-
-PointPillars::PointPillars(const float score_threshold,
-                           const float nms_overlap_threshold,
-                           const bool use_onnx,
-                           const std::string pfe_file,
-                           const std::string backbone_file,
-                           const std::string pp_config)
-    : score_threshold_(score_threshold),
-      nms_overlap_threshold_(nms_overlap_threshold),
-      use_onnx_(use_onnx),
-      pfe_file_(pfe_file),
-      backbone_file_(backbone_file),
-      pp_config_(pp_config)
-{
-    InitParams();
-    InitTRT(use_onnx_);
-    DeviceMemoryMalloc();
-
-    preprocess_points_cuda_ptr_.reset(new PreprocessPointsCuda(
-        kNumThreads,
-        kMaxNumPillars,
-        kMaxNumPointsPerPillar,
-        kNumPointFeature,
-        kNumIndsForScan,
-        kGridXSize,kGridYSize, kGridZSize,
-        kPillarXSize,kPillarYSize, kPillarZSize,
-        kMinXRange, kMinYRange, kMinZRange));
-
-    scatter_cuda_ptr_.reset(new ScatterCuda(kNumThreads, kGridXSize, kGridYSize));
-
-    const float float_min = std::numeric_limits<float>::lowest();
-    const float float_max = std::numeric_limits<float>::max();
-    postprocess_cuda_ptr_.reset(
-      new PostprocessCuda(kNumThreads,
-                          float_min, float_max, 
-                          kNumClass,kNumAnchorPerCls,
-                          kMultiheadLabelMapping,
-                          score_threshold_, 
-                          nms_overlap_threshold_,
-                          kNmsPreMaxsize, 
-                          kNmsPostMaxsize,
-                          kNumBoxCorners, 
-                          kNumInputBoxFeature,
-                          7));  /*kNumOutputBoxFeature*/
-    
-}
-
-PointPillars::~PointPillars() {
-    // for pillars 
-    GPU_CHECK(cudaFree(dev_num_points_per_pillar_));
-    GPU_CHECK(cudaFree(dev_x_coors_));
-    GPU_CHECK(cudaFree(dev_y_coors_));
-    GPU_CHECK(cudaFree(dev_pillar_point_feature_));
-    GPU_CHECK(cudaFree(dev_pillar_coors_));
-    // for sparse map
-    GPU_CHECK(cudaFree(dev_sparse_pillar_map_));    
-    GPU_CHECK(cudaFree(dev_cumsum_along_x_));
-    GPU_CHECK(cudaFree(dev_cumsum_along_y_));
-    // for pfe forward
-    GPU_CHECK(cudaFree(dev_pfe_gather_feature_));
-      
-    GPU_CHECK(cudaFree(pfe_buffers_[0]));
-    GPU_CHECK(cudaFree(pfe_buffers_[1]));
-
-    GPU_CHECK(cudaFree(rpn_buffers_[0]));
-    GPU_CHECK(cudaFree(rpn_buffers_[1]));
-    GPU_CHECK(cudaFree(rpn_buffers_[2]));
-    GPU_CHECK(cudaFree(rpn_buffers_[3]));
-    GPU_CHECK(cudaFree(rpn_buffers_[4]));
-    GPU_CHECK(cudaFree(rpn_buffers_[5]));
-    GPU_CHECK(cudaFree(rpn_buffers_[6]));
-    GPU_CHECK(cudaFree(rpn_buffers_[7]));
-    pfe_context_->destroy();
-    backbone_context_->destroy();
-    pfe_engine_->destroy();
-    backbone_engine_->destroy();
-    // for post process
-    GPU_CHECK(cudaFree(dev_scattered_feature_));
-    GPU_CHECK(cudaFree(dev_filtered_box_));
-    GPU_CHECK(cudaFree(dev_filtered_score_));
-    GPU_CHECK(cudaFree(dev_filtered_label_));
-    GPU_CHECK(cudaFree(dev_filtered_dir_));
-    GPU_CHECK(cudaFree(dev_box_for_nms_));
-    GPU_CHECK(cudaFree(dev_filter_count_));
-
-
-}
-
-void PointPillars::InitParams()
-{
-    YAML::Node params = YAML::LoadFile(pp_config_);
-    kPillarXSize = params["DATA_CONFIG"]["DATA_PROCESSOR"][2]["VOXEL_SIZE"][0].as<float>();
-    kPillarYSize = params["DATA_CONFIG"]["DATA_PROCESSOR"][2]["VOXEL_SIZE"][1].as<float>();
-    kPillarZSize = params["DATA_CONFIG"]["DATA_PROCESSOR"][2]["VOXEL_SIZE"][2].as<float>();
-    kMinXRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][0].as<float>();
-    kMinYRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][1].as<float>();
-    kMinZRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][2].as<float>();
-    kMaxXRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][3].as<float>();
-    kMaxYRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][4].as<float>();
-    kMaxZRange = params["DATA_CONFIG"]["POINT_CLOUD_RANGE"][5].as<float>();
-    kNumClass = params["CLASS_NAMES"].size();
-    kMaxNumPillars = params["DATA_CONFIG"]["DATA_PROCESSOR"][2]["MAX_NUMBER_OF_VOXELS"]["test"].as<int>();
-    kMaxNumPointsPerPillar = params["DATA_CONFIG"]["DATA_PROCESSOR"][2]["MAX_POINTS_PER_VOXEL"].as<int>();
-    kNumPointFeature = 5; // [x, y, z, i,0]
-    kNumInputBoxFeature = 7;
-    kNumOutputBoxFeature = params["MODEL"]["DENSE_HEAD"]["TARGET_ASSIGNER_CONFIG"]["BOX_CODER_CONFIG"]["code_size"].as<int>();
-    kBatchSize = 1;
-    kNumIndsForScan = 1024;
-    kNumThreads = 64;
-    kNumBoxCorners = 8;
-    kAnchorStrides = 4;
-    kNmsPreMaxsize = params["MODEL"]["POST_PROCESSING"]["NMS_CONFIG"]["NMS_PRE_MAXSIZE"].as<int>();
-    kNmsPostMaxsize = params["MODEL"]["POST_PROCESSING"]["NMS_CONFIG"]["NMS_POST_MAXSIZE"].as<int>();
-    //params for initialize anchors
-    //Adapt to OpenPCDet
-    kAnchorNames = params["CLASS_NAMES"].as<std::vector<std::string>>();
-    for (int i = 0; i < kAnchorNames.size(); ++i)
-    {
-        kAnchorDxSizes.emplace_back(params["MODEL"]["DENSE_HEAD"]["ANCHOR_GENERATOR_CONFIG"][i]["anchor_sizes"][0][0].as<float>());
-        kAnchorDySizes.emplace_back(params["MODEL"]["DENSE_HEAD"]["ANCHOR_GENERATOR_CONFIG"][i]["anchor_sizes"][0][1].as<float>());
-        kAnchorDzSizes.emplace_back(params["MODEL"]["DENSE_HEAD"]["ANCHOR_GENERATOR_CONFIG"][i]["anchor_sizes"][0][2].as<float>());
-        kAnchorBottom.emplace_back(params["MODEL"]["DENSE_HEAD"]["ANCHOR_GENERATOR_CONFIG"][i]["anchor_bottom_heights"][0].as<float>());
-    }
-    for (int idx_head = 0; idx_head < params["MODEL"]["DENSE_HEAD"]["RPN_HEAD_CFGS"].size(); ++idx_head)
-    {
-        int num_cls_per_head = params["MODEL"]["DENSE_HEAD"]["RPN_HEAD_CFGS"][idx_head]["HEAD_CLS_NAME"].size();
-        std::vector<int> value;
-        for (int i = 0; i < num_cls_per_head; ++i)
-        {
-            value.emplace_back(idx_head + i);
-        }
-        kMultiheadLabelMapping.emplace_back(value);
-    }
-
-    // Generate secondary parameters based on above.
-    kGridXSize = static_cast<int>((kMaxXRange - kMinXRange) / kPillarXSize); //512
-    kGridYSize = static_cast<int>((kMaxYRange - kMinYRange) / kPillarYSize); //512
-    kGridZSize = static_cast<int>((kMaxZRange - kMinZRange) / kPillarZSize); //1
-    kRpnInputSize = 64 * kGridYSize * kGridXSize;
-
-    kNumAnchorXinds = static_cast<int>(kGridXSize / kAnchorStrides); //Width
-    kNumAnchorYinds = static_cast<int>(kGridYSize / kAnchorStrides); //Hight
-    kNumAnchor = kNumAnchorXinds * kNumAnchorYinds * 2 * kNumClass;  // H * W * Ro * N = 196608
-
-    kNumAnchorPerCls = kNumAnchorXinds * kNumAnchorYinds * 2; //H * W * Ro = 32768
-    kRpnBoxOutputSize = kNumAnchor * kNumOutputBoxFeature;
-    kRpnClsOutputSize = kNumAnchor * kNumClass;
-    kRpnDirOutputSize = kNumAnchor * 2;
-}
-
-void PointPillars::DeviceMemoryMalloc() {
-    // for pillars 
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_num_points_per_pillar_), kMaxNumPillars * sizeof(float))); // M
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_x_coors_), kMaxNumPillars * sizeof(int))); // M
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_y_coors_), kMaxNumPillars * sizeof(int))); // M
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pillar_point_feature_), kMaxNumPillars * kMaxNumPointsPerPillar * kNumPointFeature * sizeof(float))); // [M , m , 4]
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pillar_coors_),  kMaxNumPillars * 4 * sizeof(float))); // [M , 4]
-    // for sparse map
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_sparse_pillar_map_), kNumIndsForScan * kNumIndsForScan * sizeof(int))); // [1024 , 1024]
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_cumsum_along_x_), kNumIndsForScan * kNumIndsForScan * sizeof(int))); // [1024 , 1024]
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_cumsum_along_y_), kNumIndsForScan * kNumIndsForScan * sizeof(int)));// [1024 , 1024]
-
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pfe_gather_feature_),
-                        kMaxNumPillars * kMaxNumPointsPerPillar *
-                            kNumGatherPointFeature * sizeof(float)));
-    // for trt inference
-    // create GPU buffers and a stream
-
-    GPU_CHECK(
-        cudaMalloc(&pfe_buffers_[0], kMaxNumPillars * kMaxNumPointsPerPillar *
-                                        kNumGatherPointFeature * sizeof(float)));
-    GPU_CHECK(cudaMalloc(&pfe_buffers_[1], kMaxNumPillars * 64 * sizeof(float)));
-
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[0],  kRpnInputSize * sizeof(float)));
-
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[1],  kNumAnchorPerCls  * sizeof(float)));  //classes
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[2],  kNumAnchorPerCls  * 2 * 2 * sizeof(float)));
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[3],  kNumAnchorPerCls  * 2 * 2 * sizeof(float)));
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[4],  kNumAnchorPerCls  * sizeof(float)));
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[5],  kNumAnchorPerCls  * 2 * 2 * sizeof(float)));
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[6],  kNumAnchorPerCls  * 2 * 2 * sizeof(float)));
-    
-    GPU_CHECK(cudaMalloc(&rpn_buffers_[7],  kNumAnchorPerCls * kNumClass * kNumOutputBoxFeature * sizeof(float))); //boxes
-
-    // for scatter kernel
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_scattered_feature_),
-                        kNumThreads * kGridYSize * kGridXSize * sizeof(float)));
-    // for filter
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_filtered_box_),
-                        kNumAnchor * kNumOutputBoxFeature * sizeof(float)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_filtered_score_),
-                        kNumAnchor * sizeof(float)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_filtered_label_),
-                        kNumAnchor * sizeof(int)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_filtered_dir_),
-                        kNumAnchor * sizeof(int)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_box_for_nms_),
-                        kNumAnchor * kNumBoxCorners * sizeof(float)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_filter_count_), kNumClass * sizeof(int)));
-
-}
-
-void PointPillars::SetDeviceMemoryToZero() {
-
-    GPU_CHECK(cudaMemset(dev_num_points_per_pillar_, 0, kMaxNumPillars * sizeof(float)));
-    GPU_CHECK(cudaMemset(dev_x_coors_,               0, kMaxNumPillars * sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_y_coors_,               0, kMaxNumPillars * sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_pillar_point_feature_,  0, kMaxNumPillars * kMaxNumPointsPerPillar * kNumPointFeature * sizeof(float)));
-    GPU_CHECK(cudaMemset(dev_pillar_coors_,          0, kMaxNumPillars * 4 * sizeof(float)));
-    // GPU_CHECK(cudaMemset(dev_sparse_pillar_map_,     0, kNumIndsForScan * kNumIndsForScan * sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_pfe_gather_feature_,    0, kMaxNumPillars * kMaxNumPointsPerPillar * kNumGatherPointFeature * sizeof(float)));
-    
-    // GPU_CHECK(cudaMemset(pfe_buffers_[0],       0, kMaxNumPillars * kMaxNumPointsPerPillar * kNumGatherPointFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(pfe_buffers_[1],       0, kMaxNumPillars * 64 * sizeof(float)));
-
-    GPU_CHECK(cudaMemset(dev_scattered_feature_,    0, kNumThreads * kGridYSize * kGridXSize * sizeof(float)));
-    
-    // GPU_CHECK(cudaMemset(rpn_buffers_[0],    0, kRpnInputSize * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[1],    0, kNumAnchorPerCls * kNumOutputBoxFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[2],    0, kNumAnchorPerCls     * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[3],    0, kNumAnchorPerCls * 2 * kNumOutputBoxFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[4],    0, kNumAnchorPerCls * 4 * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[5],    0, kNumAnchorPerCls * kNumOutputBoxFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[6],    0, kNumAnchorPerCls     * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[7],    0, kNumAnchorPerCls * 2 * kNumOutputBoxFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[8],    0, kNumAnchorPerCls * 4 * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[9],    0, kNumAnchorPerCls * kNumOutputBoxFeature * sizeof(float)));
-    // GPU_CHECK(cudaMemset(rpn_buffers_[10],   0, kNumAnchorPerCls     * sizeof(float)));
-
-    GPU_CHECK(cudaMemset(dev_filtered_box_,     0, kNumAnchor * kNumOutputBoxFeature * sizeof(float)));
-    GPU_CHECK(cudaMemset(dev_filtered_score_,   0, kNumAnchor * sizeof(float)));
-    GPU_CHECK(cudaMemset(dev_filter_count_,     0, kNumClass * sizeof(int)));
-}
-
-void PointPillars::InitTRT(const bool use_onnx) {
-  if (use_onnx_) {
-    // create a TensorRT model from the onnx model and load it into an engine
-    OnnxToTRTModel(pfe_file_, &pfe_engine_);
-    SaveEngine(pfe_engine_, pfe_file_.substr(0, pfe_file_.find(".")) + ".trt");
-    OnnxToTRTModel(backbone_file_, &backbone_engine_);
-    SaveEngine(backbone_engine_, backbone_file_.substr(0, backbone_file_.find(".")) + ".trt");
-  }else {
-    EngineToTRTModel(pfe_file_, &pfe_engine_);
-    EngineToTRTModel(backbone_file_, &backbone_engine_);
-  }
-    if (pfe_engine_ == nullptr || backbone_engine_ == nullptr) {
-        std::cerr << "Failed to load ONNX file.";
-    }
-
-    // create execution context from the engine
-    pfe_context_ = pfe_engine_->createExecutionContext();
-    backbone_context_ = backbone_engine_->createExecutionContext();
-    if (pfe_context_ == nullptr || backbone_context_ == nullptr) {
-        std::cerr << "Failed to create TensorRT Execution Context.";
-    }
-  
-}
-
-void PointPillars::OnnxToTRTModel(
-    const std::string& model_file,  // name of the onnx model
-    nvinfer1::ICudaEngine** engine_ptr) {
-    int verbosity = static_cast<int>(nvinfer1::ILogger::Severity::kWARNING);
-
-    // create the builder
-    const auto explicit_batch =
-        static_cast<uint32_t>(kBatchSize) << static_cast<uint32_t>(
-            nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH);
-    nvinfer1::IBuilder* builder = nvinfer1::createInferBuilder(g_logger_);
-    nvinfer1::INetworkDefinition* network =
-        builder->createNetworkV2(explicit_batch);
-
-    // parse onnx model
-    auto parser = nvonnxparser::createParser(*network, g_logger_);
-    if (!parser->parseFromFile(model_file.c_str(), verbosity)) {
-        std::string msg("failed to parse onnx file");
-        g_logger_.log(nvinfer1::ILogger::Severity::kERROR, msg.c_str());
-        exit(EXIT_FAILURE);
-    }
-
-    // Build the engine
-    builder->setMaxBatchSize(kBatchSize);
-    builder->setHalf2Mode(true);
-    nvinfer1::IBuilderConfig* config = builder->createBuilderConfig();
-    config->setMaxWorkspaceSize(1 << 25);
-    nvinfer1::ICudaEngine* engine =
-        builder->buildEngineWithConfig(*network, *config);
-
-    *engine_ptr = engine;
-    parser->destroy();
-    network->destroy();
-    config->destroy();
-    builder->destroy();
-}
-
-void PointPillars::SaveEngine(const nvinfer1::ICudaEngine* engine, const std::string& engine_filepath)
-{
-    // serialize the engine, then close everything down
-    nvinfer1::IHostMemory& trtModelStream = *(engine->serialize());
-    std::ofstream file;
-    file.open(engine_filepath, std::ios::binary | std::ios::out);
-    if(!file.is_open())
-    {
-        std::cout << "read create engine file" << engine_filepath <<" failed" << std::endl;
-        return;
-    }
-    file.write((const char*)trtModelStream.data(), std::streamsize(trtModelStream.size()));
-    file.close();
-}
-
-void PointPillars::EngineToTRTModel(
-    const std::string &engine_file ,     
-    nvinfer1::ICudaEngine** engine_ptr)  {
-    int verbosity = static_cast<int>(nvinfer1::ILogger::Severity::kWARNING);
-    std::stringstream gieModelStream; 
-    gieModelStream.seekg(0, gieModelStream.beg); 
-
-    std::ifstream cache(engine_file); 
-    gieModelStream << cache.rdbuf();
-    cache.close(); 
-    nvinfer1::IRuntime* runtime = nvinfer1::createInferRuntime(g_logger_); 
-
-    if (runtime == nullptr) {
-        std::string msg("failed to build runtime parser");
-        g_logger_.log(nvinfer1::ILogger::Severity::kERROR, msg.c_str());
-        exit(EXIT_FAILURE);
-    }
-    gieModelStream.seekg(0, std::ios::end);
-    const int modelSize = gieModelStream.tellg(); 
-
-    gieModelStream.seekg(0, std::ios::beg);
-    void* modelMem = malloc(modelSize); 
-    gieModelStream.read((char*)modelMem, modelSize);
-
-    std::cout << "                                                                  "<< std::endl;
-    std::cout << "------------------------------------------------------------------"<< std::endl;
-    std::cout << ">>>>                                                          >>>>"<< std::endl;
-    std::cout << "                                                                  "<< std::endl;
-    std::cout << "Input filename:   " << engine_file << std::endl;
-    std::cout << "                                                                  "<< std::endl;
-    std::cout << ">>>>                                                          >>>>"<< std::endl;
-    std::cout << "------------------------------------------------------------------"<< std::endl;
-    std::cout << "                                                                  "<< std::endl;
-
-    nvinfer1::ICudaEngine* engine = runtime->deserializeCudaEngine(modelMem, modelSize, NULL); 
-    if (engine == nullptr) {
-        std::string msg("failed to build engine parser");
-        g_logger_.log(nvinfer1::ILogger::Severity::kERROR, msg.c_str());
-        exit(EXIT_FAILURE);
-    }
-    *engine_ptr = engine;
-
-}
-
-void PointPillars::DoInference(const float* in_points_array,
-                                const int in_num_points,
-                                std::vector<float>* out_detections,
-                                std::vector<int>* out_labels,
-                                std::vector<float>* out_scores) 
-{
-    SetDeviceMemoryToZero();
-    cudaDeviceSynchronize();
-    // [STEP 1] : load pointcloud
-    float* dev_points;
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_points),
-                        in_num_points * kNumPointFeature * sizeof(float))); // in_num_points , 5
-    GPU_CHECK(cudaMemset(dev_points, 0, in_num_points * kNumPointFeature * sizeof(float)));
-    GPU_CHECK(cudaMemcpy(dev_points, in_points_array,
-                        in_num_points * kNumPointFeature * sizeof(float),
-                        cudaMemcpyHostToDevice));
-    
-    // [STEP 2] : preprocess
-    host_pillar_count_[0] = 0;
-    auto preprocess_start = std::chrono::high_resolution_clock::now();
-    preprocess_points_cuda_ptr_->DoPreprocessPointsCuda(
-          dev_points, in_num_points, dev_x_coors_, dev_y_coors_,
-          dev_num_points_per_pillar_, dev_pillar_point_feature_, dev_pillar_coors_,
-          dev_sparse_pillar_map_, host_pillar_count_ ,
-          dev_pfe_gather_feature_ );
-    cudaDeviceSynchronize();
-    auto preprocess_end = std::chrono::high_resolution_clock::now();
-    // DEVICE_SAVE<float>(dev_pfe_gather_feature_,  kMaxNumPillars * kMaxNumPointsPerPillar * kNumGatherPointFeature  , "0_Model_pfe_input_gather_feature");
-
-    // [STEP 3] : pfe forward
-    cudaStream_t stream;
-    GPU_CHECK(cudaStreamCreate(&stream));
-    auto pfe_start = std::chrono::high_resolution_clock::now();
-    GPU_CHECK(cudaMemcpyAsync(pfe_buffers_[0], dev_pfe_gather_feature_,
-                            kMaxNumPillars * kMaxNumPointsPerPillar * kNumGatherPointFeature * sizeof(float), ///kNumGatherPointFeature
-                            cudaMemcpyDeviceToDevice, stream));
-    pfe_context_->enqueueV2(pfe_buffers_, stream, nullptr);
-    cudaDeviceSynchronize();
-    auto pfe_end = std::chrono::high_resolution_clock::now();
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(pfe_buffers_[1]),  kMaxNumPillars * 64 , "1_Model_pfe_output_buffers_[1]");
-
-    // [STEP 4] : scatter pillar feature
-    auto scatter_start = std::chrono::high_resolution_clock::now();
-    scatter_cuda_ptr_->DoScatterCuda(
-        host_pillar_count_[0], dev_x_coors_, dev_y_coors_,
-        reinterpret_cast<float*>(pfe_buffers_[1]), dev_scattered_feature_);
-    cudaDeviceSynchronize();
-    auto scatter_end = std::chrono::high_resolution_clock::now();   
-    // DEVICE_SAVE<float>(dev_scattered_feature_ ,  kRpnInputSize,"2_Model_backbone_input_dev_scattered_feature");
-
-    // [STEP 5] : backbone forward
-    auto backbone_start = std::chrono::high_resolution_clock::now();
-    GPU_CHECK(cudaMemcpyAsync(rpn_buffers_[0], dev_scattered_feature_,
-                            kBatchSize * kRpnInputSize * sizeof(float),
-                            cudaMemcpyDeviceToDevice, stream));
-    backbone_context_->enqueueV2(rpn_buffers_, stream, nullptr);
-    cudaDeviceSynchronize();
-    auto backbone_end = std::chrono::high_resolution_clock::now();
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[1]) ,  kNumAnchorPerCls    ,"3_rpn_buffers_[1]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[2]) ,  kNumAnchorPerCls * 4,"3_rpn_buffers_[2]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[3]) ,  kNumAnchorPerCls * 4,"3_rpn_buffers_[3]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[4]) ,  kNumAnchorPerCls    ,"3_rpn_buffers_[4]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[5]) ,  kNumAnchorPerCls * 4,"3_rpn_buffers_[5]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[6]) ,  kNumAnchorPerCls * 4,"3_rpn_buffers_[6]");
-    // DEVICE_SAVE<float>(reinterpret_cast<float*>(rpn_buffers_[7]) ,  kNumAnchorPerCls * kNumClass * 9 ,"3_rpn_buffers_[7]");
-
-    // [STEP 6]: postprocess (multihead)
-    auto postprocess_start = std::chrono::high_resolution_clock::now();
-    GPU_CHECK(cudaMemset(dev_filter_count_, 0, kNumClass * sizeof(int)));
-    postprocess_cuda_ptr_->DoPostprocessCuda(
-        reinterpret_cast<float*>(rpn_buffers_[1]), // [cls]   kNumAnchorPerCls 
-        reinterpret_cast<float*>(rpn_buffers_[2]), // [cls]   kNumAnchorPerCls * 2 * 2
-        reinterpret_cast<float*>(rpn_buffers_[3]), // [cls]   kNumAnchorPerCls * 2 * 2
-        reinterpret_cast<float*>(rpn_buffers_[4]), // [cls]   kNumAnchorPerCls 
-        reinterpret_cast<float*>(rpn_buffers_[5]), // [cls]   kNumAnchorPerCls * 2 * 2
-        reinterpret_cast<float*>(rpn_buffers_[6]), // [cls]   kNumAnchorPerCls * 2 * 2
-        reinterpret_cast<float*>(rpn_buffers_[7]), // [boxes] kNumAnchorPerCls * kNumClass * kNumOutputBoxFeature
-        dev_filtered_box_, dev_filtered_score_, dev_filter_count_,
-        *out_detections, *out_labels , *out_scores);
-    cudaDeviceSynchronize();
-    auto postprocess_end = std::chrono::high_resolution_clock::now();
-
-    // release the stream and the buffers
-//    std::chrono::duration<double> preprocess_cost = preprocess_end - preprocess_start;
-//    std::chrono::duration<double> pfe_cost = pfe_end - pfe_start;
-//    std::chrono::duration<double> scatter_cost = scatter_end - scatter_start;
-//    std::chrono::duration<double> backbone_cost = backbone_end - backbone_start;
-//    std::chrono::duration<double> postprocess_cost = postprocess_end - postprocess_start;
-
-//    std::chrono::duration<double> pointpillars_cost = postprocess_end - preprocess_start;
-//    std::cout << "------------------------------------" << std::endl;
-//    std::cout << setiosflags(ios::left)  << setw(14) << "Module" << setw(12)  << "Time"  << resetiosflags(ios::left) << std::endl;
-//    std::cout << "------------------------------------" << std::endl;
-//    std::string Modules[] = {"Preprocess" , "Pfe" , "Scatter" , "Backbone" , "Postprocess" , "Summary"};
-//    double Times[] = {preprocess_cost.count() , pfe_cost.count() , scatter_cost.count() , backbone_cost.count() , postprocess_cost.count() , pointpillars_cost.count()};
-
-//    for (int i =0 ; i < 6 ; ++i) {
-//        std::cout << setiosflags(ios::left) << setw(14) << Modules[i]  << setw(8)  << Times[i] * 1000 << " ms" << resetiosflags(ios::left) << std::endl;
-//    }
-//    std::cout << "------------------------------------" << std::endl;
-    cudaStreamDestroy(stream);
-
-}

+ 0 - 287
src/detection/detection_lidar_PointPillars_MultiHead_1025/pointpillars.h

@@ -1,287 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-#pragma once
-
-// headers in STL
-#include <algorithm>
-#include <cmath>
-#include <iomanip>
-#include <limits>
-#include <map>
-#include <memory>
-#include <string>
-#include <vector>
-#include <iostream>
-#include <sstream>
-#include <fstream>
-// headers in TensorRT
-#include "NvInfer.h"
-#include "NvOnnxParser.h"
-
-// headers in local files
-// #include "params.h"
-#include "common.h"
-#include <yaml-cpp/yaml.h>
-#include "preprocess.h"
-#include "scatter.h"
-#include "postprocess.h"
-
-using namespace std;
-
-// Logger for TensorRT info/warning/errors
-class Logger : public nvinfer1::ILogger {
- public:
-  explicit Logger(Severity severity = Severity::kWARNING)
-      : reportable_severity(severity) {}
-
-  void log(Severity severity, const char* msg) override {
-    // suppress messages with severity enum value greater than the reportable
-    if (severity > reportable_severity) return;
-
-    switch (severity) {
-      case Severity::kINTERNAL_ERROR:
-        std::cerr << "INTERNAL_ERROR: ";
-        break;
-      case Severity::kERROR:
-        std::cerr << "ERROR: ";
-        break;
-      case Severity::kWARNING:
-        std::cerr << "WARNING: ";
-        break;
-      case Severity::kINFO:
-        std::cerr << "INFO: ";
-        break;
-      default:
-        std::cerr << "UNKNOWN: ";
-        break;
-    }
-    std::cerr << msg << std::endl;
-  }
-
-  Severity reportable_severity;
-};
-
-
-
-class PointPillars {
- private:
-    // initialize in initializer list
-    const float score_threshold_;
-    const float nms_overlap_threshold_;
-    const bool use_onnx_;
-    const std::string pfe_file_;
-    const std::string backbone_file_;
-    const std::string pp_config_;
-    // end initializer list
-    // voxel size
-    float kPillarXSize;
-    float kPillarYSize;
-    float kPillarZSize;
-    // point cloud range
-    float kMinXRange;
-    float kMinYRange;
-    float kMinZRange;
-    float kMaxXRange;
-    float kMaxYRange;
-    float kMaxZRange;
-    // hyper parameters
-    int kNumClass;
-    int kMaxNumPillars;
-    int kMaxNumPointsPerPillar;
-    int kNumPointFeature;
-    int kNumGatherPointFeature = 11;
-    int kGridXSize;
-    int kGridYSize;
-    int kGridZSize;
-    int kNumAnchorXinds;
-    int kNumAnchorYinds;
-    int kRpnInputSize;
-    int kNumAnchor;
-    int kNumInputBoxFeature;
-    int kNumOutputBoxFeature;
-    int kRpnBoxOutputSize;
-    int kRpnClsOutputSize;
-    int kRpnDirOutputSize;
-    int kBatchSize;
-    int kNumIndsForScan;
-    int kNumThreads;
-    // if you change kNumThreads, need to modify NUM_THREADS_MACRO in
-    // common.h
-    int kNumBoxCorners;
-    int kNmsPreMaxsize;
-    int kNmsPostMaxsize;
-    //params for initialize anchors
-    //Adapt to OpenPCDet
-    int kAnchorStrides;
-    std::vector<string> kAnchorNames;
-    std::vector<float> kAnchorDxSizes;
-    std::vector<float> kAnchorDySizes;
-    std::vector<float> kAnchorDzSizes;
-    std::vector<float> kAnchorBottom;
-    std::vector<std::vector<int>> kMultiheadLabelMapping;
-    int kNumAnchorPerCls;
-    int host_pillar_count_[1];
-
-    int* dev_x_coors_;
-    int* dev_y_coors_;
-    float* dev_num_points_per_pillar_;
-    int* dev_sparse_pillar_map_;
-    int* dev_cumsum_along_x_;
-    int* dev_cumsum_along_y_;
-
-    float* dev_pillar_point_feature_;
-    float* dev_pillar_coors_;
-    float* dev_points_mean_;
-
-    float* dev_pfe_gather_feature_;
-    void* pfe_buffers_[2];
-    //variable for doPostprocessCudaMultiHead
-    void* rpn_buffers_[8];
-    
-    std::vector<float*> rpn_box_output_; 
-    std::vector<float*> rpn_cls_output_;
-
-    float* dev_scattered_feature_;
-
-    float* dev_filtered_box_;
-    float* dev_filtered_score_;
-    int*   dev_filtered_label_;
-    int*   dev_filtered_dir_;
-    float* dev_box_for_nms_;
-    int*   dev_filter_count_;
-
-    std::unique_ptr<PreprocessPointsCuda> preprocess_points_cuda_ptr_;
-    std::unique_ptr<ScatterCuda> scatter_cuda_ptr_;
-    std::unique_ptr<PostprocessCuda> postprocess_cuda_ptr_;
-
-    Logger g_logger_;
-    nvinfer1::ICudaEngine* pfe_engine_;
-    nvinfer1::ICudaEngine* backbone_engine_;
-    nvinfer1::IExecutionContext* pfe_context_;
-    nvinfer1::IExecutionContext* backbone_context_;
-
-    /**
-     * @brief Memory allocation for device memory
-     * @details Called in the constructor
-     */
-    void DeviceMemoryMalloc();
-
-    /**
-     * @brief Memory set to 0 for device memory
-     * @details Called in the DoInference
-     */
-    void SetDeviceMemoryToZero();
-
-    /**
-     * @brief Initializing paraments from pointpillars.yaml
-     * @details Called in the constructor
-     */
-    void InitParams();
-    /**
-     * @brief Initializing TensorRT instances
-     * @param[in] usr_onnx_ if true, parse ONNX 
-     * @details Called in the constructor
-     */
-    void InitTRT(const bool use_onnx);
-    void SaveEngine(const nvinfer1::ICudaEngine* engine, const std::string& engine_filepath);
-    /**
-     * @brief Convert ONNX to TensorRT model
-     * @param[in] model_file ONNX model file path
-     * @param[out] engine_ptr TensorRT model engine made out of ONNX model
-     * @details Load ONNX model, and convert it to TensorRT model
-     */
-    void OnnxToTRTModel(const std::string& model_file,
-                        nvinfer1::ICudaEngine** engine_ptr);
-
-    /**
-     * @brief Convert Engine to TensorRT model
-     * @param[in] model_file Engine(TensorRT) model file path
-     * @param[out] engine_ptr TensorRT model engine made 
-     * @details Load Engine model, and convert it to TensorRT model
-     */
-    void EngineToTRTModel(const std::string &engine_file ,     
-                        nvinfer1::ICudaEngine** engine_ptr) ;
-
-    /**
-     * @brief Preproces points
-     * @param[in] in_points_array Point cloud array
-     * @param[in] in_num_points Number of points
-     * @details Call CPU or GPU preprocess
-     */
-    void Preprocess(const float* in_points_array, const int in_num_points);
-
-    public:
-    /**
-     * @brief Constructor
-     * @param[in] score_threshold Score threshold for filtering output
-     * @param[in] nms_overlap_threshold IOU threshold for NMS
-     * @param[in] use_onnx if true,using onnx file ,else using engine file
-     * @param[in] pfe_file Pillar Feature Extractor ONNX file path
-     * @param[in] rpn_file Region Proposal Network ONNX file path
-     * @details Variables could be changed through point_pillars_detection
-     */
-    PointPillars(const float score_threshold,
-                const float nms_overlap_threshold,
-                const bool use_onnx,
-                const std::string pfe_file,
-                const std::string rpn_file,
-                const std::string pp_config);
-    ~PointPillars();
-
-    /**
-     * @brief Call PointPillars for the inference
-     * @param[in] in_points_array Point cloud array
-     * @param[in] in_num_points Number of points
-     * @param[out] out_detections Network output bounding box
-     * @param[out] out_labels Network output object's label
-     * @details This is an interface for the algorithm
-     */
-    void DoInference(const float* in_points_array,
-                    const int in_num_points,
-                    std::vector<float>* out_detections,
-                    std::vector<int>* out_labels,
-                    std::vector<float>* out_scores);
-};
-

+ 0 - 383
src/detection/detection_lidar_PointPillars_MultiHead_1025/postprocess.cu

@@ -1,383 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-// headers in CUDA
-#include <thrust/sort.h>
-
-// headers in local files
-#include "common.h"
-#include "postprocess.h"
-#include <stdio.h>
-
-
-// sigmoid_filter_warp
-__device__ void box_decode_warp(int head_offset, const float* box_pred, 
-    int tid , int num_anchors_per_head , int counter, float* filtered_box) 
-{
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 0] = box_pred[ head_offset + tid * 9 + 0];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 1] = box_pred[ head_offset + tid * 9 + 1];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 2] = box_pred[ head_offset + tid * 9 + 2];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 3] = box_pred[ head_offset + tid * 9 + 3];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 4] = box_pred[ head_offset + tid * 9 + 4];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 5] = box_pred[ head_offset + tid * 9 + 5];
-    filtered_box[blockIdx.z * num_anchors_per_head * 7  + counter * 7 + 6] = box_pred[ head_offset + tid * 9 + 6];
-}
-
-
-__global__ void sigmoid_filter_kernel(
-
-    float* cls_pred_0,
-    float* cls_pred_12,
-    float* cls_pred_34,
-    float* cls_pred_5,
-    float* cls_pred_67,
-    float* cls_pred_89,
-
-    const float* box_pred_0,
-
-    const float* box_pred_1,
-    const float* box_pred_2,
-
-    const float* box_pred_3,
-    const float* box_pred_4,
-
-    const float* box_pred_5,
-
-    const float* box_pred_6,
-    const float* box_pred_7,
-
-    const float* box_pred_8,
-    const float* box_pred_9,
-
-    float* filtered_box, 
-    float* filtered_score, 
-    int* filter_count,
-
-    const float score_threshold) {   
-
-    // cls_pred_34 
-    // 32768*2 , 2
-
-    int num_anchors_per_head = gridDim.x * gridDim.y * blockDim.x;
-    // 16 * 4 * 512 = 32768
-    extern __shared__ float cls_score[];
-    cls_score[threadIdx.x + blockDim.x] = -1.0f;
-
-    int tid = blockIdx.x * gridDim.y * blockDim.x + blockIdx.y *  blockDim.x + threadIdx.x; 
-
-
-    if ( blockIdx.z == 0) cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_0[ tid ]));
-    if ( blockIdx.z == 1) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_12[ tid * 2 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_12[ (num_anchors_per_head + tid) * 2]));}
-    if ( blockIdx.z == 2) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_12[ tid * 2 + 1]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_12[ (num_anchors_per_head + tid) * 2 + 1]));}
-
-    if ( blockIdx.z == 3) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_34[ tid * 2 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_34[ (num_anchors_per_head + tid) * 2]));}
-    if ( blockIdx.z == 4) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_34[ tid * 2 + 1 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_34[ (num_anchors_per_head + tid) * 2 + 1]));}
-
-    if ( blockIdx.z == 5) cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_5[ tid ]));
-
-    if ( blockIdx.z == 6) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_67[ tid * 2 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_67[ (num_anchors_per_head + tid) * 2]));}
-    if ( blockIdx.z == 7) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_67[ tid * 2 + 1 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_67[ (num_anchors_per_head + tid) * 2 + 1]));}
-
-    if ( blockIdx.z == 8) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_89[ tid * 2 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_89[ (num_anchors_per_head + tid) * 2]));}
-    if ( blockIdx.z == 9) {
-        cls_score[ threadIdx.x ] = 1 / (1 + expf(-cls_pred_89[ tid * 2 + 1 ]));
-        cls_score[ threadIdx.x + blockDim.x] = 1 / (1 + expf(-cls_pred_89[ (num_anchors_per_head + tid) * 2 + 1]));}
-    
-    __syncthreads();
-    
-    if( cls_score[ threadIdx.x ] > score_threshold) 
-    {
-        int counter = atomicAdd(&filter_count[blockIdx.z], 1);
-        if ( blockIdx.z == 0) {
-            box_decode_warp(0 ,box_pred_0 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 1) {
-            box_decode_warp(0 ,box_pred_1 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 2) {
-            box_decode_warp(0 ,box_pred_1 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 3) {
-            box_decode_warp(0 ,box_pred_3 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else 
-        if (blockIdx.z == 4) {
-            box_decode_warp(0 ,box_pred_3 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];            
-        }else
-        if ( blockIdx.z == 5) {
-            box_decode_warp(0 ,box_pred_5 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 6) {
-            box_decode_warp(0 ,box_pred_6 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 7) {
-            box_decode_warp(0 ,box_pred_6 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 8) {
-
-            box_decode_warp(0 ,box_pred_8 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }else
-        if ( blockIdx.z == 9) {
-            box_decode_warp(0 ,box_pred_8 , tid , num_anchors_per_head , counter , filtered_box);
-            filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-        }
-    }
-    __syncthreads();  
-    if( cls_score[ threadIdx.x + blockDim.x ] > score_threshold)  {     
-            int counter = atomicAdd(&filter_count[blockIdx.z], 1);
-            // printf("counter : %d \n" , counter);
-            if (blockIdx.z == 1) {
-                box_decode_warp(0 ,box_pred_2 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 2) {
-                box_decode_warp(0 ,box_pred_2 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 3) {
-                box_decode_warp(0 ,box_pred_4 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 4) {
-                box_decode_warp(0 ,box_pred_4 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 6) {
-                box_decode_warp(0 ,box_pred_7 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 7) {
-                box_decode_warp(0 ,box_pred_7 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 8) {
-                box_decode_warp(0 ,box_pred_9 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }else 
-            if (blockIdx.z == 9) {
-                box_decode_warp(0 ,box_pred_9 , tid , num_anchors_per_head , counter , filtered_box);
-                filtered_score[blockIdx.z * num_anchors_per_head + counter] = cls_score[ threadIdx.x ];
-            }
-    }
-}
-
-__global__ void sort_boxes_by_indexes_kernel(float* filtered_box, float* filtered_scores, int* indexes, int filter_count,
-    float* sorted_filtered_boxes, float* sorted_filtered_scores,
-    const int num_output_box_feature)
-{
-    int tid = threadIdx.x + blockIdx.x * blockDim.x;
-    if(tid < filter_count)  {
-
-        int sort_index = indexes[tid];
-        sorted_filtered_boxes[tid * num_output_box_feature + 0] = filtered_box[sort_index * num_output_box_feature + 0];
-        sorted_filtered_boxes[tid * num_output_box_feature + 1] = filtered_box[sort_index * num_output_box_feature + 1];
-        sorted_filtered_boxes[tid * num_output_box_feature + 2] = filtered_box[sort_index * num_output_box_feature + 2];
-        sorted_filtered_boxes[tid * num_output_box_feature + 3] = filtered_box[sort_index * num_output_box_feature + 3];
-        sorted_filtered_boxes[tid * num_output_box_feature + 4] = filtered_box[sort_index * num_output_box_feature + 4];
-        sorted_filtered_boxes[tid * num_output_box_feature + 5] = filtered_box[sort_index * num_output_box_feature + 5];
-        sorted_filtered_boxes[tid * num_output_box_feature + 6] = filtered_box[sort_index * num_output_box_feature + 6];
-
-        // sorted_filtered_dir[tid] = filtered_dir[sort_index];
-        sorted_filtered_scores[tid] = filtered_scores[sort_index];
-    }
-}
-
-
-
-PostprocessCuda::PostprocessCuda(const int num_threads, const float float_min, const float float_max,
-    const int num_class,const int num_anchor_per_cls,
-    const std::vector<std::vector<int>> multihead_label_mapping,
-    const float score_threshold,  const float nms_overlap_threshold, 
-    const int nms_pre_maxsize, const int nms_post_maxsize,
-    const int num_box_corners, 
-    const int num_input_box_feature,
-    const int num_output_box_feature)
-: num_threads_(num_threads),
-  float_min_(float_min),
-  float_max_(float_max),
-  num_class_(num_class),
-  num_anchor_per_cls_(num_anchor_per_cls),
-  multihead_label_mapping_(multihead_label_mapping),
-  score_threshold_(score_threshold),
-  nms_overlap_threshold_(nms_overlap_threshold),
-  nms_pre_maxsize_(nms_pre_maxsize),
-  nms_post_maxsize_(nms_post_maxsize),
-  num_box_corners_(num_box_corners),
-  num_input_box_feature_(num_input_box_feature),
-  num_output_box_feature_(num_output_box_feature) {
-    nms_cuda_ptr_.reset(
-    new NmsCuda(num_threads_, num_box_corners_, nms_overlap_threshold_));
-
-}
-
-
-void PostprocessCuda::DoPostprocessCuda(
-    float* cls_pred_0,
-    float* cls_pred_12,
-    float* cls_pred_34,
-    float* cls_pred_5,
-    float* cls_pred_67,
-    float* cls_pred_89,
-
-    const float* box_preds,
-   
-    float* dev_filtered_box, 
-    float* dev_filtered_score, 
-    int* dev_filter_count,
-    std::vector<float>& out_detection, std::vector<int>& out_label , std::vector<float>& out_score) {
-    // 在此之前,先进行rpn_box_output的concat. 
-    // 128x128 的feature map, cls_pred 的shape为(32768,1),(32768,1),(32768,1),(65536,2),(32768,1)
-    dim3 gridsize(16, 4 , 10);  //16 *  4  * 512  = 32768 代表一个head的anchors
-    sigmoid_filter_kernel<<< gridsize, 512 , 512 * 2 * sizeof(float)>>>(
-        cls_pred_0,
-        cls_pred_12, 
-        cls_pred_34, 
-        cls_pred_5, 
-        cls_pred_67, 
-        cls_pred_89,
-
-        &box_preds[0 * 32768 * 9],
-        &box_preds[1 * 32768 * 9],
-        &box_preds[2 * 32768 * 9],
-        &box_preds[3 * 32768 * 9],
-        &box_preds[4 * 32768 * 9],
-        &box_preds[5 * 32768 * 9],
-        &box_preds[6 * 32768 * 9],
-        &box_preds[7 * 32768 * 9],
-        &box_preds[8 * 32768 * 9],
-        &box_preds[9 * 32768 * 9],
-
-        dev_filtered_box, 
-        dev_filtered_score,  
-        dev_filter_count, 
-    
-        score_threshold_);
-    cudaDeviceSynchronize();
-    
-    int host_filter_count[num_class_] = {0};
-    GPU_CHECK(cudaMemcpy(host_filter_count, dev_filter_count, num_class_ * sizeof(int), cudaMemcpyDeviceToHost));
-    
-    for (int i = 0; i < num_class_; ++ i) {
-        if(host_filter_count[i] <= 0) continue;
-
-        int* dev_indexes;
-        float* dev_sorted_filtered_box;
-        float* dev_sorted_filtered_scores;
-        GPU_CHECK(cudaMalloc((void**)&dev_indexes, host_filter_count[i] * sizeof(int)));
-        GPU_CHECK(cudaMalloc((void**)&dev_sorted_filtered_box, host_filter_count[i] * num_output_box_feature_ * sizeof(float)));
-        GPU_CHECK(cudaMalloc((void**)&dev_sorted_filtered_scores, host_filter_count[i]*sizeof(float)));
-        // GPU_CHECK(cudaMalloc((void**)&dev_sorted_box_for_nms, NUM_BOX_CORNERS_*host_filter_count[i]*sizeof(float)));
-        thrust::sequence(thrust::device, dev_indexes, dev_indexes + host_filter_count[i]);
-        thrust::sort_by_key(thrust::device, 
-                            &dev_filtered_score[i * num_anchor_per_cls_], 
-                            &dev_filtered_score[i * num_anchor_per_cls_ + host_filter_count[i]],
-                            dev_indexes, 
-                            thrust::greater<float>());
-
-        const int num_blocks = DIVUP(host_filter_count[i], num_threads_);
-
-        sort_boxes_by_indexes_kernel<<<num_blocks, num_threads_>>>(
-            &dev_filtered_box[i * num_anchor_per_cls_ * num_output_box_feature_], 
-            &dev_filtered_score[i * num_anchor_per_cls_], 
-            dev_indexes, 
-            host_filter_count[i],
-            dev_sorted_filtered_box, 
-            dev_sorted_filtered_scores,
-            num_output_box_feature_);
-
-        int num_box_for_nms = min(nms_pre_maxsize_, host_filter_count[i]);
-        long* keep_inds = new long[num_box_for_nms];  // index of kept box
-        memset(keep_inds, 0, num_box_for_nms * sizeof(int));
-        int num_out = 0;
-        nms_cuda_ptr_->DoNmsCuda(num_box_for_nms, dev_sorted_filtered_box, keep_inds, &num_out);
-
-        num_out = min(num_out, nms_post_maxsize_);
-
-        float* host_filtered_box = new float[host_filter_count[i] * num_output_box_feature_]();
-        float* host_filtered_scores = new float[host_filter_count[i]]();
-
-
-        cudaMemcpy(host_filtered_box, dev_sorted_filtered_box, host_filter_count[i] * num_output_box_feature_ * sizeof(float), cudaMemcpyDeviceToHost);
-        cudaMemcpy(host_filtered_scores, dev_sorted_filtered_scores, host_filter_count[i] * sizeof(float), cudaMemcpyDeviceToHost);
-        for (int j = 0; j < num_out; ++j)  {
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 0]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 1]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 2]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 3]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 4]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 5]);
-            out_detection.emplace_back(host_filtered_box[keep_inds[j] * num_output_box_feature_ + 6]);
-            out_score.emplace_back(host_filtered_scores[keep_inds[j]]);
-            out_label.emplace_back(i);
-        }
-        delete[] keep_inds;
-        delete[] host_filtered_scores;
-        delete[] host_filtered_box;
-
-        GPU_CHECK(cudaFree(dev_indexes));
-        GPU_CHECK(cudaFree(dev_sorted_filtered_box));
-    }
-}

+ 0 - 125
src/detection/detection_lidar_PointPillars_MultiHead_1025/postprocess.h

@@ -1,125 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-#pragma once
-#include <memory>
-#include <vector>
-#include "nms.h"
-
-class PostprocessCuda {
- private:
-    // initializer list
-
-    const int num_threads_;
-    const float float_min_;
-    const float float_max_;
-    const int num_class_;
-    const int num_anchor_per_cls_;
-    const float score_threshold_;
-    const float nms_overlap_threshold_;
-    const int nms_pre_maxsize_;
-    const int nms_post_maxsize_;
-    const int num_box_corners_;
-    const int num_input_box_feature_;
-    const int num_output_box_feature_;
-    const std::vector<std::vector<int>> multihead_label_mapping_;
-    // end initializer list
-
-    std::unique_ptr<NmsCuda> nms_cuda_ptr_;
-  public:
-  /**
-   * @brief Constructor
-   * @param[in] num_threads Number of threads when launching cuda kernel
-   * @param[in] float_min The lowest float value
-   * @param[in] float_max The maximum float value
-   * @param[in] num_class Number of classes 
-   * @param[in] num_anchor_per_cls Number anchor per category
-   * @param[in] multihead_label_mapping 
-   * @param[in] score_threshold Score threshold for filtering output
-   * @param[in] nms_overlap_threshold IOU threshold for NMS
-   * @param[in] nms_pre_maxsize Maximum number of boxes into NMS
-   * @param[in] nms_post_maxsize Maximum number of boxes after NMS
-   * @param[in] num_box_corners Number of box's corner
-   * @param[in] num_output_box_feature Number of output box's feature
-   * @details Captital variables never change after the compile, non-capital
-   * variables could be changed through rosparam
-   */
-  PostprocessCuda(const int num_threads, 
-                  const float float_min, const float float_max,
-                  const int num_class, const int num_anchor_per_cls, 
-                  const std::vector<std::vector<int>> multihead_label_mapping,
-                  const float score_threshold,  
-                  const float nms_overlap_threshold, 
-                  const int nms_pre_maxsize, 
-                  const int nms_post_maxsize,
-                  const int num_box_corners,
-                  const int num_input_box_feature, 
-                  const int num_output_box_feature);
-  ~PostprocessCuda(){}
-
-  /**
-   * @brief Postprocessing for the network output
-   * @param[in] rpn_box_output Box predictions from the network output
-   * @param[in] rpn_cls_output Class predictions from the network output
-   * @param[in] rpn_dir_output Direction predictions from the network output
-   * @param[in] dev_filtered_box Filtered box predictions
-   * @param[in] dev_filtered_score Filtered score predictions
-   * @param[in] dev_filter_count The number of filtered output
-   * @param[out] out_detection Output bounding boxes
-   * @param[out] out_label Output labels of objects
-   * @details dev_* represents device memory allocated variables
-   */
-  void DoPostprocessCuda(
-    float* cls_pred_0,
-    float* cls_pred_12,
-    float* cls_pred_34,
-    float* cls_pred_5,
-    float* cls_pred_67,
-    float* cls_pred_89,
-    
-    const float* box_preds,
-    float* dev_filtered_box, 
-    float* dev_filtered_score, 
-    int* dev_filter_count,
-    std::vector<float>& out_detection, std::vector<int>& out_label , std::vector<float>& out_score);
-};

+ 0 - 410
src/detection/detection_lidar_PointPillars_MultiHead_1025/preprocess.cu

@@ -1,410 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-
-// headers in STL
-#include <stdio.h>
-
-// headers in local files
-#include "common.h"
-#include "preprocess.h"
-
-__global__ void make_pillar_histo_kernel(
-    const float* dev_points, float* dev_pillar_point_feature_in_coors,
-    int* pillar_count_histo, const int num_points,
-    const int max_points_per_pillar, const int grid_x_size,
-    const int grid_y_size, const int grid_z_size, const float min_x_range,
-    const float min_y_range, const float min_z_range, const float pillar_x_size,
-    const float pillar_y_size, const float pillar_z_size,
-    const int num_point_feature) {
-  int th_i = blockIdx.x * blockDim.x +  threadIdx.x ;
-  if (th_i >= num_points) {
-    return;
-  }
-  int x_coor = floor((dev_points[th_i * num_point_feature + 0] - min_x_range) / pillar_x_size);
-  int y_coor = floor((dev_points[th_i * num_point_feature + 1] - min_y_range) / pillar_y_size);
-  int z_coor = floor((dev_points[th_i * num_point_feature + 2] - min_z_range) / pillar_z_size);
-
-  if (x_coor >= 0 && x_coor < grid_x_size && y_coor >= 0 &&
-      y_coor < grid_y_size && z_coor >= 0 && z_coor < grid_z_size) {
-    int count =
-        atomicAdd(&pillar_count_histo[y_coor * grid_x_size + x_coor], 1);
-    if (count < max_points_per_pillar) {
-      int ind =
-          y_coor * grid_x_size * max_points_per_pillar * num_point_feature +
-          x_coor * max_points_per_pillar * num_point_feature +
-          count * num_point_feature;
- 
-      for (int i = 0; i < num_point_feature; ++i) {
-        dev_pillar_point_feature_in_coors[ind + i] =
-            dev_points[th_i * num_point_feature + i];
-      }
-    }
-  }
-}
-
-__global__ void make_pillar_index_kernel(
-    int* dev_pillar_count_histo, int* dev_counter, int* dev_pillar_count,
-    int* dev_x_coors, int* dev_y_coors, float* dev_num_points_per_pillar,
-    int* dev_sparse_pillar_map, const int max_pillars,
-    const int max_points_per_pillar, const int grid_x_size,
-    const int num_inds_for_scan) {
-  int x = blockIdx.x;
-  int y = threadIdx.x;
-  int num_points_at_this_pillar = dev_pillar_count_histo[y * grid_x_size + x];
-  if (num_points_at_this_pillar == 0) {
-    return;
-  }
-
-  int count = atomicAdd(dev_counter, 1);
-  if (count < max_pillars) {
-    atomicAdd(dev_pillar_count, 1);
-    if (num_points_at_this_pillar >= max_points_per_pillar) {
-      dev_num_points_per_pillar[count] = max_points_per_pillar;
-    } else {
-      dev_num_points_per_pillar[count] = num_points_at_this_pillar;
-    }
-    dev_x_coors[count] = x;
-    dev_y_coors[count] = y;
-    dev_sparse_pillar_map[y * num_inds_for_scan + x] = 1;
-  }
-}
-
-__global__ void make_pillar_feature_kernel(
-    float* dev_pillar_point_feature_in_coors, float* dev_pillar_point_feature,
-    float* dev_pillar_coors, int* dev_x_coors, int* dev_y_coors,
-    float* dev_num_points_per_pillar, const int max_points,
-    const int num_point_feature, const int grid_x_size) {
-  int ith_pillar = blockIdx.x;
-  int num_points_at_this_pillar = dev_num_points_per_pillar[ith_pillar];
-  int ith_point = threadIdx.x;
-  if (ith_point >= num_points_at_this_pillar) {
-    return;
-  }
-  int x_ind = dev_x_coors[ith_pillar];
-  int y_ind = dev_y_coors[ith_pillar];
-  int pillar_ind = ith_pillar * max_points * num_point_feature +
-                   ith_point * num_point_feature;
-  int coors_ind = y_ind * grid_x_size * max_points * num_point_feature +
-                  x_ind * max_points * num_point_feature +
-                  ith_point * num_point_feature;
-  #pragma unroll 
-  for (int i = 0; i < num_point_feature; ++i) {
-    dev_pillar_point_feature[pillar_ind + i] =
-        dev_pillar_point_feature_in_coors[coors_ind + i];
-  }
-
-  float coor_x = static_cast<float>(x_ind);
-  float coor_y = static_cast<float>(y_ind);
-  dev_pillar_coors[ith_pillar * 4 + 0] = 0;  // batch idx
-  dev_pillar_coors[ith_pillar * 4 + 1] = 0;  // z
-  dev_pillar_coors[ith_pillar * 4 + 2] = coor_y;
-  dev_pillar_coors[ith_pillar * 4 + 3] = coor_x;
-}
-
-
-
-__global__ void pillar_mean_kernel(
-  float* dev_points_mean, 
-  const int num_point_feature,
-  const float* dev_pillar_point_feature, 
-  const float* dev_num_points_per_pillar, 
-  int max_pillars , 
-  int max_points_per_pillar) {
-
-    extern __shared__ float temp[];
-    int ith_pillar = blockIdx.x; 
-    int ith_point  = threadIdx.x;
-    int axis = threadIdx.y;
-  
-    int reduce_size = max_points_per_pillar > 32 ? 64 : 32;
-    temp[threadIdx.x * 3 + axis] =  dev_pillar_point_feature[ith_pillar * max_points_per_pillar * num_point_feature + ith_point * num_point_feature + axis];  
-    if (threadIdx.x < reduce_size - max_points_per_pillar) {
-        temp[(threadIdx.x + max_points_per_pillar) * 3 + axis] = 0.0f; //--> dummy placeholds will set as 0
-    }
-    __syncthreads();
-    int num_points_at_this_pillar = dev_num_points_per_pillar[ith_pillar];
-
-    if (ith_point >= num_points_at_this_pillar) {
-          return;
-    }
-
-    for (unsigned int d = reduce_size >> 1 ; d > 0.6; d >>= 1) {
-        if (ith_point < d) {
-            temp[ith_point*3 +axis] += temp[(ith_point + d) * 3 + axis];
-        }
-        __syncthreads();
-    }
-
-    if (ith_point == 0) {
-        dev_points_mean[ith_pillar * 3 + axis] = temp[ith_point + axis] / num_points_at_this_pillar ;
-    }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-__device__ void warpReduce(volatile float* sdata , int ith_point , int axis) {
-    sdata[ith_point * blockDim.y + axis] += sdata[(ith_point + 8) * blockDim.y + axis];
-    sdata[ith_point * blockDim.y + axis] += sdata[(ith_point + 4) * blockDim.y + axis];
-    sdata[ith_point * blockDim.y + axis] += sdata[(ith_point + 2) * blockDim.y + axis];
-    sdata[ith_point * blockDim.y + axis] += sdata[(ith_point + 1) * blockDim.y + axis];
-}
-
-
-
-
-
-__global__ void make_pillar_mean_kernel(
-  float* dev_points_mean, 
-  const int num_point_feature,
-  const float* dev_pillar_point_feature, 
-  const float* dev_num_points_per_pillar, 
-  int max_pillars , 
-  int max_points_pre_pillar) {
-    extern __shared__ float temp[];
-    unsigned int ith_pillar = blockIdx.x;  // { 0 , 1, 2, ... , 10000+}
-    unsigned int ith_point  = threadIdx.x; // { 0 , 1, 2, ...,9}
-    unsigned int axis = threadIdx.y; 
-    unsigned int idx_pre  = ith_pillar * max_points_pre_pillar * num_point_feature \
-                     + ith_point  * num_point_feature;
-    unsigned int idx_post = ith_pillar * max_points_pre_pillar * num_point_feature \
-                     + (ith_point + blockDim.x)  * num_point_feature;
-
-    temp[ith_point * blockDim.y + axis] = 0.0;
-    unsigned int num_points_at_this_pillar = dev_num_points_per_pillar[ith_pillar];
-
-    // if (ith_point < num_points_at_this_pillar / 2) {
-      temp[ith_point * blockDim.y + axis] = dev_pillar_point_feature[idx_pre  + axis] 
-                                          + dev_pillar_point_feature[idx_post + axis];
-    // }
-    __syncthreads();
-
-    // do reduction in shared mem
-    // Sequential addressing. This solves the bank conflicts as
-    // the threads now access shared memory with a stride of one
-    // 32-bit word (unsigned int) now, which does not cause bank 
-    // conflicts
-    warpReduce(temp , ith_point , axis);
-
-	// // write result for this block to global mem
-    if (ith_point == 0)
-    dev_points_mean[ith_pillar * blockDim.y + axis] = temp[ith_point * blockDim.y + axis] / num_points_at_this_pillar ;
-}
-
-
-__global__ void gather_point_feature_kernel(
-  const int max_num_pillars_,const int max_num_points_per_pillar,const int num_point_feature,
-  const float min_x_range, const float min_y_range, const float min_z_range, 
-  const float pillar_x_size,  const float pillar_y_size, const float pillar_z_size,
-  const float* dev_pillar_point_feature, const float* dev_num_points_per_pillar, 
-  const float* dev_pillar_coors,
-  float* dev_points_mean, 
-  float* dev_pfe_gather_feature_){
-
-  int ith_pillar = blockIdx.x; 
-  int ith_point = threadIdx.x;
-  // int kNumPointFeature = 5;
-  int num_gather_feature = 11;
-  int num_points_at_this_pillar = dev_num_points_per_pillar[ith_pillar];
-
-  if (ith_point >= num_points_at_this_pillar){
-        return;
-    }
-
-
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 0] 
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 0]; 
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 1]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 1];
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 2]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 2];
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 3]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 3];
-
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 4]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 4];
-  
-    // dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 4]  =  0.0f;
-    //   f_cluster = voxel_features[:, :, :3] - points_mean
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 5]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 0] - dev_points_mean[ith_pillar * 3 + 0 ];
-
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 6] 
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 1] - dev_points_mean[ith_pillar * 3 + 1 ];
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 7]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 2] - dev_points_mean[ith_pillar * 3 + 2 ];
-
-    // f_center[:, :, 0] = voxel_features[:, :, 0] - (coords[:, 3].to(voxel_features.dtype).unsqueeze(1) * self.voxel_x + self.x_offset)
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 8]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 0] - (dev_pillar_coors[ith_pillar * 4 + 3] * pillar_x_size + (pillar_x_size/2 + min_x_range));
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 9]  
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 1] - (dev_pillar_coors[ith_pillar * 4 + 2] * pillar_y_size + (pillar_y_size/2 + min_y_range));
-  
-    dev_pfe_gather_feature_[ith_pillar * max_num_points_per_pillar * num_gather_feature + ith_point * num_gather_feature + 10] 
-    =  dev_pillar_point_feature[ith_pillar * max_num_points_per_pillar * num_point_feature + ith_point * num_point_feature + 2] - (dev_pillar_coors[ith_pillar * 4 + 1] * pillar_z_size + (pillar_z_size/2 + min_z_range));
-
-}
-
-
-
-
-PreprocessPointsCuda::PreprocessPointsCuda(
-    const int num_threads, const int max_num_pillars,
-    const int max_points_per_pillar, const int num_point_feature,
-    const int num_inds_for_scan, const int grid_x_size, const int grid_y_size,
-    const int grid_z_size, const float pillar_x_size, const float pillar_y_size,
-    const float pillar_z_size, const float min_x_range, const float min_y_range,
-    const float min_z_range)
-    : num_threads_(num_threads),
-      max_num_pillars_(max_num_pillars),
-      max_num_points_per_pillar_(max_points_per_pillar),
-      num_point_feature_(num_point_feature),
-      num_inds_for_scan_(num_inds_for_scan),
-      grid_x_size_(grid_x_size),
-      grid_y_size_(grid_y_size),
-      grid_z_size_(grid_z_size),
-      pillar_x_size_(pillar_x_size),
-      pillar_y_size_(pillar_y_size),
-      pillar_z_size_(pillar_z_size),
-      min_x_range_(min_x_range),
-      min_y_range_(min_y_range),
-      min_z_range_(min_z_range) {
-    
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pillar_point_feature_in_coors_),
-        grid_y_size_ * grid_x_size_ * max_num_points_per_pillar_ *  num_point_feature_ * sizeof(float)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pillar_count_histo_),
-        grid_y_size_ * grid_x_size_ * sizeof(int)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_counter_), sizeof(int)));
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_pillar_count_), sizeof(int)));    
-    GPU_CHECK(cudaMalloc(reinterpret_cast<void**>(&dev_points_mean_), max_num_pillars_ * 3 *sizeof(float)));  
-    }
-
-PreprocessPointsCuda::~PreprocessPointsCuda() {
-    GPU_CHECK(cudaFree(dev_pillar_point_feature_in_coors_));
-    GPU_CHECK(cudaFree(dev_pillar_count_histo_));
-    GPU_CHECK(cudaFree(dev_counter_));
-    GPU_CHECK(cudaFree(dev_pillar_count_));
-    GPU_CHECK(cudaFree(dev_points_mean_));
-  }
-
-
-void PreprocessPointsCuda::DoPreprocessPointsCuda(
-    const float* dev_points, const int in_num_points, 
-    int* dev_x_coors,int* dev_y_coors, 
-    float* dev_num_points_per_pillar,
-    float* dev_pillar_point_feature, float* dev_pillar_coors,
-    int* dev_sparse_pillar_map, int* host_pillar_count , float* dev_pfe_gather_feature) {
-    // initialize paraments
-    GPU_CHECK(cudaMemset(dev_pillar_point_feature_in_coors_, 0 , grid_y_size_ * grid_x_size_ * max_num_points_per_pillar_ *  num_point_feature_ * sizeof(float)));
-    GPU_CHECK(cudaMemset(dev_pillar_count_histo_, 0 , grid_y_size_ * grid_x_size_ * sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_counter_, 0, sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_pillar_count_, 0, sizeof(int)));
-    GPU_CHECK(cudaMemset(dev_points_mean_, 0,  max_num_pillars_ * 3 * sizeof(float)));
-    int num_block = DIVUP(in_num_points , num_threads_);
-    make_pillar_histo_kernel<<<num_block , num_threads_>>>(
-        dev_points, dev_pillar_point_feature_in_coors_, dev_pillar_count_histo_,
-        in_num_points, max_num_points_per_pillar_, grid_x_size_, grid_y_size_,
-        grid_z_size_, min_x_range_, min_y_range_, min_z_range_, pillar_x_size_,
-        pillar_y_size_, pillar_z_size_, num_point_feature_);
-    
-    make_pillar_index_kernel<<<grid_x_size_, grid_y_size_>>>(
-        dev_pillar_count_histo_, dev_counter_, dev_pillar_count_, dev_x_coors,
-        dev_y_coors, dev_num_points_per_pillar, dev_sparse_pillar_map,
-        max_num_pillars_, max_num_points_per_pillar_, grid_x_size_,
-        num_inds_for_scan_);  
-
-    GPU_CHECK(cudaMemcpy(host_pillar_count, dev_pillar_count_, 1 * sizeof(int),
-        cudaMemcpyDeviceToHost));
-    make_pillar_feature_kernel<<<host_pillar_count[0],max_num_points_per_pillar_>>>(
-        dev_pillar_point_feature_in_coors_, dev_pillar_point_feature,
-        dev_pillar_coors, dev_x_coors, dev_y_coors, dev_num_points_per_pillar,
-        max_num_points_per_pillar_, num_point_feature_, grid_x_size_);
-    
-
-    dim3 mean_block(max_num_points_per_pillar_,3); //(32,3)
-
-    pillar_mean_kernel<<<host_pillar_count[0],mean_block,64 * 3 *sizeof(float)>>>(
-      dev_points_mean_  ,num_point_feature_, dev_pillar_point_feature, dev_num_points_per_pillar, 
-        max_num_pillars_ , max_num_points_per_pillar_);
-
-    // dim3 mean_block(10,3); // Unrolling the Last Warp
-    // make_pillar_mean_kernel<<<host_pillar_count[0], mean_block , 32 * 3 *sizeof(float)>>>(
-    //       dev_points_mean_  ,num_point_feature_, dev_pillar_point_feature, dev_num_points_per_pillar, 
-    //       max_num_pillars_ , max_num_points_per_pillar_);
-
-    gather_point_feature_kernel<<<max_num_pillars_, max_num_points_per_pillar_>>>(
-      max_num_pillars_,max_num_points_per_pillar_,num_point_feature_,
-      min_x_range_, min_y_range_, min_z_range_,
-      pillar_x_size_, pillar_y_size_, pillar_z_size_, 
-      dev_pillar_point_feature, dev_num_points_per_pillar, dev_pillar_coors,
-      dev_points_mean_,
-      dev_pfe_gather_feature);
-
-    // DEVICE_SAVE<float>(dev_pillar_point_feature , \
-    //     max_num_pillars_ * max_num_points_per_pillar_ * num_point_feature_ , "dev_pillar_point_feature");
-    // DEVICE_SAVE<float>(dev_num_points_per_pillar , \
-    //   max_num_pillars_ , "dev_num_points_per_pillar");
-    // DEVICE_SAVE<float>(dev_pfe_gather_feature , \
-    //   max_num_pillars_ * 11, "dev_pfe_gather_feature");
-}
-
-

+ 0 - 138
src/detection/detection_lidar_PointPillars_MultiHead_1025/preprocess.h

@@ -1,138 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file preprocess_points_cuda.h
- * @brief GPU version of preprocess points
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-#pragma once
-
-
-class PreprocessPointsCuda {
- private:
-    // initializer list
-    const int num_threads_;
-    const int max_num_pillars_;
-    const int max_num_points_per_pillar_;
-    const int num_point_feature_;
-    const int num_inds_for_scan_;
-    const int grid_x_size_;
-    const int grid_y_size_;
-    const int grid_z_size_;
-    const float pillar_x_size_;
-    const float pillar_y_size_;
-    const float pillar_z_size_;
-    const float min_x_range_;
-    const float min_y_range_;
-    const float min_z_range_;
-    // end initializer list
-
-    float* dev_pillar_point_feature_in_coors_;
-    int* dev_pillar_count_histo_;
-
-    int* dev_counter_;
-    int* dev_pillar_count_;
-    float* dev_points_mean_;
-
-
-
- public:
-  /**
-   * @brief Constructor
-   * @param[in] num_threads Number of threads when launching cuda kernel
-   * @param[in] num_point_feature Number of features in a point
-   * @param[in] num_inds_for_scan Number of indexes for scan(cumsum)
-   * 
-   * @param[in] max_num_pillars Maximum number of pillars
-   * @param[in] max_points_per_pillar Maximum number of points per pillar
-
-   * @param[in] grid_x_size Number of pillars in x-coordinate
-   * @param[in] grid_y_size Number of pillars in y-coordinate
-   * @param[in] grid_z_size Number of pillars in z-coordinate
-   * 
-   * @param[in] pillar_x_size Size of x-dimension for a pillar
-   * @param[in] pillar_y_size Size of y-dimension for a pillar
-   * @param[in] pillar_z_size Size of z-dimension for a pillar
-   * 
-   * @param[in] min_x_range Minimum x value for point cloud
-   * @param[in] min_y_range Minimum y value for point cloud
-   * @param[in] min_z_range Minimum z value for point cloud
-   * @details Captital variables never change after the compile
-   */
-  PreprocessPointsCuda(const int num_threads, const int num_point_feature, const int num_inds_for_scan,
-                       const int max_num_pillars, const int max_points_per_pillar,  
-                       const int grid_x_size, const int grid_y_size, const int grid_z_size,  // grid size
-                       const float pillar_x_size, const float pillar_y_size, const float pillar_z_size, //voxel size
-                       const float min_x_range, const float min_y_range, const float min_z_range); // point cloud range
-  ~PreprocessPointsCuda();
-
-  /**
-   * @brief CUDA preprocessing for input point cloud
-   * @param[in] dev_points Point cloud array
-   * @param[in] in_num_points The number of points
-   * @param[mid] dev_x_coors X-coordinate indexes for corresponding pillars
-   * @param[mid] dev_y_coors Y-coordinate indexes for corresponding pillars
-   * @param[mid] dev_num_points_per_pillar
-   *   Number of points in corresponding pillars
-   * @param[mid] pillar_point_feature
-   *   Values of point feature in each pillar
-   * @param[mid] pillar_coors Array for coors of pillars
-   * @param[mid] dev_points_mean Array for calculate the point center
-   * @param[out] dev_sparse_pillar_map
-   *   Grid map representation for pillar-occupancy
-   * @param[out] host_pillar_count
-   *   The number of valid pillars for an input point cloud
-   * @param[out] dev_pfe_gather_feature
-   *   11 dimensions feature for pfe input channel
-   * @details Convert point cloud to pillar representation
-   */
-  void DoPreprocessPointsCuda(const float* dev_points,
-                              const int in_num_points,
-                              int* dev_x_coors,
-                              int* dev_y_coors,
-                              float* dev_num_points_per_pillar,
-                              float* dev_pillar_point_feature,
-                              float* dev_pillar_coors,
-                              int* dev_sparse_pillar_map,
-                              int* host_pillar_count,
-                              float* dev_pfe_gather_feature);
-};

+ 0 - 73
src/detection/detection_lidar_PointPillars_MultiHead_1025/scatter.cu

@@ -1,73 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-
-//headers in local files
-#include "scatter.h"
-
-__global__ void scatter_kernel(int *x_coors, int *y_coors, float *pfe_output,
-  float *scattered_feature, const int grid_x_size,
-  const int grid_y_size) {
-int i_pillar = blockIdx.x;
-int i_feature = threadIdx.x;
-int x_ind = x_coors[i_pillar];
-int y_ind = y_coors[i_pillar];
-float feature = pfe_output[i_pillar * 64 + i_feature];
-scattered_feature[i_feature * grid_y_size * grid_x_size +
-y_ind * grid_x_size + x_ind] = feature;
-}
-
-ScatterCuda::ScatterCuda(const int num_threads, const int grid_x_size,
-const int grid_y_size)
-: num_threads_(num_threads),
-grid_x_size_(grid_x_size),
-grid_y_size_(grid_y_size) {}
-
-void ScatterCuda::DoScatterCuda(const int pillar_count, int *x_coors,
-   int *y_coors, float *pfe_output,
-   float *scattered_feature) {
-scatter_kernel<<<pillar_count, num_threads_>>>(x_coors, y_coors, pfe_output,
-                    scattered_feature,
-                    grid_x_size_, grid_y_size_);
-}

+ 0 - 77
src/detection/detection_lidar_PointPillars_MultiHead_1025/scatter.h

@@ -1,77 +0,0 @@
-/******************************************************************************
- * Copyright 2020 The Apollo Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *****************************************************************************/
-
-/*
- * Copyright 2018-2019 Autoware Foundation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Kosuke Murakami
- * @date 2019/02/26
- */
-
-/**
-* @author Yan haixu
-* Contact: just github.com/hova88
-* @date 2021/04/30
-*/
-
-
-#pragma once
-
-class ScatterCuda {
- private:
-  const int num_threads_;
-  const int grid_x_size_;
-  const int grid_y_size_;
-
- public:
-  /**
-   * @brief Constructor
-   * @param[in] num_threads The number of threads to launch cuda kernel
-   * @param[in] grid_x_size Number of pillars in x-coordinate
-   * @param[in] grid_y_size Number of pillars in y-coordinate
-   * @details Captital variables never change after the compile
-   */
-  ScatterCuda(const int num_threads, const int grid_x_size,
-              const int grid_y_size);
-
-  /**
-   * @brief Call scatter cuda kernel
-   * @param[in] pillar_count The valid number of pillars
-   * @param[in] x_coors X-coordinate indexes for corresponding pillars
-   * @param[in] y_coors Y-coordinate indexes for corresponding pillars
-   * @param[in] pfe_output Output from Pillar Feature Extractor
-   * @param[out] scattered_feature Gridmap representation for pillars' feature
-   * @details Allocate pillars in gridmap based on index(coordinates)
-   * information
-   */
-  void DoScatterCuda(const int pillar_count, int* x_coors, int* y_coors,
-                     float* pfe_output, float* scattered_feature);
-};
-

+ 1 - 1
src/driver/driver_lidar_rs16/main.cpp

@@ -185,7 +185,7 @@ int main(int argc, char *argv[])
     snprintf(gstr_inclinationang_yaxis,255,"0");
     snprintf(gstr_hostip,255,"0.0.0.0");
     snprintf(gstr_port,255,"6699");//默认端口号
-    snprintf(gstr_yaml,255,"");
+    snprintf(gstr_yaml,255,argv[1]);
 
     int nRtn = GetOptLong(argc,argv);
     if(nRtn == 1)  //show help,so exit.

+ 67 - 36
src/driver/driver_lidar_rs32/driver_lidar_rs32.pro

@@ -11,6 +11,7 @@
 //#include <pcl/conversions.h>
 #include <pcl/point_cloud.h>
 #include <pcl/point_types.h>
+#include <Eigen/Dense>
 
 #include "modulecomm.h"
 
@@ -23,13 +24,15 @@
 int vv7;
 #endif
 
+Eigen::Matrix3d rotation_matrix;
+Eigen::Vector3d trans_matrix;
+
 
 
 #define Lidar_Pi 3.1415926535897932384626433832795
 #define Lidar32 (unsigned long)3405883584//192.168.1.203
 #define Lidar_roll_ang (90)*Lidar_Pi/180.0
 
-
 std::thread * g_prs32Thread;
 std::thread * g_prs32ProcThread;
 
@@ -97,8 +100,6 @@ public:
     }
 };
 
-
-
 rs32_Buf  * g_rs32_Buf;
 char * g_RawData_Buf;
 int gnRawPos = 0;
@@ -237,8 +238,13 @@ void process_rs32obs(char * strdata,int nLen)
     pcl::PointCloud<pcl::PointXYZI>::Ptr point_cloud(
                 new pcl::PointCloud<pcl::PointXYZI>());
 
-
-
+    Eigen::AngleAxisd r_z ( 0, Eigen::Vector3d ( 0,0,1 ) ); //沿 Z 轴旋转 yaw   +
+    Eigen::AngleAxisd r_y ( 0, Eigen::Vector3d ( 0,1,0 ) ); //沿 Y 轴旋转 roll  +
+    Eigen::AngleAxisd r_x ( 0, Eigen::Vector3d ( 1,0,0 ) ); //沿 X 轴旋转 pitch -
+    Eigen::Quaterniond q_zyx = r_z*r_y*r_x; //ZYX旋转顺序(绕旋转后的轴接着旋转)
+    // 四元数-->>旋转矩阵
+    rotation_matrix = q_zyx.toRotationMatrix();
+    trans_matrix << 0, 0, 0;
 
 //    point_cloud->header.stamp =
 //            pcl_conversions::toPCL(sweep_data->header).stamp;
@@ -266,21 +272,41 @@ void process_rs32obs(char * strdata,int nLen)
 //    float lidar_32_ydistance = -2.3;			//32线激光雷达Y轴补偿
 
 
+//    float H_BETA[32] = {
+//        -8,-8,-8,-8,-8,-2.672,2.672,8,
+//        -8,-2.672,2.672,8,-8,-2.672,2.672,8,
+//        8,8,8,-8,8,-8,8,-8,
+//        -8,-2.672,2.672,8,-8,-2.672,2.672,8
+//    };
+
+//    float H_BETA[32] = {
+//        -4.11,3.67,-4.07,3.64,-4.03,3.62,-4.02,3.61,
+//                                   -4.01,3.61,-4.01,3.61,-4.02,3.62,-4.03,3.63,
+//                                  -4.06,3.71,-4.09,3.75,-4.23,3.92,-4.30,4.01,
+//                                  -4.56,4.18,-4.80,4.42,-5.07,4.66,-5.36,4.84
+//    };
+
     float H_BETA[32] = {
-        -8,-8,-8,-8,-8,-2.672,2.672,8,
-        -8,-2.672,2.672,8,-8,-2.672,2.672,8,
-        8,8,8,-8,8,-8,8,-8,
-        -8,-2.672,2.672,8,-8,-2.672,2.672,8
+        6.94,-3.54,6.88,-3.51,6.84,-3.49,6.83,-3.48,
+                                   6.84,-3.48,6.88,-3.49,6.94,-3.51,7.02,-3.54,
+                                  2.89,-7.72,2.87,-7.63,2.86,-7.56,2.85,-7.53,
+                                  2.85,-7.52,2.86,-7.54,2.88,-7.59,2.90,-7.67
     };
 
 //    float V_theta[16] = {-15,-13,-11,-9,-7,-5,-3,-1,15,13,11,9,7,5,3,1};
-    float V_theta[32] = {-25,-14.638,-7.91,-5.407,-3.667,-4,-4.333,-4.667,-2.333,-2.667,-3,-3.333,-1,-1.333,-1.667,-2,
-                        -10.281,-6.424,2.333,3.333,4.667,7,10.333,15,0.333,0,-0.333,-0.667,1.667,1.333,1.0,0.667};
-//    float V_theta[16] =  {-15,1,-13,3,-11,5,-9,7,-7,9,-5,11,-3,13,-1,15};
-//    float T[32] = {    0,  3.125,  1.5625,   4.6875,  6.25,  9.375,  7.8125,  10.9375,
-//                    12.5,  15.625, 14.0625, 17.1875, 18.75, 21.875,  20.3125, 23.4375,
-//                      25,  28.125, 26.5625, 29.6875, 31.25, 34.375, 32.8125,  35.9375,
-//                    37.5,  40.625, 39.0625, 42.1875, 43.75, 46.875, 45.3125,  48.4375};
+//    float V_theta[32] = {-25,-14.638,-7.91,-5.407,-3.667,-4,-4.333,-4.667,-2.333,-2.667,-3,-3.333,-1,-1.333,-1.667,-2,
+//                        -10.281,-6.424,2.333,3.333,4.667,7,10.333,15,0.333,0,-0.333,-0.667,1.667,1.333,1.0,0.667};
+//    float V_theta[32] = {14.94,13.03,10.92,8.9,6.96,5.46,
+//                         3.98,2.67,1.33,0,-1.33,-2.67,-3.96,
+//                         -5.23,-6.63,-8.01,-9.94,-15.97,-12.90,
+//                         -18.98,-21.92,-27.87,-24.96,-30.95,-33.89,
+//                         -37.09,-39.95,-43.11,-46.10,-49.13,-51.90,-53.70};
+    float V_theta[32] = {11.99,13.98,8.00,9.99,3.99,6.00,
+                         0,2.00,-3.99,-2.01,-7.98,-5.98,-12.01,
+                         -10.00,-15.99,-13.99,12.98,14.98,8.98,
+                         10.99,5.00,6.99,1.00,3.00,-3.01,
+                         -1.00,-6.99,-4.99,-10.98,-9.01,-14.99,-12.98};
+
 
 
         int buf1len = nLen/1206;
@@ -310,44 +336,49 @@ void process_rs32obs(char * strdata,int nLen)
                         Ang = (0 - wt-H_BETA[pointi]) / 180.0 * Lidar_Pi;
                         Range = ((pstr[bag*1206 + Group * 100 + 4 + 3 * pointi] << 8) + pstr[bag*1206+Group * 100 + 5 + 3 * pointi]);
                         unsigned char intensity = pstr[bag*1206 + Group * 100 + 6 + 3 * pointi];
-                        Range=Range* 5.0/1000.0;
+                        Range=Range* 5.0/2000.0;
 
                         if(Range<150)
                         {
-                            pcl::PointXYZI point;
-                            point.x  = Range*cos(V_theta[pointi] / 180 * Lidar_Pi)*cos(Ang + frollang);
-                            point.y  = Range*cos(V_theta[pointi] / 180 * Lidar_Pi)*sin(Ang + frollang);
-                            point.z  = Range*sin(V_theta[pointi] / 180 * Lidar_Pi);
+                            pcl::PointXYZI point,point_temp;
+                            point_temp.x  = Range*cos(V_theta[pointi] / 180 * Lidar_Pi)*cos(Ang + frollang);
+                            point_temp.y  = Range*cos(V_theta[pointi] / 180 * Lidar_Pi)*sin(Ang + frollang);
+                            point_temp.z  = Range*sin(V_theta[pointi] / 180 * Lidar_Pi);
+//                            if(point.z>1.5) continue;
                             if(binclix)
                             {
                                 double y,z;
-                                y = point.y;
-                                z = point.z;
-                                point.y = y*cos_finclinationang_xaxis +z*sin_finclinationang_xaxis;
-                                point.z = z*cos_finclinationang_xaxis - y*sin_finclinationang_xaxis;
+                                y = point_temp.y;
+                                z = point_temp.z;
+
+                                point_temp.y = y*cos_finclinationang_xaxis +z*sin_finclinationang_xaxis;
+                                point_temp.z = z*cos_finclinationang_xaxis - y*sin_finclinationang_xaxis;
                             }
                             if(bincliy)
                             {
                                 double z,x;
-                                z = point.z;
-                                x = point.x;
-                                point.z = z*cos_finclinationang_yaxis + x*sin_finclinationang_yaxis;
-                                point.x = x*cos_finclinationang_yaxis - z*sin_finclinationang_yaxis;
+                                z = point_temp.z;
+                                x = point_temp.x;
+                                point_temp.z = z*cos_finclinationang_yaxis + x*sin_finclinationang_yaxis;
+                                point_temp.x = x*cos_finclinationang_yaxis - z*sin_finclinationang_yaxis;
                             }
+                            point.x = -point_temp.y;
+                            point.y = point_temp.x;
+                            point.z = point_temp.z;
+                            Eigen::Vector3d new_point, old_point;
+                            old_point<<point.x, point.y, point.z;
+                            new_point = rotation_matrix * (old_point) + trans_matrix;
+                            point.x = new_point[0];
+                            point.y = new_point[1];
+                            point.z = new_point[2];
+
                             point.intensity = intensity;
                             point_cloud->points.push_back(point);
 
-
                             ++point_cloud->width;
                         }
                     }
 
-
-
-
-
-
-
                 }
             }
 

+ 1 - 1
src/driver/driver_lidar_rs32/lidar_driver_rs32.h

@@ -176,7 +176,7 @@ int main(int argc, char *argv[])
     QCoreApplication a(argc, argv);
 
     snprintf(gstr_memname,255,"lidar_pc");
-    snprintf(gstr_rollang,255,"-9.0");
+    snprintf(gstr_rollang,255,"0.0");
     snprintf(gstr_inclinationang_xaxis,255,"0.0");
     snprintf(gstr_inclinationang_yaxis,255,"0");
     snprintf(gstr_hostip,255,"0.0.0.0");

+ 1 - 1
src/tool/PerceptionShow/mainwindow.cpp

@@ -17,7 +17,7 @@
 #define VIEW_WIDTH 2000
 #define VIEW_HEIGHT 2000
 //ConsumerProducerQueue<cv::Mat> *imageBuffer = new ConsumerProducerQueue<cv::Mat>(1, true);
-std::string gstrperceptitle[] = {"image00","lidar_track","radar","lidarobj","fusion","imgdet"};
+std::string gstrperceptitle[] = {"lidar_pc","lidar_pointpillar","lidar_track","li_ra_fusion","obstacledata"};//{"image00","lidar_track","lidar_pc","lidar_pointpillar","radar","lidarobj","fusion","imgdet"};
 //std::string gstrperceptitle[] = {"image00","lidar","radar","fusion","lidarobj","imgdet"};
 //std::string gstrmemname[] = {"image00","lidarpc_center","radar","radafds","fusion"};
 std::string gstrmemname[] = {"image00","lidarpc_center","radar","fusion"};

+ 0 - 2939
thirdpartylib/FastRTPS/include/fastcdr/Cdr.h

@@ -1,2939 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_CDR_H_
-#define _FASTCDR_CDR_H_
-
-#include "fastcdr_dll.h"
-#include "FastBuffer.h"
-#include "exceptions/NotEnoughMemoryException.h"
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include <map>
-#include <iostream>
-
-#if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__
-#include <malloc.h>
-#else
-#include <stdlib.h>
-#endif
-
-#if HAVE_CXX0X
-#include <array>
-#endif
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        /*!
-         * @brief This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an eprosima::fastcdr::FastBuffer.
-         * @ingroup FASTCDRAPIREFERENCE
-         */
-        class Cdr_DllAPI Cdr
-        {
-            public:
-
-                //! @brief This enumeration represents the two kinds of CDR serialization supported by eprosima::fastcdr::CDR.
-                typedef enum
-                {
-                    //! @brief Common CORBA CDR serialization.
-                    CORBA_CDR,
-                    //! @brief DDS CDR serialization.
-                    DDS_CDR
-                } CdrType;
-
-                //! @brief This enumeration represents the two posible values of the flag that points if the content is a parameter list (only in DDS CDR).
-                typedef enum
-#ifdef HAVE_CXX0X
-                    : uint8_t
-#endif
-                    {
-                        //! @brief Specifies that the content is not a parameter list.
-                        DDS_CDR_WITHOUT_PL = 0x0,
-                        //! @brief Specifies that the content is a parameter list.
-                        DDS_CDR_WITH_PL = 0x2
-                    } DDSCdrPlFlag;
-
-                /*!
-                 * @brief This enumeration represents endianness types.
-                 */
-                typedef enum
-#ifdef HAVE_CXX0X
-                    : uint8_t
-#endif
-                    {
-                        //! @brief Big endianness.
-                        BIG_ENDIANNESS = 0x0,
-                        //! @brief Little endianness.
-                        LITTLE_ENDIANNESS = 0x1
-                    } Endianness;
-
-                //! @brief Default endiness in the system.
-                static const Endianness DEFAULT_ENDIAN;
-
-                /*!
-                 * @brief This class stores the current state of a CDR serialization.
-                 */
-                class Cdr_DllAPI state
-                {
-                    friend class Cdr;
-                    public:
-
-                    /*!
-                     * @brief Default constructor.
-                     */
-                    state(const Cdr &cdr);
-
-                    /*!
-                     * @brief Copy constructor.
-                     */
-                    state(const state&);
-
-                    private:
-
-                    state& operator=(const state&) = delete;
-
-                    //! @brief The position in the buffer when the state was created.
-                    const FastBuffer::iterator m_currentPosition;
-
-                    //! @brief The position from the aligment is calculated,  when the state was created..
-                    const FastBuffer::iterator m_alignPosition;
-
-                    //! @brief This attribute specified if it is needed to swap the bytes when the state was created..
-                    bool m_swapBytes;
-
-                    //! @brief Stores the last datasize serialized/deserialized when the state was created.
-                    size_t m_lastDataSize;
-                };
-
-                /*!
-                 * @brief This constructor creates an eprosima::fastcdr::Cdr object that can serialize/deserialize
-                 * the assigned buffer.
-                 *
-                 * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation.
-                 * @param endianness The initial endianness that will be used. The default value is the endianness of the system.
-                 * @param cdrType Represents the type of CDR that will be used in serialization/deserialization. The default value is CORBA CDR.
-                 */
-                Cdr(FastBuffer &cdrBuffer, const Endianness endianness = DEFAULT_ENDIAN, const CdrType cdrType = CORBA_CDR);
-
-                /*!
-                 * @brief This function reads the encapsulation of the CDR stream.
-                 *        If the CDR stream contains an encapsulation, then this function should be called before starting to deserialize.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                Cdr& read_encapsulation();
-
-                /*!
-                 * @brief This function writes the encapsulation of the CDR stream.
-                 *        If the CDR stream should contain an encapsulation, then this function should be called before starting to serialize.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize_encapsulation();
-
-                /*!
-                 * @brief This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR.
-                 * @return The flag that specifies if the content is a parameter list.
-                 */
-                DDSCdrPlFlag getDDSCdrPlFlag() const;
-
-                /*!
-                * @brief This function sets the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR.
-                * @param plFlag New value for the flag that specifies if the content is a parameter list.
-                */
-                void setDDSCdrPlFlag(DDSCdrPlFlag plFlag);
-
-                /*!
-                 * @brief This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR.
-                 * @return The option flags.
-                 */
-                uint16_t getDDSCdrOptions() const;
-
-                /*!
-                * @brief This function sets the option flags when the CDR type is eprosima::fastcdr::DDS_CDR.
-                * @param options New value for the option flags.
-                */
-                void setDDSCdrOptions(uint16_t options);
-
-                /*!
-                * @brief This function sets the current endianness used by the CDR type.
-                * @param endianness The new endianness value.
-                */
-                void changeEndianness(Endianness endianness);
-
-                /*!
-                 * @brief This function returns the current endianness used by the CDR type.
-                 * @return The endianness.
-                 */
-                Endianness endianness() const { return static_cast<Endianness>(m_endianness); }
-
-                /*!
-                 * @brief This function skips a number of bytes in the CDR stream buffer.
-                 * @param numBytes The number of bytes that will be jumped.
-                 * @return True is returned when it works successfully. Otherwise, false is returned.
-                 */
-                bool jump(size_t numBytes);
-
-                /*!
-                 * @brief This function resets the current position in the buffer to the beginning.
-                 */
-                void reset();
-
-                /*!
-                 * @brief This function returns the pointer to the current used buffer.
-                 * @return Pointer to the starting position of the buffer.
-                 */
-                char* getBufferPointer();
-
-                /*!
-                 * @brief This function returns the current position in the CDR stream.
-                 * @return Pointer to the current position in the buffer.
-                 */
-                char* getCurrentPosition();
-
-                /*!
-                 * @brief This function returns the length of the serialized data inside the stream.
-                 * @return The length of the serialized data.
-                 */
-                inline size_t getSerializedDataLength() const { return m_currentPosition - m_cdrBuffer.begin();}
-
-                /*!
-                 * @brief Get the number of bytes needed to align a position to certain data size.
-                 * @param current_alignment Position to be aligned.
-                 * @param dataSize Size of next data to process (should be power of two).
-                 * @return Number of required alignment bytes.
-                 */
-                inline static size_t alignment(size_t current_alignment, size_t dataSize) { return (dataSize - (current_alignment % dataSize)) & (dataSize-1);}
-
-                /*!
-                 * @brief This function returns the current state of the CDR serialization process.
-                 * @return The current state of the CDR serialization process.
-                 */
-                state getState();
-
-                /*!
-                 * @brief This function sets a previous state of the CDR serialization process;
-                 * @param state Previous state that will be set.
-                 */
-                void setState(state &state);
-
-                /*!
-                 * @brief This function moves the alignment forward.
-                 * @param numBytes The number of bytes the alignment should advance.
-                 * @return True If alignment was moved successfully.
-                 */
-                bool moveAlignmentForward(size_t numBytes);
-
-                /*!
-                 * @brief This function resets the alignment to the current position in the buffer.
-                 */
-                inline void resetAlignment(){m_alignPosition = m_currentPosition;}
-
-                /*!
-                 * @brief This operator serializes an octet.
-                 * @param octet_t The value of the octet that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const uint8_t octet_t){return serialize(octet_t);}
-
-                /*!
-                 * @brief This operator serializes a character.
-                 * @param char_t The value of the character that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const char char_t){return serialize(char_t);}
-
-                /*!
-                 * @brief This operator serializes a int8_t.
-                 * @param int8 The value of the int8_t that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const int8_t int8){return serialize(int8);}
-
-                /*!
-                 * @brief This operator serializes an unsigned short.
-                 * @param ushort_t The value of the unsigned short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const uint16_t ushort_t){return serialize(ushort_t);}
-
-                /*!
-                 * @brief This operator serializes a short.
-                 * @param short_t The value of the short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const int16_t short_t){return serialize(short_t);}
-
-                /*!
-                 * @brief This operator serializes an unsigned long.
-                 * @param ulong_t The value of the unsigned long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const uint32_t ulong_t){return serialize(ulong_t);}
-
-                /*!
-                 * @brief This operator serializes a long.
-                 * @param ulong_t The value of the long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const int32_t long_t){return serialize(long_t);}
-
-                /*!
-                 * @brief This operator serializes a wide-char.
-                 * @param wchar The value of the wide-char that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const wchar_t wchar){return serialize(wchar);}
-
-                /*!
-                 * @brief This operator serializes an unsigned long long.
-                 * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const uint64_t ulonglong_t){return serialize(ulonglong_t);}
-
-                /*!
-                 * @brief This operator serializes a long long.
-                 * @param longlong_t The value of the long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const int64_t longlong_t){return serialize(longlong_t);}
-
-                /*!
-                 * @brief This operator serializes a float.
-                 * @param float_t The value of the float that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const float float_t){return serialize(float_t);}
-
-                /*!
-                 * @brief This operator serializes a double.
-                 * @param double_t The value of the double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const double double_t){return serialize(double_t);}
-
-                /*!
-                 * @brief This operator serializes a long double.
-                 * @param ldouble_t The value of the long double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const long double ldouble_t){return serialize(ldouble_t);}
-
-                /*!
-                 * @brief This operator serializes a boolean.
-                 * @param bool_t The value of the boolean that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const bool bool_t){return serialize(bool_t);}
-
-                /*!
-                 * @brief This operator serializes a null-terminated c-string.
-                 * @param string_t Pointer to the begining of the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const char *string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a null-terminated c-string.
-                 * @param string_t Pointer to the begining of the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(char *string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a string.
-                 * @param string_t The string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const std::string &string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a wstring.
-                 * @param string_t The wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator<<(const std::wstring &string_t){return serialize(string_t);}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This operator template is used to serialize arrays.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& operator<<(const std::array<_T, _Size> &array_t){return serialize<_T, _Size>(array_t);}
-#endif
-
-                /*!
-                 * @brief This operator template is used to serialize sequences.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& operator<<(const std::vector<_T> &vector_t){return serialize<_T>(vector_t);}
-
-                /*!
-                 * @brief This operator template is used to serialize maps.
-                 * @param map_t The map that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _K, class _T>
-                    inline Cdr& operator<<(const std::map<_K, _T> &map_t){return serialize<_K, _T>(map_t);}
-
-                /*!
-                 * @brief This operator template is used to serialize any other non-basic type.
-                 * @param type_t A reference to the object that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& operator<<(const _T &type_t)
-                    {
-                        type_t.serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This operator deserializes an octet.
-                 * @param octet_t The variable that will store the octet read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(uint8_t &octet_t){return deserialize(octet_t);}
-
-                /*!
-                 * @brief This operator deserializes a character.
-                 * @param char_t The variable that will store the character read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(char &char_t){return deserialize(char_t);}
-
-                /*!
-                 * @brief This operator deserializes a int8_t.
-                 * @param int8 The variable that will store the int8_t read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(int8_t &int8){return deserialize(int8);}
-
-                /*!
-                 * @brief This operator deserializes an unsigned short.
-                 * @param ushort_t The variable that will store the unsigned short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(uint16_t &ushort_t){return deserialize(ushort_t);}
-
-                /*!
-                 * @brief This operator deserializes a short.
-                 * @param short_t The variable that will store the short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(int16_t &short_t){return deserialize(short_t);}
-
-                /*!
-                 * @brief This operator deserializes an unsigned long.
-                 * @param ulong_t The variable that will store the unsigned long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(uint32_t &ulong_t){return deserialize(ulong_t);}
-
-                /*!
-                 * @brief This operator deserializes a long.
-                 * @param long_t The variable that will store the long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(int32_t &long_t){return deserialize(long_t);}
-
-                // TODO in FastCdr
-                /*!
-                 * @brief This operator deserializes a wide-char.
-                 * @param wchar The variable that will store the wide-char read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(wchar_t &wchar){return deserialize(wchar);}
-
-                /*!
-                 * @brief This operator deserializes a unsigned long long.
-                 * @param ulonglong_t The variable that will store the unsigned long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(uint64_t &ulonglong_t){return deserialize(ulonglong_t);}
-
-                /*!
-                 * @brief This operator deserializes a long long.
-                 * @param longlong_t The variable that will store the long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(int64_t &longlong_t){return deserialize(longlong_t);}
-
-                /*!
-                 * @brief This operator deserializes a float.
-                 * @param float_t The variable that will store the float read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(float &float_t){return deserialize(float_t);}
-
-                /*!
-                 * @brief This operator deserializes a double.
-                 * @param double_t The variable that will store the double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(double &double_t){return deserialize(double_t);}
-
-                /*!
-                 * @brief This operator deserializes a long double.
-                 * @param ldouble_t The variable that will store the long double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(long double &ldouble_t){return deserialize(ldouble_t);}
-
-                /*!
-                 * @brief This operator deserializes a boolean.
-                 * @param bool_t The variable that will store the boolean read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                inline Cdr& operator>>(bool &bool_t){return deserialize(bool_t);}
-
-                /*!
-                 * @brief This operator deserializes a null-terminated c-string.
-                 * @param string_t The variable that will store the c-string read from the buffer.
-                 *                 Please note that a newly allocated string will be returned.
-                 *                 The caller should free the returned pointer when appropiate.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                inline Cdr& operator>>(char *&string_t){return deserialize(string_t);}
-
-                /*!
-                 * @brief This operator deserializes a string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(std::string &string_t){return deserialize(string_t);}
-
-                /*!
-                 * @brief This operator deserializes a string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& operator>>(std::wstring &string_t){return deserialize(string_t);}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This operator template is used to deserialize arrays.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& operator>>(std::array<_T, _Size> &array_t){return deserialize<_T, _Size>(array_t);}
-#endif
-
-                /*!
-                 * @brief This operator template is used to deserialize sequences.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& operator>>(std::vector<_T> &vector_t){return deserialize<_T>(vector_t);}
-
-                /*!
-                 * @brief This operator template is used to deserialize maps.
-                 * @param map_t The variable that will store the map read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _K, class _T>
-                    inline Cdr& operator>>(std::map<_K, _T> &map_t){return deserialize<_K, _T>(map_t);}
-
-                /*!
-                 * @brief This operator template is used to deserialize any other non-basic type.
-                 * @param type_t The variable that will store the object read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& operator>>(_T &type_t)
-                    {
-                        type_t.deserialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an octet.
-                 * @param octet_t The value of the octet that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint8_t octet_t)
-                    {
-                        return serialize(static_cast<char>(octet_t));
-                    }
-
-                /*!
-                 * @brief This function serializes an octet with a different endianness.
-                 * @param octet_t The value of the octet that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint8_t octet_t, Endianness endianness)
-                    {
-                        return serialize(static_cast<char>(octet_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes a character.
-                 * @param char_t The value of the character that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const char char_t);
-
-                /*!
-                 * @brief This function serializes a character with a different endianness.
-                 * @param char_t The value of the character that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const char char_t, Endianness /*endianness*/)
-                    {
-                        return serialize(char_t);
-                    }
-
-                /*!
-                 * @brief This function serializes an int8_t.
-                 * @param int8 The value of the int8_t that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const int8_t int8)
-                    {
-                        return serialize(static_cast<char>(int8));
-                    }
-
-                /*!
-                 * @brief This function serializes an int8_t with a different endianness.
-                 * @param octet_t The value of the int8_t that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const int8_t int8, Endianness endianness)
-                    {
-                        return serialize(static_cast<char>(int8), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned short.
-                 * @param ushort_t The value of the unsigned short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint16_t ushort_t)
-                    {
-                        return serialize(static_cast<int16_t>(ushort_t));
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned short with a different endianness.
-                 * @param ushort_t The value of the unsigned short that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint16_t ushort_t, Endianness endianness)
-                    {
-                        return serialize(static_cast<int16_t>(ushort_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes a short.
-                 * @param short_t The value of the short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int16_t short_t);
-
-                /*!
-                 * @brief This function serializes a short with a different endianness.
-                 * @param short_t The value of the short that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int16_t short_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an unsigned long.
-                 * @param ulong_t The value of the unsigned long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint32_t ulong_t)
-                    {
-                        return serialize(static_cast<int32_t>(ulong_t));
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned long with a different endianness.
-                 * @param ulong_t The value of the unsigned long that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint32_t ulong_t, Endianness endianness)
-                    {
-                        return serialize(static_cast<int32_t>(ulong_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes a long.
-                 * @param long_t The value of the long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int32_t long_t);
-
-                /*!
-                 * @brief This function serializes a long with a different endianness.
-                 * @param long_t The value of the long that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int32_t long_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a wide-char.
-                 * @param wchar The value of the wide-char that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const wchar_t wchar)
-                    {
-                        return serialize(static_cast<uint32_t>(wchar));
-                    }
-
-                /*!
-                 * @brief This function serializes a wide-char with a different endianness.
-                 * @param wchar The value of the wide-char that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const wchar_t wchar, Endianness endianness)
-                    {
-                        return serialize(static_cast<uint32_t>(wchar), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned long long.
-                 * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint64_t ulonglong_t)
-                    {
-                        return serialize(static_cast<int64_t>(ulonglong_t));
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned long long with a different endianness.
-                 * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const uint64_t ulonglong_t, Endianness endianness)
-                    {
-                        return serialize(static_cast<int64_t>(ulonglong_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes a long long.
-                 * @param longlong_t The value of the long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int64_t longlong_t);
-
-                /*!
-                 * @brief This function serializes a long long with a different endianness.
-                 * @param longlong_t The value of the long long that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const int64_t longlong_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a float.
-                 * @param float_t The value of the float that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const float float_t);
-
-                /*!
-                 * @brief This function serializes a float with a different endianness.
-                 * @param float_t The value of the float that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const float float_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a double.
-                 * @param double_t The value of the double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const double double_t);
-
-                /*!
-                 * @brief This function serializes a double with a different endianness.
-                 * @param double_t The value of the double that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const double double_t, Endianness endianness);
-
-
-                /*!
-                 * @brief This function serializes a long double.
-                 * @param ldouble_t The value of the long double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible.
-                 */
-                Cdr& serialize(const long double ldouble_t);
-
-                /*!
-                 * @brief This function serializes a long double with a different endianness.
-                 * @param ldouble_t The value of the long double that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible.
-                 */
-                Cdr& serialize(const long double ldouble_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a boolean.
-                 * @param bool_t The value of the boolean that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const bool bool_t);
-
-                /*!
-                 * @brief This function serializes a boolean with a different endianness.
-                 * @param bool_t The value of the boolean that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const bool bool_t, Endianness /*endianness*/)
-                    {
-                        return serialize(bool_t);
-                    }
-
-                /*!
-                 * @brief This function serializes a string.
-                 * @param string_t The pointer to the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline Cdr& serialize(char *string_t) { return serialize(static_cast<const char*>(string_t)); }
-
-                /*!
-                 * @brief This function serializes a string.
-                 * @param string_t The pointer to the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const char *string_t);
-
-                /*!
-                 * @brief This function serializes a wstring.
-                 * @param string_t The pointer to the wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const wchar_t *string_t);
-
-                /*!
-                 * @brief This function serializes a string with a different endianness.
-                 * @param string_t The pointer to the string that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const char *string_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a wstring with a different endianness.
-                 * @param string_t The pointer to the wstring that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serialize(const wchar_t *string_t, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes a std::string.
-                 * @param string_t The string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const std::string &string_t) {return serialize(string_t.c_str());}
-
-                /*!
-                 * @brief This function serializes a std::wstring.
-                 * @param string_t The wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const std::wstring &string_t) {return serialize(string_t.c_str());}
-
-                /*!
-                 * @brief This function serializes a std::string with a different endianness.
-                 * @param string_t The string that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serialize(const std::string &string_t, Endianness endianness)  {return serialize(string_t.c_str(), endianness);}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template serializes an array.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& serialize(const std::array<_T, _Size> &array_t)
-                    { return serializeArray(array_t.data(), array_t.size());}
-
-                /*!
-                 * @brief This function template serializes an array with a different endianness.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& serialize(const std::array<_T, _Size> &array_t, Endianness endianness)
-                    { return serializeArray(array_t.data(), array_t.size(), endianness);}
-#endif
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template serializes a sequence of booleans.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T = bool>
-                    Cdr& serialize(const std::vector<bool> &vector_t)
-                    {
-                        return serializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template serializes a sequence.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serialize(const std::vector<_T> &vector_t)
-                    {
-                        state state_before_error(*this);
-
-                        *this << static_cast<int32_t>(vector_t.size());
-
-                        try
-                        {
-                            return serializeArray(vector_t.data(), vector_t.size());
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes a map.
-                 * @param map_t The map that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _K, class _T>
-                    Cdr& serialize(const std::map<_K, _T> &map_t)
-                    {
-                        state state_(*this);
-
-                        *this << static_cast<int32_t>(map_t.size());
-
-                        try
-                        {
-                            for (auto it_pair = map_t.begin(); it_pair != map_t.end(); ++it_pair)
-                            {
-                                *this << it_pair->first;
-                                *this << it_pair->second;
-                            }
-                            //return serializeArray(map_t.data(), map_t.size());
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template serializes a sequence of booleans.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<>
-                    Cdr& serialize<bool>(const std::vector<bool> &vector_t)
-                    {
-                        return serializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template serializes a sequence with a different endianness.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serialize(const std::vector<_T> &vector_t, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            serialize(vector_t);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes a non-basic object.
-                 * @param type_t The object that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& serialize(const _T &type_t)
-                    {
-                        type_t.serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of octets.
-                 * @param octet_t The sequence of octets that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint8_t *octet_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(octet_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of octets with a different endianness.
-                 * @param octet_t The array of octets that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint8_t *octet_t, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(octet_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of characters.
-                 * @param char_t The array of characters that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const char *char_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of characters with a different endianness.
-                 * @param char_t The array of characters that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const char *char_t, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return serializeArray(char_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of int8_t.
-                 * @param int8 The sequence of int8_t that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const int8_t *int8, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(int8), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of int8_t with a different endianness.
-                 * @param int8 The array of int8_t that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const int8_t *int8, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(int8), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of unsigned shorts.
-                 * @param ushort_t The array of unsigned shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint16_t *ushort_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int16_t*>(ushort_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of unsigned shorts with a different endianness.
-                 * @param ushort_t The array of unsigned shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint16_t *ushort_t, size_t numElements, Endianness endianness)
-                    {
-                        return serializeArray(reinterpret_cast<const int16_t*>(ushort_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of shorts.
-                 * @param short_t The array of shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int16_t *short_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of shorts with a different endianness.
-                 * @param short_t The array of shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int16_t *short_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of unsigned longs.
-                 * @param ulong_t The array of unsigned longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint32_t *ulong_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int32_t*>(ulong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of unsigned longs with a different endianness.
-                 * @param ulong_t The array of unsigned longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint32_t *ulong_t, size_t numElements, Endianness endianness)
-                    {
-                        return serializeArray(reinterpret_cast<const int32_t*>(ulong_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of longs.
-                 * @param long_t The array of longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int32_t *long_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of longs with a different endianness.
-                 * @param long_t The array of longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int32_t *long_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of wide-chars.
-                 * @param wchar The array of wide-chars that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const wchar_t *wchar, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of wide-chars with a different endianness.
-                 * @param wchar The array of longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const wchar_t *wchar, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of unsigned long longs.
-                 * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int64_t*>(ulonglong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of unsigned long longs with a different endianness.
-                 * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements, Endianness endianness)
-                    {
-                        return serializeArray(reinterpret_cast<const int64_t*>(ulonglong_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of long longs.
-                 * @param longlong_t The array of long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int64_t *longlong_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of long longs with a different endianness.
-                 * @param longlong_t The array of long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const int64_t *longlong_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of floats.
-                 * @param float_t The array of floats that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const float *float_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of floats with a different endianness.
-                 * @param float_t The array of floats that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const float *float_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of doubles.
-                 * @param double_t The array of doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const double *double_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of doubles with a different endianness.
-                 * @param double_t The array of doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const double *double_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of long doubles.
-                 * @param ldouble_t The array of long doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const long double *ldouble_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of long doubles with a different endianness.
-                 * @param ldouble_t The array of long doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const long double *ldouble_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function serializes an array of booleans.
-                 * @param bool_t The array of booleans that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                Cdr& serializeArray(const bool *bool_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of booleans with a different endianness.
-                 * @param bool_t The array of booleans that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const bool *bool_t, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return serializeArray(bool_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of strings.
-                 * @param string_t The array of strings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const std::string *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(string_t[count].c_str());
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of wide-strings.
-                 * @param string_t The array of wide-strings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const std::wstring *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(string_t[count].c_str());
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of strings with a different endianness.
-                 * @param string_t The array of strings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const std::string *string_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            serializeArray(string_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of wide-strings with a different endianness.
-                 * @param string_t The array of wide-strings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& serializeArray(const std::wstring *string_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            serializeArray(string_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes an array of sequences of objects.
-                 * @param vector_t The array of sequences of objects that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serializeArray(const std::vector<_T> *vector_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(vector_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes an array of non-basic objects.
-                 * @param type_t The array of objects that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serializeArray(const _T *type_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            type_t[count].serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes an array of non-basic objects with a different endianness.
-                 * @param type_t The array of objects that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serializeArray(const _T *type_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            serializeArray(type_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes a raw sequence.
-                 * @param sequence_t Pointer to the sequence that will be serialized in the buffer.
-                 * @param numElements The number of elements contained in the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serializeSequence(const _T *sequence_t, size_t numElements)
-                    {
-                        state state_before_error(*this);
-
-                        serialize(static_cast<int32_t>(numElements));
-
-                        try
-                        {
-                            return serializeArray(sequence_t, numElements);
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes a raw sequence with a different endianness.
-                 * @param sequence_t Pointer to the sequence that will be serialized in the buffer.
-                 * @param numElements The number of elements contained in the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& serializeSequence(const _T *sequence_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            serializeSequence(sequence_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an octet.
-                 * @param octet_t The variable that will store the octet read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint8_t &octet_t)
-                    {
-                        return deserialize(reinterpret_cast<char&>(octet_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes an octet with a different endianness.
-                 * @param octet_t The variable that will store the octet read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint8_t &octet_t, Endianness endianness)
-                    {
-                        return deserialize(reinterpret_cast<char&>(octet_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes a character.
-                 * @param char_t The variable that will store the character read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(char &char_t);
-
-                /*!
-                 * @brief This function deserializes a character with a different endianness.
-                 * @param char_t The variable that will store the character read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(char &char_t, Endianness /*endianness*/)
-                    {
-                        return deserialize(char_t);
-                    }
-
-                /*!
-                 * @brief This function deserializes an int8_t.
-                 * @param int8 The variable that will store the int8_t read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(int8_t &int8)
-                    {
-                        return deserialize(reinterpret_cast<char&>(int8));
-                    }
-
-                /*!
-                 * @brief This function deserializes an int8_t with a different endianness.
-                 * @param int8 The variable that will store the int8_t read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(int8_t &int8, Endianness endianness)
-                    {
-                        return deserialize(reinterpret_cast<char&>(int8), endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned short.
-                 * @param ushort_t The variable that will store the unsigned short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint16_t &ushort_t)
-                    {
-                        return deserialize(reinterpret_cast<int16_t&>(ushort_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned short with a different endianness.
-                 * @param ushort_t The variable that will store the unsigned short read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint16_t &ushort_t, Endianness endianness)
-                    {
-                        return deserialize(reinterpret_cast<int16_t&>(ushort_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes a short.
-                 * @param short_t The variable that will store the short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int16_t &short_t);
-
-                /*!
-                 * @brief This function deserializes a short with a different endianness.
-                 * @param short_t The variable that will store the short read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int16_t &short_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an unsigned long.
-                 * @param ulong_t The variable that will store the unsigned long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint32_t &ulong_t)
-                    {
-                        return deserialize(reinterpret_cast<int32_t&>(ulong_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned long with a different endianness.
-                 * @param ulong_t The variable that will store the unsigned long read from the buffer..
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint32_t &ulong_t, Endianness endianness)
-                    {
-                        return deserialize(reinterpret_cast<int32_t&>(ulong_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes a long.
-                 * @param long_t The variable that will store the long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int32_t &long_t);
-
-                /*!
-                 * @brief This function deserializes a long with a different endianness.
-                 * @param long_t The variable that will store the long read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int32_t &long_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a wide-char.
-                 * @param wchar The variable that will store the wide-char read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(wchar_t &wchar)
-                    {
-                        uint32_t ret;
-                        deserialize(ret);
-                        wchar = static_cast<wchar_t>(ret);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes a wide-char with a different endianness.
-                 * @param wchar The variable that will store the wide-char read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(wchar_t &wchar, Endianness endianness)
-                    {
-                        uint32_t ret;
-                        deserialize(ret, endianness);
-                        wchar = static_cast<wchar_t>(ret);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned long long.
-                 * @param ulonglong_t The variable that will store the unsigned long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint64_t &ulonglong_t)
-                    {
-                        return deserialize(reinterpret_cast<int64_t&>(ulonglong_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned long long with a different endianness.
-                 * @param ulonglong_t The variable that will store the unsigned long long read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(uint64_t &ulonglong_t, Endianness endianness)
-                    {
-                        return deserialize(reinterpret_cast<int64_t&>(ulonglong_t), endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes a long long.
-                 * @param longlong_t The variable that will store the long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int64_t &longlong_t);
-
-                /*!
-                 * @brief This function deserializes a long long with a different endianness.
-                 * @param longlong_t The variable that will store the long long read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(int64_t &longlong_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a float.
-                 * @param float_t The variable that will store the float read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(float &float_t);
-
-                /*!
-                 * @brief This function deserializes a float with a different endianness.
-                 * @param float_t The variable that will store the float read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(float &float_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a double.
-                 * @param double_t The variable that will store the double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(double &double_t);
-
-                /*!
-                 * @brief This function deserializes a double with a different endianness.
-                 * @param double_t The variable that will store the double read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(double &double_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a long double.
-                 * @param ldouble_t The variable that will store the long double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible.
-                 */
-                Cdr& deserialize(long double &ldouble_t);
-
-                /*!
-                 * @brief This function deserializes a long double with a different endianness.
-                 * @param ldouble_t The variable that will store the long double read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible.
-                 */
-                Cdr& deserialize(long double &ldouble_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a boolean.
-                 * @param bool_t The variable that will store the boolean read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                Cdr& deserialize(bool &bool_t);
-
-                /*!
-                 * @brief This function deserializes a boolean with a different endianness.
-                 * @param bool_t The variable that will store the boolean read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                inline
-                    Cdr& deserialize(bool &bool_t, Endianness /*endianness*/)
-                    {
-                        return deserialize(bool_t);
-                    };
-
-                /*!
-                 * @brief This function deserializes a string.
-                 * This function allocates memory to store the string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(char *&string_t);
-
-                /*!
-                 * @brief This function deserializes a wide string.
-                 * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the wide string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(wchar_t *&string_t);
-
-                /*!
-                 * @brief This function deserializes a string with a different endianness.
-                 * This function allocates memory to store the string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(char *&string_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a wide string with a different endianness.
-                 * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the wide string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserialize(wchar_t *&string_t, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes a std::string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(std::string &string_t)
-                    {
-                        uint32_t length = 0;
-                        const char *str = readString(length);
-                        string_t = std::string(str, length);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes a std::string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(std::wstring &string_t)
-                    {
-                        uint32_t length = 0;
-                        string_t = readWString(length);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes a string with a different endianness.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(std::string &string_t, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserialize(string_t);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes a string with a different endianness.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserialize(std::wstring &string_t, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserialize(string_t);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes an array.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& deserialize(std::array<_T, _Size> &array_t)
-                    { return deserializeArray(array_t.data(), array_t.size());}
-
-                /*!
-                 * @brief This function template deserializes an array with a different endianness.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline Cdr& deserialize(std::array<_T, _Size> &array_t, Endianness endianness)
-                    { return deserializeArray(array_t.data(), array_t.size(), endianness);}
-#endif
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes a sequence.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T = bool>
-                    Cdr& deserialize(std::vector<bool> &vector_t)
-                    {
-                        return deserializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a sequence.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserialize(std::vector<_T> &vector_t)
-                    {
-                        uint32_t seqLength = 0;
-                        state state_before_error(*this);
-
-                        *this >> seqLength;
-
-                        try
-                        {
-                            vector_t.resize(seqLength);
-                            return deserializeArray(vector_t.data(), vector_t.size());
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes a map.
-                 * @param map_t The variable that will store the map read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _K, class _T>
-                    Cdr& deserialize(std::map<_K, _T> &map_t)
-                    {
-                        uint32_t seqLength = 0;
-                        state state_(*this);
-
-                        *this >> seqLength;
-
-                        try
-                        {
-                            for (uint32_t i = 0; i < seqLength; ++i)
-                            {
-                                _K key;
-                                _T value;
-                                *this >> key;
-                                *this >> value;
-                                map_t.emplace(std::pair<_K, _T>(std::move(key), std::move(value)));
-                            }
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template deserializes a sequence.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<>
-                    Cdr& deserialize<bool>(std::vector<bool> &vector_t)
-                    {
-                        return deserializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a sequence with a different endianness.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserialize(std::vector<_T> &vector_t, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserialize(vector_t);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes a non-basic object.
-                 * @param type_t The variable that will store the object read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline Cdr& deserialize(_T &type_t)
-                    {
-                        type_t.deserialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of octets.
-                 * @param octet_t The variable that will store the array of octets read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint8_t *octet_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(octet_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of octets with a different endianness.
-                 * @param octet_t The variable that will store the array of octets read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint8_t *octet_t, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(octet_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of characters.
-                 * @param char_t The variable that will store the array of characters read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(char *char_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of characters with a different endianness.
-                 * @param char_t The variable that will store the array of characters read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(char *char_t, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return deserializeArray(char_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of int8_t.
-                 * @param int8 The variable that will store the array of int8_t read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(int8_t *int8, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(int8), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of int8_t with a different endianness.
-                 * @param int8 The variable that will store the array of int8_t read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(int8_t *int8, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(int8), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of unsigned shorts.
-                 * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint16_t *ushort_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int16_t*>(ushort_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of unsigned shorts with a different endianness.
-                 * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint16_t *ushort_t, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(reinterpret_cast<int16_t*>(ushort_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of shorts.
-                 * @param short_t The variable that will store the array of shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int16_t *short_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of shorts with a different endianness.
-                 * @param short_t The variable that will store the array of shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int16_t *short_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of unsigned longs.
-                 * @param ulong_t The variable that will store the array of unsigned longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint32_t *ulong_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int32_t*>(ulong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of unsigned longs with a different endianness.
-                 * @param ulong_t The variable that will store the array of unsigned longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint32_t *ulong_t, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(reinterpret_cast<int32_t*>(ulong_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of longs.
-                 * @param long_t The variable that will store the array of longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int32_t *long_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of longs with a different endianness.
-                 * @param long_t The variable that will store the array of longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int32_t *long_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of wide-chars.
-                 * @param wchar The variable that will store the array of wide-chars read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(wchar_t *wchar, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of wide-chars with a different endianness.
-                 * @param wchar The variable that will store the array of wide-chars read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(wchar_t *wchar, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of unsigned long longs.
-                 * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int64_t*>(ulonglong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of unsigned long longs with a different endianness.
-                 * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(reinterpret_cast<int64_t*>(ulonglong_t), numElements, endianness);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of long longs.
-                 * @param longlong_t The variable that will store the array of long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int64_t *longlong_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of long longs with a different endianness.
-                 * @param longlong_t The variable that will store the array of long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(int64_t *longlong_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of floats.
-                 * @param float_t The variable that will store the array of floats read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(float *float_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of floats with a different endianness.
-                 * @param float_t The variable that will store the array of floats read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(float *float_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of doubles.
-                 * @param double_t The variable that will store the array of doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(double *double_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of doubles with a different endianness.
-                 * @param double_t The variable that will store the array of doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(double *double_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of long doubles.
-                 * @param ldouble_t The variable that will store the array of long doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(long double *ldouble_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of long doubles with a different endianness.
-                 * @param ldouble_t The variable that will store the array of long doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(long double *ldouble_t, size_t numElements, Endianness endianness);
-
-                /*!
-                 * @brief This function deserializes an array of booleans.
-                 * @param bool_t The variable that will store the array of booleans read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                Cdr& deserializeArray(bool *bool_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of booleans with a different endianness.
-                 * @param bool_t The variable that will store the array of booleans read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(bool *bool_t, size_t numElements, Endianness /*endianness*/)
-                    {
-                        return deserializeArray(bool_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of strings.
-                 * @param string_t The variable that will store the array of strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(std::string *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(string_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of wide-strings.
-                 * @param string_t The variable that will store the array of wide-strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(std::wstring *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(string_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of strings with a different endianness.
-                 * @param string_t The variable that will store the array of strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(std::string *string_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserializeArray(string_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of wide-strings with a different endianness.
-                 * @param string_t The variable that will store the array of wide-strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                inline
-                    Cdr& deserializeArray(std::wstring *string_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserializeArray(string_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of sequences of objects.
-                 * @param string_t The variable that will store the array of sequences of objects read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserializeArray(std::vector<_T> *vector_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(vector_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes an array of non-basic objects.
-                 * @param type_t The variable that will store the array of objects read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserializeArray(_T *type_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            type_t[count].deserialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes an array of non-basic objects with a different endianness.
-                 * @param type_t The variable that will store the array of objects read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserializeArray(_T *type_t, size_t numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserializeArray(type_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes a string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T = std::string>
-                    Cdr& deserializeSequence(std::string *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeStringSequence(sequence_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function template deserializes a wide-string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T = std::wstring>
-                    Cdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeWStringSequence(sequence_t, numElements);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a raw sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserializeSequence(_T *&sequence_t, size_t &numElements)
-                    {
-                        uint32_t seqLength = 0;
-                        state state_before_error(*this);
-
-                        deserialize(seqLength);
-
-                        try
-                        {
-                            sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T)));
-                            deserializeArray(sequence_t, seqLength);
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            free(sequence_t);
-                            sequence_t = NULL;
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        numElements = seqLength;
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template deserializes a string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<>
-                    Cdr& deserializeSequence<std::string>(std::string *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeStringSequence(sequence_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function template deserializes a wide-string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<>
-                    Cdr& deserializeSequence<std::wstring>(std::wstring *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeWStringSequence(sequence_t, numElements);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a raw sequence with a different endianness.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    Cdr& deserializeSequence(_T *&sequence_t, size_t &numElements, Endianness endianness)
-                    {
-                        bool auxSwap = m_swapBytes;
-                        m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness));
-
-                        try
-                        {
-                            deserializeSequence(sequence_t, numElements);
-                            m_swapBytes = auxSwap;
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            m_swapBytes = auxSwap;
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-            private:
-
-                Cdr(const Cdr&) = delete;
-
-                Cdr& operator=(const Cdr&) = delete;
-
-                Cdr& serializeBoolSequence(const std::vector<bool> &vector_t);
-
-                Cdr& deserializeBoolSequence(std::vector<bool> &vector_t);
-
-                Cdr& deserializeStringSequence(std::string *&sequence_t, size_t &numElements);
-
-                Cdr& deserializeWStringSequence(std::wstring *&sequence_t, size_t &numElements);
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template detects the content type of the STD container array and serializes the array.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    Cdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements)
-                    {
-                        return serializeArray(array_t->data(), numElements * array_t->size());
-                    }
-
-                /*!
-                 * @brief This function template detects the content type of the STD container array and serializes the array with a different endianness.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    Cdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements, Endianness endianness)
-                    {
-                        return serializeArray(array_t->data(), numElements * array_t->size(), endianness);
-                    }
-
-                /*!
-                 * @brief This function template detects the content type of the STD container array and deserializes the array.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    Cdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements)
-                    {
-                        return deserializeArray(array_t->data(), numElements * array_t->size());
-                    }
-
-                /*!
-                 * @brief This function template detects the content type of STD container array and deserializes the array with a different endianness.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @param endianness Endianness that will be used in the serialization of this value.
-                 * @return Reference to the eprosima::fastcdr::Cdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    Cdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements, Endianness endianness)
-                    {
-                        return deserializeArray(array_t->data(), numElements * array_t->size(), endianness);
-                    }
-#endif
-
-                /*!
-                 * @brief This function returns the extra bytes regarding the allignment.
-                 * @param dataSize The size of the data that will be serialized.
-                 * @return The size needed for the aligment.
-                 */
-                inline size_t alignment(size_t dataSize) const {return dataSize > m_lastDataSize ? (dataSize - ((m_currentPosition - m_alignPosition) % dataSize)) & (dataSize-1) : 0;}
-
-                /*!
-                 * @brief This function jumps the number of bytes of the alignment. These bytes should be calculated with the function eprosima::fastcdr::Cdr::alignment.
-                 * @param align The number of bytes to be skipped.
-                 */
-                inline void makeAlign(size_t align){m_currentPosition += align;}
-
-                /*!
-                 * @brief This function resizes the internal buffer. It only applies if the FastBuffer object was created with the default constructor.
-                 * @param minSizeInc Minimun size increase for the internal buffer
-                 * @return True if the resize was succesful, false if it was not
-                 */
-                bool resize(size_t minSizeInc);
-
-                //TODO
-                const char* readString(uint32_t &length);
-                const std::wstring readWString(uint32_t &length);
-
-                //! @brief Reference to the buffer that will be serialized/deserialized.
-                FastBuffer &m_cdrBuffer;
-
-                //! @brief The type of CDR that will be use in serialization/deserialization.
-                CdrType m_cdrType;
-
-                //! @brief Using DDS_CDR type, this attribute stores if the stream buffer contains a parameter list or not.
-                DDSCdrPlFlag m_plFlag;
-
-                //! @brief This attribute stores the option flags when the CDR type is DDS_CDR;
-                uint16_t m_options;
-
-                //! @brief The endianness that will be applied over the buffer.
-                uint8_t m_endianness;
-
-                //! @brief This attribute specifies if it is needed to swap the bytes.
-                bool m_swapBytes;
-
-                //! @brief Stores the last datasize serialized/deserialized. It's used to optimize.
-                size_t m_lastDataSize;
-
-                //! @brief The current position in the serialization/deserialization process.
-                FastBuffer::iterator m_currentPosition;
-
-                //! @brief The position from where the aligment is calculated.
-                FastBuffer::iterator m_alignPosition;
-
-                //! @brief The last position in the buffer;
-                FastBuffer::iterator m_lastPosition;
-        };
-    } //namespace fastcdr
-} //namespace eprosima
-
-#endif // _CDR_CDR_H_

+ 0 - 312
thirdpartylib/FastRTPS/include/fastcdr/FastBuffer.h

@@ -1,312 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_CDRBUFFER_H_
-#define _FASTCDR_CDRBUFFER_H_
-
-#include "fastcdr_dll.h"
-#include <stdint.h>
-#include <cstdio>
-#include <string.h>
-#include <cstddef>
-#include <utility>
-
-inline uint32_t size_to_uint32(size_t val) {
-  #if defined(_WIN32) || !defined(FASTCDR_ARM32)
-  // On 64 bit platforms and all Windows architectures (because of C4267), explicitly cast.
-  return static_cast<uint32_t>(val);
-  #else
-  // Skip useless cast on 32-bit builds.
-  return val;
-  #endif
-}
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        /*!
-         * @brief This class implements the iterator used to go through a FastBuffer.
-         */
-        class Cdr_DllAPI _FastBuffer_iterator
-        {
-            public:
-
-                /*!
-                 * @brief Default constructor.
-                 * The iterator points any position.
-                 */
-                _FastBuffer_iterator() : m_buffer(NULL), m_currentPosition(NULL) {}
-
-                /*!
-                 * @brief Constructor.
-                 * The iterator points to the indicated position.
-                 * @param buffer Pointer to the raw buffer.
-                 * @param index Position of the raw buffer where the iterator will point.
-                 */
-                explicit _FastBuffer_iterator(char *buffer, size_t index) : m_buffer(buffer), m_currentPosition(&m_buffer[index]){}
-
-                /*!
-                 * @brief This operator changes the iterator's raw buffer.
-                 * This operator makes the iterator point to the same position but in another raw buffer.
-                 * The new raw buffer is the same than the source iterator's.
-                 * @param iterator The source iterator. The iterator will use the source iterator's raw buffer after this operation.
-                 */
-                inline
-                    void operator<<(const _FastBuffer_iterator &iterator)
-                    {
-                        ptrdiff_t diff = m_currentPosition - m_buffer;
-                        m_buffer = iterator.m_buffer;
-                        m_currentPosition = m_buffer + diff;
-                    }
-
-                /*!
-                 * @brief This operator changes the position where the iterator points.
-                 * This operator takes the index of the source iterator, but the iterator continues using its raw buffer.
-                 * @param The source iterator. The iterator will use the source's iterator index to point to its own raw buffer.
-                 */
-                inline
-                    void operator>>(const _FastBuffer_iterator &iterator)
-                    {
-                        ptrdiff_t diff = iterator.m_currentPosition - iterator.m_buffer;
-                        m_currentPosition = m_buffer + diff;
-                    }
-
-                /*!
-                 * @brief This operator copies a data in the raw buffer.
-                 * The copy uses the size of the data type.
-                 * @param data Data to be copied. Cannot be NULL.
-                 */
-                template<typename _T>
-                    inline
-                    void operator<<(const _T &data)
-                    {
-                        memcpy(m_currentPosition, &data, sizeof(_T));
-                    }
-
-                /*!
-                 * @brief This operator copies data from the raw buffer to a variable.
-                 * The copy uses the size of the data type.
-                 * @param data Data to be filled.
-                 */
-                template<typename _T>
-                    inline
-                    void operator>>(_T &data)
-                    {
-                        memcpy(&data, m_currentPosition, sizeof(_T));
-                    }
-
-                /*!
-                 * @brief This function copies a buffer into the raw buffer.
-                 * @param src The source buffer.
-                 * @param size The number of bytes to be copied.
-                 */
-                inline
-                    void memcopy(const void* src, const size_t size)
-                    {
-                        if (size > 0) {
-                            memcpy(m_currentPosition, src, size);
-                        }
-                    }
-
-                /*!
-                 * @brief This function copies from the raw buffer to a external buffer.
-                 * @param dst The destination buffer.
-                 * @param size The size of bytes to be copied.
-                 */
-                inline
-                    void rmemcopy(void* dst, const size_t size)
-                    {
-                        if (size > 0) {
-                            memcpy(dst, m_currentPosition, size);
-                        }
-                    }
-
-                /*!
-                 * @brief This function increments the position where the iterator points.
-                 * @param numBytes Number of bytes the iterator moves the position.
-                 */
-                inline
-                    void operator+=(size_t numBytes)
-                    {
-                        m_currentPosition += numBytes;
-                    }
-
-                /*!
-                 * @brief This operator returns the subtraction of the current interator's position and the source iterator's position.
-                 * @iterator Source iterator whose position is subtracted to the current iterator's position.
-                 * @return The result of subtract the current iterator's position and the source iterator's position.
-                 */
-                inline
-                    size_t operator-(const _FastBuffer_iterator &it) const
-                    {
-                        return static_cast<size_t>(m_currentPosition - it.m_currentPosition);
-                    }
-
-                /*!
-                 * @brief This function increments the iterator in one the position.
-                 * @return The current iterator.
-                 */
-                inline
-                    _FastBuffer_iterator operator++()
-                    {
-                        ++m_currentPosition;
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function increments the iterator in one the position.
-                 * @return The current iterator.
-                 */
-                inline
-                    _FastBuffer_iterator operator++(int)
-                    {
-                        _FastBuffer_iterator tmp = *this;
-                        ++*this;
-                        return tmp;
-                    }
-
-                /*!
-                 * @brief This function returns the current position in the raw buffer.
-                 * @return The current position in the raw buffer.
-                 */
-                inline
-                    char* operator&()
-                    {
-                        return m_currentPosition;
-                    }
-
-            private:
-
-                //! Pointer to the raw buffer.
-                char *m_buffer;
-
-                //! Current position in the raw buffer.
-                char *m_currentPosition;
-        };
-
-        /*!
-         * @brief This class represents a stream of bytes that contains (or will contain)
-         * serialized data. This class is used by the serializers to serialize
-         * or deserialize using their representation.
-         * @ingroup FASTCDRAPIREFERENCE
-         */
-        class Cdr_DllAPI FastBuffer
-        {
-            public:
-                typedef _FastBuffer_iterator iterator;
-
-                /*!
-                 * @brief This constructor creates an internal stream and assigns it to the eprosima::fastcdr::FastBuffers object.
-                 * The user can obtain this internal stream using the function eprosima::fastcdr::FastBuffers::getBuffer(). Be careful because this internal stream
-                 * is deleted in the destruction of the eprosima::fastcdr::FastBuffers object.
-                 */
-                FastBuffer();
-
-                /*!
-                 * @brief This constructor assigns the user's stream of bytes to the eprosima::fastcdr::FastBuffers object.
-                 * The user's stream will be used to serialize.
-                 *
-                 * @param buffer The user's buffer that will be used. This buffer is not deallocated in the object's destruction. Cannot be NULL.
-                 * @param bufferSize The length of user's buffer.
-                 */
-                FastBuffer(char* const buffer, const size_t bufferSize);
-
-                //! Move constructor
-                FastBuffer(FastBuffer&& fbuffer) : m_buffer(nullptr), m_bufferSize(0), m_internalBuffer(true)
-                {
-                    std::swap(m_buffer, fbuffer.m_buffer);
-                    std::swap(m_bufferSize, fbuffer.m_bufferSize);
-                    std::swap(m_internalBuffer, fbuffer.m_internalBuffer);
-                }
-
-                //! Move assignment
-                FastBuffer& operator=(FastBuffer&& fbuffer)
-                {
-                    std::swap(m_buffer, fbuffer.m_buffer);
-                    std::swap(m_bufferSize, fbuffer.m_bufferSize);
-                    std::swap(m_internalBuffer, fbuffer.m_internalBuffer);
-                    return *this;
-                }
-
-                /*!
-                 * @brief Default destructor.
-                 */
-                virtual ~FastBuffer();
-
-                /*!
-                 * @brief This function returns the stream that the eprosima::fastcdr::FastBuffers uses to serialize data.
-                 * @return The stream used by eprosima::fastcdr::FastBuffers to serialize data.
-                 */
-                inline char* getBuffer() const { return m_buffer;}
-
-                /*!
-                 * @brief This function returns the size of the allocated memory of the stream that the eprosima::fastcdr::FastBuffers uses to serialize data.
-                 * @return The size of the allocated memory of the stream used by the eprosima::fastcdr::FastBuffers to serialize data.
-                 */
-                inline size_t getBufferSize() const { return m_bufferSize;}
-
-                /*!
-                 * @brief This function returns a iterator that points to the begining of the stream.
-                 * @return The new iterator.
-                 */
-                inline
-                    iterator begin()
-                    {
-                        return (iterator(m_buffer, 0));
-                    }
-
-                /*!
-                 * @brief This function returns a iterator that points to the end of the stream.
-                 * @return The new iterator.
-                 */
-                inline
-                    iterator end()
-                    {
-                        return (iterator(m_buffer, m_bufferSize));
-                    }
-
-                /*!
-                 * @brief This function reserves memory for the internal raw buffer. It will only do so if the buffer is not yet allocated and is not externally set.
-                 * @param size The size of the memory to be allocated.
-                 * @return True if the allocation suceeded. False if the raw buffer was set externally or is already allocated.
-                 */
-                bool reserve(size_t size);
-
-                /*!
-                 * @brief This function resizes the raw buffer. It will call the user's defined function for this purpose.
-                 * @param minSizeInc The minimun growth expected of the current raw buffer.
-                 * @return True if the operation works. False if it does not.
-                 */
-                bool resize(size_t minSizeInc);
-
-            private:
-
-                FastBuffer(const FastBuffer&) = delete;
-
-                FastBuffer& operator=(const FastBuffer&) = delete;
-
-                //! @brief Pointer to the stream of bytes that contains the serialized data.
-                char *m_buffer;
-
-                //! @brief The total size of the user's buffer.
-                size_t m_bufferSize;
-
-                //! @brief This variable indicates if the managed buffer is internal or is from the user.
-                bool m_internalBuffer;
-        };
-    } //namespace fastcdr
-} //namespace eprosima
-
-#endif // _FASTCDR_FASTCDRBUFFER_H_

+ 0 - 1756
thirdpartylib/FastRTPS/include/fastcdr/FastCdr.h

@@ -1,1756 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_FASTCDR_H_
-#define _FASTCDR_FASTCDR_H_
-
-#include "fastcdr_dll.h"
-#include "FastBuffer.h"
-#include "exceptions/NotEnoughMemoryException.h"
-#include <stdint.h>
-#include <string>
-#include <vector>
-
-#if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__
-#include <malloc.h>
-#else
-#include <stdlib.h>
-#endif
-
-#if HAVE_CXX0X
-#include <array>
-#endif
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        /*!
-         * @brief This class offers an interface to serialize/deserialize some basic types using a modified CDR protocol inside a eprosima::FastBuffer.
-         * This modified CDR protocol provides a serialization mechanism much faster than common CDR protocol, because it doesn't use alignment.
-         * @ingroup FASTCDRAPIREFERENCE
-         */
-        class Cdr_DllAPI FastCdr
-        {
-            public:
-
-                /*!
-                 * @brief This class stores the current state of a CDR serialization.
-                 */
-                class Cdr_DllAPI state
-                {
-                    friend class FastCdr;
-                    public:
-
-                    /*!
-                     * @brief Default constructor.
-                     */
-                    state(const FastCdr &fastcdr);
-
-                    /*!
-                     * @brief Copy constructor.
-                     */
-                    state(const state&);
-
-                    private:
-
-                    state& operator=(const state&) = delete;
-
-                    //! @brief The position in the buffer when the state was created.
-                    const FastBuffer::iterator m_currentPosition;
-                };
-                /*!
-                 * @brief This constructor creates a eprosima::fastcdr::FastCdr object that can serialize/deserialize
-                 * the assigned buffer.
-                 *
-                 * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation.
-                 */
-                FastCdr(FastBuffer &cdrBuffer);
-
-                /*!
-                 * @brief This function skips a number of bytes in the CDR stream buffer.
-                 * @param numBytes The number of bytes that will be jumped.
-                 * @return True is returned when the jump operation works successfully. Otherwise, false is returned.
-                 */
-                bool jump(size_t numBytes);
-
-                /*!
-                 * @brief This function resets the current position in the buffer to the begining.
-                 */
-                void reset();
-
-                /*!
-                 * @brief This function returns the current position in the CDR stream.
-                 * @return Pointer to the current position in the buffer.
-                 */
-                char* getCurrentPosition();
-
-                /*!
-                 * @brief This function returns the length of the serialized data inside the stream.
-                 * @return The length of the serialized data.
-                 */
-                inline size_t getSerializedDataLength() const { return m_currentPosition - m_cdrBuffer.begin();}
-
-                /*!
-                 * @brief This function returns the current state of the CDR stream.
-                 * @return The current state of the buffer.
-                 */
-                FastCdr::state getState();
-
-                /*!
-                 * @brief This function sets a previous state of the CDR stream;
-                 * @param state Previous state that will be set again.
-                 */
-                void setState(FastCdr::state &state);
-
-                /*!
-                 * @brief This operator serializes an octet.
-                 * @param octet_t The value of the octet that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const uint8_t octet_t){return serialize(octet_t);}
-
-                /*!
-                 * @brief This operator serializes a character.
-                 * @param char_t The value of the character that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const char char_t){return serialize(char_t);}
-
-                /*!
-                 * @brief This operator serializes a int8_t.
-                 * @param int8 The value of the int8_t that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const int8_t int8){return serialize(int8);}
-
-                /*!
-                 * @brief This operator serializes an unsigned short.
-                 * @param ushort_t The value of the unsigned short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const uint16_t ushort_t){return serialize(ushort_t);}
-
-                /*!
-                 * @brief This operator serializes a short.
-                 * @param short_t The value of the short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const int16_t short_t){return serialize(short_t);}
-
-                /*!
-                 * @brief This operator serializes an unsigned long.
-                 * @param ulong_t The value of the unsigned long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const uint32_t ulong_t){return serialize(ulong_t);}
-
-                /*!
-                 * @brief This operator serializes a long.
-                 * @param long_t The value of the long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const int32_t long_t){return serialize(long_t);}
-
-                /*!
-                 * @brief This operator serializes a wide-char.
-                 * @param wchar The value of the wide-char that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const wchar_t wchar){return serialize(wchar);}
-
-                /*!
-                 * @brief This operator serializes an unsigned long long.
-                 * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const uint64_t ulonglong_t){return serialize(ulonglong_t);}
-
-                /*!
-                 * @brief This operator serializes a long long.
-                 * @param longlong_t The value of the long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const int64_t longlong_t){return serialize(longlong_t);}
-
-                /*!
-                 * @brief This operator serializes a float.
-                 * @param float_t The value of the float that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const float float_t){return serialize(float_t);}
-
-                /*!
-                 * @brief This operator serializes a ldouble.
-                 * @param double_t The value of the double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const double double_t){return serialize(double_t);}
-
-                /*!
-                 * @brief This operator serializes a long double.
-                 * @param ldouble_t The value of the long double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const long double ldouble_t){return serialize(ldouble_t);}
-
-                /*!
-                 * @brief This operator serializes a boolean.
-                 * @param bool_t The value of the boolean that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const bool bool_t){return serialize(bool_t);}
-
-                /*!
-                 * @brief This operator serializes a null-terminated string.
-                 * @param string_t The value of the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const char *string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a null-terminated wide-string.
-                 * @param string_t The value of the wide-string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const wchar_t *string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a string.
-                 * @param string_t The string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const std::string &string_t){return serialize(string_t);}
-
-                /*!
-                 * @brief This operator serializes a wstring.
-                 * @param string_t The wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator<<(const std::wstring &string_t){return serialize(string_t);}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This operator template is used to serialize arrays.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline FastCdr& operator<<(const std::array<_T, _Size> &array_t){return serialize<_T, _Size>(array_t);}
-#endif
-
-                /*!
-                 * @brief This operator template is used to serialize sequences.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& operator<<(const std::vector<_T> &vector_t){return serialize<_T>(vector_t);}
-
-                /*!
-                 * @brief This operator template is used to serialize non-basic types.
-                 * @param type_t The object that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& operator<<(const _T &type_t)
-                    {
-                        type_t.serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This operator deserializes an octet.
-                 * @param octet_t The variable that will store the octet read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(uint8_t &octet_t){return deserialize(octet_t);}
-
-                /*!
-                 * @brief This operator deserializes a character.
-                 * @param char_t The variable that will store the character read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(char &char_t){return deserialize(char_t);}
-
-                /*!
-                 * @brief This operator deserializes an int8_t.
-                 * @param int8 The variable that will store the int8_t read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(int8_t &int8){return deserialize(int8);}
-
-                /*!
-                 * @brief This operator deserializes an unsigned short.
-                 * @param ushort_t The variable that will store the unsigned short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(uint16_t &ushort_t){return deserialize(ushort_t);}
-
-                /*!
-                 * @brief This operator deserializes a short.
-                 * @param short_t The variable that will store the short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(int16_t &short_t){return deserialize(short_t);}
-
-                /*!
-                 * @brief This operator deserializes an unsigned long.
-                 * @param ulong_t The variable that will store the unsigned long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(uint32_t &ulong_t){return deserialize(ulong_t);}
-
-                /*!
-                 * @brief This operator deserializes a long.
-                 * @param long_t The variable that will store the long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(int32_t &long_t){return deserialize(long_t);}
-
-                /*!
-                 * @brief This operator deserializes a wide-char.
-                 * @param wchar The variable that will store the wide-char read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(wchar_t &wchar){return deserialize(wchar);}
-
-                /*!
-                 * @brief This operator deserializes an unsigned long long.
-                 * @param ulonglong_t The variable that will store the unsigned long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(uint64_t &ulonglong_t){return deserialize(ulonglong_t);}
-
-                /*!
-                 * @brief This operator deserializes a long long.
-                 * @param longlong_t The variable that will store the long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(int64_t &longlong_t){return deserialize(longlong_t);}
-
-                /*!
-                 * @brief This operator deserializes a float.
-                 * @param float_t The variable that will store the float read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(float &float_t){return deserialize(float_t);}
-
-                /*!
-                 * @brief This operator deserializes a double.
-                 * @param double_t The variable that will store the double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(double &double_t){return deserialize(double_t);}
-
-                /*!
-                 * @brief This operator deserializes a long double.
-                 * @param ldouble_t The variable that will store the long double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(long double &ldouble_t){return deserialize(ldouble_t);}
-
-                /*!
-                 * @brief This operator deserializes a boolean.
-                 * @param bool_t The variable that will store the boolean read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value.
-                 */
-                inline FastCdr& operator>>(bool &bool_t){return deserialize(bool_t);}
-
-                /*!
-                 * @brief This operator deserializes a null-terminated c-string.
-                 * @param string_t The variable that will store the c-string read from the buffer.
-                 *                 Please note that a newly allocated string will be returned.
-                 *                 The caller should free the returned pointer when appropiate.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value.
-                 */
-                inline FastCdr& operator>>(char *&string_t){return deserialize(string_t);}
-
-                /*!
-                 * @brief This operator deserializes a string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(std::string &string_t){return deserialize(string_t);}
-
-                /*!
-                 * @brief This operator deserializes a wstring.
-                 * @param string_t The variable that will store the wstring read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline FastCdr& operator>>(std::wstring &string_t){return deserialize(string_t);}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This operator template is used to deserialize arrays.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline FastCdr& operator>>(std::array<_T, _Size> &array_t){return deserialize<_T, _Size>(array_t);}
-#endif
-
-                /*!
-                 * @brief This operator template is used to deserialize sequences.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& operator>>(std::vector<_T> &vector_t){return deserialize<_T>(vector_t);}
-
-                /*!
-                 * @brief This operator template is used to deserialize non-basic types.
-                 * @param type_t The variable that will store the object read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& operator>>(_T &type_t)
-                    {
-                        type_t.deserialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an octet.
-                 * @param octet_t The value of the octet that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const uint8_t octet_t)
-                    {
-                        return serialize(static_cast<char>(octet_t));
-                    }
-
-                /*!
-                 * @brief This function serializes a character.
-                 * @param char_t The value of the character that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const char char_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(char_t)) || resize(sizeof(char_t)))
-                        {
-                            m_currentPosition++ << char_t;
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes an int8_t.
-                 * @param int8 The value of the int8_t that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const int8_t int8)
-                    {
-                        return serialize(static_cast<char>(int8));
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned short.
-                 * @param ushort_t The value of the unsigned short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const uint16_t ushort_t)
-                    {
-                        return serialize(static_cast<int16_t>(ushort_t));
-                    }
-
-                /*!
-                 * @brief This function serializes a short.
-                 * @param short_t The value of the short that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const int16_t short_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(short_t)) || resize(sizeof(short_t)))
-                        {
-                            m_currentPosition << short_t;
-                            m_currentPosition += sizeof(short_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned long.
-                 * @param ulong_t The value of the unsigned long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const uint32_t ulong_t)
-                    {
-                        return serialize(static_cast<int32_t>(ulong_t));
-                    }
-
-                /*!
-                 * @brief This function serializes a long.
-                 * @param long_t The value of the long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const int32_t long_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(long_t)) || resize(sizeof(long_t)))
-                        {
-                            m_currentPosition << long_t;
-                            m_currentPosition += sizeof(long_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes a wide-char.
-                 * @param wchar The value of the wide-char that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const wchar_t wchar)
-                    {
-                        return serialize(static_cast<uint32_t>(wchar));
-                    }
-
-                /*!
-                 * @brief This function serializes an unsigned long long.
-                 * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const uint64_t ulonglong_t)
-                    {
-                        return serialize(static_cast<int64_t>(ulonglong_t));
-                    }
-
-                /*!
-                 * @brief This function serializes a long long.
-                 * @param longlong_t The value of the long long that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const int64_t longlong_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(longlong_t)) || resize(sizeof(longlong_t)))
-                        {
-                            m_currentPosition << longlong_t;
-                            m_currentPosition += sizeof(longlong_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes a float.
-                 * @param float_t The value of the float that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const float float_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(float_t)) || resize(sizeof(float_t)))
-                        {
-                            m_currentPosition << float_t;
-                            m_currentPosition += sizeof(float_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes a double.
-                 * @param double_t The value of the double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const double double_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(double_t)) || resize(sizeof(double_t)))
-                        {
-                            m_currentPosition << double_t;
-                            m_currentPosition += sizeof(double_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes a long double.
-                 * @param ldouble_t The value of the long double that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const long double ldouble_t)
-                    {
-                        if(((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t)) || resize(sizeof(ldouble_t)))
-                        {
-                            m_currentPosition << ldouble_t;
-#if defined(_WIN32)
-                            m_currentPosition += sizeof(ldouble_t);
-                            m_currentPosition << static_cast<long double>(0);
-#endif
-                            m_currentPosition += sizeof(ldouble_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function serializes a boolean.
-                 * @param bool_t The value of the boolean that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serialize(const bool bool_t);
-
-                /*!
-                 * @brief This function serializes a string.
-                 * @param string_t The pointer to the string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serialize(const char *string_t);
-
-                /*!
-                 * @brief This function serializes a wstring.
-                 * @param string_t The pointer to the wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serialize(const wchar_t *string_t);
-
-                /*!
-                 * @brief This function serializes a std::string.
-                 * @param string_t The string that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const std::string &string_t) {return serialize(string_t.c_str());}
-
-                /*!
-                 * @brief This function serializes a std::wstring.
-                 * @param string_t The wstring that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serialize(const std::wstring &string_t) {return serialize(string_t.c_str());}
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template serializes an array.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline FastCdr& serialize(const std::array<_T, _Size> &array_t)
-                    { return serializeArray(array_t.data(), array_t.size());}
-#endif
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template serializes a sequence of booleans.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T = bool>
-                    FastCdr& serialize(const std::vector<bool> &vector_t)
-                    {
-                        return serializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template serializes a sequence.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& serialize(const std::vector<_T> &vector_t)
-                    {
-                        state state_before_error(*this);
-
-                        *this << static_cast<int32_t>(vector_t.size());
-
-                        try
-                        {
-                            return serializeArray(vector_t.data(), vector_t.size());
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template serializes a sequence of booleans.
-                 * @param vector_t The sequence that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<>
-                    FastCdr& serialize<bool>(const std::vector<bool> &vector_t)
-                    {
-                        return serializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template serializes a non-basic type.
-                 * @param type_t The object that will be serialized in the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& serialize(const _T &type_t)
-                    {
-                        type_t.serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of octets.
-                 * @param octet_t The sequence of octets that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const uint8_t *octet_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(octet_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of characters.
-                 * @param char_t The array of characters that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const char *char_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of int8_t.
-                 * @param int8 The sequence of int8_t that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const int8_t *int8, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const char*>(int8), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of unsigned shorts.
-                 * @param ushort_t The array of unsigned shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const uint16_t *ushort_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int16_t*>(ushort_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of shorts.
-                 * @param short_t The array of shorts that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const int16_t *short_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of unsigned longs.
-                 * @param ulong_t The array of unsigned longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const uint32_t *ulong_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int32_t*>(ulong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of longs.
-                 * @param long_t The array of longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const int32_t *long_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of wide-chars.
-                 * @param wchar The array of wide-chars that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const wchar_t *wchar, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of unsigned long longs.
-                 * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements)
-                    {
-                        return serializeArray(reinterpret_cast<const int64_t*>(ulonglong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function serializes an array of long longs.
-                 * @param longlong_t The array of  long longs that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const int64_t *longlong_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of floats.
-                 * @param float_t The array of floats that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const float *float_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of doubles.
-                 * @param double_t The array of doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const double *double_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of long doubles.
-                 * @param ldouble_t The array of long doubles that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const long double *ldouble_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of booleans.
-                 * @param bool_t The array of booleans that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& serializeArray(const bool *bool_t, size_t numElements);
-
-                /*!
-                 * @brief This function serializes an array of strings.
-                 * @param string_t The array of strings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const std::string *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(string_t[count].c_str());
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function serializes an array of wstrings.
-                 * @param string_t The array of wstrings that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& serializeArray(const std::wstring *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(string_t[count].c_str());
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes an array of sequences.
-                 * @param vector_t The array of sequences that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& serializeArray(const std::vector<_T> *vector_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            serialize(vector_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes an array of non-basic type objects.
-                 * @param string_t The array of objects that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& serializeArray(const _T *type_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            type_t[count].serialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template serializes a raw sequence.
-                 * @param sequence_t Pointer to the sequence that will be serialized in the buffer.
-                 * @param numElements The number of elements contained in the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& serializeSequence(const _T *sequence_t, size_t numElements)
-                    {
-                        state state_before_error(*this);
-
-                        serialize(static_cast<int32_t>(numElements));
-
-                        try
-                        {
-                            return serializeArray(sequence_t, numElements);
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an octet.
-                 * @param octet_t The variable that will store the octet read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(uint8_t &octet_t)
-                    {
-                        return deserialize(reinterpret_cast<char&>(octet_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes a character.
-                 * @param char_t The variable that will store the character read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(char &char_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(char_t))
-                        {
-                            m_currentPosition++ >> char_t;
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes an int8_t.
-                 * @param int8 The variable that will store the int8_t read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(int8_t &int8)
-                    {
-                        return deserialize(reinterpret_cast<char&>(int8));
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned short.
-                 * @param ushort_t The variable that will store the unsigned short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(uint16_t &ushort_t)
-                    {
-                        return deserialize(reinterpret_cast<int16_t&>(ushort_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes a short.
-                 * @param short_t The variable that will store the short read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(int16_t &short_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(short_t))
-                        {
-                            m_currentPosition >> short_t;
-                            m_currentPosition += sizeof(short_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned long.
-                 * @param ulong_t The variable that will store the unsigned long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(uint32_t &ulong_t)
-                    {
-                        return deserialize(reinterpret_cast<int32_t&>(ulong_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes a long.
-                 * @param long_t The variable that will store the long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(int32_t &long_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(long_t))
-                        {
-                            m_currentPosition >> long_t;
-                            m_currentPosition += sizeof(long_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes a wide-char.
-                 * @param wchar The variable that will store the wide-char read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(wchar_t &wchar)
-                    {
-                        uint32_t ret;
-                        deserialize(ret);
-                        wchar = static_cast<wchar_t>(ret);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an unsigned long long.
-                 * @param ulonglong_t The variable that will store the unsigned long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(uint64_t &ulonglong_t)
-                    {
-                        return deserialize(reinterpret_cast<int64_t&>(ulonglong_t));
-                    }
-
-                /*!
-                 * @brief This function deserializes a long long.
-                 * @param longlong_t The variable that will store the long long read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(int64_t &longlong_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(longlong_t))
-                        {
-                            m_currentPosition >> longlong_t;
-                            m_currentPosition += sizeof(longlong_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes a float.
-                 * @param float_t The variable that will store the float read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(float &float_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(float_t))
-                        {
-                            m_currentPosition >> float_t;
-                            m_currentPosition += sizeof(float_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes a double.
-                 * @param double_t The variable that will store the double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(double &double_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(double_t))
-                        {
-                            m_currentPosition >> double_t;
-                            m_currentPosition += sizeof(double_t);
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes a long double.
-                 * @param ldouble_t The variable that will store the long double read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(long double &ldouble_t)
-                    {
-                        if((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t))
-                        {
-                            m_currentPosition >> ldouble_t;
-                            m_currentPosition += sizeof(ldouble_t);
-#if defined(_WIN32)
-                            m_currentPosition += sizeof(ldouble_t);
-#endif
-
-                            return *this;
-                        }
-
-                        throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT);
-                    }
-
-                /*!
-                 * @brief This function deserializes a boolean.
-                 * @param bool_t The variable that will store the boolean read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value.
-                 */
-                FastCdr& deserialize(bool &bool_t);
-
-                /*!
-                 * @brief This function deserializes a string.
-                 * This function allocates memory to store the string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserialize(char *&string_t);
-
-                /*!
-                 * @brief This function deserializes a wide string.
-                 * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param string_t The pointer that will point to the wide string read from the buffer.
-                 * The user will have to free the allocated memory using free()
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserialize(wchar_t *&string_t);
-
-                /*!
-                 * @brief This function deserializes a std::string.
-                 * @param string_t The variable that will store the string read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(std::string &string_t)
-                    {
-                        uint32_t length = 0;
-                        const char *str = readString(length);
-                        string_t = std::string(str, length);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes a std::wstring.
-                 * @param string_t The variable that will store the wstring read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserialize(std::wstring &string_t)
-                    {
-                        uint32_t length = 0;
-                        string_t = readWString(length);
-                        return *this;
-                    }
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes an array.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    inline FastCdr& deserialize(std::array<_T, _Size> &array_t)
-                    { return deserializeArray(array_t.data(), array_t.size());}
-#endif
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes a sequence of booleans.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T = bool>
-                    FastCdr& deserialize(std::vector<bool> &vector_t)
-                    {
-                        return deserializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a sequence.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& deserialize(std::vector<_T> &vector_t)
-                    {
-                        uint32_t seqLength = 0;
-                        state state_before_error(*this);
-
-                        *this >> seqLength;
-
-                        try
-                        {
-                            vector_t.resize(seqLength);
-                            return deserializeArray(vector_t.data(), vector_t.size());
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template deserializes a sequence of booleans.
-                 * @param vector_t The variable that will store the sequence read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<>
-                    FastCdr& deserialize<bool>(std::vector<bool> &vector_t)
-                    {
-                        return deserializeBoolSequence(vector_t);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a non-basic type object.
-                 * @param type_t The variable that will store the object read from the buffer.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    inline FastCdr& deserialize(_T &type_t)
-                    {
-                        type_t.deserialize(*this);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of octets.
-                 * @param octet_t The variable that will store the array of octets read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(uint8_t *octet_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(octet_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of characters.
-                 * @param char_t The variable that will store the array of characters read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(char *char_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of int8_t.
-                 * @param int8 The variable that will store the array of int8_t read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(int8_t *int8, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<char*>(int8), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of unsigned shorts.
-                 * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(uint16_t *ushort_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int16_t*>(ushort_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of shorts.
-                 * @param short_t The variable that will store the array of shorts read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(int16_t *short_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of unsigned longs.
-                 * @param ulong_t The variable that will store the array of unsigned longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(uint32_t *ulong_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int32_t*>(ulong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of longs.
-                 * @param long_t The variable that will store the array of longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(int32_t *long_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of wide-chars.
-                 * @param wchar The variable that will store the array of wide-chars read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(wchar_t *wchar, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of unsigned long longs.
-                 * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements)
-                    {
-                        return deserializeArray(reinterpret_cast<int64_t*>(ulonglong_t), numElements);
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of long longs.
-                 * @param longlong_t The variable that will store the array of long longs read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(int64_t *longlong_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of floats.
-                 * @param float_t The variable that will store the array of floats read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(float *float_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of doubles.
-                 * @param double_t The variable that will store the array of doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(double *double_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of long doubles.
-                 * @param ldouble_t The variable that will store the array of long doubles read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(long double *ldouble_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of booleans.
-                 * @param bool_t The variable that will store the array of booleans read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                FastCdr& deserializeArray(bool *bool_t, size_t numElements);
-
-                /*!
-                 * @brief This function deserializes an array of strings.
-                 * @param string_t The variable that will store the array of strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(std::string *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(string_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function deserializes an array of wide-strings.
-                 * @param string_t The variable that will store the array of strings read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                inline
-                    FastCdr& deserializeArray(std::wstring *string_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(string_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes an array of sequences.
-                 * @param vector_t The variable that will store the array of sequences read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& deserializeArray(std::vector<_T> *vector_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            deserialize(vector_t[count]);
-                        return *this;
-                    }
-
-                /*!
-                 * @brief This function template deserializes an array of non-basic type objects.
-                 * @param type_t The variable that will store the array of objects read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& deserializeArray(_T *type_t, size_t numElements)
-                    {
-                        for(size_t count = 0; count < numElements; ++count)
-                            type_t[count].deserialize(*this);
-                        return *this;
-                    }
-
-#if !defined(_MSC_VER) && HAVE_CXX0X
-                /*!
-                 * @brief This function template deserializes a string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T = std::string>
-                    FastCdr& deserializeSequence(std::string *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeStringSequence(sequence_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function template deserializes a wide-string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T = std::wstring>
-                    FastCdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeWStringSequence(sequence_t, numElements);
-                    }
-#endif
-
-                /*!
-                 * @brief This function template deserializes a raw sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T>
-                    FastCdr& deserializeSequence(_T *&sequence_t, size_t &numElements)
-                    {
-                        uint32_t seqLength = 0;
-                        state state_before_error(*this);
-
-                        deserialize(seqLength);
-
-                        try
-                        {
-                            sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T)));
-                            deserializeArray(sequence_t, seqLength);
-                        }
-                        catch(eprosima::fastcdr::exception::Exception &ex)
-                        {
-                            free(sequence_t);
-                            sequence_t = NULL;
-                            setState(state_before_error);
-                            ex.raise();
-                        }
-
-                        numElements = seqLength;
-                        return *this;
-                    }
-
-#ifdef _MSC_VER
-                /*!
-                 * @brief This function template deserializes a string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<>
-                    FastCdr& deserializeSequence<std::string>(std::string *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeStringSequence(sequence_t, numElements);
-                    }
-
-                /*!
-                 * @brief This function template deserializes a wide-string sequence.
-                 * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory.
-                 * The user will have to free this allocated memory using free()
-                 * @param sequence_t The pointer that will store the sequence read from the buffer.
-                 * @param numElements This variable return the number of elements of the sequence.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<>
-                    FastCdr& deserializeSequence<std::wstring>(std::wstring *&sequence_t, size_t &numElements)
-                    {
-                        return deserializeWStringSequence(sequence_t, numElements);
-                    }
-#endif
-
-            private:
-
-                FastCdr(const FastCdr&) = delete;
-
-                FastCdr& operator=(const FastCdr&) = delete;
-
-                FastCdr& serializeBoolSequence(const std::vector<bool> &vector_t);
-
-                FastCdr& deserializeBoolSequence(std::vector<bool> &vector_t);
-
-                FastCdr& deserializeStringSequence(std::string *&sequence_t, size_t &numElements);
-
-                FastCdr& deserializeWStringSequence(std::wstring *&sequence_t, size_t &numElements);
-
-#if HAVE_CXX0X
-                /*!
-                 * @brief This function template detects the content type of the STD container array and serializes the array.
-                 * @param array_t The array that will be serialized in the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    FastCdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements)
-                    {
-                        return serializeArray(array_t->data(), numElements * array_t->size());
-                    }
-
-                /*!
-                 * @brief This function template detects the content type of the STD container array and deserializes the array.
-                 * @param array_t The variable that will store the array read from the buffer.
-                 * @param numElements Number of the elements in the array.
-                 * @return Reference to the eprosima::fastcdr::FastCdr object.
-                 * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
-                 */
-                template<class _T, size_t _Size>
-                    FastCdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements)
-                    {
-                        return deserializeArray(array_t->data(), numElements * array_t->size());
-                    }
-#endif
-
-                bool resize(size_t minSizeInc);
-
-                const char* readString(uint32_t &length);
-
-                std::wstring readWString(uint32_t &length);
-
-                //! @brief Reference to the buffer that will be serialized/deserialized.
-                FastBuffer &m_cdrBuffer;
-
-                //! @brief The current position in the serialization/deserialization process.
-                FastBuffer::iterator m_currentPosition;
-
-                //! @brief The last position in the buffer;
-                FastBuffer::iterator m_lastPosition;
-        };
-    } //namespace fastcdr
-} //namespace eprosima
-
-#endif //_FASTCDR_FASTCDR_H_

+ 0 - 53
thirdpartylib/FastRTPS/include/fastcdr/config.h

@@ -1,53 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_CONFIG_H_
-#define _FASTCDR_CONFIG_H_
-
-#define FASTCDR_VERSION_MAJOR 1
-#define FASTCDR_VERSION_MINOR 0
-#define FASTCDR_VERSION_MICRO 14
-#define FASTCDR_VERSION_STR "1.0.14"
-
-// C++11 support defines
-#ifndef HAVE_CXX11
-#define HAVE_CXX11 1
-#endif
-
-// C++0x support defines
-#ifndef HAVE_CXX0X
-#define HAVE_CXX0X 1
-#endif
-
-// C++ constexpr support
-#ifndef HAVE_CXX_CONSTEXPR
-#define HAVE_CXX_CONSTEXPR 1
-#endif
-
-#if HAVE_CXX_CONSTEXPR
-#define CONSTEXPR constexpr
-#else
-#define CONSTEXPR const
-#endif
-
-// Endianness defines
-#ifndef __BIG_ENDIAN__
-#define __BIG_ENDIAN__ 0
-#endif
-
-#if defined(__ARM_ARCH) && __ARM_ARCH <= 7
-#define FASTCDR_ARM32
-#endif
-
-#endif // _FASTCDR_CONFIG_H_

+ 0 - 53
thirdpartylib/FastRTPS/include/fastcdr/config.h.in

@@ -1,53 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_CONFIG_H_
-#define _FASTCDR_CONFIG_H_
-
-#define FASTCDR_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
-#define FASTCDR_VERSION_MINOR @PROJECT_VERSION_MINOR@
-#define FASTCDR_VERSION_MICRO @PROJECT_VERSION_PATCH@
-#define FASTCDR_VERSION_STR "@PROJECT_VERSION@"
-
-// C++11 support defines
-#ifndef HAVE_CXX11
-#define HAVE_CXX11 @HAVE_CXX11@
-#endif
-
-// C++0x support defines
-#ifndef HAVE_CXX0X
-#define HAVE_CXX0X @HAVE_CXX0X@
-#endif
-
-// C++ constexpr support
-#ifndef HAVE_CXX_CONSTEXPR
-#define HAVE_CXX_CONSTEXPR @HAVE_CXX_CONSTEXPR@
-#endif
-
-#if HAVE_CXX_CONSTEXPR
-#define CONSTEXPR constexpr
-#else
-#define CONSTEXPR const
-#endif
-
-// Endianness defines
-#ifndef __BIG_ENDIAN__
-#define __BIG_ENDIAN__ @__BIG_ENDIAN__@
-#endif
-
-#if defined(__ARM_ARCH) && __ARM_ARCH <= 7
-#define FASTCDR_ARM32
-#endif
-
-#endif // _FASTCDR_CONFIG_H_

+ 0 - 66
thirdpartylib/FastRTPS/include/fastcdr/eProsima_auto_link.h

@@ -1,66 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/*
- Expected defines.
-
- - EPROSIMA_LIB_NAME
- - FASTCDR_VERSION_MAJOR
- - FASTCDR_VERSION_MINOR
-*/
-
-#if defined(_MSC_VER)
-    #define EPROSIMA_STRINGIZE(X) EPROSIMA_DO_STRINGIZE(X)
-    #define EPROSIMA_DO_STRINGIZE(X) #X
-
-    #if defined(_DEBUG)
-        #define EPROSIMA_LIB_DEBUG_TAG "d"
-    #else
-        #define EPROSIMA_LIB_DEBUG_TAG
-    #endif // _DEBUG
-
-    // Select linkage option.
-    #if (defined(_DLL) || defined(_RTLDLL)) && defined(EPROSIMA_DYN_LINK)
-        #define EPROSIMA_LIB_PREFIX
-    #elif defined(EPROSIMA_DYN_LINK)
-        #error "Mixing a dll eprosima library with a static runtime is a bad idea"
-    #else
-        #define EPROSIMA_LIB_PREFIX "lib"
-    #endif
-
-    // Include library
-    #if defined(EPROSIMA_LIB_NAME) \
-	&& defined(EPROSIMA_LIB_PREFIX) \
-	&& defined(EPROSIMA_LIB_DEBUG_TAG) \
-	&& defined(FASTCDR_VERSION_MAJOR) \
-	&& defined(FASTCDR_VERSION_MINOR)
-        #pragma comment(lib, EPROSIMA_LIB_PREFIX EPROSIMA_STRINGIZE(EPROSIMA_LIB_NAME) EPROSIMA_LIB_DEBUG_TAG "-" EPROSIMA_STRINGIZE(FASTCDR_VERSION_MAJOR) "." EPROSIMA_STRINGIZE(FASTCDR_VERSION_MINOR) ".lib")
-    #else
-    #error "Some required macros where not defined"
-    #endif
-
-#endif // _MSC_VER
-    
-// Undef macros
-#ifdef EPROSIMA_LIB_PREFIX
-#undef EPROSIMA_LIB_PREFIX
-#endif
-
-#ifdef EPROSIMA_LIB_NAME
-#undef EPROSIMA_LIB_NAME
-#endif
-
-#ifdef EPROSIMA_LIB_DEBUG_TAG
-#undef EPROSIMA_LIB_DEBUG_TAG
-#endif

+ 0 - 85
thirdpartylib/FastRTPS/include/fastcdr/exceptions/BadParamException.h

@@ -1,85 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_EXCEPTIONS_BADPARAMEXCEPTION_H_
-#define _FASTCDR_EXCEPTIONS_BADPARAMEXCEPTION_H_
-
-#include "Exception.h"
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        namespace exception
-        {
-            /*!
-             * @brief This class is thrown as an exception when a invalid parameter was being serialized.
-             * @ingroup EXCEPTIONMODULE
-             */
-            class BadParamException : public Exception
-            {
-                public:
-
-                    /*!
-                     * @brief Default constructor.
-                     *
-                     * @param message A error message. This message pointer is copied.
-                     */
-                    Cdr_DllAPI BadParamException(const char* const &message) noexcept;
-
-                    /*!
-                     * @brief Default copy constructor.
-                     *
-                     * @param ex BadParamException that will be copied.
-                     */
-                    Cdr_DllAPI BadParamException(const BadParamException &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Default move constructor.
-                     *
-                     * @param ex BadParamException that will be moved.
-                     */
-                    Cdr_DllAPI BadParamException(BadParamException&& ex) noexcept;
-#endif
-
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex BadParamException that will be copied.
-                     */
-                    Cdr_DllAPI BadParamException& operator=(const BadParamException &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex BadParamException that will be moved.
-                     */
-                    BadParamException& operator=(BadParamException&& ex) noexcept;
-#endif
-
-                    //! @brief Default constructor
-                    virtual Cdr_DllAPI ~BadParamException() noexcept;
-
-                    //! @brief This function throws the object as exception.
-                    virtual Cdr_DllAPI void raise() const;
-
-                    //! @brief Default message used in the library.
-                    static Cdr_DllAPI const char* const BAD_PARAM_MESSAGE_DEFAULT;
-            };
-        } //namespace exception
-    } //namespace fastcdr
-} //namespace eprosima
-#endif // _FASTCDR_EXCEPTIONS_BADPARAMEXCEPTION_H_

+ 0 - 98
thirdpartylib/FastRTPS/include/fastcdr/exceptions/Exception.h

@@ -1,98 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_EXCEPTIONS_EXCEPTION_H_
-#define _FASTCDR_EXCEPTIONS_EXCEPTION_H_
-
-#include "../fastcdr_dll.h"
-#include <string>
-#include <exception>
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        namespace exception
-        {
-            /*!
-             * @brief This abstract class is used to create exceptions.
-             * @ingroup EXCEPTIONMODULE
-             */
-            class Exception : public std::exception
-            {
-                public:
-
-                    //! \brief Default destructor.
-                    virtual Cdr_DllAPI ~Exception() noexcept;
-
-                    //! \brief This function throws the object as exception.
-                    virtual Cdr_DllAPI void raise() const = 0;
-
-                    /*!
-                     * @brief This function returns the error message.
-                     *
-                     * @return The error message.
-                     */
-                    virtual Cdr_DllAPI const char* what() const noexcept ;
-
-                protected:
-
-                    /*!
-                     * @brief Default constructor.
-                     *
-                     * @param message A error message. This message pointer is copied.
-                     */
-                    Cdr_DllAPI Exception(const char* const &message) noexcept;
-
-                    /*!
-                     * @brief Default copy constructor.
-                     *
-                     * @param ex Exception that will be copied.
-                     */
-                    Cdr_DllAPI Exception(const Exception &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Default move constructor.
-                     *
-                     * @param ex Exception that will be moved.
-                     */
-                    Cdr_DllAPI Exception(Exception&& ex) noexcept;
-#endif
-
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex Exception that will be copied.
-                     */
-                    Cdr_DllAPI Exception& operator=(const Exception &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex Exception that will be moved.
-                     */
-                    Cdr_DllAPI Exception& operator=(Exception&&) noexcept;
-#endif
-
-                private:
-
-                    const char* m_message;
-            };
-        } //namespace exception
-    } //namespace fastcdr
-} //namespace eprosima
-
-#endif // _FASTCDR_EXCEPTIONS_EXCEPTION_H_

+ 0 - 85
thirdpartylib/FastRTPS/include/fastcdr/exceptions/NotEnoughMemoryException.h

@@ -1,85 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_EXCEPTIONS_NOTENOUGHMEMORYEXCEPTION_H_
-#define _FASTCDR_EXCEPTIONS_NOTENOUGHMEMORYEXCEPTION_H_
-
-#include "Exception.h"
-
-namespace eprosima
-{
-    namespace fastcdr
-    {
-        namespace exception
-        {
-            /*!
-             * @brief This class is thrown as an exception when the buffer's internal memory reachs its size limit.
-             * @ingroup EXCEPTIONMODULE
-             */
-            class NotEnoughMemoryException : public Exception
-            {
-                public:
-
-                    /*!
-                     * @brief Default constructor.
-                     *
-                     * @param message A error message. This message pointer is copied.
-                     */
-                    Cdr_DllAPI NotEnoughMemoryException(const char* const &message) noexcept;
-
-                    /*!
-                     * @brief Default copy constructor.
-                     *
-                     * @param ex NotEnoughMemoryException that will be copied.
-                     */
-                    Cdr_DllAPI NotEnoughMemoryException(const NotEnoughMemoryException &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Default move constructor.
-                     *
-                     * @param ex NotEnoughMemoryException that will be moved.
-                     */
-                    Cdr_DllAPI NotEnoughMemoryException(NotEnoughMemoryException&& ex) noexcept;
-#endif
-
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex NotEnoughMemoryException that will be copied.
-                     */
-                    Cdr_DllAPI NotEnoughMemoryException& operator=(const NotEnoughMemoryException &ex) noexcept;
-
-#if HAVE_CXX0X
-                    /*!
-                     * @brief Assigment operation.
-                     *
-                     * @param ex NotEnoughMemoryException that will be moved.
-                     */
-                    Cdr_DllAPI NotEnoughMemoryException& operator=(NotEnoughMemoryException&& ex) noexcept;
-#endif
-
-                    //! @brief Default constructor
-                    virtual Cdr_DllAPI ~NotEnoughMemoryException() noexcept;
-
-                    //! @brief This function throws the object as exception.
-                    virtual Cdr_DllAPI void raise() const;
-
-                    //! @brief Default message used in the library.
-                    static Cdr_DllAPI const char* const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT;
-            };
-        } //namespace exception
-    } //namespace fastcdr
-} //namespace eprosima
-#endif // _FASTCDR_EXCEPTIONS_NOTENOUGHMEMORYEXCEPTION_H_

+ 0 - 69
thirdpartylib/FastRTPS/include/fastcdr/fastcdr_dll.h

@@ -1,69 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTCDR_FASTCDR_DLL_H_
-#define _FASTCDR_FASTCDR_DLL_H_
-
-#include <fastcdr/config.h>
-
-// normalize macros
-#if !defined(FASTCDR_DYN_LINK) && !defined(FASTCDR_STATIC_LINK) \
-    && !defined(EPROSIMA_ALL_DYN_LINK) && !defined(EPROSIMA_ALL_STATIC_LINK)
-#define FASTCDR_STATIC_LINK
-#endif
-
-#if defined(EPROSIMA_ALL_DYN_LINK) && !defined(FASTCDR_DYN_LINK)
-#define FASTCDR_DYN_LINK
-#endif
-
-#if defined(FASTCDR_DYN_LINK) && defined(FASTCDR_STATIC_LINK)
-#error Must not define both FASTCDR_DYN_LINK and FASTCDR_STATIC_LINK
-#endif
-
-#if defined(EPROSIMA_ALL_NO_LIB) && !defined(FASTCDR_NO_LIB)
-#define FASTCDR_NO_LIB
-#endif
-
-// enable dynamic linking
-
-#if defined(_WIN32)
-#if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
-#if defined(fastcdr_EXPORTS)
-#define Cdr_DllAPI __declspec( dllexport )
-#else
-#define Cdr_DllAPI __declspec( dllimport )
-#endif // FASTCDR_SOURCE
-#else
-#define Cdr_DllAPI
-#endif
-#else
-#define Cdr_DllAPI
-#endif // _WIN32
-
-// Auto linking.
-
-#if !defined(FASTCDR_SOURCE) && !defined(EPROSIMA_ALL_NO_LIB) \
-    && !defined(FASTCDR_NO_LIB)
-
-// Set properties.
-#define EPROSIMA_LIB_NAME fastcdr
-
-#if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
-#define EPROSIMA_DYN_LINK
-#endif
-
-#include "eProsima_auto_link.h"
-#endif // auto-linking disabled
-
-#endif // _FASTCDR_FASTCDR_DLL_H_

+ 0 - 63
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/ReplyHeader.hpp

@@ -1,63 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file RequestHeader.hpp
- *
- */
-
-#ifndef REPLYHEADER_HPP
-#define REPLYHEADER_HPP
-
-#include <fastrtps/rtps/common/SampleIdentity.h>
-#include <fastdds/dds/builtin/common/Types.hpp>
-
-namespace eprosima {
-
-namespace fastcdr {
-class Cdr;
-} // fastcdr
-
-namespace fastdds {
-namespace dds {
-namespace rpc {
-
-struct ReplyHeader
-{
-    fastrtps::rtps::SampleIdentity relatedRequestId;
-
-    RemoteExceptionCode_t remoteEx;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(
-            const ReplyHeader& data,
-            size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(
-            eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(
-            eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined()
-    {
-        return false;
-    }
-};
-
-} // namespace rpc
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // REPLYHEADER_HPP

+ 0 - 63
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/RequestHeader.hpp

@@ -1,63 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file RequestHeader.hpp
- *
- */
-
-#ifndef REQUESTHEADER_HPP
-#define REQUESTHEADER_HPP
-
-#include <fastrtps/rtps/common/SampleIdentity.h>
-#include <fastdds/dds/builtin/common/Types.hpp>
-
-namespace eprosima {
-
-namespace fastcdr {
-class Cdr;
-} // fastcdr
-
-namespace fastdds {
-namespace dds {
-namespace rpc {
-
-struct RequestHeader
-{
-    eprosima::fastrtps::rtps::SampleIdentity requestId;
-
-    InstanceName instanceName;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(
-            const RequestHeader& data,
-            size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(
-            eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(
-            eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined()
-    {
-        return false;
-    }
-};
-
-} // namespace rpc
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // REQUESTHEADER_HPP

+ 0 - 46
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/common/Types.hpp

@@ -1,46 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Types.hpp
- *
- */
-
-#ifndef TYPES_HPP
-#define TYPES_HPP
-
-#include <fastrtps/utils/fixed_size_string.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-namespace rpc {
-
-using InstanceName = fastrtps::string_255;
-
-enum RemoteExceptionCode_t {
-    REMOTE_EX_OK,
-    REMOTE_EX_UNSUPPORTED,
-    REMOTE_EX_INVALID_ARGUMENT,
-    REMOTE_EX_OUT_OF_RESOURCES,
-    REMOTE_EX_UNKNOWN_OPERATION,
-    REMOTE_EX_UNKNOWN_EXCEPTION
-};
-
-} // namespace rpc
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // TYPES_HPP

+ 0 - 292
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp

@@ -1,292 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TypeLookupManager.hpp
- *
- */
-
-#ifndef _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP
-#define _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP
-#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
-#include <vector>
-
-#include <fastdds/dds/builtin/typelookup/TypeLookupRequestListener.hpp>
-#include <fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp>
-#include <fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp>
-
-#include <fastdds/rtps/builtin/data/WriterProxyData.h>
-#include <fastdds/rtps/builtin/data/ReaderProxyData.h>
-
-namespace eprosima {
-namespace fastrtps{
-
-namespace rtps {
-
-class BuiltinProtocols;
-class ReaderHistory;
-class RTPSParticipantImpl;
-class StatefulReader;
-class StatefulWriter;
-class ParticipantProxyData;
-class WriterHistory;
-
-} // namespace rtps
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-namespace builtin {
-
-extern const fastrtps::rtps::SampleIdentity INVALID_SAMPLE_IDENTITY;
-
-/**
- * Class TypeLookupManager that implements the TypeLookup Service described in the DDS-XTYPES 1.2 specification.
- * @ingroup XTYPES
- */
-class TypeLookupManager
-{
-    friend class TypeLookupRequestListener;
-    friend class TypeLookupReplyListener;
-
-public:
-    /**
-    * Constructor
-    * @param prot Pointer to the BuiltinProtocols object.
-    */
-    TypeLookupManager(
-            fastrtps::rtps::BuiltinProtocols* prot);
-
-    virtual ~TypeLookupManager();
-
-    /**
-     * Initialize the TypeLookupManager protocol.
-     * @param p Pointer to the RTPS participant implementation.
-     * @return true if the initialziacion was succesful.
-     */
-    bool init_typelookup_service(
-            fastrtps::rtps::RTPSParticipantImpl* p);
-
-    /**
-     * Assign the remote endpoints for a newly discovered RTPSParticipant.
-     * @param pdata Pointer to the RTPSParticipantProxyData object.
-     * @return True if correct.
-     */
-    bool assign_remote_endpoints(
-            const fastrtps::rtps::ParticipantProxyData& pdata);
-
-    /**
-     * Remove remote endpoints from the typelookup service.
-     * @param pdata Pointer to the ParticipantProxyData to remove
-     */
-    void remove_remote_endpoints(
-            fastrtps::rtps::ParticipantProxyData* pdata);
-
-    /**
-     * Get the builtin protocols
-     * @return Builtin protocols
-     */
-    fastrtps::rtps::BuiltinProtocols* get_builtin_protocols()
-    {
-        return builtin_protocols_;
-    }
-
-    /**
-     * Get the builtin request writer
-     * @return stateful writer
-     */
-    fastrtps::rtps::StatefulWriter* get_builtin_request_writer();
-
-    /**
-     * Get the builtin reply writer
-     * @return stateful writer
-     */
-    fastrtps::rtps::StatefulWriter* get_builtin_reply_writer();
-
-    /**
-    * Get the builtin request writer's history
-    * @return writer history
-    */
-    fastrtps::rtps::WriterHistory* get_builtin_request_writer_history();
-
-    /**
-    * Get the builtin reply writer's history
-    * @return writer history
-    */
-    fastrtps::rtps::WriterHistory* get_builtin_reply_writer_history();
-
-    /**
-     * Get the builtin request reader
-     * @return stateful reader
-     */
-    fastrtps::rtps::StatefulReader* get_builtin_request_reader();
-
-    /**
-     * Get the builtin reply reader
-     * @return stateful reader
-     */
-    fastrtps::rtps::StatefulReader* get_builtin_reply_reader();
-
-    /**
-    * Get the builtin request reader's history
-    * @return reader history
-    */
-    fastrtps::rtps::ReaderHistory* get_builtin_request_reader_history();
-
-    /**
-    * Get the builtin reply reader's history
-    * @return reader history
-    */
-    fastrtps::rtps::ReaderHistory* get_builtin_reply_reader_history();
-
-/* TODO Uncomment if security is implemented.
-#if HAVE_SECURITY
-    bool pairing_remote_reader_with_local_writer_after_security(
-            const fastrtps::rtps::GUID_t& local_writer,
-            const fastrtps::rtps::ReaderProxyData& remote_reader_data);
-
-    bool pairing_remote_writer_with_local_reader_after_security(
-            const fastrtps::rtps::GUID_t& local_reader,
-            const fastrtps::rtps::WriterProxyData& remote_writer_data);
-#endif
-*/
-
-    fastrtps::rtps::SampleIdentity get_type_dependencies(
-            const fastrtps::types::TypeIdentifierSeq& in) const;
-
-    fastrtps::rtps::SampleIdentity get_types(
-            const fastrtps::types::TypeIdentifierSeq& in) const;
-
-private:
-    /**
-     * Create the endpoints used in the TypeLookupManager.
-     * @return true if correct.
-     */
-    bool create_endpoints();
-
-    /**
-     * Get the RTPS participant
-     * @return RTPS participant
-     */
-    inline fastrtps::rtps::RTPSParticipantImpl* get_RTPS_participant()
-    {
-        return participant_;
-    }
-
-    //! Get out instanceName as defined in 7.6.2.3.4 of the XTypes 1.2 document
-    std::string get_instanceName() const;
-
-    //! Aux method to send requests
-    bool send_request(
-            TypeLookup_Request& req) const;
-
-    //! Aux method to send replies
-    bool send_reply(
-            TypeLookup_Reply& rep) const;
-
-    //! Aux method to received requests
-    bool recv_request(
-            fastrtps::rtps::CacheChange_t& change,
-            TypeLookup_Request& req) const;
-
-    //! Aux method to received replies
-    bool recv_reply(
-            fastrtps::rtps::CacheChange_t& change,
-            TypeLookup_Reply& rep) const;
-
-    const fastrtps::rtps::GUID_t& get_builtin_request_writer_guid() const;
-
-    //!Pointer to the local RTPSParticipant.
-    fastrtps::rtps::RTPSParticipantImpl* participant_;
-
-    //!Pointer to the builtinprotocol class.
-    fastrtps::rtps::BuiltinProtocols* builtin_protocols_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageWriter.
-    fastrtps::rtps::StatefulWriter* builtin_request_writer_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageReader.
-    fastrtps::rtps::StatefulReader* builtin_request_reader_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageWriter.
-    fastrtps::rtps::StatefulWriter* builtin_reply_writer_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageReader.
-    fastrtps::rtps::StatefulReader* builtin_reply_reader_;
-
-    //!Writer History
-    fastrtps::rtps::WriterHistory* builtin_request_writer_history_;
-
-    //!Writer History
-    fastrtps::rtps::WriterHistory* builtin_reply_writer_history_;
-
-    //!Reader History
-    fastrtps::rtps::ReaderHistory* builtin_request_reader_history_;
-
-    //!Reader History
-    fastrtps::rtps::ReaderHistory* builtin_reply_reader_history_;
-
-    //!Request Listener object.
-    TypeLookupRequestListener* request_listener_;
-
-    //!Reply Listener object.
-    TypeLookupReplyListener* reply_listener_;
-
-    std::mutex temp_data_lock_;
-    fastrtps::rtps::ReaderProxyData temp_reader_proxy_data_;
-    fastrtps::rtps::WriterProxyData temp_writer_proxy_data_;
-
-    mutable fastrtps::rtps::SequenceNumber_t request_seq_number_;
-
-    mutable TypeLookup_RequestTypeSupport request_type_;
-
-    mutable TypeLookup_ReplyTypeSupport reply_type_;
-
-/* TODO Uncomment if security is implemented.
-#if HAVE_SECURITY
-    //!Pointer to the builtinRTPSParticipantMEssageWriter.
-    fastrtps::rtps::StatefulWriter* builtin_request_writer_secure_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageWriter.
-    fastrtps::rtps::StatefulWriter* builtin_reply_writer_secure_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageReader.
-    fastrtps::rtps::StatefulReader* builtin_request_reader_secure_;
-
-    //!Pointer to the builtinRTPSParticipantMEssageReader.
-    fastrtps::rtps::StatefulReader* builtin_reply_reader_secure_;
-
-    //!Writer History
-    fastrtps::rtps::WriterHistory* builtin_request_writer_secure_history_;
-
-    //!Writer History
-    fastrtps::rtps::WriterHistory* builtin_reply_writer_secure_history_;
-
-    //!Reader History
-    fastrtps::rtps::ReaderHistory* builtin_request_reader_secure_history_;
-
-    //!Reader History
-    fastrtps::rtps::ReaderHistory* builtin_reply_reader_secure_history_;
-
-    bool create_secure_endpoints();
-#endif
-*/
-};
-
-} /* namespace builtin */
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-#endif
-#endif /* _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP */

+ 0 - 89
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp

@@ -1,89 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TypeLookupReplyListener.hpp
- *
- */
-
-#ifndef TYPELOOKUP_REPLY_LISTENER_HPP_
-#define TYPELOOKUP_REPLY_LISTENER_HPP_
-#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
-#include <fastrtps/rtps/reader/ReaderListener.h>
-
-namespace eprosima {
-namespace fastrtps {
-
-namespace types {
-class TypeObjectFactory;
-} // namespace types
-
-namespace rtps {
-
-class RTPSReader;
-struct CacheChange_t;
-
-} // namespace rtps
-} // namespace fastrtp
-
-namespace fastdds {
-namespace dds {
-namespace builtin {
-
-class TypeLookupManager;
-
-/**
- * Class TypeLookupReplyListener that receives the typelookup request messages of remote endpoints.
- * @ingroup TYPES_MODULE
- */
-class TypeLookupReplyListener : public fastrtps::rtps::ReaderListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     * @param pwlp Pointer to the writer liveliness protocol
-     */
-    TypeLookupReplyListener(
-            TypeLookupManager* pwlp);
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~TypeLookupReplyListener() override;
-
-    /**
-     * @brief Method call when this class is notified of a new cache change
-     * @param reader The reader receiving the cache change
-     * @param change The cache change
-     */
-    void onNewCacheChangeAdded(
-            fastrtps::rtps::RTPSReader* reader,
-            const fastrtps::rtps::CacheChange_t* const  change) override;
-
-private:
-
-    //! A pointer to the typelookup manager
-    TypeLookupManager* tlm_;
-
-    //! A pointer to the TypeObject factory.
-    fastrtps::types::TypeObjectFactory* factory_;
-};
-
-} /* namespace builtin */
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-#endif
-#endif /* TYPELOOKUP_REPLY_LISTENER_HPP_*/

+ 0 - 90
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.hpp

@@ -1,90 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TypeLookupRequestListener.hpp
- *
- */
-
-#ifndef TYPELOOKUP_REQUEST_LISTENER_HPP_
-#define TYPELOOKUP_REQUEST_LISTENER_HPP_
-#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
-#include <fastrtps/rtps/reader/ReaderListener.h>
-
-namespace eprosima {
-namespace fastrtps {
-
-namespace types {
-class TypeObjectFactory;
-} // namespace types
-
-namespace rtps {
-
-class RTPSReader;
-struct CacheChange_t;
-
-} // namespace rtps
-} // namespace fastrtp
-
-namespace fastdds {
-namespace dds {
-namespace builtin {
-
-class TypeLookupManager;
-
-/**
- * Class TypeLookupRequestListener that receives the typelookup request messages of remote endpoints.
- * @ingroup TYPES_MODULE
- */
-class TypeLookupRequestListener : public fastrtps::rtps::ReaderListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     * @param pwlp Pointer to the writer liveliness protocol
-     */
-    TypeLookupRequestListener(
-            TypeLookupManager* pwlp);
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~TypeLookupRequestListener() override;
-
-    /**
-     * @brief Method call when this class is notified of a new cache change
-     * @param reader The reader receiving the cache change
-     * @param change The cache change
-     */
-    void onNewCacheChangeAdded(
-            fastrtps::rtps::RTPSReader* reader,
-            const fastrtps::rtps::CacheChange_t* const  change) override;
-
-private:
-
-    //! A pointer to the typelookup manager
-    TypeLookupManager* tlm_;
-
-    //! A pointer to the TypeObject factory.
-    fastrtps::types::TypeObjectFactory* factory_;
-
-};
-
-} /* namespace builtin */
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-#endif
-#endif /* TYPELOOKUP_REQUEST_LISTENER_HPP_*/

+ 0 - 425
thirdpartylib/FastRTPS/include/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp

@@ -1,425 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TypeLookupTypes.hpp
- *
- */
-
-#ifndef TYPELOOKUPTYPES_HPP
-#define TYPELOOKUPTYPES_HPP
-
-#include <fastrtps/types/TypeObject.h>
-#include <fastdds/dds/builtin/common/RequestHeader.hpp>
-#include <fastdds/dds/topic/TypeSupport.hpp>
-
-#include <cstdint>
-#include <vector>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-namespace builtin {
-
-const int32_t TypeLookup_getTypes_Hash = static_cast<int32_t>(0xd35282d1);
-const int32_t TypeLookup_getDependencies_Hash = static_cast<int32_t>(0x31fbaa35);
-
-struct TypeLookup_getTypes_In
-{
-    std::vector<fastrtps::types::TypeIdentifier> type_ids;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypes_In& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-struct TypeLookup_getTypes_Out
-{
-    std::vector<fastrtps::types::TypeIdentifierTypeObjectPair> types;
-
-    std::vector<fastrtps::types::TypeIdentifierPair> complete_to_minimal;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypes_Out& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-class TypeLookup_getTypes_Result
-{
-public:
-
-    RTPS_DllAPI TypeLookup_getTypes_Result();
-
-    RTPS_DllAPI ~TypeLookup_getTypes_Result();
-
-    RTPS_DllAPI TypeLookup_getTypes_Result(const TypeLookup_getTypes_Result &x);
-
-    RTPS_DllAPI TypeLookup_getTypes_Result(TypeLookup_getTypes_Result &&x);
-
-    RTPS_DllAPI TypeLookup_getTypes_Result& operator=(const TypeLookup_getTypes_Result &x);
-
-    RTPS_DllAPI TypeLookup_getTypes_Result& operator=(TypeLookup_getTypes_Result &&x);
-
-    RTPS_DllAPI void _d(int32_t __d);
-
-    RTPS_DllAPI int32_t _d() const;
-
-    RTPS_DllAPI int32_t& _d();
-
-    RTPS_DllAPI void result(const TypeLookup_getTypes_Out &_result);
-
-    RTPS_DllAPI void result(TypeLookup_getTypes_Out &&_result);
-
-    RTPS_DllAPI const TypeLookup_getTypes_Out& result() const;
-
-    RTPS_DllAPI TypeLookup_getTypes_Out& result();
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypes_Result& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-
-private:
-    int32_t m__d;
-    TypeLookup_getTypes_Out m_result;
-};
-
-class TypeLookup_getTypeDependencies_In
-{
-public:
-    std::vector<fastrtps::types::TypeIdentifier> type_ids;
-
-    std::vector<uint8_t> continuation_point;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypeDependencies_In& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-class TypeLookup_getTypeDependencies_Out
-{
-public:
-    std::vector<fastrtps::types::TypeIdentifierWithSize> dependent_typeids;
-
-    std::vector<uint8_t> continuation_point;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypeDependencies_Out& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-class TypeLookup_getTypeDependencies_Result
-{
-public:
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result();
-
-    RTPS_DllAPI ~TypeLookup_getTypeDependencies_Result();
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result(const TypeLookup_getTypeDependencies_Result &x);
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result(TypeLookup_getTypeDependencies_Result &&x);
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result& operator=(const TypeLookup_getTypeDependencies_Result &x);
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result& operator=(TypeLookup_getTypeDependencies_Result &&x);
-
-    RTPS_DllAPI void _d(int32_t __d);
-
-    RTPS_DllAPI int32_t _d() const;
-
-    RTPS_DllAPI int32_t& _d();
-
-    RTPS_DllAPI void result(const TypeLookup_getTypeDependencies_Out &_result);
-
-    RTPS_DllAPI void result(TypeLookup_getTypeDependencies_Out &&_result);
-
-    RTPS_DllAPI const TypeLookup_getTypeDependencies_Out& result() const;
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Out& result();
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_getTypeDependencies_Result& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-
-private:
-    int32_t m__d;
-
-    TypeLookup_getTypeDependencies_Out m_result;
-};
-class TypeLookup_Call
-{
-public:
-
-    RTPS_DllAPI TypeLookup_Call();
-
-    RTPS_DllAPI ~TypeLookup_Call();
-
-    RTPS_DllAPI TypeLookup_Call(const TypeLookup_Call &x);
-
-    RTPS_DllAPI TypeLookup_Call(TypeLookup_Call &&x);
-
-    RTPS_DllAPI TypeLookup_Call& operator=(const TypeLookup_Call &x);
-
-    RTPS_DllAPI TypeLookup_Call& operator=(TypeLookup_Call &&x);
-
-    RTPS_DllAPI void _d(int32_t __d);
-
-    RTPS_DllAPI int32_t _d() const;
-
-    RTPS_DllAPI int32_t& _d();
-
-    RTPS_DllAPI void getTypes(const TypeLookup_getTypes_In &_getTypes);
-
-    RTPS_DllAPI void getTypes(TypeLookup_getTypes_In &&_getTypes);
-
-    RTPS_DllAPI const TypeLookup_getTypes_In& getTypes() const;
-
-    RTPS_DllAPI TypeLookup_getTypes_In& getTypes();
-
-    RTPS_DllAPI void getTypeDependencies(const TypeLookup_getTypeDependencies_In &_getTypeDependencies);
-
-    RTPS_DllAPI void getTypeDependencies(TypeLookup_getTypeDependencies_In &&_getTypeDependencies);
-
-    RTPS_DllAPI const TypeLookup_getTypeDependencies_In& getTypeDependencies() const;
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_In& getTypeDependencies();
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_Call& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-
-private:
-    int32_t m__d;
-
-    TypeLookup_getTypes_In m_getTypes;
-    TypeLookup_getTypeDependencies_In m_getTypeDependencies;
-};
-
-class TypeLookup_Request
-{
-public:
-    rpc::RequestHeader header;
-
-    TypeLookup_Call data;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_Request& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-class TypeLookup_Return
-{
-public:
-
-    RTPS_DllAPI TypeLookup_Return();
-
-    RTPS_DllAPI ~TypeLookup_Return();
-
-    RTPS_DllAPI TypeLookup_Return(const TypeLookup_Return &x);
-
-    RTPS_DllAPI TypeLookup_Return(TypeLookup_Return &&x);
-
-    RTPS_DllAPI TypeLookup_Return& operator=(const TypeLookup_Return &x);
-
-    RTPS_DllAPI TypeLookup_Return& operator=(TypeLookup_Return &&x);
-
-    RTPS_DllAPI void _d(int32_t __d);
-
-    RTPS_DllAPI int32_t _d() const;
-
-    RTPS_DllAPI int32_t& _d();
-
-    RTPS_DllAPI void getType(const TypeLookup_getTypes_Result &_getType);
-
-    RTPS_DllAPI void getType(TypeLookup_getTypes_Result &&_getType);
-
-    RTPS_DllAPI const TypeLookup_getTypes_Result& getType() const;
-
-    RTPS_DllAPI TypeLookup_getTypes_Result& getType();
-
-    RTPS_DllAPI void getTypeDependencies(const TypeLookup_getTypeDependencies_Result &_getTypeDependencies);
-
-    RTPS_DllAPI void getTypeDependencies(TypeLookup_getTypeDependencies_Result &&_getTypeDependencies);
-
-    RTPS_DllAPI const TypeLookup_getTypeDependencies_Result& getTypeDependencies() const;
-
-    RTPS_DllAPI TypeLookup_getTypeDependencies_Result& getTypeDependencies();
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_Return& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-
-private:
-    int32_t m__d;
-
-    TypeLookup_getTypes_Result m_getType;
-    TypeLookup_getTypeDependencies_Result m_getTypeDependencies;
-};
-
-class TypeLookup_Reply
-{
-public:
-    rpc::RequestHeader header;
-
-    TypeLookup_Return return_value;
-
-    RTPS_DllAPI static size_t getCdrSerializedSize(const TypeLookup_Reply& data, size_t current_alignment = 0);
-
-    RTPS_DllAPI void serialize(eprosima::fastcdr::Cdr &cdr) const;
-
-    RTPS_DllAPI void deserialize(eprosima::fastcdr::Cdr &cdr);
-
-    RTPS_DllAPI static bool isKeyDefined() { return false; }
-};
-
-// TypeSupports
-class TypeLookup_RequestPubSubType : public TopicDataType
-{
-public:
-    TypeLookup_RequestPubSubType();
-
-    virtual ~TypeLookup_RequestPubSubType() override;
-
-    bool serialize(
-            void *data,
-            fastrtps::rtps::SerializedPayload_t* payload) override;
-
-    bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data) override;
-
-    /*
-    bool getKey(
-            void*,
-            fastrtps::rtps::InstanceHandle_t*,
-            bool) override
-    {}
-    */
-
-    void* createData() override;
-
-    void deleteData(void* data) override;
-};
-
-class TypeLookup_ReplyPubSubType : public TopicDataType
-{
-public:
-    TypeLookup_ReplyPubSubType();
-
-    virtual ~TypeLookup_ReplyPubSubType() override;
-
-    bool serialize(
-            void *data,
-            fastrtps::rtps::SerializedPayload_t* payload) override;
-
-    bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data) override;
-
-    /*
-    bool getKey(
-            void*,
-            fastrtps::rtps::InstanceHandle_t*,
-            bool) override
-    {}
-    */
-
-    void* createData() override;
-
-    void deleteData(void* data) override;
-};
-
-class TypeLookup_RequestTypeSupport : public TypeSupport
-{
-public:
-    RTPS_DllAPI bool serialize(
-            void* data,
-            fastrtps::rtps::SerializedPayload_t* payload) override;
-
-    RTPS_DllAPI bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data) override;
-
-    static size_t getCdrSerializedSize(
-            const TypeLookup_Request& data,
-            size_t current_alignment = 0);
-
-    RTPS_DllAPI void* create_data() override;
-
-    RTPS_DllAPI void delete_data(void* data) override;
-};
-
-class TypeLookup_ReplyTypeSupport : public TypeSupport
-{
-public:
-    RTPS_DllAPI bool serialize(
-            void* data,
-            fastrtps::rtps::SerializedPayload_t* payload) override;
-
-    RTPS_DllAPI bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data) override;
-
-    static size_t getCdrSerializedSize(
-            const TypeLookup_Reply& data,
-            size_t current_alignment = 0);
-
-    RTPS_DllAPI void* create_data() override;
-
-    RTPS_DllAPI void delete_data(void* data) override;
-};
-
-
-}
-}
-}
-}
-
-#endif // TYPELOOKUPTYPES_HPP

+ 0 - 149
thirdpartylib/FastRTPS/include/fastdds/dds/core/Entity.hpp

@@ -1,149 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Entity.hpp
- *
- */
-
-#ifndef _FASTDDS_ENTITY_HPP_
-#define _FASTDDS_ENTITY_HPP_
-
-#include <fastdds/dds/core/status/StatusMask.hpp>
-#include <fastdds/rtps/common/InstanceHandle.h>
-#include <fastrtps/types/TypesBase.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * @brief The Entity class is the abstract base class for all the objects that support QoS policies, a listener and
- * a status condition.
- *
- */
-class Entity
-{
-public:
-
-    /**
-     * @brief Constructor
-     * @param mask StatusMask (default: all)
-     */
-    RTPS_DllAPI Entity(
-            const StatusMask& mask = StatusMask::all())
-        : status_mask_(mask)
-        , enable_(false)
-    {
-    }
-
-    /**
-     * @brief This operation enables the Entity
-     * @return RETCODE_OK
-     */
-    virtual fastrtps::types::ReturnCode_t enable()
-    {
-        enable_ = true;
-        return fastrtps::types::ReturnCode_t::RETCODE_OK;
-    }
-
-    /**
-     * @brief This operation disables the Entity before closing it
-     */
-    void close()
-    {
-        enable_ = false;
-    }
-
-    /**
-     * @brief Retrieves the set of relevant statuses for the Entity
-     * @return Reference to the StatusMask with the relevant statuses set to 1
-     */
-    RTPS_DllAPI const StatusMask& get_status_mask() const
-    {
-        return status_mask_;
-    }
-
-    /**
-     * @brief Retrieves the instance handler that represents the Entity
-     * @return Reference to the InstanceHandle
-     */
-    const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const
-    {
-        return instance_handle_;
-    }
-
-    /**
-     * @brief Checks if the Entity is enabled
-     * @return true if enabled, false if not
-     */
-    RTPS_DllAPI bool is_enabled() const
-    {
-        return enable_;
-    }
-
-    RTPS_DllAPI bool operator ==(
-            const Entity& other) const
-    {
-        return (this->instance_handle_ == other.instance_handle_);
-    }
-
-protected:
-
-    /**
-     * @brief Setter for the Instance Handle
-     * @param handle Instance Handle
-     */
-    RTPS_DllAPI void set_instance_handle(
-            const fastrtps::rtps::InstanceHandle_t& handle)
-    {
-        instance_handle_ = handle;
-    }
-
-    //! StatusMask with relevant statuses set to 1
-    StatusMask status_mask_;
-
-    //! InstanceHandle associated to the Entity
-    fastrtps::rtps::InstanceHandle_t instance_handle_;
-
-    //! Boolean that states if the Entity is enabled or disabled
-    bool enable_;
-
-};
-
-/**
- * @brief The DomainEntity class is a subclass of Entity created in order to differentiate between DomainParticipants
- * and the rest of Entities
- */
-class DomainEntity : public Entity
-{
-public:
-
-    /**
-     * @brief Constructor
-     * @param mask StatusMask (default: all)
-     */
-    RTPS_DllAPI DomainEntity(
-            const StatusMask& mask = StatusMask::all())
-        : Entity(mask)
-    {
-    }
-
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_ENTITY_HPP_

+ 0 - 1582
thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/ParameterTypes.hpp

@@ -1,1582 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file ParameterTypes.hpp
- */
-
-#ifndef _FASTDDS_DDS_QOS_PARAMETERTYPES_HPP_
-#define _FASTDDS_DDS_QOS_PARAMETERTYPES_HPP_
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
-
-#include <fastdds/rtps/common/all_common.h>
-#include <fastdds/rtps/common/Token.h>
-#include <fastdds/rtps/messages/CDRMessage.h>
-
-#include <fastrtps/utils/fixed_size_string.hpp>
-
-#if HAVE_SECURITY
-#include <fastdds/rtps/security/accesscontrol/ParticipantSecurityAttributes.h>
-#include <fastdds/rtps/security/accesscontrol/EndpointSecurityAttributes.h>
-#endif
-
-#include <string>
-#include <vector>
-
-namespace eprosima {
-
-namespace fastrtps {
-namespace rtps {
-struct CDRMessage_t;
-}
-}
-
-namespace fastdds {
-namespace dds {
-
-/**
- * @addtogroup PARAMETER_MODULE
- * @{
- */
-
-/**
- * @brief Enum for the unique parameter identifier. Alias of uint16_t.
- */
-enum ParameterId_t : uint16_t
-{
-    PID_PAD = 0x0000,
-    PID_SENTINEL = 0x0001,
-    PID_USER_DATA = 0x002c,
-    PID_TOPIC_NAME = 0x0005,
-    PID_TYPE_NAME = 0x0007,
-    PID_GROUP_DATA =0x002d,
-    PID_TOPIC_DATA =0x002e,
-    PID_DURABILITY =0x001d,
-    PID_DURABILITY_SERVICE =0x001e,
-    PID_DEADLINE =0x0023,
-    PID_LATENCY_BUDGET =0x0027,
-    PID_LIVELINESS =0x001b,
-    PID_RELIABILITY =0x001A,
-    PID_LIFESPAN =0x002b,
-    PID_DESTINATION_ORDER =0x0025,
-    PID_HISTORY =0x0040,
-    PID_RESOURCE_LIMITS =0x0041,
-    PID_OWNERSHIP =0x001f,
-    PID_OWNERSHIP_STRENGTH =0x0006,
-    PID_PRESENTATION =0x0021,
-    PID_PARTITION =0x0029,
-    PID_TIME_BASED_FILTER =0x0004,
-    PID_TRANSPORT_PRIORITY =0x0049,
-    PID_PROTOCOL_VERSION = 0x0015,
-    PID_VENDORID = 0x0016,
-    PID_UNICAST_LOCATOR = 0x002f,
-    PID_MULTICAST_LOCATOR = 0x0030,
-    PID_MULTICAST_IPADDRESS =0x0011,
-    PID_DEFAULT_UNICAST_LOCATOR = 0x0031,
-    PID_DEFAULT_MULTICAST_LOCATOR = 0x0048,
-    PID_METATRAFFIC_UNICAST_LOCATOR = 0x0032,
-    PID_METATRAFFIC_MULTICAST_LOCATOR = 0x0033,
-    PID_DEFAULT_UNICAST_IPADDRESS =0x000c,
-    PID_DEFAULT_UNICAST_PORT = 0x000e,
-    PID_METATRAFFIC_UNICAST_IPADDRESS =0x0045,
-    PID_METATRAFFIC_UNICAST_PORT = 0x000d,
-    PID_METATRAFFIC_MULTICAST_IPADDRESS =0x000b,
-    PID_METATRAFFIC_MULTICAST_PORT = 0x0046,
-    PID_EXPECTS_INLINE_QOS =0x0043,
-    PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT =0x0034,
-    PID_PARTICIPANT_BUILTIN_ENDPOINTS = 0x0044,
-    PID_PARTICIPANT_LEASE_DURATION = 0x0002,
-    PID_CONTENT_FILTER_PROPERTY =0x0035,
-    PID_PARTICIPANT_GUID = 0x0050,
-    PID_PARTICIPANT_ENTITYID =0x0051,
-    PID_GROUP_GUID =0x0052,
-    PID_GROUP_ENTITYID =0x0053,
-    PID_BUILTIN_ENDPOINT_SET = 0x0058,
-    PID_PROPERTY_LIST = 0x0059,
-    PID_TYPE_MAX_SIZE_SERIALIZED =0x0060,
-    PID_ENTITY_NAME = 0x0062,
-    PID_TYPE_IDV1 = 0x0069,
-    PID_KEY_HASH = 0x0070,
-    PID_STATUS_INFO = 0x0071,
-    PID_TYPE_OBJECTV1 = 0x0072,
-    PID_ENDPOINT_GUID = 0x005a,
-    //PID_RELATED_SAMPLE_IDENTITY = 0x0083
-    PID_IDENTITY_TOKEN = 0x1001,
-    PID_PERMISSIONS_TOKEN = 0x1002,
-    PID_DATA_TAGS = 0x1003,
-    PID_ENDPOINT_SECURITY_INFO = 0x1004,
-    PID_PARTICIPANT_SECURITY_INFO = 0x1005,
-    PID_IDENTITY_STATUS_TOKEN = 0x1006,
-    PID_PERSISTENCE_GUID = 0x8002,
-    PID_RELATED_SAMPLE_IDENTITY = 0x800f,
-    PID_DATA_REPRESENTATION = 0x0073,
-    PID_TYPE_CONSISTENCY_ENFORCEMENT = 0x0074,
-    PID_TYPE_INFORMATION = 0x0075,
-    PID_DISABLE_POSITIVE_ACKS = 0x8005,
-};
-
-//!Base Parameter class with parameter PID and parameter length in bytes.
-//!@ingroup PARAMETER_MODULE
-class Parameter_t
-{
-public:
-
-    /**
-     * @brief Constructor without parameters
-     */
-    RTPS_DllAPI Parameter_t()
-        : Pid(PID_PAD)
-        , length(0)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param length Its associated length
-     */
-    RTPS_DllAPI Parameter_t(
-            ParameterId_t pid,
-            uint16_t length)
-        : Pid(pid)
-        , length(length)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~Parameter_t()
-    {
-    }
-
-    bool operator ==(
-            const Parameter_t& b) const
-    {
-        return (this->Pid == b.Pid) &&
-               (this->length == b.length);
-    }
-
-public:
-
-    //!Parameter ID. <br> By default, PID_PAD.
-    ParameterId_t Pid;
-    //!Parameter length. <br> By default, 0.
-    uint16_t length;
-};
-
-/**
- *@ingroup PARAMETER_MODULE
- */
-class ParameterKey_t : public Parameter_t
-{
-public:
-
-    //!Instance Handle. <br> By default, c_InstanceHandle_Unknown.
-    fastrtps::rtps::InstanceHandle_t key;
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterKey_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterKey_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, parameter length and Instance Handle
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param ke Instance Handle to be set
-     */
-    ParameterKey_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            const fastrtps::rtps::InstanceHandle_t& ke)
-        : Parameter_t(pid, in_length)
-        , key(ke)
-    {
-    }
-
-};
-
-#define PARAMETER_KEY_HASH_LENGTH 16
-
-/**
- *@ingroup PARAMETER_MODULE
- */
-class ParameterLocator_t : public Parameter_t
-{
-public:
-
-    //!Locator
-    fastrtps::rtps::Locator_t locator;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterLocator_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterLocator_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a Locator
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param loc Locator to be set
-     */
-    ParameterLocator_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            const fastrtps::rtps::Locator_t& loc)
-        : Parameter_t(pid, in_length)
-        , locator(loc)
-    {
-    }
-
-};
-#define PARAMETER_LOCATOR_LENGTH 24
-
-
-/**
- *@ingroup PARAMETER_MODULE
- */
-class ParameterString_t : public Parameter_t
-{
-public:
-
-    /**
-     * @brief Constructor without parameters.
-     */
-    ParameterString_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterString_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a string
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param strin Parameter name
-     */
-    ParameterString_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            const fastrtps::string_255& strin)
-        : Parameter_t(pid, in_length)
-        , string_(strin)
-    {
-    }
-
-    /**
-     * @brief Getter for the name
-     * @return current name associated
-     */
-    inline const char* getName() const
-    {
-        return string_.c_str();
-    }
-
-    /**
-     * @brief Setter for the name
-     * @param name String to be set
-     */
-    inline void setName(
-            const char* name)
-    {
-        string_ = name;
-    }
-
-    /**
-     * @brief Getter for the name size
-     * @return size_t
-     */
-    inline size_t size() const
-    {
-        return string_.size();
-    }
-
-private:
-
-    //!Name. <br> By default, empty string.
-    fastrtps::string_255 string_;
-};
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterPort_t : public Parameter_t
-{
-public:
-
-    //!Port. <br> By default, 0.
-    uint32_t port;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterPort_t()
-        : port(0)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterPort_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , port(0)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a port
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param po Port to be set
-     */
-    ParameterPort_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            uint32_t po)
-        : Parameter_t(pid, in_length)
-        , port(po)
-    {
-    }
-
-};
-
-#define PARAMETER_PORT_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterGuid_t : public Parameter_t
-{
-public:
-
-    //!GUID <br> By default, unknown GUID.
-    fastrtps::rtps::GUID_t guid;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterGuid_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterGuid_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a GUID
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param guidin GUID to be set
-     */
-    ParameterGuid_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            const fastrtps::rtps::GUID_t& guidin)
-        : Parameter_t(pid, in_length)
-        , guid(guidin)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a Instance Handle
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param iH Instance Handle to be set as GUID
-     */
-    ParameterGuid_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            const fastrtps::rtps::InstanceHandle_t& iH)
-        : Parameter_t(pid, in_length)
-    {
-        for (uint8_t i = 0; i < 16; ++i)
-        {
-            if (i < 12)
-            {
-                guid.guidPrefix.value[i] = iH.value[i];
-            }
-            else
-            {
-                guid.entityId.value[i - 12] = iH.value[i];
-            }
-        }
-    }
-
-};
-
-#define PARAMETER_GUID_LENGTH 16
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterProtocolVersion_t : public Parameter_t
-{
-public:
-
-    //!Protocol Version. <br> By default, c_ProtocolVersion.
-    fastrtps::rtps::ProtocolVersion_t protocolVersion;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterProtocolVersion_t()
-    {
-        protocolVersion = fastrtps::rtps::c_ProtocolVersion;
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterProtocolVersion_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-        protocolVersion = fastrtps::rtps::c_ProtocolVersion;
-    }
-
-};
-
-#define PARAMETER_PROTOCOL_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterVendorId_t : public Parameter_t
-{
-public:
-
-    //!Vendor Id. <br> By default, c_VendorId_eProsima.
-    fastrtps::rtps::VendorId_t vendorId;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterVendorId_t()
-        : vendorId(fastrtps::rtps::c_VendorId_eProsima)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterVendorId_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , vendorId(fastrtps::rtps::c_VendorId_eProsima)
-    {
-    }
-
-};
-
-#define PARAMETER_VENDOR_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterIP4Address_t : public Parameter_t
-{
-public:
-
-    //!Address <br> By default [0,0,0,0].
-    fastrtps::rtps::octet address[4];
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterIP4Address_t()
-    {
-        this->setIP4Address(0, 0, 0, 0);
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterIP4Address_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-        this->setIP4Address(0, 0, 0, 0);
-    }
-
-    /**
-     * @brief Setter for the address
-     * @param o1 First octet
-     * @param o2 Second octet
-     * @param o3 Third octet
-     * @param o4 Fourth octet
-     */
-    void setIP4Address(
-            fastrtps::rtps::octet o1,
-            fastrtps::rtps::octet o2,
-            fastrtps::rtps::octet o3,
-            fastrtps::rtps::octet o4)
-    {
-        address[0] = o1;
-        address[1] = o2;
-        address[2] = o3;
-        address[3] = o4;
-    }
-
-};
-
-#define PARAMETER_IP4_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterBool_t : public Parameter_t
-{
-public:
-
-    //!Boolean <br> By default, false.
-    bool value;
-
-    /**
-     * @brief Constructor without parameter
-     */
-    ParameterBool_t()
-        : value(false)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterBool_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , value(false)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and a boolean
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param inbool Boolean to be set
-     */
-    ParameterBool_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            bool inbool)
-        : Parameter_t(pid, in_length)
-        , value(inbool)
-    {
-    }
-
-};
-
-#define PARAMETER_BOOL_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterStatusInfo_t : public Parameter_t
-{
-public:
-
-    //!Status <br> By default, 0.
-    uint8_t status;
-
-    /**
-     * @brief Constructor without parameter
-     */
-    ParameterStatusInfo_t()
-        : status(0)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterStatusInfo_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , status(0)
-    {
-    }
-
-    /**
-     * @brief Constructor using a parameter PID, the parameter length and status value
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     * @param instatus uint8_t to be set as status
-     */
-    ParameterStatusInfo_t(
-            ParameterId_t pid,
-            uint16_t in_length,
-            uint8_t instatus)
-        : Parameter_t(pid, in_length)
-        , status(instatus)
-    {
-    }
-
-};
-
-#define PARAMETER_STATUS_INFO_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterCount_t : public Parameter_t
-{
-public:
-
-    //!Count <br> By default, 0.
-    fastrtps::rtps::Count_t count;
-
-    /**
-     * @brief Constructor without parameter
-     */
-    ParameterCount_t()
-        : count(0)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterCount_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , count(0)
-    {
-    }
-
-};
-
-#define PARAMETER_COUNT_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterEntityId_t : public Parameter_t
-{
-public:
-
-    //!EntityId <br> By default, ENTITYID_UNKNOWN.
-    fastrtps::rtps::EntityId_t entityId;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterEntityId_t()
-        : entityId(ENTITYID_UNKNOWN)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterEntityId_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , entityId(ENTITYID_UNKNOWN)
-    {
-    }
-
-};
-
-#define PARAMETER_ENTITYID_LENGTH 4
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterTime_t : public Parameter_t
-{
-public:
-
-    //!Time <br> By default, 0.
-    fastrtps::rtps::Time_t time;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterTime_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterTime_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-};
-
-#define PARAMETER_TIME_LENGTH 8
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterBuiltinEndpointSet_t : public Parameter_t
-{
-public:
-
-    //!Builtin Endpoint Set <br> By default, 0.
-    fastrtps::rtps::BuiltinEndpointSet_t endpointSet;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterBuiltinEndpointSet_t()
-        : endpointSet(0)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterBuiltinEndpointSet_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , endpointSet(0)
-    {
-    }
-
-};
-
-#define PARAMETER_BUILTINENDPOINTSET_LENGTH 4
-
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterProperty_t
-{
-
-    friend class ParameterPropertyList_t;
-
-private:
-
-    //!Data <br> By default, nullptr.
-    fastrtps::rtps::octet* data;
-
-public:
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterProperty_t()
-    {
-        data = nullptr;
-    }
-
-    /**
-     * @brief Constructor using a pointer
-     * @param ptr Pointer to be set as data
-     */
-    explicit ParameterProperty_t(
-            void* ptr)
-    {
-        data = (fastrtps::rtps::octet*)ptr;
-    }
-
-    /**
-     * @brief Getter for the first element in data
-     * @return string with the data
-     */
-    std::string first() const
-    {
-        //Skip the size and return the string
-        return std::string((char*)data + 4);
-    }
-
-    /**
-     * @brief Getter for the second element in data
-     * @return string with the data
-     */
-    std::string second() const
-    {
-        //Skip the first element
-        uint32_t size1 = ParameterProperty_t::element_size(data);
-
-        //Skip the size of the second element and return the string
-        return std::string((char*)data + size1 + 4);
-    }
-
-    /**
-     * @brief Setter using a pair of strings
-     * @param new_value Pair of strings with the new values
-     * @return true if the modification is done correctly and false if the size of the new_value is not valid
-     */
-    bool modify(
-            const std::pair<std::string, std::string>& new_value)
-    {
-        uint32_t old_size = size();
-
-        uint32_t first_size = (uint32_t)new_value.first.size() + 1;
-        uint32_t first_alignment = ((first_size + 3) & ~3) - first_size;
-        uint32_t second_size = (uint32_t)new_value.second.size() + 1;
-        uint32_t second_alignment = ((second_size + 3) & ~3) - second_size;
-        uint32_t new_size = first_size + first_alignment + second_size + second_alignment + 8;
-
-        if (old_size != new_size)
-        {
-            return false;
-        }
-
-        fastrtps::rtps::octet* current = data;
-        memcpy(current, &first_size, 4);
-        memcpy(current + 4, new_value.first.c_str(), first_size);
-        memset(current + 4 + first_size, 0, first_alignment);
-
-        current = data + 4 + first_size + first_alignment;
-        memcpy(current, &second_size, 4);
-        memcpy(current + 4, new_value.second.c_str(), second_size);
-        memset(current + 4 + second_size, 0, second_alignment);
-
-        return true;
-    }
-
-    /**
-     * @brief Getter that returns a pair of the first and second elements in data
-     * @return Pair of strings with the first and second elements data
-     */
-    std::pair<const std::string, const std::string> pair() const
-    {
-        return std::make_pair(std::string(first()), std::string(second()));
-    }
-
-    /**
-     * @brief Getter for data size
-     * @return uint32_t with the size
-     */
-    uint32_t size() const
-    {
-        //Size of the first element (with alignment)
-        uint32_t size1 = ParameterProperty_t::element_size(data);
-
-        //Size of the second element (with alignment)
-        uint32_t size2 = ParameterProperty_t::element_size(data + size1);
-        return size1 + size2;
-    }
-
-    bool operator ==(
-            const ParameterProperty_t& b) const
-    {
-        return (first() == b.first()) &&
-               (second() == b.second());
-    }
-
-    bool operator !=(
-            const ParameterProperty_t& b) const
-    {
-        return !(*this == b);
-    }
-
-private:
-
-    /**
-     * @brief Getter for the size of a specific octet pointer
-     * @param ptr Octet pointer to measure
-     * @return Size of the pointer data
-     */
-    static uint32_t element_size(
-            const fastrtps::rtps::octet* ptr)
-    {
-        //Size of the element (with alignment)
-        uint32_t size = *(uint32_t*)ptr;
-        return (4 + ((size + 3) & ~3));
-    }
-
-};
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterPropertyList_t : public Parameter_t
-{
-private:
-
-    //!Properties
-    fastrtps::rtps::SerializedPayload_t properties_;
-    //!Number of properties
-    uint32_t Nproperties_ = 0;
-    //!Maximum size
-    bool limit_size_ = false;
-
-public:
-
-    class iterator
-    {
-public:
-
-        typedef iterator self_type;
-        typedef ParameterProperty_t value_type;
-        typedef ParameterProperty_t reference;
-        typedef ParameterProperty_t* pointer;
-        typedef size_t difference_type;
-        typedef std::forward_iterator_tag iterator_category;
-
-        /**
-         * @brief Constructor using an octet pointer
-         * @param ptr Octet pointer to be set
-         */
-        iterator(
-                fastrtps::rtps::octet* ptr)
-            : ptr_(ptr)
-            , value_(ptr)
-        {
-        }
-
-        self_type operator ++()
-        {
-            self_type i = *this;
-            advance();
-            return i;
-        }
-
-        self_type operator ++(
-                int)
-        {
-            advance();
-            return *this;
-        }
-
-        reference operator *()
-        {
-            return value_;
-        }
-
-        pointer operator ->()
-        {
-            return &value_;
-        }
-
-        bool operator ==(
-                const self_type& rhs)
-        {
-            return ptr_ == rhs.ptr_;
-        }
-
-        bool operator !=(
-                const self_type& rhs)
-        {
-            return ptr_ != rhs.ptr_;
-        }
-
-protected:
-
-        /**
-         * @brief Shift the pointer to the next value
-         */
-        void advance()
-        {
-            ptr_ += value_.size();
-            value_ = ParameterProperty_t(ptr_);
-        }
-
-        /**
-         * @brief Getter for the pointer
-         * @return the pointer
-         */
-        fastrtps::rtps::octet* address() const
-        {
-            return ptr_;
-        }
-
-private:
-
-        //!Pointer
-        fastrtps::rtps::octet* ptr_;
-        //!Parameter Property
-        ParameterProperty_t value_;
-    };
-
-    class const_iterator
-    {
-public:
-
-        typedef const_iterator self_type;
-        typedef const ParameterProperty_t value_type;
-        typedef const ParameterProperty_t reference;
-        typedef const ParameterProperty_t* pointer;
-        typedef size_t difference_type;
-        typedef std::forward_iterator_tag iterator_category;
-
-        /**
-         * @brief Constructor using a pointer
-         * @param ptr Pointer to be set
-         */
-        const_iterator(
-                const fastrtps::rtps::octet* ptr)
-            : ptr_(ptr)
-            , value_(const_cast<fastrtps::rtps::octet*>(ptr))
-        {
-        }
-
-        self_type operator ++()
-        {
-            self_type i = *this;
-            advance();
-            return i;
-        }
-
-        self_type operator ++(
-                int)
-        {
-            advance();
-            return *this;
-        }
-
-        reference operator *()
-        {
-            return value_;
-        }
-
-        pointer operator ->()
-        {
-            return &value_;
-        }
-
-        bool operator ==(
-                const self_type& rhs)
-        {
-            return ptr_ == rhs.ptr_;
-        }
-
-        bool operator !=(
-                const self_type& rhs)
-        {
-            return ptr_ != rhs.ptr_;
-        }
-
-protected:
-
-        /**
-         * @brief Shift the pointer to the next value
-         */
-        void advance()
-        {
-            ptr_ += value_.size();
-            value_ = ParameterProperty_t(const_cast<fastrtps::rtps::octet*>(ptr_));
-        }
-
-        /**
-         * @brief Getter for the pointer
-         * @return the pointer
-         */
-        const fastrtps::rtps::octet* address() const
-        {
-            return ptr_;
-        }
-
-private:
-
-        //!Pointer
-        const fastrtps::rtps::octet* ptr_;
-        //!Parameter Property
-        ParameterProperty_t value_;
-    };
-
-public:
-
-    /**
-     * @brief Constructor without parameters
-     * Sets PID_PROPERTY_LIST as the PID of the parameter
-     */
-    ParameterPropertyList_t()
-        : Parameter_t(PID_PROPERTY_LIST, 0)
-        , Nproperties_ (0)
-        , limit_size_ (false)
-    {
-    }
-
-    /**
-     * Constructor with a defined maximum size
-     * @param size Size to be set as maximum
-     */
-    ParameterPropertyList_t(
-            uint32_t size)
-        : Parameter_t(PID_PROPERTY_LIST, 0)
-        , properties_(size)
-        , Nproperties_ (0)
-        , limit_size_ (size == 0 ? false : true)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param in_length Its associated length
-     */
-    ParameterPropertyList_t(
-            ParameterId_t /*pid*/,
-            uint16_t in_length)
-        : Parameter_t(PID_PROPERTY_LIST, in_length)
-        , Nproperties_ (0)
-        , limit_size_ (false)
-    {
-    }
-
-    /**
-     * @brief Constructor using a Parameter Property List
-     * @param parameter_properties Properties to be set
-     */
-    ParameterPropertyList_t(
-            const ParameterPropertyList_t& parameter_properties)
-        : Parameter_t(PID_PROPERTY_LIST, parameter_properties.length)
-        , properties_(parameter_properties.limit_size_ ?
-                parameter_properties.properties_.max_size :
-                parameter_properties.properties_.length)
-        , Nproperties_ (parameter_properties.Nproperties_)
-        , limit_size_ (parameter_properties.limit_size_)
-    {
-        properties_.copy(&parameter_properties.properties_, parameter_properties.limit_size_);
-    }
-
-    ParameterPropertyList_t& operator = (
-            const ParameterPropertyList_t& parameter_properties)
-    {
-        length = parameter_properties.length;
-        limit_size_ = parameter_properties.limit_size_;
-        properties_.reserve(limit_size_ ?
-                parameter_properties.properties_.max_size :
-                parameter_properties.properties_.length);
-        properties_.copy(&parameter_properties.properties_, parameter_properties.limit_size_);
-        Nproperties_ = parameter_properties.Nproperties_;
-        return *this;
-    }
-
-    /**
-     * @brief Getter for the first position of the ParameterPropertyList
-     * @return iterator
-     */
-    iterator begin()
-    {
-        return iterator(properties_.data);
-    }
-
-    /**
-     * @brief Getter for the end of the ParameterPropertyList
-     * @return iterator
-     */
-    iterator end()
-    {
-        return iterator(properties_.data + properties_.length);
-    }
-
-    /**
-     * @brief Getter for the first position of the ParameterPropertyList
-     * @return const_iterator
-     */
-    const_iterator begin() const
-    {
-        return const_iterator(properties_.data);
-    }
-
-    /**
-     * @brief Getter for the end of the ParameterPropertyList
-     * @return const_iterator
-     */
-    const_iterator end() const
-    {
-        return const_iterator(properties_.data + properties_.length);
-    }
-
-    /**
-     * @brief Introduce a new property in the ParameterPropertyList
-     * @param p Pair with the values of the new property
-     * @return true if it is introduced, false if not.
-     */
-    bool push_back(
-            std::pair<std::string, std::string> p)
-    {
-        //Realloc if needed;
-        uint32_t size1 = (uint32_t) p.first.length() + 1;
-        uint32_t alignment1 = ((size1 + 3) & ~3) - size1;
-
-        uint32_t size2 = (uint32_t) p.second.length() + 1;
-        uint32_t alignment2 = ((size2 + 3) & ~3) - size2;
-
-        if (limit_size_ && (properties_.max_size < properties_.length +
-                size1 + alignment1 + 4 +
-                size2 + alignment2 + 4))
-        {
-            return false;
-        }
-        properties_.reserve(properties_.length +
-                size1 + alignment1 + 4 +
-                size2 + alignment2 + 4);
-
-        push_back_helper((fastrtps::rtps::octet*)p.first.c_str(), size1, alignment1);
-        push_back_helper((fastrtps::rtps::octet*)p.second.c_str(), size2, alignment2);
-        ++Nproperties_;
-        return true;
-    }
-
-    /**
-     * @brief Introduce a new property in the ParameterPropertyList
-     * @param str1 Name of the property
-     * @param str1_size Size of the first string
-     * @param str2 Value of the property
-     * @param str2_size Size of the second string
-     * @return true if it is introduced, false if not.
-     */
-    bool push_back(
-            const unsigned char* str1,
-            uint32_t str1_size,
-            const unsigned char* str2,
-            uint32_t str2_size)
-    {
-        //Realloc if needed;
-        uint32_t alignment1 = ((str1_size + 3) & ~3) - str1_size;
-        uint32_t alignment2 = ((str2_size + 3) & ~3) - str2_size;
-
-        if (limit_size_ && (properties_.max_size < properties_.length +
-                str1_size + alignment1 + 4 +
-                str2_size + alignment2 + 4))
-        {
-            return false;
-        }
-        properties_.reserve(properties_.length +
-                str1_size + alignment1 + 4 +
-                str2_size + alignment2 + 4);
-
-        push_back_helper((fastrtps::rtps::octet*)str1, str1_size, alignment1);
-        push_back_helper((fastrtps::rtps::octet*)str2, str2_size, alignment2);
-        ++Nproperties_;
-        return true;
-    }
-
-    /**
-     * @brief Setter of a new property value on a specific position
-     * @param pos Iterator with the position of the property to be changed
-     * @param new_value Value to be set
-     * @return true if changed, false if not
-     */
-    bool set_property (
-            iterator pos,
-            const std::pair<std::string, std::string>& new_value)
-    {
-        return pos->modify(new_value);
-    }
-
-    /**
-     * @brief Clears the ParameterPropertyList
-     */
-    void clear()
-    {
-        properties_.length = 0;
-        Nproperties_ = 0;
-    }
-
-    /**
-     * @brief Getter for the size of the ParameterPropertyList
-     * @return uint32_t with the size
-     */
-    uint32_t size() const
-    {
-        return Nproperties_;
-    }
-
-    /**
-     * @brief Setter for the maximum size of the ParameterPropertyList
-     */
-    void set_max_size (
-            uint32_t size)
-    {
-        properties_.reserve(size);
-        limit_size_ = true;
-    }
-
-    /**
-     * @brief Getter for the maximum size of the ParameterPropertyList
-     * @return uint32_t with the size
-     */
-    uint32_t max_size ()
-    {
-        return (limit_size_ ? properties_.max_size : 0);
-    }
-
-protected:
-
-    void push_back_helper (
-            const fastrtps::rtps::octet* data,
-            uint32_t size,
-            uint32_t alignment)
-    {
-        fastrtps::rtps::octet* o = (fastrtps::rtps::octet*)&size;
-        memcpy(properties_.data + properties_.length, o, 4);
-        properties_.length += 4;
-
-        memcpy(properties_.data + properties_.length, data, size);
-        properties_.length += size;
-
-        for (uint32_t i = 0; i < alignment; ++i)
-        {
-            properties_.data[properties_.length + i] = '\0';
-        }
-        properties_.length += alignment;
-    }
-
-};
-
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterSampleIdentity_t : public Parameter_t
-{
-public:
-
-    //!Sample Identity <br> By default, unknown.
-    fastrtps::rtps::SampleIdentity sample_id;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterSampleIdentity_t()
-        : sample_id(fastrtps::rtps::SampleIdentity::unknown())
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterSampleIdentity_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , sample_id(fastrtps::rtps::SampleIdentity::unknown())
-    {
-    }
-
-    /**
-     * Add the parameter to a CDRMessage_t message.
-     * @param[in,out] msg Pointer to the message where the parameter should be added.
-     * @return True if the parameter was correctly added.
-     */
-    bool addToCDRMessage(
-            fastrtps::rtps::CDRMessage_t* msg) const;
-
-    /**
-     * Read the parameter from a CDRMessage_t message.
-     * @param[in,out] msg Pointer to the message from where the parameter should be taken.
-     * @param size Size of the parameter field to read
-     * @return True if the parameter was correctly taken.
-     */
-    bool readFromCDRMessage(
-            fastrtps::rtps::CDRMessage_t* msg,
-            uint16_t size);
-
-};
-
-#define PARAMETER_SAMPLEIDENTITY_LENGTH 24
-
-
-#if HAVE_SECURITY
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterToken_t : public Parameter_t
-{
-public:
-
-    //!Token
-    fastrtps::rtps::Token token;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    ParameterToken_t()
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterToken_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-};
-
-//!Default value for the ParameterParticipantSecurityInfo_t length
-#define PARAMETER_PARTICIPANT_SECURITY_INFO_LENGTH 8
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterParticipantSecurityInfo_t : public Parameter_t
-{
-public:
-
-    //!Participant Security Attributes Mask <br> By default, 0.
-    fastrtps::rtps::security::ParticipantSecurityAttributesMask security_attributes = 0;
-    //!Plugin Participant Security Attributes Mask <br> By default, 0.
-    fastrtps::rtps::security::PluginParticipantSecurityAttributesMask plugin_security_attributes = 0;
-
-    /**
-     * @brief Constructor without parameters. <br>
-     * Sets the value PID_PARTICIPANT_SECURITY_INFO for the parameter PID and PARAMETER_PARTICIPANT_SECURITY_INFO_LENGTH
-     * for the length.
-     */
-    ParameterParticipantSecurityInfo_t()
-        : Parameter_t(PID_PARTICIPANT_SECURITY_INFO, PARAMETER_PARTICIPANT_SECURITY_INFO_LENGTH)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterParticipantSecurityInfo_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-};
-
-//!Default value for the ParameterEndpointSecurityInfo_t length
-#define PARAMETER_ENDPOINT_SECURITY_INFO_LENGTH 8
-
-/**
- * @ingroup PARAMETER_MODULE
- */
-class ParameterEndpointSecurityInfo_t : public Parameter_t
-{
-public:
-
-    fastrtps::rtps::security::EndpointSecurityAttributesMask security_attributes;
-    fastrtps::rtps::security::PluginEndpointSecurityAttributesMask plugin_security_attributes;
-
-    /**
-     * @brief Constructor without parameters. <br>
-     * Sets the value PID_ENDPOINT_SECURITY_INFO for the parameter PID and PARAMETER_ENDPOINT_SECURITY_INFO_LENGTH
-     * for the length.
-     */
-    ParameterEndpointSecurityInfo_t()
-        : Parameter_t(PID_ENDPOINT_SECURITY_INFO, PARAMETER_ENDPOINT_SECURITY_INFO_LENGTH)
-    {
-    }
-
-    /**
-     * Constructor using a parameter PID and the parameter length
-     * @param pid Pid of the parameter
-     * @param in_length Its associated length
-     */
-    ParameterEndpointSecurityInfo_t(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-    {
-    }
-
-};
-
-#endif
-
-///@}
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif
-#endif // _FASTDDS_DDS_QOS_PARAMETERTYPES_HPP_

+ 0 - 2704
thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/QosPolicies.hpp

@@ -1,2704 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file QosPolicies.hpp
- *
- */
-
-#ifndef _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_
-#define _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_
-
-#include <vector>
-#include <fastdds/rtps/common/Types.h>
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastdds/dds/core/policy/ParameterTypes.hpp>
-#include <fastdds/rtps/attributes/PropertyPolicy.h>
-#include <fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp>
-#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
-#include <fastdds/rtps/resources/ResourceManagement.h>
-#include <fastdds/rtps/attributes/PropertyPolicy.h>
-#include <fastrtps/types/TypeObject.h>
-#include <fastrtps/utils/collections/ResourceLimitedVector.hpp>
-
-
-namespace eprosima {
-
-namespace fastrtps {
-namespace rtps {
-class EDP;
-}
-}
-
-namespace fastdds {
-namespace dds {
-
-/**
- * Class QosPolicy, base for all QoS policies defined for Writers and Readers.
- */
-class QosPolicy
-{
-public:
-
-    //! Boolean that indicates if the Qos has been changed
-    bool hasChanged;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    QosPolicy()
-        : hasChanged(false)
-        , send_always_(false)
-    {
-    }
-
-    /**
-     * @brief Constructor
-     * @param send_always Boolean that set if the Qos need to be sent even if it is not changed
-     */
-    explicit QosPolicy(
-            bool send_always)
-        : hasChanged(false)
-        , send_always_(send_always)
-    {
-    }
-
-    /**
-     * @brief Copy Constructor
-     * @param b Another instance of QosPolicy
-     */
-    QosPolicy(
-            const QosPolicy& b) = default;
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~QosPolicy() = default;
-
-    bool operator ==(
-            const QosPolicy& b) const
-    {
-        // hasChanged field isn't needed to be compared to being equal two QosPolicy objects.
-        return (this->send_always_ == b.send_always_);
-    }
-
-    QosPolicy& operator =(
-            const QosPolicy& b) = default;
-
-    /**
-     * Whether it should always be sent.
-     * @return True if it should always be sent.
-     */
-    virtual bool send_always() const
-    {
-        return send_always_;
-    }
-
-    /**
-     * @brief Clears the QosPolicy object
-     */
-    virtual inline void clear() = 0;
-
-protected:
-
-    //! Boolean that indicates if the Qos has to be sent even if it is not changed
-    bool send_always_;
-};
-
-/**
- * @brief Controls the behavior of the entity when acting as a factory for other entities. In other words,
- * configures the side-effects of the create_* and delete_* operations.
- * @note Mutable Qos Policy
- */
-class EntityFactoryQosPolicy
-{
-public:
-
-    /**
-     * Specifies whether the entity acting as a factory automatically enables the instances it creates.
-     * If True the factory will automatically enable each created Entity otherwise it will not. <br>
-     * By default, True.
-     */
-    bool autoenable_created_entities;
-
-    /**
-     * @brief Constructor without parameters
-     */
-    RTPS_DllAPI EntityFactoryQosPolicy()
-        : autoenable_created_entities(true)
-    {
-    }
-
-    /**
-     * @brief Constructor
-     * @param autoenable Value for the autoenable_created_entities boolean
-     */
-    RTPS_DllAPI EntityFactoryQosPolicy(
-            bool autoenable)
-        : autoenable_created_entities(autoenable)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~EntityFactoryQosPolicy()
-    {
-    }
-
-    bool operator ==(
-            const EntityFactoryQosPolicy& b) const
-    {
-        return
-            (this->autoenable_created_entities == b.autoenable_created_entities);
-    }
-
-    inline void clear()
-    {
-        EntityFactoryQosPolicy reset = EntityFactoryQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-/**
- * Enum DurabilityQosPolicyKind_t, different kinds of durability for DurabilityQosPolicy.
- */
-typedef enum DurabilityQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * The Service does not need to keep any samples of data-instances on behalf of any DataReader that is not
-     * known by the DataWriter at the time the instance is written. In other words the Service will only attempt
-     * to provide the data to existing subscribers
-     */
-    VOLATILE_DURABILITY_QOS,
-    /**
-     * For TRANSIENT_LOCAL, the service is only required to keep the data in the memory of the DataWriter that
-     * wrote the data and the data is not required to survive the DataWriter.
-     */
-    TRANSIENT_LOCAL_DURABILITY_QOS,
-    /**
-     * For TRANSIENT, the service is only required to keep the data in memory and not in permanent storage; but
-     * the data is not tied to the lifecycle of the DataWriter and will, in general, survive it.
-     */
-    TRANSIENT_DURABILITY_QOS,
-    /**
-     * Data is kept on permanent storage, so that they can outlive a system session.
-     * @warning Not Supported
-     */
-    PERSISTENT_DURABILITY_QOS
-} DurabilityQosPolicyKind_t;
-
-#define PARAMETER_KIND_LENGTH 4
-#define PARAMETER_BOOL_LENGTH 4
-
-/**
- * This policy expresses if the data should ‘outlive’ their writing time.
- * @note Immutable Qos Policy
- */
-class DurabilityQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DurabilityQosPolicy()
-        : Parameter_t(PID_DURABILITY, PARAMETER_KIND_LENGTH)
-        , QosPolicy(true)
-        , kind(VOLATILE_DURABILITY_QOS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DurabilityQosPolicy() = default;
-
-    /**
-     * Translates kind to rtps layer equivalent
-     * @return fastrtps::rtps::DurabilityKind_t
-     */
-    inline fastrtps::rtps::DurabilityKind_t durabilityKind() const
-    {
-        switch (kind)
-        {
-            default:
-            case VOLATILE_DURABILITY_QOS: return fastrtps::rtps::VOLATILE;
-            case TRANSIENT_LOCAL_DURABILITY_QOS: return fastrtps::rtps::TRANSIENT_LOCAL;
-            case TRANSIENT_DURABILITY_QOS: return fastrtps::rtps::TRANSIENT;
-            case PERSISTENT_DURABILITY_QOS: return fastrtps::rtps::PERSISTENT;
-        }
-    }
-
-    bool operator ==(
-            const DurabilityQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    /**
-     * Set kind passing the rtps layer equivalent kind
-     * @param new_kind fastrtps::rtps::DurabilityKind_t
-     */
-    inline void durabilityKind(
-            const fastrtps::rtps::DurabilityKind_t new_kind)
-    {
-        switch (new_kind)
-        {
-            default:
-            case fastrtps::rtps::VOLATILE: kind = VOLATILE_DURABILITY_QOS; break;
-            case fastrtps::rtps::TRANSIENT_LOCAL: kind = TRANSIENT_LOCAL_DURABILITY_QOS; break;
-            case fastrtps::rtps::TRANSIENT: kind = TRANSIENT_DURABILITY_QOS; break;
-            case fastrtps::rtps::PERSISTENT: kind = PERSISTENT_DURABILITY_QOS; break;
-        }
-
-    }
-
-    inline void clear() override
-    {
-        DurabilityQosPolicy reset = DurabilityQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    /**
-     * @brief DurabilityQosPolicyKind. <br>
-     * By default the value for DataReaders: VOLATILE_DURABILITY_QOS, for DataWriters TRANSIENT_LOCAL_DURABILITY_QOS
-     */
-    DurabilityQosPolicyKind_t kind;
-};
-
-/**
- * @brief DataReader expects a new sample updating the value of each instance at least once every deadline period.
- * DataWriter indicates that the application commits to write a new value (using the DataWriter) for each instance managed
- * by the DataWriter at least once every deadline period.
- * @note Mutable Qos Policy
- */
-class DeadlineQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DeadlineQosPolicy()
-        : Parameter_t(PID_DEADLINE, PARAMETER_TIME_LENGTH)
-        , QosPolicy(true)
-        , period(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DeadlineQosPolicy() = default;
-
-    bool operator ==(
-            const DeadlineQosPolicy& b) const
-    {
-        return (this->period == b.period) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        DeadlineQosPolicy reset = DeadlineQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    /**
-     * @brief Maximum time expected between samples.
-     * It is inconsistent for a DataReader to have a DEADLINE period less than its TimeBasedFilterQosPolicy
-     * minimum_separation. <br>
-     * By default, c_TimeInifinite.
-     */
-    fastrtps::Duration_t period;
-};
-
-/**
- * Specifies the maximum acceptable delay from the time the data is written until the data is inserted in the receiver's
- * application-cache and the receiving application is notified of the fact.This policy is a hint to the Service, not something
- * that must be monitored or enforced. The Service is not required to track or alert the user of any violation.
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Mutable Qos Policy
- */
-class LatencyBudgetQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI LatencyBudgetQosPolicy()
-        : Parameter_t(PID_LATENCY_BUDGET, PARAMETER_TIME_LENGTH)
-        , QosPolicy(true)
-        , duration(0, 0)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~LatencyBudgetQosPolicy() = default;
-
-    bool operator ==(
-            const LatencyBudgetQosPolicy& b) const
-    {
-        return (this->duration == b.duration) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        LatencyBudgetQosPolicy reset = LatencyBudgetQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //!Maximum acceptable delay from the time data is written until it is received. <br> By default, c_TimeZero.
-    fastrtps::Duration_t duration;
-};
-
-/**
- * Enum LivelinessQosPolicyKind, different kinds of liveliness for LivelinessQosPolicy
- */
-typedef enum LivelinessQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * The infrastructure will automatically signal liveliness for the DataWriters at least as often as required by the lease_duration.
-     */
-    AUTOMATIC_LIVELINESS_QOS,
-    /**
-     * The Service will assume that as long as at least one Entity within the DomainParticipant has asserted its liveliness the other
-     * Entities in that same DomainParticipant are also alive.
-     */
-    MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
-    /**
-     * The Service will only assume liveliness of the DataWriter if the application has asserted liveliness of that DataWriter itself.
-     */
-    MANUAL_BY_TOPIC_LIVELINESS_QOS
-
-} LivelinessQosPolicyKind;
-
-/**
- * Determines the mechanism and parameters used by the application to determine whether an Entity is “active” (alive).
- * The “liveliness” status of an Entity is used to maintain instance ownership in combination with the setting of the
- * OwnershipQosPolicy.
- * The application is also informed via listener when an Entity is no longer alive.
- *
- * The DataReader requests that liveliness of the writers is maintained by the requested means and loss of liveliness is
- * detected with delay not to exceed the lease_duration.
- *
- * The DataWriter commits to signaling its liveliness using the stated means at intervals not to exceed the lease_duration.
- * Listeners are used to notify the DataReaderof loss of liveliness and DataWriter of violations to the liveliness contract.
- */
-class LivelinessQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI LivelinessQosPolicy()
-        : Parameter_t(PID_LIVELINESS, PARAMETER_KIND_LENGTH + PARAMETER_TIME_LENGTH)
-        , QosPolicy(true)
-        , kind(AUTOMATIC_LIVELINESS_QOS)
-        , lease_duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-        , announcement_period(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~LivelinessQosPolicy() = default;
-
-    bool operator ==(
-            const LivelinessQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               (this->lease_duration == b.lease_duration) &&
-               (this->announcement_period == b.announcement_period) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        LivelinessQosPolicy reset = LivelinessQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //! Liveliness kind <br> By default, AUTOMATIC_LIVELINESS.
-    LivelinessQosPolicyKind kind;
-    //! Period within which liveliness should be asserted.
-    //! On a DataWriter it represents the period it commits to signal its liveliness.
-    //! On a DataReader it represents the period without assertion after which a DataWriter is considered
-    //! inactive.
-    //! By default, c_TimeInfinite.
-    fastrtps::Duration_t lease_duration;
-    //! The period for automatic assertion of liveliness.
-    //! Only used for DataWriters with AUTOMATIC liveliness.
-    //! By default, c_TimeInfinite.
-    //! @warning When not infinite, must be < lease_duration, and it is advisable to be less than 0.7*lease_duration.
-    fastrtps::Duration_t announcement_period;
-};
-
-/**
- * Enum ReliabilityQosPolicyKind, different kinds of reliability for ReliabilityQosPolicy.
- */
-typedef enum ReliabilityQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * Indicates that it is acceptable to not retry propagation of any samples. Presumably new values for the samples
-     * are generated often enough that it is not necessary to re-send or acknowledge any samples
-     */
-    BEST_EFFORT_RELIABILITY_QOS = 0x01,
-    /**
-     * Specifies the Service will attempt to deliver all samples in its history. Missed samples may be retried.
-     * In steady-state (no modifications communicated via the DataWriter) the middleware guarantees that all samples
-     * in the DataWriter history will eventually be delivered to all the DataReader objects. Outside steady state the
-     * HistoryQosPolicy and ResourceLimitsQosPolicy will determine how samples become part of the history and whether
-     * samples can be discarded from it.
-     */
-    RELIABLE_RELIABILITY_QOS = 0x02
-} ReliabilityQosPolicyKind;
-
-/**
- * Indicates the reliability of the endpoint.
- * @note Immutable Qos Policy
- */
-class ReliabilityQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI ReliabilityQosPolicy()
-        : Parameter_t(PID_RELIABILITY, PARAMETER_KIND_LENGTH + PARAMETER_TIME_LENGTH)
-        , QosPolicy(true) //indicate send always
-        , kind(BEST_EFFORT_RELIABILITY_QOS)
-        , max_blocking_time{0, 100000000} // max_blocking_time = 100ms
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~ReliabilityQosPolicy() = default;
-
-    bool operator ==(
-            const ReliabilityQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               (this->max_blocking_time == b.max_blocking_time) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        ReliabilityQosPolicy reset = ReliabilityQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    /*!
-     * @brief Defines the reliability kind of the endpoint. <br>
-     * By default, BEST_EFFORT_RELIABILITY_QOS for DataReaders and RELIABLE_RELIABILITY_QOS for DataWriters.
-     */
-    ReliabilityQosPolicyKind kind;
-
-    /*!
-     * @brief Defines the maximum period of time certain methods will be blocked.
-     *
-     * Methods affected by this property are:
-     * - DataWriter::write
-     * - DataReader::takeNextData
-     * - DataReader::readNextData
-     * <br>
-     * By default, 100 ms.
-     */
-    fastrtps::Duration_t max_blocking_time;
-};
-
-
-
-/**
- * Enum OwnershipQosPolicyKind, different kinds of ownership for OwnershipQosPolicy.
- */
-enum OwnershipQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * Indicates shared ownership for each instance. Multiple writers are allowed to update the same instance and all the
-     * updates are made available to the readers. In other words there is no concept of an “owner” for the instances.
-     */
-    SHARED_OWNERSHIP_QOS,
-    /**
-     * Indicates each instance can only be owned by one DataWriter, but the owner of an instance can change dynamically.
-     * The selection of the owner is controlled by the setting of the OwnershipStrengthQosPolicy. The owner is always set
-     * to be the highest-strength DataWriter object among the ones currently “active” (as determined by the LivelinessQosPolicy).
-     */
-    EXCLUSIVE_OWNERSHIP_QOS
-};
-
-/**
- * Specifies whether it is allowed for multiple DataWriters to write the same instance of the data and if so, how these
- * modifications should be arbitrated
- * @note Immutable Qos Policy
- */
-class OwnershipQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI OwnershipQosPolicy()
-        : Parameter_t(PID_OWNERSHIP, PARAMETER_KIND_LENGTH)
-        , QosPolicy(true)
-        , kind(SHARED_OWNERSHIP_QOS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~OwnershipQosPolicy() = default;
-
-    bool operator ==(
-            const OwnershipQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        OwnershipQosPolicy reset = OwnershipQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //!OwnershipQosPolicyKind
-    OwnershipQosPolicyKind kind;
-};
-
-/**
- * Enum DestinationOrderQosPolicyKind, different kinds of destination order for DestinationOrderQosPolicy.
- */
-enum DestinationOrderQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * Indicates that data is ordered based on the reception time at each Subscriber. Since each subscriber may receive
-     * the data at different times there is no guaranteed that the changes will be seen in the same order. Consequently,
-     * it is possible for each subscriber to end up with a different final value for the data.
-     */
-    BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS,
-    /**
-     * Indicates that data is ordered based on a timestamp placed at the source (by the Service or by the application).
-     * In any case this guarantees a consistent final value for the data in all subscribers.
-     */
-    BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS
-};
-
-
-
-/**
- * Controls the criteria used to determine the logical order among changes made by Publisher entities to the same instance of
- * data (i.e., matching Topic and key).
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Immutable Qos Policy
- */
-class DestinationOrderQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DestinationOrderQosPolicy()
-        : Parameter_t(PID_DESTINATION_ORDER, PARAMETER_KIND_LENGTH)
-        , QosPolicy(true)
-        , kind(BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DestinationOrderQosPolicy() = default;
-
-    bool operator ==(
-            const DestinationOrderQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        DestinationOrderQosPolicy reset = DestinationOrderQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //!DestinationOrderQosPolicyKind. <br> By default, BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS.
-    DestinationOrderQosPolicyKind kind;
-};
-
-
-/**
- * Class GenericDataQosPolicy, base class to transmit user data during the discovery phase.
- */
-class GenericDataQosPolicy : public Parameter_t, public QosPolicy,
-    public fastrtps::ResourceLimitedVector<fastrtps::rtps::octet>
-{
-    using ResourceLimitedOctetVector = fastrtps::ResourceLimitedVector<fastrtps::rtps::octet>;
-
-public:
-
-    RTPS_DllAPI GenericDataQosPolicy(
-            ParameterId_t pid)
-        : Parameter_t(pid, 0)
-        , QosPolicy(false)
-        , ResourceLimitedOctetVector()
-    {
-    }
-
-    RTPS_DllAPI GenericDataQosPolicy(
-            ParameterId_t pid,
-            uint16_t in_length)
-        : Parameter_t(pid, in_length)
-        , QosPolicy(false)
-        , ResourceLimitedOctetVector()
-    {
-    }
-
-    /**
-     * Construct from another GenericDataQosPolicy.
-     *
-     * The resulting GenericDataQosPolicy will have the same size limits
-     * as the input attribute
-     *
-     * @param data data to copy in the newly created object
-     */
-    RTPS_DllAPI GenericDataQosPolicy(
-            const GenericDataQosPolicy& data)
-        : Parameter_t(data.Pid, data.length)
-        , QosPolicy(false)
-        , ResourceLimitedOctetVector(data)
-    {
-    }
-
-    /**
-     * Construct from underlying collection type.
-     *
-     * Useful to easy integration on old APIs where a traditional container was used.
-     * The resulting GenericDataQosPolicy will always be unlimited in size
-     *
-     * @param pid Id of the parameter
-     * @param data data to copy in the newly created object
-     */
-    RTPS_DllAPI GenericDataQosPolicy(
-            ParameterId_t pid,
-            const collection_type& data)
-        : Parameter_t(pid, 0)
-        , QosPolicy(false)
-        , ResourceLimitedOctetVector()
-    {
-        assign(data.begin(), data.end());
-        length = (size() + 7) & ~3;
-    }
-
-    virtual RTPS_DllAPI ~GenericDataQosPolicy() = default;
-
-    /**
-     * Copies data from underlying collection type.
-     *
-     * Useful to easy integration on old APIs where a traditional container was used.
-     * The resulting GenericDataQosPolicy will keep the current size limit.
-     * If the input data is larger than the current limit size, the elements exceeding
-     * that maximum will be silently discarded.
-     *
-     * @param b object to be copied
-     * @return reference to the current object.
-     */
-    GenericDataQosPolicy& operator =(
-            const collection_type& b)
-    {
-        if (collection_ != b)
-        {
-            //If the object is size limited, already has max_size() allocated
-            //assign() will always stop copying when reaching max_size()
-            assign(b.begin(), b.end());
-            length = (size() + 7) & ~3;
-            hasChanged = true;
-        }
-        return *this;
-    }
-
-    /**
-     * Copies another GenericDataQosPolicy.
-     *
-     * The resulting GenericDataQosPolicy will have the same size limit
-     * as the input parameter, so all data in the input will be copied.
-     *
-     * @param b object to be copied
-     * @return reference to the current object.
-     */
-    GenericDataQosPolicy& operator =(
-            const GenericDataQosPolicy& b)
-    {
-        QosPolicy::operator =(b);
-        Parameter_t::operator =(b);
-        configuration_ = b.configuration_;
-        collection_.reserve(b.collection_.capacity());
-        collection_.assign(b.collection_.begin(), b.collection_.end());
-        return *this;
-    }
-
-    bool operator ==(
-            const GenericDataQosPolicy& b) const
-    {
-        return collection_ == b.collection_ &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    bool operator ==(
-            const collection_type& b) const
-    {
-        return collection_ == b;
-    }
-
-    /**
-     * Set the maximum size of the user data and reserves memory for that much.
-     * @param size new maximum size of the user data. Zero for unlimited size
-     */
-    void set_max_size (
-            size_t size)
-    {
-        if (size > 0)
-        {
-            configuration_ = fastrtps::ResourceLimitedContainerConfig::fixed_size_configuration(size);
-            collection_.reserve(configuration_.maximum);
-        }
-        else
-        {
-            configuration_ = fastrtps::ResourceLimitedContainerConfig::dynamic_allocation_configuration();
-        }
-    }
-
-    void resize(
-            size_t new_size)
-    {
-        collection_.resize(new_size);
-    }
-
-    /**
-     * @return const reference to the internal raw data.
-     */
-    inline const collection_type& dataVec() const
-    {
-        return collection_;
-    }
-
-    inline void clear() override
-    {
-        ResourceLimitedOctetVector::clear();
-        hasChanged = false;
-    }
-
-    /**
-     * Returns raw data vector.
-     * @return raw data as vector of octets.
-     * */
-    RTPS_DllAPI inline const collection_type& data_vec() const
-    {
-        return collection_;
-    }
-
-    /**
-     * Returns raw data vector.
-     * @return raw data as vector of octets.
-     * */
-    RTPS_DllAPI inline collection_type& data_vec()
-    {
-        return collection_;
-    }
-
-    /**
-     * Sets raw data vector.
-     * @param vec raw data to set.
-     * */
-    RTPS_DllAPI inline void data_vec(
-            const collection_type& vec)
-    {
-        if (collection_ != vec)
-        {
-            assign(vec.begin(), vec.end());
-            length = (size() + 7) & ~3;
-            hasChanged = true;
-        }
-    }
-
-    /**
-     * Returns raw data vector.
-     * @return raw data as vector of octets.
-     * */
-    RTPS_DllAPI inline const collection_type& getValue() const
-    {
-        return collection_;
-    }
-
-    /**
-     * Sets raw data vector.
-     * @param vec raw data to set.
-     * */
-    RTPS_DllAPI inline void setValue(
-            const collection_type& vec)
-    {
-        data_vec(vec);
-    }
-
-};
-
-/**
- * Class TClassName, base template for data qos policies.
- * Data not known by the middleware, but distributed by means of built-in topics.
- * By default, zero-sized sequence.
- * @note Mutable Qos Policy
- */
-#define TEMPLATE_DATA_QOS_POLICY(TClassName, TPid)                                     \
-    class TClassName : public GenericDataQosPolicy                                         \
-    {                                                                                      \
-public:                                                                                \
-                                                                                       \
-        RTPS_DllAPI TClassName()                                                           \
-            : GenericDataQosPolicy(TPid)                                                   \
-        {                                                                                  \
-        }                                                                                  \
-                                                                                       \
-        RTPS_DllAPI TClassName(                                                            \
-            uint16_t in_length)                                                        \
-            : GenericDataQosPolicy(TPid, in_length)                                        \
-        {                                                                                  \
-        }                                                                                  \
-                                                                                       \
-        /** \
-         * Construct from another TClassName. \
-         * \
-         * The resulting TClassName will have the same size limits \
-         * as the input attribute \
-         * \
-         * @param data data to copy in the newly created object \
-         */                                                                            \
-        RTPS_DllAPI TClassName(                                                            \
-            const TClassName &data) = default;                                         \
-                                                                                       \
-        /** \
-         * Construct from underlying collection type. \
-         * \
-         * Useful to easy integration on old APIs where a traditional container was used. \
-         * The resulting TClassName will always be unlimited in size \
-         * \
-         * @param data data to copy in the newly created object \
-         */                                                                            \
-        RTPS_DllAPI TClassName(                                                            \
-            const collection_type &data)                                               \
-            : GenericDataQosPolicy(TPid, data)                                             \
-        {                                                                                  \
-        }                                                                                  \
-                                                                                       \
-        virtual RTPS_DllAPI ~TClassName() = default;                                       \
-                                                                                       \
-        /** \
-         * Copies another TClassName. \
-         * \
-         * The resulting TClassName will have the same size limit \
-         * as the input parameter, so all data in the input will be copied. \
-         * \
-         * @param b object to be copied \
-         * @return reference to the current object. \
-         */                                                                            \
-        TClassName& operator =(                                                            \
-            const TClassName &b) = default;                                            \
-                                                                                       \
-    };
-
-//Variable used to generate the doxygen documentation for this QoS Policies
-#ifdef DOXYGEN_DOCUMENTATION
-/**
- * @brief Class derived from GenericDataQosPolicy
- *
- * The purpose of this QoS is to allow the application to attach additional information to the created
- * Entity objects such that when a remote application discovers their existence it can access that information and
- * use it for its own purposes.
- *
- * One possible use of this QoS is to attach security credentials or some other information that can be used by the
- * remote application to authenticate the source.
- */
-class UserDataQosPolicy : public GenericDataQosPolicy
-{
-};
-/**
- * @brief Class derived from GenericDataQosPolicy
- *
- * The purpose of this QoS is to allow the application to attach additional information to the created Topic
- * such that when a remote application discovers their existence it can examine the information and use it in an
- * application-defined way.
- *
- * In combination with the listeners on the DataReader and DataWriter as well as by means of operations such as
- * ignore_topic,these QoS can assist an application to extend the provided QoS.
- */
-class TopicDataQosPolicy : public GenericDataQosPolicy
-{
-};
-/**
- * @brief Class derived from GenericDataQosPolicy
- *
- * The purpose of this QoS is to allow the application to attach additional information to the created
- * Publisher or Subscriber. The value of the GROUP_DATA is available to the application on the DataReader and
- * DataWriter entities and is propagated by means of the built-in topics.
- *
- * This QoS can be used by an application combination with the DataReaderListener and DataWriterListener to
- * implement matching policies similar to those of the PARTITION QoS except the decision can be made based on an
- * application-defined policy.
- */
-class GroupDataQosPolicy : public GenericDataQosPolicy
-{
-};
-#endif
-
-TEMPLATE_DATA_QOS_POLICY(UserDataQosPolicy, PID_USER_DATA)
-TEMPLATE_DATA_QOS_POLICY(TopicDataQosPolicy, PID_TOPIC_DATA)
-TEMPLATE_DATA_QOS_POLICY(GroupDataQosPolicy, PID_GROUP_DATA)
-
-/**
- * Filter that allows a DataReader to specify that it is interested only in (potentially) a subset of the values of the data.
- * The filter states that the DataReader does not want to receive more than one value each minimum_separation, regardless
- * of how fast the changes occur. It is inconsistent for a DataReader to have a minimum_separation longer than its
- * Deadline period.
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Mutable Qos Policy
- */
-class TimeBasedFilterQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TimeBasedFilterQosPolicy()
-        : Parameter_t(PID_TIME_BASED_FILTER, PARAMETER_TIME_LENGTH)
-        , QosPolicy(false)
-        , minimum_separation(0, 0)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TimeBasedFilterQosPolicy() = default;
-
-    bool operator ==(
-            const TimeBasedFilterQosPolicy& b) const
-    {
-        return (this->minimum_separation == b.minimum_separation) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        TimeBasedFilterQosPolicy reset = TimeBasedFilterQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //! Minimum interval between samples. By default, c_TimeZero (the DataReader is interested in all values)
-    fastrtps::Duration_t minimum_separation;
-};
-
-/**
- * Enum PresentationQosPolicyAccessScopeKind, different kinds of Presentation Policy order for PresentationQosPolicy.
- */
-enum PresentationQosPolicyAccessScopeKind : fastrtps::rtps::octet
-{
-    /**
-     * Scope spans only a single instance. Indicates that changes to one instance need not be coherent nor ordered with
-     * respect to changes to any other instance. In other words, order and coherent changes apply to each instance
-     * separately.
-     */
-    INSTANCE_PRESENTATION_QOS,
-    /**
-     * Scope spans to all instances within the same DataWriter (or DataReader), but not across instances in different
-     * DataWriter (or DataReader).
-     */
-    TOPIC_PRESENTATION_QOS,
-    /**
-     * Scope spans to all instances belonging to DataWriter (or DataReader) entities within the same Publisher (or Subscriber).
-     */
-    GROUP_PRESENTATION_QOS
-};
-
-#define PARAMETER_PRESENTATION_LENGTH 8
-
-/**
- * Specifies how the samples representing changes to data instances are presented to the subscribing application.
- * This policy affects the application’s ability to specify and receive coherent changes and to see the relative
- * order of changes.access_scope determines the largest scope spanning the entities for which the order and coherency
- * of changes can be preserved. The two booleans control whether coherent access and ordered access are supported within
- * the scope access_scope.
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Immutable Qos Policy
- */
-class PresentationQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor without parameters
-     */
-    RTPS_DllAPI PresentationQosPolicy()
-        : Parameter_t(PID_PRESENTATION, PARAMETER_PRESENTATION_LENGTH)
-        , QosPolicy(false)
-        , access_scope(INSTANCE_PRESENTATION_QOS)
-        , coherent_access(false)
-        , ordered_access(false)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~PresentationQosPolicy() = default;
-
-    bool operator ==(
-            const PresentationQosPolicy& b) const
-    {
-        return (this->access_scope == b.access_scope) &&
-               (this->coherent_access == b.coherent_access) &&
-               (this->ordered_access == b.ordered_access) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        PresentationQosPolicy reset = PresentationQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //!Access Scope Kind <br> By default, INSTANCE_PRESENTATION_QOS.
-    PresentationQosPolicyAccessScopeKind access_scope;
-    /**
-     * @brief Specifies support coherent access. That is, the ability to group a set of changes as a unit
-     * on the publishing end such that they are received as a unit at the subscribing end.
-     * by default, false.
-     */
-    bool coherent_access;
-    /**
-     * @brief Specifies support for ordered access to the samples received at the subscription end. That is,
-     * the ability of the subscriber to see changes in the same order as they occurred on the publishing end.
-     * By default, false.
-     */
-    bool ordered_access;
-};
-
-
-class Partition_t
-{
-
-    friend class PartitionQosPolicy;
-
-private:
-
-    const char* partition_;
-
-private:
-
-    Partition_t()
-    {
-        partition_ = nullptr;
-    }
-
-public:
-
-    /**
-     * @brief Constructor using a pointer
-     * @param ptr Pointer to be set
-     */
-    explicit Partition_t(
-            const void* ptr)
-    {
-        partition_ = (char*)ptr;
-    }
-
-    bool operator ==(
-            const Partition_t& rhs) const
-    {
-        return (size() == rhs.size() &&
-               (size() == 0 || strcmp(partition_ + 4, rhs.partition_ + 4)));
-    }
-
-    bool operator !=(
-            const Partition_t& rhs) const
-    {
-        return !(*this == rhs);
-    }
-
-    /**
-     * @brief Getter for the size
-     * @return uint32_t with the size
-     */
-    uint32_t size() const
-    {
-        return *(uint32_t*)partition_;
-    }
-
-    /**
-     * @brief Getter for the partition name
-     * @return name
-     */
-    const char* name() const
-    {
-        return partition_ + 4;
-    }
-
-};
-
-/**
- * Set of strings that introduces a logical partition among the topics visible by the Publisher and Subscriber.
- * A DataWriter within a Publisher only communicates with a DataReader in a Subscriber if (in addition to matching the
- * Topic and having compatible QoS) the Publisher and Subscriber have a common partition name string.
- *
- * The empty string ("") is considered a valid partition that is matched with other partition names using the same rules of
- * string matching and regular-expression matching used for any other partition name.
- * @note Mutable Qos Policy
- */
-class PartitionQosPolicy : public Parameter_t, public QosPolicy
-{
-    friend class fastrtps::rtps::EDP;
-
-public:
-
-    class const_iterator
-    {
-public:
-
-        typedef const_iterator self_type;
-        typedef const Partition_t value_type;
-        typedef const Partition_t reference;
-        typedef const Partition_t* pointer;
-        typedef size_t difference_type;
-        typedef std::forward_iterator_tag iterator_category;
-
-        /**
-         * @brief Constructor using a pointer
-         * @param ptr Pointer to be set
-         */
-        const_iterator(
-                const fastrtps::rtps::octet* ptr)
-            : ptr_(ptr)
-            , value_ (ptr_)
-        {
-        }
-
-        self_type operator ++()
-        {
-            self_type tmp = *this;
-            advance();
-            return tmp;
-        }
-
-        self_type operator ++(
-                int)
-        {
-            advance();
-            return *this;
-        }
-
-        reference operator *()
-        {
-            return value_;
-        }
-
-        pointer operator ->()
-        {
-            return &value_;
-        }
-
-        bool operator ==(
-                const self_type& rhs)
-        {
-            return ptr_ == rhs.ptr_;
-        }
-
-        bool operator !=(
-                const self_type& rhs)
-        {
-            return ptr_ != rhs.ptr_;
-        }
-
-protected:
-
-        /**
-         * @brief Shift the pointer to the next element
-         */
-        void advance()
-        {
-            //Size of the element (with alignment)
-            uint32_t size = *(uint32_t*)ptr_;
-            ptr_ += (4 + ((size + 3) & ~3));
-            value_ = Partition_t(ptr_);
-        }
-
-private:
-
-        //!Pointer
-        const fastrtps::rtps::octet* ptr_;
-        //!Partition
-        Partition_t value_;
-
-    };
-
-public:
-
-    /**
-     * @brief Constructor without parameters
-     */
-    RTPS_DllAPI PartitionQosPolicy()
-        : Parameter_t(PID_PARTITION, 0)
-        , QosPolicy(false)
-        , max_size_ (0)
-        , Npartitions_ (0)
-    {
-    }
-
-    /**
-     * @brief Constructor using Parameter length
-     * @param in_length Length of the parameter
-     */
-    RTPS_DllAPI PartitionQosPolicy(
-            uint16_t in_length)
-        : Parameter_t(PID_PARTITION, in_length)
-        , QosPolicy(false)
-        , max_size_ (in_length)
-        , partitions_(in_length)
-        , Npartitions_ (0)
-    {
-    }
-
-    /**
-     * @brief Copy constructor
-     * @param b Another PartitionQosPolicy instance
-     */
-    RTPS_DllAPI PartitionQosPolicy(
-            const PartitionQosPolicy& b)
-        : Parameter_t(b)
-        , QosPolicy(b)
-        , max_size_ (b.max_size_)
-        , partitions_(b.max_size_ != 0 ?
-                b.partitions_.max_size :
-                b.partitions_.length)
-        , Npartitions_ (b.Npartitions_)
-    {
-        partitions_.copy(&b.partitions_, b.max_size_ != 0);
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~PartitionQosPolicy() = default;
-
-    bool operator ==(
-            const PartitionQosPolicy& b) const
-    {
-        return (this->max_size_ == b.max_size_) &&
-               (this->Npartitions_ == b.Npartitions_) &&
-               (this->partitions_ == b.partitions_) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    PartitionQosPolicy& operator =(
-            const PartitionQosPolicy& b)
-    {
-        QosPolicy::operator =(b);
-        Parameter_t::operator =(b);
-        max_size_ = b.max_size_;
-        partitions_.reserve(max_size_ != 0 ?
-                b.partitions_.max_size :
-                b.partitions_.length);
-        partitions_.copy(&b.partitions_, b.max_size_ != 0);
-        Npartitions_ = b.Npartitions_;
-
-        return *this;
-    }
-
-    /**
-     * @brief Getter for the first position of the partition list
-     * @return const_iterator
-     */
-    const_iterator begin() const
-    {
-        return const_iterator(partitions_.data);
-    }
-
-    /**
-     * @brief Getter for the end of the partition list
-     * @return const_iterator
-     */
-    const_iterator end() const
-    {
-        return const_iterator(partitions_.data + partitions_.length);
-    }
-
-    /**
-     * @brief Getter for the number of partitions
-     * @return uint32_t with the size
-     */
-    uint32_t size() const
-    {
-        return Npartitions_;
-    }
-
-    /**
-     * @brief Check if the set is empty
-     * @return true if it is empty, false otherwise
-     */
-    uint32_t empty() const
-    {
-        return Npartitions_ == 0;
-    }
-
-    /**
-     * @brief Setter for the maximum size
-     * @param size Size to be set
-     */
-    void set_max_size (
-            uint32_t size)
-    {
-        partitions_.reserve(size);
-        max_size_ = size;
-    }
-
-    /**
-     * @brief Getter for the maximum size
-     * @return uint32_t with the maximum size
-     */
-    uint32_t max_size () const
-    {
-        return max_size_;
-    }
-
-    /**
-     * Appends a name to the list of partition names.
-     * @param name Name to append.
-     */
-    RTPS_DllAPI inline void push_back(
-            const char* name)
-    {
-        //Realloc if needed;
-        uint32_t size = (uint32_t)strlen(name) + 1;
-        uint32_t alignment = ((size + 3) & ~3) - size;
-
-        if (max_size_ != 0 && (partitions_.max_size < partitions_.length +
-                size + alignment + 4))
-        {
-            return;
-        }
-
-        partitions_.reserve(partitions_.length + size + alignment + 4);
-
-        fastrtps::rtps::octet* o = (fastrtps::rtps::octet*)&size;
-        memcpy(partitions_.data + partitions_.length, o, 4);
-        partitions_.length += 4;
-
-        memcpy(partitions_.data + partitions_.length, name, size);
-        partitions_.length += size;
-
-        memset(partitions_.data + partitions_.length, 0, alignment);
-        partitions_.length += alignment;
-
-        ++Npartitions_;
-        hasChanged = true;
-    }
-
-    /**
-     * Clears list of partition names
-     */
-    RTPS_DllAPI inline void clear() override
-    {
-        partitions_.length = 0;
-        Npartitions_ = 0;
-        hasChanged = false;
-    }
-
-    /**
-     * Returns partition names.
-     * @return Vector of partition name strings.
-     */
-    RTPS_DllAPI inline const std::vector<std::string> getNames() const
-    {
-        return names();
-    }
-
-    /**
-     * Overrides partition names
-     * @param nam Vector of partition name strings.
-     */
-    RTPS_DllAPI inline void setNames(
-            std::vector<std::string>& nam)
-    {
-        names(nam);
-    }
-
-    /**
-     * Returns partition names.
-     * @return Vector of partition name strings.
-     */
-    RTPS_DllAPI inline const std::vector<std::string> names() const
-    {
-        std::vector<std::string> names;
-        if (Npartitions_ > 0)
-        {
-            for (auto it = begin(); it != end(); ++it)
-            {
-                names.push_back(it->name());
-            }
-        }
-        return names;
-    }
-
-    /**
-     * Overrides partition names
-     * @param nam Vector of partition name strings.
-     */
-    RTPS_DllAPI inline void names(
-            std::vector<std::string>& nam)
-    {
-        clear();
-        for (auto it = nam.begin(); it != nam.end(); ++it)
-        {
-            push_back(it->c_str());
-        }
-        hasChanged = true;
-    }
-
-private:
-
-    //! Maximum size <br> By default, 0.
-    uint32_t max_size_;
-    //! Partitions
-    fastrtps::rtps::SerializedPayload_t partitions_;
-    //! Number of partitions. <br> By default, 0.
-    uint32_t Npartitions_;
-};
-
-/**
- * Enum HistoryQosPolicyKind, different kinds of History Qos for HistoryQosPolicy.
- */
-enum HistoryQosPolicyKind : fastrtps::rtps::octet
-{
-    /**
-     * On the publishing side, the Service will only attempt to keep the most recent “depth” samples of each instance
-     * of data (identified by its key) managed by the DataWriter. On the subscribing side, the DataReader will only attempt
-     * to keep the most recent “depth” samples received for each instance (identified by its key) until the application
-     * “takes” them via the DataReader’s take operation.
-     */
-    KEEP_LAST_HISTORY_QOS,
-    /**
-     * On the publishing side, the Service will attempt to keep all samples (representing each value written) of each
-     * instance of data (identified by its key) managed by the DataWriter until they can be delivered to all subscribers.
-     * On the subscribing side, the Service will attempt to keep all samples of each instance of data (identified by its
-     * key) managed by the DataReader. These samples are kept until the application “takes” them from the Service via the
-     * take operation.
-     */
-    KEEP_ALL_HISTORY_QOS
-};
-
-/**
- * Specifies the behavior of the Service in the case where the value of a sample changes (one or more times) before it
- * can be successfully communicated to one or more existing subscribers. This QoS policy controls whether the Service
- * should deliver only the most recent value, attempt to deliver all intermediate values, or do something in between.
- * On the publishing side this policy controls the samples that should be maintained by the DataWriter on behalf of
- * existing DataReader entities. The behavior with regards to a DataReaderentities discovered after a sample is written
- * is controlled by the DURABILITY QoS policy. On the subscribing side it controls the samples that should be maintained
- * until the application “takes” them from the Service.
- * @note Immutable Qos Policy
- */
-class HistoryQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI HistoryQosPolicy()
-        : Parameter_t(PID_HISTORY, PARAMETER_KIND_LENGTH + 4)
-        , QosPolicy(true)
-        , kind(KEEP_LAST_HISTORY_QOS)
-        , depth(1)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~HistoryQosPolicy() = default;
-
-    bool operator ==(
-            const HistoryQosPolicy& b) const
-    {
-        return (this->kind == b.kind) &&
-               (this->depth == b.depth) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        HistoryQosPolicy reset = HistoryQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //!HistoryQosPolicyKind. <br> By default, KEEP_LAST_HISTORY_QOS.
-    HistoryQosPolicyKind kind;
-    //!History depth. <br> By default, 1. If a value other than 1 is specified, it should
-    //! be consistent with the settings of the ResourceLimitsQosPolicy.
-    //! @warning Only takes effect if the kind is KEEP_LAST_HISTORY_QOS.
-    int32_t depth;
-};
-
-/**
- * Specifies the resources that the Service can consume in order to meet the requested QoS
- * @note Immutable Qos Policy
- */
-class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Specifies the maximum number of data-samples the DataWriter (or DataReader) can manage across all the
-     * instances associated with it. Represents the maximum samples the middleware can store for any one DataWriter
-     * (or DataReader). <br>
-     * By default, 5000.
-     * @warning It is inconsistent for this value to be less than max_samples_per_instance.
-     */
-    int32_t max_samples;
-    /**
-     * @brief Represents the maximum number of instances DataWriter (or DataReader) can manage. <br>
-     * By default, 10.
-     */
-    int32_t max_instances;
-    /**
-     * @brief Represents the maximum number of samples of any one instance a DataWriter(or DataReader) can manage. <br>
-     * By default, 400.
-     * @warning It is inconsistent for this value to be greater than max_samples.
-     */
-    int32_t max_samples_per_instance;
-    /**
-     * @brief Number of samples currently allocated. <br>
-     * By default, 100.
-     */
-    int32_t allocated_samples;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI ResourceLimitsQosPolicy()
-        : Parameter_t(PID_RESOURCE_LIMITS, 4 + 4 + 4)
-        , QosPolicy(false)
-        , max_samples(5000)
-        , max_instances(10)
-        , max_samples_per_instance(400)
-        , allocated_samples(100)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~ResourceLimitsQosPolicy() = default;
-
-    bool operator ==(
-            const ResourceLimitsQosPolicy& b) const
-    {
-        return (this->max_samples == b.max_samples) &&
-               (this->max_instances == b.max_instances) &&
-               (this->max_samples_per_instance == b.max_samples_per_instance) &&
-               (this->allocated_samples == b.allocated_samples) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        ResourceLimitsQosPolicy reset = ResourceLimitsQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-
-
-/**
- * Specifies the configuration of the durability service. That is, the service that implements the DurabilityQosPolicy kind
- * of TRANSIENT and PERSISTENT.
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Immutable Qos Policy
- */
-class DurabilityServiceQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DurabilityServiceQosPolicy()
-        : Parameter_t(PID_DURABILITY_SERVICE, PARAMETER_TIME_LENGTH + PARAMETER_KIND_LENGTH + 4 + 4 + 4 + 4)
-        , QosPolicy(false)
-        , history_kind(KEEP_LAST_HISTORY_QOS)
-        , history_depth(1)
-        , max_samples(-1)
-        , max_instances(-1)
-        , max_samples_per_instance(-1)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DurabilityServiceQosPolicy() = default;
-
-    bool operator ==(
-            const DurabilityServiceQosPolicy& b) const
-    {
-        return (this->history_kind == b.history_kind) &&
-               (this->history_depth == b.history_depth) &&
-               (this->max_samples == b.max_samples) &&
-               (this->max_instances == b.max_instances) &&
-               (this->max_samples_per_instance == b.max_samples_per_instance) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        DurabilityServiceQosPolicy reset = DurabilityServiceQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    /**
-     * @brief Control when the service is able to remove all information regarding a data-instance. <br>
-     * By default, c_TimeZero.
-     */
-    fastrtps::Duration_t service_cleanup_delay;
-    /**
-     * @brief Controls the HistoryQosPolicy of the fictitious DataReader that stores the data within the durability service.
-     * <br>
-     * By default, KEEP_LAST_HISTORY_QOS.
-     */
-    HistoryQosPolicyKind history_kind;
-    /**
-     * @brief Number of most recent values that should be maintained on the History. It only have effect if the history_kind
-     * is KEEP_LAST_HISTORY_QOS. <br>
-     * By default, 1.
-     */
-    int32_t history_depth;
-    /**
-     * @brief Control the ResourceLimitsQos of the implied DataReader that stores the data within the durability service.
-     * Specifies the maximum number of data-samples the DataWriter (or DataReader) can manage across all the instances
-     * associated with it. Represents the maximum samples the middleware can store for any one DataWriter (or DataReader).
-     * It is inconsistent for this value to be less than max_samples_per_instance. <br>
-     * By default, -1 (Length Unlimited).
-     */
-    int32_t max_samples;
-    /**
-     * @brief Control the ResourceLimitsQos of the implied DataReader that stores the data within the durability service.
-     * Represents the maximum number of instances DataWriter (or DataReader) can manage. <br>
-     * By default, -1 (Length Unlimited).
-     */
-    int32_t max_instances;
-    /**
-     * @brief Control the ResourceLimitsQos of the implied DataReader that stores the data within the durability service.
-     * Represents the maximum number of samples of any one instance a DataWriter(or DataReader) can manage.
-     * It is inconsistent for this value to be greater than max_samples. <br>
-     * By default, -1 (Length Unlimited).
-     */
-    int32_t max_samples_per_instance;
-};
-
-/**
- * Specifies the maximum duration of validity of the data written by the DataWriter.
- * @note Mutable Qos Policy
- */
-class LifespanQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI LifespanQosPolicy()
-        : Parameter_t(PID_LIFESPAN, PARAMETER_TIME_LENGTH)
-        , QosPolicy(true)
-        , duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~LifespanQosPolicy() = default;
-
-    bool operator ==(
-            const LifespanQosPolicy& b) const
-    {
-        return (this->duration == b.duration) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        LifespanQosPolicy reset = LifespanQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //! Period of validity. <br> By default, c_TimeInfinite.
-    fastrtps::Duration_t duration;
-};
-
-/**
- * Specifies the value of the “strength” used to arbitrate among multiple DataWriter objects that attempt to modify the same
- * instance of a data-object (identified by Topic + key).This policy only applies if the OWNERSHIP QoS policy is of kind
- * EXCLUSIVE.
- * @note Mutable Qos Policy
- */
-class OwnershipStrengthQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI OwnershipStrengthQosPolicy()
-        : Parameter_t(PID_OWNERSHIP_STRENGTH, 4)
-        , QosPolicy(false)
-        , value(0)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~OwnershipStrengthQosPolicy() = default;
-
-    bool operator ==(
-            const OwnershipStrengthQosPolicy& b) const
-    {
-        return (this->value == b.value) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        OwnershipStrengthQosPolicy reset = OwnershipStrengthQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //! Strength <br> By default, 0.
-    uint32_t value;
-};
-
-
-/**
- * This policy is a hint to the infrastructure as to how to set the priority of the underlying transport used to send the data.
- * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version.
- * @note Mutable Qos Policy
- */
-class TransportPriorityQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!Priority <br> By default, 0.
-    uint32_t value;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TransportPriorityQosPolicy()
-        : Parameter_t(PID_TRANSPORT_PRIORITY, 4)
-        , QosPolicy(false)
-        , value(0)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TransportPriorityQosPolicy() = default;
-
-    bool operator ==(
-            const TransportPriorityQosPolicy& b) const
-    {
-        return (this->value == b.value) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        TransportPriorityQosPolicy reset = TransportPriorityQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-/**
- * Enum PublishModeQosPolicyKind, different kinds of publication synchronism
- */
-typedef enum PublishModeQosPolicyKind : fastrtps::rtps::octet
-{
-    SYNCHRONOUS_PUBLISH_MODE,    //!< Synchronous publication mode (default for writers).
-    ASYNCHRONOUS_PUBLISH_MODE    //!< Asynchronous publication mode.
-} PublishModeQosPolicyKind_t;
-
-/**
- * Class PublishModeQosPolicy, defines the publication mode for a specific writer.
- */
-class PublishModeQosPolicy : public QosPolicy
-{
-public:
-
-    //!PublishModeQosPolicyKind <br> By default, SYNCHRONOUS_PUBLISH_MODE.
-    PublishModeQosPolicyKind kind;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI PublishModeQosPolicy()
-        : kind(SYNCHRONOUS_PUBLISH_MODE)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~PublishModeQosPolicy() = default;
-
-    inline void clear() override
-    {
-        PublishModeQosPolicy reset = PublishModeQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-/**
- * Enum DataRepresentationId, different kinds of topic data representation
- */
-typedef enum DataRepresentationId : int16_t
-{
-    XCDR_DATA_REPRESENTATION = 0,   //!< Extended CDR Encoding version 1
-    XML_DATA_REPRESENTATION = 1,    //!< XML Data Representation (Unsupported)
-    XCDR2_DATA_REPRESENTATION = 2    //!< Extended CDR Encoding version 2
-} DataRepresentationId_t;
-
-/**
- * With multiple standard data Representations available, and vendor-specific extensions possible, DataWriters and
- * DataReaders must be able to negotiate which data representation(s) to use. This negotiation shall occur based on
- * DataRepresentationQosPolicy.
- * @warning If a writer’s offered representation is contained within a reader’s sequence, the offer satisfies the
- * request and the policies are compatible. Otherwise, they are incompatible.
- * @note Immutable Qos Policy
- */
-class DataRepresentationQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!List of DataRepresentationId. <br> By default, empty list.
-    std::vector<DataRepresentationId_t> m_value;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DataRepresentationQosPolicy()
-        : Parameter_t(PID_DATA_REPRESENTATION, 0)
-        , QosPolicy(true)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DataRepresentationQosPolicy() override = default;
-
-    /**
-     * Compares the given policy to check if it's equal.
-     * @param b QoS Policy.
-     * @return True if the policy is equal.
-     */
-    bool operator ==(
-            const DataRepresentationQosPolicy& b) const
-    {
-        return (this->m_value == b.m_value) &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        DataRepresentationQosPolicy reset = DataRepresentationQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-enum TypeConsistencyKind : uint16_t
-{
-    /**
-     * The DataWriter and the DataReader must support the same data type in order for them to communicate.
-     */
-    DISALLOW_TYPE_COERCION,
-    /**
-     * The DataWriter and the DataReader need not support the same data type in order for them to communicate as long as
-     * the reader’s type is assignable from the writer’s type.
-     */
-    ALLOW_TYPE_COERCION
-};
-
-/**
- * The TypeConsistencyEnforcementQosPolicy defines the rules for determining whether the type used to publish a given data
- * stream is consistent with that used to subscribe to it. It applies to DataReaders.
- * @note Immutable Qos Policy
- */
-class TypeConsistencyEnforcementQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!TypeConsistencyKind. <br> By default, ALLOW_TYPE_COERCION.
-    TypeConsistencyKind m_kind;
-    /**
-     * @brief This option controls whether sequence bounds are taken into consideration for type assignability. If the
-     * option is set to TRUE, sequence bounds (maximum lengths) are not considered as part of the type assignability.
-     * This means that a T2 sequence type with maximum length L2 would be assignable to a T1 sequence type with maximum
-     * length L1, even if L2 is greater than L1. If the option is set to false, then sequence bounds are taken into
-     * consideration for type assignability and in order for T1 to be assignable from T2 it is required that L1>= L2. <br>
-     * By default, true.
-     */
-    bool m_ignore_sequence_bounds;
-    /**
-     * @brief This option controls whether string bounds are taken into consideration for type assignability. If the option
-     *  is set to TRUE, string bounds (maximum lengths) are not considered as part of the type assignability. This means
-     * that a T2 string type with maximum length L2 would be assignable to a T1 string type with maximum length L1, even
-     * if L2 is greater than L1. If the option is set to false, then string bounds are taken into consideration for type
-     * assignability and in order for T1 to be assignable from T2 it is required that L1>= L2. <br>
-     * By default, true.
-     */
-    bool m_ignore_string_bounds;
-    /**
-     * @brief This option controls whether member names are taken into consideration for type assignability. If the option
-     * is set to TRUE, member names are considered as part of assignability in addition to member IDs (so that members with
-     * the same ID also have the same name). If the option is set to FALSE, then member names are not ignored. <br>
-     * By default, false.
-     */
-    bool m_ignore_member_names;
-    /**
-     * @brief This option controls whether type widening is allowed. If the option is set to FALSE, type widening is
-     * permitted. If the option is set to TRUE,it shall cause a wider type to not be assignable to a narrower type. <br>
-     * By default, false.
-     */
-    bool m_prevent_type_widening;
-    /**
-     * @brief This option requires type information to be available in order to complete matching between a DataWriter and
-     * DataReader when set to TRUE, otherwise matching can occur without complete type information when set to FALSE. <br>
-     * By default, false.
-     */
-    bool m_force_type_validation;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TypeConsistencyEnforcementQosPolicy()
-        : Parameter_t(PID_TYPE_CONSISTENCY_ENFORCEMENT, 8) // 2 + 5 + 1 alignment byte
-        , QosPolicy(true)
-    {
-        m_kind = ALLOW_TYPE_COERCION;
-        m_ignore_sequence_bounds = true;
-        m_ignore_string_bounds = true;
-        m_ignore_member_names = false;
-        m_prevent_type_widening = false;
-        m_force_type_validation = false;
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TypeConsistencyEnforcementQosPolicy() override = default;
-
-    bool operator ==(
-            const TypeConsistencyEnforcementQosPolicy& b) const
-    {
-        return m_kind == b.m_kind &&
-               m_ignore_sequence_bounds == b.m_ignore_sequence_bounds &&
-               m_ignore_string_bounds == b.m_ignore_string_bounds &&
-               m_ignore_member_names == b.m_ignore_member_names &&
-               m_prevent_type_widening == b.m_prevent_type_widening &&
-               m_force_type_validation == b.m_force_type_validation &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        TypeConsistencyEnforcementQosPolicy reset = TypeConsistencyEnforcementQosPolicy();
-        std::swap(*this, reset);
-    }
-
-};
-
-/**
- * Class DisablePositiveACKsQosPolicy to disable sending of positive ACKs
- * @note Immutable Qos Policy
- */
-class DisablePositiveACKsQosPolicy : public Parameter_t, public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DisablePositiveACKsQosPolicy()
-        : Parameter_t(PID_DISABLE_POSITIVE_ACKS, PARAMETER_BOOL_LENGTH)
-        , QosPolicy(true)
-        , enabled(false)
-        , duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~DisablePositiveACKsQosPolicy() = default;
-
-    bool operator ==(
-            const DisablePositiveACKsQosPolicy& b) const
-    {
-        return enabled == b.enabled &&
-               Parameter_t::operator ==(b) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        DisablePositiveACKsQosPolicy reset = DisablePositiveACKsQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    //! True if this QoS is enabled. <br> By default, false
-    bool enabled;
-    //! The duration to keep samples for (not serialized as not needed by reader). <br> By default, c_TimeInfinite
-    fastrtps::Duration_t duration;
-};
-
-/**
- * Class TypeIdV1
- */
-class TypeIdV1 : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!Type Identifier
-    fastrtps::types::TypeIdentifier m_type_identifier;
-
-
-    /**
-     * @brief Constructor without parameters
-     */
-    RTPS_DllAPI TypeIdV1()
-        : Parameter_t(PID_TYPE_IDV1, 0)
-        , QosPolicy(false)
-        , m_type_identifier()
-    {
-    }
-
-    /**
-     * @brief Copy constructor
-     * @param type Another instance of TypeIdV1
-     */
-    RTPS_DllAPI TypeIdV1(
-            const TypeIdV1& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , m_type_identifier(type.m_type_identifier)
-    {
-    }
-
-    /**
-     * @brief Constructor using a TypeIndentifier
-     * @param identifier TypeIdentifier to be set
-     */
-    RTPS_DllAPI TypeIdV1(
-            const fastrtps::types::TypeIdentifier& identifier)
-        : Parameter_t(PID_TYPE_IDV1, 0)
-        , QosPolicy(false)
-        , m_type_identifier(identifier)
-    {
-    }
-
-    /**
-     * @brief Move constructor
-     * @param type Another instance of TypeIdV1
-     */
-    RTPS_DllAPI TypeIdV1(
-            TypeIdV1&& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , m_type_identifier(std::move(type.m_type_identifier))
-    {
-    }
-
-    RTPS_DllAPI TypeIdV1& operator =(
-            const TypeIdV1& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        m_type_identifier = type.m_type_identifier;
-
-        return *this;
-    }
-
-    RTPS_DllAPI TypeIdV1& operator =(
-            TypeIdV1&& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        m_type_identifier = std::move(type.m_type_identifier);
-
-        return *this;
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TypeIdV1() override = default;
-
-    inline void clear() override
-    {
-        *this = TypeIdV1();
-    }
-
-    RTPS_DllAPI TypeIdV1& operator =(
-            const fastrtps::types::TypeIdentifier& type_id)
-    {
-        m_type_identifier = type_id;
-        return *this;
-    }
-
-    /**
-     * @brief Getter for the TypeIndentifier
-     * @return TypeIdentifier reference
-     */
-    RTPS_DllAPI const fastrtps::types::TypeIdentifier& get() const
-    {
-        return m_type_identifier;
-    }
-
-};
-
-/**
- * Class TypeObjectV1
- */
-class TypeObjectV1 : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!Type Object
-    fastrtps::types::TypeObject m_type_object;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TypeObjectV1()
-        : Parameter_t(PID_TYPE_OBJECTV1, 0)
-        , QosPolicy(false)
-        , m_type_object()
-    {
-    }
-
-    /**
-     * @brief Copy constructor
-     * @param type Another instance of TypeObjectV1
-     */
-    RTPS_DllAPI TypeObjectV1(
-            const TypeObjectV1& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , m_type_object(type.m_type_object)
-    {
-    }
-
-    /**
-     * @brief Constructor using a TypeObject
-     * @param type TypeObject to be set
-     */
-    RTPS_DllAPI TypeObjectV1(
-            const fastrtps::types::TypeObject& type)
-        : Parameter_t(PID_TYPE_OBJECTV1, 0)
-        , QosPolicy(false)
-        , m_type_object(type)
-    {
-    }
-
-    /**
-     * @brief Move constructor
-     * @param type Another instance of TypeObjectV1
-     */
-    RTPS_DllAPI TypeObjectV1(
-            TypeObjectV1&& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , m_type_object(std::move(type.m_type_object))
-    {
-    }
-
-    RTPS_DllAPI TypeObjectV1& operator =(
-            const TypeObjectV1& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        m_type_object = type.m_type_object;
-
-        return *this;
-    }
-
-    RTPS_DllAPI TypeObjectV1& operator =(
-            TypeObjectV1&& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        m_type_object = std::move(type.m_type_object);
-
-        return *this;
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TypeObjectV1() override = default;
-
-    inline void clear() override
-    {
-        *this = TypeObjectV1();
-    }
-
-    RTPS_DllAPI TypeObjectV1& operator =(
-            const fastrtps::types::TypeObject& type_object)
-    {
-        m_type_object = type_object;
-        return *this;
-    }
-
-    /**
-     * @brief Getter for the TypeObject
-     * @return TypeObject reference
-     */
-    RTPS_DllAPI const fastrtps::types::TypeObject& get() const
-    {
-        return m_type_object;
-    }
-
-};
-
-namespace xtypes {
-
-/**
- * Class xtypes::TypeInformation
- */
-class TypeInformation : public Parameter_t, public QosPolicy
-{
-public:
-
-    //!Type Information
-    fastrtps::types::TypeInformation type_information;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TypeInformation()
-        : Parameter_t(PID_TYPE_INFORMATION, 0)
-        , QosPolicy(false)
-        , type_information()
-        , assigned_(false)
-    {
-    }
-
-    /**
-     * @brief Copy constructor
-     * @param type Another instance of TypeInformation
-     */
-    RTPS_DllAPI TypeInformation(
-            const TypeInformation& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , type_information(type.type_information)
-        , assigned_(type.assigned_)
-    {
-    }
-
-    /**
-     * @brief Constructor using a fastrtps::types::TypeInformation
-     * @param info fastrtps::types::TypeInformation to be set
-     */
-    RTPS_DllAPI TypeInformation(
-            const fastrtps::types::TypeInformation& info)
-        : Parameter_t(PID_TYPE_INFORMATION, 0)
-        , QosPolicy(false)
-        , type_information(info)
-        , assigned_(true)
-    {
-    }
-
-    /**
-     * @brief Move Constructor
-     * @param type Another instance of TypeInformation
-     */
-    RTPS_DllAPI TypeInformation(
-            TypeInformation&& type)
-        : Parameter_t(type.Pid, type.length)
-        , QosPolicy(type.send_always_)
-        , type_information(std::move(type.type_information))
-        , assigned_(type.assigned_)
-    {
-    }
-
-    RTPS_DllAPI TypeInformation& operator =(
-            const TypeInformation& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        type_information = type.type_information;
-        assigned_ = type.assigned_;
-
-        return *this;
-    }
-
-    RTPS_DllAPI TypeInformation& operator =(
-            TypeInformation&& type)
-    {
-        Pid = type.Pid;
-        length = type.length;
-        send_always_ = type.send_always_;
-
-        type_information = std::move(type.type_information);
-        assigned_ = type.assigned_;
-
-        return *this;
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TypeInformation() override = default;
-
-    inline void clear() override
-    {
-        *this = TypeInformation();
-    }
-
-    /**
-     * @brief Check if it is assigned
-     * @return true if assigned, false if not
-     */
-    RTPS_DllAPI bool assigned() const
-    {
-        return assigned_;
-    }
-
-    /**
-     * @brief Setter for assigned boolean
-     * @param value Boolean to be set
-     */
-    RTPS_DllAPI void assigned(
-            bool value)
-    {
-        assigned_ = value;
-    }
-
-    RTPS_DllAPI TypeInformation& operator =(
-            const fastrtps::types::TypeInformation& type_info)
-    {
-        type_information = type_info;
-        assigned_ = true;
-        return *this;
-    }
-
-private:
-
-    //!Boolean that states if the TypeInformation has been asigned manually or not.
-    bool assigned_;
-};
-
-} // namespace xtypes
-
-//!Holds allocation limits affecting collections managed by a participant.
-using ParticipantResourceLimitsQos = fastrtps::rtps::RTPSParticipantAllocationAttributes;
-
-//! Property policies
-using PropertyPolicyQos = fastrtps::rtps::PropertyPolicy;
-
-//! Qos Policy that configures the wire protocol
-class WireProtocolConfigQos : public QosPolicy
-{
-
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI WireProtocolConfigQos()
-        : QosPolicy(false)
-        , participant_id(-1)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~WireProtocolConfigQos() = default;
-
-    bool operator ==(
-            const WireProtocolConfigQos& b) const
-    {
-        return (this->prefix == b.prefix) &&
-               (this->participant_id == b.participant_id) &&
-               (this->builtin == b.builtin) &&
-               (this->port == b.port) &&
-               (this->throughput_controller == b.throughput_controller) &&
-               (this->default_unicast_locator_list == b.default_unicast_locator_list) &&
-               (this->default_multicast_locator_list == b.default_multicast_locator_list) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        WireProtocolConfigQos reset = WireProtocolConfigQos();
-        std::swap(*this, reset);
-    }
-
-    //! Optionally allows user to define the GuidPrefix_t
-    fastrtps::rtps::GuidPrefix_t prefix;
-
-    //!Participant ID <br> By default, -1.
-    int32_t participant_id;
-
-    //! Builtin parameters.
-    fastrtps::rtps::BuiltinAttributes builtin;
-
-    //!Port Parameters
-    fastrtps::rtps::PortParameters port;
-
-    //!Throughput controller parameters. Leave default for uncontrolled flow.
-    fastrtps::rtps::ThroughputControllerDescriptor throughput_controller;
-
-    /**
-     * Default list of Unicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the case
-     * that it was defined with NO UnicastLocators. At least ONE locator should be included in this list.
-     */
-    fastrtps::rtps::LocatorList_t default_unicast_locator_list;
-
-    /**
-     * Default list of Multicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the
-     * case that it was defined with NO UnicastLocators. This is usually left empty.
-     */
-    fastrtps::rtps::LocatorList_t default_multicast_locator_list;
-};
-
-//! Qos Policy to configure the transport layer
-class TransportConfigQos : public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TransportConfigQos()
-        : QosPolicy(false)
-        , use_builtin_transports(true)
-        , send_socket_buffer_size(0)
-        , listen_socket_buffer_size(0)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TransportConfigQos() = default;
-
-    bool operator ==(
-            const TransportConfigQos& b) const
-    {
-        return (this->user_transports == b.user_transports) &&
-               (this->use_builtin_transports == b.use_builtin_transports) &&
-               (this->send_socket_buffer_size == b.send_socket_buffer_size) &&
-               (this->listen_socket_buffer_size == b.listen_socket_buffer_size) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        TransportConfigQos reset = TransportConfigQos();
-        std::swap(*this, reset);
-    }
-
-    //!User defined transports to use alongside or in place of builtins.
-    std::vector<std::shared_ptr<fastdds::rtps::TransportDescriptorInterface> > user_transports;
-
-    //!Set as false to disable the default UDPv4 implementation. <br> By default, true.
-    bool use_builtin_transports;
-
-    /*!
-     * @brief Send socket buffer size for the send resource. Zero value indicates to use default system buffer size. <br>
-     * By default, 0.
-     */
-    uint32_t send_socket_buffer_size;
-
-    /*! Listen socket buffer for all listen resources. Zero value indicates to use default system buffer size. <br>
-     * By default, 0.
-     */
-    uint32_t listen_socket_buffer_size;
-};
-
-//!Qos Policy to configure the endpoint
-class RTPSEndpointQos
-{
-public:
-
-    RTPS_DllAPI RTPSEndpointQos()
-        : user_defined_id(-1)
-        , entity_id(-1)
-        , history_memory_policy(fastrtps::rtps::PREALLOCATED_MEMORY_MODE)
-    {
-    }
-
-    virtual RTPS_DllAPI ~RTPSEndpointQos() = default;
-
-    bool operator ==(
-            const RTPSEndpointQos& b) const
-    {
-        return (this->unicast_locator_list == b.unicast_locator_list) &&
-               (this->multicast_locator_list == b.multicast_locator_list) &&
-               (this->remote_locator_list == b.remote_locator_list) &&
-               (this->user_defined_id == b.user_defined_id) &&
-               (this->entity_id == b.entity_id) &&
-               (this->history_memory_policy == b.history_memory_policy);
-    }
-
-    //!Unicast locator list
-    fastrtps::rtps::LocatorList_t unicast_locator_list;
-
-    //!Multicast locator list
-    fastrtps::rtps::LocatorList_t multicast_locator_list;
-
-    //!Remote locator list
-    fastrtps::rtps::LocatorList_t remote_locator_list;
-
-    //!User Defined ID, used for StaticEndpointDiscovery. <br> By default, -1.
-    int16_t user_defined_id;
-
-    //!Entity ID, if the user wants to specify the EntityID of the endpoint. <br> By default, -1.
-    int16_t entity_id;
-
-    //!Underlying History memory policy. <br> By default, PREALLOCATED_MEMORY_MODE.
-    fastrtps::rtps::MemoryManagementPolicy_t history_memory_policy;
-};
-
-//!Qos Policy to configure the limit of the writer resources
-class WriterResourceLimitsQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI WriterResourceLimitsQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~WriterResourceLimitsQos() = default;
-
-    bool operator ==(
-            const WriterResourceLimitsQos& b) const
-    {
-        return (this->matched_subscriber_allocation == b.matched_subscriber_allocation);
-    }
-
-    //!Matched subscribers allocation limits.
-    fastrtps::ResourceLimitedContainerConfig matched_subscriber_allocation;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_

+ 0 - 88
thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/ReaderDataLifecycleQosPolicy.hpp

@@ -1,88 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file ReaderDataLifecycleQosPolicy.hpp
- */
-
-#ifndef _FASTDDS_READERDATALIFECYCLEQOSPOLICY_HPP_
-#define _FASTDDS_READERDATALIFECYCLEQOSPOLICY_HPP_
-
-#include <fastdds/rtps/common/Time_t.h>
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-using eprosima::fastrtps::Duration_t;
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief Specifies the behavior of the DataReader with regards to the lifecycle of the data-instances it manages.
-//! @warning This Qos Policy will be implemented in future releases.
-//! @note Mutable Qos Policy
-class ReaderDataLifecycleQosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    ReaderDataLifecycleQosPolicy()
-        : autopurge_no_writer_samples_delay(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-        , autopurge_disposed_samples_delay(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~ReaderDataLifecycleQosPolicy()
-    {
-    }
-
-    bool operator ==(
-            const ReaderDataLifecycleQosPolicy& b) const
-    {
-        return (this->autopurge_no_writer_samples_delay == b.autopurge_no_writer_samples_delay) &&
-               (this->autopurge_disposed_samples_delay == b.autopurge_disposed_samples_delay);
-    }
-
-    inline void clear()
-    {
-        ReaderDataLifecycleQosPolicy reset = ReaderDataLifecycleQosPolicy();
-        std::swap(*this, reset);
-    }
-
-public:
-
-    /**
-     * @brief Indicates the duration the DataReader must retain information regarding instances that have the
-     * instance_state NOT_ALIVE_NO_WRITERS. <br>
-     * By default, c_TimeInfinite.
-     */
-    Duration_t autopurge_no_writer_samples_delay;
-    /**
-     * @brief Indicates the duration the DataReader must retain information regarding instances that have the
-     * instance_state NOT_ALIVE_DISPOSED. <br>
-     * By default, c_TimeInfinite.
-     */
-    Duration_t autopurge_disposed_samples_delay;
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_READERDATALIFECYCLEQOSPOLICY_HPP_

+ 0 - 70
thirdpartylib/FastRTPS/include/fastdds/dds/core/policy/WriterDataLifecycleQosPolicy.hpp

@@ -1,70 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file WriterDataLifecycleQosPolicy.hpp
- */
-
-#ifndef _FASTDDS_WRITERDATALIFECYCLEQOSPOLICY_HPP_
-#define _FASTDDS_WRITERDATALIFECYCLEQOSPOLICY_HPP_
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief Specifies the behavior of the DataWriter with regards to the lifecycle of the data-instances it manages.
-//! @warning This Qos Policy will be implemented in future releases.
-//! @note Mutable Qos Policy
-class WriterDataLifecycleQosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    WriterDataLifecycleQosPolicy()
-        : autodispose_unregistered_instances(true)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~WriterDataLifecycleQosPolicy()
-    {
-    }
-
-    bool operator ==(
-            const WriterDataLifecycleQosPolicy& b) const
-    {
-        return (this->autodispose_unregistered_instances == b.autodispose_unregistered_instances);
-    }
-
-public:
-
-    /**
-     * @brief Controls whether a DataWriter will automatically dispose instances each time they are unregistered.
-     * The setting autodispose_unregistered_instances = TRUE indicates that unregistered instances will also be considered
-     * disposed. <br>
-     * By default, true.
-     */
-    bool autodispose_unregistered_instances;
-
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_WRITERDATALIFECYCLEQOSPOLICY_HPP_

+ 0 - 56
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/BaseStatus.hpp

@@ -1,56 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file BaseStatus.hpp
- */
-
-#ifndef _FASTDDS_BASE_STATUS_HPP_
-#define _FASTDDS_BASE_STATUS_HPP_
-
-#include <cstdint>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A struct storing the base status
-struct BaseStatus
-{
-    //!Total cumulative count
-    int32_t total_count = 0;
-
-    //!Increment since the last time the status was read
-    int32_t total_count_change = 0;
-};
-
-//!Alias of BaseStatus
-using SampleLostStatus = BaseStatus;
-//!Alias of BaseStatus
-using LivelinessLostStatus = BaseStatus;
-//!Alias of BaseStatus
-using InconsistentTopicStatus = BaseStatus;
-
-} //namespace dds
-} //namespace fastdds
-
-namespace fastrtps {
-
-using LivelinessLostStatus = fastdds::dds::BaseStatus;
-
-}
-
-} //namespace eprosima
-
-#endif // _FASTDDS_BASE_STATUS_HPP_

+ 0 - 65
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp

@@ -1,65 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DeadlineMissedStatus.hpp
- */
-
-#ifndef _FASTDDS_DDS_QOS_DEADLINEMISSEDSTATUS_HPP_
-#define _FASTDDS_DDS_QOS_DEADLINEMISSEDSTATUS_HPP_
-
-#include <fastdds/rtps/common/InstanceHandle.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A struct storing the deadline status
-//! @ingroup DEADLINE_MODULE
-struct DeadlineMissedStatus
-{
-    //! @brief Constructor
-    DeadlineMissedStatus()
-        : total_count()
-        , total_count_change()
-        , last_instance_handle()
-    {
-    }
-
-    //! @brief Destructor
-    ~DeadlineMissedStatus()
-    {
-    }
-
-    //! @brief Total cumulative number of offered deadline periods epased during which a writer failed to provide data
-    //! @details Missed deadlines accumulate, that is, each deadline period the total_count will be incremented by 1
-    uint32_t total_count;
-
-    //! @brief The change in total_count since the last time the listener was called or the status was read
-    uint32_t total_count_change;
-
-    //! @brief Handle to the last instance missing the deadline
-    fastrtps::rtps::InstanceHandle_t last_instance_handle;
-};
-
-//! Typedef of DeadlineMissedStatus
-typedef DeadlineMissedStatus OfferedDeadlineMissedStatus;
-//! Typedef of DeadlineMissedStatus
-typedef DeadlineMissedStatus RequestedDeadlineMissedStatus;
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_DEADLINEMISSEDSTATUS_HPP_

+ 0 - 83
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp

@@ -1,83 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file IncompatibleQosStatus.hpp
- */
-
-#ifndef _FASTRTPS_INCOMPATIBLE_QOS_STATUS_HPP_
-#define _FASTRTPS_INCOMPATIBLE_QOS_STATUS_HPP_
-
-#include <cstdint>
-#include <vector>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//!Alias of uint32_t
-using QosPolicyId_t = uint32_t;
-
-/**
- * @brief A struct storing the id of the incompatible QoS Policy and the number of times it fails
- */
-struct QosPolicyCount
-{
-    //!Constructor
-    QosPolicyCount(
-            QosPolicyId_t id,
-            int32_t c)
-        : policy_id(id)
-        , count(c)
-    {
-    }
-
-    //! @brief The id of the policy
-    QosPolicyId_t policy_id;
-
-    //! @brief Total number of times that the concerned writer discovered a reader for the same topic
-    //! @details The requested QoS is incompatible with the one offered by the writer
-    int32_t count;
-};
-
-//!Alias of std::vector<QosPolicyCount>
-using QosPolicyCountSeq = std::vector<QosPolicyCount>;
-
-//! @brief A struct storing the requested incompatible QoS status
-struct IncompatibleQosStatus
-{
-    //! @brief Total cumulative number of times the concerned writer discovered a reader for the same topic
-    //! @details The requested QoS is incompatible with the one offered by the writer
-    int32_t total_count = 0;
-
-    //! @brief The change in total_count since the last time the listener was called or the status was read
-    int32_t total_count_change = 0;
-
-    //! @brief The id of the policy that was found to be incompatible the last time an incompatibility is detected
-    QosPolicyId_t last_policy_id;
-
-    //! @brief A list of QosPolicyCount
-    QosPolicyCountSeq policies;
-};
-
-//!Alias of IncompatibleQosStatus
-using RequestedIncompatibleQosStatus = IncompatibleQosStatus;
-//!Alias of IncompatibleQosStatus
-using OfferedIncompatibleQosStatus = IncompatibleQosStatus;
-
-} //end of namespace dds
-} //end of namespace fastdds
-} //end of namespace eprosima
-
-#endif // _FASTRTPS_INCOMPATIBLE_QOS_STATUS_HPP_

+ 0 - 59
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp

@@ -1,59 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file LivelinessChangedStatus.hpp
- */
-
-#ifndef _FASTDDS_DDS_QOS_LIVELINESSCHANGEDSTATUS_HPP_
-#define _FASTDDS_DDS_QOS_LIVELINESSCHANGEDSTATUS_HPP_
-
-#include <fastdds/rtps/common/InstanceHandle.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A struct storing the liveliness changed status
-struct LivelinessChangedStatus
-{
-    //! @brief The total number of currently active publishers that write the topic read by the subscriber
-    //! @details This count increases when a newly matched publisher asserts its liveliness for the first time
-    //! or when a publisher previously considered to be not alive reasserts its liveliness. The count decreases
-    //! when a publisher considered alive fails to assert its liveliness and becomes not alive, whether because
-    //! it was deleted normally or for some other reason
-    int32_t alive_count = 0;
-
-    //! @brief The total count of current publishers that write the topic read by the subscriber that are no longer
-    //! asserting their liveliness
-    //! @details This count increases when a publisher considered alive fails to assert its liveliness and becomes
-    //! not alive for some reason other than the normal deletion of that publisher. It decreases when a previously
-    //! not alive publisher either reasserts its liveliness or is deleted normally
-    int32_t not_alive_count = 0;
-
-    //! @brief The change in the alive_count since the last time the listener was called or the status was read
-    int32_t alive_count_change = 0;
-
-    //! @brief The change in the not_alive_count since the last time the listener was called or the status was read
-    int32_t not_alive_count_change = 0;
-
-    //! @brief Handle to the last publisher whose change in liveliness caused this status to change
-    fastrtps::rtps::InstanceHandle_t last_publication_handle;
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_LIVELINESSCHANGEDSTATUS_HPP_

+ 0 - 55
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/MatchedStatus.hpp

@@ -1,55 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file MatchedStatus.hpp
- */
-
-#ifndef _MATCHED_STATUS_HPP_
-#define _MATCHED_STATUS_HPP_
-
-#include <cstdint>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A structure storing the subscription status
-struct MatchedStatus
-{
-    //! @brief Constructor
-    MatchedStatus() = default;
-
-    //! @brief Destructor
-    ~MatchedStatus() = default;
-
-    //! @brief Total cumulative count the concerned reader discovered a match with a writer
-    //! @details It found a writer for the same topic with a requested QoS that is compatible with that offered by the reader
-    int32_t total_count = 0;
-
-    //! @brief The change in total_count since the last time the listener was called or the status was read
-    int32_t total_count_change = 0;
-
-    //! @brief The number of writers currently matched to the concerned reader
-    int32_t current_count = 0;
-
-    //! @brief The change in current_count since the last time the listener was called or the status was read
-    int32_t current_count_change = 0;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif //_MATCHED_STATUS_HPP_

+ 0 - 41
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp

@@ -1,41 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file PublicationMatchedStatus.hpp
-*/
-
-#ifndef _PUBLICATION_MATCHED_STATUS_HPP_
-#define _PUBLICATION_MATCHED_STATUS_HPP_
-
-#include <cstdint>
-#include <fastrtps/rtps/common/InstanceHandle.h>
-#include <fastdds/dds/core/status/MatchedStatus.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A structure storing the publication status
-struct PublicationMatchedStatus: public MatchedStatus
-{
-	//! @brief Handle to the last reader that matched the writer causing the status to change
-	eprosima::fastrtps::rtps::InstanceHandle_t last_subscription_handle;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif //_PUBLICATION_MATCHED_STATUS_HPP_

+ 0 - 71
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/SampleRejectedStatus.hpp

@@ -1,71 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SampleRejectedStatus.hpp
- */
-
-#ifndef _FASTDDS_DDS_QOS_SAMPLEREJECTEDSTATUS_HPP_
-#define _FASTDDS_DDS_QOS_SAMPLEREJECTEDSTATUS_HPP_
-
-#include <cstdint>
-#include <fastdds/rtps/common/InstanceHandle.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! An enum with the possible values for the sample rejected reason
-enum SampleRejectedStatusKind
-{
-    //!Default value
-    NOT_REJECTED,
-    //! Exceeds the max_instance limit
-    REJECTED_BY_INSTANCES_LIMIT,
-    //! Exceeds the max_samples limit
-    REJECTED_BY_SAMPLES_LIMIT,
-    //! Exceeds the max_samples_per_instance limit
-    REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT
-};
-
-//! @brief A struct storing the sample lost status
-struct SampleRejectedStatus
-{
-    /**
-     * Total cumulative count of samples rejected by the DataReader.
-     */
-    uint32_t total_count = 0;
-
-    /**
-     * The incremental number of samples rejected since the last time the listener was called or the status was read.
-     */
-    uint32_t total_count_change = 0;
-
-    /**
-     * Reason for rejecting the last sample rejected.
-     * If no samples have been rejected, the reason is the special value NOT_REJECTED.
-     */
-    SampleRejectedStatusKind last_reason = NOT_REJECTED;
-
-    /**
-     * Handle to the instance being updated by the last sample that was rejected.
-     */
-    fastrtps::rtps::InstanceHandle_t last_instance_handle;
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_SAMPLEREJECTEDSTATUS_HPP_

+ 0 - 254
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/StatusMask.hpp

@@ -1,254 +0,0 @@
-/*
- * Copyright 2010, Object Management Group, Inc.
- * Copyright 2010, PrismTech, Corp.
- * Copyright 2010, Real-Time Innovations, Inc.
- * Copyright 2019, Proyectos y Sistemas de Mantenimiento SL (eProsima).
- * All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _FASTDDS_STATUSMASK_HPP_
-#define _FASTDDS_STATUSMASK_HPP_
-
-#include <bitset>
-#include <sstream>
-
-//!Alias of size_t(16)
-#define FASTDDS_STATUS_COUNT size_t(16)
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * @brief
- * StatusMask is a bitmap or bitset field.
- *
- * This bitset is used to:
- * - determine which listener functions to call
- * - set conditions in dds::core::cond::StatusCondition
- * - indicate status changes when calling dds::core::Entity::status_changes
- */
-class StatusMask : public std::bitset<FASTDDS_STATUS_COUNT>
-{
-public:
-
-    /**
-     * Convenience typedef for std::bitset<FASTDDS_STATUS_COUNT>.
-     */
-    typedef std::bitset<FASTDDS_STATUS_COUNT> MaskType;
-
-    /**
-     * Construct an StatusMask with no flags set.
-     */
-    StatusMask()
-        : std::bitset<FASTDDS_STATUS_COUNT>()
-    {
-    }
-
-    /**
-     * Construct an StatusMask with an uint32_t bit mask.
-     *
-     * @param mask the bit array to initialize the bitset with
-     */
-    explicit StatusMask(
-            uint32_t mask)
-        : std::bitset<FASTDDS_STATUS_COUNT>(mask)
-    {
-    }
-
-    /**
-     * Shift (merge) given StatusMask bits into this StatusMask bitset.
-     *
-     * @return StatusMask this
-     */
-    inline StatusMask& operator <<(
-            const StatusMask& mask)
-    {
-        *this |= mask;
-        return *this;
-    }
-
-    /**
-     * Get all StatusMasks
-     *
-     * @return StatusMask all
-     */
-    inline static StatusMask all()
-    {
-        return StatusMask(0x80007fe7u);
-    }
-
-    /**
-     * Get no StatusMasks
-     *
-     * @return StatusMask none
-     */
-    inline static StatusMask none()
-    {
-        return StatusMask(0u);
-    }
-
-public:
-
-    /**
-     * Get the StatusMask associated with dds::core::status::InconsistentTopicStatus
-     *
-     * @return StatusMask inconsistent_topic
-     */
-    inline static StatusMask inconsistent_topic()
-    {
-        return StatusMask(0x00000001 << 0u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::OfferedDeadlineMissedStatus
-     *
-     * @return StatusMask offered_deadline_missed
-     */
-    inline static StatusMask offered_deadline_missed()
-    {
-        return StatusMask(0x00000001 << 1u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::RequestedDeadlineMissedStatus
-     *
-     * @return StatusMask requested_deadline_missed
-     */
-    inline static StatusMask requested_deadline_missed()
-    {
-        return StatusMask(0x00000001 << 2u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::OfferedIncompatibleQosStatus
-     *
-     * @return StatusMask offered_incompatible_qos
-     */
-    inline static StatusMask offered_incompatible_qos()
-    {
-        return StatusMask(0x00000001 << 5u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::RequestedIncompatibleQosStatus
-     *
-     * @return StatusMask requested_incompatible_qos
-     */
-    inline static StatusMask requested_incompatible_qos()
-    {
-        return StatusMask(0x00000001 << 6u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::SampleLostStatus
-     *
-     * @return StatusMask sample_lost
-     */
-    inline static StatusMask sample_lost()
-    {
-        return StatusMask(0x00000001 << 7u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::SampleRejectedStatus
-     *
-     * @return StatusMask sample_rejected
-     */
-    inline static StatusMask sample_rejected()
-    {
-        return StatusMask(0x00000001 << 8u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::data_on_readers
-     *
-     * @return StatusMask data_on_readers
-     */
-    inline static StatusMask data_on_readers()
-    {
-        return StatusMask(0x00000001 << 9u);
-    }
-
-    /**
-     * get the statusmask associated with dds::core::status::data_available
-     *
-     * @return statusmask data_available
-     */
-    inline static StatusMask data_available()
-    {
-        return StatusMask(0x00000001 << 10u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::LivelinessLostStatus
-     *
-     * @return StatusMask liveliness_lost
-     */
-    inline static StatusMask liveliness_lost()
-    {
-        return StatusMask(0x00000001 << 11u);
-    }
-
-    /**
-     * Get the StatusMask associated with dds::core::status::LivelinessChangedStatus
-     *
-     * @return StatusMask liveliness_changed
-     */
-    inline static StatusMask liveliness_changed()
-    {
-        return StatusMask(0x00000001 << 12u);
-    }
-
-    /**
-     * Get the statusmask associated with dds::core::status::PublicationMatchedStatus
-     *
-     * @return StatusMask publication_matched
-     */
-    inline static StatusMask publication_matched()
-    {
-        return StatusMask(0x00000001 << 13u);
-    }
-
-    /**
-     * Get the statusmask associated with dds::core::status::SubscriptionMatchedStatus
-     *
-     * @return StatusMask subscription_matched
-     */
-    inline static StatusMask subscription_matched()
-    {
-        return StatusMask(0x00000001 << 14u);
-    }
-
-    /**
-     * @brief Checks if the status passed as parameter is 1 in the actual StatusMask
-     * @param status Status that need to be checked
-     * @return true if the status is active and false if not
-     */
-    bool is_active(
-            StatusMask status) const
-    {
-        MaskType r = *this & status;
-        return r == status;
-    }
-
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-
-#endif //_FASTDDS_STATUSMASK_HPP_

+ 0 - 42
thirdpartylib/FastRTPS/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp

@@ -1,42 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SubscriptionMatchedStatus.hpp
-*/
-
-#ifndef _SUBSCRIPTION_MATCHED_STATUS_HPP_
-#define _SUBSCRIPTION_MATCHED_STATUS_HPP_
-
-#include <cstdint>
-
-#include <fastrtps/rtps/common/InstanceHandle.h>
-#include <fastdds/dds/core/status/MatchedStatus.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! @brief A structure storing the subscription status
-struct SubscriptionMatchedStatus: public MatchedStatus
-{
-	//! @brief Handle to the last writer that matched the reader causing the status change
-	eprosima::fastrtps::rtps::InstanceHandle_t last_publication_handle;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif //_SUBCRIPTION_MATCHED_STATUS_HPP_

+ 0 - 612
thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipant.hpp

@@ -1,612 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DomainParticipant.hpp
- *
- */
-
-#ifndef _FASTDDS_DOMAIN_PARTICIPANT_HPP_
-#define _FASTDDS_DOMAIN_PARTICIPANT_HPP_
-
-#include <fastdds/dds/topic/TypeSupport.hpp>
-#include <fastdds/dds/topic/Topic.hpp>
-#include <fastrtps/types/TypeIdentifier.h>
-
-#include <fastdds/rtps/common/Guid.h>
-#include <fastdds/rtps/common/SampleIdentity.h>
-#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
-#include <fastrtps/types/TypesBase.h>
-#include <fastdds/dds/core/status/StatusMask.hpp>
-#include <fastdds/dds/core/Entity.hpp>
-#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
-
-#include <utility>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace dds {
-namespace domain {
-class DomainParticipant;
-}
-}
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-class ResourceEvent;
-} // namespace rtps
-
-namespace types {
-class TypeInformation;
-} // namespace types
-
-class ParticipantAttributes;
-class PublisherAttributes;
-class SubscriberAttributes;
-
-} //namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class DomainParticipantImpl;
-class DomainParticipantListener;
-class Publisher;
-class PublisherQos;
-class PublisherListener;
-class Subscriber;
-class SubscriberQos;
-class SubscriberListener;
-class TopicQos;
-
-/**
- * Class DomainParticipant used to group Publishers and Subscribers into a single working unit.
- * @ingroup FASTDDS_MODULE
- */
-class DomainParticipant : public Entity
-{
-public:
-
-    /**
-     * This operation returns the value of the DomainParticipant QoS policies
-     * @param qos DomainParticipantQos reference where the qos is going to be returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            DomainParticipantQos& qos) const;
-
-    /**
-     * @brief This operation returns the value of the DomainParticipant QoS policies
-     * @return A reference to the DomainParticipantQos
-     */
-    RTPS_DllAPI const DomainParticipantQos& get_qos() const;
-
-    /**
-     * @brief This operation enables the DomainParticipant
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t enable() override;
-
-    /**
-     * This operation sets the value of the DomainParticipant QoS policies.
-     * @param qos DomainParticipantQos to be set
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const DomainParticipantQos& qos) const;
-
-    /**
-     * Allows modifying the DomainParticipantListener.
-     * @param listener
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            DomainParticipantListener* listener);
-
-    /**
-     * Allows accessing the DomainParticipantListener.
-     * @return DomainParticipantListener pointer
-     */
-    RTPS_DllAPI const DomainParticipantListener* get_listener() const;
-
-    /**
-     * Create a Publisher in this Participant.
-     * @param qos QoS of the Publisher.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Publisher.
-     */
-    RTPS_DllAPI Publisher* create_publisher(
-            const PublisherQos& qos,
-            PublisherListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Create a Publisher in this Participant.
-     * @param profile_name Publisher profile name.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Publisher.
-     */
-    RTPS_DllAPI Publisher* create_publisher_with_profile(
-            const std::string& profile_name,
-            PublisherListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Deletes an existing Publisher.
-     * @param publisher to be deleted.
-     * @return RETCODE_PRECONDITION_NOT_MET if the publisher does not belong to this participant or if it has active DataWriters,
-     * RETCODE_OK if it is correctly deleted and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t delete_publisher(
-            Publisher* publisher);
-
-    /**
-     * Create a Subscriber in this Participant.
-     * @param qos QoS of the Subscriber.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Subscriber.
-     */
-    RTPS_DllAPI Subscriber* create_subscriber(
-            const SubscriberQos& qos,
-            SubscriberListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Create a Subscriber in this Participant.
-     * @param profile_name Subscriber profile name.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Subscriber.
-     */
-    RTPS_DllAPI Subscriber* create_subscriber_with_profile(
-            const std::string& profile_name,
-            SubscriberListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Deletes an existing Subscriber.
-     * @param subscriber to be deleted.
-     * @return RETCODE_PRECONDITION_NOT_MET if the subscriber does not belong to this participant or if it has active DataReaders,
-     * RETCODE_OK if it is correctly deleted and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t delete_subscriber(
-            Subscriber* subscriber);
-
-    /**
-     * Register a type in this participant.
-     * @param type TypeSupport.
-     * @param type_name The name that will be used to identify the Type.
-     * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport
-     * with the same name and RETCODE_OK if it is correctly registered.
-     */
-    RTPS_DllAPI ReturnCode_t register_type(
-            TypeSupport type,
-            const std::string& type_name);
-
-    /**
-     * Register a type in this participant.
-     * @param type TypeSupport.
-     * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport
-     * with the same name and RETCODE_OK if it is correctly registered.
-     */
-    RTPS_DllAPI ReturnCode_t register_type(
-            TypeSupport type);
-
-    /**
-     * Unregister a type in this participant.
-     * @param typeName Name of the type
-     * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there are entities using that
-     * TypeSupport and RETCODE_OK if it is correctly unregistered.
-     */
-    RTPS_DllAPI ReturnCode_t unregister_type(
-            const std::string& typeName);
-
-    /**
-     * Create a Topic in this Participant.
-     * @param topic_name Name of the Topic.
-     * @param type_name Data type of the Topic.
-     * @param qos QoS of the Topic.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Topic.
-     */
-    RTPS_DllAPI Topic* create_topic(
-            const std::string& topic_name,
-            const std::string& type_name,
-            const TopicQos& qos,
-            TopicListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Create a Topic in this Participant.
-     * @param topic_name Name of the Topic.
-     * @param type_name Data type of the Topic.
-     * @param profile_name Topic profile name.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask that holds statuses the listener responds to (default: all)
-     * @return Pointer to the created Topic.
-     */
-    RTPS_DllAPI Topic* create_topic_with_profile(
-            const std::string& topic_name,
-            const std::string& type_name,
-            const std::string& profile_name,
-            TopicListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Deletes an existing Topic.
-     * @param topic to be deleted.
-     * @return RETCODE_BAD_PARAMETER if the topic passed is a nullptr, RETCODE_PRECONDITION_NOT_MET if the topic does not belong to
-     * this participant or if it is referenced by any entity and ETCODE_OK if the Topic was deleted.
-     */
-    RTPS_DllAPI ReturnCode_t delete_topic(
-            Topic* topic);
-
-    /**
-     * Looks up an existing, locally created @ref TopicDescription, based on its name.
-     * May be called on a disabled participant.
-     *
-     * @param topic_name Name of the @ref TopicDescription to search for.
-     *
-     * @return Pointer to the topic description, if it has been created locally. Otherwise, nullptr is returned.
-     *
-     * @remark UNSAFE. It is unsafe to lookup a topic description while another thread is creating a topic.
-     */
-    RTPS_DllAPI TopicDescription* lookup_topicdescription(
-            const std::string& topic_name) const;
-
-    /* TODO
-       Subscriber* get_builtin_subscriber();
-     */
-
-    /* TODO
-       bool ignore_participant(
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /* TODO
-       bool ignore_topic(
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /* TODO
-       bool ignore_publication(
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /* TODO
-       bool ignore_subscription(
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /**
-     * This operation retrieves the domain_id used to create the DomainParticipant.
-     * The domain_id identifies the DDS domain to which the DomainParticipant belongs.
-     * @return The Participant's domain_id
-     */
-    RTPS_DllAPI DomainId_t get_domain_id() const;
-
-    /* TODO
-       bool delete_contained_entities();
-     */
-
-    /**
-     * This operation manually asserts the liveliness of the DomainParticipant.
-     * This is used in combination with the LIVELINESS QoS policy to indicate to the Service that the entity
-     * remains active.
-     *
-     * This operation needs to only be used if the DomainParticipant contains DataWriter entities with
-     * the LIVELINESS set to MANUAL_BY_PARTICIPANT and it only affects the liveliness of those DataWriter entities.
-     * Otherwise, it has no effect.
-     *
-     * @note Writing data via the write operation on a DataWriter asserts liveliness on the DataWriter itself and its
-     * DomainParticipant. Consequently the use of assert_liveliness is only needed if the application is not
-     * writing data regularly.
-     * @return RETCODE_OK if the liveliness was asserted, RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t assert_liveliness();
-
-    /**
-     * This operation sets a default value of the Publisher QoS policies which will be used for newly created
-     * Publisher entities in the case where the QoS policies are defaulted in the create_publisher operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not,
-     * the operation will have no effect and return false.
-     *
-     * The special value PUBLISHER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS
-     * should be reset back to the initial values the factory would use, that is the values that would be used
-     * if the set_default_publisher_qos operation had never been called.
-     * @param qos PublisherQos to be set
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_publisher_qos(
-            const PublisherQos& qos);
-
-    /**
-     * This operation retrieves the default value of the Publisher QoS, that is, the QoS policies which will be used
-     * for newly created Publisher entities in the case where the QoS policies are defaulted in the
-     * create_publisher operation.
-     *
-     * The values retrieved get_default_publisher_qos will match the set of values specified on the last successful
-     * call to set_default_publisher_qos, or else, if the call was never made, the default values.
-     * @return Current default publisher qos.
-     */
-    RTPS_DllAPI const PublisherQos& get_default_publisher_qos() const;
-
-    /**
-     * This operation retrieves the default value of the Publisher QoS, that is, the QoS policies which will be used
-     * for newly created Publisher entities in the case where the QoS policies are defaulted in the
-     * create_publisher operation.
-     *
-     * The values retrieved get_default_publisher_qos will match the set of values specified on the last successful
-     * call to set_default_publisher_qos, or else, if the call was never made, the default values.
-     * @param qos PublisherQos reference where the default_publisher_qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_publisher_qos(
-            PublisherQos& qos) const;
-
-    /**
-     * This operation sets a default value of the Subscriber QoS policies that will be used for newly created
-     * Subscriber entities in the case where the QoS policies are defaulted in the create_subscriber operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not,
-     * the operation will have no effect and return false.
-     *
-     * The special value SUBSCRIBER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS
-     * should be reset back to the initial values the factory would use, that is the values that would be used
-     * if the set_default_subscriber_qos operation had never been called.
-     * @param qos SubscriberQos to be set
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_subscriber_qos(
-            const SubscriberQos& qos);
-
-    /**
-     * This operation retrieves the default value of the Subscriber QoS, that is, the QoS policies which will be used
-     * for newly created Subscriber entities in the case where the QoS policies are defaulted in the
-     * create_subscriber operation.
-     *
-     * The values retrieved get_default_subscriber_qos will match the set of values specified on the last successful
-     * call to set_default_subscriber_qos, or else, if the call was never made, the default values.
-     * @return Current default subscriber qos.
-     */
-    RTPS_DllAPI const SubscriberQos& get_default_subscriber_qos() const;
-
-    /**
-     * This operation retrieves the default value of the Subscriber QoS, that is, the QoS policies which will be used
-     * for newly created Subscriber entities in the case where the QoS policies are defaulted in the
-     * create_subscriber operation.
-     *
-     * The values retrieved get_default_subscriber_qos will match the set of values specified on the last successful
-     * call to set_default_subscriber_qos, or else, if the call was never made, the default values.
-     * @param qos SubscriberQos reference where the default_subscriber_qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_subscriber_qos(
-            SubscriberQos& qos) const;
-
-
-    /**
-     * This operation sets a default value of the Topic QoS policies which will be used for newly created
-     * Topic entities in the case where the QoS policies are defaulted in the create_topic operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not, the operation
-     * will have no effect and return INCONSISTENT_POLICY.
-     *
-     * The special value TOPIC_QOS_DEFAULT may be passed to this operation to indicate that the default QoS
-     * should be reset back to the initial values the factory would use, that is the values that would be used
-     * if the set_default_topic_qos operation had never been called.
-     * @param qos TopicQos to be set
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_topic_qos(
-            const TopicQos& qos);
-
-    /**
-     * This operation retrieves the default value of the Topic QoS, that is, the QoS policies that will be used
-     * for newly created Topic entities in the case where the QoS policies are defaulted in the create_topic
-     * operation.
-     *
-     * The values retrieved get_default_topic_qos will match the set of values specified on the last successful
-     * call to set_default_topic_qos, or else, TOPIC_QOS_DEFAULT if the call was never made.
-     * @return Current default topic qos.
-     */
-    RTPS_DllAPI const TopicQos& get_default_topic_qos() const;
-
-    /**
-     * This operation retrieves the default value of the Topic QoS, that is, the QoS policies that will be used
-     * for newly created Topic entities in the case where the QoS policies are defaulted in the create_topic
-     * operation.
-     *
-     * The values retrieved get_default_topic_qos will match the set of values specified on the last successful
-     * call to set_default_topic_qos, or else, TOPIC_QOS_DEFAULT if the call was never made.
-     * @param qos TopicQos reference where the default_topic_qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_topic_qos(
-            TopicQos& qos) const;
-
-    /* TODO
-       bool get_discovered_participants(
-            std::vector<fastrtps::rtps::InstanceHandle_t>& participant_handles) const;
-     */
-
-    /* TODO
-       bool get_discovered_participant_data(
-            ParticipantBuiltinTopicData& participant_data,
-            const fastrtps::rtps::InstanceHandle_t& participant_handle) const;
-     */
-
-    /* TODO
-       bool get_discovered_topics(
-            std::vector<fastrtps::rtps::InstanceHandle_t>& topic_handles) const;
-     */
-
-    /* TODO
-       bool get_discovered_topic_data(
-            TopicBuiltinTopicData& topic_data,
-            const fastrtps::rtps::InstanceHandle_t& topic_handle) const;
-     */
-
-    /**
-     * This operation checks whether or not the given handle represents an Entity that was created from the
-     * DomainParticipant.
-     * @param handle InstanceHandle of the entity to look for.
-     * @param recursive The containment applies recursively. That is, it applies both to entities
-     * (TopicDescription, Publisher, or Subscriber) created directly using the DomainParticipant as well as
-     * entities created using a contained Publisher, or Subscriber as the factory, and so forth. (default: true)
-     * @return True if entity is contained. False otherwise.
-     */
-    RTPS_DllAPI bool contains_entity(
-            const fastrtps::rtps::InstanceHandle_t& handle,
-            bool recursive = true) const;
-
-    /**
-     * This operation returns the current value of the time that the service uses to time-stamp data-writes
-     * and to set the reception-timestamp for the data-updates it receives.
-     * @param current_time Time_t reference where the current time is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_current_time(
-            fastrtps::Time_t& current_time) const;
-
-    /**
-     * This method gives access to a registered type based on its name.
-     * @param type_name Name of the type
-     * @return TypeSupport corresponding to the type_name
-     */
-    RTPS_DllAPI TypeSupport find_type(
-            const std::string& type_name) const;
-
-    /**
-     * Returns the DomainParticipant's handle.
-     * @return InstanceHandle of this DomainParticipant.
-     */
-    RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const;
-
-    // From here legacy RTPS methods.
-
-    /**
-     * @brief Getter for the Participant GUID
-     * @return A reference to the GUID
-     */
-    RTPS_DllAPI const fastrtps::rtps::GUID_t& guid() const;
-
-    /**
-     * @brief Getter for the participant names
-     * @return Vector with the names
-     */
-    RTPS_DllAPI std::vector<std::string> get_participant_names() const;
-
-    /**
-     * This method can be used when using a StaticEndpointDiscovery mechanism different that the one
-     * included in FastRTPS, for example when communicating with other implementations.
-     * It indicates the Participant that an Endpoint from the XML has been discovered and
-     * should be activated.
-     * @param partguid Participant GUID_t.
-     * @param userId User defined ID as shown in the XML file.
-     * @param kind EndpointKind (WRITER or READER)
-     * @return True if correctly found and activated.
-     */
-    RTPS_DllAPI bool new_remote_endpoint_discovered(
-            const fastrtps::rtps::GUID_t& partguid,
-            uint16_t userId,
-            fastrtps::rtps::EndpointKind_t kind);
-
-    /**
-     * @brief Getter for the resource event
-     * @return A reference to the resource event
-     */
-    RTPS_DllAPI fastrtps::rtps::ResourceEvent& get_resource_event() const;
-
-    /**
-     * When a DomainParticipant receives an incomplete list of TypeIdentifiers in a
-     * PublicationBuiltinTopicData or SubscriptionBuiltinTopicData, it may request the additional type
-     * dependencies by invoking the getTypeDependencies operation.
-     * @param in TypeIdentifier sequence
-     * @return SampleIdentity
-     */
-    RTPS_DllAPI fastrtps::rtps::SampleIdentity get_type_dependencies(
-            const fastrtps::types::TypeIdentifierSeq& in) const;
-
-    /**
-     * A DomainParticipant may invoke the operation getTypes to retrieve the TypeObjects associated with a
-     * list of TypeIdentifiers.
-     * @param in TypeIdentifier sequence
-     * @return SampleIdentity
-     */
-    RTPS_DllAPI fastrtps::rtps::SampleIdentity get_types(
-            const fastrtps::types::TypeIdentifierSeq& in) const;
-
-    /**
-     * Helps the user to solve all dependencies calling internally to the typelookup service
-     * and registers the resulting dynamic type.
-     * The registration will be perform asynchronously and the user will be notified through the
-     * given callback, which receives the type_name as unique argument.
-     * If the type is already registered, the function will return true, but the callback will not be called.
-     * If the given type_information is enough to build the type without using the typelookup service,
-     * it will return true and the callback will be never called.
-     * @param type_information
-     * @param type_name
-     * @param callback
-     * @return true if type is already available (callback will not be called). false if type isn't available yet
-     * (the callback will be called if negotiation is success, and ignored in other case).
-     */
-    RTPS_DllAPI ReturnCode_t register_remote_type(
-            const fastrtps::types::TypeInformation& type_information,
-            const std::string& type_name,
-            std::function<void(const std::string& name, const fastrtps::types::DynamicType_ptr type)>& callback);
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~DomainParticipant();
-
-    /**
-     * @brief Check if the Participant has any Publisher, Subscriber or Topic
-     * @return true if any, false otherwise.
-     */
-    bool has_active_entities();
-
-private:
-
-    RTPS_DllAPI DomainParticipant(
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI DomainParticipant(
-            DomainId_t domain_id,
-            const DomainParticipantQos& qos,
-            DomainParticipantListener* listener,
-            const StatusMask& mask = StatusMask::all());
-
-    DomainParticipantImpl* impl_;
-
-    friend class DomainParticipantFactory;
-
-    friend class DomainParticipantImpl;
-
-    friend class ::dds::domain::DomainParticipant;
-};
-
-} // namespace dds
-} // namespace fastdds
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_DOMAIN_PARTICIPANT_HPP_ */

+ 0 - 233
thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipantFactory.hpp

@@ -1,233 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DomainParticipantFactory.hpp
- *
- */
-
-#ifndef _FASTDDS_DOMAINPARTICIPANT_HPP_
-#define _FASTDDS_DOMAINPARTICIPANT_HPP_
-
-#include <fastrtps/attributes/ParticipantAttributes.h>
-#include <fastrtps/types/TypesBase.h>
-#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
-#include <fastdds/dds/domain/qos/DomainParticipantFactoryQos.hpp>
-#include <fastdds/dds/core/status/StatusMask.hpp>
-
-#include <mutex>
-#include <map>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DomainParticipantListener;
-class DomainParticipant;
-class DomainParticipantImpl;
-
-/**
- * Class DomainParticipantFactory
- *  @ingroup FASTDDS_MODULE
- */
-class DomainParticipantFactory
-{
-
-public:
-
-    /**
-     * Returns the DomainParticipantFactory singleton.
-     * @return The DomainParticipantFactory singleton.
-     */
-    RTPS_DllAPI static DomainParticipantFactory* get_instance();
-
-    /**
-     * Create a Participant.
-     * @param domain_id Domain Id.
-     * @param qos DomainParticipantQos Reference.
-     * @param listener DomainParticipantListener Pointer (default: nullptr)
-     * @param mask StatusMask Reference (default: all)
-     * @return DomainParticipant pointer. (nullptr if not created.)
-     */
-    RTPS_DllAPI DomainParticipant* create_participant(
-            DomainId_t domain_id,
-            const DomainParticipantQos& qos,
-            DomainParticipantListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * Create a Participant.
-     * @param domain_id Domain Id.
-     * @param profile_name Participant profile name.
-     * @param listener DomainParticipantListener Pointer (default: nullptr)
-     * @param mask StatusMask Reference (default: all)
-     * @return DomainParticipant pointer. (nullptr if not created.)
-     */
-    RTPS_DllAPI DomainParticipant* create_participant_with_profile(
-            DomainId_t domain_id,
-            const std::string& profile_name,
-            DomainParticipantListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * This operation retrieves a previously created DomainParticipant belonging to specified domain_id.
-     * If no such DomainParticipant exists, the operation will return 'nullptr'.
-     * If multiple DomainParticipant entities belonging to that domain_id exist,
-     * then the operation will return one of them. It is not specified which one.
-     * @param domain_id
-     * @return previously created DomainParticipant within the specified domain
-     */
-    RTPS_DllAPI DomainParticipant* lookup_participant(
-            DomainId_t domain_id) const;
-
-    /**
-     * Returns all participants that belongs to the specified domain_id.
-     * @param domain_id
-     * @return previously created DomainParticipants within the specified domain
-     */
-    RTPS_DllAPI std::vector<DomainParticipant*> lookup_participants(
-            DomainId_t domain_id) const;
-
-    /**
-     * @brief This operation retrieves the default value of the DomainParticipant QoS, that is, the QoS policies which will
-     * be used for newly created DomainParticipant entities in the case where the QoS policies are defaulted in the
-     * create_participant operation.
-     * The values retrieved get_default_participant_qos will match the set of values specified on the last successful call
-     * to set_default_participant_qos, or else, if the call was never made, the default values.
-     * @param qos DomainParticipantQos where the qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_participant_qos(
-            DomainParticipantQos& qos) const;
-
-    /**
-     * @brief This operation retrieves the default value of the DomainParticipant QoS, that is, the QoS policies which will
-     * be used for newly created DomainParticipant entities in the case where the QoS policies are defaulted in the
-     * create_participant operation.
-     * The values retrieved get_default_participant_qos will match the set of values specified on the last successful call
-     * to set_default_participant_qos, or else, if the call was never made, the default values.
-     * @return A reference to the default DomainParticipantQos
-     */
-    RTPS_DllAPI const DomainParticipantQos& get_default_participant_qos() const;
-
-    /**
-     * @brief This operation sets a default value of the DomainParticipant QoS policies which will be used for
-     * newly created DomainParticipant entities in the case where the QoS policies are defaulted in the
-     * create_participant operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not, the operation
-     * will have no effect and return INCONSISTENT_POLICY.
-     *
-     * The special value PARTICIPANT_QOS_DEFAULT may be passed to this operation to indicate that the default
-     * QoS should be reset back to the initial values the factory would use, that is the values that would be
-     * used if the set_default_participant_qos operation had never been called.
-     *
-     * @param qos DomainParticipantQos to be set
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_participant_qos(
-            const DomainParticipantQos& qos);
-
-    /**
-     * Remove a Participant and all associated publishers and subscribers.
-     * @param part Pointer to the participant.
-     * @return RETCODE_PRECONDITION_NOT_MET if the participant has active entities, RETCODE_OK if the participant is correctly
-     * deleted and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t delete_participant(
-            DomainParticipant* part);
-
-    /**
-     * Load profiles from default XML file.
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t load_profiles();
-
-    /**
-     * Load profiles from XML file.
-     * @param xml_profile_file XML profile file.
-     * @return RETCODE_OK if it is correctly loaded, RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t load_XML_profiles_file(
-            const std::string& xml_profile_file);
-
-    /**
-     * This operation returns the value of the DomainParticipantFactory QoS policies.
-     * @param qos DomaParticipantFactoryQos reference where the qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            DomainParticipantFactoryQos& qos) const;
-
-    /**
-     * This operation sets the value of the DomainParticipantFactory QoS policies. These policies
-     * control the behavior of the object a factory for entities.
-     *
-     * Note that despite having QoS, the DomainParticipantFactory is not an Entity.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not,
-     * the operation will have no effect and return INCONSISTENT_POLICY.
-     * @param qos DomainParticipantFactoryQos to be set.
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const DomainParticipantFactoryQos& qos);
-
-private:
-
-    friend class DomainParticipantFactoryReleaser;
-    friend class DomainParticipant;
-
-    std::map<DomainId_t, std::vector<DomainParticipantImpl*> > participants_;
-
-    DomainParticipantFactory();
-
-    virtual ~DomainParticipantFactory();
-
-    void reset_default_participant_qos();
-
-    static bool delete_instance();
-
-    static void set_qos(
-            DomainParticipantFactoryQos& to,
-            const DomainParticipantFactoryQos& from,
-            bool first_time);
-
-    static ReturnCode_t check_qos(
-            const DomainParticipantFactoryQos& qos);
-
-    static bool can_qos_be_updated(
-            const DomainParticipantFactoryQos& to,
-            const DomainParticipantFactoryQos& from);
-
-    void participant_has_been_deleted(
-            DomainParticipantImpl* part);
-
-    mutable std::mutex mtx_participants_;
-
-    mutable bool default_xml_profiles_loaded;
-
-    DomainParticipantFactoryQos factory_qos_;
-
-    DomainParticipantQos default_participant_qos_;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_DOMAINPARTICIPANT_HPP_*/

+ 0 - 169
thirdpartylib/FastRTPS/include/fastdds/dds/domain/DomainParticipantListener.hpp

@@ -1,169 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DomainParticipantListener.hpp
- *
- */
-
-#ifndef __FASTDDS__PARTICIPANT_PARTICIPANTLISTENER_HPP__
-#define __FASTDDS__PARTICIPANT_PARTICIPANTLISTENER_HPP__
-
-#include <fastdds/rtps/participant/ParticipantDiscoveryInfo.h>
-#include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>
-#include <fastdds/rtps/writer/WriterDiscoveryInfo.h>
-#include <fastdds/dds/publisher/PublisherListener.hpp>
-#include <fastdds/dds/subscriber/SubscriberListener.hpp>
-#include <fastdds/dds/topic/TopicListener.hpp>
-
-#include <fastrtps/types/TypeIdentifier.h>
-#include <fastrtps/types/TypeObject.h>
-#include <fastrtps/types/DynamicTypePtr.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-
-/**
- * Class DomainParticipantListener, overrides behaviour towards certain events.
- * @ingroup FASTDDS_MODULE
- */
-class DomainParticipantListener :
-    public PublisherListener,
-    public SubscriberListener,
-    public TopicListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    DomainParticipantListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~DomainParticipantListener()
-    {
-    }
-
-    /*!
-     * This method is called when a new Participant is discovered, or a previously discovered participant changes
-     * its QOS or is removed.
-     * @param participant Pointer to the Participant which discovered the remote participant.
-     * @param info Remote participant information. User can take ownership of the object.
-     */
-    virtual void on_participant_discovery(
-            DomainParticipant* participant,
-            fastrtps::rtps::ParticipantDiscoveryInfo&& info)
-    {
-        (void)participant, (void)info;
-    }
-
-#if HAVE_SECURITY
-    /*!
-     * This method is called when a new Participant is authenticated.
-     * @param participant Pointer to the authenticated Participant.
-     * @param info Remote participant authentication information. User can take ownership of the object.
-     */
-    virtual void onParticipantAuthentication(
-            DomainParticipant* participant,
-            fastrtps::rtps::ParticipantAuthenticationInfo&& info)
-    {
-        (void)participant, (void)info;
-    }
-
-#endif
-
-    /*!
-     * This method is called when a new Subscriber is discovered, or a previously discovered subscriber changes
-     * its QOS or is removed.
-     * @param participant Pointer to the Participant which discovered the remote subscriber.
-     * @param info Remote subscriber information. User can take ownership of the object.
-     */
-    virtual void on_subscriber_discovery(
-            DomainParticipant* participant,
-            fastrtps::rtps::ReaderDiscoveryInfo&& info)
-    {
-        (void)participant, (void)info;
-    }
-
-    /*!
-     * This method is called when a new Publisher is discovered, or a previously discovered publisher changes
-     * its QOS or is removed.
-     * @param participant Pointer to the Participant which discovered the remote publisher.
-     * @param info Remote publisher information. User can take ownership of the object.
-     */
-    virtual void on_publisher_discovery(
-            DomainParticipant* participant,
-            fastrtps::rtps::WriterDiscoveryInfo&& info)
-    {
-        (void)participant, (void)info;
-    }
-
-    /*!
-     * This method is called when a participant discovers a new Type
-     * The ownership of all object belongs to the caller so if needs to be used after the
-     * method ends, a full copy should be perform (except for dyn_type due to its shared_ptr nature.
-     * For example:
-     * fastrtps::types::TypeIdentifier new_type_id = *identifier;
-     */
-    virtual void on_type_discovery(
-            DomainParticipant* participant,
-            const fastrtps::rtps::SampleIdentity& request_sample_id,
-            const fastrtps::string_255& topic,
-            const fastrtps::types::TypeIdentifier* identifier,
-            const fastrtps::types::TypeObject* object,
-            fastrtps::types::DynamicType_ptr dyn_type)
-    {
-        (void)participant, (void)request_sample_id, (void)topic, (void)identifier, (void)object, (void)dyn_type;
-    }
-
-    /*!
-     * This method is called when the typelookup client received a reply to a getTypeDependencies request.
-     * The user may want to retrieve these new types using the getTypes request and create a new
-     * DynamicType using the retrieved TypeObject.
-     */
-    virtual void on_type_dependencies_reply(
-            DomainParticipant* participant,
-            const fastrtps::rtps::SampleIdentity& request_sample_id,
-            const fastrtps::types::TypeIdentifierWithSizeSeq& dependencies)
-    {
-        (void)participant, (void)request_sample_id, (void)dependencies;
-    }
-
-    /*!
-     * This method is called when a participant receives a TypeInformation while discovering another participant.
-     */
-    virtual void on_type_information_received(
-            DomainParticipant* participant,
-            const fastrtps::string_255 topic_name,
-            const fastrtps::string_255 type_name,
-            const fastrtps::types::TypeInformation& type_information)
-    {
-        (void)participant, (void)topic_name, (void)type_name, (void)type_information;
-    }
-
-    // TODO: Methods in DomainParticipantListener (p.33 - DDS)
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // __FASTDDS__PARTICIPANT_PARTICIPANTLISTENER_HPP__

+ 0 - 97
thirdpartylib/FastRTPS/include/fastdds/dds/domain/qos/DomainParticipantFactoryQos.hpp

@@ -1,97 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DomainParticipantFactoryQos.hpp
- *
- */
-
-#ifndef _FASTDDS_PARTICIPANTFACTORYQOS_HPP_
-#define _FASTDDS_PARTICIPANTFACTORYQOS_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class DomainParticipantFactoryQos, contains all the possible Qos that can be set for a determined participant.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class DomainParticipantFactoryQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DomainParticipantFactoryQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~DomainParticipantFactoryQos()
-    {
-    }
-
-    bool operator ==(
-            const DomainParticipantFactoryQos& b) const
-    {
-        return (this->entity_factory_ == b.entity_factory());
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    const EntityFactoryQosPolicy& entity_factory() const
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    EntityFactoryQosPolicy& entity_factory()
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Setter for EntityFactoryQosPolicy
-     * @param entity_factory EntityFactoryQosPolicy
-     */
-    void entity_factory(
-            const EntityFactoryQosPolicy& entity_factory)
-    {
-        entity_factory_ = entity_factory;
-    }
-
-private:
-
-    //!EntityFactoryQosPolicy, implemented in the library.
-    EntityFactoryQosPolicy entity_factory_;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_PARTICIPANTFACTORYQOS_HPP_ */

+ 0 - 293
thirdpartylib/FastRTPS/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp

@@ -1,293 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DomainParticipantQos.hpp
- *
- */
-
-#ifndef _FASTDDS_PARTICIPANTQOS_HPP_
-#define _FASTDDS_PARTICIPANTQOS_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class DomainParticipantQos, contains all the possible Qos that can be set for a determined participant.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class DomainParticipantQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DomainParticipantQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~DomainParticipantQos()
-    {
-    }
-
-    bool operator ==(
-            const DomainParticipantQos& b) const
-    {
-        return (this->user_data_ == b.user_data()) &&
-               (this->entity_factory_ == b.entity_factory()) &&
-               (this->allocation_ == b.allocation()) &&
-               (this->properties_ == b.properties()) &&
-               (this->wire_protocol_ == b.wire_protocol()) &&
-               (this->transport_ == b.transport()) &&
-               (this->name_ == b.name());
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy reference
-     */
-    const UserDataQosPolicy& user_data() const
-    {
-        return user_data_;
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy reference
-     */
-    UserDataQosPolicy& user_data()
-    {
-        return user_data_;
-    }
-
-    /**
-     * Setter for UserDataQosPolicy
-     * @param value UserDataQosPolicy
-     */
-    void user_data(
-            const UserDataQosPolicy& value)
-    {
-        user_data_ = value;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    const EntityFactoryQosPolicy& entity_factory() const
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    EntityFactoryQosPolicy& entity_factory()
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Setter for EntityFactoryQosPolicy
-     * @param value EntityFactoryQosPolicy
-     */
-    void entity_factory(
-            const EntityFactoryQosPolicy& value)
-    {
-        entity_factory_ = value;
-    }
-
-    /**
-     * Getter for ParticipantResourceLimitsQos
-     * @return ParticipantResourceLimitsQos reference
-     */
-    const ParticipantResourceLimitsQos& allocation() const
-    {
-        return allocation_;
-    }
-
-    /**
-     * Getter for ParticipantResourceLimitsQos
-     * @return ParticipantResourceLimitsQos reference
-     */
-    ParticipantResourceLimitsQos& allocation()
-    {
-        return allocation_;
-    }
-
-    /**
-     * Setter for ParticipantResourceLimitsQos
-     * @param allocation ParticipantResourceLimitsQos
-     */
-    void allocation(
-            const ParticipantResourceLimitsQos& allocation)
-    {
-        allocation_ = allocation;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos reference
-     */
-    const PropertyPolicyQos& properties() const
-    {
-        return properties_;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos reference
-     */
-    PropertyPolicyQos& properties()
-    {
-        return properties_;
-    }
-
-    /**
-     * Setter for PropertyPolicyQos
-     * @param properties PropertyPolicyQos
-     */
-    void properties(
-            const PropertyPolicyQos& properties)
-    {
-        properties_ = properties;
-    }
-
-    /**
-     * Getter for WireProtocolConfigQos
-     * @return WireProtocolConfigQos reference
-     */
-    const WireProtocolConfigQos& wire_protocol() const
-    {
-        return wire_protocol_;
-    }
-
-    /**
-     * Getter for WireProtocolConfigQos
-     * @return WireProtocolConfigQos reference
-     */
-    WireProtocolConfigQos& wire_protocol()
-    {
-        return wire_protocol_;
-    }
-
-    /**
-     * Setter for WireProtocolConfigQos
-     * @param wire_protocol WireProtocolConfigQos
-     */
-    void wire_protocol(
-            const WireProtocolConfigQos& wire_protocol)
-    {
-        wire_protocol_ = wire_protocol;
-    }
-
-    /**
-     * Getter for TransportConfigQos
-     * @return TransportConfigQos reference
-     */
-    const TransportConfigQos& transport() const
-    {
-        return transport_;
-    }
-
-    /**
-     * Getter for TransportConfigQos
-     * @return TransportConfigQos reference
-     */
-    TransportConfigQos& transport()
-    {
-        return transport_;
-    }
-
-    /**
-     * Setter for TransportConfigQos
-     * @param transport TransportConfigQos
-     */
-    void transport(
-            const TransportConfigQos& transport)
-    {
-        transport_ = transport;
-    }
-
-    /**
-     * Getter for the Participant name
-     * @return name
-     */
-    const fastrtps::string_255& name() const
-    {
-        return name_;
-    }
-
-    /**
-     * Getter for the Participant name
-     * @return name
-     */
-    fastrtps::string_255& name()
-    {
-        return name_;
-    }
-
-    /**
-     * Setter for the Participant name
-     * @return value New name to be set
-     */
-    void name(
-            const fastrtps::string_255& value)
-    {
-        name_ = value;
-    }
-
-private:
-
-    //!UserData Qos, implemented in the library.
-    UserDataQosPolicy user_data_;
-
-    //!EntityFactory Qos, implemented in the library.
-    EntityFactoryQosPolicy entity_factory_;
-
-    //!Participant allocation limits
-    ParticipantResourceLimitsQos allocation_;
-
-    //!Property policies
-    PropertyPolicyQos properties_;
-
-    //!Wire Protocol options
-    WireProtocolConfigQos wire_protocol_;
-
-    //!Transport options
-    TransportConfigQos transport_;
-
-    //!Name of the participant.
-    fastrtps::string_255 name_ = "RTPSParticipant";
-
-};
-
-RTPS_DllAPI extern const DomainParticipantQos PARTICIPANT_QOS_DEFAULT;
-
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_PARTICIPANTQOS_HPP_ */

+ 0 - 60
thirdpartylib/FastRTPS/include/fastdds/dds/log/Colors.hpp

@@ -1,60 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Colors.hpp
- */
-
-#ifndef _FASTRTPS_LOG_COLORS_H_
-#define _FASTRTPS_LOG_COLORS_H_
-
-
-#if defined(_WIN32)
-    #define C_DEF ""
-    #define C_RED ""
-    #define C_B_RED ""
-    #define C_GREEN ""
-    #define C_B_GREEN ""
-    #define C_YELLOW ""
-    #define C_B_YELLOW ""
-    #define C_BLUE ""
-    #define C_B_BLUE ""
-    #define C_MAGENTA ""
-    #define C_B_MAGENTA ""
-    #define C_CYAN ""
-    #define C_B_CYAN ""
-    #define C_WHITE ""
-    #define C_B_WHITE ""
-    #define C_BRIGHT ""
-#else
-    #define C_DEF "\033[m"
-    #define C_RED "\033[31m"
-    #define C_B_RED "\033[31;1m"
-    #define C_GREEN "\033[32m"
-    #define C_B_GREEN "\033[32;1m"
-    #define C_YELLOW "\033[33m"
-    #define C_B_YELLOW "\033[33;1m"
-    #define C_BLUE "\033[34m"
-    #define C_B_BLUE "\033[34;1m"
-    #define C_MAGENTA "\033[35m"
-    #define C_B_MAGENTA "\033[35;1m"
-    #define C_CYAN "\033[36m"
-    #define C_B_CYAN "\033[36;1m"
-    #define C_WHITE "\033[37m"
-    #define C_B_WHITE "\033[37;1m"
-    #define C_BRIGHT "\033[1m"
-#endif
-
-
-#endif /* _FASTRTPS_LOG_COLORS_H_ */

+ 0 - 77
thirdpartylib/FastRTPS/include/fastdds/dds/log/FileConsumer.hpp

@@ -1,77 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file FileConsumer.hpp
- *
- */
-
-#ifndef _FASTDDS_FILE_CONSUMER_HPP_
-#define _FASTDDS_FILE_CONSUMER_HPP_
-
-#include <fastdds/dds/log/Log.hpp>
-
-#include <fstream>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Log consumer that writes the log events to a file.
- *
- * @file FileConsumer.hpp
- */
-class FileConsumer : public LogConsumer
-{
-public:
-
-    //! Default constructor: filename = "output.log", append = false.
-    RTPS_DllAPI FileConsumer();
-
-    /** Constructor with parameters.
-     * @param filename path of the output file where the log will be wrote.
-     * @param append indicates if the consumer must append the content in the filename.
-     */
-    RTPS_DllAPI FileConsumer(
-            const std::string& filename,
-            bool append = false);
-
-    /** \internal
-     * Called by Log to ask us to consume the Entry.
-     * @param Log::Entry to consume.
-     */
-    RTPS_DllAPI virtual void Consume(
-            const Log::Entry&);
-
-    virtual ~FileConsumer();
-
-private:
-
-    void print_header(
-            const Log::Entry&);
-
-    void print_context(
-            const Log::Entry&);
-
-    std::string output_file_;
-    std::ofstream file_;
-    bool append_;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_FILE_CONSUMER_HPP_

+ 0 - 321
thirdpartylib/FastRTPS/include/fastdds/dds/log/Log.hpp

@@ -1,321 +0,0 @@
-
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-#ifndef _FASTDDS_LOG_LOG_HPP_
-#define _FASTDDS_LOG_LOG_HPP_
-
-#include <fastrtps/utils/DBQueue.h>
-#include <fastrtps/fastrtps_dll.h>
-#include <thread>
-#include <sstream>
-#include <atomic>
-#include <regex>
-
-/**
- * eProsima log layer. Logging categories and verbosities can be specified dynamically at runtime. However, even on a category
- * not covered by the current verbosity level, there is some overhead on calling a log macro. For maximum performance, you can
- * opt out of logging any particular level by defining the following symbols:
- *
- * * define LOG_NO_ERROR
- * * define LOG_NO_WARNING
- * * define LOG_NO_INFO
- *
- * Additionally. the lowest level (Info) is disabled by default on release branches.
- */
-
-// Logging API:
-
-//! Logs an info message. Disable it through Log::SetVerbosity, define LOG_NO_INFO, or being in a release branch
-#define logInfo(cat, msg) logInfo_(cat, msg)
-//! Logs a warning. Disable reporting through Log::SetVerbosity or define LOG_NO_WARNING
-#define logWarning(cat, msg) logWarning_(cat, msg)
-//! Logs an error. Disable reporting through define LOG_NO_ERROR
-#define logError(cat, msg) logError_(cat, msg)
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class LogConsumer;
-
-/**
- * Logging utilities.
- * Logging is accessed through the three macros above, and configuration on the log output
- * can be achieved through static methods on the class. Logging at various levels can be
- * disabled dynamically (through the Verbosity level) or statically (through the LOG_NO_[VERB]
- * macros) for maximum performance.
- * @ingroup COMMON_MODULE
- */
-class Log
-{
-public:
-
-    /**
-     * Types of log entry.
-     * * Error: Maximum priority. Can only be disabled statically through LOG_NO_ERROR.
-     * * Warning: Medium priority.  Can be disabled statically and dynamically.
-     * * Info: Low priority. Useful for debugging. Disabled by default on release branches.
-     */
-    enum Kind
-    {
-        Error,
-        Warning,
-        Info,
-    };
-
-    /**
-     * Registers an user defined consumer to route log output.
-     * There is a default stdout consumer active as default.
-     * @param consumer r-value to a consumer unique_ptr. It will be invalidated after the call.
-     */
-    RTPS_DllAPI static void RegisterConsumer(
-            std::unique_ptr<LogConsumer>&& consumer);
-
-    //! Removes all registered consumers, including the default stdout.
-    RTPS_DllAPI static void ClearConsumers();
-
-    //! Enables the reporting of filenames in log entries. Disabled by default.
-    RTPS_DllAPI static void ReportFilenames(
-            bool);
-
-    //! Enables the reporting of function names in log entries. Enabled by default when supported.
-    RTPS_DllAPI static void ReportFunctions(
-            bool);
-
-    //! Sets the verbosity level, allowing for messages equal or under that priority to be logged.
-    RTPS_DllAPI static void SetVerbosity(
-            Log::Kind);
-
-    //! Returns the current verbosity level.
-    RTPS_DllAPI static Log::Kind GetVerbosity();
-
-    //! Sets a filter that will pattern-match against log categories, dropping any unmatched categories.
-    RTPS_DllAPI static void SetCategoryFilter(
-            const std::regex&);
-
-    //! Sets a filter that will pattern-match against filenames, dropping any unmatched categories.
-    RTPS_DllAPI static void SetFilenameFilter(
-            const std::regex&);
-
-    //! Sets a filter that will pattern-match against the provided error string, dropping any unmatched categories.
-    RTPS_DllAPI static void SetErrorStringFilter(
-            const std::regex&);
-
-    //! Returns the logging engine to configuration defaults.
-    RTPS_DllAPI static void Reset();
-
-    //! Waits until no more log info is availabel
-    RTPS_DllAPI static void Flush();
-
-    //! Stops the logging thread. It will re-launch on the next call to a successful log macro.
-    RTPS_DllAPI static void KillThread();
-
-    // Note: In VS2013, if you're linking this class statically, you will have to call KillThread before leaving
-    // main, due to an unsolved MSVC bug.
-
-    struct Context
-    {
-        const char* filename;
-        int line;
-        const char* function;
-        const char* category;
-    };
-
-    struct Entry
-    {
-        std::string message;
-        Log::Context context;
-        Log::Kind kind;
-        std::string timestamp;
-    };
-
-    /**
-     * Not recommended to call this method directly! Use the following macros:
-     *  * logInfo(cat, msg);
-     *  * logWarning(cat, msg);
-     *  * logError(cat, msg);
-     */
-    RTPS_DllAPI static void QueueLog(
-            const std::string& message,
-            const Log::Context&,
-            Log::Kind);
-
-private:
-
-    struct Resources
-    {
-        fastrtps::DBQueue<Entry> logs;
-        std::vector<std::unique_ptr<LogConsumer> > consumers;
-        std::unique_ptr<std::thread> logging_thread;
-
-        // Condition variable segment.
-        std::condition_variable cv;
-        std::mutex cv_mutex;
-        bool logging;
-        bool work;
-        int current_loop;
-
-        // Context configuration.
-        std::mutex config_mutex;
-        bool filenames;
-        bool functions;
-        std::unique_ptr<std::regex> category_filter;
-        std::unique_ptr<std::regex> filename_filter;
-        std::unique_ptr<std::regex> error_string_filter;
-
-        std::atomic<Log::Kind> verbosity;
-
-        Resources();
-
-        ~Resources();
-    };
-
-    static struct Resources resources_;
-
-    // Applies transformations to the entries compliant with the options selected (such as
-    // erasure of certain context information, or filtering by category. Returns false
-    // if the log entry is blacklisted.
-    static bool preprocess(
-            Entry&);
-
-    static void run();
-
-    static void get_timestamp(
-            std::string&);
-};
-
-/**
- * Consumes a log entry to output it somewhere.
- */
-class LogConsumer
-{
-public:
-
-    virtual ~LogConsumer()
-    {
-    }
-
-    virtual void Consume(
-            const Log::Entry&) = 0;
-
-protected:
-
-    void print_timestamp(
-            std::ostream& stream,
-            const Log::Entry&,
-            bool color) const;
-
-    void print_header(
-            std::ostream& stream,
-            const Log::Entry&,
-            bool color) const;
-
-    void print_context(
-            std::ostream& stream,
-            const Log::Entry&,
-            bool color) const;
-
-    void print_message(
-            std::ostream& stream,
-            const Log::Entry&,
-            bool color) const;
-
-    void print_new_line(
-            std::ostream& stream,
-            bool color) const;
-};
-
-#if defined(WIN32)
-#define __func__ __FUNCTION__
-#endif
-
-#ifndef LOG_NO_ERROR
-#define logError_(cat, msg)                                                                          \
-    {                                                                                                \
-        using namespace eprosima::fastdds::dds;                                                      \
-        std::stringstream ss;                                                                        \
-        ss << msg;                                                                                   \
-        Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Error); \
-    }
-#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG))
-#define logError_(cat, msg)        \
-    {                              \
-        auto tmp_lambda = [&]()    \
-                {                          \
-                    std::stringstream ss;  \
-                    ss << msg;             \
-                };                         \
-        (void)tmp_lambda;          \
-    }
-#else
-#define logError_(cat, msg)
-#endif
-
-#ifndef LOG_NO_WARNING
-#define logWarning_(cat, msg)                                                                              \
-    {                                                                                                      \
-        using namespace eprosima::fastdds::dds;                                                            \
-        if (Log::GetVerbosity() >= Log::Kind::Warning)                                                     \
-        {                                                                                                  \
-            std::stringstream ss;                                                                          \
-            ss << msg;                                                                                     \
-            Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Warning); \
-        }                                                                                                  \
-    }
-#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG))
-#define logWarning_(cat, msg)      \
-    {                              \
-        auto tmp_lambda = [&]()    \
-                {                          \
-                    std::stringstream ss;  \
-                    ss << msg;             \
-                };                         \
-        (void)tmp_lambda;          \
-    }
-#else
-#define logWarning_(cat, msg)
-#endif
-
-#if (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) && (defined(_DEBUG) || defined(__DEBUG)) && \
-    (!defined(LOG_NO_INFO))
-#define logInfo_(cat, msg)                                                                              \
-    {                                                                                                   \
-        using namespace eprosima::fastdds::dds;                                                         \
-        if (Log::GetVerbosity() >= Log::Kind::Info)                                                     \
-        {                                                                                               \
-            std::stringstream ss;                                                                       \
-            ss << msg;                                                                                  \
-            Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Info); \
-        }                                                                                               \
-    }
-#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG))
-#define logInfo_(cat, msg)         \
-    {                              \
-        auto tmp_lambda = [&]()    \
-                {                          \
-                    std::stringstream ss;  \
-                    ss << msg;             \
-                };                         \
-        (void)tmp_lambda;          \
-    }
-#else
-#define logInfo_(cat, msg)
-#endif
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif

+ 0 - 46
thirdpartylib/FastRTPS/include/fastdds/dds/log/StdoutConsumer.hpp

@@ -1,46 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef _FASTDDS_STDOUT_CONSUMER_HPP_
-#define _FASTDDS_STDOUT_CONSUMER_HPP_
-
-#include <fastdds/dds/log/Log.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class StdoutConsumer : public LogConsumer
-{
-public:
-
-    virtual ~StdoutConsumer() {}
-
-    RTPS_DllAPI virtual void Consume(
-            const Log::Entry&);
-
-private:
-
-    void print_header(
-            const Log::Entry&) const;
-
-    void print_context(
-            const Log::Entry&) const;
-};
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif

+ 0 - 309
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/DataWriter.hpp

@@ -1,309 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataWriter.hpp
- */
-
-#ifndef _FASTRTPS_DATAWRITER_HPP_
-#define _FASTRTPS_DATAWRITER_HPP_
-
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastrtps/qos/DeadlineMissedStatus.h>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-#include <fastrtps/types/TypesBase.h>
-#include <fastdds/dds/core/Entity.hpp>
-#include <fastdds/dds/core/status/StatusMask.hpp>
-#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace eprosima {
-namespace fastrtps {
-
-class TopicAttributes;
-
-namespace rtps {
-
-class WriteParams;
-class WriterAttributes;
-struct InstanceHandle_t;
-struct GUID_t;
-
-} // namespace rtps
-
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class PublisherListener;
-class PublisherImpl;
-class Publisher;
-
-class TypeSupport;
-
-class DataWriterImpl;
-class DataWriterListener;
-class DataWriterQos;
-class Topic;
-
-/**
- * Class DataWriter, contains the actual implementation of the behaviour of the DataWriter.
- * @ingroup FASTDDS_MODULE
- */
-class DataWriter : public DomainEntity
-{
-    friend class PublisherImpl;
-    friend class DataWriterImpl;
-
-    /**
-     * Create a data writer, assigning its pointer to the associated writer.
-     * Don't use directly, create Publisher using DomainRTPSParticipant static function.
-     */
-    RTPS_DllAPI DataWriter(
-            DataWriterImpl* impl,
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI DataWriter(
-            Publisher* pub,
-            Topic* topic,
-            const DataWriterQos& qos = DATAWRITER_QOS_DEFAULT,
-            DataWriterListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-public:
-
-    RTPS_DllAPI virtual ~DataWriter();
-
-    /**
-     * @brief This operation enables the DataWriter
-     * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the Publisher creating this
-     *         DataWriter is not enabled.
-     */
-    RTPS_DllAPI ReturnCode_t enable() override;
-
-    /**
-     * Write data to the topic.
-     * @param data Pointer to the data
-     * @return True if correct, false otherwise
-     */
-    RTPS_DllAPI bool write(
-            void* data);
-
-    /**
-     * Write data with params to the topic.
-     * @param data Pointer to the data
-     * @param params Extra write parameters.
-     * @return True if correct, false otherwise
-     */
-    RTPS_DllAPI bool write(
-            void* data,
-            fastrtps::rtps::WriteParams& params);
-
-    /**
-     * Write data with handle.
-     *
-     * The special value HANDLE_NIL can be used for the parameter handle.This indicates that the identity of the
-     * instance should be automatically deduced from the instance_data (by means of the key).
-     *
-     * @param data Pointer to the data
-     * @param handle InstanceHandle_t.
-     * @return RETCODE_PRECONDITION_NOT_MET if the handle introduced does not match with the one associated to the data,
-     * RETCODE_OK if the data is correctly sent and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t write(
-            void* data,
-            const fastrtps::rtps::InstanceHandle_t& handle);
-
-    /*!
-     * @brief Informs that the application will be modifying a particular instance.
-     * It gives an opportunity to the middleware to pre-configure itself to improve performance.
-     * @param[in] instance Sample used to get the instance's key.
-     * @return Handle containing the instance's key.
-     * This handle could be used in successive `write` or `dispose` operations.
-     * In case of error, HANDLE_NIL will be returned.
-     */
-    RTPS_DllAPI fastrtps::rtps::InstanceHandle_t register_instance(
-            void* instance);
-
-    /*!
-     * @brief This operation reverses the action of `register_instance`.
-     * It should only be called on an instance that is currently registered.
-     * Informs the middleware that the DataWriter is not intending to modify any more of that data instance.
-     * Also indicates that the middleware can locally remove all information regarding that instance.
-     * @param[in] instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
-     * @param[in] handle Instance's key to be unregistered.
-     * @return Returns the operation's result.
-     * If the operation finishes successfully, ReturnCode_t::RETCODE_OK is returned.
-     */
-    RTPS_DllAPI ReturnCode_t unregister_instance(
-            void* instance,
-            const fastrtps::rtps::InstanceHandle_t& handle);
-
-    /**
-     * Returns the DataWriter's GUID
-     * @return Reference to the DataWriter GUID
-     */
-    RTPS_DllAPI const fastrtps::rtps::GUID_t& guid();
-
-    /**
-     * Returns the DataWriter's InstanceHandle
-     * @return Copy of the DataWriter InstanceHandle
-     */
-    RTPS_DllAPI fastrtps::rtps::InstanceHandle_t get_instance_handle() const;
-
-    /**
-     * Get data type associated to the DataWriter
-     * @return Copy of the TypeSupport
-     */
-    RTPS_DllAPI TypeSupport get_type() const;
-
-    /**
-     * Waits the current thread until all writers have received their acknowledgments.
-     * @param max_wait Maximum blocking time for this operation
-     * @return RETCODE_OK if the DataWriter receive the acknowledgments before the time expires and RETCODE_ERROR otherwise
-     */
-    RTPS_DllAPI ReturnCode_t wait_for_acknowledgments(
-            const fastrtps::Duration_t& max_wait);
-
-    /**
-     * @brief Returns the offered deadline missed status
-     * @param status Deadline missed status struct
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_offered_deadline_missed_status(
-            fastrtps::OfferedDeadlineMissedStatus& status);
-
-    /**
-     * Establishes the DataWriterQos for this DataWriter.
-     * @param qos DataWriterQos to be set
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const DataWriterQos& qos);
-
-    /**
-     * Retrieves the DataWriterQos for this DataWriter.
-     * @return Reference to the current DataWriterQos
-     */
-    RTPS_DllAPI const DataWriterQos& get_qos() const;
-
-    /**
-     * Fills the DataWriterQos with the values of this DataWriter.
-     * @param qos DataWriterQos object where the qos is returned.
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            DataWriterQos& qos) const;
-
-    /**
-     * Retrieves the topic for this DataWriter.
-     * @return Pointer to the associated Topic
-     */
-    RTPS_DllAPI Topic* get_topic() const;
-
-    /**
-     * Retrieves the listener for this DataWriter.
-     * @return Pointer to the DataWriterListener
-     */
-    RTPS_DllAPI const DataWriterListener* get_listener() const;
-
-    /**
-     * Establishes the listener for this DataWriter.
-     * @param listener Pointer to DataWriterListener to be set
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            DataWriterListener* listener);
-
-    /* TODO
-       bool get_key_value(
-            void* key_holder,
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /**
-     * @brief This operation requests the middleware to delete the data (the actual deletion is postponed until there is no
-     * more use for that data in the whole system). In general, applications are made aware of the deletion by means of
-     * operations on the DataReader objects that already knew that instance. This operation does not modify the value of
-     * the instance. The instance parameter is passed just for the purposes of identifying the instance.
-     * When this operation is used, the Service will automatically supply the value of the source_timestamp that is made
-     * available to DataReader objects by means of the source_timestamp attribute inside the SampleInfo. The constraints
-     * on the values of the handle parameter and the corresponding error behavior are the same specified for the
-     * unregister_instance operation.
-     * @param[in] data Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
-     * @param[in] handle InstanceHandle of the data
-     * @return RETCODE_PRECONDITION_NOT_MET if the handle introduced does not match with the one associated to the data,
-     * RETCODE_OK if the data is correctly sent and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t dispose(
-            void* data,
-            const fastrtps::rtps::InstanceHandle_t& handle);
-
-    /**
-     * @brief Returns the liveliness lost status
-     * @param status Liveliness lost status struct
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_liveliness_lost_status(
-            LivelinessLostStatus& status);
-
-    /* TODO
-       bool get_offered_incompatible_qos_status(
-            OfferedIncompatibleQosStatus& status)
-       {
-        // Not implemented
-        (void)status;
-        return false;
-       }
-     */
-
-    /**
-     * @brief Getter for the Publisher that creates this DataWriter
-     * @return Pointer to the Publisher
-     */
-    RTPS_DllAPI const Publisher* get_publisher() const;
-
-    /**
-     * @brief This operation manually asserts the liveliness of the DataWriter. This is used in combination with the
-     * LivelinessQosPolicy to indicate to the Service that the entity remains active.
-     * This operation need only be used if the LIVELINESS setting is either MANUAL_BY_PARTICIPANT or MANUAL_BY_TOPIC.
-     * Otherwise, it has no effect.
-     * @note Writing data via the write operation on a DataWriter asserts liveliness on the DataWriter itself and its
-     * DomainParticipant. Consequently the use of assert_liveliness is only needed if the application is not writing data
-     * regularly.
-     * @return RETCODE_OK if asserted, RETCODE_ERROR otherwise
-     */
-    RTPS_DllAPI ReturnCode_t assert_liveliness();
-
-    /**
-     * @brief Clears the DataWriter history
-     * @param removed size_t pointer to return the size of the data removed
-     * @return RETCODE_OK if the samples are removed and RETCODE_ERROR otherwise
-     */
-    RTPS_DllAPI ReturnCode_t clear_history(
-            size_t* removed);
-
-private:
-
-    DataWriterImpl* impl_;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif //_FASTRTPS_DATAWRITER_HPP_

+ 0 - 114
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/DataWriterListener.hpp

@@ -1,114 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataWriterListener.hpp
- */
-
-#ifndef _FASTRTPS_DATAWRITERLISTENER_HPP_
-#define _FASTRTPS_DATAWRITERLISTENER_HPP_
-
-#include <fastdds/rtps/common/Types.h>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-#include <fastdds/dds/core/status/PublicationMatchedStatus.hpp>
-#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
-#include <fastdds/dds/core/status/DeadlineMissedStatus.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DataWriter;
-
-/**
- * Class DataWriterListener, allows the end user to implement callbacks triggered by certain events.
- * @ingroup FASTDDS_MODULE
- */
-class RTPS_DllAPI DataWriterListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    DataWriterListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~DataWriterListener()
-    {
-    }
-
-    /**
-     * This method is called when the Publisher is matched (or unmatched) against an endpoint.
-     * @param writer Pointer to the associated Publisher
-     * @param info Information regarding the matched subscriber
-     */
-    virtual void on_publication_matched(
-            DataWriter* writer,
-            const PublicationMatchedStatus& info)
-    {
-        (void)writer;
-        (void)info;
-    }
-
-    /**
-     * A method called when a deadline is missed
-     * @param writer Pointer to the associated Publisher
-     * @param status The deadline missed status
-     */
-    virtual void on_offered_deadline_missed(
-            DataWriter* writer,
-            const OfferedDeadlineMissedStatus& status)
-    {
-        (void)writer;
-        (void)status;
-    }
-
-    /**
-     * A method called when an incompatible QoS is offered
-     * @param writer Pointer to the associated Publisher
-     * @param status The deadline missed status
-     */
-    virtual void on_offered_incompatible_qos(
-            DataWriter* writer,
-            const OfferedIncompatibleQosStatus& status)
-    {
-        (void)writer;
-        (void)status;
-    }
-
-    /**
-     * @brief Method called when the livelivess of a publisher is lost
-     * @param writer The publisher
-     * @param status The liveliness lost status
-     */
-    virtual void on_liveliness_lost(
-            DataWriter* writer,
-            const LivelinessLostStatus& status)
-    {
-        (void)writer;
-        (void)status;
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTRTPS_DATAWRITERLISTENER_HPP_ */

+ 0 - 303
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/Publisher.hpp

@@ -1,303 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Publisher.hpp
- *
- */
-
-#ifndef _FASTDDS_PUBLISHER_HPP_
-#define _FASTDDS_PUBLISHER_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastrtps/attributes/PublisherAttributes.h>
-#include <fastrtps/types/TypesBase.h>
-#include <fastdds/dds/core/Entity.hpp>
-#include <fastdds/dds/publisher/qos/PublisherQos.hpp>
-#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace dds {
-namespace pub {
-class Publisher;
-}
-}
-
-namespace eprosima {
-namespace fastrtps {
-
-class TopicAttributes;
-
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-class PublisherListener;
-class PublisherImpl;
-class DataWriter;
-class DataWriterListener;
-class Topic;
-
-/**
- * Class Publisher, used to send data to associated subscribers.
- * @ingroup FASTDDS_MODULE
- */
-class Publisher : public DomainEntity
-{
-    friend class PublisherImpl;
-    friend class DomainParticipantImpl;
-
-    /**
-     * Create a publisher, assigning its pointer to the associated writer.
-     * Don't use directly, create Publisher using create_publisher from Participant.
-     */
-    RTPS_DllAPI Publisher(
-            PublisherImpl* p,
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI Publisher(
-            DomainParticipant* dp,
-            const PublisherQos& qos = PUBLISHER_QOS_DEFAULT,
-            PublisherListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-public:
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~Publisher();
-
-    /**
-     * @brief This operation enables the Publisher
-     * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the participant creating this
-     *         Publisher is not enabled.
-     */
-    RTPS_DllAPI ReturnCode_t enable() override;
-
-    /**
-     * Allows accessing the Publisher Qos.
-     * @return PublisherQos reference
-     */
-    RTPS_DllAPI const PublisherQos& get_qos() const;
-
-    /**
-     * Retrieves the Publisher Qos.
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            PublisherQos& qos) const;
-
-    /**
-     * Allows modifying the Publisher Qos.
-     * The given Qos must be supported by the PublisherQos.
-     * @param qos PublisherQos to be set
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const PublisherQos& qos);
-
-    /**
-     * Retrieves the attached PublisherListener.
-     * @return PublisherListener pointer
-     */
-    RTPS_DllAPI const PublisherListener* get_listener() const;
-
-    /**
-     * Modifies the PublisherListener.
-     * @param listener PublisherListener pointer
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            PublisherListener* listener);
-
-    /**
-     * This operation creates a DataWriter. The returned DataWriter will be attached and belongs to the Publisher.
-     * @param topic Topic the DataWriter will be listening
-     * @param qos QoS of the DataWriter.
-     * @param listener Pointer to the listener (default: nullptr).
-     * @param mask StatusMask (default: all).
-     * @return Pointer to the created DataWriter. nullptr if failed.
-     */
-    RTPS_DllAPI DataWriter* create_datawriter(
-            Topic* topic,
-            const DataWriterQos& qos,
-            DataWriterListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * This operation creates a DataWriter. The returned DataWriter will be attached and belongs to the Publisher.
-     * @param topic Topic the DataWriter will be listening
-     * @param profile_name DataWriter profile name.
-     * @param listener Pointer to the listener (default: nullptr).
-     * @param mask StatusMask (default: all).
-     * @return Pointer to the created DataWriter. nullptr if failed.
-     */
-    RTPS_DllAPI DataWriter* create_datawriter_with_profile(
-            Topic* topic,
-            const std::string& profile_name,
-            DataWriterListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * This operation deletes a DataWriter that belongs to the Publisher.
-     *
-     * The delete_datawriter operation must be called on the same Publisher object used to create the DataWriter.
-     * If delete_datawriter is called on a different Publisher, the operation will have no effect and it will
-     * return false.
-     *
-     * The deletion of the DataWriter will automatically unregister all instances.
-     * Depending on the settings of the WRITER_DATA_LIFECYCLE QosPolicy, the deletion of the DataWriter
-     * may also dispose all instances.
-     * @param writer DataWriter to delete
-     * @return RETCODE_PRECONDITION_NOT_MET if it does not belong to this Publisher, RETCODE_OK if it is correctly deleted and
-     * RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t delete_datawriter(
-            DataWriter* writer);
-
-    /**
-     * This operation retrieves a previously created DataWriter belonging to the Publisher that is attached to a
-     * Topic with a matching topic_name. If no such DataWriter exists, the operation will return nullptr.
-     *
-     * If multiple DataWriter attached to the Publisher satisfy this condition, then the operation will return
-     * one of them. It is not specified which one.
-     * @param topic_name Name of the Topic
-     * @return Pointer to a previously created DataWriter associated to a Topic with the requested topic_name
-     */
-    RTPS_DllAPI DataWriter* lookup_datawriter(
-            const std::string& topic_name) const;
-
-    /**
-     * Fills the given vector with all the datawriters of this publisher.
-     * @param writers Vector where the DataWriters are returned
-     * @return true
-     */
-    RTPS_DllAPI bool get_datawriters(
-            std::vector<DataWriter*>& writers) const;
-
-    /**
-     * This operation checks if the publisher has DataWriters
-     * @return true if the publisher has one or several DataWriters, false otherwise
-     */
-    RTPS_DllAPI bool has_datawriters() const;
-
-    /* TODO
-       bool suspend_publications();
-     */
-
-    /* TODO
-       bool resume_publications();
-     */
-
-    /* TODO
-       bool begin_coherent_changes();
-     */
-
-    /* TODO
-       bool end_coherent_changes();
-     */
-
-    /**
-     * This operation blocks the calling thread until either all data written by the reliable DataWriter entities
-     * is acknowledged by all matched reliable DataReader entities, or else the duration specified by the max_wait
-     * parameter elapses, whichever happens first. A return value of true indicates that all the samples written
-     * have been acknowledged by all reliable matched data readers; a return value of false indicates that max_wait
-     * elapsed before all the data was acknowledged.
-     * @param max_wait Maximum blocking time for this operation
-     * @return RETCODE_TIMEOUT if the function takes more than the maximum blocking time established, RETCODE_OK if the
-     * Publisher receives the acknowledgments and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t wait_for_acknowledgments(
-            const fastrtps::Duration_t& max_wait);
-
-    /**
-     * This operation returns the DomainParticipant to which the Publisher belongs.
-     * @return Pointer to the DomainParticipant
-     */
-    RTPS_DllAPI const DomainParticipant* get_participant() const;
-
-    /* TODO
-       bool delete_contained_entities();
-     */
-
-    /**
-     * This operation sets a default value of the DataWriter QoS policies which will be used for newly created
-     * DataWriter entities in the case where the QoS policies are defaulted in the create_datawriter operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not, the operation
-     * will have no effect and return false.
-     *
-     * The special value DATAWRITER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS
-     * should be reset back to the initial values the factory would use, that is the values that would be used
-     * if the set_default_datawriter_qos operation had never been called.
-     * @param qos DataWriterQos to be set
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_datawriter_qos(
-            const DataWriterQos& qos);
-
-    /**
-     * This operation returns the default value of the DataWriter QoS, that is, the QoS policies which will be used
-     * for newly created DataWriter entities in the case where the QoS policies are defaulted in the
-     * create_datawriter operation.
-     *
-     * The values retrieved by get_default_datawriter_qos will match the set of values specified on the last
-     * successful call to set_default_datawriter_qos, or else, if the call was never made, the default values.
-     * @return Current default WriterQos
-     */
-    RTPS_DllAPI const DataWriterQos& get_default_datawriter_qos() const;
-
-    /**
-     * This operation retrieves the default value of the DataWriter QoS, that is, the QoS policies which will be used
-     * for newly created DataWriter entities in the case where the QoS policies are defaulted in the
-     * create_datawriter operation.
-     *
-     * The values retrieved by get_default_datawriter_qos will match the set of values specified on the last
-     * successful call to set_default_datawriter_qos, or else, if the call was never made, the default values.
-     * @param qos Reference to the current default WriterQos.
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_datawriter_qos(
-            DataWriterQos& qos) const;
-
-    /* TODO
-       bool copy_from_topic_qos(
-            WriterQos& writer_qos,
-            const fastrtps::TopicAttributes& topic_qos) const;
-     */
-
-    /**
-     * Returns the Publisher's handle.
-     * @return InstanceHandle of this Publisher.
-     */
-    RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const;
-
-private:
-
-    PublisherImpl* impl_;
-
-    friend class ::dds::pub::Publisher;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_PUBLISHER_HPP_ */

+ 0 - 62
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/PublisherListener.hpp

@@ -1,62 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file PublisherListener.hpp
- */
-
-#ifndef _FASTDDS_PUBLISHERLISTENER_HPP_
-#define _FASTDDS_PUBLISHERLISTENER_HPP_
-
-#include <fastrtps/qos/DeadlineMissedStatus.h>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-#include <fastdds/dds/core/status/PublicationMatchedStatus.hpp>
-#include <fastdds/dds/publisher/DataWriterListener.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class Publisher;
-
-/**
- * Class PublisherListener, allows the end user to implement callbacks triggered by certain events.
- * It inherits all the DataWriterListener callbacks.
- * @ingroup FASTDDS_MODULE
- */
-class PublisherListener : public DataWriterListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI PublisherListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~PublisherListener()
-    {
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_PUBLISHERLISTENER_HPP_ */

+ 0 - 810
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/DataWriterQos.hpp

@@ -1,810 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataWriterQos.hpp
- */
-
-
-#ifndef _FASTDDS_DATAWRITERQOS_HPP
-#define _FASTDDS_DATAWRITERQOS_HPP
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-#include <fastdds/dds/publisher/qos/WriterQos.hpp>
-#include <fastdds/dds/publisher/qos/PublisherQos.hpp>
-#include <fastdds/dds/core/policy/WriterDataLifecycleQosPolicy.hpp>
-#include <fastdds/dds/publisher/qos/PublisherQos.hpp>
-#include <fastdds/dds/publisher/qos/WriterQos.hpp>
-#include <fastdds/dds/topic/qos/TopicQos.hpp>
-#include <fastdds/rtps/attributes/WriterAttributes.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-//! Qos Policy to configure the DisablePositiveACKsQos and the writer timing attributes
-class RTPSReliableWriterQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI RTPSReliableWriterQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~RTPSReliableWriterQos() = default;
-
-    bool operator ==(
-            const RTPSReliableWriterQos& b) const
-    {
-        return (this->times == b.times) &&
-               (this->disable_positive_acks == b.disable_positive_acks);
-    }
-
-    //!Writer Timing Attributes
-    fastrtps::rtps::WriterTimes times;
-
-    //!Disable positive acks QoS, implemented in the library.
-    DisablePositiveACKsQosPolicy disable_positive_acks;
-};
-
-/**
- * Class DataWriterQos, containing all the possible Qos that can be set for a determined DataWriter.
- * Although these values can be  and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class DataWriterQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DataWriterQos();
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI ~DataWriterQos() = default;
-
-    RTPS_DllAPI bool operator ==(
-            const DataWriterQos& b) const
-    {
-        return (this->durability_ == b.durability()) &&
-               (this->durability_service_ == b.durability_service()) &&
-               (this->deadline_ == b.deadline()) &&
-               (this->latency_budget_ == b.latency_budget()) &&
-               (this->liveliness_ == b.liveliness()) &&
-               (this->reliability_ == b.reliability()) &&
-               (this->destination_order_ == b.destination_order()) &&
-               (this->history_ == b.history()) &&
-               (this->resource_limits_ == b.resource_limits()) &&
-               (this->transport_priority_ == b.transport_priority()) &&
-               (this->lifespan_ == b.lifespan()) &&
-               (this->user_data_ == b.user_data()) &&
-               (this->ownership_ == b.ownership()) &&
-               (this->ownership_strength_ == b.ownership_strength()) &&
-               (this->writer_data_lifecycle_ == b.writer_data_lifecycle()) &&
-               (this->publish_mode_ == b.publish_mode()) &&
-               (this->representation_ == b.representation()) &&
-               (this->properties_ == b.properties()) &&
-               (this->reliable_writer_qos_ == b.reliable_writer_qos()) &&
-               (this->endpoint_ == b.endpoint()) &&
-               (this->writer_resource_limits_ == b.writer_resource_limits()) &&
-               (this->throughput_controller_ == b.throughput_controller());
-    }
-
-    RTPS_DllAPI WriterQos get_writerqos(
-            const PublisherQos& pqos,
-            const TopicQos& tqos) const;
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQosPolicy reference
-     */
-    RTPS_DllAPI DurabilityQosPolicy& durability()
-    {
-        return durability_;
-    }
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQosPolicy reference
-     */
-    RTPS_DllAPI const DurabilityQosPolicy& durability() const
-    {
-        return durability_;
-    }
-
-    /**
-     * Setter for DurabilityQosPolicy
-     * @param durability new value for the DurabilityQosPolicy
-     */
-    RTPS_DllAPI void durability(
-            const DurabilityQosPolicy& durability)
-    {
-        durability_ = durability;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQosPolicy reference
-     */
-    RTPS_DllAPI DurabilityServiceQosPolicy& durability_service()
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQosPolicy reference
-     */
-    RTPS_DllAPI const DurabilityServiceQosPolicy& durability_service() const
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Setter for DurabilityServiceQosPolicy
-     * @param durability_service new value for the DurabilityServiceQosPolicy
-     */
-    RTPS_DllAPI void durability_service(
-            const DurabilityServiceQosPolicy& durability_service)
-    {
-        durability_service_ = durability_service;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQosPolicy reference
-     */
-    RTPS_DllAPI DeadlineQosPolicy& deadline()
-    {
-        return deadline_;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQosPolicy reference
-     */
-    RTPS_DllAPI const DeadlineQosPolicy& deadline() const
-    {
-        return deadline_;
-    }
-
-    /**
-     * Setter for DeadlineQosPolicy
-     * @param deadline new value for the DeadlineQosPolicy
-     */
-    RTPS_DllAPI void deadline(
-            const DeadlineQosPolicy& deadline)
-    {
-        deadline_ = deadline;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQosPolicy reference
-     */
-    RTPS_DllAPI LatencyBudgetQosPolicy& latency_budget()
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQosPolicy reference
-     */
-    RTPS_DllAPI const LatencyBudgetQosPolicy& latency_budget() const
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Setter for LatencyBudgetQosPolicy
-     * @param latency_budget new value for the LatencyBudgetQosPolicy
-     */
-    RTPS_DllAPI void latency_budget(
-            const LatencyBudgetQosPolicy& latency_budget)
-    {
-        latency_budget_ = latency_budget;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQosPolicy reference
-     */
-    RTPS_DllAPI LivelinessQosPolicy& liveliness()
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQosPolicy reference
-     */
-    RTPS_DllAPI const LivelinessQosPolicy& liveliness() const
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Setter for LivelinessQosPolicy
-     * @param liveliness new value for the LivelinessQosPolicy
-     */
-    RTPS_DllAPI void liveliness(
-            const LivelinessQosPolicy& liveliness)
-    {
-        liveliness_ = liveliness;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQosPolicy reference
-     */
-    RTPS_DllAPI ReliabilityQosPolicy& reliability()
-    {
-        return reliability_;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQosPolicy reference
-     */
-    RTPS_DllAPI const ReliabilityQosPolicy& reliability() const
-    {
-        return reliability_;
-    }
-
-    /**
-     * Setter for ReliabilityQosPolicy
-     * @param reliability new value for the ReliabilityQosPolicy
-     */
-    RTPS_DllAPI void reliability(
-            const ReliabilityQosPolicy& reliability)
-    {
-        reliability_ = reliability;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQosPolicy reference
-     */
-    RTPS_DllAPI DestinationOrderQosPolicy& destination_order()
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQosPolicy reference
-     */
-    RTPS_DllAPI const DestinationOrderQosPolicy& destination_order() const
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Setter for DestinationOrderQosPolicy
-     * @param destination_order new value for the DestinationOrderQosPolicy
-     */
-    RTPS_DllAPI void destination_order(
-            const DestinationOrderQosPolicy& destination_order)
-    {
-        destination_order_ = destination_order;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQosPolicy reference
-     */
-    RTPS_DllAPI HistoryQosPolicy& history()
-    {
-        return history_;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQosPolicy reference
-     */
-    RTPS_DllAPI const HistoryQosPolicy& history() const
-    {
-        return history_;
-    }
-
-    /**
-     * Setter for HistoryQosPolicy
-     * @param history new value for the HistoryQosPolicy
-     */
-    RTPS_DllAPI void history(
-            const HistoryQosPolicy& history)
-    {
-        history_ = history;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQosPolicy reference
-     */
-    RTPS_DllAPI ResourceLimitsQosPolicy& resource_limits()
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQosPolicy reference
-     */
-    RTPS_DllAPI const ResourceLimitsQosPolicy& resource_limits() const
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Setter for ResourceLimitsQosPolicy
-     * @param resource_limits new value for the ResourceLimitsQosPolicy
-     */
-    RTPS_DllAPI void resource_limits(
-            const ResourceLimitsQosPolicy& resource_limits)
-    {
-        resource_limits_ = resource_limits;
-    }
-
-    /**
-     * Getter for TransportPriorityQosPolicy
-     * @return TransportPriorityQosPolicy reference
-     */
-    RTPS_DllAPI TransportPriorityQosPolicy& transport_priority()
-    {
-        return transport_priority_;
-    }
-
-    /**
-     * Getter for TransportPriorityQosPolicy
-     * @return TransportPriorityQosPolicy reference
-     */
-    RTPS_DllAPI const TransportPriorityQosPolicy& transport_priority() const
-    {
-        return transport_priority_;
-    }
-
-    /**
-     * Setter for TransportPriorityQosPolicy
-     * @param transport_priority new value for the TransportPriorityQosPolicy
-     */
-    RTPS_DllAPI void transport_priority(
-            const TransportPriorityQosPolicy& transport_priority)
-    {
-        transport_priority_ = transport_priority;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQosPolicy reference
-     */
-    RTPS_DllAPI LifespanQosPolicy& lifespan()
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQosPolicy reference
-     */
-    RTPS_DllAPI const LifespanQosPolicy& lifespan() const
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Setter for LifespanQosPolicy
-     * @param lifespan new value for the LifespanQosPolicy
-     */
-    RTPS_DllAPI void lifespan(
-            const LifespanQosPolicy& lifespan)
-    {
-        lifespan_ = lifespan;
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy reference
-     */
-    RTPS_DllAPI UserDataQosPolicy& user_data()
-    {
-        return user_data_;
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy reference
-     */
-    RTPS_DllAPI const UserDataQosPolicy& user_data() const
-    {
-        return user_data_;
-    }
-
-    /**
-     * Setter for UserDataQosPolicy
-     * @param user_data new value for the UserDataQosPolicy
-     */
-    RTPS_DllAPI void user_data(
-            const UserDataQosPolicy& user_data)
-    {
-        user_data_ = user_data;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQosPolicy reference
-     */
-    RTPS_DllAPI OwnershipQosPolicy& ownership()
-    {
-        return ownership_;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQosPolicy reference
-     */
-    RTPS_DllAPI const OwnershipQosPolicy& ownership() const
-    {
-        return ownership_;
-    }
-
-    /**
-     * Setter for OwnershipQosPolicy
-     * @param ownership new value for the OwnershipQosPolicy
-     */
-    RTPS_DllAPI void ownership(
-            const OwnershipQosPolicy& ownership)
-    {
-        ownership_ = ownership;
-    }
-
-    /**
-     * Getter for OwnershipStrengthQosPolicy
-     * @return OwnershipStrengthQosPolicy reference
-     */
-    RTPS_DllAPI OwnershipStrengthQosPolicy& ownership_strength()
-    {
-        return ownership_strength_;
-    }
-
-    /**
-     * Getter for OwnershipStrengthQosPolicy
-     * @return OwnershipStrengthQosPolicy reference
-     */
-    RTPS_DllAPI const OwnershipStrengthQosPolicy& ownership_strength() const
-    {
-        return ownership_strength_;
-    }
-
-    /**
-     * Setter for OwnershipStrengthQosPolicy
-     * @param ownership_strength new value for the OwnershipStrengthQosPolicy
-     */
-    RTPS_DllAPI void ownership_strength(
-            const OwnershipStrengthQosPolicy& ownership_strength)
-    {
-        ownership_strength_ = ownership_strength;
-    }
-
-    /**
-     * Getter for WriterDataLifecycleQosPolicy
-     * @return WriterDataLifecycleQosPolicy reference
-     */
-    RTPS_DllAPI WriterDataLifecycleQosPolicy& writer_data_lifecycle()
-    {
-        return writer_data_lifecycle_;
-    }
-
-    /**
-     * Getter for WriterDataLifecycleQosPolicy
-     * @return WriterDataLifecycleQosPolicy reference
-     */
-    RTPS_DllAPI const WriterDataLifecycleQosPolicy& writer_data_lifecycle() const
-    {
-        return writer_data_lifecycle_;
-    }
-
-    /**
-     * Setter for WriterDataLifecycleQosPolicy
-     * @param writer_data_lifecycle new value for the WriterDataLifecycleQosPolicy
-     */
-    RTPS_DllAPI void writer_data_lifecycle(
-            const WriterDataLifecycleQosPolicy& writer_data_lifecycle)
-    {
-        writer_data_lifecycle_ = writer_data_lifecycle;
-    }
-
-    /**
-     * Getter for PublishModeQosPolicy
-     * @return PublishModeQosPolicy reference
-     */
-    RTPS_DllAPI PublishModeQosPolicy& publish_mode()
-    {
-        return publish_mode_;
-    }
-
-    /**
-     * Getter for PublishModeQosPolicy
-     * @return PublishModeQosPolicy reference
-     */
-    RTPS_DllAPI const PublishModeQosPolicy& publish_mode() const
-    {
-        return publish_mode_;
-    }
-
-    /**
-     * Setter for PublishModeQosPolicy
-     * @param publish_mode new value for the PublishModeQosPolicy
-     */
-    RTPS_DllAPI void publish_mode(
-            const PublishModeQosPolicy& publish_mode)
-    {
-        publish_mode_ = publish_mode;
-    }
-
-    /**
-     * Getter for DataRepresentationQosPolicy
-     * @return DataRepresentationQosPolicy reference
-     */
-    RTPS_DllAPI DataRepresentationQosPolicy& representation()
-    {
-        return representation_;
-    }
-
-    /**
-     * Getter for DataRepresentationQosPolicy
-     * @return DataRepresentationQosPolicy reference
-     */
-    RTPS_DllAPI const DataRepresentationQosPolicy& representation() const
-    {
-        return representation_;
-    }
-
-    /**
-     * Setter for DataRepresentationQosPolicy
-     * @param representation new value for the DataRepresentationQosPolicy
-     */
-    RTPS_DllAPI void representation(
-            const DataRepresentationQosPolicy& representation)
-    {
-        representation_ = representation;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos reference
-     */
-    RTPS_DllAPI PropertyPolicyQos& properties()
-    {
-        return properties_;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos reference
-     */
-    RTPS_DllAPI const PropertyPolicyQos& properties() const
-    {
-        return properties_;
-    }
-
-    /**
-     * Setter for PropertyPolicyQos
-     * @param properties new value for the PropertyPolicyQos
-     */
-    RTPS_DllAPI void properties(
-            const PropertyPolicyQos& properties)
-    {
-        properties_ = properties;
-    }
-
-    /**
-     * Getter for RTPSReliableWriterQos
-     * @return RTPSReliableWriterQos reference
-     */
-    RTPS_DllAPI RTPSReliableWriterQos& reliable_writer_qos()
-    {
-        return reliable_writer_qos_;
-    }
-
-    /**
-     * Getter for RTPSReliableWriterQos
-     * @return RTPSReliableWriterQos reference
-     */
-    RTPS_DllAPI const RTPSReliableWriterQos& reliable_writer_qos() const
-    {
-        return reliable_writer_qos_;
-    }
-
-    /**
-     * Setter for RTPSReliableWriterQos
-     * @param reliable_writer_qos new value for the RTPSReliableWriterQos
-     */
-    RTPS_DllAPI void reliable_writer_qos(
-            const RTPSReliableWriterQos& reliable_writer_qos)
-    {
-        reliable_writer_qos_ = reliable_writer_qos;
-    }
-
-    /**
-     * Getter for RTPSEndpointQos
-     * @return RTPSEndpointQos reference
-     */
-    RTPS_DllAPI RTPSEndpointQos& endpoint()
-    {
-        return endpoint_;
-    }
-
-    /**
-     * Getter for RTPSEndpointQos
-     * @return RTPSEndpointQos reference
-     */
-    RTPS_DllAPI const RTPSEndpointQos& endpoint() const
-    {
-        return endpoint_;
-    }
-
-    /**
-     * Setter for RTPSEndpointQos
-     * @param endpoint new value for the RTPSEndpointQos
-     */
-    RTPS_DllAPI void endpoint(
-            const RTPSEndpointQos& endpoint)
-    {
-        endpoint_ = endpoint;
-    }
-
-    /**
-     * Getter for WriterResourceLimitsQos
-     * @return WriterResourceLimitsQos reference
-     */
-    RTPS_DllAPI WriterResourceLimitsQos& writer_resource_limits()
-    {
-        return writer_resource_limits_;
-    }
-
-    /**
-     * Getter for WriterResourceLimitsQos
-     * @return WriterResourceLimitsQos reference
-     */
-    RTPS_DllAPI const WriterResourceLimitsQos& writer_resource_limits() const
-    {
-        return writer_resource_limits_;
-    }
-
-    /**
-     * Setter for WriterResourceLimitsQos
-     * @param writer_resource_limits new value for the WriterResourceLimitsQos
-     */
-    RTPS_DllAPI void writer_resource_limits(
-            const WriterResourceLimitsQos& writer_resource_limits)
-    {
-        writer_resource_limits_ = writer_resource_limits;
-    }
-
-    /**
-     * Getter for ThroughputControllerDescriptor
-     * @return ThroughputControllerDescriptor reference
-     */
-    RTPS_DllAPI fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller()
-    {
-        return throughput_controller_;
-    }
-
-    /**
-     * Getter for ThroughputControllerDescriptor
-     * @return ThroughputControllerDescriptor reference
-     */
-    RTPS_DllAPI const fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller() const
-    {
-        return throughput_controller_;
-    }
-
-    /**
-     * Setter for ThroughputControllerDescriptor
-     * @param throughput_controller new value for the ThroughputControllerDescriptor
-     */
-    RTPS_DllAPI void throughput_controller(
-            const fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller)
-    {
-        throughput_controller_ = throughput_controller;
-    }
-
-private:
-
-    //!Durability Qos, implemented in the library.
-    DurabilityQosPolicy durability_;
-
-    //!Durability Service Qos, NOT implemented in the library.
-    DurabilityServiceQosPolicy durability_service_;
-
-    //!Deadline Qos, implemented in the library.
-    DeadlineQosPolicy deadline_;
-
-    //!Latency Budget Qos, NOT implemented in the library.
-    LatencyBudgetQosPolicy latency_budget_;
-
-    //!Liveliness Qos, implemented in the library.
-    LivelinessQosPolicy liveliness_;
-
-    //!Reliability Qos, implemented in the library.
-    ReliabilityQosPolicy reliability_;
-
-    //!Destination Order Qos, NOT implemented in the library.
-    DestinationOrderQosPolicy destination_order_;
-
-    //!History Qos, implemented in the library.
-    HistoryQosPolicy history_;
-
-    //!Resource Limits Qos, implemented in the library.
-    ResourceLimitsQosPolicy resource_limits_;
-
-    //!Transport Priority Qos, NOT implemented in the library.
-    TransportPriorityQosPolicy transport_priority_;
-
-    //!Lifespan Qos, implemented in the library.
-    LifespanQosPolicy lifespan_;
-
-    //!User Data Qos, implemented in the library.
-    UserDataQosPolicy user_data_;
-
-    //!Ownership Qos, implemented in the library.
-    OwnershipQosPolicy ownership_;
-
-    //!Ownership Strength Qos, implemented in the library.
-    OwnershipStrengthQosPolicy ownership_strength_;
-
-    //!Writer Data Lifecycle Qos, NOT implemented in the library.
-    WriterDataLifecycleQosPolicy writer_data_lifecycle_;
-
-    //!Publication Mode Qos, implemented in the library.
-    PublishModeQosPolicy publish_mode_;
-
-    //!Data Representation Qos, implemented in the library.
-    DataRepresentationQosPolicy representation_;
-
-    //!Property policies
-    PropertyPolicyQos properties_;
-
-    //!RTPS Reliable Writer Qos
-    RTPSReliableWriterQos reliable_writer_qos_;
-
-    //!RTPS Endpoint Qos
-    RTPSEndpointQos endpoint_;
-
-    //!Writer Resource Limits Qos
-    WriterResourceLimitsQos writer_resource_limits_;
-
-    //!Throughput controller
-    fastrtps::rtps::ThroughputControllerDescriptor throughput_controller_;
-};
-
-RTPS_DllAPI extern const DataWriterQos DATAWRITER_QOS_DEFAULT;
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_DATAWRITERQOS_HPP

+ 0 - 197
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/PublisherQos.hpp

@@ -1,197 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file PublisherQos.hpp
- */
-
-
-#ifndef _FASTDDS_PUBLISHERQOS_HPP_
-#define _FASTDDS_PUBLISHERQOS_HPP_
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-#include <fastrtps/attributes/PublisherAttributes.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class PublisherQos, containing all the possible Qos that can be set for a determined Publisher.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been
- * implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class PublisherQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI PublisherQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~PublisherQos() = default;
-
-    bool operator ==(
-            const PublisherQos& b) const
-    {
-        return (this->presentation_ == b.presentation()) &&
-               (this->partition_ == b.partition()) &&
-               (this->group_data_ == b.group_data()) &&
-               (this->entity_factory_ == b.entity_factory());
-    }
-
-    /**
-     * Getter for PresentationQosPolicy
-     * @return PresentationQosPolicy reference
-     */
-    const PresentationQosPolicy& presentation() const
-    {
-        return presentation_;
-    }
-
-    /**
-     * Getter for PresentationQosPolicy
-     * @return PresentationQosPolicy reference
-     */
-    PresentationQosPolicy& presentation()
-    {
-        return presentation_;
-    }
-
-    /**
-     * Setter for PresentationQosPolicy
-     * @param presentation PresentationQosPolicy
-     */
-    void presentation(
-            const PresentationQosPolicy& presentation)
-    {
-        presentation_ = presentation;
-    }
-
-    /**
-     * Getter for PartitionQosPolicy
-     * @return PartitionQosPolicy reference
-     */
-    const PartitionQosPolicy& partition() const
-    {
-        return partition_;
-    }
-
-    /**
-     * Getter for PartitionQosPolicy
-     * @return PartitionQosPolicy reference
-     */
-    PartitionQosPolicy& partition()
-    {
-        return partition_;
-    }
-
-    /**
-     * Setter for PartitionQosPolicy
-     * @param partition PartitionQosPolicy
-     */
-    void partition(
-            const PartitionQosPolicy& partition)
-    {
-        partition_ = partition;
-    }
-
-    /**
-     * Getter for GroupDataQosPolicy
-     * @return GroupDataQosPolicy reference
-     */
-    const GroupDataQosPolicy& group_data() const
-    {
-        return group_data_;
-    }
-
-    /**
-     * Getter for GroupDataQosPolicy
-     * @return GroupDataQosPolicy reference
-     */
-    GroupDataQosPolicy& group_data()
-    {
-        return group_data_;
-    }
-
-    /**
-     * Setter for GroupDataQosPolicy
-     * @param group_data GroupDataQosPolicy
-     */
-    void group_data(
-            const GroupDataQosPolicy& group_data)
-    {
-        group_data_ = group_data;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    const EntityFactoryQosPolicy& entity_factory() const
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    EntityFactoryQosPolicy& entity_factory()
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Setter for EntityFactoryQosPolicy
-     * @param entity_factory EntityFactoryQosPolicy
-     */
-    void entity_factory(
-            const EntityFactoryQosPolicy& entity_factory)
-    {
-        entity_factory_ = entity_factory;
-    }
-
-private:
-
-    //!Presentation Qos, NOT implemented in the library.
-    PresentationQosPolicy presentation_;
-
-    //!Partition Qos, implemented in the library.
-    PartitionQosPolicy partition_;
-
-    //!Group Data Qos, implemented in the library.
-    GroupDataQosPolicy group_data_;
-
-    //!Entity Factory Qos, implemented in the library
-    EntityFactoryQosPolicy entity_factory_;
-
-};
-
-RTPS_DllAPI extern const PublisherQos PUBLISHER_QOS_DEFAULT;
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_PUBLISHERQOS_HPP_

+ 0 - 151
thirdpartylib/FastRTPS/include/fastdds/dds/publisher/qos/WriterQos.hpp

@@ -1,151 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file WriterQos.hpp
- *
- */
-
-#ifndef _FASTDDS_DDS_QOS_WRITERQOS_HPP_
-#define _FASTDDS_DDS_QOS_WRITERQOS_HPP_
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class WriterQos, containing all the possible Qos that can be set for a determined Publisher.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTRTPS_ATTRIBUTES_MODULE
- */
-class WriterQos
-{
-public:
-
-    RTPS_DllAPI WriterQos();
-    RTPS_DllAPI virtual ~WriterQos();
-
-    bool operator ==(
-            const WriterQos& b) const
-    {
-        return (this->m_durability == b.m_durability) &&
-               (this->m_durabilityService == b.m_durabilityService) &&
-               (this->m_deadline == b.m_deadline) &&
-               (this->m_latencyBudget == b.m_latencyBudget) &&
-               (this->m_liveliness == b.m_liveliness) &&
-               (this->m_reliability == b.m_reliability) &&
-               (this->m_lifespan == b.m_lifespan) &&
-               (this->m_userData == b.m_userData) &&
-               (this->m_timeBasedFilter == b.m_timeBasedFilter) &&
-               (this->m_ownership == b.m_ownership) &&
-               (this->m_ownershipStrength == b.m_ownershipStrength) &&
-               (this->m_destinationOrder == b.m_destinationOrder) &&
-               (this->m_presentation == b.m_presentation) &&
-               (this->m_partition == b.m_partition) &&
-               (this->m_topicData == b.m_topicData) &&
-               (this->m_groupData == b.m_groupData) &&
-               (this->m_publishMode == b.m_publishMode) &&
-               (this->m_disablePositiveACKs == b.m_disablePositiveACKs) &&
-               (this->representation == b.representation);
-    }
-
-    //!Durability Qos, implemented in the library.
-    DurabilityQosPolicy m_durability;
-
-    //!Durability Service Qos, NOT implemented in the library.
-    DurabilityServiceQosPolicy m_durabilityService;
-
-    //!Deadline Qos, implemented in the library.
-    DeadlineQosPolicy m_deadline;
-
-    //!Latency Budget Qos, NOT implemented in the library.
-    LatencyBudgetQosPolicy m_latencyBudget;
-
-    //!Liveliness Qos, implemented in the library.
-    LivelinessQosPolicy m_liveliness;
-
-    //!Reliability Qos, implemented in the library.
-    ReliabilityQosPolicy m_reliability;
-
-    //!Lifespan Qos, NOT implemented in the library.
-    LifespanQosPolicy m_lifespan;
-
-    //!UserData Qos, NOT implemented in the library.
-    UserDataQosPolicy m_userData;
-
-    //!Time Based Filter Qos, NOT implemented in the library.
-    TimeBasedFilterQosPolicy m_timeBasedFilter;
-
-    //!Ownership Qos, NOT implemented in the library.
-    OwnershipQosPolicy m_ownership;
-
-    //!Owenership Strength Qos, NOT implemented in the library.
-    OwnershipStrengthQosPolicy m_ownershipStrength;
-
-    //!Destination Order Qos, NOT implemented in the library.
-    DestinationOrderQosPolicy m_destinationOrder;
-
-    //!Presentation Qos, NOT implemented in the library.
-    PresentationQosPolicy m_presentation;
-
-    //!Partition Qos, implemented in the library.
-    PartitionQosPolicy m_partition;
-
-    //!Topic Data Qos, NOT implemented in the library.
-    TopicDataQosPolicy m_topicData;
-
-    //!Group Data Qos, NOT implemented in the library.
-    GroupDataQosPolicy m_groupData;
-
-    //!Publication Mode Qos, implemented in the library.
-    PublishModeQosPolicy m_publishMode;
-
-    //!Data Representation Qos, implemented in the library.
-    DataRepresentationQosPolicy representation;
-
-    //!Disable positive acks QoS, implemented in the library.
-    DisablePositiveACKsQosPolicy m_disablePositiveACKs;
-
-    /**
-     * Set Qos from another class
-     * @param qos Reference from a WriterQos object.
-     * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
-     */
-    RTPS_DllAPI void setQos(
-            const WriterQos& qos,
-            bool first_time);
-
-    /**
-     * Check if the Qos values are compatible between each other.
-     * @return True if correct.
-     */
-    RTPS_DllAPI bool checkQos() const;
-
-    RTPS_DllAPI bool canQosBeUpdated(
-            const WriterQos& qos) const;
-
-    void clear();
-};
-
-//RTPS_DllAPI extern const WriterQos DATAWRITER_QOS_DEFAULT;
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_WRITERQOS_HPP_

+ 0 - 305
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/DataReader.hpp

@@ -1,305 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataReader.hpp
- *
- */
-
-#ifndef _FASTRTPS_DATAREADER_HPP_
-#define _FASTRTPS_DATAREADER_HPP_
-#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
-
-#include <fastrtps/qos/DeadlineMissedStatus.h>
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastdds/dds/core/status/StatusMask.hpp>
-#include <fastdds/dds/core/Entity.hpp>
-#include <fastrtps/types/TypesBase.h>
-
-
-#include <vector>
-#include <cstdint>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace dds {
-namespace sub {
-
-class DataReader;
-
-} // namespace sub
-} // namespace dds
-
-namespace eprosima {
-namespace fastrtps {
-
-class TopicAttributes;
-
-namespace rtps {
-class ReaderAttributes;
-struct GUID_t;
-struct InstanceHandle_t;
-} // namespace rtps
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class Subscriber;
-class SubscriberImpl;
-class DataReaderImpl;
-class DataReaderListener;
-class TypeSupport;
-class DataReaderQos;
-class TopicDescription;
-struct LivelinessChangedStatus;
-struct SampleInfo;
-
-/**
- * Class DataReader, contains the actual implementation of the behaviour of the Subscriber.
- *  @ingroup FASTDDS_MODULE
- */
-class DataReader : public DomainEntity
-{
-    friend class DataReaderImpl;
-    friend class SubscriberImpl;
-
-    /**
-     * Creates a DataReader. Don't use it directly, but through Subscriber.
-     */
-    RTPS_DllAPI DataReader(
-            DataReaderImpl* impl,
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI DataReader(
-            Subscriber* s,
-            TopicDescription* topic,
-            const DataReaderQos& qos,
-            DataReaderListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-public:
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~DataReader();
-
-    /**
-     * @brief This operation enables the DataReader
-     * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the Subscriber creating this
-     *         DataReader is not enabled.
-     */
-    RTPS_DllAPI ReturnCode_t enable() override;
-
-    /**
-     * Method to block the current thread until an unread message is available
-     * @param timeout Max blocking time for this operation
-     * @return true if there is new unread message, false if timeout
-     */
-    RTPS_DllAPI bool wait_for_unread_message(
-            const fastrtps::Duration_t& timeout);
-
-
-    /** @name Read or take data methods.
-     * Methods to read or take data from the History.
-     */
-
-    ///@{
-
-    /* TODO
-       RTPS_DllAPI bool read(
-            std::vector<void*>& data_values,
-            std::vector<SampleInfo>& sample_infos,
-            uint32_t max_samples);
-     */
-
-    /**
-     * @brief This operation copies the next, non-previously accessed Data value from the DataReader; the operation also
-     * copies the corresponding SampleInfo. The implied order among the samples stored in the DataReader is the same as for
-     * the read operation.
-     *
-     * The read_next_sample operation is semantically equivalent to the read operation where the input Data sequence has
-     * max_length=1, the sample_states=NOT_READ, the view_states=ANY_VIEW_STATE, and the instance_states=ANY_INSTANCE_STATE.
-     *
-     * The read_next_sample operation provides a simplified API to ‘read’ samples avoiding the need for the application to
-     * manage sequences and specify states.
-     *
-     * If there is no unread data in the DataReader, the operation will return NO_DATA and nothing is copied
-     * @param data Data pointer to store the sample
-     * @param info SampleInfo pointer to store the sample information
-     * @return RETCODE_NO_DATA if the history is empty, RETCODE_OK if the next sample is returned and RETCODE_ERROR otherwise
-     */
-    RTPS_DllAPI ReturnCode_t read_next_sample(
-            void* data,
-            SampleInfo* info);
-
-    /* TODO
-       RTPS_DllAPI bool take(
-            std::vector<void*>& data_values,
-            std::vector<SampleInfo>& sample_infos,
-            uint32_t max_samples);
-     */
-
-    /**
-     * @brief This operation copies the next, non-previously accessed Data value from the DataReader and ‘removes’ it from
-     * the DataReader so it is no longer accessible. The operation also copies the corresponding SampleInfo. This operation
-     * is analogous to the read_next_sample except for the fact that the sample is ‘removed’ from the DataReader.
-     *
-     * The take_next_sample operation is semantically equivalent to the take operation where the input sequence has
-     * max_length=1, the sample_states=NOT_READ, the view_states=ANY_VIEW_STATE, and the instance_states=ANY_INSTANCE_STATE.
-     *
-     * This operation provides a simplified API to ’take’ samples avoiding the need for the application to manage sequences
-     * and specify states.
-     *
-     * If there is no unread data in the DataReader, the operation will return NO_DATA and nothing is copied.
-     * @param data Data pointer to store the sample
-     * @param info SampleInfo pointer to store the sample information
-     * @return RETCODE_NO_DATA if the history is empty, RETCODE_OK if the next sample is returned and RETCODE_ERROR otherwise
-     */
-    RTPS_DllAPI ReturnCode_t take_next_sample(
-            void* data,
-            SampleInfo* info);
-
-    ///@}
-
-    /**
-     * @brief Returns information about the first untaken sample.
-     * @param [out] info Pointer to a SampleInfo_t structure to store first untaken sample information.
-     * @return RETCODE_OK if sample info was returned. RETCODE_NO_DATA if there is no sample to take.
-     */
-    RTPS_DllAPI ReturnCode_t get_first_untaken_info(
-            SampleInfo* info);
-
-    /**
-     * Get associated GUID
-     * @return Associated GUID
-     */
-    RTPS_DllAPI const fastrtps::rtps::GUID_t& guid();
-
-    /**
-     * @brief Getter for the associated InstanceHandle
-     * @return Copy of the InstanceHandle
-     */
-    RTPS_DllAPI fastrtps::rtps::InstanceHandle_t get_instance_handle() const;
-
-    /**
-     * Getter for the data type
-     * @return TypeSupport associated to the DataReader
-     */
-    TypeSupport type();
-
-    /**
-     * Get TopicDescription
-     * @return TopicDescription pointer
-     */
-    const TopicDescription* get_topicdescription() const;
-
-    /**
-     * @brief Get the requested deadline missed status
-     * @return The deadline missed status
-     */
-    RTPS_DllAPI ReturnCode_t get_requested_deadline_missed_status(
-            fastrtps::RequestedDeadlineMissedStatus& status);
-
-    /**
-     * @brief Setter for the DataReaderQos
-     * @param qos new value for the DataReaderQos
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const DataReaderQos& qos);
-
-    /**
-     * @brief Getter for the DataReaderQos
-     * @return Pointer to the DataReaderQos
-     */
-    RTPS_DllAPI const DataReaderQos& get_qos() const;
-
-    /**
-     * @brief Getter for the DataReaderQos
-     * @param qos DataReaderQos where the qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            DataReaderQos& qos) const;
-
-    /**
-     * @brief Setter for the DataReaderListener
-     * @param listener new value for the DataReaderListener
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            DataReaderListener* listener);
-
-    /**
-     * @brief Getter for the DataReaderListener
-     * @return Pointer to the DataReaderListener
-     */
-    RTPS_DllAPI const DataReaderListener* get_listener() const;
-
-    /* TODO
-       RTPS_DllAPI bool get_key_value(
-            void* data,
-            const fastrtps::rtps::InstanceHandle_t& handle);
-     */
-
-    /**
-     * @brief Get the liveliness changed status
-     * @param status LivelinessChangedStatus object where the status is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_liveliness_changed_status(
-            LivelinessChangedStatus& status) const;
-
-    /* TODO
-       RTPS_DllAPI bool get_requested_incompatible_qos_status(
-            fastrtps::RequestedIncompatibleQosStatus& status) const;
-     */
-
-    /* TODO
-       RTPS_DllAPI bool get_sample_lost_status(
-            fastrtps::SampleLostStatus& status) const;
-     */
-
-    /* TODO
-       RTPS_DllAPI bool get_sample_rejected_status(
-            fastrtps::SampleRejectedStatus& status) const;
-     */
-
-    /**
-     * @brief Getter for the Subscriber
-     * @return Subscriber pointer
-     */
-    RTPS_DllAPI const Subscriber* get_subscriber() const;
-
-    /* TODO
-       RTPS_DllAPI bool wait_for_historical_data(
-            const fastrtps::Duration_t& max_wait) const;
-     */
-
-private:
-
-    DataReaderImpl* impl_;
-
-    friend class ::dds::sub::DataReader;
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-#endif
-#endif /* _FASTRTPS_DATAREADER_HPP_*/

+ 0 - 152
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/DataReaderListener.hpp

@@ -1,152 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataReaderListener.hpp
- */
-
-#ifndef _FASTRTPS_DATAREADERLISTENER_HPP_
-#define _FASTRTPS_DATAREADERLISTENER_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastrtps/qos/DeadlineMissedStatus.h>
-#include <fastrtps/qos/LivelinessChangedStatus.h>
-#include <fastrtps/qos/SampleRejectedStatus.hpp>
-#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-#include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DataReader;
-
-/**
- * Class DataReaderListener, it should be used by the end user to implement specific callbacks to certain actions.
- * @ingroup FASTDDS_MODULE
- */
-class DataReaderListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DataReaderListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~DataReaderListener()
-    {
-    }
-
-    /**
-     * Virtual function to be implemented by the user containing the actions to be performed when a new  Data Message is received.
-     * @param reader DataReader
-     */
-    RTPS_DllAPI virtual void on_data_available(
-            DataReader* reader)
-    {
-        (void)reader;
-    }
-
-    /**
-     * Virtual method to be called when the subscriber is matched with a new Writer (or unmatched); i.e., when a writer publishing in the same topic is discovered.
-     * @param reader DataReader
-     * @param info The subscription matched status
-     */
-    RTPS_DllAPI virtual void on_subscription_matched(
-            DataReader* reader,
-            const fastdds::dds::SubscriptionMatchedStatus& info)
-    {
-        (void)reader;
-        (void)info;
-    }
-
-    /**
-     * Virtual method to be called when a topic misses the deadline period
-     * @param reader DataReader
-     * @param status The requested deadline missed status
-     */
-    RTPS_DllAPI virtual void on_requested_deadline_missed(
-            DataReader* reader,
-            const fastrtps::RequestedDeadlineMissedStatus& status)
-    {
-        (void)reader;
-        (void)status;
-    }
-
-    /**
-     * @brief Method called when the liveliness status associated to a subscriber changes
-     * @param reader The DataReader
-     * @param status The liveliness changed status
-     */
-    RTPS_DllAPI virtual void on_liveliness_changed(
-            DataReader* reader,
-            const fastrtps::LivelinessChangedStatus& status)
-    {
-        (void)reader;
-        (void)status;
-    }
-
-    /**
-     * @brief Method called when a sample was rejected.
-     * @param reader The DataReader
-     * @param status The rejected status
-     */
-    RTPS_DllAPI virtual void on_sample_rejected(
-            DataReader* reader,
-            const fastrtps::SampleRejectedStatus& status)
-    {
-        (void)reader;
-        (void)status;
-    }
-
-    /**
-     * @brief Method called an incompatible QoS was requested.
-     * @param reader The DataReader
-     * @param status The requested incompatible QoS status
-     */
-    RTPS_DllAPI virtual void on_requested_incompatible_qos(
-            DataReader* reader,
-            const RequestedIncompatibleQosStatus& status)
-    {
-        (void)reader;
-        (void)status;
-    }
-
-    /**
-     * @brief Method called when a sample was lost.
-     * @param reader The DataReader
-     * @param status The sample lost status
-     */
-    RTPS_DllAPI virtual void on_sample_lost(
-            DataReader* reader,
-            const SampleLostStatus& status)
-    {
-        (void)reader;
-        (void)status;
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTRTPS_DATAREADERLISTENER_HPP_ */

+ 0 - 109
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/SampleInfo.hpp

@@ -1,109 +0,0 @@
-// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SampleInfo.hpp
- *
- */
-
-#ifndef _FASTRTPS_SAMPLEINFO_HPP_
-#define _FASTRTPS_SAMPLEINFO_HPP_
-
-
-#include <fastdds/rtps/common/Types.h>
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastdds/rtps/common/InstanceHandle.h>
-#include <fastdds/rtps/common/SampleIdentity.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-
-enum SampleStateKind
-{
-    READ,
-    NOT_READ
-};
-
-enum ViewStateKind
-{
-    NEW,
-    NOT_NEW
-};
-
-enum InstanceStateKind
-{
-    ALIVE,
-    NOT_ALIVE_DISPOSED,
-    NOT_ALIVE_NO_WRITERS
-};
-
-/*!
- * @brief SampleInfo is the information that accompanies each sample that is ‘read’ or ‘taken.’
- */
-struct SampleInfo
-{
-    //! indicates whether or not the corresponding data sample has already been read
-    SampleStateKind sample_state;
-
-    //! indicates whether the DataReader has already seen samples for the most-current generation of the related instance.
-    ViewStateKind view_state;
-
-    //! indicates whether the instance is currently in existence or, if it has been disposed, the reason why it was disposed.
-    InstanceStateKind instance_state;
-
-    //! number of times the instance had become alive after it was disposed
-    int32_t disposed_generation_count;
-
-    //! number of times the instance had become alive after it was disposed because no writers
-    int32_t no_writers_generation_count;
-
-    //! number of samples related to the same instance that follow in the collection
-    int32_t sample_rank;
-
-    //! the generation difference between the time the sample was received, and the time the most recent sample in the collection was received.
-    int32_t generation_rank;
-
-    //! the generation difference between the time the sample was received, and the time the most recent sample was received.
-    //! The most recent sample used for the calculation may or may not be in the returned collection
-    int32_t absoulte_generation_rank;
-
-    //! time provided by the DataWriter when the sample was written
-    fastrtps::rtps::Time_t source_timestamp;
-
-    //! identifies locally the corresponding instance
-    fastrtps::rtps::InstanceHandle_t instance_handle;
-
-    //! identifies locally the DataWriter that modified the instance
-    //!
-    //! Is the same InstanceHandle_t that is returned by the operation get_matched_publications on the DataReader
-    fastrtps::rtps::InstanceHandle_t publication_handle;
-
-    //! whether the DataSample contains data or is only used to communicate of a change in the instance
-    bool valid_data;
-
-    //!Sample Identity (Extension for RPC)
-    fastrtps::rtps::SampleIdentity sample_identity;
-
-    //!Related Sample Identity (Extension for RPC)
-    fastrtps::rtps::SampleIdentity related_sample_identity;
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTRTPS_SAMPLEINFO_HPP_*/

+ 0 - 307
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/Subscriber.hpp

@@ -1,307 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Subscriber.hpp
- */
-
-
-#ifndef _FASTDDS_SUBSCRIBER_HPP_
-#define _FASTDDS_SUBSCRIBER_HPP_
-
-#include <fastrtps/attributes/SubscriberAttributes.h>
-
-#include <fastdds/dds/subscriber/DataReaderListener.hpp>
-#include <fastdds/dds/subscriber/qos/SubscriberQos.hpp>
-#include <fastrtps/types/TypesBase.h>
-#include <fastdds/dds/core/Entity.hpp>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace dds {
-namespace sub {
-
-class Subscriber;
-
-} // namespace sub
-} // namespace dds
-
-namespace eprosima {
-namespace fastrtps {
-
-class TopicAttributes;
-
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-class SubscriberListener;
-class SubscriberImpl;
-class DataReader;
-class DataReaderListener;
-class DataReaderQos;
-class TopicDescription;
-/**
- * Class Subscriber, contains the public API that allows the user to control the reception of messages.
- * This class should not be instantiated directly.
- * DomainRTPSParticipant class should be used to correctly create this element.
- * @ingroup FASTDDS_MODULE
- */
-class Subscriber : public DomainEntity
-{
-    friend class SubscriberImpl;
-    friend class DomainParticipantImpl;
-
-    /**
-     * Constructor from a SubscriberImpl pointer
-     * @param pimpl Actual implementation of the subscriber
-     * @param mask StatusMask (default: all)
-     */
-    RTPS_DllAPI Subscriber(
-            SubscriberImpl* pimpl,
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI Subscriber(
-            DomainParticipant* dp,
-            const SubscriberQos& qos = SUBSCRIBER_QOS_DEFAULT,
-            SubscriberListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-public:
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~Subscriber()
-    {
-    }
-
-    /**
-     * @brief This operation enables the Subscriber
-     * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the participant creating this
-     *         Subscriber is not enabled.
-     */
-    RTPS_DllAPI ReturnCode_t enable() override;
-
-    /**
-     * Allows accessing the Subscriber Qos.
-     * @return SubscriberQos reference
-     */
-    RTPS_DllAPI const SubscriberQos& get_qos() const;
-
-    /**
-     * Retrieves the Subscriber Qos.
-     * @param qos SubscriberQos where the qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            SubscriberQos& qos) const;
-
-    /**
-     * Allows modifying the Subscriber Qos.
-     * The given Qos must be supported by the SubscriberQos.
-     * @param qos new value for SubscriberQos
-     * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not
-     * self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const SubscriberQos& qos);
-
-    /**
-     * Retrieves the attached SubscriberListener.
-     * @return Pointer to the SubscriberListener
-     */
-    RTPS_DllAPI const SubscriberListener* get_listener() const;
-
-    /**
-     * Modifies the SubscriberListener.
-     * @param listener new value for SubscriberListener
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            SubscriberListener* listener);
-
-    /**
-     * This operation creates a DataReader. The returned DataReader will be attached and belong to the Subscriber.
-     * @param topic Topic the DataReader will be listening.
-     * @param reader_qos QoS of the DataReader.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask (default: all)
-     * @return Pointer to the created DataReader. nullptr if failed.
-     */
-    RTPS_DllAPI DataReader* create_datareader(
-            TopicDescription* topic,
-            const DataReaderQos& reader_qos,
-            DataReaderListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * This operation creates a DataReader. The returned DataReader will be attached and belongs to the Subscriber.
-     * @param topic Topic the DataReader will be listening.
-     * @param profile_name DataReader profile name.
-     * @param listener Pointer to the listener (default: nullptr)
-     * @param mask StatusMask (default: all)
-     * @return Pointer to the created DataReader. nullptr if failed.
-     */
-    RTPS_DllAPI DataReader* create_datareader_with_profile(
-            TopicDescription* topic,
-            const std::string& profile_name,
-            DataReaderListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * This operation deletes a DataReader that belongs to the Subscriber.
-     *
-     * The delete_datareader operation must be called on the same Subscriber object used to create the DataReader.
-     * If delete_datareader is called on a different Subscriber, the operation will have no effect and it will
-     * return an error.
-     * @param reader DataReader to delete
-     * @return RETCODE_PRECONDITION_NOT_MET if the datareader does not belong to this subscriber, RETCODE_OK if it is correctly
-     * deleted and RETCODE_ERROR otherwise.
-     */
-    RTPS_DllAPI ReturnCode_t delete_datareader(
-            DataReader* reader);
-
-    /**
-     * This operation retrieves a previously-created DataReader belonging to the Subscriber that is attached to a
-     * Topic with a matching topic_name. If no such DataReader exists, the operation will return nullptr.
-     *
-     * If multiple DataReaders attached to the Subscriber satisfy this condition, then the operation will return
-     * one of them. It is not specified which one.
-     * @param topic_name Name of the topic associated to the DataReader
-     * @return Pointer to a previously created DataReader created on a Topic with that topic_name
-     */
-    RTPS_DllAPI DataReader* lookup_datareader(
-            const std::string& topic_name) const;
-
-    /**
-     * This operation allows the application to access the DataReader objects.
-     * @param readers Vector of DataReader where the list of existing readers is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_datareaders(
-            std::vector<DataReader*>& readers) const;
-
-    /**
-     * This operation checks if the subscriber has DataReaders
-     * @return true if the subscriber has one or several DataReaders, false in other case
-     */
-    RTPS_DllAPI bool has_datareaders() const;
-
-    /* TODO
-       bool begin_access();
-     */
-
-    /* TODO
-       bool end_access();
-     */
-
-    /**
-     * This operation invokes the operation on_data_available on the DataReaderListener objects attached to
-     * contained DataReader entities.
-     *
-     * This operation is typically invoked from the on_data_on_readers operation in the SubscriberListener.
-     * That way the SubscriberListener can delegate to the DataReaderListener objects the handling of the data.
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t notify_datareaders() const;
-
-    /* TODO
-       bool delete_contained_entities();
-     */
-
-    /**
-     * This operation sets a default value of the DataReader QoS policies which will be used for newly created
-     * DataReader entities in the case where the QoS policies are defaulted in the create_datareader operation.
-     *
-     * This operation will check that the resulting policies are self consistent; if they are not, the operation
-     * will have no effect and return false.
-     *
-     * The special value DATAREADER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS
-     * should be reset back to the initial values the factory would use, that is the values that would be used
-     * if the set_default_datareader_qos operation had never been called.
-     * @param qos new value for DataReaderQos to set as default
-     * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly.
-     */
-    RTPS_DllAPI ReturnCode_t set_default_datareader_qos(
-            const DataReaderQos& qos);
-
-    /**
-     * This operation returns the default value of the DataReader QoS, that is, the QoS policies which will be
-     * used for newly created DataReader entities in the case where the QoS policies are defaulted in the
-     * create_datareader operation.
-     *
-     * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful
-     * call to get_default_datareader_qos, or else, if the call was never made, the default values.
-     * @return Current default DataReaderQos.
-     */
-    RTPS_DllAPI const DataReaderQos& get_default_datareader_qos() const;
-
-
-    /**
-     * This operation returns the default value of the DataReader QoS, that is, the QoS policies which will be
-     * used for newly created DataReader entities in the case where the QoS policies are defaulted in the
-     * create_datareader operation.
-     *
-     * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful
-     * call to get_default_datareader_qos, or else, if the call was never made, the default values.
-     * @return Current default DataReaderQos.
-     */
-    RTPS_DllAPI DataReaderQos& get_default_datareader_qos();
-
-    /**
-     * This operation retrieves the default value of the DataReader QoS, that is, the QoS policies which will be
-     * used for newly created DataReader entities in the case where the QoS policies are defaulted in the
-     * create_datareader operation.
-     *
-     * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful
-     * call to get_default_datareader_qos, or else, if the call was never made, the default values.
-     * @param qos DataReaderQos where the default_qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_default_datareader_qos(
-            DataReaderQos& qos) const;
-
-    /* TODO
-       bool copy_from_topic_qos(
-            DataReaderQos& reader_qos,
-            const fastrtps::TopicAttributes& topic_qos) const;
-     */
-
-    /**
-     * This operation returns the DomainParticipant to which the Subscriber belongs.
-     * @return DomainParticipant Pointer
-     */
-    RTPS_DllAPI const DomainParticipant* get_participant() const;
-
-    /**
-     * Returns the Subscriber's handle.
-     * @return InstanceHandle of this Subscriber.
-     */
-    RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const;
-
-private:
-
-    SubscriberImpl* impl_;
-
-    friend class ::dds::sub::Subscriber;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_SUBSCRIBER_HPP_ */

+ 0 - 74
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/SubscriberListener.hpp

@@ -1,74 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SubscriberListener.hpp
- */
-
-#ifndef _FASTDDS_SUBLISTENER_HPP_
-#define _FASTDDS_SUBLISTENER_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastrtps/qos/DeadlineMissedStatus.h>
-#include <fastrtps/qos/LivelinessChangedStatus.h>
-#include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
-#include <fastdds/dds/subscriber/DataReaderListener.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class Subscriber;
-
-/**
- * Class SubscriberListener, it should be used by the end user to implement specific callbacks to certain actions.
- * It also inherits all DataReaderListener callbacks.
- * @ingroup FASTDDS_MODULE
- */
-class SubscriberListener : public DataReaderListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI SubscriberListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~SubscriberListener()
-    {
-    }
-
-    /**
-     * Virtual function to be implemented by the user containing the actions to be performed when a new
-     * Data Message is available on any reader.
-     * @param sub Subscriber
-     */
-    RTPS_DllAPI virtual void on_data_on_readers(
-            Subscriber* sub)
-    {
-        (void)sub;
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_SUBLISTENER_HPP_ */

+ 0 - 819
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp

@@ -1,819 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file DataReaderQos.hpp
- */
-
-
-#ifndef _FASTDDS_DATAREADERQOS_HPP
-#define _FASTDDS_DATAREADERQOS_HPP
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-#include <fastdds/dds/subscriber/qos/ReaderQos.hpp>
-#include <fastdds/dds/subscriber/qos/SubscriberQos.hpp>
-#include <fastdds/dds/core/policy/ReaderDataLifecycleQosPolicy.hpp>
-
-#include <fastdds/rtps/attributes/ReaderAttributes.h>
-#include <fastrtps/attributes/TopicAttributes.h>
-
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-using TopicAttributesQos = fastrtps::TopicAttributes;
-
-//! Qos Policy to configure the DisablePositiveACKsQos and the reader attributes
-class RTPSReliableReaderQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI RTPSReliableReaderQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~RTPSReliableReaderQos() = default;
-
-    bool operator ==(
-            const RTPSReliableReaderQos& b) const
-    {
-        return (this->times == b.times) &&
-               (this->disable_positive_ACKs == b.disable_positive_ACKs);
-    }
-
-    inline void clear()
-    {
-        RTPSReliableReaderQos reset = RTPSReliableReaderQos();
-        std::swap(*this, reset);
-    }
-
-    /*!
-     * @brief Times associated with the Reliable Readers events.
-     */
-    fastrtps::rtps::ReaderTimes times;
-
-    /*!
-     * @brief Control the sending of positive ACKs
-     */
-    DisablePositiveACKsQosPolicy disable_positive_ACKs;
-};
-
-//! Qos Policy to configure the limit of the reader resources
-class ReaderResourceLimitsQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI ReaderResourceLimitsQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~ReaderResourceLimitsQos() = default;
-
-    bool operator ==(
-            const ReaderResourceLimitsQos& b) const
-    {
-        return (this->matched_publisher_allocation == b.matched_publisher_allocation);
-    }
-
-    inline void clear()
-    {
-        ReaderResourceLimitsQos reset = ReaderResourceLimitsQos();
-        std::swap(*this, reset);
-    }
-
-    //!Matched publishers allocation limits.
-    fastrtps::ResourceLimitedContainerConfig matched_publisher_allocation;
-};
-
-//! Qos Policy to configure the XTypes Qos associated to the DataReader
-class TypeConsistencyQos : public QosPolicy
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TypeConsistencyQos()
-        : QosPolicy(false)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual RTPS_DllAPI ~TypeConsistencyQos() = default;
-
-    bool operator ==(
-            const TypeConsistencyQos& b) const
-    {
-        return (this->type_consistency == b.type_consistency) &&
-               (this->representation == b.representation) &&
-               QosPolicy::operator ==(b);
-    }
-
-    inline void clear() override
-    {
-        TypeConsistencyQos reset = TypeConsistencyQos();
-        std::swap(*this, reset);
-    }
-
-    //!Type consistency enforcement Qos.
-    TypeConsistencyEnforcementQosPolicy type_consistency;
-
-    //!Data Representation Qos.
-    DataRepresentationQosPolicy representation;
-};
-
-/**
- * Class DataReaderQos, containing all the possible Qos that can be set for a determined DataReader.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class DataReaderQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI DataReaderQos()
-        : expects_inline_qos_(false)
-    {
-    }
-
-    RTPS_DllAPI bool operator ==(
-            const DataReaderQos& b) const
-    {
-        return (durability_ == b.durability()) &&
-               (deadline_ == b.deadline()) &&
-               (latency_budget_ == b.latency_budget()) &&
-               (liveliness_ == b.liveliness()) &&
-               (reliability_ == b.reliability()) &&
-               (destination_order_ == b.destination_order()) &&
-               (history_ == b.history()) &&
-               (resource_limits_ == b.resource_limits()) &&
-               (user_data_ == b.user_data()) &&
-               (ownership_ == b.ownership()) &&
-               (time_based_filter_ == b.time_based_filter()) &&
-               (reader_data_lifecycle_ == b.reader_data_lifecycle()) &&
-               (lifespan_ == b.lifespan()) &&
-               (durability_service_ == b.durability_service()) &&
-               (reliable_reader_qos_ == b.reliable_reader_qos()) &&
-               (type_consistency_ == b.type_consistency()) &&
-               (expects_inline_qos_ == b.expects_inline_qos()) &&
-               (properties_ == b.properties()) &&
-               (endpoint_ == b.endpoint()) &&
-               (reader_resource_limits_ == b.reader_resource_limits());
-    }
-
-    RTPS_DllAPI ReaderQos get_readerqos(
-            const SubscriberQos& sqos) const;
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQosPolicy reference
-     */
-    RTPS_DllAPI DurabilityQosPolicy& durability()
-    {
-        return durability_;
-    }
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQosPolicy const reference
-     */
-    RTPS_DllAPI const DurabilityQosPolicy& durability() const
-    {
-        return durability_;
-    }
-
-    /**
-     * Setter for DurabilityQosPolicy
-     * @param new_value new value for the DurabilityQosPolicy
-     */
-    RTPS_DllAPI void durability(
-            const DurabilityQosPolicy& new_value)
-    {
-        durability_ = new_value;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQosPolicy reference
-     */
-    RTPS_DllAPI DeadlineQosPolicy& deadline()
-    {
-        return deadline_;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQosPolicy const reference
-     */
-    RTPS_DllAPI const DeadlineQosPolicy& deadline() const
-    {
-        return deadline_;
-    }
-
-    /**
-     * Setter for DeadlineQosPolicy
-     * @param new_value new value for the DeadlineQosPolicy
-     */
-    RTPS_DllAPI void deadline(
-            const DeadlineQosPolicy& new_value)
-    {
-        deadline_ = new_value;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQosPolicy reference
-     */
-    RTPS_DllAPI LatencyBudgetQosPolicy& latency_budget()
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQosPolicy const reference
-     */
-    RTPS_DllAPI const LatencyBudgetQosPolicy& latency_budget() const
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Setter for LatencyBudgetQosPolicy
-     * @param new_value new value for the LatencyBudgetQosPolicy
-     */
-    RTPS_DllAPI void latency_budget(
-            const LatencyBudgetQosPolicy& new_value)
-    {
-        latency_budget_ = new_value;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQosPolicy reference
-     */
-    RTPS_DllAPI LivelinessQosPolicy& liveliness()
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQosPolicy const reference
-     */
-    RTPS_DllAPI const LivelinessQosPolicy& liveliness() const
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Setter for LivelinessQosPolicy
-     * @param new_value new value for the LivelinessQosPolicy
-     */
-    RTPS_DllAPI void liveliness(
-            const LivelinessQosPolicy& new_value)
-    {
-        liveliness_ = new_value;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQosPolicy reference
-     */
-    RTPS_DllAPI ReliabilityQosPolicy& reliability()
-    {
-        return reliability_;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQosPolicy const reference
-     */
-    RTPS_DllAPI const ReliabilityQosPolicy& reliability() const
-    {
-        return reliability_;
-    }
-
-    /**
-     * Setter for ReliabilityQosPolicy
-     * @param new_value new value for the ReliabilityQosPolicy
-     */
-    RTPS_DllAPI void reliability(
-            const ReliabilityQosPolicy& new_value)
-    {
-        reliability_ = new_value;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQosPolicy reference
-     */
-    RTPS_DllAPI DestinationOrderQosPolicy& destination_order()
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQosPolicy const reference
-     */
-    RTPS_DllAPI const DestinationOrderQosPolicy& destination_order() const
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Setter for DestinationOrderQosPolicy
-     * @param new_value new value for the DestinationOrderQosPolicy
-     */
-    RTPS_DllAPI void destination_order(
-            const DestinationOrderQosPolicy& new_value)
-    {
-        destination_order_ = new_value;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQosPolicy reference
-     */
-    RTPS_DllAPI HistoryQosPolicy& history()
-    {
-        return history_;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQosPolicy const reference
-     */
-    RTPS_DllAPI const HistoryQosPolicy& history() const
-    {
-        return history_;
-    }
-
-    /**
-     * Setter for HistoryQosPolicy
-     * @param new_value new value for the HistoryQosPolicy
-     */
-    RTPS_DllAPI void history(
-            const HistoryQosPolicy& new_value)
-    {
-        history_ = new_value;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQosPolicy reference
-     */
-    RTPS_DllAPI ResourceLimitsQosPolicy& resource_limits()
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQosPolicy const reference
-     */
-    RTPS_DllAPI const ResourceLimitsQosPolicy& resource_limits() const
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Setter for ResourceLimitsQosPolicy
-     * @param new_value new value for the ResourceLimitsQosPolicy
-     */
-    RTPS_DllAPI void resource_limits(
-            const ResourceLimitsQosPolicy& new_value)
-    {
-        resource_limits_ = new_value;
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy reference
-     */
-    RTPS_DllAPI UserDataQosPolicy& user_data()
-    {
-        return user_data_;
-    }
-
-    /**
-     * Getter for UserDataQosPolicy
-     * @return UserDataQosPolicy const reference
-     */
-    RTPS_DllAPI const UserDataQosPolicy& user_data() const
-    {
-        return user_data_;
-    }
-
-    /**
-     * Setter for UserDataQosPolicy
-     * @param new_value new value for the UserDataQosPolicy
-     */
-    RTPS_DllAPI void user_data(
-            const UserDataQosPolicy& new_value)
-    {
-        user_data_ = new_value;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQosPolicy reference
-     */
-    RTPS_DllAPI OwnershipQosPolicy& ownership()
-    {
-        return ownership_;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQosPolicy const reference
-     */
-    RTPS_DllAPI const OwnershipQosPolicy& ownership() const
-    {
-        return ownership_;
-    }
-
-    /**
-     * Setter for OwnershipQosPolicy
-     * @param new_value new value for the OwnershipQosPolicy
-     */
-    RTPS_DllAPI void ownership(
-            const OwnershipQosPolicy& new_value)
-    {
-        ownership_ = new_value;
-    }
-
-    /**
-     * Getter for TimeBasedFilterQosPolicy
-     * @return TimeBasedFilterQosPolicy reference
-     */
-    RTPS_DllAPI TimeBasedFilterQosPolicy& time_based_filter()
-    {
-        return time_based_filter_;
-    }
-
-    /**
-     * Getter for TimeBasedFilterQosPolicy
-     * @return TimeBasedFilterQosPolicy const reference
-     */
-    RTPS_DllAPI const TimeBasedFilterQosPolicy& time_based_filter() const
-    {
-        return time_based_filter_;
-    }
-
-    /**
-     * Setter for TimeBasedFilterQosPolicy
-     * @param new_value new value for the TimeBasedFilterQosPolicy
-     */
-    RTPS_DllAPI void time_based_filter(
-            const TimeBasedFilterQosPolicy& new_value)
-    {
-        time_based_filter_ = new_value;
-    }
-
-    /**
-     * Getter for ReaderDataLifecycleQosPolicy
-     * @return ReaderDataLifecycleQosPolicy reference
-     */
-    RTPS_DllAPI ReaderDataLifecycleQosPolicy& reader_data_lifecycle()
-    {
-        return reader_data_lifecycle_;
-    }
-
-    /**
-     * Getter for ReaderDataLifecycleQosPolicy
-     * @return ReaderDataLifecycleQosPolicy const reference
-     */
-    RTPS_DllAPI const ReaderDataLifecycleQosPolicy& reader_data_lifecycle() const
-    {
-        return reader_data_lifecycle_;
-    }
-
-    /**
-     * Setter for ReaderDataLifecycleQosPolicy
-     * @param new_value new value for the ReaderDataLifecycleQosPolicy
-     */
-    RTPS_DllAPI void reader_data_lifecycle(
-            const ReaderDataLifecycleQosPolicy& new_value)
-    {
-        reader_data_lifecycle_ = new_value;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQosPolicy reference
-     */
-    RTPS_DllAPI LifespanQosPolicy& lifespan()
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQosPolicy const reference
-     */
-    RTPS_DllAPI const LifespanQosPolicy& lifespan() const
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Setter for LifespanQosPolicy
-     * @param new_value new value for the LifespanQosPolicy
-     */
-    RTPS_DllAPI void lifespan(
-            const LifespanQosPolicy& new_value)
-    {
-        lifespan_ = new_value;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQosPolicy reference
-     */
-    RTPS_DllAPI DurabilityServiceQosPolicy& durability_service()
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQosPolicy const reference
-     */
-    RTPS_DllAPI const DurabilityServiceQosPolicy& durability_service() const
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Setter for DurabilityServiceQosPolicy
-     * @param new_value new value for the DurabilityServiceQosPolicy
-     */
-    RTPS_DllAPI void durability_service(
-            const DurabilityServiceQosPolicy& new_value)
-    {
-        durability_service_ = new_value;
-    }
-
-    /**
-     * Getter for RTPSReliableReaderQos
-     * @return RTPSReliableReaderQos reference
-     */
-    RTPS_DllAPI RTPSReliableReaderQos& reliable_reader_qos()
-    {
-        return reliable_reader_qos_;
-    }
-
-    /**
-     * Getter for RTPSReliableReaderQos
-     * @return RTPSReliableReaderQos const reference
-     */
-    RTPS_DllAPI const RTPSReliableReaderQos& reliable_reader_qos() const
-    {
-        return reliable_reader_qos_;
-    }
-
-    /**
-     * Setter for RTPSReliableReaderQos
-     * @param new_value new value for the RTPSReliableReaderQos
-     */
-    RTPS_DllAPI void reliable_reader_qos(
-            const RTPSReliableReaderQos& new_value)
-    {
-        reliable_reader_qos_ = new_value;
-    }
-
-    /**
-     * Getter for TypeConsistencyQos
-     * @return TypeConsistencyQos reference
-     */
-    RTPS_DllAPI TypeConsistencyQos& type_consistency()
-    {
-        return type_consistency_;
-    }
-
-    /**
-     * Getter for TypeConsistencyQos
-     * @return TypeConsistencyQos const reference
-     */
-    RTPS_DllAPI const TypeConsistencyQos& type_consistency() const
-    {
-        return type_consistency_;
-    }
-
-    /**
-     * Setter for TypeConsistencyQos
-     * @param new_value new value for the TypeConsistencyQos
-     */
-    RTPS_DllAPI void type_consistency(
-            const TypeConsistencyQos& new_value)
-    {
-        type_consistency_ = new_value;
-    }
-
-    /**
-     * Getter for expectsInlineQos_
-     * @return expectsInlineQos_
-     */
-    RTPS_DllAPI bool expects_inline_qos() const
-    {
-        return expects_inline_qos_;
-    }
-
-    /**
-     * Setter for expectsInlineQos_
-     * @param new_value new value for the expectsInlineQos_
-     */
-    RTPS_DllAPI void expects_inline_qos(
-            bool new_value)
-    {
-        expects_inline_qos_ = new_value;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos reference
-     */
-    RTPS_DllAPI PropertyPolicyQos& properties()
-    {
-        return properties_;
-    }
-
-    /**
-     * Getter for PropertyPolicyQos
-     * @return PropertyPolicyQos const reference
-     */
-    RTPS_DllAPI const PropertyPolicyQos& properties() const
-    {
-        return properties_;
-    }
-
-    /**
-     * Setter for PropertyPolicyQos
-     * @param new_value new value for the PropertyPolicyQos
-     */
-    RTPS_DllAPI void properties(
-            const PropertyPolicyQos& new_value)
-    {
-        properties_ = new_value;
-    }
-
-    /**
-     * Getter for RTPSEndpointQos
-     * @return RTPSEndpointQos reference
-     */
-    RTPS_DllAPI RTPSEndpointQos& endpoint()
-    {
-        return endpoint_;
-    }
-
-    /**
-     * Getter for RTPSEndpointQos
-     * @return RTPSEndpointQos const reference
-     */
-    RTPS_DllAPI const RTPSEndpointQos& endpoint() const
-    {
-        return endpoint_;
-    }
-
-    /**
-     * Setter for RTPSEndpointQos
-     * @param new_value new value for the RTPSEndpointQos
-     */
-    RTPS_DllAPI void endpoint(
-            const RTPSEndpointQos& new_value)
-    {
-        endpoint_ = new_value;
-    }
-
-    /**
-     * Getter for ReaderResourceLimitsQos
-     * @return ReaderResourceLimitsQos reference
-     */
-    RTPS_DllAPI ReaderResourceLimitsQos& reader_resource_limits()
-    {
-        return reader_resource_limits_;
-    }
-
-    /**
-     * Getter for ReaderResourceLimitsQos
-     * @return ReaderResourceLimitsQos const reference
-     */
-    RTPS_DllAPI const ReaderResourceLimitsQos& reader_resource_limits() const
-    {
-        return reader_resource_limits_;
-    }
-
-    /**
-     * Setter for ReaderResourceLimitsQos
-     * @param new_value new value for the ReaderResourceLimitsQos
-     */
-    RTPS_DllAPI void reader_resource_limits(
-            const ReaderResourceLimitsQos& new_value)
-    {
-        reader_resource_limits_ = new_value;
-    }
-
-private:
-
-    //!Durability Qos, implemented in the library.
-    DurabilityQosPolicy durability_;
-
-    //!Deadline Qos, implemented in the library.
-    DeadlineQosPolicy deadline_;
-
-    //!Latency Budget Qos, implemented in the library.
-    LatencyBudgetQosPolicy latency_budget_;
-
-    //!Liveliness Qos, implemented in the library.
-    LivelinessQosPolicy liveliness_;
-
-    //!Reliability Qos, implemented in the library.
-    ReliabilityQosPolicy reliability_;
-
-    //!Destination Order Qos, NOT implemented in the library.
-    DestinationOrderQosPolicy destination_order_;
-
-    //!History Qos, implemented in the library.
-    HistoryQosPolicy history_;
-
-    //!Resource Limits Qos, implemented in the library.
-    ResourceLimitsQosPolicy resource_limits_;
-
-    //!User Data Qos, implemented in the library.
-    UserDataQosPolicy user_data_;
-
-    //!Ownership Qos, implemented in the library.
-    OwnershipQosPolicy ownership_;
-
-    //!Time Based Filter Qos, NOT implemented in the library.
-    TimeBasedFilterQosPolicy time_based_filter_;
-
-    //!Reader Data Lifecycle Qos, NOT implemented in the library.
-    ReaderDataLifecycleQosPolicy reader_data_lifecycle_;
-
-
-    //!Lifespan Qos (Extension).
-    LifespanQosPolicy lifespan_;
-
-    //!Durability Service Qos (Extension).
-    DurabilityServiceQosPolicy durability_service_;
-
-    //!Reliable reader configuration (Extension)
-    RTPSReliableReaderQos reliable_reader_qos_;
-
-    //! Tipe consistency (Extension)
-    TypeConsistencyQos type_consistency_;
-
-    //!Expects Inline QOS (Extension).
-    bool expects_inline_qos_;
-
-    //!Properties (Extension).
-    PropertyPolicyQos properties_;
-
-    //!Endpoint configuration (Extension)
-    RTPSEndpointQos endpoint_;
-
-    //!ReaderResourceLimitsQos
-    ReaderResourceLimitsQos reader_resource_limits_;
-};
-
-RTPS_DllAPI extern const DataReaderQos DATAREADER_QOS_DEFAULT;
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_DATAREADERQOS_HPP

+ 0 - 155
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/ReaderQos.hpp

@@ -1,155 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file ReaderQos.hpp
- *
- */
-
-#ifndef _FASTDDS_DDS_QOS_READERQOS_HPP_
-#define _FASTDDS_DDS_QOS_READERQOS_HPP_
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class ReaderQos, contains all the possible Qos that can be set for a determined Subscriber.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTRTPS_ATTRIBUTES_MODULE
- */
-class ReaderQos
-{
-public:
-
-    RTPS_DllAPI ReaderQos()
-    {
-    }
-
-    RTPS_DllAPI virtual ~ReaderQos()
-    {
-    }
-
-    bool operator ==(
-            const ReaderQos& b) const
-    {
-        return (m_durability == b.m_durability) &&
-               (m_deadline == b.m_deadline) &&
-               (m_latencyBudget == b.m_latencyBudget) &&
-               (m_liveliness == b.m_liveliness) &&
-               (m_reliability == b.m_reliability) &&
-               (m_ownership == b.m_ownership) &&
-               (m_destinationOrder == b.m_destinationOrder) &&
-               (m_userData == b.m_userData) &&
-               (m_timeBasedFilter == b.m_timeBasedFilter) &&
-               (m_presentation == b.m_presentation) &&
-               (m_partition == b.m_partition) &&
-               (m_topicData == b.m_topicData) &&
-               (m_groupData == b.m_groupData) &&
-               (m_durabilityService == b.m_durabilityService) &&
-               (m_lifespan == b.m_lifespan) &&
-               (m_disablePositiveACKs == b.m_disablePositiveACKs) &&
-               (type_consistency == b.type_consistency) &&
-               (representation == b.representation);
-    }
-
-    //!Durability Qos, implemented in the library.
-    DurabilityQosPolicy m_durability;
-
-    //!Deadline Qos, implemented in the library.
-    DeadlineQosPolicy m_deadline;
-
-    //!Latency Budget Qos, NOT implemented in the library.
-    LatencyBudgetQosPolicy m_latencyBudget;
-
-    //!Liveliness Qos, implemented in the library.
-    LivelinessQosPolicy m_liveliness;
-
-    //!ReliabilityQos, implemented in the library.
-    ReliabilityQosPolicy m_reliability;
-
-    //!Ownership Qos, NOT implemented in the library.
-    OwnershipQosPolicy m_ownership;
-
-    //!Destinatio Order Qos, NOT implemented in the library.
-    DestinationOrderQosPolicy m_destinationOrder;
-
-    //!UserData Qos, NOT implemented in the library.
-    UserDataQosPolicy m_userData;
-
-    //!Time Based Filter Qos, NOT implemented in the library.
-    TimeBasedFilterQosPolicy m_timeBasedFilter;
-
-    //!Presentation Qos, NOT implemented in the library.
-    PresentationQosPolicy m_presentation;
-
-    //!Partition Qos, implemented in the library.
-    PartitionQosPolicy m_partition;
-
-    //!Topic Data Qos, NOT implemented in the library.
-    TopicDataQosPolicy m_topicData;
-
-    //!GroupData Qos, NOT implemented in the library.
-    GroupDataQosPolicy m_groupData;
-
-    //!Durability Service Qos, NOT implemented in the library.
-    DurabilityServiceQosPolicy m_durabilityService;
-
-    //!Lifespan Qos, NOT implemented in the library.
-    LifespanQosPolicy m_lifespan;
-
-    //!Data Representation Qos, implemented in the library.
-    DataRepresentationQosPolicy representation;
-
-    //!Type consistency enforcement Qos, NOT implemented in the library.
-    TypeConsistencyEnforcementQosPolicy type_consistency;
-
-    //!Disable positive ACKs QoS
-    DisablePositiveACKsQosPolicy m_disablePositiveACKs;
-
-    /**
-     * Set Qos from another class
-     * @param readerqos Reference from a ReaderQos object.
-     * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
-     */
-    RTPS_DllAPI void setQos(
-            const ReaderQos& readerqos,
-            bool first_time);
-
-    /**
-     * Check if the Qos values are compatible between each other.
-     * @return True if correct.
-     */
-    RTPS_DllAPI bool checkQos() const;
-
-    /**
-     * Check if the Qos can be update with the values provided. This method DOES NOT update anything.
-     * @param qos Reference to the new qos.
-     * @return True if they can be updated.
-     */
-    RTPS_DllAPI bool canQosBeUpdated(
-            const ReaderQos& qos) const;
-
-    void clear();
-};
-
-} //namespace dds
-} //namespace fastdds
-} //namespace eprosima
-
-#endif // _FASTDDS_DDS_QOS_READERQOS_HPP_

+ 0 - 198
thirdpartylib/FastRTPS/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp

@@ -1,198 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SubscriberQos.hpp
- *
- */
-
-#ifndef _FASTDDS_SUBSCRIBERQOS_HPP_
-#define _FASTDDS_SUBSCRIBERQOS_HPP_
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-#include <fastrtps/attributes/SubscriberAttributes.h>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class SubscriberQos, contains all the possible Qos that can be set for a determined Subscriber.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class SubscriberQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI SubscriberQos()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~SubscriberQos()
-    {
-    }
-
-    bool operator ==(
-            const SubscriberQos& b) const
-    {
-        return (presentation_ == b.presentation_) &&
-               (partition_ == b.partition_) &&
-               (group_data_ == b.group_data_) &&
-               (entity_factory_ == b.entity_factory_);
-    }
-
-    /**
-     * Getter for PresentationQosPolicy
-     * @return PresentationQosPolicy reference
-     */
-    const PresentationQosPolicy& presentation() const
-    {
-        return presentation_;
-    }
-
-    /**
-     * Getter for PresentationQosPolicy
-     * @return PresentationQosPolicy reference
-     */
-    PresentationQosPolicy& presentation()
-    {
-        return presentation_;
-    }
-
-    /**
-     * Setter for PresentationQosPolicy
-     * @param presentation new value for the PresentationQosPolicy
-     */
-    void presentation(
-            const PresentationQosPolicy& presentation)
-    {
-        presentation_ = presentation;
-    }
-
-    /**
-     * Getter for PartitionQosPolicy
-     * @return PartitionQosPolicy reference
-     */
-    const PartitionQosPolicy& partition() const
-    {
-        return partition_;
-    }
-
-    /**
-     * Getter for PartitionQosPolicy
-     * @return PartitionQosPolicy reference
-     */
-    PartitionQosPolicy& partition()
-    {
-        return partition_;
-    }
-
-    /**
-     * Setter for PartitionQosPolicy
-     * @param partition new value for the PartitionQosPolicy
-     */
-    void partition(
-            const PartitionQosPolicy& partition)
-    {
-        partition_ = partition;
-    }
-
-    /**
-     * Getter for GroupDataQosPolicy
-     * @return GroupDataQosPolicy reference
-     */
-    const GroupDataQosPolicy& group_data() const
-    {
-        return group_data_;
-    }
-
-    /**
-     * Getter for GroupDataQosPolicy
-     * @return GroupDataQosPolicy reference
-     */
-    GroupDataQosPolicy& group_data()
-    {
-        return group_data_;
-    }
-
-    /**
-     * Setter for GroupDataQosPolicy
-     * @param group_data new value for the GroupDataQosPolicy
-     */
-    void group_data(
-            const GroupDataQosPolicy& group_data)
-    {
-        group_data_ = group_data;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    const EntityFactoryQosPolicy& entity_factory() const
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Getter for EntityFactoryQosPolicy
-     * @return EntityFactoryQosPolicy reference
-     */
-    EntityFactoryQosPolicy& entity_factory()
-    {
-        return entity_factory_;
-    }
-
-    /**
-     * Setter for EntityFactoryQosPolicy
-     * @param entity_factory new value for the EntityFactoryQosPolicy
-     */
-    void entity_factory(
-            const EntityFactoryQosPolicy& entity_factory)
-    {
-        entity_factory_ = entity_factory;
-    }
-
-private:
-
-    //!Presentation Qos, NOT implemented in the library.
-    PresentationQosPolicy presentation_;
-
-    //!Partition Qos, implemented in the library.
-    PartitionQosPolicy partition_;
-
-    //!Group Data Qos, implemented in the library.
-    GroupDataQosPolicy group_data_;
-
-    //!Entity Factory Qos, implemented in the library
-    EntityFactoryQosPolicy entity_factory_;
-};
-
-RTPS_DllAPI extern const SubscriberQos SUBSCRIBER_QOS_DEFAULT;
-
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_SUBSCRIBERQOS_HPP_ */

+ 0 - 155
thirdpartylib/FastRTPS/include/fastdds/dds/topic/Topic.hpp

@@ -1,155 +0,0 @@
-// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Topic.hpp
- */
-
-#ifndef _FASTDDS_TOPIC_HPP_
-#define _FASTDDS_TOPIC_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/dds/core/Entity.hpp>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-#include <fastdds/dds/topic/TopicDescription.hpp>
-#include <fastdds/dds/topic/qos/TopicQos.hpp>
-
-using eprosima::fastrtps::types::ReturnCode_t;
-
-namespace dds {
-namespace topic {
-
-class Topic;
-
-} // namespace topic
-} // namespace dds
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-class TopicListener;
-class DomainParticipantImpl;
-class TopicImpl;
-
-/**
- * Class TopicDescription, represents the fact that both publications
- * and subscriptions are tied to a single data-type
- * @ingroup FASTDDS_MODULE
- */
-class Topic : public DomainEntity, public TopicDescription
-{
-    friend class TopicImpl;
-    friend class DomainParticipantImpl;
-
-    /**
-     * Create a topic, assigning its pointer to the associated implementation.
-     * Don't use directly, create Topic using create_topic from Participant.
-     */
-    RTPS_DllAPI Topic(
-            const std::string& topic_name,
-            const std::string& type_name,
-            TopicImpl* p,
-            const StatusMask& mask = StatusMask::all());
-
-    RTPS_DllAPI Topic(
-            DomainParticipant* dp,
-            const std::string& topic_name,
-            const std::string& type_name,
-            const TopicQos& qos = TOPIC_QOS_DEFAULT,
-            TopicListener* listener = nullptr,
-            const StatusMask& mask = StatusMask::all());
-
-public:
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~Topic();
-
-    /**
-     * @brief Getter for the DomainParticipant
-     * @return DomainParticipant pointer
-     */
-    virtual DomainParticipant* get_participant() const override;
-
-    /**
-     * Allows the application to retrieve the INCONSISTENT_TOPIC_STATUS status of a Topic.
-     * @param status [out] Status to be retrieved.
-     * @return RETCODE_OK
-     */
-    ReturnCode_t get_inconsistent_topic_status(
-            InconsistentTopicStatus& status);
-
-    /**
-     * Allows accessing the Topic Qos.
-     * @return reference to TopicQos
-     */
-    RTPS_DllAPI const TopicQos& get_qos() const;
-
-    /**
-     * Retrieves the Topic Qos.
-     * @param qos TopicQos where the qos is returned
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t get_qos(
-            TopicQos& qos) const;
-
-    /**
-     * Allows modifying the Topic Qos.
-     * The given Qos must be supported by the Topic.
-     * @param qos new TopicQos value to set for the Topic.
-     * @retval RETCODE_IMMUTABLE_POLICY if a change was not allowed.
-     * @retval RETCODE_INCONSISTENT_POLICY if new qos has inconsistent values.
-     * @retval RETCODE_OK if qos was updated.
-     */
-    RTPS_DllAPI ReturnCode_t set_qos(
-            const TopicQos& qos);
-
-    /**
-     * Retrieves the attached TopicListener.
-     * @return pointer to TopicListener
-     */
-    RTPS_DllAPI const TopicListener* get_listener() const;
-
-    /**
-     * Modifies the TopicListener.
-     * @param listener new value for the TopicListener
-     * @param mask StatusMask (default: all)
-     * @return RETCODE_OK
-     */
-    RTPS_DllAPI ReturnCode_t set_listener(
-            TopicListener* listener,
-            const StatusMask& mask = StatusMask::all());
-
-    /**
-     * @brief Getter for the TopicDescriptionImpl
-     * @return pointer to TopicDescriptionImpl
-     */
-    TopicDescriptionImpl* get_impl() const override;
-
-private:
-
-    TopicImpl* impl_;
-
-    friend class ::dds::topic::Topic;
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_TOPIC_HPP_ */

+ 0 - 299
thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicDataType.hpp

@@ -1,299 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TopicDataType.hpp
- */
-
-#ifndef _FASTDDS_TOPICDATATYPE_HPP_
-#define _FASTDDS_TOPICDATATYPE_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-
-#include <string>
-#include <functional>
-
-namespace eprosima {
-
-namespace fastrtps {
-
-namespace rtps {
-struct SerializedPayload_t;
-struct InstanceHandle_t;
-} // namespace rtps
-} // namespace fastrtps
-
-namespace fastdds {
-namespace dds {
-
-class TypeSupport;
-
-/**
- * Class TopicDataType used to provide the DomainRTPSParticipant with the methods to serialize, deserialize and get the key of a specific data type.
- * The user should created a class that inherits from this one, where Serialize and deserialize methods MUST be implemented.
- * @ingroup FASTRTPS_MODULE, FASTDDS_MODULE
- */
-class TopicDataType
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TopicDataType()
-        : m_typeSize(0)
-        , m_isGetKeyDefined(false)
-        , auto_fill_type_object_(true)
-        , auto_fill_type_information_(true)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    RTPS_DllAPI virtual ~TopicDataType()
-    {
-    }
-
-    /**
-     * Serialize method, it should be implemented by the user, since it is abstract.
-     * It is VERY IMPORTANT that the user sets the SerializedPayload length correctly.
-     * @param[in] data Pointer to the data
-     * @param[out] payload Pointer to the payload
-     * @return True if correct.
-     */
-    RTPS_DllAPI virtual bool serialize(
-            void* data,
-            fastrtps::rtps::SerializedPayload_t* payload) = 0;
-
-    /**
-     * Deserialize method, it should be implemented by the user, since it is abstract.
-     * @param[in] payload Pointer to the payload
-     * @param[out] data Pointer to the data
-     * @return True if correct.
-     */
-    RTPS_DllAPI virtual bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data) = 0;
-
-    /**
-     * @brief Gets the SerializedSizeProvider function
-     * @param data Pointer
-     * @return function
-     */
-    RTPS_DllAPI virtual std::function<uint32_t()> getSerializedSizeProvider(
-            void* data) = 0;
-
-    /**
-     * Create a Data Type.
-     * @return Void pointer to the created object.
-     */
-    RTPS_DllAPI virtual void* createData() = 0;
-    /**
-     * Remove a previously created object.
-     * @param data Pointer to the created Data.
-     */
-    RTPS_DllAPI virtual void deleteData(
-            void* data) = 0;
-
-    /**
-     * Get the key associated with the data.
-     * @param[in] data Pointer to the data.
-     * @param[out] ihandle Pointer to the Handle.
-     * @param[in] force_md5 Force MD5 checking.
-     * @return True if correct.
-     */
-    RTPS_DllAPI virtual bool getKey(
-            void* data,
-            fastrtps::rtps::InstanceHandle_t* ihandle,
-            bool force_md5 = false) = 0;
-
-    /**
-     * Set topic data type name
-     * @param nam Topic data type name
-     */
-    RTPS_DllAPI inline void setName(
-            const char* nam)
-    {
-        m_topicDataTypeName = std::string(nam);
-    }
-
-    /**
-     * Get topic data type name
-     * @return Topic data type name
-     */
-    RTPS_DllAPI inline const char* getName() const
-    {
-        return m_topicDataTypeName.c_str();
-    }
-
-    /**
-     * Get the type object auto-fill configuration
-     * @return true if the type object should be auto-filled
-     */
-    RTPS_DllAPI inline bool auto_fill_type_object() const
-    {
-        return auto_fill_type_object_;
-    }
-
-    /**
-     * Set the type object auto-fill configuration
-     * @param auto_fill_type_object new value to set
-     */
-    RTPS_DllAPI inline void auto_fill_type_object(
-            bool auto_fill_type_object)
-    {
-        auto_fill_type_object_ = auto_fill_type_object;
-    }
-
-    /**
-     * Get the type information auto-fill configuration
-     * @return true if the type information should be auto-filled
-     */
-    RTPS_DllAPI inline bool auto_fill_type_information() const
-    {
-        return auto_fill_type_information_;
-    }
-
-    /**
-     * Set type information auto-fill configuration
-     * @param auto_fill_type_information new value to set
-     */
-    RTPS_DllAPI inline void auto_fill_type_information(
-            bool auto_fill_type_information)
-    {
-        auto_fill_type_information_ = auto_fill_type_information;
-    }
-
-    /**
-     * Get the type identifier
-     * @return TypeIdV1
-     */
-    RTPS_DllAPI inline const std::shared_ptr<TypeIdV1> type_identifier() const
-    {
-        return type_identifier_;
-    }
-
-    /**
-     * Set type identifier
-     * @param id new value for TypeIdV1
-     */
-    RTPS_DllAPI inline void type_identifier(
-            const TypeIdV1& id)
-    {
-        type_identifier_ = std::make_shared<TypeIdV1>(id);
-    }
-
-    /**
-     * Set type identifier
-     * @param id shared pointer to TypeIdV1
-     */
-    RTPS_DllAPI inline void type_identifier(
-            const std::shared_ptr<TypeIdV1> id)
-    {
-        type_identifier_ = std::move(id);
-    }
-
-    /**
-     * Get the type object
-     * @return TypeObjectV1
-     */
-    RTPS_DllAPI inline const std::shared_ptr<TypeObjectV1> type_object() const
-    {
-        return type_object_;
-    }
-
-    /**
-     * Set type object
-     * @param object new value for TypeObjectV1
-     */
-    RTPS_DllAPI inline void type_object(
-            const TypeObjectV1& object)
-    {
-        type_object_ = std::make_shared<TypeObjectV1>(object);
-    }
-
-    /**
-     * Set type object
-     * @param object shared pointer to TypeObjectV1
-     */
-    RTPS_DllAPI inline void type_object(
-            std::shared_ptr<TypeObjectV1> object)
-    {
-        type_object_ = std::move(object);
-    }
-
-    /**
-     * Get the type information
-     * @return TypeInformation
-     */
-    RTPS_DllAPI inline const std::shared_ptr<xtypes::TypeInformation> type_information() const
-    {
-        return type_information_;
-    }
-
-    /**
-     * Set type information
-     * @param info new value for TypeInformation
-     */
-    RTPS_DllAPI inline void type_information(
-            const xtypes::TypeInformation& info)
-    {
-        type_information_ = std::make_shared<xtypes::TypeInformation>(info);
-    }
-
-    /**
-     * Set type information
-     * @param info shared pointer to TypeInformation
-     */
-    RTPS_DllAPI inline void type_information(
-            std::shared_ptr<xtypes::TypeInformation> info)
-    {
-        type_information_ = std::move(info);
-    }
-
-    //! Maximum serialized size of the type in bytes.
-    //! If the type has unbounded fields, and therefore cannot have a maximum size, use 0.
-    uint32_t m_typeSize;
-
-    //! Indicates whether the method to obtain the key has been implemented.
-    bool m_isGetKeyDefined;
-
-protected:
-
-    //!Type Identifier XTYPES 1.1
-    std::shared_ptr<TypeIdV1> type_identifier_;
-    //!Type Object XTYPES 1.1
-    std::shared_ptr<TypeObjectV1> type_object_;
-    //!XTYPES 1.2
-    std::shared_ptr<xtypes::TypeInformation> type_information_;
-
-private:
-
-    //! Data Type Name.
-    std::string m_topicDataTypeName;
-
-    bool auto_fill_type_object_;
-    bool auto_fill_type_information_;
-
-    friend class fastdds::dds::TypeSupport;
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_TOPICDATATYPE_HPP_ */

+ 0 - 105
thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicDescription.hpp

@@ -1,105 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TopicDescription.hpp
- */
-
-#ifndef _FASTDDS_TOPIC_DESCRIPTION_HPP_
-#define _FASTDDS_TOPIC_DESCRIPTION_HPP_
-
-#include <string>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-class TopicDescriptionImpl;
-
-/**
- * Class TopicDescription, represents the fact that both publications
- * and subscriptions are tied to a single data-type
- * @ingroup FASTDDS_MODULE
- */
-class TopicDescription
-{
-public:
-
-    /**
-     * Get the DomainParticipant to which the TopicDescription belongs.
-     * @return The DomainParticipant to which the TopicDescription belongs.
-     */
-    virtual DomainParticipant* get_participant() const = 0;
-
-    /**
-     * Get the name used to create this TopicDescription.
-     * @return the name used to create this TopicDescription.
-     */
-    const std::string& get_name() const
-    {
-        return name_;
-    }
-
-    /**
-     * Get the associated type name.
-     * @return the type name.
-     */
-    const std::string& get_type_name() const
-    {
-        return type_name_;
-    }
-
-    /**
-     * Get the TopicDescriptionImpl
-     * @return pointer to TopicDescriptionImpl
-     */
-    virtual TopicDescriptionImpl* get_impl() const = 0;
-
-protected:
-
-    /**
-     * @brief Constructor using topic name and data type name
-     * @param name Name for the topic
-     * @param type_name Data type name
-     */
-    TopicDescription(
-            const std::string& name,
-            const std::string& type_name)
-        : name_(name)
-        , type_name_(type_name)
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~TopicDescription()
-    {
-    }
-
-protected:
-
-    //! Name that allows the TopicDescription to be retrieved locally
-    std::string name_;
-
-    //! Name that defines a unique resulting type for the publication or the subscription
-    std::string type_name_;
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_TOPIC_DESCRIPTION_HPP_ */

+ 0 - 73
thirdpartylib/FastRTPS/include/fastdds/dds/topic/TopicListener.hpp

@@ -1,73 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file SubscriberListener.hpp
- */
-
-#ifndef _FASTDDS_TOPICLISTENER_HPP_
-#define _FASTDDS_TOPICLISTENER_HPP_
-
-#include <fastrtps/fastrtps_dll.h>
-#include <fastdds/dds/core/status/BaseStatus.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class Topic;
-
-/**
- * Class TopicListener, it should be used by the end user to implement specific callbacks to certain actions.
- * @ingroup FASTDDS_MODULE
- */
-class RTPS_DllAPI TopicListener
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    TopicListener()
-    {
-    }
-
-    /**
-     * @brief Destructor
-     */
-    virtual ~TopicListener()
-    {
-    }
-
-    /**
-     * Virtual function to be implemented by the user containing the actions to be performed when
-     * another topic exists with the same name but different characteristics.
-     * @param topic Topic
-     * @param status The inconsistent topic status
-     */
-    virtual void on_inconsistent_topic(
-            Topic* topic,
-            InconsistentTopicStatus status)
-    {
-        (void)topic;
-        (void)status;
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_TOPICLISTENER_HPP_ */

+ 0 - 224
thirdpartylib/FastRTPS/include/fastdds/dds/topic/TypeSupport.hpp

@@ -1,224 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TypeSupport.hpp
- */
-
-#ifndef _FASTDDS_TYPE_SUPPORT_HPP_
-#define _FASTDDS_TYPE_SUPPORT_HPP_
-
-#include <fastdds/dds/topic/TopicDataType.hpp>
-#include <fastrtps/types/DynamicPubSubType.h>
-#include <fastrtps/types/TypesBase.h>
-
-#include <string>
-#include <functional>
-#include <memory>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-class DomainParticipant;
-
-/**
- * @note This class inherits from std::shared_ptr<TopicDataType>.
- * @brief Class TypeSupport used to provide the DomainRTPSParticipant with the methods to serialize,
- * deserialize and get the key of a specific data type.
- * The user should created a class that inherits from this one,
- * where Serialize and deserialize methods MUST be implemented.
- * @ingroup FASTDDS_MODULE
- */
-class TypeSupport : public std::shared_ptr<fastdds::dds::TopicDataType>
-{
-public:
-
-    using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t;
-
-    using Base = std::shared_ptr<fastdds::dds::TopicDataType>;
-    using Base::operator ->;
-    using Base::operator *;
-    using Base::operator bool;
-    using Base::operator =;
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TypeSupport()
-        : std::shared_ptr<fastdds::dds::TopicDataType>(nullptr)
-    {
-    }
-
-    /**
-     * @brief Copy Constructor
-     * @param type Another instance of TypeSupport
-     */
-    RTPS_DllAPI TypeSupport(
-            const TypeSupport& type)
-        : std::shared_ptr<fastdds::dds::TopicDataType>(type)
-    {
-    }
-
-    /*!
-     * \brief TypeSupport constructor that receives a TopicDataType pointer.
-     * The passed pointer will be managed by the TypeSupport object, so creating two TypeSupport
-     * from the same pointer or deleting the passed pointer will produce a runtime error.
-     * \param ptr
-     */
-    RTPS_DllAPI explicit TypeSupport(
-            fastdds::dds::TopicDataType* ptr)
-        : std::shared_ptr<fastdds::dds::TopicDataType>(ptr)
-    {
-    }
-
-    /*!
-     * \brief TypeSupport constructor that receives a DynamicPubSubType.
-     * It will copy the instance so the user will keep the ownership of his object.
-     * \param ptr
-     */
-    RTPS_DllAPI TypeSupport(
-            fastrtps::types::DynamicPubSubType ptr)
-        : std::shared_ptr<fastdds::dds::TopicDataType>(std::make_shared<fastrtps::types::DynamicPubSubType>(std::move(
-                    ptr)))
-    {
-    }
-
-    /**
-     * @brief Registers the type on a participant
-     * @param participant DomainParticipant where the type is going to be registered
-     * @return RETCODE_BAD_PARAMETER if the type name is empty, RETCODE_PRECONDITION_NOT_MET if there is another type with
-     * the same name registered on the DomainParticipant and RETCODE_OK if it is registered correctly
-     */
-    RTPS_DllAPI virtual ReturnCode_t register_type(
-            DomainParticipant* participant) const;
-
-    /**
-     * @brief Registers the type on a participant
-     * @param participant DomainParticipant where the type is going to be registered
-     * @param type_name Name of the type to register
-     * @return RETCODE_BAD_PARAMETER if the type name is empty, RETCODE_PRECONDITION_NOT_MET if there is another type with
-     * the same name registered on the DomainParticipant and RETCODE_OK if it is registered correctly
-     */
-    RTPS_DllAPI virtual ReturnCode_t register_type(
-            DomainParticipant* participant,
-            std::string type_name) const;
-
-    /**
-     * @brief Getter for the type name
-     * @return name of the data type
-     */
-    RTPS_DllAPI virtual const std::string& get_type_name() const
-    {
-        return get()->m_topicDataTypeName;
-    }
-
-    /**
-     * @brief Serializes the data
-     * @param data Pointer to data
-     * @param payload Pointer to payload
-     * @return true if it is serialized correctly, false if not
-     */
-    RTPS_DllAPI virtual bool serialize(
-            void* data,
-            fastrtps::rtps::SerializedPayload_t* payload)
-    {
-        return get()->serialize(data, payload);
-    }
-
-    /**
-     * @brief Deserializes the data
-     * @param payload Pointer to payload
-     * @param data Pointer to data
-     * @return true if it is deserialized correctly, false if not
-     */
-    RTPS_DllAPI virtual bool deserialize(
-            fastrtps::rtps::SerializedPayload_t* payload,
-            void* data)
-    {
-        return get()->deserialize(payload, data);
-    }
-
-    /**
-     * @brief Getter for the SerializedSizeProvider
-     * @param data Pointer to data
-     * @return function
-     */
-    RTPS_DllAPI virtual std::function<uint32_t()> get_serialized_size_provider(
-            void* data)
-    {
-        return get()->getSerializedSizeProvider(data);
-    }
-
-    /**
-     * @brief Creates new data
-     * @return Pointer to the data
-     */
-    RTPS_DllAPI virtual void* create_data()
-    {
-        return get()->createData();
-    }
-
-    /**
-     * @brief Deletes data
-     * @param data Pointer to the data to delete
-     */
-    RTPS_DllAPI virtual void delete_data(
-            void* data)
-    {
-        return get()->deleteData(data);
-    }
-
-    /**
-     * @brief Getter for the data key
-     * @param data Pointer to data
-     * @param i_handle InstanceHandle pointer to store the key
-     * @param force_md5 boolean to force md5 (default: false)
-     * @return true if the key is returned, false if not
-     */
-    RTPS_DllAPI virtual bool get_key(
-            void* data,
-            fastrtps::rtps::InstanceHandle_t* i_handle,
-            bool force_md5 = false)
-    {
-        return get()->getKey(data, i_handle, force_md5);
-    }
-
-    RTPS_DllAPI virtual bool operator ==(
-            const TypeSupport& type_support)
-    {
-        return get()->m_typeSize == type_support->m_typeSize
-               && get()->m_isGetKeyDefined == type_support->m_isGetKeyDefined
-               && get()->m_topicDataTypeName == type_support->m_topicDataTypeName
-               && get()->type_identifier() == type_support->type_identifier()
-               && get()->type_information() == type_support->type_information()
-               && get()->type_object() == type_support->type_object();
-    }
-
-    /**
-     * @brief Check if the TypeSupport is empty
-     * @return true if empty, false if not
-     */
-    RTPS_DllAPI bool empty() const
-    {
-        return get() == nullptr;
-    }
-
-};
-
-} /* namespace dds */
-} /* namespace fastdds */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_TYPE_SUPPORT_HPP_ */

+ 0 - 509
thirdpartylib/FastRTPS/include/fastdds/dds/topic/qos/TopicQos.hpp

@@ -1,509 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file TopicQos.hpp
- */
-
-
-#ifndef _FASTDDS_TOPICQOS_HPP
-#define _FASTDDS_TOPICQOS_HPP
-
-#include <fastdds/dds/core/policy/QosPolicies.hpp>
-#include <fastrtps/attributes/TopicAttributes.h>
-
-#include <fastdds/dds/log/Log.hpp>
-
-namespace eprosima {
-namespace fastdds {
-namespace dds {
-
-/**
- * Class TopicQos, containing all the possible Qos that can be set for a determined Topic.
- * Although these values can be set and are transmitted
- * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
- * Please consult each of them to check for implementation details and default values.
- * @ingroup FASTDDS_QOS_MODULE
- */
-class TopicQos
-{
-public:
-
-    /**
-     * @brief Constructor
-     */
-    RTPS_DllAPI TopicQos();
-
-    bool operator ==(
-            const TopicQos& b) const
-    {
-        return (this->topic_data_ == b.topic_data()) &&
-               (this->durability_ == b.durability()) &&
-               (this->durability_service_ == b.durability_service()) &&
-               (this->deadline_ == b.deadline()) &&
-               (this->latency_budget_ == b.latency_budget()) &&
-               (this->liveliness_ == b.liveliness()) &&
-               (this->reliability_ == b.reliability()) &&
-               (this->destination_order_ == b.destination_order()) &&
-               (this->history_ == b.history()) &&
-               (this->resource_limits_ == b.resource_limits()) &&
-               (this->transport_priority_ == b.transport_priority()) &&
-               (this->lifespan_ == b.lifespan()) &&
-               (this->ownership_ == b.ownership());
-    }
-
-    /**
-     * Getter for TopicDataQosPolicy
-     * @return TopicDataQos reference
-     */
-    const TopicDataQosPolicy& topic_data() const
-    {
-        return topic_data_;
-    }
-
-    /**
-     * Getter for TopicDataQosPolicy
-     * @return TopicDataQos reference
-     */
-    TopicDataQosPolicy& topic_data()
-    {
-        return topic_data_;
-    }
-
-    /**
-     * Setter for TopicDataQosPolicy
-     * @param value new value for the TopicDataQosPolicy
-     */
-    void topic_data(
-            const TopicDataQosPolicy& value)
-    {
-        topic_data_ = value;
-    }
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQos reference
-     */
-    const DurabilityQosPolicy& durability() const
-    {
-        return durability_;
-    }
-
-    /**
-     * Getter for DurabilityQosPolicy
-     * @return DurabilityQos reference
-     */
-    DurabilityQosPolicy& durability()
-    {
-        return durability_;
-    }
-
-    /**
-     * Setter for DurabilityQosPolicy
-     * @param durability new value for the DurabilityQosPolicy
-     */
-    void durability(
-            const DurabilityQosPolicy& durability)
-    {
-        durability_ = durability;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQos reference
-     */
-    const DurabilityServiceQosPolicy& durability_service() const
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Getter for DurabilityServiceQosPolicy
-     * @return DurabilityServiceQos reference
-     */
-    DurabilityServiceQosPolicy& durability_service()
-    {
-        return durability_service_;
-    }
-
-    /**
-     * Setter for DurabilityServiceQosPolicy
-     * @param durability_service new value for the DurabilityServiceQosPolicy
-     */
-    void durability_service(
-            const DurabilityServiceQosPolicy& durability_service)
-    {
-        durability_service_ = durability_service;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQos reference
-     */
-    const DeadlineQosPolicy& deadline() const
-    {
-        return deadline_;
-    }
-
-    /**
-     * Getter for DeadlineQosPolicy
-     * @return DeadlineQos reference
-     */
-    DeadlineQosPolicy& deadline()
-    {
-        return deadline_;
-    }
-
-    /**
-     * Setter for DeadlineQosPolicy
-     * @param deadline new value for the DeadlineQosPolicy
-     */
-    void deadline(
-            const DeadlineQosPolicy& deadline)
-    {
-        deadline_ = deadline;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQos reference
-     */
-    const LatencyBudgetQosPolicy& latency_budget() const
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Getter for LatencyBudgetQosPolicy
-     * @return LatencyBudgetQos reference
-     */
-    LatencyBudgetQosPolicy& latency_budget()
-    {
-        return latency_budget_;
-    }
-
-    /**
-     * Setter for LatencyBudgetQosPolicy
-     * @param latency_budget new value for the LatencyBudgetQosPolicy
-     */
-    void latency_budget(
-            const LatencyBudgetQosPolicy& latency_budget)
-    {
-        latency_budget_ = latency_budget;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQos reference
-     */
-    const LivelinessQosPolicy& liveliness() const
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Getter for LivelinessQosPolicy
-     * @return LivelinessQos reference
-     */
-    LivelinessQosPolicy& liveliness()
-    {
-        return liveliness_;
-    }
-
-    /**
-     * Setter for LivelinessQosPolicy
-     * @param liveliness new value for the LivelinessQosPolicy
-     */
-    void liveliness(
-            const LivelinessQosPolicy& liveliness)
-    {
-        liveliness_ = liveliness;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQos reference
-     */
-    const ReliabilityQosPolicy& reliability() const
-    {
-        return reliability_;
-    }
-
-    /**
-     * Getter for ReliabilityQosPolicy
-     * @return ReliabilityQos reference
-     */
-    ReliabilityQosPolicy& reliability()
-    {
-        return reliability_;
-    }
-
-    /**
-     * Setter for ReliabilityQosPolicy
-     * @param reliability new value for the ReliabilityQosPolicy
-     */
-    void reliability(
-            const ReliabilityQosPolicy& reliability)
-    {
-        reliability_ = reliability;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQos reference
-     */
-    const DestinationOrderQosPolicy& destination_order() const
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Getter for DestinationOrderQosPolicy
-     * @return DestinationOrderQos reference
-     */
-    DestinationOrderQosPolicy& destination_order()
-    {
-        return destination_order_;
-    }
-
-    /**
-     * Setter for DestinationOrderQosPolicy
-     * @param destination_order new value for the DestinationOrderQosPolicy
-     */
-    void destination_order(
-            const DestinationOrderQosPolicy& destination_order)
-    {
-        destination_order_ = destination_order;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQos reference
-     */
-    const HistoryQosPolicy& history() const
-    {
-        return history_;
-    }
-
-    /**
-     * Getter for HistoryQosPolicy
-     * @return HistoryQos reference
-     */
-    HistoryQosPolicy& history()
-    {
-        return history_;
-    }
-
-    /**
-     * Setter for HistoryQosPolicy
-     * @param history new value for the HistoryQosPolicy
-     */
-    void history(
-            const HistoryQosPolicy& history)
-    {
-        history_ = history;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQos reference
-     */
-    const ResourceLimitsQosPolicy& resource_limits() const
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Getter for ResourceLimitsQosPolicy
-     * @return ResourceLimitsQos reference
-     */
-    ResourceLimitsQosPolicy& resource_limits()
-    {
-        return resource_limits_;
-    }
-
-    /**
-     * Setter for ResourceLimitsQosPolicy
-     * @param resource_limits new value for the ResourceLimitsQosPolicy
-     */
-    void resource_limits(
-            const ResourceLimitsQosPolicy& resource_limits)
-    {
-        resource_limits_ = resource_limits;
-    }
-
-    /**
-     * Getter for TransportPriorityQosPolicy
-     * @return TransportPriorityQos reference
-     */
-    const TransportPriorityQosPolicy& transport_priority() const
-    {
-        return transport_priority_;
-    }
-
-    /**
-     * Getter for TransportPriorityQosPolicy
-     * @return TransportPriorityQos reference
-     */
-    TransportPriorityQosPolicy& transport_priority()
-    {
-        return transport_priority_;
-    }
-
-    /**
-     * Setter for TransportPriorityQosPolicy
-     * @param transport_priority new value for the TransportPriorityQosPolicy
-     */
-    void transport_priority(
-            const TransportPriorityQosPolicy& transport_priority)
-    {
-        transport_priority_ = transport_priority;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQos reference
-     */
-    const LifespanQosPolicy& lifespan() const
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Getter for LifespanQosPolicy
-     * @return LifespanQos reference
-     */
-    LifespanQosPolicy& lifespan()
-    {
-        return lifespan_;
-    }
-
-    /**
-     * Setter for LifespanQosPolicy
-     * @param lifespan new value for the LifespanQosPolicy
-     */
-    void lifespan(
-            const LifespanQosPolicy& lifespan)
-    {
-        lifespan_ = lifespan;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQos reference
-     */
-    const OwnershipQosPolicy& ownership() const
-    {
-        return ownership_;
-    }
-
-    /**
-     * Getter for OwnershipQosPolicy
-     * @return OwnershipQos reference
-     */
-    OwnershipQosPolicy& ownership()
-    {
-        return ownership_;
-    }
-
-    /**
-     * Setter for OwnershipQosPolicy
-     * @param ownership new value for the OwnershipQosPolicy
-     */
-    void ownership(
-            const OwnershipQosPolicy& ownership)
-    {
-        ownership_ = ownership;
-    }
-
-    /**
-     * Getter for DataRepresentationQosPolicy
-     * @return DataRepresentationQosPolicy reference
-     */
-    const DataRepresentationQosPolicy& representation() const
-    {
-        return representation_;
-    }
-
-    /**
-     * Getter for DataRepresentationQosPolicy
-     * @return DataRepresentationQosPolicy reference
-     */
-    DataRepresentationQosPolicy& representation()
-    {
-        return representation_;
-    }
-
-    /**
-     * Setter for DataRepresentationQosPolicy
-     * @param representation new value for the DataRepresentationQosPolicy
-     */
-    void representation(
-            const DataRepresentationQosPolicy& representation)
-    {
-        representation_ = representation;
-    }
-
-private:
-
-    //!Topic Data Qos, NOT implemented in the library.
-    TopicDataQosPolicy topic_data_;
-
-    //!Durability Qos, implemented in the library.
-    DurabilityQosPolicy durability_;
-
-    //!Durability Service Qos, NOT implemented in the library.
-    DurabilityServiceQosPolicy durability_service_;
-
-    //!Deadline Qos, implemented in the library.
-    DeadlineQosPolicy deadline_;
-
-    //!Latency Budget Qos, NOT implemented in the library.
-    LatencyBudgetQosPolicy latency_budget_;
-
-    //!Liveliness Qos, implemented in the library.
-    LivelinessQosPolicy liveliness_;
-
-    //!Reliability Qos, implemented in the library.
-    ReliabilityQosPolicy reliability_;
-
-    //!Destination Order Qos, NOT implemented in the library.
-    DestinationOrderQosPolicy destination_order_;
-
-    //!History Qos, implemented in the library.
-    HistoryQosPolicy history_;
-
-    //!Resource Limits Qos, implemented in the library.
-    ResourceLimitsQosPolicy resource_limits_;
-
-    //!Transport Priority Qos, NOT implemented in the library.
-    TransportPriorityQosPolicy transport_priority_;
-
-    //!Lifespan Qos, implemented in the library.
-    LifespanQosPolicy lifespan_;
-
-    //!Ownership Qos, NOT implemented in the library.
-    OwnershipQosPolicy ownership_;
-
-    //!Data Representation Qos, (XTypes extension).
-    DataRepresentationQosPolicy representation_;
-};
-
-RTPS_DllAPI extern const TopicQos TOPIC_QOS_DEFAULT;
-
-} // namespace dds
-} // namespace fastdds
-} // namespace eprosima
-
-#endif // _FASTDDS_TOPICQOS_HPP

+ 0 - 115
thirdpartylib/FastRTPS/include/fastdds/rtps/Endpoint.h

@@ -1,115 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file Endpoint.h
- */
-
-#ifndef _FASTDDS_RTPS_ENDPOINT_H_
-#define _FASTDDS_RTPS_ENDPOINT_H_
-
-#include <fastdds/rtps/common/Types.h>
-#include <fastdds/rtps/common/Locator.h>
-#include <fastdds/rtps/common/Guid.h>
-#include <fastdds/rtps/attributes/EndpointAttributes.h>
-#include <fastrtps/utils/TimedMutex.hpp>
-
-namespace eprosima {
-namespace fastrtps{
-namespace rtps {
-
-class RTPSParticipantImpl;
-class ResourceEvent;
-
-
-/**
- * Class Endpoint, all entities of the RTPS network derive from this class.
- * Although the RTPSParticipant is also defined as an endpoint in the RTPS specification, in this implementation
- * the RTPSParticipant class **does not** inherit from the endpoint class. Each Endpoint object owns a pointer to the
- * RTPSParticipant it belongs to.
- * @ingroup COMMON_MODULE
- */
-class Endpoint
-{
-    friend class RTPSParticipantImpl;
-
-    protected:
-
-    Endpoint(
-            RTPSParticipantImpl* pimpl,
-            const GUID_t& guid,
-            const EndpointAttributes& att)
-        : mp_RTPSParticipant(pimpl)
-        , m_guid(guid)
-        , m_att(att)
-#if HAVE_SECURITY
-        ,supports_rtps_protection_(true)
-#endif
-    {
-    }
-
-    virtual ~Endpoint() = default;
-
-    public:
-    /**
-     * Get associated GUID
-     * @return Associated GUID
-     */
-    RTPS_DllAPI inline const GUID_t& getGuid() const { return m_guid; }
-
-    /**
-     * Get mutex
-     * @return Associated Mutex
-     */
-    RTPS_DllAPI inline RecursiveTimedMutex& getMutex() { return mp_mutex; }
-
-    /**
-     * Get associated attributes
-     * @return Endpoint attributes
-     */
-    RTPS_DllAPI inline EndpointAttributes& getAttributes() { return m_att; }
-
-#if HAVE_SECURITY
-    bool supports_rtps_protection() { return supports_rtps_protection_; }
-#endif
-
-    protected:
-
-    //!Pointer to the RTPSParticipant containing this endpoint.
-    RTPSParticipantImpl* mp_RTPSParticipant;
-
-    //!Endpoint GUID
-    const GUID_t m_guid;
-
-    //!Endpoint Attributes
-    EndpointAttributes m_att;
-
-    //!Endpoint Mutex
-    mutable RecursiveTimedMutex mp_mutex;
-
-    private:
-
-    Endpoint& operator=(const Endpoint&) = delete;
-
-#if HAVE_SECURITY
-    bool supports_rtps_protection_;
-#endif
-};
-
-
-}
-} /* namespace rtps */
-} /* namespace eprosima */
-
-#endif //_FASTDDS_RTPS_ENDPOINT_H_

+ 0 - 202
thirdpartylib/FastRTPS/include/fastdds/rtps/RTPSDomain.h

@@ -1,202 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file RTPSDomain.h
- */
-
-#ifndef _FASTDDS_RTPS_DOMAIN_H_
-#define _FASTDDS_RTPS_DOMAIN_H_
-
-#include <fastdds/rtps/common/Types.h>
-
-#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
-
-#include <atomic>
-#include <mutex>
-#include <set>
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-
-class RTPSParticipantImpl;
-class RTPSParticipant;
-class RTPSParticipantListener;
-class RTPSWriter;
-class WriterAttributes;
-class WriterHistory;
-class WriterListener;
-class RTPSReader;
-class ReaderAttributes;
-class ReaderHistory;
-class ReaderListener;
-class RTPSDomainImpl;
-
-/**
- * Class RTPSDomain,it manages the creation and destruction of RTPSParticipant RTPSWriter and RTPSReader. It stores
- * a list of all created RTPSParticipant. Is has only static methods.
- * @ingroup RTPS_MODULE
- */
-class RTPSDomain
-{
-
-    friend class RTPSDomainImpl;
-
-public:
-
-    /**
-     * Method to shut down all RTPSParticipants, readers, writers, etc.
-     * It must be called at the end of the process to avoid memory leaks.
-     * It also shut downs the DomainRTPSParticipant.
-     */
-    RTPS_DllAPI static void stopAll();
-
-    /**
-     * @brief Create a RTPSParticipant.
-     * @param domain_id DomainId to be used by the RTPSParticipant (80 by default).
-     * @param attrs RTPSParticipant Attributes.
-     * @param plisten Pointer to the ParticipantListener.
-     * @return Pointer to the RTPSParticipant.
-     */
-    RTPS_DllAPI static RTPSParticipant* createParticipant(
-            uint32_t domain_id,
-            const RTPSParticipantAttributes& attrs,
-            RTPSParticipantListener* plisten = nullptr);
-
-    /**
-     * @brief Create a RTPSParticipant.
-     * @param domain_id DomainId to be used by the RTPSParticipant (80 by default).
-     * @param enabled True if the RTPSParticipant should be enabled on creation. False if it will be enabled later with RTPSParticipant::enable()
-     * @param attrs RTPSParticipant Attributes.
-     * @param plisten Pointer to the ParticipantListener.
-     * @return Pointer to the RTPSParticipant.
-     */
-    RTPS_DllAPI static RTPSParticipant* createParticipant(
-            uint32_t domain_id,
-            bool enabled,
-            const RTPSParticipantAttributes& attrs,
-            RTPSParticipantListener* plisten = nullptr);
-
-    /**
-     * Create a RTPSWriter in a participant.
-     * @param p Pointer to the RTPSParticipant.
-     * @param watt Writer Attributes.
-     * @param hist Pointer to the WriterHistory.
-     * @param listen Pointer to the WriterListener.
-     * @return Pointer to the created RTPSWriter.
-     */
-    RTPS_DllAPI static RTPSWriter* createRTPSWriter(
-            RTPSParticipant* p,
-            WriterAttributes& watt,
-            WriterHistory* hist,
-            WriterListener* listen = nullptr);
-
-    /**
-     * Remove a RTPSWriter.
-     * @param writer Pointer to the writer you want to remove.
-     * @return  True if correctly removed.
-     */
-    RTPS_DllAPI static bool removeRTPSWriter(
-            RTPSWriter* writer);
-
-    /**
-     * Create a RTPSReader in a participant.
-     * @param p Pointer to the RTPSParticipant.
-     * @param ratt Reader Attributes.
-     * @param hist Pointer to the ReaderHistory.
-     * @param listen Pointer to the ReaderListener.
-     * @return Pointer to the created RTPSReader.
-     */
-    RTPS_DllAPI static RTPSReader* createRTPSReader(
-            RTPSParticipant* p,
-            ReaderAttributes& ratt,
-            ReaderHistory* hist,
-            ReaderListener* listen = nullptr);
-
-    /**
-     * Remove a RTPSReader.
-     * @param reader Pointer to the reader you want to remove.
-     * @return  True if correctly removed.
-     */
-    RTPS_DllAPI static bool removeRTPSReader(
-            RTPSReader* reader);
-
-    /**
-     * Remove a RTPSParticipant and delete all its associated Writers, Readers, resources, etc.
-     * @param[in] p Pointer to the RTPSParticipant;
-     * @return True if correct.
-     */
-    RTPS_DllAPI static bool removeRTPSParticipant(
-            RTPSParticipant* p);
-
-    /**
-     * Set the maximum RTPSParticipantID.
-     * @param maxRTPSParticipantId ID.
-     */
-    static inline void setMaxRTPSParticipantId(
-            uint32_t maxRTPSParticipantId)
-    {
-        m_maxRTPSParticipantID = maxRTPSParticipantId;
-    }
-
-    /**
-     * Creates a RTPSParticipant as default server or client if ROS_MASTER_URI environment variable is set.
-     * @param domain_id DDS domain associated
-     * @param attrs RTPSParticipant Attributes.
-     * @param listen Pointer to the ParticipantListener.
-     * @return Pointer to the RTPSParticipant.
-     */
-    static RTPSParticipant* clientServerEnvironmentCreationOverride(
-            uint32_t domain_id,
-            const RTPSParticipantAttributes& attrs,
-            RTPSParticipantListener* listen /*= nullptr*/);
-
-private:
-
-    typedef std::pair<RTPSParticipant*, RTPSParticipantImpl*> t_p_RTPSParticipant;
-
-    RTPSDomain() = delete;
-
-    /**
-     * DomainRTPSParticipant destructor
-     */
-    ~RTPSDomain() = delete;
-
-    /**
-     * @brief Get Id to create a RTPSParticipant.
-     * @return Different ID for each call.
-     */
-    static inline uint32_t getNewId()
-    {
-        return m_maxRTPSParticipantID++;
-    }
-
-    static void removeRTPSParticipant_nts(
-            t_p_RTPSParticipant&);
-
-    static std::mutex m_mutex;
-
-    static std::atomic<uint32_t> m_maxRTPSParticipantID;
-
-    static std::vector<t_p_RTPSParticipant> m_RTPSParticipants;
-
-    static std::set<uint32_t> m_RTPSParticipantIDs;
-};
-
-}
-} /* namespace  */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_RTPS_DOMAIN_H_*/

+ 0 - 124
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/EndpointAttributes.h

@@ -1,124 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file fastdds/rtps/attributes/EndpointAttributes.h
- */
-
-#ifndef _FASTDDS_ENDPOINTATTRIBUTES_H_
-#define _FASTDDS_ENDPOINTATTRIBUTES_H_
-
-#include <fastdds/rtps/common/Types.h>
-#include <fastdds/rtps/common/Locator.h>
-#include <fastdds/rtps/attributes/PropertyPolicy.h>
-#include <fastdds/rtps/security/accesscontrol/EndpointSecurityAttributes.h>
-
-namespace eprosima {
-namespace fastrtps{
-namespace rtps {
-
-/**
- * Structure EndpointAttributes, describing the attributes associated with an RTPS Endpoint.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class EndpointAttributes
-{
-    public:
-        //!Endpoint kind, default value WRITER
-        EndpointKind_t endpointKind;
-
-        //!Topic kind, default value NO_KEY
-        TopicKind_t topicKind;
-
-        //!Reliability kind, default value BEST_EFFORT
-        ReliabilityKind_t reliabilityKind;
-
-        //!Durability kind, default value VOLATILE
-        DurabilityKind_t durabilityKind;
-
-        //!GUID used for persistence
-        GUID_t persistence_guid;
-
-        //!Unicast locator list
-        LocatorList_t unicastLocatorList;
-
-        //!Multicast locator list
-        LocatorList_t multicastLocatorList;
-
-        //! Remote locator list.
-        LocatorList_t remoteLocatorList;
-
-        //!Properties
-        PropertyPolicy properties;
-
-        EndpointAttributes()
-            : endpointKind(WRITER)
-            , topicKind(NO_KEY)
-            , reliabilityKind(BEST_EFFORT)
-            , durabilityKind(VOLATILE)
-            , persistence_guid()
-            , m_userDefinedID(-1)
-            , m_entityID(-1)
-        {
-        }
-
-        virtual ~EndpointAttributes(){};
-
-        /**
-         * Get the user defined ID
-         * @return User defined ID
-         */
-        inline int16_t getUserDefinedID() const { return m_userDefinedID; }
-
-        /**
-         * Get the entity defined ID
-         * @return Entity ID
-         */
-        inline int16_t getEntityID() const { return m_entityID; }
-
-        /**
-         * Set the user defined ID
-         * @param id User defined ID to be set
-         */
-        inline void setUserDefinedID(uint8_t id) { m_userDefinedID = id; }
-
-        /**
-         * Set the entity ID
-         * @param id Entity ID to be set
-         */
-        inline void setEntityID(uint8_t id) { m_entityID = id; }
-
-    #if HAVE_SECURITY
-        const security::EndpointSecurityAttributes& security_attributes() const { return security_attributes_; }
-
-        security::EndpointSecurityAttributes& security_attributes() { return security_attributes_; }
-    #endif
-
-    private:
-        //!User Defined ID, used for StaticEndpointDiscovery, default value -1.
-        int16_t m_userDefinedID;
-
-        //!Entity ID, if the user want to specify the EntityID of the enpoint, default value -1.
-        int16_t m_entityID;
-
-    #if HAVE_SECURITY
-        security::EndpointSecurityAttributes security_attributes_;
-    #endif
-};
-
-} /* namespace rtps */
-} /* namespace fastrtps */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_ENDPOINTATTRIBUTES_H_ */

+ 0 - 90
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/HistoryAttributes.h

@@ -1,90 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file HistoryAttributes.h
- *
- */
-
-#ifndef _FASTDDS_HISTORYATTRIBUTES_H_
-#define _FASTDDS_HISTORYATTRIBUTES_H_
-
-#include <fastdds/rtps/resources/ResourceManagement.h>
-#include <fastrtps/fastrtps_dll.h>
-
-#include <cstdint>
-
-namespace eprosima{
-namespace fastrtps{
-namespace rtps{
-
-/**
- * Class HistoryAttributes, to specify the attributes of a WriterHistory or a ReaderHistory.
- * This class is only intended to be used with the RTPS API.
- * The Publsiher-Subscriber API has other fields to define this values (HistoryQosPolicy and ResourceLimitsQosPolicy).
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class RTPS_DllAPI HistoryAttributes
-{
-    public:
-        //!Memory management policy.
-        MemoryManagementPolicy_t memoryPolicy;
-
-        //!Maximum payload size of the history, default value 500.
-        uint32_t payloadMaxSize;
-
-        //!Number of the initial Reserved Caches, default value 500.
-        int32_t initialReservedCaches;
-
-        /**
-         * Maximum number of reserved caches. Default value is 0 that indicates to keep reserving until something
-         * breaks.
-         */
-        int32_t maximumReservedCaches;
-
-        //! Default constructor
-        HistoryAttributes()
-            : memoryPolicy(PREALLOCATED_MEMORY_MODE)
-            , payloadMaxSize(500)
-            , initialReservedCaches(500)
-            , maximumReservedCaches(0)
-        {}
-
-        /** Constructor
-         * @param memoryPolicy Set wether memory can be dynamically reallocated or not
-         * @param payload Maximum payload size. It is used when memory management polycy is
-         * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE.
-         * @param initial Initial reserved caches. It is used when memory management policy is
-         * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE.
-         * @param maxRes Maximum reserved caches.
-         */
-        HistoryAttributes(
-                MemoryManagementPolicy_t memoryPolicy,
-                uint32_t payload,
-                int32_t initial,
-                int32_t maxRes)
-            : memoryPolicy(memoryPolicy)
-            , payloadMaxSize(payload)
-            , initialReservedCaches(initial)
-            , maximumReservedCaches(maxRes)
-        {}
-
-        virtual ~HistoryAttributes(){}
-};
-
-}
-}
-}
-
-#endif /* _FASTDDS_HISTORYATTRIBUTES_H_ */

+ 0 - 124
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/PropertyPolicy.h

@@ -1,124 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/*!
- * @file PropertyPolicy.h
- */
-#ifndef _FASTDDS_RTPS_ATTRIBUTES_PROPERTYPOLICY_H_
-#define _FASTDDS_RTPS_ATTRIBUTES_PROPERTYPOLICY_H_
-
-#include <fastdds/rtps/common/Property.h>
-#include <fastdds/rtps/common/BinaryProperty.h>
-#include <fastrtps/fastrtps_dll.h>
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-
-class PropertyPolicy
-{
-    public:
-        RTPS_DllAPI PropertyPolicy() {}
-
-        RTPS_DllAPI PropertyPolicy(const PropertyPolicy& property_policy) :
-            properties_(property_policy.properties_),
-            binary_properties_(property_policy.binary_properties_) {}
-
-        RTPS_DllAPI PropertyPolicy(PropertyPolicy&& property_policy) :
-            properties_(std::move(property_policy.properties_)),
-            binary_properties_(std::move(property_policy.binary_properties_)) {}
-
-        RTPS_DllAPI PropertyPolicy& operator=(const PropertyPolicy& property_policy)
-        {
-            properties_ = property_policy.properties_;
-            binary_properties_ = property_policy.binary_properties_;
-            return *this;
-        }
-
-        RTPS_DllAPI PropertyPolicy& operator=(PropertyPolicy&& property_policy)
-        {
-            properties_ = std::move(property_policy.properties_);
-            binary_properties_= std::move(property_policy.binary_properties_);
-            return *this;
-        }
-
-        RTPS_DllAPI bool operator==(const PropertyPolicy& b) const
-        {
-            return (this->properties_ == b.properties_) &&
-                    (this->binary_properties_ == b.binary_properties_);
-        }
-
-        //!Get properties
-        RTPS_DllAPI const PropertySeq& properties() const
-        {
-            return properties_;
-        }
-
-        //!Set properties
-        RTPS_DllAPI PropertySeq& properties()
-        {
-            return properties_;
-        }
-
-        //!Get binary_properties
-        RTPS_DllAPI const BinaryPropertySeq& binary_properties() const
-        {
-            return binary_properties_;
-        }
-
-        //!Set binary_properties
-        RTPS_DllAPI BinaryPropertySeq& binary_properties()
-        {
-            return binary_properties_;
-        }
-
-    private:
-        PropertySeq properties_;
-
-        BinaryPropertySeq binary_properties_;
-};
-
-class PropertyPolicyHelper
-{
-    public:
-        /*!
-        * @brief Returns only the properties whose name starts with the prefix.
-        * Prefix is removed in returned properties.
-        * @param property_policy PropertyPolicy where properties will be searched.
-        * @param prefix Prefix used to search properties.
-        * @return A copy of properties whose name starts with the prefix.
-        */
-        RTPS_DllAPI static PropertyPolicy get_properties_with_prefix(
-                const PropertyPolicy& property_policy,
-                const std::string& prefix);
-
-        //!Get the length of the property_policy
-        RTPS_DllAPI static size_t length(const PropertyPolicy& property_policy);
-
-        //!Look for a property_policy by name
-        RTPS_DllAPI static std::string* find_property(
-                PropertyPolicy& property_policy,
-                const std::string& name);
-
-        //!Retrieves a property_policy by name
-        RTPS_DllAPI static const std::string* find_property(
-                const PropertyPolicy& property_policy,
-                const std::string& name);
-};
-
-} //namespace rtps
-} //namespace fastrtps
-} //namespace eprosima
-
-#endif // _FASTDDS_RTPS_ATTRIBUTES_PROPERTYPOLICY_H_

+ 0 - 178
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp

@@ -1,178 +0,0 @@
-// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file RTPSParticipantAllocationAttributes.hpp
- */
-
-#ifndef _FASTDDS_RTPS_RTPSPARTICIPANTALLOCATIONATTRIBUTES_HPP_
-#define _FASTDDS_RTPS_RTPSPARTICIPANTALLOCATIONATTRIBUTES_HPP_
-
-#include <fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp>
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-
-/**
- * @brief Holds limits for collections of remote locators.
- */
-struct RemoteLocatorsAllocationAttributes
-{
-    bool operator ==(
-            const RemoteLocatorsAllocationAttributes& b) const
-    {
-        return (this->max_unicast_locators == b.max_unicast_locators) &&
-               (this->max_multicast_locators == b.max_multicast_locators);
-    }
-
-    /** Maximum number of unicast locators per remote entity.
-     *
-     * This attribute controls the maximum number of unicast locators to keep for
-     * each discovered remote entity (be it a participant, reader of writer). It is
-     * recommended to use the highest number of local addresses found on all the systems
-     * belonging to the same domain as this participant.
-     */
-    size_t max_unicast_locators = 4u;
-
-    /** Maximum number of multicast locators per remote entity.
-     *
-     * This attribute controls the maximum number of multicast locators to keep for
-     * each discovered remote entity (be it a participant, reader of writer). The
-     * default value of 1 is usually enough, as it doesn't make sense to add more
-     * than one multicast locator per entity.
-     */
-    size_t max_multicast_locators = 1u;
-};
-
-/**
- * @brief Holds limits for send buffers allocations.
- */
-struct SendBuffersAllocationAttributes
-{
-    bool operator ==(
-            const SendBuffersAllocationAttributes& b) const
-    {
-        return (this->preallocated_number == b.preallocated_number) &&
-               (this->dynamic == b.dynamic);
-    }
-
-    /** Initial number of send buffers to allocate.
-     *
-     * This attribute controls the initial number of send buffers to be allocated.
-     * The default value of 0 will perform an initial guess of the number of buffers
-     * required, based on the number of threads from which a send operation could be
-     * started.
-     */
-    size_t preallocated_number = 0u;
-
-    /** Whether the number of send buffers is allowed to grow.
-     *
-     * This attribute controls how the buffer manager behaves when a send buffer is not
-     * available. When true, a new buffer will be created. When false, it will wait for a
-     * buffer to be returned. This is a tradeoff between latency and dynamic allocations.
-     */
-    bool dynamic = false;
-};
-
-/**
- * @brief Holds limits for variable-length data.
- */
-struct VariableLengthDataLimits
-{
-    bool operator ==(
-            const VariableLengthDataLimits& b) const
-    {
-        return (this->max_properties == b.max_properties) &&
-               (this->max_user_data == b.max_user_data) &&
-               (this->max_partitions == b.max_partitions);
-    }
-
-    //! Defines the maximum size (in octets) of properties data in the local or remote participant
-    size_t max_properties = 0;
-    //! Defines the maximum size (in octets) of user data in the local or remote participant
-    size_t max_user_data = 0;
-    //! Defines the maximum size (in octets) of partitions data
-    size_t max_partitions = 0;
-};
-
-/**
- * @brief Holds allocation limits affecting collections managed by a participant.
- */
-struct RTPSParticipantAllocationAttributes
-{
-    //! Holds limits for collections of remote locators.
-    RemoteLocatorsAllocationAttributes locators;
-    //! Defines the allocation behaviour for collections dependent on the total number of participants.
-    ResourceLimitedContainerConfig participants;
-    //! Defines the allocation behaviour for collections dependent on the total number of readers per participant.
-    ResourceLimitedContainerConfig readers;
-    //! Defines the allocation behaviour for collections dependent on the total number of writers per participant.
-    ResourceLimitedContainerConfig writers;
-    //! Defines the allocation behaviour for the send buffer manager.
-    SendBuffersAllocationAttributes send_buffers;
-    //! Holds limits for variable-length data
-    VariableLengthDataLimits data_limits;
-
-    //! @return the allocation config for the total of readers in the system (participants * readers)
-    ResourceLimitedContainerConfig total_readers() const
-    {
-        return total_endpoints(readers);
-    }
-
-    //! @return the allocation config for the total of writers in the system (participants * writers)
-    ResourceLimitedContainerConfig total_writers() const
-    {
-        return total_endpoints(writers);
-    }
-
-    bool operator ==(
-            const RTPSParticipantAllocationAttributes& b) const
-    {
-        return (this->locators == b.locators) &&
-               (this->participants == b.participants) &&
-               (this->readers == b.readers) &&
-               (this->writers == b.writers) &&
-               (this->send_buffers == b.send_buffers) &&
-               (this->data_limits == b.data_limits);
-    }
-
-private:
-
-    ResourceLimitedContainerConfig total_endpoints(
-            const ResourceLimitedContainerConfig& endpoints) const
-    {
-        constexpr size_t max = std::numeric_limits<size_t>::max();
-        size_t initial;
-        size_t maximum;
-        size_t increment;
-
-        initial = participants.initial * endpoints.initial;
-        maximum = (participants.maximum == max || endpoints.maximum == max)
-                ? max : participants.maximum * endpoints.maximum;
-        increment = std::max(participants.increment, endpoints.increment);
-
-        return { initial, maximum, increment };
-    }
-
-};
-
-const RTPSParticipantAllocationAttributes c_default_RTPSParticipantAllocationAttributes
-    = RTPSParticipantAllocationAttributes();
-
-} /* namespace rtps */
-} /* namespace fastrtps */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_RTPS_RTPSPARTICIPANTALLOCATIONATTRIBUTES_HPP_ */

+ 0 - 471
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h

@@ -1,471 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file RTPSParticipantAttributes.h
- */
-
-#ifndef _FASTDDS_RTPSPARTICIPANTPARAMETERS_H_
-#define _FASTDDS_RTPSPARTICIPANTPARAMETERS_H_
-
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastdds/rtps/common/Locator.h>
-#include <fastdds/rtps/common/PortParameters.h>
-#include <fastdds/rtps/attributes/PropertyPolicy.h>
-#include <fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h>
-#include <fastdds/rtps/transport/TransportInterface.h>
-#include <fastdds/rtps/resources/ResourceManagement.h>
-#include <fastrtps/utils/fixed_size_string.hpp>
-#include <fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp>
-#include <fastdds/rtps/attributes/ServerAttributes.h>
-
-#include <memory>
-#include <sstream>
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-
-
-//!PDP subclass choice
-typedef enum DiscoveryProtocol
-{
-    NONE,
-    /*!<
-        NO discovery whatsoever would be used.
-        Publisher and Subscriber defined with the same topic name would NOT be linked.
-        All matching must be done manually through the addReaderLocator, addReaderProxy, addWriterProxy methods.
-     */
-    SIMPLE,
-    /*!<
-        Discovery works according to 'The Real-time Publish-Subscribe Protocol(RTPS) DDS
-        Interoperability Wire Protocol Specification'
-     */
-    EXTERNAL,
-    /*!<
-        A user defined PDP subclass object must be provided in the attributes that deals with the discovery.
-        Framework is not responsible of this object lifetime.
-     */
-    CLIENT, /*!< The participant will behave as a client concerning discovery operation.
-                 Server locators should be specified as attributes. */
-    SERVER, /*!< The participant will behave as a server concerning discovery operation.
-                 Discovery operation is volatile (discovery handshake must take place if shutdown). */
-    BACKUP  /*!< The participant will behave as a server concerning discovery operation.
-                 Discovery operation persist on a file (discovery handshake wouldn't repeat if shutdown). */
-
-} DiscoveryProtocol_t;
-
-//!Filtering flags when discovering participants
-typedef enum ParticipantFilteringFlags : uint32_t
-{
-    NO_FILTER = 0,
-    FILTER_DIFFERENT_HOST = 0x1,
-    FILTER_DIFFERENT_PROCESS = 0x2,
-    FILTER_SAME_PROCESS = 0x4
-} ParticipantFilteringFlags_t;
-
-#define BUILTIN_DATA_MAX_SIZE 512
-
-//! PDP factory for EXTERNAL type
-class PDP;
-class BuiltinProtocols;
-
-typedef struct _PDPFactory
-{
-    // Pointer to the PDP creator
-    PDP* (*CreatePDPInstance)(BuiltinProtocols*);
-    // Pointer to the PDP destructor
-    void (* ReleasePDPInstance)(
-            PDP*);
-
-    bool operator ==(
-            const struct _PDPFactory& e) const
-    {
-        return (CreatePDPInstance == e.CreatePDPInstance)
-               && (ReleasePDPInstance == e.ReleasePDPInstance);
-    }
-
-} PDPFactory;
-
-/**
- * Class SimpleEDPAttributes, to define the attributes of the Simple Endpoint Discovery Protocol.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class SimpleEDPAttributes
-{
-public:
-
-    //!Default value true.
-    bool use_PublicationWriterANDSubscriptionReader;
-
-    //!Default value true.
-    bool use_PublicationReaderANDSubscriptionWriter;
-
-#if HAVE_SECURITY
-    bool enable_builtin_secure_publications_writer_and_subscriptions_reader;
-
-    bool enable_builtin_secure_subscriptions_writer_and_publications_reader;
-#endif
-
-    SimpleEDPAttributes()
-        : use_PublicationWriterANDSubscriptionReader(true)
-        , use_PublicationReaderANDSubscriptionWriter(true)
-#if HAVE_SECURITY
-        , enable_builtin_secure_publications_writer_and_subscriptions_reader(true)
-        , enable_builtin_secure_subscriptions_writer_and_publications_reader(true)
-#endif
-    {
-    }
-
-    bool operator ==(
-            const SimpleEDPAttributes& b) const
-    {
-        return (this->use_PublicationWriterANDSubscriptionReader == b.use_PublicationWriterANDSubscriptionReader) &&
-#if HAVE_SECURITY
-               (this->enable_builtin_secure_publications_writer_and_subscriptions_reader ==
-               b.enable_builtin_secure_publications_writer_and_subscriptions_reader) &&
-               (this->enable_builtin_secure_subscriptions_writer_and_publications_reader ==
-               b.enable_builtin_secure_subscriptions_writer_and_publications_reader) &&
-#endif
-               (this->use_PublicationReaderANDSubscriptionWriter == b.use_PublicationReaderANDSubscriptionWriter);
-    }
-
-};
-
-/**
- * Struct InitialAnnouncementConfig defines the behavior of the RTPSParticipant initial announcements.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-struct InitialAnnouncementConfig
-{
-    /// Number of initial announcements with specific period (default 5)
-    uint32_t count = 5u;
-
-    /// Specific period for initial announcements (default 100ms)
-    Duration_t period = { 0, 100000000u };
-
-    bool operator ==(
-            const InitialAnnouncementConfig& b) const
-    {
-        return (count == b.count) && (period == b.period);
-    }
-
-};
-
-/**
- * Class DiscoverySettings, to define the attributes of the several discovery protocols available
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-
-class DiscoverySettings
-{
-public:
-
-    //! Chosen discovery protocol
-    DiscoveryProtocol_t discoveryProtocol = DiscoveryProtocol_t::SIMPLE;
-
-    /**
-     * If set to true, SimpleEDP would be used.
-     */
-    bool use_SIMPLE_EndpointDiscoveryProtocol = true;
-
-    /**
-     * If set to true, StaticEDP based on an XML file would be implemented.
-     * The XML filename must be provided.
-     */
-    bool use_STATIC_EndpointDiscoveryProtocol = false;
-
-    /**
-     * Lease Duration of the RTPSParticipant,
-     * indicating how much time remote RTPSParticipants should consider this RTPSParticipant alive.
-     */
-    Duration_t leaseDuration = { 20, 0 };
-
-    /**
-     * The period for the RTPSParticipant to send its Discovery Message to all other discovered RTPSParticipants
-     * as well as to all Multicast ports.
-     */
-    Duration_t leaseDuration_announcementperiod = { 3, 0 };
-
-    //!Initial announcements configuration
-    InitialAnnouncementConfig initial_announcements;
-
-    //!Attributes of the SimpleEDP protocol
-    SimpleEDPAttributes m_simpleEDP;
-
-    //! function that returns a PDP object (only if EXTERNAL selected)
-    PDPFactory m_PDPfactory{};
-    /**
-     * The period for the RTPSParticipant to:
-     *  send its Discovery Message to its servers
-     *  check for EDP endpoints matching
-     */
-    Duration_t discoveryServer_client_syncperiod = { 0, 450 * 1000000}; // 450 milliseconds
-
-    //! Discovery Server settings, only needed if use_CLIENT_DiscoveryProtocol=true
-    RemoteServerList_t m_DiscoveryServers;
-
-    //! Filtering participants out depending on location
-    ParticipantFilteringFlags_t ignoreParticipantFlags = ParticipantFilteringFlags::NO_FILTER;
-
-    DiscoverySettings() = default;
-
-    bool operator ==(
-            const DiscoverySettings& b) const
-    {
-        return (this->discoveryProtocol == b.discoveryProtocol) &&
-               (this->use_SIMPLE_EndpointDiscoveryProtocol == b.use_SIMPLE_EndpointDiscoveryProtocol) &&
-               (this->use_STATIC_EndpointDiscoveryProtocol == b.use_STATIC_EndpointDiscoveryProtocol) &&
-               (this->discoveryServer_client_syncperiod == b.discoveryServer_client_syncperiod) &&
-               (this->m_PDPfactory == b.m_PDPfactory) &&
-               (this->leaseDuration == b.leaseDuration) &&
-               (this->leaseDuration_announcementperiod == b.leaseDuration_announcementperiod) &&
-               (this->initial_announcements == b.initial_announcements) &&
-               (this->m_simpleEDP == b.m_simpleEDP) &&
-               (this->m_staticEndpointXMLFilename == b.m_staticEndpointXMLFilename) &&
-               (this->m_DiscoveryServers == b.m_DiscoveryServers) &&
-               (this->ignoreParticipantFlags == b.ignoreParticipantFlags);
-    }
-
-    /**
-     * Get the static endpoint XML filename
-     * @return Static endpoint XML filename
-     */
-    const char* getStaticEndpointXMLFilename() const
-    {
-        return m_staticEndpointXMLFilename.c_str();
-    }
-
-    /**
-     * Set the static endpoint XML filename
-     * @param str Static endpoint XML filename
-     */
-    void setStaticEndpointXMLFilename(
-            const char* str)
-    {
-        m_staticEndpointXMLFilename = std::string(str);
-    }
-
-private:
-
-    //! StaticEDP XML filename, only necessary if use_STATIC_EndpointDiscoveryProtocol=true
-    std::string m_staticEndpointXMLFilename = "";
-};
-
-/**
- * TypeLookupService settings.
- */
-class TypeLookupSettings
-{
-public:
-
-    //!Indicates to use the TypeLookup Service client endpoints
-    bool use_client = false;
-
-    //!Indicates to use the TypeLookup Service server endpoints
-    bool use_server = false;
-
-};
-
-/**
- * Class BuiltinAttributes, to define the behavior of the RTPSParticipant builtin protocols.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class BuiltinAttributes
-{
-public:
-
-    //! Discovery protocol related attributes
-    DiscoverySettings discovery_config;
-
-    //!Indicates to use the WriterLiveliness protocol.
-    bool use_WriterLivelinessProtocol = true;
-
-    //!TypeLookup Service settings
-    TypeLookupSettings typelookup_config;
-
-    //!Metatraffic Unicast Locator List
-    LocatorList_t metatrafficUnicastLocatorList;
-
-    //!Metatraffic Multicast Locator List.
-    LocatorList_t metatrafficMulticastLocatorList;
-
-    //! Initial peers.
-    LocatorList_t initialPeersList;
-
-    //! Memory policy for builtin readers
-    MemoryManagementPolicy_t readerHistoryMemoryPolicy =
-            MemoryManagementPolicy_t::PREALLOCATED_WITH_REALLOC_MEMORY_MODE;
-
-    //! Maximum payload size for builtin readers
-    uint32_t readerPayloadSize = BUILTIN_DATA_MAX_SIZE;
-
-    //! Memory policy for builtin writers
-    MemoryManagementPolicy_t writerHistoryMemoryPolicy =
-            MemoryManagementPolicy_t::PREALLOCATED_WITH_REALLOC_MEMORY_MODE;
-
-    //! Maximum payload size for builtin writers
-    uint32_t writerPayloadSize = BUILTIN_DATA_MAX_SIZE;
-
-    //! Mutation tries if the port is being used.
-    uint32_t mutation_tries = 100u;
-
-    //!Set to true to avoid multicast traffic on builtin endpoints
-    bool avoid_builtin_multicast = true;
-
-    BuiltinAttributes() = default;
-
-    virtual ~BuiltinAttributes() = default;
-
-    bool operator ==(
-            const BuiltinAttributes& b) const
-    {
-        return (this->discovery_config == b.discovery_config) &&
-               (this->use_WriterLivelinessProtocol == b.use_WriterLivelinessProtocol) &&
-               (typelookup_config.use_client == b.typelookup_config.use_client) &&
-               (typelookup_config.use_server == b.typelookup_config.use_server) &&
-               (this->metatrafficUnicastLocatorList == b.metatrafficUnicastLocatorList) &&
-               (this->metatrafficMulticastLocatorList == b.metatrafficMulticastLocatorList) &&
-               (this->initialPeersList == b.initialPeersList) &&
-               (this->readerHistoryMemoryPolicy == b.readerHistoryMemoryPolicy) &&
-               (this->readerPayloadSize == b.readerPayloadSize) &&
-               (this->writerHistoryMemoryPolicy == b.writerHistoryMemoryPolicy) &&
-               (this->writerPayloadSize == b.writerPayloadSize) &&
-               (this->mutation_tries == b.mutation_tries) &&
-               (this->avoid_builtin_multicast == b.avoid_builtin_multicast);
-    }
-
-};
-
-/**
- * Class RTPSParticipantAttributes used to define different aspects of a RTPSParticipant.
- *@ingroup RTPS_ATTRIBUTES_MODULE
- */
-class RTPSParticipantAttributes
-{
-public:
-
-    RTPSParticipantAttributes()
-    {
-        setName("RTPSParticipant");
-        sendSocketBufferSize = 0;
-        listenSocketBufferSize = 0;
-        participantID = -1;
-        useBuiltinTransports = true;
-    }
-
-    virtual ~RTPSParticipantAttributes()
-    {
-    }
-
-    bool operator ==(
-            const RTPSParticipantAttributes& b) const
-    {
-        return (this->name == b.name) &&
-               (this->defaultUnicastLocatorList == b.defaultUnicastLocatorList) &&
-               (this->defaultMulticastLocatorList == b.defaultMulticastLocatorList) &&
-               (this->sendSocketBufferSize == b.sendSocketBufferSize) &&
-               (this->listenSocketBufferSize == b.listenSocketBufferSize) &&
-               (this->builtin == b.builtin) &&
-               (this->port == b.port) &&
-               (this->userData == b.userData) &&
-               (this->participantID == b.participantID) &&
-               (this->throughputController == b.throughputController) &&
-               (this->useBuiltinTransports == b.useBuiltinTransports) &&
-               (this->properties == b.properties &&
-               (this->prefix == b.prefix));
-    }
-
-    /**
-     * Default list of Unicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the case
-     * that it was defined with NO UnicastLocators. At least ONE locator should be included in this list.
-     */
-    LocatorList_t defaultUnicastLocatorList;
-
-    /**
-     * Default list of Multicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the
-     * case that it was defined with NO UnicastLocators. This is usually left empty.
-     */
-    LocatorList_t defaultMulticastLocatorList;
-
-    /*!
-     * @brief Send socket buffer size for the send resource. Zero value indicates to use default system buffer size.
-     * Default value: 0.
-     */
-    uint32_t sendSocketBufferSize;
-
-    /*! Listen socket buffer for all listen resources. Zero value indicates to use default system buffer size.
-     * Default value: 0.
-     */
-    uint32_t listenSocketBufferSize;
-
-    //! Optionally allows user to define the GuidPrefix_t
-    GuidPrefix_t prefix;
-
-    RTPS_DllAPI inline bool ReadguidPrefix(
-            const char* pfx)
-    {
-        return bool(std::istringstream(pfx) >> prefix);
-    }
-
-    //! Builtin parameters.
-    BuiltinAttributes builtin;
-
-    //!Port Parameters
-    PortParameters port;
-
-    //!User Data of the participant
-    std::vector<octet> userData;
-
-    //!Participant ID
-    int32_t participantID;
-
-    //!Throughput controller parameters. Leave default for uncontrolled flow.
-    ThroughputControllerDescriptor throughputController;
-
-    //!User defined transports to use alongside or in place of builtins.
-    std::vector<std::shared_ptr<fastdds::rtps::TransportDescriptorInterface> > userTransports;
-
-    //!Set as false to disable the default UDPv4 implementation.
-    bool useBuiltinTransports;
-    //!Holds allocation limits affecting collections managed by a participant.
-    RTPSParticipantAllocationAttributes allocation;
-
-    //! Property policies
-    PropertyPolicy properties;
-
-    //!Set the name of the participant.
-    inline void setName(
-            const char* nam)
-    {
-        name = nam;
-    }
-
-    //!Get the name of the participant.
-    inline const char* getName() const
-    {
-        return name.c_str();
-    }
-
-private:
-
-    //!Name of the participant.
-    string_255 name;
-};
-
-} /* namespace rtps */
-} /* namespace fastrtps */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_RTPSPARTICIPANTPARAMETERS_H_ */

+ 0 - 111
thirdpartylib/FastRTPS/include/fastdds/rtps/attributes/ReaderAttributes.h

@@ -1,111 +0,0 @@
-// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @file ReaderAttributes.h
- *
- */
-
-#ifndef _FASTDDS_RTPS_ATTRIBUTES_READERATTRIBUTES_H_
-#define _FASTDDS_RTPS_ATTRIBUTES_READERATTRIBUTES_H_
-
-#include <fastdds/rtps/common/Time_t.h>
-#include <fastdds/rtps/common/Guid.h>
-#include <fastdds/rtps/attributes/EndpointAttributes.h>
-#include <fastrtps/qos/QosPolicies.h>
-#include <fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp>
-
-#include <functional>
-
-namespace eprosima {
-namespace fastrtps {
-namespace rtps {
-
-/**
- * Class ReaderTimes, defining the times associated with the Reliable Readers events.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class ReaderTimes
-{
-public:
-
-    ReaderTimes()
-    {
-        initialAcknackDelay.nanosec = 70*1000*1000;
-        heartbeatResponseDelay.nanosec = 5*1000*1000;
-    }
-
-    virtual ~ReaderTimes() {}
-
-    bool operator==(
-            const ReaderTimes& b) const
-    {
-        return (this->initialAcknackDelay == b.initialAcknackDelay)  &&
-               (this->heartbeatResponseDelay == b.heartbeatResponseDelay);
-    }
-
-    //!Initial AckNack delay. Default value 70ms.
-    Duration_t initialAcknackDelay;
-    //!Delay to be applied when a hearbeat message is received, default value 5ms.
-    Duration_t heartbeatResponseDelay;
-};
-
-/**
- * Class ReaderAttributes, to define the attributes of a RTPSReader.
- * @ingroup RTPS_ATTRIBUTES_MODULE
- */
-class ReaderAttributes
-{
-public:
-
-    ReaderAttributes()
-        : liveliness_kind_(AUTOMATIC_LIVELINESS_QOS)
-        , liveliness_lease_duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
-        , expectsInlineQos(false)
-        , disable_positive_acks(false)
-    {
-        endpoint.endpointKind = READER;
-        endpoint.durabilityKind = VOLATILE;
-        endpoint.reliabilityKind = BEST_EFFORT;
-    };
-
-    virtual ~ReaderAttributes() {};
-
-    //!Attributes of the associated endpoint.
-    EndpointAttributes endpoint;
-
-    //!Times associated with this reader (only for stateful readers)
-    ReaderTimes times;
-
-    //! Liveliness kind
-    LivelinessQosPolicyKind liveliness_kind_;
-
-    //! Liveliness lease duration
-    Duration_t liveliness_lease_duration;
-
-    //!Indicates if the reader expects Inline qos, default value 0.
-    bool expectsInlineQos;
-
-    //! Disable positive ACKs
-    bool disable_positive_acks;
-
-    //! Define the allocation behaviour for matched-writer-dependent collections.
-    ResourceLimitedContainerConfig matched_writers_allocation;
-};
-
-} /* namespace rtps */
-} /* namespace fastrtps */
-} /* namespace eprosima */
-
-#endif /* _FASTDDS_RTPS_ATTRIBUTES_READERATTRIBUTES_H_ */

Some files were not shown because too many files changed in this diff