Skip to content

Commit

Permalink
Update TypeInformationParameter to contain xtype (#4140)
Browse files Browse the repository at this point in the history
* Refs #20131: Updated TypeInformationParameter TypeInformation to xtypes

Signed-off-by: adriancampo <[email protected]>

* Refs #20131: Removed old TypeObject header from QosPolicies

Signed-off-by: adriancampo <[email protected]>

* Refs #20131: Removed old type validation.

Signed-off-by: adriancampo <[email protected]>

* Refs #20131: Fixed windows warning.

Signed-off-by: adriancampo <[email protected]>

* Refs #20131: Removed tests for private api.

Signed-off-by: adriancampo <[email protected]>

* Refs #20131: Included Types.hpp for DomainId_t

Signed-off-by: adriancampo <[email protected]>

---------

Signed-off-by: adriancampo <[email protected]>
  • Loading branch information
adriancampo authored Dec 21, 2023
1 parent 43578a7 commit b4f26bc
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 442 deletions.
30 changes: 16 additions & 14 deletions include/fastdds/dds/core/policy/QosPolicies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
#ifndef _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_
#define _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_

#include <bitset>
#include <vector>

#include <fastdds/dds/core/policy/ParameterTypes.hpp>
#include <fastdds/dds/core/Types.hpp>
#include <fastdds/dds/xtypes/type_representation/detail/dds_xtypes_typeobject.hpp>
#include <fastdds/rtps/attributes/ExternalLocators.hpp>
#include <fastdds/rtps/attributes/PropertyPolicy.h>
#include <fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp>
Expand All @@ -33,7 +36,6 @@
#include <fastdds/rtps/common/Types.h>
#include <fastdds/rtps/flowcontrol/FlowControllerConsts.hpp>
#include <fastdds/rtps/resources/ResourceManagement.h>
#include <fastrtps/types/TypeObject.h>
#include <fastrtps/utils/collections/ResourceLimitedVector.hpp>

namespace eprosima {
Expand Down Expand Up @@ -2287,7 +2289,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy
public:

//!Type Identifier
fastrtps::types::TypeIdentifier m_type_identifier;
xtypes::TypeIdentifier m_type_identifier;


/**
Expand Down Expand Up @@ -2319,7 +2321,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy
* @param identifier TypeIdentifier to be set
*/
RTPS_DllAPI TypeIdV1(
const fastrtps::types::TypeIdentifier& identifier)
const xtypes::TypeIdentifier& identifier)
: Parameter_t(PID_TYPE_IDV1, 0)
, QosPolicy(false)
, m_type_identifier(identifier)
Expand Down Expand Up @@ -2374,7 +2376,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy
}

RTPS_DllAPI TypeIdV1& operator =(
const fastrtps::types::TypeIdentifier& type_id)
const xtypes::TypeIdentifier& type_id)
{
m_type_identifier = type_id;
return *this;
Expand All @@ -2385,7 +2387,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy
*
* @return TypeIdentifier reference
*/
RTPS_DllAPI const fastrtps::types::TypeIdentifier& get() const
RTPS_DllAPI const xtypes::TypeIdentifier& get() const
{
return m_type_identifier;
}
Expand All @@ -2400,7 +2402,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy
public:

//!Type Object
fastrtps::types::TypeObject m_type_object;
xtypes::TypeObject m_type_object;

/**
* @brief Constructor
Expand Down Expand Up @@ -2431,7 +2433,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy
* @param type TypeObject to be set
*/
RTPS_DllAPI TypeObjectV1(
const fastrtps::types::TypeObject& type)
const xtypes::TypeObject& type)
: Parameter_t(PID_TYPE_OBJECTV1, 0)
, QosPolicy(false)
, m_type_object(type)
Expand Down Expand Up @@ -2486,7 +2488,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy
}

RTPS_DllAPI TypeObjectV1& operator =(
const fastrtps::types::TypeObject& type_object)
const xtypes::TypeObject& type_object)
{
m_type_object = type_object;
return *this;
Expand All @@ -2497,7 +2499,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy
*
* @return TypeObject reference
*/
RTPS_DllAPI const fastrtps::types::TypeObject& get() const
RTPS_DllAPI const xtypes::TypeObject& get() const
{
return m_type_object;
}
Expand All @@ -2514,7 +2516,7 @@ class TypeInformationParameter : public Parameter_t, public QosPolicy
public:

//!Type Information
fastrtps::types::TypeInformation type_information;
TypeInformation type_information;

/**
* @brief Constructor
Expand Down Expand Up @@ -2542,12 +2544,12 @@ class TypeInformationParameter : public Parameter_t, public QosPolicy
}

/**
* @brief Constructor using a fastrtps::types::TypeInformation
* @brief Constructor using a TypeInformation
*
* @param info fastrtps::types::TypeInformation to be set
* @param info TypeInformation to be set
*/
RTPS_DllAPI TypeInformationParameter(
const fastrtps::types::TypeInformation& info)
const TypeInformation& info)
: Parameter_t(PID_TYPE_INFORMATION, 0)
, QosPolicy(false)
, type_information(info)
Expand Down Expand Up @@ -2627,7 +2629,7 @@ class TypeInformationParameter : public Parameter_t, public QosPolicy
}

RTPS_DllAPI TypeInformationParameter& operator =(
const fastrtps::types::TypeInformation& type_info)
const TypeInformation& type_info)
{
type_information = type_info;
assigned_ = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
* This file contains the required classes to keep a TypeObject/TypeIdentifier registry.
*/

#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>


#ifndef _FASTDDS_DDS_XTYPES_TYPE_REPRESENTATION_ITYPEOBJECTREGISTRY_HPP_
#define _FASTDDS_DDS_XTYPES_TYPE_REPRESENTATION_ITYPEOBJECTREGISTRY_HPP_

#include <string>

#include <fastdds/dds/core/ReturnCode.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/optional.hpp>

#include <fastdds/dds/core/ReturnCode.hpp>
#include <fastdds/dds/xtypes/common.hpp>
#include <fastdds/dds/xtypes/dynamic_types/Types.hpp>
#include <fastdds/dds/xtypes/exception/Exception.hpp>
Expand Down
20 changes: 0 additions & 20 deletions include/fastdds/rtps/builtin/discovery/endpoint/EDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,26 +391,6 @@ class EDP
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

bool checkTypeValidation(
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

bool checkTypeIdentifier(
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

bool hasTypeIdentifier(
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

bool checkTypeObject(
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

bool hasTypeObject(
const WriterProxyData* wdata,
const ReaderProxyData* rdata) const;

using pool_allocator_t =
foonathan::memory::memory_pool<foonathan::memory::node_pool, foonathan::memory::heap_allocator>;

Expand Down
16 changes: 10 additions & 6 deletions include/fastdds/rtps/builtin/discovery/participant/PDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@
namespace eprosima {

namespace fastdds {

namespace dds {
namespace xtypes {

class TypeObject;
class TypeIdentifier;

} // namespace xtypes
} // namespace dds

namespace rtps {

class PDPServerListener;
Expand All @@ -49,12 +59,6 @@ class PDPEndpoints;
} // namespace fastdds

namespace fastrtps {
namespace types {

class TypeObject;
class TypeIdentifier;

} // namespace types
namespace rtps {

class RTPSWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@

using eprosima::fastrtps::rtps::RTPSReader;
using eprosima::fastrtps::rtps::CacheChange_t;
using eprosima::fastrtps::types::TypeIdentifier;
using eprosima::fastrtps::types::TypeObject;
using eprosima::fastrtps::types::TypeIdentifierTypeObjectPair;
using eprosima::fastrtps::types::TypeIdentifierPair;
using eprosima::fastrtps::types::TypeIdentifierWithSize;
using eprosima::fastrtps::types::TypeIdentifierWithSizeSeq;
using eprosima::fastdds::dds::Log;

using eprosima::fastrtps::rtps::c_EntityId_TypeLookup_request_writer;
Expand Down
Loading

0 comments on commit b4f26bc

Please sign in to comment.