diff --git a/fastdds_python/CMakeLists.txt b/fastdds_python/CMakeLists.txt index b74c5257..92eacab4 100644 --- a/fastdds_python/CMakeLists.txt +++ b/fastdds_python/CMakeLists.txt @@ -24,7 +24,7 @@ if(POLICY CMP0086) cmake_policy(SET CMP0086 NEW) endif() -project(fastdds_python VERSION 0.2.0) +project(fastdds_python VERSION 1.0.0) ############################################################################### # Dependencies diff --git a/fastdds_python/src/swig/CMakeLists.txt b/fastdds_python/src/swig/CMakeLists.txt index a0d23190..078d07c5 100644 --- a/fastdds_python/src/swig/CMakeLists.txt +++ b/fastdds_python/src/swig/CMakeLists.txt @@ -45,6 +45,10 @@ SWIG_ADD_LIBRARY(${PROJECT_NAME} SOURCES ${${PROJECT_NAME}_FILES} ) +if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8) + set_property(TARGET ${PROJECT_NAME} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64) +endif() + SWIG_LINK_LIBRARIES(${PROJECT_NAME} Python3::Module fastrtps diff --git a/fastdds_python/src/swig/fastdds.i b/fastdds_python/src/swig/fastdds.i index cacb29f5..3b5b8bcf 100644 --- a/fastdds_python/src/swig/fastdds.i +++ b/fastdds_python/src/swig/fastdds.i @@ -56,15 +56,27 @@ %include "std_vector.i" %include "typemaps.i" +%{ +#include "fastrtps/config.h" + +bool has_statistics() +{ +#ifdef FASTDDS_STATISTICS + return true; +#else + return false; +#endif +} + +%} + +bool has_statistics(); + // Some operators are ignored, as there is no such thing in Python. // Trying to export them issues a warning %ignore *::operator=; %ignore *::operator++; %ignore *::operator!; -%ignore *::operator==; -%ignore *::operator!=; -%ignore *::operator<<; -%ignore *::operator>>; // This ensures that the returned string references can be used with the string API // Otherwise, they will be wrapped objects without API @@ -83,6 +95,9 @@ #define FASTDDS_DEPRECATED_UNTIL(major, entity_name, msg) #define FASTDDS_TODO_BEFORE(major, minor, msg) +// Defined template for std::vector +%template(StringVector) std::vector; + // Predeclaration of namespaces and/or classes not exported to the target language, // but that are part of the Fast DDS public API // SWIG will make an empty wrapper around these, but still needs to know they exists @@ -116,6 +131,7 @@ namespace builtin { %include "fastdds/rtps/common/GuidPrefix_t.i" %include "fastdds/rtps/common/Guid.i" %include "fastdds/rtps/common/PortParameters.i" +%include "fastdds/rtps/common/InstanceHandle.i" %include "fastrtps/types/TypesBase.i" %include "fastdds/rtps/resources/ResourceManagement.i" %include "fastrtps/utils/collections/ResourceLimitedContainerConfig.i" @@ -128,6 +144,9 @@ namespace builtin { %include "fastdds/rtps/attributes/ServerAttributes.i" %include "fastdds/rtps/attributes/ReaderAttributes.i" %include "fastdds/rtps/attributes/WriterAttributes.i" +%include "fastdds/rtps/common/SequenceNumber.i" +%include "fastdds/rtps/common/SampleIdentity.i" +%include "fastdds/rtps/common/WriteParams.i" /* %include "fastdds/rtps/common/SerializedPayload.i" @@ -141,10 +160,7 @@ namespace builtin { %include "fastdds/rtps/common/MatchingInfo.i" %include "fastdds/rtps/common/ChangeKind_t.i" %include "fastdds/rtps/common/LocatorsIterator.i" -%include "fastdds/rtps/common/SampleIdentity.i" -%include "fastdds/rtps/common/SequenceNumber.i" %include "fastdds/rtps/common/RemoteLocators.i" -%include "fastdds/rtps/common/WriteParams.i" %include "fastrtps/rtps/common/LocatorListComparisons.i" %include "fastrtps/rtps/common/PortParameters.i" @@ -407,18 +423,20 @@ namespace builtin { %include "fastrtps/Domain.i" */ -%include "fastdds/dds/core/status/StatusMask.i" %include "fastdds/dds/common/InstanceHandle.i" +%include "fastdds/dds/core/status/StatusMask.i" %include "fastdds/dds/core/policy/ParameterTypes.i" %include "fastdds/dds/core/policy/QosPolicies.i" %include "fastdds/dds/topic/IContentFilter.i" %include "fastdds/dds/topic/TopicDataType.i" %include "fastdds/dds/topic/IContentFilterFactory.i" %include "fastdds/dds/topic/TypeSupport.i" +%include "fastdds/dds/builtin/topic/BuiltinTopicKey.i" +%include "fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.i" +%include "fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.i" +%include "fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i" %include "fastdds/dds/core/condition/Condition.i" -%include "fastdds/dds/core/condition/StatusCondition.i" %include "fastdds/dds/core/Entity.i" -%include "fastdds/dds/core/condition/GuardCondition.i" %include "fastdds/dds/core/condition/WaitSet.i" %include "fastdds/dds/core/LoanableTypedCollection.i" %include "fastdds/dds/core/StackAllocatedSequence.i" diff --git a/fastdds_python/src/swig/fastdds/dds/common/InstanceHandle.i b/fastdds_python/src/swig/fastdds/dds/common/InstanceHandle.i index 3c3d4914..7868cce5 100644 --- a/fastdds_python/src/swig/fastdds/dds/common/InstanceHandle.i +++ b/fastdds_python/src/swig/fastdds/dds/common/InstanceHandle.i @@ -13,64 +13,8 @@ // limitations under the License. %{ -#include "fastdds/rtps/common/InstanceHandle.h" - -// Define a hash method in global scope for GuidPrefix_t types -// This is necessary if we want other classes to hash an internal GuidPrefix_t -long hash(const eprosima::fastrtps::rtps::InstanceHandle_t& handle) -{ - long ret = 0; - for (unsigned int i = 0; i < 16; ++i) - { - ret = (ret * 31) ^ handle.value[i]; - } - return ret; -} - +#include "fastdds/dds/common/InstanceHandle.hpp" %} -// SWIG does not support type conversion operators correctly unless converted to a normal method -%rename(get_guid) eprosima::fastrtps::rtps::InstanceHandle_t::operator const GUID_t&; - -%ignore eprosima::fastrtps::rtps::InstanceHandleValue_t::operator [] const; -%rename(read_pointer_cast) eprosima::fastrtps::rtps::InstanceHandleValue_t::operator const octet* () const; -%rename(write_pointer_cast) eprosima::fastrtps::rtps::InstanceHandleValue_t::operator octet* (); - -%include "fastdds/rtps/common/InstanceHandle.h" - -namespace eprosima { -namespace fastdds { -namespace dds { - -using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; - -} // namespace dds -} // namespace fastdds -} // namespace eprosima - -// Declare the comparison operators as internal to the class -%extend eprosima::fastrtps::rtps::InstanceHandle_t { - - bool operator==(const eprosima::fastrtps::rtps::InstanceHandle_t& other) const - { - return *$self == other; - } - - bool operator!=(const eprosima::fastrtps::rtps::InstanceHandle_t& other) const - { - return *$self != other; - } - - std::string __str__() const - { - std::ostringstream out; - out << *$self; - return out.str(); - } - // Define the hash method using the global one - long __hash__() const - { - return hash(*$self); - } -} +%include "fastdds/dds/common/InstanceHandle.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/core/condition/Condition.i b/fastdds_python/src/swig/fastdds/dds/core/condition/Condition.i index 196415a9..b22b737e 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/condition/Condition.i +++ b/fastdds_python/src/swig/fastdds/dds/core/condition/Condition.i @@ -14,6 +14,108 @@ %{ #include "fastdds/dds/core/condition/Condition.hpp" +#include "fastdds/dds/core/condition/StatusCondition.hpp" +#include "fastdds/dds/core/condition/GuardCondition.hpp" %} +%exception eprosima::fastdds::dds::Condition::to_status_condition() +{ + try + { + $action + } + catch(std::bad_cast ex) + { + SWIG_exception(SWIG_TypeError, "Bad cast of Condition"); + } +} + +%exception eprosima::fastdds::dds::Condition::to_guard_condition() +{ + try + { + $action + } + catch(std::bad_cast ex) + { + SWIG_exception(SWIG_TypeError, "Bad cast of Condition"); + } +} + +%extend eprosima::fastdds::dds::Condition +{ + std::string __str__() + { + if (nullptr != dynamic_cast(self)) + { + return "StatusCondition"; + } + else if (nullptr != dynamic_cast(self)) + { + return "GuardCondition"; + } + + return "None"; + } + + eprosima::fastdds::dds::StatusCondition* to_status_condition() + { + eprosima::fastdds::dds::StatusCondition* status_cond = + dynamic_cast(self); + + if (nullptr == status_cond) + { + throw std::bad_cast(); + } + + return status_cond; + } + + eprosima::fastdds::dds::GuardCondition* to_guard_condition() + { + eprosima::fastdds::dds::GuardCondition* guard_cond = + dynamic_cast(self); + + if (nullptr == guard_cond) + { + throw std::bad_cast(); + } + + return guard_cond; + } +} + +%extend eprosima::fastdds::dds::StatusCondition +{ + std::string __str__() + { + return "StatusCondition"; + } + + bool __eq__( + const eprosima::fastdds::dds::StatusCondition* s1) + { + return s1 == self; + } +} + +%extend eprosima::fastdds::dds::GuardCondition +{ + std::string __str__() + { + return "GuardCondition"; + } + + bool __eq__( + const eprosima::fastdds::dds::GuardCondition* s1) + { + return s1 == self; + } +} + +// Template for ConditionSeq +%template(ConditionSeq) std::vector; + %include "fastdds/dds/core/condition/Condition.hpp" +%include "fastdds/dds/core/condition/StatusCondition.hpp" +%include "fastdds/dds/core/condition/GuardCondition.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/core/condition/StatusCondition.i b/fastdds_python/src/swig/fastdds/dds/core/condition/StatusCondition.i deleted file mode 100644 index ec11fcdd..00000000 --- a/fastdds_python/src/swig/fastdds/dds/core/condition/StatusCondition.i +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 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. - -%{ -#include "fastdds/dds/core/condition/StatusCondition.hpp" -%} - -%include "fastdds/dds/core/condition/StatusCondition.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/core/policy/QosPolicies.i b/fastdds_python/src/swig/fastdds/dds/core/policy/QosPolicies.i index 75a5e961..00d2f46c 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/policy/QosPolicies.i +++ b/fastdds_python/src/swig/fastdds/dds/core/policy/QosPolicies.i @@ -90,7 +90,7 @@ public: catch (OctetResourceLimitedVectorStopIterator) { PyErr_SetString(PyExc_StopIteration, "End of iterator"); - return NULL; + return nullptr; } } @@ -108,15 +108,53 @@ public: } } -%extend eprosima::fastrtps::ResourceLimitedVector { +%exception eprosima::fastrtps::ResourceLimitedVector::__getitem__ +{ + try + { + $action + } + catch(std::out_of_range) + { + SWIG_exception(SWIG_IndexError, "Index out of bounds"); + } +} + +%extend eprosima::fastrtps::ResourceLimitedVector +{ OctetResourceLimitedVectorIterator __iter__() { // return a constructed Iterator object return OctetResourceLimitedVectorIterator($self->begin(), $self->end()); } + + size_t __len__() const + { + return self->size(); + } + + eprosima::fastrtps::rtps::octet __getitem__(int i) + { + if (self->size() <= i) + { + throw std::out_of_range("Index out of bounds"); + } + return (*self)[i]; + } +} + +%exception eprosima::fastdds::dds::PartitionQosPolicy::__getitem__ +{ + try + { + $action + } + catch(std::out_of_range) + { + SWIG_exception(SWIG_IndexError, "Index out of bounds"); + } } -// TODO (richiware) missing exceptions %extend eprosima::fastdds::dds::PartitionQosPolicy { size_t __len__() const @@ -126,6 +164,11 @@ public: std::string __getitem__(int i) { + if (self->size() <= i) + { + throw std::out_of_range("Index out of bounds"); + } + auto it = self->begin(); for (int count = 0; count < i; ++count) { diff --git a/fastdds_python/src/swig/fastdds/dds/core/status/BaseStatus.i b/fastdds_python/src/swig/fastdds/dds/core/status/BaseStatus.i index 22a240df..6f949349 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/status/BaseStatus.i +++ b/fastdds_python/src/swig/fastdds/dds/core/status/BaseStatus.i @@ -17,3 +17,13 @@ %} %include "fastdds/dds/core/status/BaseStatus.hpp" + +namespace eprosima { +namespace fastdds { +namespace dds { +struct SampleLostStatus : public BaseStatus {}; +struct LivelinessLostStatus : public BaseStatus {}; +struct InconsistentTopicStatus : public BaseStatus {}; +} +} +} diff --git a/fastdds_python/src/swig/fastdds/dds/core/status/DeadlineMissedStatus.i b/fastdds_python/src/swig/fastdds/dds/core/status/DeadlineMissedStatus.i index bc98b226..2c15d874 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/status/DeadlineMissedStatus.i +++ b/fastdds_python/src/swig/fastdds/dds/core/status/DeadlineMissedStatus.i @@ -17,3 +17,12 @@ %} %include "fastdds/dds/core/status/DeadlineMissedStatus.hpp" + +namespace eprosima { +namespace fastdds { +namespace dds { + struct OfferedDeadlineMissedStatus : public eprosima::fastdds::dds::DeadlineMissedStatus {}; + struct RequestedDeadlineMissedStatus : public eprosima::fastdds::dds::DeadlineMissedStatus {}; +} +} +} diff --git a/fastdds_python/src/swig/fastdds/dds/core/status/IncompatibleQosStatus.i b/fastdds_python/src/swig/fastdds/dds/core/status/IncompatibleQosStatus.i index bbe8c7ce..39e95b39 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/status/IncompatibleQosStatus.i +++ b/fastdds_python/src/swig/fastdds/dds/core/status/IncompatibleQosStatus.i @@ -16,4 +16,15 @@ #include "fastdds/dds/core/status/IncompatibleQosStatus.hpp" %} +%template(QosPolicyCountSeq) std::vector; + %include "fastdds/dds/core/status/IncompatibleQosStatus.hpp" + +namespace eprosima { +namespace fastdds { +namespace dds { + struct RequestedIncompatibleQosStatus : public IncompatibleQosStatus {}; + struct OfferedIncompatibleQosStatus : public IncompatibleQosStatus {}; +} +} +} diff --git a/fastdds_python/src/swig/fastdds/dds/core/status/StatusMask.i b/fastdds_python/src/swig/fastdds/dds/core/status/StatusMask.i index 54f75007..5ea07bca 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/status/StatusMask.i +++ b/fastdds_python/src/swig/fastdds/dds/core/status/StatusMask.i @@ -25,6 +25,22 @@ #define size_t(n) n %warnfilter(401) eprosima::fastdds::dds::StatusMask; +%extend eprosima::fastdds::dds::StatusMask +{ + bool operator ==(const StatusMask& other_mask) const + { + return *self == other_mask; + } + + StatusMask operator <<(const StatusMask& mask) + { + eprosima::fastdds::dds::StatusMask result(*self << mask); + return result; + } +} + +%ignore eprosima::fastdds::dds::StatusMask::operator <<(const StatusMask&); + %include "fastdds/dds/core/status/StatusMask.hpp" #undef size_t(n) diff --git a/fastdds_python/src/swig/fastdds/dds/publisher/DataWriter.i b/fastdds_python/src/swig/fastdds/dds/publisher/DataWriter.i index eedcc94e..78a4539b 100644 --- a/fastdds_python/src/swig/fastdds/dds/publisher/DataWriter.i +++ b/fastdds_python/src/swig/fastdds/dds/publisher/DataWriter.i @@ -17,7 +17,38 @@ %} -// Ignore unimplemented method (the wrapper will try to use it) -%ignore eprosima::fastdds::dds::DataWriter::dispose_w_timestamp; +// Deprecated function are ignored +%ignore eprosima::fastdds::dds::DataWriter::write_w_timestamp(void*, const InstanceHandle_t&, + const fastrtps::rtps::Time_t&); +%ignore eprosima::fastdds::dds::DataWriter::register_instance_w_timestamp(void*, + const fastrtps::rtps::Time_t&); +%ignore eprosima::fastdds::dds::DataWriter::unregister_instance_w_timestamp(void*, const InstanceHandle_t&, + const fastrtps::rtps::Time_t&); +%ignore eprosima::fastdds::dds::DataWriter::get_matched_subscriptions( + std::vector&) const; + +// Unsupported function on Python are ignored +%ignore loan_sample(void*&, LoanInitializationKind); +%ignore discard_loan(void*&); + + +// Tell SWIG to convert parameter size_t* removed in an output parameter +%apply size_t* OUTPUT { size_t* removed } +// Ignore C++ clear_history because we need to overload it in Python. +%extend eprosima::fastdds::dds::DataWriter +{ + // TODO Document with %feature("autodoc") + eprosima::fastrtps::types::ReturnCode_t clear_history(size_t* removed) + { + eprosima::fastrtps::types::ReturnCode_t ret = self->clear_history(removed); + return ret; + } +} +%ignore eprosima::fastdds::dds::DataWriter::clear_history(size_t*); + +// Template for std::vector +%template(DataWriterVector) std::vector; %include "fastdds/dds/publisher/DataWriter.hpp" + +%clear size_t* removed; diff --git a/fastdds_python/src/swig/fastdds/dds/subscriber/DataReader.i b/fastdds_python/src/swig/fastdds/dds/subscriber/DataReader.i index 58c3b81a..3890b328 100644 --- a/fastdds_python/src/swig/fastdds/dds/subscriber/DataReader.i +++ b/fastdds_python/src/swig/fastdds/dds/subscriber/DataReader.i @@ -16,4 +16,8 @@ #include "fastdds/dds/subscriber/DataReader.hpp" %} +// Template for std::vector +%template(DataReaderVector) std::vector; +%template(SampleInfoSeq) eprosima::fastdds::dds::LoanableSequence; + %include "fastdds/dds/subscriber/DataReader.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/subscriber/InstanceState.i b/fastdds_python/src/swig/fastdds/dds/subscriber/InstanceState.i index 033ea81d..cfa9baea 100644 --- a/fastdds_python/src/swig/fastdds/dds/subscriber/InstanceState.i +++ b/fastdds_python/src/swig/fastdds/dds/subscriber/InstanceState.i @@ -16,4 +16,6 @@ #include "fastdds/dds/subscriber/InstanceState.hpp" %} +%template(InstanceStateKindVector) std::vector; + %include "fastdds/dds/subscriber/InstanceState.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/subscriber/SampleState.i b/fastdds_python/src/swig/fastdds/dds/subscriber/SampleState.i index 21dbce65..782d3a20 100644 --- a/fastdds_python/src/swig/fastdds/dds/subscriber/SampleState.i +++ b/fastdds_python/src/swig/fastdds/dds/subscriber/SampleState.i @@ -16,4 +16,6 @@ #include "fastdds/dds/subscriber/SampleState.hpp" %} +%template(SampleStateKindVector) std::vector; + %include "fastdds/dds/subscriber/SampleState.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/subscriber/ViewState.i b/fastdds_python/src/swig/fastdds/dds/subscriber/ViewState.i index e561ed08..dd6f5ab9 100644 --- a/fastdds_python/src/swig/fastdds/dds/subscriber/ViewState.i +++ b/fastdds_python/src/swig/fastdds/dds/subscriber/ViewState.i @@ -16,4 +16,6 @@ #include "fastdds/dds/subscriber/ViewState.hpp" %} +%template(ViewStateKindVector) std::vector; + %include "fastdds/dds/subscriber/ViewState.hpp" diff --git a/fastdds_python/src/swig/fastdds/rtps/attributes/RTPSParticipantAttributes.i b/fastdds_python/src/swig/fastdds/rtps/attributes/RTPSParticipantAttributes.i index a2b1b38a..2c251a78 100644 --- a/fastdds_python/src/swig/fastdds/rtps/attributes/RTPSParticipantAttributes.i +++ b/fastdds_python/src/swig/fastdds/rtps/attributes/RTPSParticipantAttributes.i @@ -20,5 +20,6 @@ %ignore eprosima::fastrtps::rtps::DiscoverySettings::setStaticEndpointXMLFilename; %ignore eprosima::fastrtps::rtps::DiscoverySettings::getStaticEndpointXMLFilename; %ignore eprosima::fastrtps::rtps::RTPSParticipantAttributes; +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const DiscoveryProtocol&);; %include "fastdds/rtps/attributes/RTPSParticipantAttributes.h" diff --git a/fastdds_python/src/swig/fastdds/rtps/common/EntityId_t.i b/fastdds_python/src/swig/fastdds/rtps/common/EntityId_t.i index f4f5c35c..fdf87fd2 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/EntityId_t.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/EntityId_t.i @@ -30,6 +30,8 @@ long hash(const eprosima::fastrtps::rtps::EntityId_t& id) // Overloaded constructor ignored %ignore eprosima::fastrtps::rtps::EntityId_t::EntityId_t(EntityId_t &&); +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const EntityId_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, EntityId_t&); // Operators declared outside the class conflict with those declared for other types %ignore eprosima::fastrtps::rtps::operator==; @@ -42,6 +44,40 @@ namespace std { struct hash; } +%typemap(in) eprosima::fastrtps::rtps::octet[eprosima::fastrtps::rtps::EntityId_t::size](eprosima::fastrtps::rtps::octet temp[eprosima::fastrtps::rtps::EntityId_t::size]) +{ + if (PyTuple_Check($input)) + { + if (!PyArg_ParseTuple($input, "BBBB", + temp, temp+1, temp+2, temp+3)) + { + PyErr_SetString(PyExc_TypeError, "tuple must have 4 elements"); + SWIG_fail; + } + $1 = &temp[0]; + } + else + { + PyErr_SetString(PyExc_TypeError, "expected a tuple."); + SWIG_fail; + } +} + +%typemap(out) eprosima::fastrtps::rtps::octet[eprosima::fastrtps::rtps::EntityId_t::size] +{ + PyObject* python_tuple = PyTuple_New(eprosima::fastrtps::rtps::EntityId_t::size); + + if (python_tuple) + { + for(size_t count = 0; count < eprosima::fastrtps::rtps::EntityId_t::size; ++count) + { + PyTuple_SetItem(python_tuple, count, PyInt_FromLong($1[count])); + } + } + + $result = python_tuple; +} + %include "fastdds/rtps/common/EntityId_t.hpp" // Declare the comparison operators as internal to the class diff --git a/fastdds_python/src/swig/fastdds/rtps/common/Guid.i b/fastdds_python/src/swig/fastdds/rtps/common/Guid.i index b9d203d5..6e5cc4cb 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/Guid.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/Guid.i @@ -30,6 +30,8 @@ long hash(const eprosima::fastrtps::rtps::GUID_t& guid) %ignore eprosima::fastrtps::operator==(const GUID_t&, const GUID_t&); %ignore eprosima::fastrtps::operator!=(const GUID_t&, const GUID_t&); %ignore eprosima::fastrtps::operator<(const GUID_t&, const GUID_t&); +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const GUID_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, GUID_t&); %include "fastdds/rtps/common/Guid.h" diff --git a/fastdds_python/src/swig/fastdds/rtps/common/GuidPrefix_t.i b/fastdds_python/src/swig/fastdds/rtps/common/GuidPrefix_t.i index 2e93de9c..2cac24c1 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/GuidPrefix_t.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/GuidPrefix_t.i @@ -62,6 +62,9 @@ long hash(const eprosima::fastrtps::rtps::GuidPrefix_t& prefix) $result = python_tuple; } +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const GuidPrefix_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, GuidPrefix_t&); + %include "fastdds/rtps/common/GuidPrefix_t.hpp" // Declare the comparison operators as internal to the class diff --git a/fastdds_python/src/swig/fastdds/rtps/common/InstanceHandle.i b/fastdds_python/src/swig/fastdds/rtps/common/InstanceHandle.i index 67936fb2..97a0580c 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/InstanceHandle.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/InstanceHandle.i @@ -14,13 +14,95 @@ %{ #include "fastdds/rtps/common/InstanceHandle.h" + +// Define a hash method in global scope for InstanceHandle_t types +// This is necessary if we want other classes to hash an internal InstanceHandle_t +long hash(const eprosima::fastrtps::rtps::InstanceHandle_t& handle) +{ + long ret = 0; + for (unsigned int i = 0; i < 16; ++i) + { + ret = (ret * 31) ^ handle.value[i]; + } + return ret; +} + %} // SWIG does not support type conversion operators correctly unless converted to a normal method %rename(get_guid) eprosima::fastrtps::rtps::InstanceHandle_t::operator const GUID_t&; -//Operators declared outside the class conflict with those declared for other types -%ignore eprosima::fastrtps::rtps::operator<<(std::ostream&, const InstanceHandle_t&); -%ignore eprosima::fastrtps::rtps::operator>>(std::ostream&, const InstanceHandle_t&); +%ignore eprosima::fastrtps::rtps::InstanceHandleValue_t::operator [] const; +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const InstanceHandle_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, InstanceHandle_t&); +%rename(read_pointer_cast) eprosima::fastrtps::rtps::InstanceHandleValue_t::operator const octet* () const; +%rename(write_pointer_cast) eprosima::fastrtps::rtps::InstanceHandleValue_t::operator octet* (); + +%typemap(in) eprosima::fastrtps::rtps::InstanceHandleValue_t*(eprosima::fastrtps::rtps::InstanceHandleValue_t temp) +{ + if (PyTuple_Check($input)) + { + eprosima::fastrtps::rtps::octet* buf = temp; + if (!PyArg_ParseTuple($input, "BBBBBBBBBBBBBBBB", + buf, buf+1, buf+2, buf+3, buf+4, buf+5, buf+6, buf+7, buf+8, + buf+9, buf+10, buf+11, buf+12, buf+13, buf+14, buf+15)) + { + PyErr_SetString(PyExc_TypeError, "tuple must have 16 elements"); + SWIG_fail; + } + $1 = &temp; + } + else + { + PyErr_SetString(PyExc_TypeError, "expected a tuple."); + SWIG_fail; + } +} + +%typemap(out) eprosima::fastrtps::rtps::InstanceHandleValue_t* +{ + constexpr size_t ih_size = std::tuple_size::value; + PyObject* python_tuple = PyTuple_New(ih_size); + + if (python_tuple) + { + for(size_t count = 0; count < ih_size; ++count) + { + PyTuple_SetItem(python_tuple, count, PyInt_FromLong((*$1)[count])); + } + } + + $result = python_tuple; +} + +// Template for std::vector +%template(InstanceHandleVector) std::vector; %include "fastdds/rtps/common/InstanceHandle.h" + +// Declare the comparison operators as internal to the class +%extend eprosima::fastrtps::rtps::InstanceHandle_t { + + bool operator==(const eprosima::fastrtps::rtps::InstanceHandle_t& other) const + { + return *$self == other; + } + + bool operator!=(const eprosima::fastrtps::rtps::InstanceHandle_t& other) const + { + return *$self != other; + } + + std::string __str__() const + { + std::ostringstream out; + out << *$self; + return out.str(); + } + + // Define the hash method using the global one + long __hash__() const + { + return hash(*$self); + } +} diff --git a/fastdds_python/src/swig/fastdds/rtps/common/Locator.i b/fastdds_python/src/swig/fastdds/rtps/common/Locator.i index d8ad8ae8..f1073e52 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/Locator.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/Locator.i @@ -17,7 +17,11 @@ %} // Ignore overloaded constructor and methods that have no effect on target language -%ignore eprosima::fastrtps::rtps::Locator_t::Locator_t(eprosima::fastrtps::rtps::Locator_t&&); +%ignore eprosima::fastrtps::rtps::Locator_t::Locator_t(Locator_t&&); +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const Locator_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, Locator_t&); +%ignore eprosima::fastrtps::rtps::operator ==(const Locator_t&, const Locator_t&); +%ignore eprosima::fastrtps::rtps::operator !=(const Locator_t&, const Locator_t&); %typemap(in) eprosima::fastrtps::rtps::octet[16](eprosima::fastrtps::rtps::octet temp[16]) { @@ -55,3 +59,18 @@ } %include "fastdds/rtps/common/Locator.h" + +%extend eprosima::fastrtps::rtps::Locator_t +{ + bool operator==(const Locator_t& other_locator) const + { + return *self == other_locator; + + } + + bool operator!=(const Locator_t& other_locator) const + { + return *self == other_locator; + + } +} diff --git a/fastdds_python/src/swig/fastdds/rtps/common/LocatorList.i b/fastdds_python/src/swig/fastdds/rtps/common/LocatorList.i index 9fe0d083..7995a651 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/LocatorList.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/LocatorList.i @@ -20,7 +20,13 @@ %ignore eprosima::fastdds::rtps::LocatorList::contains; // Ignore overloaded constructor that have no effect on target language -%ignore eprosima::fastdds::rtps::LocatorList::LocatorList(eprosima::fastdds::rtps::LocatorList&&); +%ignore eprosima::fastdds::rtps::LocatorList::LocatorList(LocatorList&&); +%ignore eprosima::fastdds::rtps::operator <<(std::ostream&, const LocatorList&); +%ignore eprosima::fastdds::rtps::operator >>(std::istream&, LocatorList&); + +// Compilation errors due to these functions +%ignore eprosima::fastdds::rtps::Locators::operator ==(const LocatorsIterator& other) const; +%ignore eprosima::fastdds::rtps::Locators::operator !=(const LocatorsIterator& other) const; %include "fastdds/rtps/common/LocatorList.hpp" diff --git a/fastdds_python/src/swig/fastdds/rtps/common/SampleIdentity.i b/fastdds_python/src/swig/fastdds/rtps/common/SampleIdentity.i index de07502e..27542d40 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/SampleIdentity.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/SampleIdentity.i @@ -19,7 +19,9 @@ // Ignore overloaded constructor and methods that have no effect on target language %ignore eprosima::fastrtps::rtps::SampleIdentity::SampleIdentity(SampleIdentity &&); %ignore eprosima::fastrtps::rtps::SampleIdentity::writer_guid(GUID_t &&); +%ignore eprosima::fastrtps::rtps::SampleIdentity::writer_guid() const; %ignore eprosima::fastrtps::rtps::SampleIdentity::sequence_number(SequenceNumber_t &&); +%ignore eprosima::fastrtps::rtps::SampleIdentity::sequence_number(SequenceNumber_t) const; // Ignore private methods that cannot be wrapped %ignore operator >>(std::istream& input, SampleIdentity& sid); diff --git a/fastdds_python/src/swig/fastdds/rtps/common/SequenceNumber.i b/fastdds_python/src/swig/fastdds/rtps/common/SequenceNumber.i index 5da3268f..a15bf404 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/SequenceNumber.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/SequenceNumber.i @@ -16,4 +16,10 @@ #include "fastdds/rtps/common/SequenceNumber.h" %} + +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const SequenceNumber_t&); +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const std::vector&); +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const SequenceNumberSet_t&); +%ignore eprosima::fastrtps::rtps::operator >>(std::istream&, SequenceNumber_t&); + %include "fastdds/rtps/common/SequenceNumber.h" diff --git a/fastdds_python/src/swig/fastdds/rtps/common/Time_t.i b/fastdds_python/src/swig/fastdds/rtps/common/Time_t.i index 123d8630..3122c6ad 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/Time_t.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/Time_t.i @@ -30,12 +30,12 @@ %ignore eprosima::fastrtps::rtps::operator+(const Time_t&, const Time_t&); %ignore eprosima::fastrtps::rtps::operator-(const Time_t&, const Time_t&); %ignore eprosima::fastrtps::rtps::operator<<(std::ostream&, const Time_t&); -%ignore eprosima::fastrtps::rtps::operator>>(std::ostream&, const Time_t&); +%ignore eprosima::fastrtps::rtps::operator>>(std::istream&, Time_t&); // Also ignore the insertion/exraction operator of the remaining Time_t, // as it makes no sense on the target language %ignore eprosima::fastrtps::operator<<(std::ostream&, const Time_t&); -%ignore eprosima::fastrtps::operator>>(std::ostream&, const Time_t&); +%ignore eprosima::fastrtps::operator>>(std::istream&, Time_t&); // Ignore the global comparison and arithmetic operators // and make them class-internal @@ -93,3 +93,17 @@ } } +namespace eprosima { +namespace fastrtps { + +struct Duration_t : public Time_t +{ + Duration_t(); + + Duration_t( + int32_t sec, + uint32_t nsec); +}; + +} // namespace fastrtps +} // namespace eprosima diff --git a/fastdds_python/src/swig/fastdds/rtps/common/Types.i b/fastdds_python/src/swig/fastdds/rtps/common/Types.i index d906aa4f..45ffee45 100644 --- a/fastdds_python/src/swig/fastdds/rtps/common/Types.i +++ b/fastdds_python/src/swig/fastdds/rtps/common/Types.i @@ -16,4 +16,6 @@ #include "fastdds/rtps/common/Types.h" %} +%ignore eprosima::fastrtps::rtps::operator <<(std::ostream&, const ProtocolVersion_t&); + %include "fastdds/rtps/common/Types.h" diff --git a/fastdds_python/test/CMakeLists.txt b/fastdds_python/test/CMakeLists.txt index 974c04ca..71c76613 100644 --- a/fastdds_python/test/CMakeLists.txt +++ b/fastdds_python/test/CMakeLists.txt @@ -1 +1,4 @@ +# Compile types +add_subdirectory(types) + add_test(NAME api_tests COMMAND ${Python3_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/api) diff --git a/fastdds_python/test/api/test_datareader.py b/fastdds_python/test/api/test_datareader.py new file mode 100644 index 00000000..070905a7 --- /dev/null +++ b/fastdds_python/test/api/test_datareader.py @@ -0,0 +1,1782 @@ +import fastdds +import test_complete + + +class DataReaderListener (fastdds.DataReaderListener): + def __init__(self): + super().__init__() + + +def create_querycondition(): + """ + This test checks: + - DataReader::create_querycondition + - DataReader::delete_contained_entities + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + sv = fastdds.SampleStateKindVector() + vv = fastdds.ViewStateKindVector() + iv = fastdds.InstanceStateKindVector() + qp = fastdds.StringVector() + + querycondition = datareader.create_querycondition( + sv, vv, iv, "", qp) + assert(querycondition is None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.delete_contained_entities()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_readcondition(): + """ + This test checks: + - DataReader::create_readcondition + - DataReader::delete_readcondition + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + sv = fastdds.SampleStateKindVector() + vv = fastdds.ViewStateKindVector() + iv = fastdds.InstanceStateKindVector() + readcondition = datareader.create_readcondition( + sv, vv, iv) + assert(readcondition is None) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.delete_readcondition(readcondition)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_first_untaken(): + """ + This test checks: + - DataReader::get_first_untaken_info + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.durability().kind = fastdds.TRANSIENT_LOCAL_DURABILITY_QOS + datareader = subscriber.create_datareader( + topic, datareader_qos) + assert(datareader is not None) + + info = fastdds.SampleInfo() + assert(fastdds.ReturnCode_t.RETCODE_NO_DATA == + datareader.get_first_untaken_info(info)) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + sample = test_complete.CompleteTestType() + sample.int16_field(255) + assert(datawriter.write(sample)) + + assert(datareader.wait_for_unread_message(fastdds.Duration_t(5, 0))) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_first_untaken_info(info)) + assert(info.valid_data) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_instance_handle(): + """ + This test checks: + - DataReader::guid + - DataReader::get_instance_handle + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + + guid = datareader.guid() + assert(fastdds.c_Guid_Unknown != guid) + ih = datareader.get_instance_handle() + assert(fastdds.c_InstanceHandle_Unknown != ih) + + for i in range(0, 12): + assert(guid.guidPrefix.value[i] == ih.value[i]) + + for i in range(0, 4): + assert(guid.entityId.value[i] == ih.value[12+i]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_key_value(): + """ + This test checks: + - DataReader::get_key_value + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + sample = test_complete.KeyedCompleteTestType() + ih = fastdds.InstanceHandle_t() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.get_key_value(sample, ih)) + assert(fastdds.c_InstanceHandle_Unknown == ih) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_listener(): + """ + This test checks: + - DataReader::get_listener + - DataReader::set_listener + - DataReader::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + # Overload 1 + listener = DataReaderListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.set_listener(listener)) + assert(datareader.get_listener() == listener) + assert(fastdds.StatusMask.all() == datareader.get_status_mask()) + + def test(status_mask_1, status_mask_2): + """ + Test the entity creation using the two types of StatusMasks. + """ + listener = DataReaderListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.set_listener(listener, status_mask_1)) + assert(datareader.get_listener() == listener) + assert(status_mask_1 == datareader.get_status_mask()) + listener = DataReaderListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.set_listener(listener, status_mask_2)) + assert(datareader.get_listener() == listener) + assert(status_mask_2 == datareader.get_status_mask()) + + # Overload 2: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none()) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available()) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers()) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic()) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed()) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost()) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed()) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos()) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched()) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed()) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos()) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost()) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected()) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched()) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_listening_locators(): + """ + This test checks: + - DataReader::get_listening_locators + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + locator_list = fastdds.LocatorList() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_listening_locators(locator_list)) + assert(0 < locator_list.size()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_liveliness_changed_status(): + """ + This test checks: + - DataReader::get_liveliness_changed_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.LivelinessChangedStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_liveliness_changed_status(status)) + assert(0 == status.alive_count) + assert(0 == status.alive_count_change) + assert(0 == status.not_alive_count) + assert(0 == status.not_alive_count_change) + assert(fastdds.c_InstanceHandle_Unknown == status.last_publication_handle) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_matched_publication_data(): + """ + This test checks: + - DataWriter::get_matched_publication_data + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + pub_data = fastdds.PublicationBuiltinTopicData() + ih = fastdds.InstanceHandle_t() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.get_matched_publication_data(pub_data, ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_matched_publications(): + """ + This test checks: + - DataReader::get_matched_publications + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + ihs = fastdds.InstanceHandleVector() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.get_matched_publications(ihs)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_requested_deadline_missed_status(): + """ + This test checks: + - DataReader::get_requested_deadline_missed_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.RequestedDeadlineMissedStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_requested_deadline_missed_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(fastdds.c_InstanceHandle_Unknown == status.last_instance_handle) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_requested_incompatible_qos_status(): + """ + This test checks: + - DataReader::get_requested_deadline_missed_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.RequestedIncompatibleQosStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_requested_incompatible_qos_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(fastdds.INVALID_QOS_POLICY_ID == status.last_policy_id) + assert(fastdds.NEXT_QOS_POLICY_ID == status.policies.size()) + id = 0 + for policy in status.policies: + assert(0 == policy.count) + assert(id == policy.policy_id) + id += 1 + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_sample_lost_status(): + """ + This test checks: + - DataReader::get_sample_lost_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.SampleLostStatus() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.get_sample_lost_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_sample_rejected_status(): + """ + This test checks: + - DataReader::get_sample_rejected_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.SampleRejectedStatus() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.get_sample_rejected_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_subscription_matched_status(): + """ + This test checks: + - DataReader::get_subscription_matched_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + status = fastdds.SubscriptionMatchedStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.get_subscription_matched_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(0 == status.current_count) + assert(0 == status.current_count_change) + assert(fastdds.c_InstanceHandle_Unknown == status.last_publication_handle) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_subscriber(): + """ + This test checks: + - DataReader::get_subscriber + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + sub = datareader.get_subscriber() + assert(sub == subscriber) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_topicdescription(): + """ + This test checks: + - DataReader::get_topicdescription + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + topic_aux = datareader.get_topicdescription() + assert(topic.get_impl() == topic_aux.get_impl()) + assert(topic.get_type_name() == topic_aux.get_type_name()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_unread_count(): + """ + This test checks: + - DataReader::get_unread_count + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.durability().kind = fastdds.TRANSIENT_LOCAL_DURABILITY_QOS + datareader = subscriber.create_datareader( + topic, datareader_qos) + assert(datareader is not None) + + assert(0 == datareader.get_unread_count()) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + sample = test_complete.CompleteTestType() + sample.int16_field(255) + assert(datawriter.write(sample)) + + assert(datareader.wait_for_unread_message(fastdds.Duration_t(5, 0))) + assert(1 == datareader.get_unread_count()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_is_sample_valid(): + """ + This test checks: + - DataReader::is_sample_valid + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.durability().kind = fastdds.TRANSIENT_LOCAL_DURABILITY_QOS + datareader = subscriber.create_datareader( + topic, datareader_qos) + assert(datareader is not None) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + sample = test_complete.CompleteTestType() + sample.int16_field(255) + assert(datawriter.write(sample)) + + assert(datareader.wait_for_unread_message(fastdds.Duration_t(5, 0))) + data = test_complete.CompleteTestType() + info = fastdds.SampleInfo() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.read_next_sample(data, info)) + assert(datareader.is_sample_valid(data, info)) + assert(sample.int16_field() == data.int16_field()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_lookup_instance(): + """ + This test checks: + - DataReader::lookup_instance + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + sample = test_complete.KeyedCompleteTestType() + sample.id(3) + ih = datareader.lookup_instance(sample) + assert(fastdds.c_InstanceHandle_Unknown == ih) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_read(): + """ + This test checks: + - DataReader::wait_for_historical_data + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + #data_seq = test_complete.CompleteTestTypeSeq() + #info_seq = fastdds.SampleInfoSeq() + #assert(fastdds.ReturnCode_t.RETCODE_NO_DATA == datareader.read( + # data_seq, info_seq)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_read_next_sample(): + """ + This test checks: + - DataReader::read_next_sample + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.durability().kind = fastdds.TRANSIENT_LOCAL_DURABILITY_QOS + datareader = subscriber.create_datareader( + topic, datareader_qos) + assert(datareader is not None) + + data = test_complete.CompleteTestType() + info = fastdds.SampleInfo() + assert(fastdds.ReturnCode_t.RETCODE_NO_DATA == datareader.read_next_sample( + data, info)) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + sample = test_complete.CompleteTestType() + sample.int16_field(255) + assert(datawriter.write(sample)) + + assert(datareader.wait_for_unread_message(fastdds.Duration_t(5, 0))) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.read_next_sample(data, info)) + assert(info.valid_data) + assert(sample.int16_field() == data.int16_field()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_take_next_sample(): + """ + This test checks: + - DataReader::take_next_sample + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.durability().kind = fastdds.TRANSIENT_LOCAL_DURABILITY_QOS + datareader = subscriber.create_datareader( + topic, datareader_qos) + assert(datareader is not None) + + data = test_complete.CompleteTestType() + info = fastdds.SampleInfo() + assert(fastdds.ReturnCode_t.RETCODE_NO_DATA == datareader.take_next_sample( + data, info)) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + sample = test_complete.CompleteTestType() + sample.int16_field(255) + assert(datawriter.write(sample)) + + assert(datareader.wait_for_unread_message(fastdds.Duration_t(5, 0))) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datareader.take_next_sample(data, info)) + assert(info.valid_data) + assert(sample.int16_field() == data.int16_field()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_type(): + """ + This test checks: + - DataReader::type + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + test_type_aux = datareader.type() + assert(test_type == test_type_aux) + assert(test_type.get_type_name() == test_type_aux.get_type_name()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_wait_for_historical_data(): + """ + This test checks: + - DataReader::wait_for_historical_data + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datareader.wait_for_historical_data(fastdds.Duration_t(0, 100))) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_wait_for_unread_message(): + """ + This test checks: + - DataReader::wait_for_unread_message + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + assert(not datareader.wait_for_unread_message(fastdds.Duration_t(0, 100))) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + +# /** @name Read or take data methods. +# * Methods to read or take data from the History. +# */ +# +# ///@{ +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of Data values from the DataReader. The caller can limit the size +# * of the returned collection with the @c max_samples parameter. +# * +# * The properties of the @c data_values collection and the setting of the @ref PresentationQosPolicy may +# * impose further limits on the size of the returned ‘list.’ +# * +# * 1. If @ref PresentationQosPolicy::access_scope is @ref INSTANCE_PRESENTATION_QOS, then the returned +# * collection is a 'list' where samples belonging to the same data-instance are consecutive. +# * +# * 2. If @ref PresentationQosPolicy::access_scope is @ref TOPIC_PRESENTATION_QOS and +# * @ref PresentationQosPolicy::ordered_access is set to @c false, then the returned collection is a +# * 'list' where samples belonging to the same data-instance are consecutive. +# * +# * 3. If @ref PresentationQosPolicy::access_scope is @ref TOPIC_PRESENTATION_QOS and +# * @ref PresentationQosPolicy::ordered_access is set to @c true, then the returned collection is a +# * 'list' where samples belonging to the same instance may or may not be consecutive. This is because to +# * preserve order it may be necessary to mix samples from different instances. +# * +# * 4. If @ref PresentationQosPolicy::access_scope is @ref GROUP_PRESENTATION_QOS and +# * @ref PresentationQosPolicy::ordered_access is set to @c false, then the returned collection is a +# * 'list' where samples belonging to the same data instance are consecutive. +# * +# * 5. If @ref PresentationQosPolicy::access_scope is @ref GROUP_PRESENTATION_QOS and +# * @ref PresentationQosPolicy::ordered_access is set to @c true, then the returned collection contains at +# * most one sample. The difference in this case is due to the fact that it is required that the application +# * is able to read samples belonging to different DataReader objects in a specific order. +# * +# * In any case, the relative order between the samples of one instance is consistent with the +# * @ref eprosima::fastdds::dds::DestinationOrderQosPolicy "DestinationOrderQosPolicy": +# * +# * - If @ref DestinationOrderQosPolicy::kind is @ref BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, samples +# * belonging to the same instances will appear in the relative order in which there were received (FIFO, +# * earlier samples ahead of the later samples). +# * +# * - If @ref DestinationOrderQosPolicy::kind is @ref BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, samples +# * belonging to the same instances will appear in the relative order implied by the source_timestamp (FIFO, +# * smaller values of source_timestamp ahead of the larger values). +# * +# * The actual number of samples returned depends on the information that has been received by the middleware +# * as well as the @ref HistoryQosPolicy, @ref ResourceLimitsQosPolicy, and +# * @ref eprosima::fastdds::dds::ReaderResourceLimitsQos "ReaderResourceLimitsQos": +# * +# * - In the case where the @ref HistoryQosPolicy::kind is KEEP_LAST_HISTORY_QOS, the call will return at most +# * @ref HistoryQosPolicy::depth samples per instance. +# * +# * - The maximum number of samples returned is limited by @ref ResourceLimitsQosPolicy::max_samples, and by +# * @ref ReaderResourceLimitsQos::max_samples_per_read. +# * +# * - For multiple instances, the number of samples returned is additionally limited by the product +# * (@ref ResourceLimitsQosPolicy::max_samples_per_instance * @ref ResourceLimitsQosPolicy::max_instances). +# * +# * - If ReaderResourceLimitsQos::sample_infos_allocation has a maximum limit, the number of samples returned +# * may also be limited if insufficient @ref SampleInfo resources are available. +# * +# * If the operation succeeds and the number of samples returned has been limited (by means of a maximum limit, +# * as listed above, or insufficient @ref SampleInfo resources), the call will complete successfully and provide +# * those samples the reader is able to return. The user may need to make additional calls, or return outstanding +# * loaned buffers in the case of insufficient resources, in order to access remaining samples. +# * +# * In addition to the collection of samples, the read operation also uses a collection of @ref SampleInfo +# * structures (@c sample_infos). +# * +# * The initial (input) properties of the @c data_values and @c sample_infos collections will determine the +# * precise behavior of this operation. For the purposes of this description the collections are modeled as having +# * three properties: +# * +# * - the current length (@c len, see @ref LoanableCollection::length()) +# * +# * - the maximum length (@c max_len, see @ref LoanableCollection::maximum()) +# * +# * - whether the collection container owns the memory of the elements within +# * (@c owns, see @ref LoanableCollection::has_ownership()) +# * +# * The initial (input) values of the @c len, @c max_len, and @c owns properties for the @c data_values and +# * @c sample_infos collections govern the behavior of the read operation as specified by the following rules: +# * +# * 1. The values of @c len, @c max_len, and @c owns for the two collections must be identical. Otherwise read +# * will fail with RETCODE_PRECONDITION_NOT_MET. +# * +# * 2. On successful output, the values of @c len, @c max_len, and @c owns will be the same for both collections. +# * +# * 3. If the input max_len == 0 , then the @c data_values and @c sample_infos collections will be +# * filled with elements that are 'loaned' by the DataReader. On output, @c owns will be @c false, @c len will +# * be set to the number of values returned, and @c max_len will be set to a value +# * verifying max_len >= len . The use of this variant allows for zero-copy access to the data and the +# * application will need to return the loan to the DataReader using the @ref return_loan operation. +# * +# * 4. If the input max_len > 0 and the input owns == false , then the read operation will +# * fail with RETCODE_PRECONDITION_NOT_MET. This avoids the potential hard-to-detect memory leaks caused by an +# * application forgetting to return the loan. +# * +# * 5. If input max_len > 0 and the input owns == true , then the read operation will copy +# * the Data values and SampleInfo values into the elements already inside the collections. On output, @c owns +# * will be @c true, @c len will be set to the number of values copied, and @c max_len will remain unchanged. +# * The use of this variant forces a copy but the application can control where the copy is placed and the +# * application will not need to return the loan. The number of samples copied depends on the values of +# * @c max_len and @c max_samples: +# * +# * - If max_samples == LENGTH_UNLIMITED , then at most @c max_len values will be copied. The use of +# * this variant lets the application limit the number of samples returned to what the sequence can +# * accommodate. +# * +# * - If max_samples <= max_len , then at most @c max_samples values will be copied. The use of this +# * variant lets the application limit the number of samples returned to fewer that what the sequence can +# * accommodate. +# * +# * - If max_samples > max_len , then the read operation will fail with RETCODE_PRECONDITION_NOT_MET. +# * This avoids the potential confusion where the application expects to be able to access up to +# * @c max_samples, but that number can never be returned, even if they are available in the DataReader, +# * because the output sequence cannot accommodate them. +# * +# * As described above, upon return the @c data_values and @c sample_infos collections may contain elements +# * 'loaned' from the DataReader. If this is the case, the application will need to use the @ref return_loan +# * operation to return the loan once it is no longer using the Data in the collection. Upon return from +# * @ref return_loan, the collection will have max_len == 0 and owns == false . +# * +# * The application can determine whether it is necessary to return the loan or not based on the state of the +# * collections when the read operation was called, or by accessing the @c owns property. However, in many cases +# * it may be simpler to always call @ref return_loan, as this operation is harmless (i.e., leaves all elements +# * unchanged) if the collection does not have a loan. +# * +# * On output, the collection of Data values and the collection of SampleInfo structures are of the same length +# * and are in a one-to-one correspondence. Each SampleInfo provides information, such as the @c source_timestamp, +# * the @c sample_state, @c view_state, and @c instance_state, etc., about the corresponding sample. +# * +# * Some elements in the returned collection may not have valid data. If the @c instance_state in the SampleInfo is +# * @ref NOT_ALIVE_DISPOSED_INSTANCE_STATE or @ref NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, then the last sample for +# * that instance in the collection, that is, the one whose SampleInfo has sample_rank == 0 does not +# * contain valid data. Samples that contain no data do not count towards the limits imposed by the +# * @ref ResourceLimitsQosPolicy. +# * +# * The act of reading a sample changes its @c sample_state to @ref READ_SAMPLE_STATE. If the sample belongs +# * to the most recent generation of the instance, it will also set the @c view_state of the instance to be +# * @ref NOT_NEW_VIEW_STATE. It will not affect the @c instance_state of the instance. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @em Important: If the samples "returned" by this method are loaned from the middleware (see @ref take +# * for more information on memory loaning), it is important that their contents not be changed. Because the +# * memory in which the data is stored belongs to the middleware, any modifications made to the data will be +# * seen the next time the same samples are read or taken; the samples will no longer reflect the state that +# * was received from the network. +# * +# * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param [in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described above. +# * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t read( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * NOT YET IMPLEMENTED +# * +# * This operation accesses via ‘read’ the samples that match the criteria specified in the ReadCondition. +# * This operation is especially useful in combination with QueryCondition to filter data samples based on the +# * content. +# * +# * The specified ReadCondition must be attached to the DataReader; otherwise the operation will fail and return +# * RETCODE_PRECONDITION_NOT_MET. +# * +# * In case the ReadCondition is a ‘plain’ ReadCondition and not the specialized QueryCondition, the +# * operation is equivalent to calling read and passing as @c sample_states, @c view_states and @c instance_states +# * the value of the corresponding attributes in @c a_condition. Using this operation the application can avoid +# * repeating the same parameters specified when creating the ReadCondition. +# * +# * The samples are accessed with the same semantics as the read operation. If the DataReader has no samples that +# * meet the constraints, the return value will be RETCODE_NO_DATA. +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. +# * @param[in] a_condition A ReadCondition that returned @c sample_states must pass +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t read_w_condition( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# ReadCondition* a_condition = nullptr); +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of data values from the DataReader. The behavior is identical to +# * @ref read, except that all samples returned belong to the single specified instance whose handle is +# * @c a_handle. +# * +# * Upon successful completion, the data collection will contain samples all belonging to the same instance. +# * The corresponding @ref SampleInfo verifies @ref SampleInfo::instance_handle == @c a_handle. +# * +# * This operation is semantically equivalent to the @ref read operation, except in building the collection. +# * The DataReader will check that the sample belongs to the specified instance and otherwise it will not place +# * the sample in the returned collection. +# * +# * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and +# * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' +# * elements to the output collections, which must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param [in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param [in] a_handle The specified instance to return samples for. The method will fail with +# * RETCODE_BAD_PARAMETER if the handle does not correspond to an existing +# * data-object known to the DataReader. +# * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t read_instance( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& a_handle = HANDLE_NIL, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of data values from the DataReader where all the samples belong to a +# * single instance. The behavior is similar to @ref read_instance, except that the actual instance is not +# * directly specified. Rather, the samples will all belong to the 'next' instance with @c instance_handle +# * 'greater' than the specified 'previous_handle' that has available samples. +# * +# * This operation implies the existence of a total order 'greater-than' relationship between the instance +# * handles. The specifics of this relationship are not all important and are implementation specific. The +# * important thing is that, according to the middleware, all instances are ordered relative to each other. +# * This ordering is between the instance handles, and should not depend on the state of the instance (e.g. +# * whether it has data or not) and must be defined even for instance handles that do not correspond to instances +# * currently managed by the DataReader. For the purposes of the ordering, it should be 'as if' each instance +# * handle was represented as an integer. +# * +# * The behavior of this operation is 'as if' the DataReader invoked @ref read_instance, passing the smallest +# * @c instance_handle among all the ones that: (a) are greater than @c previous_handle, and (b) have available +# * samples (i.e. samples that meet the constraints imposed by the specified states). +# * +# * The special value @ref HANDLE_NIL is guaranteed to be 'less than' any valid @c instance_handle. So the use +# * of the parameter value @c previous_handle == @ref HANDLE_NIL will return the samples for the instance which +# * has the smallest @c instance_handle among all the instances that contain available samples. +# * +# * This operation is intended to be used in an application-driven iteration, where the application starts by +# * passing @c previous_handle == @ref HANDLE_NIL, examines the samples returned, and then uses the +# * @c instance_handle returned in the @ref SampleInfo as the value of the @c previous_handle argument to the +# * next call to @ref read_next_instance. The iteration continues until @ref read_next_instance fails with +# * RETCODE_NO_DATA. +# * +# * Note that it is possible to call the @ref read_next_instance operation with a @c previous_handle that does not +# * correspond to an instance currently managed by the DataReader. This is because as stated earlier the +# * 'greater-than' relationship is defined even for handles not managed by the DataReader. One practical situation +# * where this may occur is when an application is iterating through all the instances, takes all the samples of a +# * @ref NOT_ALIVE_NO_WRITERS_INSTANCE_STATE instance, returns the loan (at which point the instance information +# * may be removed, and thus the handle becomes invalid), and tries to read the next instance. +# * +# * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and +# * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' +# * elements to the output collections, which must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param [in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param [in] previous_handle The 'next smallest' instance with a value greater than this value that has +# * available samples will be returned. +# * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t read_next_instance( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& previous_handle = HANDLE_NIL, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * NOT YET IMPLEMENTED +# * +# * This operation accesses a collection of Data values from the DataReader. The behavior is identical to +# * @ref read_next_instance except that all samples returned satisfy the specified condition. In other words, on +# * success all returned samples belong to the same instance, and the instance is the instance with +# * ‘smallest’ @c instance_handle among the ones that verify (a) @c instance_handle >= @c previous_handle and (b) have samples +# * for which the specified ReadCondition evaluates to TRUE. +# * +# * Similar to the operation @ref read_next_instance it is possible to call +# * @ref read_next_instance_w_condition with a @c previous_handle that does not correspond to an instance currently +# * managed by the DataReader. +# * +# * The behavior of the @ref read_next_instance_w_condition operation follows the same rules than the read operation +# * regarding the pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar +# * to read, the @ref read_next_instance_w_condition operation may ‘loan’ elements to the output collections which +# * must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA. +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has +# * available samples will be returned. +# * @param[in] a_condition A ReadCondition that returned @c sample_states must pass +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t read_next_instance_w_condition( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& previous_handle = HANDLE_NIL, +# ReadCondition* a_condition = nullptr); +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of data-samples from the DataReader and a corresponding collection of +# * SampleInfo structures, and 'removes' them from the DataReader. The operation will return either a 'list' of +# * samples or else a single sample. This is controlled by the @ref PresentationQosPolicy using the same logic +# * as for the @ref read operation. +# * +# * The act of taking a sample removes it from the DataReader so it cannot be 'read' or 'taken' again. If the +# * sample belongs to the most recent generation of the instance, it will also set the @c view_state of the +# * instance to NOT_NEW. It will not affect the @c instance_state of the instance. +# * +# * The behavior of the take operation follows the same rules than the @ref read operation regarding the +# * pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar to +# * @ref read, the take operation may 'loan' elements to the output collections which must then be returned by +# * means of @ref return_loan. The only difference with @ref read is that, as stated, the samples returned by +# * take will no longer be accessible to successive calls to read or take. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param [in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t take( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * NOT YET IMPLEMENTED +# * +# * This operation is analogous to @ref read_w_condition except it accesses samples via the ‘take’ operation. +# * +# * The specified ReadCondition must be attached to the DataReader; otherwise the operation will fail and return +# * RETCODE_PRECONDITION_NOT_MET. +# * +# * The samples are accessed with the same semantics as the @ref take operation. +# * +# * This operation is especially useful in combination with QueryCondition to filter data samples based on the +# * content. +# * +# * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA. +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are. +# * @param[in] a_condition A ReadCondition that returned @c sample_states must pass +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t take_w_condition( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# ReadCondition* a_condition = nullptr); +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of data values from the DataReader and 'removes' them from the DataReader. +# * +# * This operation has the same behavior as @ref read_instance, except that the samples are 'taken' from the +# * DataReader such that they are no longer accessible via subsequent 'read' or 'take' operations. +# * +# * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and +# * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' +# * elements to the output collections, which must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param[in] a_handle The specified instance to return samples for. The method will fail with +# * RETCODE_BAD_PARAMETER if the handle does not correspond to an existing +# * data-object known to the DataReader. +# * @param[in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param[in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param[in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t take_instance( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& a_handle = HANDLE_NIL, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * Access a collection of data samples from the DataReader. +# * +# * This operation accesses a collection of data values from the DataReader and 'removes' them from the DataReader. +# * +# * This operation has the same behavior as @ref read_next_instance, except that the samples are 'taken' from the +# * DataReader such that they are no longer accessible via subsequent 'read' or 'take' operations. +# * +# * Similar to the operation @ref read_next_instance, it is possible to call this operation with a +# * @c previous_handle that does not correspond to an instance currently managed by the DataReader. +# * +# * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and +# * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' +# * elements to the output collections, which must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has +# * available samples will be returned. +# * @param[in] sample_states Only data samples with @c sample_state matching one of these will be returned. +# * @param[in] view_states Only data samples with @c view_state matching one of these will be returned. +# * @param[in] instance_states Only data samples with @c instance_state matching one of these will be returned. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t take_next_instance( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& previous_handle = HANDLE_NIL, +# SampleStateMask sample_states = ANY_SAMPLE_STATE, +# ViewStateMask view_states = ANY_VIEW_STATE, +# InstanceStateMask instance_states = ANY_INSTANCE_STATE); +# +# /** +# * NOT YET IMPLEMENTED +# * +# * This operation accesses a collection of Data values from the DataReader. The behavior is identical to +# * @ref read_next_instance except that all samples returned satisfy the specified condition. In other words, on +# * success all returned samples belong to the same instance, and the instance is the instance with ‘smallest’ +# * @c instance_handle among the ones that verify (a) @c instance_handle >= @c previous_handle and (b) have +# * samples for which the specified ReadCondition evaluates to TRUE. +# * +# * Similar to the operation @ref read_next_instance it is possible to call @ref read_next_instance_w_condition with +# * a @c previous_handle that does not correspond to an instance currently managed by the DataReader. +# * +# * The behavior of the @ref read_next_instance_w_condition operation follows the same rules than the read operation +# * regarding the pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar +# * to read, the @ref read_next_instance_w_condition operation may ‘loan’ elements to the output collections which +# * must then be returned by means of @ref return_loan. +# * +# * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA +# * +# * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. +# * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. +# * @param[in] max_samples The maximum number of samples to be returned. If the special value +# * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are +# * available, up to the limits described in the documentation for @ref read(). +# * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has +# * available samples will be returned. +# * @param[in] a_condition A ReadCondition that returned @c sample_states must pass +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t take_next_instance_w_condition( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos, +# int32_t max_samples = LENGTH_UNLIMITED, +# const InstanceHandle_t& previous_handle = HANDLE_NIL, +# ReadCondition* a_condition = nullptr); +# +# +# ///@} +# +# /** +# * This operation indicates to the DataReader that the application is done accessing the collection of +# * @c data_values and @c sample_infos obtained by some earlier invocation of @ref read or @ref take on the +# * DataReader. +# * +# * The @c data_values and @c sample_infos must belong to a single related ‘pair’; that is, they should correspond +# * to a pair returned from a single call to read or take. The @c data_values and @c sample_infos must also have +# * been obtained from the same DataReader to which they are returned. If either of these conditions is not met, +# * the operation will fail and return RETCODE_PRECONDITION_NOT_MET. +# * +# * This operation allows implementations of the @ref read and @ref take operations to "loan" buffers from the +# * DataReader to the application and in this manner provide "zero-copy" access to the data. During the loan, the +# * DataReader will guarantee that the data and sample-information are not modified. +# * +# * It is not necessary for an application to return the loans immediately after the read or take calls. However, +# * as these buffers correspond to internal resources inside the DataReader, the application should not retain them +# * indefinitely. +# * +# * The use of the @ref return_loan operation is only necessary if the read or take calls "loaned" buffers to the +# * application. This only occurs if the @c data_values and @c sample_infos collections had max_len == 0 +# * at the time read or take was called. The application may also examine the @c owns property of the collection to +# * determine if there is an outstanding loan. However, calling @ref return_loan on a collection that does not have +# * a loan is safe and has no side effects. +# * +# * If the collections had a loan, upon return from return_loan the collections will have max_len == 0 . +# * +# * @param [in,out] data_values A LoanableCollection object where the received data samples were obtained from +# * an earlier invocation of read or take on this DataReader. +# * @param [in,out] sample_infos A SampleInfoSeq object where the received sample infos were obtained from +# * an earlier invocation of read or take on this DataReader. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t return_loan( +# LoanableCollection& data_values, +# SampleInfoSeq& sample_infos); +# +# /** +# * This operation deletes all the entities that were created by means of the “create” operations on the DataReader. +# * That is, it deletes all contained ReadCondition and QueryCondition objects. +# * +# * The operation will return PRECONDITION_NOT_MET if the any of the contained entities is in a state where it cannot +# * be deleted. +# * +# * @return Any of the standard return codes. +# */ +# RTPS_DllAPI ReturnCode_t delete_contained_entities(); diff --git a/fastdds_python/test/api/test_datawriter.py b/fastdds_python/test/api/test_datawriter.py new file mode 100644 index 00000000..f3b762aa --- /dev/null +++ b/fastdds_python/test/api/test_datawriter.py @@ -0,0 +1,967 @@ +import datetime + +import fastdds +import test_complete + + +class DataWriterListener (fastdds.DataWriterListener): + def __init__(self): + super().__init__() + + +def test_assert_liveliness(): + """ + This test checks: + - DataWriter::assert_liveliness + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 10, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter_qos = fastdds.DataWriterQos() + datawriter_qos.liveliness().kind = \ + fastdds.MANUAL_BY_PARTICIPANT_LIVELINESS_QOS + datawriter = publisher.create_datawriter(topic, datawriter_qos) + assert(datawriter is not None) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.assert_liveliness()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_clear_history(): + """ + This test checks: + - DataWriter::clear_history + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter_qos = fastdds.DataWriterQos() + datawriter_qos.history().kind = \ + fastdds.KEEP_ALL_HISTORY_QOS + datawriter = publisher.create_datawriter(topic, datawriter_qos) + assert(datawriter is not None) + + sample = test_complete.KeyedCompleteTestType() + sample.id(4) + assert(datawriter.write(sample)) + assert([fastdds.ReturnCode_t.RETCODE_OK, 1] == + datawriter.clear_history()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_dispose(): + """ + This test checks: + - DataWriter::dispose + - DataWriter::dispose_w_timestamp + - DataWriter::unregister_instance + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Overload 1 + sample = test_complete.KeyedCompleteTestType() + sample.id(1) + ih = datawriter.register_instance(sample) + assert(fastdds.c_InstanceHandle_Unknown != ih) + sample2 = test_complete.KeyedCompleteTestType() + sample2.id(2) + ih2 = datawriter.register_instance(sample2) + assert(fastdds.c_InstanceHandle_Unknown != ih2) + assert(ih2 != ih) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.dispose(sample, ih)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.dispose(sample2, ih2)) + + # Overload 2 + sample = test_complete.KeyedCompleteTestType() + sample.id(3) + now = datetime.datetime.now().time() + timestamp = fastdds.Time_t() + timestamp.seconds = now.second + ih = datawriter.register_instance_w_timestamp(sample, timestamp) + assert(fastdds.c_InstanceHandle_Unknown == ih) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.dispose_w_timestamp(sample, ih, timestamp)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_instance_handle(): + """ + This test checks: + - DataWriter::guid + - DataWriter::get_instance_handle + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + + guid = datawriter.guid() + assert(fastdds.c_Guid_Unknown != guid) + ih = datawriter.get_instance_handle() + assert(fastdds.c_InstanceHandle_Unknown != ih) + + for i in range(0, 12): + assert(guid.guidPrefix.value[i] == ih.value[i]) + + for i in range(0, 4): + assert(guid.entityId.value[i] == ih.value[12+i]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_key_value(): + """ + This test checks: + - DataWriter::get_key_value + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + sample = test_complete.KeyedCompleteTestType() + ih = fastdds.InstanceHandle_t() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.get_key_value(sample, ih)) + assert(fastdds.c_InstanceHandle_Unknown == ih) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_sending_locators(): + """ + This test checks: + - DataWriter::get_sending_locators + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + locator_list = fastdds.LocatorList() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.get_sending_locators(locator_list)) + assert(0 < locator_list.size()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_listener(): + """ + This test checks: + - DataWriter::get_listener + - DataWriter::set_listener + - DataWriter::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Overload 1 + listener = DataWriterListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.set_listener(listener)) + assert(datawriter.get_listener() == listener) + assert(fastdds.StatusMask.all() == datawriter.get_status_mask()) + + def test(status_mask_1, status_mask_2): + """ + Test the entity creation using the two types of StatusMasks. + """ + listener = DataWriterListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.set_listener(listener, status_mask_1)) + assert(datawriter.get_listener() == listener) + assert(status_mask_1 == datawriter.get_status_mask()) + listener = DataWriterListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.set_listener(listener, status_mask_2)) + assert(datawriter.get_listener() == listener) + assert(status_mask_2 == datawriter.get_status_mask()) + + # Overload 2: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none()) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available()) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers()) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic()) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed()) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost()) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed()) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos()) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched()) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed()) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos()) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost()) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected()) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched()) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_liveliness_lost_status(): + """ + This test checks: + - DataWriter::get_liveliness_lost_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + status = fastdds.LivelinessLostStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.get_liveliness_lost_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_matched_subscription_data(): + """ + This test checks: + - DataWriter::get_matched_subscription_data + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + sub_data = fastdds.SubscriptionBuiltinTopicData() + ih = fastdds.InstanceHandle_t() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.get_matched_subscription_data(sub_data, ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_matched_subscriptions(): + """ + This test checks: + - DataWriter::get_matched_subscriptions + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + ihs = fastdds.InstanceHandleVector() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.get_matched_subscriptions(ihs)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_offered_deadline_missed_status(): + """ + This test checks: + - DataWriter::get_offered_deadline_missed_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + status = fastdds.OfferedDeadlineMissedStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.get_offered_deadline_missed_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(fastdds.c_InstanceHandle_Unknown == status.last_instance_handle) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_offered_incompatible_qos_status(): + """ + This test checks: + - DataWriter::get_offered_deadline_missed_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + status = fastdds.OfferedIncompatibleQosStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.get_offered_incompatible_qos_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(fastdds.INVALID_QOS_POLICY_ID == status.last_policy_id) + assert(fastdds.NEXT_QOS_POLICY_ID == status.policies.size()) + id = 0 + for policy in status.policies: + assert(0 == policy.count) + assert(id == policy.policy_id) + id += 1 + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_publication_matched_status(): + """ + This test checks: + - DataWriter::get_publication_matched_status + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + status = fastdds.PublicationMatchedStatus() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.get_publication_matched_status(status)) + assert(0 == status.total_count) + assert(0 == status.total_count_change) + assert(0 == status.current_count) + assert(0 == status.current_count_change) + assert(fastdds.c_InstanceHandle_Unknown == status.last_subscription_handle) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_publisher(): + """ + This test checks: + - DataWriter::get_publisher + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + pub = datawriter.get_publisher() + assert(pub == publisher) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_type(): + """ + This test checks: + - DataWriter::get_type + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + test_type_aux = datawriter.get_type() + assert(test_type == test_type_aux) + assert(test_type.get_type_name() == test_type_aux.get_type_name()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_topic(): + """ + This test checks: + - DataWriter::get_topic + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + topic_aux = datawriter.get_topic() + assert(topic == topic_aux) + assert(topic.get_type_name() == topic_aux.get_type_name()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_lookup_instance(): + """ + This test checks: + - DataWriter::lookup_instance + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + sample = test_complete.KeyedCompleteTestType() + sample.id(3) + ih = datawriter.lookup_instance(sample) + assert(fastdds.c_InstanceHandle_Unknown == ih) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_register_instance(): + """ + This test checks: + - DataWriter::register_instance + - DataWriter::register_instance_w_timestamp + - DataWriter::unregister_instance + - DataWriter::unregister_instance_w_timestamp + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Overload 1 + sample = test_complete.KeyedCompleteTestType() + sample.id(1) + ih = datawriter.register_instance(sample) + assert(fastdds.c_InstanceHandle_Unknown != ih) + sample2 = test_complete.KeyedCompleteTestType() + sample2.id(2) + ih2 = datawriter.register_instance(sample2) + assert(fastdds.c_InstanceHandle_Unknown != ih2) + assert(ih2 != ih) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.unregister_instance(sample, ih)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.unregister_instance(sample2, ih2)) + assert(fastdds.ReturnCode_t.RETCODE_PRECONDITION_NOT_MET == + datawriter.unregister_instance( + sample, fastdds.c_InstanceHandle_Unknown)) + + # Overload 2 + sample = test_complete.KeyedCompleteTestType() + sample.id(3) + now = datetime.datetime.now().time() + timestamp = fastdds.Time_t() + timestamp.seconds = now.second + ih = datawriter.register_instance_w_timestamp(sample, timestamp) + assert(fastdds.c_InstanceHandle_Unknown == ih) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.unregister_instance_w_timestamp(sample, ih, timestamp)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_wait_for_acknowledgments(): + """ + This test checks: + - DataWriter::wait_for_acknowledgments + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Overload 1 + sample = test_complete.KeyedCompleteTestType() + sample.id(3) + assert(datawriter.write(sample)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.wait_for_acknowledgments(fastdds.Duration_t(1, 0))) + + # Overload 2 + ih = datawriter.register_instance(sample) + assert(fastdds.c_InstanceHandle_Unknown != ih) + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.wait_for_acknowledgments( + sample, ih, fastdds.Duration_t(1, 0))) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_write(): + """ + This test checks: + - DataWriter::write + - DataWriter::write_w_timestamp + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport( + test_complete.KeyedCompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", test_type.get_type_name(), fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Overload 1 + sample = test_complete.KeyedCompleteTestType() + assert(datawriter.write(sample)) + + # Overload 2 + sample = test_complete.KeyedCompleteTestType() + params = fastdds.WriteParams() + guid = fastdds.GUID_t() + guid.guidPrefix.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) + guid.entityId.value = (13, 14, 15, 16) + sequence_number = fastdds.SequenceNumber_t() + sequence_number.high = 0 + sequence_number.low = 1 + params.related_sample_identity().writer_guid(guid) + params.related_sample_identity().sequence_number(sequence_number) + assert(datawriter.write(sample, params)) + + # Overload 3 + sample = test_complete.KeyedCompleteTestType() + sample.id(1) + ih = fastdds.InstanceHandle_t() + assert(fastdds.ReturnCode_t.RETCODE_OK == + datawriter.write(sample, ih)) + ih = fastdds.InstanceHandle_t() + ih.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + assert(fastdds.ReturnCode_t.RETCODE_PRECONDITION_NOT_MET == + datawriter.write(sample, ih)) + + # Overload 4 + sample = test_complete.KeyedCompleteTestType() + sample.id(1) + ih = fastdds.InstanceHandle_t() + now = datetime.datetime.now().time() + timestamp = fastdds.Time_t() + timestamp.seconds = now.second + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + datawriter.write_w_timestamp(sample, ih, timestamp)) + assert(fastdds.c_InstanceHandle_Unknown == ih) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) diff --git a/fastdds_python/test/api/test_domainparticipant.py b/fastdds_python/test/api/test_domainparticipant.py new file mode 100644 index 00000000..79a557f0 --- /dev/null +++ b/fastdds_python/test/api/test_domainparticipant.py @@ -0,0 +1,1267 @@ +import fastdds +import test_complete + + +class DomainParticipantListener (fastdds.DomainParticipantListener): + def __init__(self): + super().__init__() + + +class PublisherListener (fastdds.PublisherListener): + def __init__(self): + super().__init__() + + +class SubscriberListener (fastdds.SubscriberListener): + def __init__(self): + super().__init__() + + +class TopicListener (fastdds.TopicListener): + def __init__(self): + super().__init__() + + +def test_contains_entity(): + """ + This test checks: + - DomainParticipant::contains_entity + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + assert(participant.contains_entity(publisher.get_instance_handle())) + + assert(participant.contains_entity(fastdds.InstanceHandle_t()) is False) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_and_delete_publisher(): + """ + This test checks: + - DomainParticipant::create_publisher + - DomainParticipant::delete_publisher + - Publisher::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + listener = PublisherListener() + assert(listener is not None) + + # Overload 1 + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + assert(publisher.is_enabled()) + assert(fastdds.StatusMask.all() == publisher.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + + # Overload 2 + publisher = participant.create_publisher( + fastdds.PUBLISHER_QOS_DEFAULT, listener) + assert(publisher is not None) + assert(publisher.is_enabled()) + assert(fastdds.StatusMask.all() == publisher.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + + def test(status_mask_1, status_mask_2, listnr=None): + """ + Test the entity creation using the two types of StatusMasks. + """ + publisher = participant.create_publisher( + fastdds.PUBLISHER_QOS_DEFAULT, listnr, status_mask_1) + assert(publisher is not None) + assert(publisher.is_enabled()) + assert(status_mask_1 == publisher.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + publisher = participant.create_publisher( + fastdds.PUBLISHER_QOS_DEFAULT, listnr, status_mask_2) + assert(publisher is not None) + assert(publisher.is_enabled()) + assert(status_mask_2 == publisher.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), None) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), listener) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none(), listener) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available(), listener) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers(), listener) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic(), listener) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed(), listener) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost(), listener) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed(), listener) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos(), listener) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched(), listener) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed(), listener) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos(), listener) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost(), listener) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected(), listener) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched(), listener) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m, + listener) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_and_delete_subscriber(): + """ + This test checks: + - DomainParticipant::create_subscriber + - DomainParticipant::delete_subscriber + - Subscriber::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + listener = SubscriberListener() + assert(listener is not None) + + # Overload 1 + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + assert(subscriber.is_enabled()) + assert(fastdds.StatusMask.all() == subscriber.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + + # Overload 2 + subscriber = participant.create_subscriber( + fastdds.SUBSCRIBER_QOS_DEFAULT, listener) + assert(subscriber is not None) + assert(subscriber.is_enabled()) + assert(fastdds.StatusMask.all() == subscriber.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + + def test(status_mask_1, status_mask_2, listnr=None): + """ + Test the entity creation using the two types of StatusMasks. + """ + subscriber = participant.create_subscriber( + fastdds.SUBSCRIBER_QOS_DEFAULT, listnr, status_mask_1) + assert(subscriber is not None) + assert(subscriber.is_enabled()) + assert(status_mask_1 == subscriber.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + subscriber = participant.create_subscriber( + fastdds.SUBSCRIBER_QOS_DEFAULT, listnr, status_mask_2) + assert(subscriber is not None) + assert(subscriber.is_enabled()) + assert(status_mask_2 == subscriber.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), None) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), listener) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none(), listener) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available(), listener) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers(), listener) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic(), listener) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed(), listener) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost(), listener) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed(), listener) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos(), listener) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched(), listener) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed(), listener) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos(), listener) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost(), listener) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected(), listener) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched(), listener) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m, + listener) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_and_delete_topic(): + """ + This test checks: + - DomainParticipant::create_topic + - DomainParticipant::delete_topic + - Topic::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + listener = TopicListener() + assert(listener is not None) + + # Overload 1 - Failing (because the type is not registered yet) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is None) + + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + + # Overload 1 - Success + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + assert(topic.is_enabled()) + assert(fastdds.StatusMask.all() == topic.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + + # Overload 2 + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT, + listener) + assert(topic is not None) + assert(topic.is_enabled()) + assert(fastdds.StatusMask.all() == topic.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + + def test(status_mask_1, status_mask_2, listnr=None): + """ + Test the entity creation using the two types of StatusMasks. + """ + topic = participant.create_topic( + "Complete", "CompleteTestType", + fastdds.TOPIC_QOS_DEFAULT, listnr, status_mask_1) + assert(topic is not None) + assert(topic.is_enabled()) + assert(status_mask_1 == topic.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + topic = participant.create_topic( + "Complete", "CompleteTestType", + fastdds.TOPIC_QOS_DEFAULT, listnr, status_mask_2) + assert(topic is not None) + assert(topic.is_enabled()) + assert(status_mask_2 == topic.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), None) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), listener) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none(), listener) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available(), listener) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers(), listener) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic(), listener) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed(), listener) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost(), listener) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed(), listener) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos(), listener) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched(), listener) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed(), listener) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos(), listener) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost(), listener) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected(), listener) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched(), listener) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m, + listener) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_delete_contained_entities(): + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + publisher = participant.create_publisher( + fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + subscriber = participant.create_subscriber( + fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + + # Cannot delete participant without deleting its contained entities + assert(fastdds.ReturnCode_t.RETCODE_PRECONDITION_NOT_MET == + factory.delete_participant(participant)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_contained_entities()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_enable(): + """ + This test checks: + - DomainParticipant::enable + - DomainParticipant::is_enabled + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + factory_qos = fastdds.DomainParticipantFactoryQos() + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.get_qos(factory_qos)) + factory_qos.entity_factory().autoenable_created_entities = False + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.set_qos(factory_qos)) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + assert(not participant.is_enabled()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.enable()) + assert(participant.is_enabled()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + factory_qos.entity_factory().autoenable_created_entities = True + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.set_qos(factory_qos)) + + +def test_find_topic(): + """ + This test checks: + - DomainParticipant::find_topic + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + + topic_copy = participant.find_topic("Complete", fastdds.Duration_t(1, 0)) + assert(topic_copy is None) # Not implemented yet + # assert(topic.get_type_name() == topic_copy.get_type_name()) + # assert(topic.get_name() == topic_copy.get_name()) + # assert(fastdds.ReturnCode_t.RETCODE_OK == + # participant.delete_topic(topic_copy)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_builtin_subscriber(): + """ + This test checks: + - DomainParticipant::get_builtin_subscriber + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + builtin_subscriber = participant.get_builtin_subscriber() + assert(builtin_subscriber is None) + # assert(builtin_subscriber.is_enabled()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_discovered_participants(): + """ + This test checks: + - DomainParticipant::get_discovered_participants + - DomainParticipant::get_discovered_participant_data + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + participant2 = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant2 is not None) + + ihs = fastdds.InstanceHandleVector() + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + participant.get_discovered_participants(ihs)) + + +def test_get_domain_id(): + """ + This test checks: + - DomainParticipant::get_domain_id + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 32, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + assert(32 == participant.get_domain_id()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_instance_handle(): + """ + This test checks: + - DomainParticipant::get_instance_handle + - DomainParticipant::guid + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + ih = participant.get_instance_handle() + assert(ih is not None) + # assert(ih.isDefined()) + guid = participant.guid() + assert(guid is not None) + + assert(ih != fastdds.c_InstanceHandle_Unknown) + assert(guid != fastdds.c_Guid_Unknown) + + assert(guid.get_instance_handle() == ih) + + for i in range(0, 12): + assert(guid.guidPrefix.value[i] == ih.value[i]) + + for i in range(0, 4): + assert(guid.entityId.value[i] == ih.value[12+i]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_listener(): + """ + This test checks: + - DomainParticipant::get_listener + - DomainParticipant::set_listener + - DomainParticipant::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 7, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + # Overload 1 + listener = DomainParticipantListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.set_listener(listener)) + assert(participant.get_listener() == listener) + assert(fastdds.StatusMask.all() == participant.get_status_mask()) + + def test(status_mask_1, status_mask_2): + """ + Test the entity creation using the two types of StatusMasks. + """ + listener = DomainParticipantListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.set_listener(listener, status_mask_1)) + assert(participant.get_listener() == listener) + assert(status_mask_1 == participant.get_status_mask()) + listener = DomainParticipantListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.set_listener(listener, status_mask_2)) + assert(participant.get_listener() == listener) + assert(status_mask_2 == participant.get_status_mask()) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none()) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available()) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers()) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic()) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed()) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost()) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed()) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos()) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched()) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed()) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos()) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost()) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected()) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched()) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_partitipant_names(): + """ + This test checks: + - DomainParticipant::get_participant_names + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + qos = fastdds.DomainParticipantQos() + qos.name('TestName') + participant = factory.create_participant(0, qos) + assert(participant is not None) + + names = participant.get_participant_names() + assert('TestName' == names[0]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_qos(): + """ + This test checks: + - DomainParticipant::get_qos + - DomainParticipant::set_qos + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + qos = fastdds.DomainParticipantQos() + participant = factory.create_participant(0, qos) + assert(participant is not None) + + assert(fastdds.ReturnCode_t.RETCODE_OK == participant.get_qos(qos)) + qos.user_data().push_back(1) + qos.user_data().push_back(2) + assert(2 == len(qos.user_data())) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.set_qos(qos)) + + qos2 = fastdds.DomainParticipantQos() + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.get_qos(qos2)) + assert(2 == len(qos2.user_data())) + assert(1 == qos2.user_data()[0]) + assert(2 == qos2.user_data()[1]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_ignore_participant(): + """ + This test checks: + - DomainParticipant::ignore_participant + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + ih = fastdds.InstanceHandle_t() + ih.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + participant.ignore_participant(ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_ignore_publication(): + """ + This test checks: + - DomainParticipant::ignore_publication + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + ih = fastdds.InstanceHandle_t() + ih.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + participant.ignore_publication(ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_ignore_subscription(): + """ + This test checks: + - DomainParticipant::ignore_subscription + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + ih = fastdds.InstanceHandle_t() + ih.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + participant.ignore_subscription(ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_ignore_topic(): + """ + This test checks: + - DomainParticipant::ignore_topic + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + ih = fastdds.InstanceHandle_t() + ih.value = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + participant.ignore_topic(ih)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_lookup_topicdescription(): + """ + This test checks: + - DomainParticipant::lookup_topicdescription + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + + topic_desc = participant.lookup_topicdescription("Complete") + assert(topic_desc is not None) + assert(topic.get_type_name() == topic_desc.get_type_name()) + assert(topic.get_name() == topic_desc.get_name()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + + +# +# +# /** +# * 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()); +# +# /** +# * 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()); +# +# +# * 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()); +# +# /** +# * Create a ContentFilteredTopic in this Participant. +# * +# * @param name Name of the ContentFilteredTopic +# * @param related_topic Related Topic to being subscribed +# * @param filter_expression Logic expression to create filter +# * @param expression_parameters Parameters to filter content +# * @return Pointer to the created ContentFilteredTopic. +# * @return nullptr if @c related_topic does not belong to this participant. +# * @return nullptr if a topic with the specified @c name has already been created. +# * @return nullptr if a filter cannot be created with the specified @c filter_expression and +# * @c expression_parameters. +# */ +# RTPS_DllAPI ContentFilteredTopic* create_contentfilteredtopic( +# const std::string& name, +# Topic* related_topic, +# const std::string& filter_expression, +# const std::vector& expression_parameters); +# +# /** +# * Create a ContentFilteredTopic in this Participant using a custom filter. +# * +# * @param name Name of the ContentFilteredTopic +# * @param related_topic Related Topic to being subscribed +# * @param filter_expression Logic expression to create filter +# * @param expression_parameters Parameters to filter content +# * @param filter_class_name Name of the filter class to use +# * +# * @return Pointer to the created ContentFilteredTopic. +# * @return nullptr if @c related_topic does not belong to this participant. +# * @return nullptr if a topic with the specified @c name has already been created. +# * @return nullptr if a filter cannot be created with the specified @c filter_expression and +# * @c expression_parameters. +# * @return nullptr if the specified @c filter_class_name has not been registered. +# */ +# RTPS_DllAPI ContentFilteredTopic* create_contentfilteredtopic( +# const std::string& name, +# Topic* related_topic, +# const std::string& filter_expression, +# const std::vector& expression_parameters, +# const char* filter_class_name); +# +# /** +# * Deletes an existing ContentFilteredTopic. +# * +# * @param a_contentfilteredtopic ContentFilteredTopic 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 RETCODE_OK if the ContentFilteredTopic was deleted. +# */ +# RTPS_DllAPI ReturnCode_t delete_contentfilteredtopic( +# const ContentFilteredTopic* a_contentfilteredtopic); +# +# /** +# * Create a MultiTopic in this Participant. +# * +# * @param name Name of the MultiTopic +# * @param type_name Result type of the MultiTopic +# * @param subscription_expression Logic expression to combine filter +# * @param expression_parameters Parameters to subscription content +# * @return Pointer to the created ContentFilteredTopic, nullptr in error case +# */ +# RTPS_DllAPI MultiTopic* create_multitopic( +# const std::string& name, +# const std::string& type_name, +# const std::string& subscription_expression, +# const std::vector& expression_parameters); +# +# /** +# * Deletes an existing MultiTopic. +# * +# * @param a_multitopic MultiTopic 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 RETCODE_OK if the Topic was deleted. +# */ +# RTPS_DllAPI ReturnCode_t delete_multitopic( +# const MultiTopic* a_multitopic); +# +# /** +# * 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(); +# +# /** +# * Fills the PublisherQos with the values of the XML profile. +# * +# * @param profile_name Publisher profile name. +# * @param qos PublisherQos object where the qos is returned. +# * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. +# */ +# RTPS_DllAPI ReturnCode_t get_publisher_qos_from_profile( +# const std::string& profile_name, +# PublisherQos& qos) const; +# +# +# /** +# * Fills the SubscriberQos with the values of the XML profile. +# * +# * @param profile_name Subscriber profile name. +# * @param qos SubscriberQos object where the qos is returned. +# * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. +# */ +# RTPS_DllAPI ReturnCode_t get_subscriber_qos_from_profile( +# const std::string& profile_name, +# SubscriberQos& qos) const; +# +# +# /** +# * Fills the TopicQos with the values of the XML profile. +# * +# * @param profile_name Topic profile name. +# * @param qos TopicQos object where the qos is returned. +# * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. +# */ +# RTPS_DllAPI ReturnCode_t get_topic_qos_from_profile( +# const std::string& profile_name, +# TopicQos& qos) const; +# +# /** +# * Retrieves the list of topics that have been discovered in the domain and are not "ignored". +# * +# * @param[out] topic_handles Reference to the vector where discovered topics will be returned +# * @return RETCODE_OK if everything correct, error code otherwise +# */ +# RTPS_DllAPI ReturnCode_t get_discovered_topics( +# std::vector& topic_handles) const; +# +# /** +# * Retrieves the Topic data of a discovered not ignored topic. +# * +# * @param[out] topic_data Reference to the TopicBuiltinTopicData object to return the data +# * @param topic_handle InstanceHandle of Topic to retrieve the data from +# * @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if topic does not exist +# */ +# RTPS_DllAPI ReturnCode_t get_discovered_topic_data( +# builtin::TopicBuiltinTopicData& topic_data, +# const InstanceHandle_t& topic_handle) const; +# +# /** +# * This operation checks whether or not the given handle represents an Entity that was created from the +# * DomainParticipant. +# * +# * @param a_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 InstanceHandle_t& a_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; +# +# // DomainParticipant methods specific from Fast-DDS +# +# /** +# * 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); +# +# /** +# * 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; +# +# /** +# * @brief Getter for the participant names +# * +# * @return Vector with the names +# */ +# RTPS_DllAPI std::vector 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& callback); +# +# /** +# * Register a custom content filter factory, which can be used to create a ContentFilteredTopic. +# * +# * DDS specifies a SQL-like content filter to be used by content filtered topics. +# * If this filter does not meet your filtering requirements, you can register a custom filter factory. +# * +# * To use a custom filter, a factory for it must be registered in the following places: +# * +# * - In any application that uses the custom filter factory to create a ContentFilteredTopic and the corresponding +# * DataReader. +# * +# * - In each application that writes the data to the applications mentioned above. +# * +# * For example, suppose Application A on the subscription side creates a Topic named X and a ContentFilteredTopic +# * named filteredX (and a corresponding DataReader), using a previously registered content filter factory, myFilterFactory. +# * With only that, you will have filtering at the subscription side. +# * If you also want to perform filtering in any application that publishes Topic X, then you also need to register +# * the same definition of the ContentFilterFactory myFilterFactory in that application. +# * +# * Each @c filter_class_name can only be used to register a content filter factory once per DomainParticipant. +# * +# * @param filter_class_name Name of the filter class. Cannot be nullptr, must not exceed 255 characters, and must +# * be unique within this DomainParticipant. +# * @param filter_factory Factory of content filters to be registered. Cannot be nullptr. +# * +# * @return RETCODE_BAD_PARAMETER if any parameter is nullptr, or the filter_class_name exceeds 255 characters. +# * @return RETCODE_PRECONDITION_NOT_MET if the filter_class_name has been already registered. +# * @return RETCODE_PRECONDITION_NOT_MET if filter_class_name is FASTDDS_SQLFILTER_NAME. +# * @return RETCODE_OK if the filter is correctly registered. +# */ +# RTPS_DllAPI ReturnCode_t register_content_filter_factory( +# const char* filter_class_name, +# IContentFilterFactory* const filter_factory); +# +# /** +# * Lookup a custom content filter factory previously registered with register_content_filter_factory. +# * +# * @param filter_class_name Name of the filter class. Cannot be nullptr. +# * +# * @return nullptr if the given filter_class_name has not been previously registered on this DomainParticipant. +# * Otherwise, the content filter factory previously registered with the given filter_class_name. +# */ +# RTPS_DllAPI IContentFilterFactory* lookup_content_filter_factory( +# const char* filter_class_name); +# +# /** +# * Unregister a custom content filter factory previously registered with register_content_filter_factory. +# * +# * A filter_class_name can be unregistered only if it has been previously registered to the DomainParticipant with +# * register_content_filter_factory. +# * +# * The unregistration of filter is not allowed if there are any existing ContentFilteredTopic objects that are +# * using the filter. +# * +# * If there is any existing discovered DataReader with the same filter_class_name, filtering on the writer side will be +# * stopped, but this operation will not fail. +# * +# * @param filter_class_name Name of the filter class. Cannot be nullptr. +# * +# * @return RETCODE_BAD_PARAMETER if the filter_class_name is nullptr. +# * @return RERCODE_PRECONDITION_NOT_MET if the filter_class_name has not been previously registered. +# * @return RERCODE_PRECONDITION_NOT_MET if there is any ContentFilteredTopic referencing the filter. +# * @return RETCODE_OK if the filter is correctly unregistered. +# */ +# RTPS_DllAPI ReturnCode_t unregister_content_filter_factory( +# const char* filter_class_name); +# +# /** +# * @brief Check if the Participant has any Publisher, Subscriber or Topic +# * +# * @return true if any, false otherwise. +# */ +# bool has_active_entities(); diff --git a/fastdds_python/test/api/test_publisher.py b/fastdds_python/test/api/test_publisher.py new file mode 100644 index 00000000..587dadc7 --- /dev/null +++ b/fastdds_python/test/api/test_publisher.py @@ -0,0 +1,597 @@ +import fastdds +import test_complete + + +class PublisherListener (fastdds.PublisherListener): + def __init__(self): + super().__init__() + + +class DataWriterListener (fastdds.DataWriterListener): + def __init__(self): + super().__init__() + + +def test_coherent_changes(): + """ + This test checks: + - Publisher::begin_coherent_changes + - Publisher::end_coherent_changes + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + publisher.begin_coherent_changes()) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + publisher.end_coherent_changes()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_and_delete_datawriter(): + """ + This test checks: + - Publisher::create_datawriter + - Publisher::delete_datawriter + - DataWriter::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + # Overload 1 - Success + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + listener = DataWriterListener() + assert(listener is not None) + + # Overload 1 + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + assert(datawriter.is_enabled()) + assert(fastdds.StatusMask.all() == datawriter.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + + # Overload 2 + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT, listener) + assert(datawriter is not None) + assert(datawriter.is_enabled()) + assert(fastdds.StatusMask.all() == datawriter.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + + def test(status_mask_1, status_mask_2, listnr=None): + """ + Test the entity creation using the two types of StatusMasks. + """ + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT, listnr, status_mask_1) + assert(datawriter is not None) + assert(datawriter.is_enabled()) + assert(status_mask_1 == datawriter.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT, listnr, status_mask_2) + assert(datawriter is not None) + assert(datawriter.is_enabled()) + assert(status_mask_2 == datawriter.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), None) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), listener) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none(), listener) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available(), listener) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers(), listener) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic(), listener) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed(), listener) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost(), listener) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed(), listener) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos(), listener) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched(), listener) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed(), listener) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos(), listener) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost(), listener) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected(), listener) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched(), listener) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m, + listener) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_deleted_contained_entities(): + """ + This test checks: + - Publisher::delete_contained_entities + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + # Cannot delete publisher with datawriters + assert(fastdds.ReturnCode_t.RETCODE_PRECONDITION_NOT_MET == + participant.delete_publisher(publisher)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_contained_entities()) + assert(publisher.has_datawriters() is False) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_enable(): + """ + This test checks: + - Publisher::enable + - Publisher::is_enabled + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + qos = fastdds.DomainParticipantQos() + qos.entity_factory().autoenable_created_entities = False + participant = factory.create_participant(0, qos) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + assert(not publisher.is_enabled()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.enable()) + assert(publisher.is_enabled()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_datawriters(): + """ + This test checks: + - Publisher::get_datawriters + - Publisher::has_datawriters + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + assert(publisher.has_datawriters()) + datawriters = fastdds.DataWriterVector() + assert(publisher.get_datawriters(datawriters)) + assert(1 == len(datawriters)) + assert(datawriter == datawriters[0]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_instance_handle(): + """ + This test checks: + - Publisher::get_instance_handle + - Publisher::guid + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + ih = publisher.get_instance_handle() + assert(ih is not None) + assert(ih.isDefined()) + guid = participant.guid() + assert(guid is not None) + + assert(ih != fastdds.c_InstanceHandle_Unknown) + assert(guid != fastdds.c_Guid_Unknown) + + for i in range(0, 12): + assert(guid.guidPrefix.value[i] == ih.value[i]) + + # for i in range(0, 4): + # assert(guid.entityId.value[i] == ih.value[12+i]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_participant(): + """ + This test checks: + - Publisher::get_participant + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + participant2 = publisher.get_participant() + assert(participant2 is not None) + assert(participant == participant2) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_qos(): + """ + This test checks: + - Publisher::get_qos + - Publisher::set_qos + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + qos = fastdds.PublisherQos() + publisher = participant.create_publisher(qos) + assert(publisher is not None) + + qos.partition().push_back('PartitionTest') + qos.partition().push_back('PartitionTest2') + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.set_qos(qos)) + + qos2 = fastdds.PublisherQos() + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.get_qos(qos2)) + + assert(2 == len(qos.partition())) + assert('PartitionTest' == qos.partition()[0]) + assert('PartitionTest2' == qos.partition()[1]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_listener(): + """ + This test checks: + - Publisher::get_listener + - Publisher::set_listener + - Publisher::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + # Overload 1 + listener = PublisherListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.set_listener(listener)) + assert(publisher.get_listener() == listener) + assert(fastdds.StatusMask.all() == publisher.get_status_mask()) + + def test(status_mask_1, status_mask_2): + """ + Test the entity creation using the two types of StatusMasks. + """ + listener = PublisherListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.set_listener(listener, status_mask_1)) + assert(publisher.get_listener() == listener) + assert(status_mask_1 == publisher.get_status_mask()) + listener = PublisherListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.set_listener(listener, status_mask_2)) + assert(publisher.get_listener() == listener) + assert(status_mask_2 == publisher.get_status_mask()) + + # Overload 2: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none()) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available()) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers()) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic()) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed()) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost()) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed()) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos()) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched()) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed()) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos()) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost()) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected()) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched()) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_lookup_datawriter(): + """ + This test checks: + - Publisher::lookup_datawriter + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + # Overload 1 - Success + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter = publisher.create_datawriter( + topic, fastdds.DATAWRITER_QOS_DEFAULT) + assert(datawriter is not None) + + datawriter2 = publisher.lookup_datawriter('Complete') + assert(datawriter2 is not None) + assert(datawriter == datawriter2) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_suspend_publications(): + """ + This test checks: + - Publisher::suspend_publications + - Publisher::resume_publications + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + publisher.suspend_publications()) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + publisher.resume_publications()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_wait_for_acknowlegments(): + """ + This test checks: + - Publisher::wait_for_acknowledgments + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.wait_for_acknowledgments(fastdds.Duration_t(3, 0))) + # TODO Test a timeout + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +# +# /** +# * 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 that holds statuses the listener responds to (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()); +# +# +# /** +# * @brief Copies TopicQos into the corresponding DataWriterQos +# * +# * @param[out] writer_qos +# * @param[in] topic_qos +# * @return RETCODE_OK if successful, an error code otherwise +# */ +# RTPS_DllAPI ReturnCode_t copy_from_topic_qos( +# fastdds::dds::DataWriterQos& writer_qos, +# const fastdds::dds::TopicQos& topic_qos) const; +# +# /** +# * Fills the DataWriterQos with the values of the XML profile. +# * +# * @param profile_name DataWriter profile name. +# * @param qos DataWriterQos object where the qos is returned. +# * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. +# */ +# RTPS_DllAPI ReturnCode_t get_datawriter_qos_from_profile( +# const std::string& profile_name, +# DataWriterQos& qos) const; diff --git a/fastdds_python/test/api/test_qos.py b/fastdds_python/test/api/test_qos.py index 13d749bd..25b47752 100644 --- a/fastdds_python/test/api/test_qos.py +++ b/fastdds_python/test/api/test_qos.py @@ -184,23 +184,24 @@ def test_datareader_qos(): assert(datareader_qos.expects_inline_qos()) # .properties + properties = {} property = fastdds.Property() property.name('Property1') property.value('Value1') datareader_qos.properties().properties().push_back(property) + properties[property.name()] = [property.value(), False] property = fastdds.Property() property.name('Property2') property.value('Value2') datareader_qos.properties().properties().push_back(property) - count = 1 + properties[property.name()] = [property.value(), False] for prop in datareader_qos.properties().properties(): - if 1 == count: - assert('Property1' == prop.name()) - assert('Value1' == prop.value()) - else: - assert('Property2' == prop.name()) - assert('Value2' == prop.value()) - count += 1 + for proper in properties: + if prop.name() == proper and prop.value() == properties[proper][0]: + properties[proper][1] = True + + for prop in properties: + assert(properties[proper][1]) # .endpoint datareader_qos.endpoint().user_defined_id = 1 @@ -279,6 +280,11 @@ def test_datareader_qos(): default_datareader_qos = fastdds.DataReaderQos() subscriber.get_default_datareader_qos(default_datareader_qos) + + # Revert changes in default + datareader_qos = fastdds.DataReaderQos() + subscriber.set_default_datareader_qos(datareader_qos) + participant.delete_subscriber(subscriber) factory.delete_participant(participant) @@ -349,8 +355,8 @@ def test_datareader_qos(): # .time_based_filter assert(fastdds.Time_t.INFINITE_SECONDS == default_datareader_qos. time_based_filter().minimum_separation.seconds) - assert(fastdds.Time_t.INFINITE_NANOSECONDS == - datareader_qos.time_based_filter().minimum_separation.nanosec) + assert(fastdds.Time_t.INFINITE_NANOSECONDS == default_datareader_qos. + time_based_filter().minimum_separation.nanosec) # .reader_data_lifecycle assert(100 == default_datareader_qos.reader_data_lifecycle(). @@ -695,6 +701,11 @@ def test_datawriter_qos(): default_datawriter_qos = fastdds.DataWriterQos() publisher.get_default_datawriter_qos(default_datawriter_qos) + + # Revert changes in default + datawriter_qos = fastdds.DataWriterQos() + publisher.set_default_datawriter_qos(datawriter_qos) + participant.delete_publisher(publisher) factory.delete_participant(participant) @@ -739,7 +750,7 @@ def test_datawriter_qos(): assert(100 == default_datawriter_qos.reliability(). max_blocking_time.seconds) assert(fastdds.Time_t.INFINITE_NANOSECONDS == - datawriter_qos.reliability().max_blocking_time.nanosec) + default_datawriter_qos.reliability().max_blocking_time.nanosec) # .destination_order assert(fastdds.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS == @@ -789,7 +800,8 @@ def test_datawriter_qos(): # .publish_mode assert(fastdds.ASYNCHRONOUS_PUBLISH_MODE == default_datawriter_qos.publish_mode().kind) - assert('Prueba' == datawriter_qos.publish_mode().flow_controller_name) + assert('Prueba' == default_datawriter_qos.publish_mode(). + flow_controller_name) # .properties count = 1 @@ -968,6 +980,11 @@ def test_topic_qos(): default_topic_qos = fastdds.TopicQos() participant.get_default_topic_qos(default_topic_qos) + + # Revert changes in default + topic_qos = fastdds.TopicQos() + participant.set_default_topic_qos(topic_qos) + factory.delete_participant(participant) # .topic_data @@ -1017,7 +1034,7 @@ def test_topic_qos(): default_topic_qos.reliability().kind) assert(100 == default_topic_qos.reliability().max_blocking_time.seconds) assert(fastdds.Time_t.INFINITE_NANOSECONDS == - topic_qos.reliability().max_blocking_time.nanosec) + default_topic_qos.reliability().max_blocking_time.nanosec) # .destination_order assert(fastdds.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS == @@ -1095,6 +1112,11 @@ def test_subscriber_qos(): default_subscriber_qos = fastdds.SubscriberQos() participant.get_default_subscriber_qos(default_subscriber_qos) + + # Revert changes in default + subscriber_qos = fastdds.SubscriberQos() + participant.set_default_subscriber_qos(subscriber_qos) + factory.delete_participant(participant) # .presentation @@ -1175,6 +1197,11 @@ def test_publisher_qos(): default_publisher_qos = fastdds.PublisherQos() participant.get_default_publisher_qos(default_publisher_qos) + + # Revert changes in default + publisher_qos = fastdds.PublisherQos() + participant.set_default_publisher_qos(publisher_qos) + factory.delete_participant(participant) # .presentation @@ -1290,23 +1317,24 @@ def test_domain_participant_qos(): assert("test name" == participant_qos.name()) # .properties + properties = {} property = fastdds.Property() property.name('Property1') property.value('Value1') participant_qos.properties().properties().push_back(property) + properties[property.name()] = [property.value(), False] property = fastdds.Property() property.name('Property2') property.value('Value2') participant_qos.properties().properties().push_back(property) - count = 1 + properties[property.name()] = [property.value(), False] for prop in participant_qos.properties().properties(): - if 1 == count: - assert('Property1' == prop.name()) - assert('Value1' == prop.value()) - else: - assert('Property2' == prop.name()) - assert('Value2' == prop.value()) - count += 1 + for proper in properties: + if prop.name() == proper and prop.value() == properties[proper][0]: + properties[proper][1] = True + + for prop in properties: + assert(properties[proper][1]) # .transports participant_qos.transport().listen_socket_buffer_size = 10000 @@ -1560,6 +1588,10 @@ def test_domain_participant_qos(): default_participant_qos = fastdds.DomainParticipantQos() factory.get_default_participant_qos(default_participant_qos) + # Revert changes in default + participant_qos = fastdds.DomainParticipantQos() + factory.set_default_participant_qos(participant_qos) + # .allocation assert(10 == default_participant_qos.allocation(). data_limits.max_properties) @@ -1617,22 +1649,23 @@ def test_domain_participant_qos(): assert("test name" == default_participant_qos.name()) # .properties - count = 1 + for prop in properties: + properties[proper][1] = False + for prop in default_participant_qos.properties().properties(): - if 1 == count: - assert('Property1' == prop.name()) - assert('Value1' == prop.value()) - else: - assert('Property2' == prop.name()) - assert('Value2' == prop.value()) - count += 1 + for proper in properties: + if prop.name() == proper and prop.value() == properties[proper][0]: + properties[proper][1] = True + + for prop in properties: + assert(properties[proper][1]) # .transports assert(10000 == default_participant_qos.transport(). listen_socket_buffer_size) assert(20000 == default_participant_qos.transport(). send_socket_buffer_size) - assert(not participant_qos.transport().use_builtin_transports) + assert(not default_participant_qos.transport().use_builtin_transports) # .user_data count = 1 @@ -1778,8 +1811,13 @@ def test_domain_participant_factory_qos(): assert(not factory_qos.entity_factory().autoenable_created_entities) factory.set_qos(factory_qos) - default_factory_qos = fastdds.DomainParticipantFactoryQos() factory.get_qos(default_factory_qos) + # Revert changes in default + factory_qos = fastdds.DomainParticipantFactoryQos() + factory.set_qos(factory_qos) + + assert(not default_factory_qos.entity_factory(). autoenable_created_entities) + default_factory_qos = fastdds.DomainParticipantFactoryQos() diff --git a/fastdds_python/test/api/test_subscriber.py b/fastdds_python/test/api/test_subscriber.py new file mode 100644 index 00000000..07c65718 --- /dev/null +++ b/fastdds_python/test/api/test_subscriber.py @@ -0,0 +1,509 @@ +import fastdds +import test_complete + + +class SubscriberListener (fastdds.SubscriberListener): + def __init__(self): + super().__init__() + + +class DataReaderListener (fastdds.DataReaderListener): + def __init__(self): + super().__init__() + + +def test_access(): + """ + This test checks: + - ::resume_publications + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + subscriber.begin_access()) + assert(fastdds.ReturnCode_t.RETCODE_UNSUPPORTED == + subscriber.end_access()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_create_and_delete_datareader(): + """ + This test checks: + - Subscriber::create_datareader + - Subscriber::delete_datareader + - DataReader::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + # Overload 1 - Success + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + listener = DataReaderListener() + assert(listener is not None) + + # Overload 1 + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + assert(datareader.is_enabled()) + assert(fastdds.StatusMask.all() == datareader.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + + # Overload 2 + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT, listener) + assert(datareader is not None) + assert(datareader.is_enabled()) + assert(fastdds.StatusMask.all() == datareader.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + + def test(status_mask_1, status_mask_2, listnr=None): + """ + Test the entity creation using the two types of StatusMasks. + """ + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT, listnr, status_mask_1) + assert(datareader is not None) + assert(datareader.is_enabled()) + assert(status_mask_1 == datareader.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT, listnr, status_mask_2) + assert(datareader is not None) + assert(datareader.is_enabled()) + assert(status_mask_2 == datareader.get_status_mask()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + + # Overload 3: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), None) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all(), listener) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none(), listener) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available(), listener) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers(), listener) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic(), listener) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed(), listener) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost(), listener) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed(), listener) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos(), listener) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched(), listener) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed(), listener) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos(), listener) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost(), listener) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected(), listener) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched(), listener) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m, + listener) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_deleted_contained_entities(): + """ + This test checks: + - Subscriber::delete_contained_entities + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + # Cannot delete subscriber with datareaders + assert(fastdds.ReturnCode_t.RETCODE_PRECONDITION_NOT_MET == + participant.delete_subscriber(subscriber)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_contained_entities()) + + assert(subscriber.has_datareaders() is False) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_enable(): + """ + This test checks: + - Subscriber::enable + - Subscriber::is_enabled + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + qos = fastdds.DomainParticipantQos() + qos.entity_factory().autoenable_created_entities = False + participant = factory.create_participant(0, qos) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + + assert(not subscriber.is_enabled()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.enable()) + assert(subscriber.is_enabled()) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_datareaders(): + """ + This test checks: + - Subscriber::get_datareaders + - Subscriber::has_datareaders + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + assert(subscriber.has_datareaders()) + datareaders = fastdds.DataReaderVector() + assert(subscriber.get_datareaders(datareaders)) + assert(1 == len(datareaders)) + assert(datareader == datareaders[0]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_instance_handle(): + """ + This test checks: + - Subscriber::get_instance_handle + - Subscriber::guid + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + + ih = subscriber.get_instance_handle() + assert(ih is not None) + assert(ih.isDefined()) + guid = participant.guid() + assert(guid is not None) + + assert(ih != fastdds.c_InstanceHandle_Unknown) + assert(guid != fastdds.c_Guid_Unknown) + + for i in range(0, 12): + assert(guid.guidPrefix.value[i] == ih.value[i]) + + # for i in range(0, 4): + # assert(guid.entityId.value[i] == ih.value[12+i]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_participant(): + """ + This test checks: + - Subscriber::get_participant + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + + participant2 = subscriber.get_participant() + assert(participant2 is not None) + assert(participant == participant2) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_qos(): + """ + This test checks: + - Subscriber::get_qos + - Subscriber::set_qos + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + qos = fastdds.SubscriberQos() + subscriber = participant.create_subscriber(qos) + assert(subscriber is not None) + + qos.partition().push_back('PartitionTest') + qos.partition().push_back('PartitionTest2') + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.set_qos(qos)) + + qos2 = fastdds.SubscriberQos() + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.get_qos(qos2)) + + assert(2 == len(qos.partition())) + assert('PartitionTest' == qos.partition()[0]) + assert('PartitionTest2' == qos.partition()[1]) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_get_set_listener(): + """ + This test checks: + - Publisher::get_listener + - Publisher::set_listener + - Publisher::get_status_mask + - StatusMask::operator == + - StatusMask::operator << + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + + # Overload 1 + listener = SubscriberListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.set_listener(listener)) + assert(subscriber.get_listener() == listener) + assert(fastdds.StatusMask.all() == subscriber.get_status_mask()) + + def test(status_mask_1, status_mask_2): + """ + Test the entity creation using the two types of StatusMasks. + """ + listener = SubscriberListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.set_listener(listener, status_mask_1)) + assert(subscriber.get_listener() == listener) + assert(status_mask_1 == subscriber.get_status_mask()) + listener = SubscriberListener() + assert(listener is not None) + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.set_listener(listener, status_mask_2)) + assert(subscriber.get_listener() == listener) + assert(status_mask_2 == subscriber.get_status_mask()) + + # Overload 2: Different status masks + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.all(), fastdds.StatusMask_all()) + test(fastdds.StatusMask.none(), fastdds.StatusMask_none()) + test(fastdds.StatusMask.data_available(), + fastdds.StatusMask_data_available()) + test(fastdds.StatusMask.data_on_readers(), + fastdds.StatusMask_data_on_readers()) + test(fastdds.StatusMask.inconsistent_topic(), + fastdds.StatusMask_inconsistent_topic()) + test(fastdds.StatusMask.liveliness_changed(), + fastdds.StatusMask_liveliness_changed()) + test(fastdds.StatusMask.liveliness_lost(), + fastdds.StatusMask_liveliness_lost()) + test(fastdds.StatusMask.offered_deadline_missed(), + fastdds.StatusMask_offered_deadline_missed()) + test(fastdds.StatusMask.offered_incompatible_qos(), + fastdds.StatusMask_offered_incompatible_qos()) + test(fastdds.StatusMask.publication_matched(), + fastdds.StatusMask_publication_matched()) + test(fastdds.StatusMask.requested_deadline_missed(), + fastdds.StatusMask_requested_deadline_missed()) + test(fastdds.StatusMask.requested_incompatible_qos(), + fastdds.StatusMask_requested_incompatible_qos()) + test(fastdds.StatusMask.sample_lost(), + fastdds.StatusMask_sample_lost()) + test(fastdds.StatusMask.sample_rejected(), + fastdds.StatusMask_sample_rejected()) + test(fastdds.StatusMask.subscription_matched(), + fastdds.StatusMask_subscription_matched()) + + m = fastdds.StatusMask_data_available() << \ + fastdds.StatusMask_data_on_readers() << \ + fastdds.StatusMask_inconsistent_topic() << \ + fastdds.StatusMask_liveliness_changed() << \ + fastdds.StatusMask_liveliness_lost() << \ + fastdds.StatusMask_offered_deadline_missed() << \ + fastdds.StatusMask_offered_incompatible_qos() << \ + fastdds.StatusMask_publication_matched() << \ + fastdds.StatusMask_requested_deadline_missed() << \ + fastdds.StatusMask_requested_incompatible_qos() << \ + fastdds.StatusMask_sample_lost() << \ + fastdds.StatusMask_sample_rejected() << \ + fastdds.StatusMask_subscription_matched() + + test(fastdds.StatusMask.data_available() << + fastdds.StatusMask.data_on_readers() << + fastdds.StatusMask.inconsistent_topic() << + fastdds.StatusMask.liveliness_changed() << + fastdds.StatusMask.liveliness_lost() << + fastdds.StatusMask.offered_deadline_missed() << + fastdds.StatusMask.offered_incompatible_qos() << + fastdds.StatusMask.publication_matched() << + fastdds.StatusMask.requested_deadline_missed() << + fastdds.StatusMask.requested_incompatible_qos() << + fastdds.StatusMask.sample_lost() << + fastdds.StatusMask.sample_rejected() << + fastdds.StatusMask.subscription_matched(), + m) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) + + +def test_lookup_datareader(): + """ + This test checks: + - subscriber::lookup_datareader + """ + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + # Overload 1 - Success + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datareader = subscriber.create_datareader( + topic, fastdds.DATAREADER_QOS_DEFAULT) + assert(datareader is not None) + + datareader2 = subscriber.lookup_datareader('Complete') + assert(datareader2 is not None) + assert(datareader == datareader2) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) diff --git a/fastdds_python/test/api/test_waitset.py b/fastdds_python/test/api/test_waitset.py new file mode 100644 index 00000000..57863334 --- /dev/null +++ b/fastdds_python/test/api/test_waitset.py @@ -0,0 +1,90 @@ +import fastdds +import test_complete + + +def test_waitset(): + factory = fastdds.DomainParticipantFactory.get_instance() + assert(factory is not None) + participant = factory.create_participant( + 0, fastdds.PARTICIPANT_QOS_DEFAULT) + assert(participant is not None) + publisher = participant.create_publisher(fastdds.PUBLISHER_QOS_DEFAULT) + assert(publisher is not None) + subscriber = participant.create_subscriber(fastdds.SUBSCRIBER_QOS_DEFAULT) + assert(subscriber is not None) + test_type = fastdds.TypeSupport(test_complete.CompleteTestTypePubSubType()) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.register_type(test_type, test_type.get_type_name())) + topic = participant.create_topic( + "Complete", "CompleteTestType", fastdds.TOPIC_QOS_DEFAULT) + assert(topic is not None) + datawriter_qos = fastdds.DataWriterQos() + datawriter_qos.reliability().kind = fastdds.BEST_EFFORT_RELIABILITY_QOS + datawriter = publisher.create_datawriter(topic, datawriter_qos) + assert(datawriter is not None) + datareader_qos = fastdds.DataReaderQos() + datareader_qos.reliability().kind = fastdds.RELIABLE_RELIABILITY_QOS + datareader = subscriber.create_datareader(topic, datareader_qos) + assert(datareader is not None) + + status_cond = datareader.get_statuscondition() + guard_cond = fastdds.GuardCondition() + waitset = fastdds.WaitSet() + attached_conds = fastdds.ConditionSeq() + conds = fastdds.ConditionSeq() + + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.attach_condition(status_cond)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.attach_condition(guard_cond)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.get_conditions(attached_conds)) + assert(2 == len(attached_conds)) + for c in attached_conds: + if ('StatusCondition' == str(c)): + try: + attached_status_cond = c.to_guard_condition() + assert(False) + except TypeError: + pass + attached_status_cond = c.to_status_condition() + assert(status_cond == attached_status_cond) + elif ('GuardCondition' == str(c)): + try: + attached_guard_cond = c.to_status_condition() + assert(False) + except TypeError: + pass + attached_guard_cond = c.to_guard_condition() + assert(guard_cond == attached_guard_cond) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.wait(conds, fastdds.Duration_t(1, 0))) + + assert(1 == len(conds)) + assert('StatusCondition' == str(conds[0])) + attached_status_cond = conds[0].to_status_condition() + assert(attached_status_cond is not None) + entity = attached_status_cond.get_entity() + assert(entity is not None) + changed_statuses = entity.get_status_changes() + assert(changed_statuses.is_active( + fastdds.StatusMask.requested_incompatible_qos())) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.detach_condition(status_cond)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + waitset.detach_condition(guard_cond)) + + assert(fastdds.ReturnCode_t.RETCODE_OK == + subscriber.delete_datareader(datareader)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + publisher.delete_datawriter(datawriter)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_topic(topic)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_publisher(publisher)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + participant.delete_subscriber(subscriber)) + assert(fastdds.ReturnCode_t.RETCODE_OK == + factory.delete_participant(participant)) diff --git a/fastdds_python/test/types/CMakeLists.txt b/fastdds_python/test/types/CMakeLists.txt new file mode 100644 index 00000000..872ccd6a --- /dev/null +++ b/fastdds_python/test/types/CMakeLists.txt @@ -0,0 +1,116 @@ + +# Using minimum CMake version 3.13 to prevent issues with the SWIG include +# directories propagation happening with CMake 3.12 and prior + +cmake_minimum_required(VERSION 3.13) + +# SWIG: use standard target name. +if(POLICY CMP0078) + cmake_policy(SET CMP0078 NEW) +endif() + +# SWIG: use SWIG_MODULE_NAME property. +if(POLICY CMP0086) + cmake_policy(SET CMP0086 NEW) +endif() + +############################################################################### +# Library for types defined in test_complete IDL +############################################################################### + +message(STATUS "Configuring python wrapper for types in test_complete...") + +############################################################################### +# Type library on C++ + +project(test_complete) + +find_package(fastcdr REQUIRED) +find_package(fastrtps REQUIRED) + + +set(${PROJECT_NAME}_FILES + test_complete.cxx + test_completePubSubTypes.cxx + ) + +include_directories() + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +#Create library for C++ types +add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_FILES}) +if(WIN32) + target_compile_definitions(${PROJECT_NAME} PRIVATE EPROSIMA_USER_DLL_EXPORT) +endif(WIN32) +target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr fastrtps) + +############################################################################### +# Python bindings for type + +find_package(SWIG REQUIRED) +include(${SWIG_USE_FILE}) +set(CMAKE_SWIG_FLAGS "") + +find_package(Python3 COMPONENTS Interpreter Development REQUIRED) +set(PYTHON_INCLUDE_PATH ${Python3_INCLUDE_DIRS}) +set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) +set(PYTHON_LIBRARIES ${Python3_LIBRARIES}) + +include_directories(${PYTHON_INCLUDE_PATH}) + +set(${PROJECT_NAME}_MODULE + test_completeWrapper + ) + +set(${PROJECT_NAME}_MODULE_FILES + ${PROJECT_NAME}.i + ) + +SET_SOURCE_FILES_PROPERTIES( + ${${PROJECT_NAME}_MODULE_FILES} + PROPERTIES CPLUSPLUS ON + USE_TARGET_INCLUDE_DIRECTORIES TRUE + ) + +include_directories( + ${PROJECT_SOURCE_DIR} + ) + +SWIG_ADD_LIBRARY(${${PROJECT_NAME}_MODULE} + TYPE SHARED + LANGUAGE python + SOURCES ${${PROJECT_NAME}_MODULE_FILES}) + +if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8) + set_property(TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64) +endif() + +SWIG_LINK_LIBRARIES(${${PROJECT_NAME}_MODULE} + ${PYTHON_LIBRARIES} + fastrtps + ${PROJECT_NAME} + ) + +# Find the installation path +execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}'))" + OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) +file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) +SET (PYTHON_MODULE_PATH + ${_REL_PYTHON_MODULE_PATH} + ) + +# Install +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin/ + LIBRARY DESTINATION lib/ + ARCHIVE DESTINATION lib/ + ) +install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}) +get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) +install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}) + diff --git a/fastdds_python/test/types/test_complete.cxx b/fastdds_python/test/types/test_complete.cxx new file mode 100644 index 00000000..91debcd5 --- /dev/null +++ b/fastdds_python/test/types/test_complete.cxx @@ -0,0 +1,7539 @@ +// 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 test_complete.cpp + * This source file contains the definition of the described types in the IDL file. + * + * This file was generated by the tool gen. + */ + +#ifdef _WIN32 +// Remove linker warning LNK4221 on Visual Studio +namespace { +char dummy; +} // namespace +#endif // _WIN32 + +#include "test_complete.h" +#include + +#include +using namespace eprosima::fastcdr::exception; + +#include + + + +StructType::StructType() +{ + // m_char_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@46daef40 + m_char_field = 0; + // m_uint8_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@12f41634 + m_uint8_field = 0; + // m_int16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@262b2c86 + m_int16_field = 0; + // m_uint16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@371a67ec + m_uint16_field = 0; + // m_int32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5ed828d + m_int32_field = 0; + // m_uint32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@7a3d45bd + m_uint32_field = 0; + // m_int64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1e7c7811 + m_int64_field = 0; + // m_uint64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@77ec78b9 + m_uint64_field = 0; + // m_float_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1a3869f4 + m_float_field = 0.0; + // m_double_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@a38d7a3 + m_double_field = 0.0; + // m_bool_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@77f99a05 + m_bool_field = false; + // m_string_field com.eprosima.idl.parser.typecode.StringTypeCode@63440df3 + m_string_field =""; + // m_enum_field com.eprosima.idl.parser.typecode.EnumTypeCode@3aeaafa6 + m_enum_field = ::RED; + // m_enum2_field com.eprosima.idl.parser.typecode.EnumTypeCode@76a3e297 + m_enum2_field = ::WOOD; + +} + +StructType::~StructType() +{ + + + + + + + + + + + + + + +} + +StructType::StructType( + const StructType& x) +{ + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; +} + +StructType::StructType( + StructType&& x) +{ + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; +} + +StructType& StructType::operator =( + const StructType& x) +{ + + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + + return *this; +} + +StructType& StructType::operator =( + StructType&& x) +{ + + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + + return *this; +} + +bool StructType::operator ==( + const StructType& x) const +{ + + return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field); +} + +bool StructType::operator !=( + const StructType& x) const +{ + return !(*this == x); +} + +size_t StructType::getMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t initial_alignment = current_alignment; + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + return current_alignment - initial_alignment; +} + +size_t StructType::getCdrSerializedSize( + const StructType& data, + size_t current_alignment) +{ + (void)data; + size_t initial_alignment = current_alignment; + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + return current_alignment - initial_alignment; +} + +void StructType::serialize( + eprosima::fastcdr::Cdr& scdr) const +{ + + scdr << m_char_field; + scdr << m_uint8_field; + scdr << m_int16_field; + scdr << m_uint16_field; + scdr << m_int32_field; + scdr << m_uint32_field; + scdr << m_int64_field; + scdr << m_uint64_field; + scdr << m_float_field; + scdr << m_double_field; + scdr << m_bool_field; + scdr << m_string_field; + scdr << (uint32_t)m_enum_field; + scdr << (uint32_t)m_enum2_field; + +} + +void StructType::deserialize( + eprosima::fastcdr::Cdr& dcdr) +{ + + dcdr >> m_char_field; + dcdr >> m_uint8_field; + dcdr >> m_int16_field; + dcdr >> m_uint16_field; + dcdr >> m_int32_field; + dcdr >> m_uint32_field; + dcdr >> m_int64_field; + dcdr >> m_uint64_field; + dcdr >> m_float_field; + dcdr >> m_double_field; + dcdr >> m_bool_field; + dcdr >> m_string_field; + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum_field = (Color)enum_value; + } + + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum2_field = (Material)enum_value; + } + +} + +/*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ +void StructType::char_field( + char _char_field) +{ + m_char_field = _char_field; +} + +/*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ +char StructType::char_field() const +{ + return m_char_field; +} + +/*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ +char& StructType::char_field() +{ + return m_char_field; +} + +/*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ +void StructType::uint8_field( + uint8_t _uint8_field) +{ + m_uint8_field = _uint8_field; +} + +/*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ +uint8_t StructType::uint8_field() const +{ + return m_uint8_field; +} + +/*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ +uint8_t& StructType::uint8_field() +{ + return m_uint8_field; +} + +/*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ +void StructType::int16_field( + int16_t _int16_field) +{ + m_int16_field = _int16_field; +} + +/*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ +int16_t StructType::int16_field() const +{ + return m_int16_field; +} + +/*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ +int16_t& StructType::int16_field() +{ + return m_int16_field; +} + +/*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ +void StructType::uint16_field( + uint16_t _uint16_field) +{ + m_uint16_field = _uint16_field; +} + +/*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ +uint16_t StructType::uint16_field() const +{ + return m_uint16_field; +} + +/*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ +uint16_t& StructType::uint16_field() +{ + return m_uint16_field; +} + +/*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ +void StructType::int32_field( + int32_t _int32_field) +{ + m_int32_field = _int32_field; +} + +/*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ +int32_t StructType::int32_field() const +{ + return m_int32_field; +} + +/*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ +int32_t& StructType::int32_field() +{ + return m_int32_field; +} + +/*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ +void StructType::uint32_field( + uint32_t _uint32_field) +{ + m_uint32_field = _uint32_field; +} + +/*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ +uint32_t StructType::uint32_field() const +{ + return m_uint32_field; +} + +/*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ +uint32_t& StructType::uint32_field() +{ + return m_uint32_field; +} + +/*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ +void StructType::int64_field( + int64_t _int64_field) +{ + m_int64_field = _int64_field; +} + +/*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ +int64_t StructType::int64_field() const +{ + return m_int64_field; +} + +/*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ +int64_t& StructType::int64_field() +{ + return m_int64_field; +} + +/*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ +void StructType::uint64_field( + uint64_t _uint64_field) +{ + m_uint64_field = _uint64_field; +} + +/*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ +uint64_t StructType::uint64_field() const +{ + return m_uint64_field; +} + +/*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ +uint64_t& StructType::uint64_field() +{ + return m_uint64_field; +} + +/*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ +void StructType::float_field( + float _float_field) +{ + m_float_field = _float_field; +} + +/*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ +float StructType::float_field() const +{ + return m_float_field; +} + +/*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ +float& StructType::float_field() +{ + return m_float_field; +} + +/*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ +void StructType::double_field( + double _double_field) +{ + m_double_field = _double_field; +} + +/*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ +double StructType::double_field() const +{ + return m_double_field; +} + +/*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ +double& StructType::double_field() +{ + return m_double_field; +} + +/*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ +void StructType::bool_field( + bool _bool_field) +{ + m_bool_field = _bool_field; +} + +/*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ +bool StructType::bool_field() const +{ + return m_bool_field; +} + +/*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ +bool& StructType::bool_field() +{ + return m_bool_field; +} + +/*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ +void StructType::string_field( + const std::string& _string_field) +{ + m_string_field = _string_field; +} + +/*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ +void StructType::string_field( + std::string&& _string_field) +{ + m_string_field = std::move(_string_field); +} + +/*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ +const std::string& StructType::string_field() const +{ + return m_string_field; +} + +/*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ +std::string& StructType::string_field() +{ + return m_string_field; +} +/*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ +void StructType::enum_field( + Color _enum_field) +{ + m_enum_field = _enum_field; +} + +/*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ +Color StructType::enum_field() const +{ + return m_enum_field; +} + +/*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ +Color& StructType::enum_field() +{ + return m_enum_field; +} + +/*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ +void StructType::enum2_field( + Material _enum2_field) +{ + m_enum2_field = _enum2_field; +} + +/*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ +Material StructType::enum2_field() const +{ + return m_enum2_field; +} + +/*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ +Material& StructType::enum2_field() +{ + return m_enum2_field; +} + + +size_t StructType::getKeyMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t current_align = current_alignment; + + + + + + + + + + + + + + + + + + return current_align; +} + +bool StructType::isKeyDefined() +{ + return false; +} + +void StructType::serializeKey( + eprosima::fastcdr::Cdr& scdr) const +{ + (void) scdr; + +} + + + +CompleteTestType::CompleteTestType() +{ + // m_char_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@fcd6521 + m_char_field = 0; + // m_uint8_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5c18298f + m_uint8_field = 0; + // m_int16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5579bb86 + m_int16_field = 0; + // m_uint16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5204062d + m_uint16_field = 0; + // m_int32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@4fcd19b3 + m_int32_field = 0; + // m_uint32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@2fd66ad3 + m_uint32_field = 0; + // m_int64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5d11346a + m_int64_field = 0; + // m_uint64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@7a36aefa + m_uint64_field = 0; + // m_float_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@17211155 + m_float_field = 0.0; + // m_double_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@b3d7190 + m_double_field = 0.0; + // m_bool_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5fdba6f9 + m_bool_field = false; + // m_string_field com.eprosima.idl.parser.typecode.StringTypeCode@10d59286 + m_string_field =""; + // m_enum_field com.eprosima.idl.parser.typecode.EnumTypeCode@3aeaafa6 + m_enum_field = ::RED; + // m_enum2_field com.eprosima.idl.parser.typecode.EnumTypeCode@76a3e297 + m_enum2_field = ::WOOD; + // m_struct_field com.eprosima.fastdds.idl.parser.typecode.StructTypeCode@fe18270 + + // m_array_char_field com.eprosima.idl.parser.typecode.ArrayTypeCode@6fb0d3ed + memset(&m_array_char_field, 0, (max_array_size) * 1); + // m_array_uint8_field com.eprosima.idl.parser.typecode.ArrayTypeCode@6dde5c8c + memset(&m_array_uint8_field, 0, (max_array_size) * 1); + // m_array_int16_field com.eprosima.idl.parser.typecode.ArrayTypeCode@52525845 + memset(&m_array_int16_field, 0, (max_array_size) * 2); + // m_array_uint16_field com.eprosima.idl.parser.typecode.ArrayTypeCode@3b94d659 + memset(&m_array_uint16_field, 0, (max_array_size) * 2); + // m_array_int32_field com.eprosima.idl.parser.typecode.ArrayTypeCode@24b1d79b + memset(&m_array_int32_field, 0, (max_array_size) * 4); + // m_array_uint32_field com.eprosima.idl.parser.typecode.ArrayTypeCode@68ceda24 + memset(&m_array_uint32_field, 0, (max_array_size) * 4); + // m_array_int64_field com.eprosima.idl.parser.typecode.ArrayTypeCode@281e3708 + memset(&m_array_int64_field, 0, (max_array_size) * 8); + // m_array_uint64_field com.eprosima.idl.parser.typecode.ArrayTypeCode@35a50a4c + memset(&m_array_uint64_field, 0, (max_array_size) * 8); + // m_array_float_field com.eprosima.idl.parser.typecode.ArrayTypeCode@1f021e6c + memset(&m_array_float_field, 0, (max_array_size) * 4); + // m_array_double_field com.eprosima.idl.parser.typecode.ArrayTypeCode@103f852 + memset(&m_array_double_field, 0, (max_array_size) * 8); + // m_array_bool_field com.eprosima.idl.parser.typecode.ArrayTypeCode@587c290d + memset(&m_array_bool_field, 0, (max_array_size) * 1); + // m_array_enum_field com.eprosima.idl.parser.typecode.ArrayTypeCode@4516af24 + memset(&m_array_enum_field, 0, (max_array_size) * 4); + // m_array_enum2_field com.eprosima.idl.parser.typecode.ArrayTypeCode@4ae82894 + memset(&m_array_enum2_field, 0, (max_array_size) * 4); + // m_array_struct_field com.eprosima.idl.parser.typecode.ArrayTypeCode@543788f3 + + // m_bounded_sequence_char_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1da51a35 + + // m_bounded_sequence_uint8_field com.eprosima.idl.parser.typecode.SequenceTypeCode@16022d9d + + // m_bounded_sequence_int16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@7e9a5fbe + + // m_bounded_sequence_uint16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@44a3ec6b + + // m_bounded_sequence_int32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@71623278 + + // m_bounded_sequence_uint32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@768b970c + + // m_bounded_sequence_int64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@5a4041cc + + // m_bounded_sequence_uint64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@15b3e5b + + // m_bounded_sequence_float_field com.eprosima.idl.parser.typecode.SequenceTypeCode@61ca2dfa + + // m_bounded_sequence_double_field com.eprosima.idl.parser.typecode.SequenceTypeCode@4b53f538 + + // m_bounded_sequence_bool_field com.eprosima.idl.parser.typecode.SequenceTypeCode@134593bf + + // m_bounded_sequence_enum_field com.eprosima.idl.parser.typecode.SequenceTypeCode@4bb4de6a + + // m_bounded_sequence_enum2_field com.eprosima.idl.parser.typecode.SequenceTypeCode@7ba18f1b + + // m_bounded_sequence_struct_field com.eprosima.idl.parser.typecode.SequenceTypeCode@2f8f5f62 + + // m_unbounded_sequence_char_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1068e947 + + // m_unbounded_sequence_uint8_field com.eprosima.idl.parser.typecode.SequenceTypeCode@7dc222ae + + // m_unbounded_sequence_int16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@aecb35a + + // m_unbounded_sequence_uint16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@5fcd892a + + // m_unbounded_sequence_int32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@8b87145 + + // m_unbounded_sequence_uint32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@6483f5ae + + // m_unbounded_sequence_int64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@b9afc07 + + // m_unbounded_sequence_uint64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@382db087 + + // m_unbounded_sequence_float_field com.eprosima.idl.parser.typecode.SequenceTypeCode@73d4cc9e + + // m_unbounded_sequence_double_field com.eprosima.idl.parser.typecode.SequenceTypeCode@80169cf + + // m_unbounded_sequence_bool_field com.eprosima.idl.parser.typecode.SequenceTypeCode@5427c60c + + // m_unbounded_sequence_enum_field com.eprosima.idl.parser.typecode.SequenceTypeCode@15bfd87 + + // m_unbounded_sequence_enum2_field com.eprosima.idl.parser.typecode.SequenceTypeCode@543e710e + + // m_unbounded_sequence_struct_field com.eprosima.idl.parser.typecode.SequenceTypeCode@57f23557 + + +} + +CompleteTestType::~CompleteTestType() +{ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +CompleteTestType::CompleteTestType( + const CompleteTestType& x) +{ + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; +} + +CompleteTestType::CompleteTestType( + CompleteTestType&& x) +{ + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); +} + +CompleteTestType& CompleteTestType::operator =( + const CompleteTestType& x) +{ + + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; + + return *this; +} + +CompleteTestType& CompleteTestType::operator =( + CompleteTestType&& x) +{ + + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); + + return *this; +} + +bool CompleteTestType::operator ==( + const CompleteTestType& x) const +{ + + return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); +} + +bool CompleteTestType::operator !=( + const CompleteTestType& x) const +{ + return !(*this == x); +} + +size_t CompleteTestType::getMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t initial_alignment = current_alignment; + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment); + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + for(size_t a = 0; a < (max_array_size); ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < max_seq_size; ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < 100; ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + + + return current_alignment - initial_alignment; +} + +size_t CompleteTestType::getCdrSerializedSize( + const CompleteTestType& data, + size_t current_alignment) +{ + (void)data; + size_t initial_alignment = current_alignment; + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += StructType::getCdrSerializedSize(data.struct_field(), current_alignment); + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + for(size_t a = 0; a < data.array_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); + } + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_char_field().size() > 0) + { + current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint8_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int16_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint16_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int32_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint32_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int64_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint64_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_float_field().size() > 0) + { + current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_double_field().size() > 0) + { + current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_bool_field().size() > 0) + { + current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_enum_field().size() > 0) + { + current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_enum2_field().size() > 0) + { + current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_char_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint8_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int16_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint16_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int32_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint32_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int64_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint64_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_float_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_double_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_bool_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_enum_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_enum2_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} + + + return current_alignment - initial_alignment; +} + +void CompleteTestType::serialize( + eprosima::fastcdr::Cdr& scdr) const +{ + + scdr << m_char_field; + scdr << m_uint8_field; + scdr << m_int16_field; + scdr << m_uint16_field; + scdr << m_int32_field; + scdr << m_uint32_field; + scdr << m_int64_field; + scdr << m_uint64_field; + scdr << m_float_field; + scdr << m_double_field; + scdr << m_bool_field; + scdr << m_string_field; + scdr << (uint32_t)m_enum_field; + scdr << (uint32_t)m_enum2_field; + scdr << m_struct_field; + scdr << m_array_char_field; + + scdr << m_array_uint8_field; + + scdr << m_array_int16_field; + + scdr << m_array_uint16_field; + + scdr << m_array_int32_field; + + scdr << m_array_uint32_field; + + scdr << m_array_int64_field; + + scdr << m_array_uint64_field; + + scdr << m_array_float_field; + + scdr << m_array_double_field; + + scdr << m_array_bool_field; + + scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); + + + scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); + + + scdr << m_array_struct_field; + + scdr << m_bounded_sequence_char_field; + scdr << m_bounded_sequence_uint8_field; + scdr << m_bounded_sequence_int16_field; + scdr << m_bounded_sequence_uint16_field; + scdr << m_bounded_sequence_int32_field; + scdr << m_bounded_sequence_uint32_field; + scdr << m_bounded_sequence_int64_field; + scdr << m_bounded_sequence_uint64_field; + scdr << m_bounded_sequence_float_field; + scdr << m_bounded_sequence_double_field; + scdr << m_bounded_sequence_bool_field; + scdr << static_cast(m_bounded_sequence_enum_field.size()); + scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); + + scdr << static_cast(m_bounded_sequence_enum2_field.size()); + scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); + + scdr << m_bounded_sequence_struct_field; + scdr << m_unbounded_sequence_char_field; + scdr << m_unbounded_sequence_uint8_field; + scdr << m_unbounded_sequence_int16_field; + scdr << m_unbounded_sequence_uint16_field; + scdr << m_unbounded_sequence_int32_field; + scdr << m_unbounded_sequence_uint32_field; + scdr << m_unbounded_sequence_int64_field; + scdr << m_unbounded_sequence_uint64_field; + scdr << m_unbounded_sequence_float_field; + scdr << m_unbounded_sequence_double_field; + scdr << m_unbounded_sequence_bool_field; + scdr << static_cast(m_unbounded_sequence_enum_field.size()); + scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); + + scdr << static_cast(m_unbounded_sequence_enum2_field.size()); + scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); + + scdr << m_unbounded_sequence_struct_field; + +} + +void CompleteTestType::deserialize( + eprosima::fastcdr::Cdr& dcdr) +{ + + dcdr >> m_char_field; + dcdr >> m_uint8_field; + dcdr >> m_int16_field; + dcdr >> m_uint16_field; + dcdr >> m_int32_field; + dcdr >> m_uint32_field; + dcdr >> m_int64_field; + dcdr >> m_uint64_field; + dcdr >> m_float_field; + dcdr >> m_double_field; + dcdr >> m_bool_field; + dcdr >> m_string_field; + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum_field = (Color)enum_value; + } + + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum2_field = (Material)enum_value; + } + + dcdr >> m_struct_field; + dcdr >> m_array_char_field; + + dcdr >> m_array_uint8_field; + + dcdr >> m_array_int16_field; + + dcdr >> m_array_uint16_field; + + dcdr >> m_array_int32_field; + + dcdr >> m_array_uint32_field; + + dcdr >> m_array_int64_field; + + dcdr >> m_array_uint64_field; + + dcdr >> m_array_float_field; + + dcdr >> m_array_double_field; + + dcdr >> m_array_bool_field; + + dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); + + + dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); + + + dcdr >> m_array_struct_field; + + dcdr >> m_bounded_sequence_char_field; + dcdr >> m_bounded_sequence_uint8_field; + dcdr >> m_bounded_sequence_int16_field; + dcdr >> m_bounded_sequence_uint16_field; + dcdr >> m_bounded_sequence_int32_field; + dcdr >> m_bounded_sequence_uint32_field; + dcdr >> m_bounded_sequence_int64_field; + dcdr >> m_bounded_sequence_uint64_field; + dcdr >> m_bounded_sequence_float_field; + dcdr >> m_bounded_sequence_double_field; + dcdr >> m_bounded_sequence_bool_field; + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_bounded_sequence_enum_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); + } + + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_bounded_sequence_enum2_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); + } + + dcdr >> m_bounded_sequence_struct_field; + dcdr >> m_unbounded_sequence_char_field; + dcdr >> m_unbounded_sequence_uint8_field; + dcdr >> m_unbounded_sequence_int16_field; + dcdr >> m_unbounded_sequence_uint16_field; + dcdr >> m_unbounded_sequence_int32_field; + dcdr >> m_unbounded_sequence_uint32_field; + dcdr >> m_unbounded_sequence_int64_field; + dcdr >> m_unbounded_sequence_uint64_field; + dcdr >> m_unbounded_sequence_float_field; + dcdr >> m_unbounded_sequence_double_field; + dcdr >> m_unbounded_sequence_bool_field; + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_unbounded_sequence_enum_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); + } + + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_unbounded_sequence_enum2_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); + } + + dcdr >> m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ +void CompleteTestType::char_field( + char _char_field) +{ + m_char_field = _char_field; +} + +/*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ +char CompleteTestType::char_field() const +{ + return m_char_field; +} + +/*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ +char& CompleteTestType::char_field() +{ + return m_char_field; +} + +/*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ +void CompleteTestType::uint8_field( + uint8_t _uint8_field) +{ + m_uint8_field = _uint8_field; +} + +/*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ +uint8_t CompleteTestType::uint8_field() const +{ + return m_uint8_field; +} + +/*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ +uint8_t& CompleteTestType::uint8_field() +{ + return m_uint8_field; +} + +/*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ +void CompleteTestType::int16_field( + int16_t _int16_field) +{ + m_int16_field = _int16_field; +} + +/*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ +int16_t CompleteTestType::int16_field() const +{ + return m_int16_field; +} + +/*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ +int16_t& CompleteTestType::int16_field() +{ + return m_int16_field; +} + +/*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ +void CompleteTestType::uint16_field( + uint16_t _uint16_field) +{ + m_uint16_field = _uint16_field; +} + +/*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ +uint16_t CompleteTestType::uint16_field() const +{ + return m_uint16_field; +} + +/*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ +uint16_t& CompleteTestType::uint16_field() +{ + return m_uint16_field; +} + +/*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ +void CompleteTestType::int32_field( + int32_t _int32_field) +{ + m_int32_field = _int32_field; +} + +/*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ +int32_t CompleteTestType::int32_field() const +{ + return m_int32_field; +} + +/*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ +int32_t& CompleteTestType::int32_field() +{ + return m_int32_field; +} + +/*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ +void CompleteTestType::uint32_field( + uint32_t _uint32_field) +{ + m_uint32_field = _uint32_field; +} + +/*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ +uint32_t CompleteTestType::uint32_field() const +{ + return m_uint32_field; +} + +/*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ +uint32_t& CompleteTestType::uint32_field() +{ + return m_uint32_field; +} + +/*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ +void CompleteTestType::int64_field( + int64_t _int64_field) +{ + m_int64_field = _int64_field; +} + +/*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ +int64_t CompleteTestType::int64_field() const +{ + return m_int64_field; +} + +/*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ +int64_t& CompleteTestType::int64_field() +{ + return m_int64_field; +} + +/*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ +void CompleteTestType::uint64_field( + uint64_t _uint64_field) +{ + m_uint64_field = _uint64_field; +} + +/*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ +uint64_t CompleteTestType::uint64_field() const +{ + return m_uint64_field; +} + +/*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ +uint64_t& CompleteTestType::uint64_field() +{ + return m_uint64_field; +} + +/*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ +void CompleteTestType::float_field( + float _float_field) +{ + m_float_field = _float_field; +} + +/*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ +float CompleteTestType::float_field() const +{ + return m_float_field; +} + +/*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ +float& CompleteTestType::float_field() +{ + return m_float_field; +} + +/*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ +void CompleteTestType::double_field( + double _double_field) +{ + m_double_field = _double_field; +} + +/*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ +double CompleteTestType::double_field() const +{ + return m_double_field; +} + +/*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ +double& CompleteTestType::double_field() +{ + return m_double_field; +} + +/*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ +void CompleteTestType::bool_field( + bool _bool_field) +{ + m_bool_field = _bool_field; +} + +/*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ +bool CompleteTestType::bool_field() const +{ + return m_bool_field; +} + +/*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ +bool& CompleteTestType::bool_field() +{ + return m_bool_field; +} + +/*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ +void CompleteTestType::string_field( + const std::string& _string_field) +{ + m_string_field = _string_field; +} + +/*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ +void CompleteTestType::string_field( + std::string&& _string_field) +{ + m_string_field = std::move(_string_field); +} + +/*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ +const std::string& CompleteTestType::string_field() const +{ + return m_string_field; +} + +/*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ +std::string& CompleteTestType::string_field() +{ + return m_string_field; +} +/*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ +void CompleteTestType::enum_field( + Color _enum_field) +{ + m_enum_field = _enum_field; +} + +/*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ +Color CompleteTestType::enum_field() const +{ + return m_enum_field; +} + +/*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ +Color& CompleteTestType::enum_field() +{ + return m_enum_field; +} + +/*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ +void CompleteTestType::enum2_field( + Material _enum2_field) +{ + m_enum2_field = _enum2_field; +} + +/*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ +Material CompleteTestType::enum2_field() const +{ + return m_enum2_field; +} + +/*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ +Material& CompleteTestType::enum2_field() +{ + return m_enum2_field; +} + +/*! + * @brief This function copies the value in member struct_field + * @param _struct_field New value to be copied in member struct_field + */ +void CompleteTestType::struct_field( + const StructType& _struct_field) +{ + m_struct_field = _struct_field; +} + +/*! + * @brief This function moves the value in member struct_field + * @param _struct_field New value to be moved in member struct_field + */ +void CompleteTestType::struct_field( + StructType&& _struct_field) +{ + m_struct_field = std::move(_struct_field); +} + +/*! + * @brief This function returns a constant reference to member struct_field + * @return Constant reference to member struct_field + */ +const StructType& CompleteTestType::struct_field() const +{ + return m_struct_field; +} + +/*! + * @brief This function returns a reference to member struct_field + * @return Reference to member struct_field + */ +StructType& CompleteTestType::struct_field() +{ + return m_struct_field; +} +/*! + * @brief This function copies the value in member array_char_field + * @param _array_char_field New value to be copied in member array_char_field + */ +void CompleteTestType::array_char_field( + const std::array& _array_char_field) +{ + m_array_char_field = _array_char_field; +} + +/*! + * @brief This function moves the value in member array_char_field + * @param _array_char_field New value to be moved in member array_char_field + */ +void CompleteTestType::array_char_field( + std::array&& _array_char_field) +{ + m_array_char_field = std::move(_array_char_field); +} + +/*! + * @brief This function returns a constant reference to member array_char_field + * @return Constant reference to member array_char_field + */ +const std::array& CompleteTestType::array_char_field() const +{ + return m_array_char_field; +} + +/*! + * @brief This function returns a reference to member array_char_field + * @return Reference to member array_char_field + */ +std::array& CompleteTestType::array_char_field() +{ + return m_array_char_field; +} +/*! + * @brief This function copies the value in member array_uint8_field + * @param _array_uint8_field New value to be copied in member array_uint8_field + */ +void CompleteTestType::array_uint8_field( + const std::array& _array_uint8_field) +{ + m_array_uint8_field = _array_uint8_field; +} + +/*! + * @brief This function moves the value in member array_uint8_field + * @param _array_uint8_field New value to be moved in member array_uint8_field + */ +void CompleteTestType::array_uint8_field( + std::array&& _array_uint8_field) +{ + m_array_uint8_field = std::move(_array_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint8_field + * @return Constant reference to member array_uint8_field + */ +const std::array& CompleteTestType::array_uint8_field() const +{ + return m_array_uint8_field; +} + +/*! + * @brief This function returns a reference to member array_uint8_field + * @return Reference to member array_uint8_field + */ +std::array& CompleteTestType::array_uint8_field() +{ + return m_array_uint8_field; +} +/*! + * @brief This function copies the value in member array_int16_field + * @param _array_int16_field New value to be copied in member array_int16_field + */ +void CompleteTestType::array_int16_field( + const std::array& _array_int16_field) +{ + m_array_int16_field = _array_int16_field; +} + +/*! + * @brief This function moves the value in member array_int16_field + * @param _array_int16_field New value to be moved in member array_int16_field + */ +void CompleteTestType::array_int16_field( + std::array&& _array_int16_field) +{ + m_array_int16_field = std::move(_array_int16_field); +} + +/*! + * @brief This function returns a constant reference to member array_int16_field + * @return Constant reference to member array_int16_field + */ +const std::array& CompleteTestType::array_int16_field() const +{ + return m_array_int16_field; +} + +/*! + * @brief This function returns a reference to member array_int16_field + * @return Reference to member array_int16_field + */ +std::array& CompleteTestType::array_int16_field() +{ + return m_array_int16_field; +} +/*! + * @brief This function copies the value in member array_uint16_field + * @param _array_uint16_field New value to be copied in member array_uint16_field + */ +void CompleteTestType::array_uint16_field( + const std::array& _array_uint16_field) +{ + m_array_uint16_field = _array_uint16_field; +} + +/*! + * @brief This function moves the value in member array_uint16_field + * @param _array_uint16_field New value to be moved in member array_uint16_field + */ +void CompleteTestType::array_uint16_field( + std::array&& _array_uint16_field) +{ + m_array_uint16_field = std::move(_array_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint16_field + * @return Constant reference to member array_uint16_field + */ +const std::array& CompleteTestType::array_uint16_field() const +{ + return m_array_uint16_field; +} + +/*! + * @brief This function returns a reference to member array_uint16_field + * @return Reference to member array_uint16_field + */ +std::array& CompleteTestType::array_uint16_field() +{ + return m_array_uint16_field; +} +/*! + * @brief This function copies the value in member array_int32_field + * @param _array_int32_field New value to be copied in member array_int32_field + */ +void CompleteTestType::array_int32_field( + const std::array& _array_int32_field) +{ + m_array_int32_field = _array_int32_field; +} + +/*! + * @brief This function moves the value in member array_int32_field + * @param _array_int32_field New value to be moved in member array_int32_field + */ +void CompleteTestType::array_int32_field( + std::array&& _array_int32_field) +{ + m_array_int32_field = std::move(_array_int32_field); +} + +/*! + * @brief This function returns a constant reference to member array_int32_field + * @return Constant reference to member array_int32_field + */ +const std::array& CompleteTestType::array_int32_field() const +{ + return m_array_int32_field; +} + +/*! + * @brief This function returns a reference to member array_int32_field + * @return Reference to member array_int32_field + */ +std::array& CompleteTestType::array_int32_field() +{ + return m_array_int32_field; +} +/*! + * @brief This function copies the value in member array_uint32_field + * @param _array_uint32_field New value to be copied in member array_uint32_field + */ +void CompleteTestType::array_uint32_field( + const std::array& _array_uint32_field) +{ + m_array_uint32_field = _array_uint32_field; +} + +/*! + * @brief This function moves the value in member array_uint32_field + * @param _array_uint32_field New value to be moved in member array_uint32_field + */ +void CompleteTestType::array_uint32_field( + std::array&& _array_uint32_field) +{ + m_array_uint32_field = std::move(_array_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint32_field + * @return Constant reference to member array_uint32_field + */ +const std::array& CompleteTestType::array_uint32_field() const +{ + return m_array_uint32_field; +} + +/*! + * @brief This function returns a reference to member array_uint32_field + * @return Reference to member array_uint32_field + */ +std::array& CompleteTestType::array_uint32_field() +{ + return m_array_uint32_field; +} +/*! + * @brief This function copies the value in member array_int64_field + * @param _array_int64_field New value to be copied in member array_int64_field + */ +void CompleteTestType::array_int64_field( + const std::array& _array_int64_field) +{ + m_array_int64_field = _array_int64_field; +} + +/*! + * @brief This function moves the value in member array_int64_field + * @param _array_int64_field New value to be moved in member array_int64_field + */ +void CompleteTestType::array_int64_field( + std::array&& _array_int64_field) +{ + m_array_int64_field = std::move(_array_int64_field); +} + +/*! + * @brief This function returns a constant reference to member array_int64_field + * @return Constant reference to member array_int64_field + */ +const std::array& CompleteTestType::array_int64_field() const +{ + return m_array_int64_field; +} + +/*! + * @brief This function returns a reference to member array_int64_field + * @return Reference to member array_int64_field + */ +std::array& CompleteTestType::array_int64_field() +{ + return m_array_int64_field; +} +/*! + * @brief This function copies the value in member array_uint64_field + * @param _array_uint64_field New value to be copied in member array_uint64_field + */ +void CompleteTestType::array_uint64_field( + const std::array& _array_uint64_field) +{ + m_array_uint64_field = _array_uint64_field; +} + +/*! + * @brief This function moves the value in member array_uint64_field + * @param _array_uint64_field New value to be moved in member array_uint64_field + */ +void CompleteTestType::array_uint64_field( + std::array&& _array_uint64_field) +{ + m_array_uint64_field = std::move(_array_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint64_field + * @return Constant reference to member array_uint64_field + */ +const std::array& CompleteTestType::array_uint64_field() const +{ + return m_array_uint64_field; +} + +/*! + * @brief This function returns a reference to member array_uint64_field + * @return Reference to member array_uint64_field + */ +std::array& CompleteTestType::array_uint64_field() +{ + return m_array_uint64_field; +} +/*! + * @brief This function copies the value in member array_float_field + * @param _array_float_field New value to be copied in member array_float_field + */ +void CompleteTestType::array_float_field( + const std::array& _array_float_field) +{ + m_array_float_field = _array_float_field; +} + +/*! + * @brief This function moves the value in member array_float_field + * @param _array_float_field New value to be moved in member array_float_field + */ +void CompleteTestType::array_float_field( + std::array&& _array_float_field) +{ + m_array_float_field = std::move(_array_float_field); +} + +/*! + * @brief This function returns a constant reference to member array_float_field + * @return Constant reference to member array_float_field + */ +const std::array& CompleteTestType::array_float_field() const +{ + return m_array_float_field; +} + +/*! + * @brief This function returns a reference to member array_float_field + * @return Reference to member array_float_field + */ +std::array& CompleteTestType::array_float_field() +{ + return m_array_float_field; +} +/*! + * @brief This function copies the value in member array_double_field + * @param _array_double_field New value to be copied in member array_double_field + */ +void CompleteTestType::array_double_field( + const std::array& _array_double_field) +{ + m_array_double_field = _array_double_field; +} + +/*! + * @brief This function moves the value in member array_double_field + * @param _array_double_field New value to be moved in member array_double_field + */ +void CompleteTestType::array_double_field( + std::array&& _array_double_field) +{ + m_array_double_field = std::move(_array_double_field); +} + +/*! + * @brief This function returns a constant reference to member array_double_field + * @return Constant reference to member array_double_field + */ +const std::array& CompleteTestType::array_double_field() const +{ + return m_array_double_field; +} + +/*! + * @brief This function returns a reference to member array_double_field + * @return Reference to member array_double_field + */ +std::array& CompleteTestType::array_double_field() +{ + return m_array_double_field; +} +/*! + * @brief This function copies the value in member array_bool_field + * @param _array_bool_field New value to be copied in member array_bool_field + */ +void CompleteTestType::array_bool_field( + const std::array& _array_bool_field) +{ + m_array_bool_field = _array_bool_field; +} + +/*! + * @brief This function moves the value in member array_bool_field + * @param _array_bool_field New value to be moved in member array_bool_field + */ +void CompleteTestType::array_bool_field( + std::array&& _array_bool_field) +{ + m_array_bool_field = std::move(_array_bool_field); +} + +/*! + * @brief This function returns a constant reference to member array_bool_field + * @return Constant reference to member array_bool_field + */ +const std::array& CompleteTestType::array_bool_field() const +{ + return m_array_bool_field; +} + +/*! + * @brief This function returns a reference to member array_bool_field + * @return Reference to member array_bool_field + */ +std::array& CompleteTestType::array_bool_field() +{ + return m_array_bool_field; +} +/*! + * @brief This function copies the value in member array_enum_field + * @param _array_enum_field New value to be copied in member array_enum_field + */ +void CompleteTestType::array_enum_field( + const std::array& _array_enum_field) +{ + m_array_enum_field = _array_enum_field; +} + +/*! + * @brief This function moves the value in member array_enum_field + * @param _array_enum_field New value to be moved in member array_enum_field + */ +void CompleteTestType::array_enum_field( + std::array&& _array_enum_field) +{ + m_array_enum_field = std::move(_array_enum_field); +} + +/*! + * @brief This function returns a constant reference to member array_enum_field + * @return Constant reference to member array_enum_field + */ +const std::array& CompleteTestType::array_enum_field() const +{ + return m_array_enum_field; +} + +/*! + * @brief This function returns a reference to member array_enum_field + * @return Reference to member array_enum_field + */ +std::array& CompleteTestType::array_enum_field() +{ + return m_array_enum_field; +} +/*! + * @brief This function copies the value in member array_enum2_field + * @param _array_enum2_field New value to be copied in member array_enum2_field + */ +void CompleteTestType::array_enum2_field( + const std::array& _array_enum2_field) +{ + m_array_enum2_field = _array_enum2_field; +} + +/*! + * @brief This function moves the value in member array_enum2_field + * @param _array_enum2_field New value to be moved in member array_enum2_field + */ +void CompleteTestType::array_enum2_field( + std::array&& _array_enum2_field) +{ + m_array_enum2_field = std::move(_array_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member array_enum2_field + * @return Constant reference to member array_enum2_field + */ +const std::array& CompleteTestType::array_enum2_field() const +{ + return m_array_enum2_field; +} + +/*! + * @brief This function returns a reference to member array_enum2_field + * @return Reference to member array_enum2_field + */ +std::array& CompleteTestType::array_enum2_field() +{ + return m_array_enum2_field; +} +/*! + * @brief This function copies the value in member array_struct_field + * @param _array_struct_field New value to be copied in member array_struct_field + */ +void CompleteTestType::array_struct_field( + const std::array& _array_struct_field) +{ + m_array_struct_field = _array_struct_field; +} + +/*! + * @brief This function moves the value in member array_struct_field + * @param _array_struct_field New value to be moved in member array_struct_field + */ +void CompleteTestType::array_struct_field( + std::array&& _array_struct_field) +{ + m_array_struct_field = std::move(_array_struct_field); +} + +/*! + * @brief This function returns a constant reference to member array_struct_field + * @return Constant reference to member array_struct_field + */ +const std::array& CompleteTestType::array_struct_field() const +{ + return m_array_struct_field; +} + +/*! + * @brief This function returns a reference to member array_struct_field + * @return Reference to member array_struct_field + */ +std::array& CompleteTestType::array_struct_field() +{ + return m_array_struct_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field + */ +void CompleteTestType::bounded_sequence_char_field( + const std::vector& _bounded_sequence_char_field) +{ + m_bounded_sequence_char_field = _bounded_sequence_char_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field + */ +void CompleteTestType::bounded_sequence_char_field( + std::vector&& _bounded_sequence_char_field) +{ + m_bounded_sequence_char_field = std::move(_bounded_sequence_char_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_char_field + * @return Constant reference to member bounded_sequence_char_field + */ +const std::vector& CompleteTestType::bounded_sequence_char_field() const +{ + return m_bounded_sequence_char_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_char_field + * @return Reference to member bounded_sequence_char_field + */ +std::vector& CompleteTestType::bounded_sequence_char_field() +{ + return m_bounded_sequence_char_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field + */ +void CompleteTestType::bounded_sequence_uint8_field( + const std::vector& _bounded_sequence_uint8_field) +{ + m_bounded_sequence_uint8_field = _bounded_sequence_uint8_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field + */ +void CompleteTestType::bounded_sequence_uint8_field( + std::vector&& _bounded_sequence_uint8_field) +{ + m_bounded_sequence_uint8_field = std::move(_bounded_sequence_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint8_field + * @return Constant reference to member bounded_sequence_uint8_field + */ +const std::vector& CompleteTestType::bounded_sequence_uint8_field() const +{ + return m_bounded_sequence_uint8_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint8_field + * @return Reference to member bounded_sequence_uint8_field + */ +std::vector& CompleteTestType::bounded_sequence_uint8_field() +{ + return m_bounded_sequence_uint8_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field + */ +void CompleteTestType::bounded_sequence_int16_field( + const std::vector& _bounded_sequence_int16_field) +{ + m_bounded_sequence_int16_field = _bounded_sequence_int16_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field + */ +void CompleteTestType::bounded_sequence_int16_field( + std::vector&& _bounded_sequence_int16_field) +{ + m_bounded_sequence_int16_field = std::move(_bounded_sequence_int16_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int16_field + * @return Constant reference to member bounded_sequence_int16_field + */ +const std::vector& CompleteTestType::bounded_sequence_int16_field() const +{ + return m_bounded_sequence_int16_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int16_field + * @return Reference to member bounded_sequence_int16_field + */ +std::vector& CompleteTestType::bounded_sequence_int16_field() +{ + return m_bounded_sequence_int16_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field + */ +void CompleteTestType::bounded_sequence_uint16_field( + const std::vector& _bounded_sequence_uint16_field) +{ + m_bounded_sequence_uint16_field = _bounded_sequence_uint16_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field + */ +void CompleteTestType::bounded_sequence_uint16_field( + std::vector&& _bounded_sequence_uint16_field) +{ + m_bounded_sequence_uint16_field = std::move(_bounded_sequence_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint16_field + * @return Constant reference to member bounded_sequence_uint16_field + */ +const std::vector& CompleteTestType::bounded_sequence_uint16_field() const +{ + return m_bounded_sequence_uint16_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint16_field + * @return Reference to member bounded_sequence_uint16_field + */ +std::vector& CompleteTestType::bounded_sequence_uint16_field() +{ + return m_bounded_sequence_uint16_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field + */ +void CompleteTestType::bounded_sequence_int32_field( + const std::vector& _bounded_sequence_int32_field) +{ + m_bounded_sequence_int32_field = _bounded_sequence_int32_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field + */ +void CompleteTestType::bounded_sequence_int32_field( + std::vector&& _bounded_sequence_int32_field) +{ + m_bounded_sequence_int32_field = std::move(_bounded_sequence_int32_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int32_field + * @return Constant reference to member bounded_sequence_int32_field + */ +const std::vector& CompleteTestType::bounded_sequence_int32_field() const +{ + return m_bounded_sequence_int32_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int32_field + * @return Reference to member bounded_sequence_int32_field + */ +std::vector& CompleteTestType::bounded_sequence_int32_field() +{ + return m_bounded_sequence_int32_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field + */ +void CompleteTestType::bounded_sequence_uint32_field( + const std::vector& _bounded_sequence_uint32_field) +{ + m_bounded_sequence_uint32_field = _bounded_sequence_uint32_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field + */ +void CompleteTestType::bounded_sequence_uint32_field( + std::vector&& _bounded_sequence_uint32_field) +{ + m_bounded_sequence_uint32_field = std::move(_bounded_sequence_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint32_field + * @return Constant reference to member bounded_sequence_uint32_field + */ +const std::vector& CompleteTestType::bounded_sequence_uint32_field() const +{ + return m_bounded_sequence_uint32_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint32_field + * @return Reference to member bounded_sequence_uint32_field + */ +std::vector& CompleteTestType::bounded_sequence_uint32_field() +{ + return m_bounded_sequence_uint32_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field + */ +void CompleteTestType::bounded_sequence_int64_field( + const std::vector& _bounded_sequence_int64_field) +{ + m_bounded_sequence_int64_field = _bounded_sequence_int64_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field + */ +void CompleteTestType::bounded_sequence_int64_field( + std::vector&& _bounded_sequence_int64_field) +{ + m_bounded_sequence_int64_field = std::move(_bounded_sequence_int64_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int64_field + * @return Constant reference to member bounded_sequence_int64_field + */ +const std::vector& CompleteTestType::bounded_sequence_int64_field() const +{ + return m_bounded_sequence_int64_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int64_field + * @return Reference to member bounded_sequence_int64_field + */ +std::vector& CompleteTestType::bounded_sequence_int64_field() +{ + return m_bounded_sequence_int64_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field + */ +void CompleteTestType::bounded_sequence_uint64_field( + const std::vector& _bounded_sequence_uint64_field) +{ + m_bounded_sequence_uint64_field = _bounded_sequence_uint64_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field + */ +void CompleteTestType::bounded_sequence_uint64_field( + std::vector&& _bounded_sequence_uint64_field) +{ + m_bounded_sequence_uint64_field = std::move(_bounded_sequence_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint64_field + * @return Constant reference to member bounded_sequence_uint64_field + */ +const std::vector& CompleteTestType::bounded_sequence_uint64_field() const +{ + return m_bounded_sequence_uint64_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint64_field + * @return Reference to member bounded_sequence_uint64_field + */ +std::vector& CompleteTestType::bounded_sequence_uint64_field() +{ + return m_bounded_sequence_uint64_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field + */ +void CompleteTestType::bounded_sequence_float_field( + const std::vector& _bounded_sequence_float_field) +{ + m_bounded_sequence_float_field = _bounded_sequence_float_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field + */ +void CompleteTestType::bounded_sequence_float_field( + std::vector&& _bounded_sequence_float_field) +{ + m_bounded_sequence_float_field = std::move(_bounded_sequence_float_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_float_field + * @return Constant reference to member bounded_sequence_float_field + */ +const std::vector& CompleteTestType::bounded_sequence_float_field() const +{ + return m_bounded_sequence_float_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_float_field + * @return Reference to member bounded_sequence_float_field + */ +std::vector& CompleteTestType::bounded_sequence_float_field() +{ + return m_bounded_sequence_float_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field + */ +void CompleteTestType::bounded_sequence_double_field( + const std::vector& _bounded_sequence_double_field) +{ + m_bounded_sequence_double_field = _bounded_sequence_double_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field + */ +void CompleteTestType::bounded_sequence_double_field( + std::vector&& _bounded_sequence_double_field) +{ + m_bounded_sequence_double_field = std::move(_bounded_sequence_double_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_double_field + * @return Constant reference to member bounded_sequence_double_field + */ +const std::vector& CompleteTestType::bounded_sequence_double_field() const +{ + return m_bounded_sequence_double_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_double_field + * @return Reference to member bounded_sequence_double_field + */ +std::vector& CompleteTestType::bounded_sequence_double_field() +{ + return m_bounded_sequence_double_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field + */ +void CompleteTestType::bounded_sequence_bool_field( + const std::vector& _bounded_sequence_bool_field) +{ + m_bounded_sequence_bool_field = _bounded_sequence_bool_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field + */ +void CompleteTestType::bounded_sequence_bool_field( + std::vector&& _bounded_sequence_bool_field) +{ + m_bounded_sequence_bool_field = std::move(_bounded_sequence_bool_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_bool_field + * @return Constant reference to member bounded_sequence_bool_field + */ +const std::vector& CompleteTestType::bounded_sequence_bool_field() const +{ + return m_bounded_sequence_bool_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_bool_field + * @return Reference to member bounded_sequence_bool_field + */ +std::vector& CompleteTestType::bounded_sequence_bool_field() +{ + return m_bounded_sequence_bool_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field + */ +void CompleteTestType::bounded_sequence_enum_field( + const std::vector& _bounded_sequence_enum_field) +{ + m_bounded_sequence_enum_field = _bounded_sequence_enum_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field + */ +void CompleteTestType::bounded_sequence_enum_field( + std::vector&& _bounded_sequence_enum_field) +{ + m_bounded_sequence_enum_field = std::move(_bounded_sequence_enum_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_enum_field + * @return Constant reference to member bounded_sequence_enum_field + */ +const std::vector& CompleteTestType::bounded_sequence_enum_field() const +{ + return m_bounded_sequence_enum_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_enum_field + * @return Reference to member bounded_sequence_enum_field + */ +std::vector& CompleteTestType::bounded_sequence_enum_field() +{ + return m_bounded_sequence_enum_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field + */ +void CompleteTestType::bounded_sequence_enum2_field( + const std::vector& _bounded_sequence_enum2_field) +{ + m_bounded_sequence_enum2_field = _bounded_sequence_enum2_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field + */ +void CompleteTestType::bounded_sequence_enum2_field( + std::vector&& _bounded_sequence_enum2_field) +{ + m_bounded_sequence_enum2_field = std::move(_bounded_sequence_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_enum2_field + * @return Constant reference to member bounded_sequence_enum2_field + */ +const std::vector& CompleteTestType::bounded_sequence_enum2_field() const +{ + return m_bounded_sequence_enum2_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_enum2_field + * @return Reference to member bounded_sequence_enum2_field + */ +std::vector& CompleteTestType::bounded_sequence_enum2_field() +{ + return m_bounded_sequence_enum2_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field + */ +void CompleteTestType::bounded_sequence_struct_field( + const std::vector& _bounded_sequence_struct_field) +{ + m_bounded_sequence_struct_field = _bounded_sequence_struct_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field + */ +void CompleteTestType::bounded_sequence_struct_field( + std::vector&& _bounded_sequence_struct_field) +{ + m_bounded_sequence_struct_field = std::move(_bounded_sequence_struct_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_struct_field + * @return Constant reference to member bounded_sequence_struct_field + */ +const std::vector& CompleteTestType::bounded_sequence_struct_field() const +{ + return m_bounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_struct_field + * @return Reference to member bounded_sequence_struct_field + */ +std::vector& CompleteTestType::bounded_sequence_struct_field() +{ + return m_bounded_sequence_struct_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field + */ +void CompleteTestType::unbounded_sequence_char_field( + const std::vector& _unbounded_sequence_char_field) +{ + m_unbounded_sequence_char_field = _unbounded_sequence_char_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field + */ +void CompleteTestType::unbounded_sequence_char_field( + std::vector&& _unbounded_sequence_char_field) +{ + m_unbounded_sequence_char_field = std::move(_unbounded_sequence_char_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_char_field + * @return Constant reference to member unbounded_sequence_char_field + */ +const std::vector& CompleteTestType::unbounded_sequence_char_field() const +{ + return m_unbounded_sequence_char_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_char_field + * @return Reference to member unbounded_sequence_char_field + */ +std::vector& CompleteTestType::unbounded_sequence_char_field() +{ + return m_unbounded_sequence_char_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field + */ +void CompleteTestType::unbounded_sequence_uint8_field( + const std::vector& _unbounded_sequence_uint8_field) +{ + m_unbounded_sequence_uint8_field = _unbounded_sequence_uint8_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field + */ +void CompleteTestType::unbounded_sequence_uint8_field( + std::vector&& _unbounded_sequence_uint8_field) +{ + m_unbounded_sequence_uint8_field = std::move(_unbounded_sequence_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint8_field + * @return Constant reference to member unbounded_sequence_uint8_field + */ +const std::vector& CompleteTestType::unbounded_sequence_uint8_field() const +{ + return m_unbounded_sequence_uint8_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint8_field + * @return Reference to member unbounded_sequence_uint8_field + */ +std::vector& CompleteTestType::unbounded_sequence_uint8_field() +{ + return m_unbounded_sequence_uint8_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field + */ +void CompleteTestType::unbounded_sequence_int16_field( + const std::vector& _unbounded_sequence_int16_field) +{ + m_unbounded_sequence_int16_field = _unbounded_sequence_int16_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field + */ +void CompleteTestType::unbounded_sequence_int16_field( + std::vector&& _unbounded_sequence_int16_field) +{ + m_unbounded_sequence_int16_field = std::move(_unbounded_sequence_int16_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int16_field + * @return Constant reference to member unbounded_sequence_int16_field + */ +const std::vector& CompleteTestType::unbounded_sequence_int16_field() const +{ + return m_unbounded_sequence_int16_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int16_field + * @return Reference to member unbounded_sequence_int16_field + */ +std::vector& CompleteTestType::unbounded_sequence_int16_field() +{ + return m_unbounded_sequence_int16_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field + */ +void CompleteTestType::unbounded_sequence_uint16_field( + const std::vector& _unbounded_sequence_uint16_field) +{ + m_unbounded_sequence_uint16_field = _unbounded_sequence_uint16_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field + */ +void CompleteTestType::unbounded_sequence_uint16_field( + std::vector&& _unbounded_sequence_uint16_field) +{ + m_unbounded_sequence_uint16_field = std::move(_unbounded_sequence_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint16_field + * @return Constant reference to member unbounded_sequence_uint16_field + */ +const std::vector& CompleteTestType::unbounded_sequence_uint16_field() const +{ + return m_unbounded_sequence_uint16_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint16_field + * @return Reference to member unbounded_sequence_uint16_field + */ +std::vector& CompleteTestType::unbounded_sequence_uint16_field() +{ + return m_unbounded_sequence_uint16_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field + */ +void CompleteTestType::unbounded_sequence_int32_field( + const std::vector& _unbounded_sequence_int32_field) +{ + m_unbounded_sequence_int32_field = _unbounded_sequence_int32_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field + */ +void CompleteTestType::unbounded_sequence_int32_field( + std::vector&& _unbounded_sequence_int32_field) +{ + m_unbounded_sequence_int32_field = std::move(_unbounded_sequence_int32_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int32_field + * @return Constant reference to member unbounded_sequence_int32_field + */ +const std::vector& CompleteTestType::unbounded_sequence_int32_field() const +{ + return m_unbounded_sequence_int32_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int32_field + * @return Reference to member unbounded_sequence_int32_field + */ +std::vector& CompleteTestType::unbounded_sequence_int32_field() +{ + return m_unbounded_sequence_int32_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field + */ +void CompleteTestType::unbounded_sequence_uint32_field( + const std::vector& _unbounded_sequence_uint32_field) +{ + m_unbounded_sequence_uint32_field = _unbounded_sequence_uint32_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field + */ +void CompleteTestType::unbounded_sequence_uint32_field( + std::vector&& _unbounded_sequence_uint32_field) +{ + m_unbounded_sequence_uint32_field = std::move(_unbounded_sequence_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint32_field + * @return Constant reference to member unbounded_sequence_uint32_field + */ +const std::vector& CompleteTestType::unbounded_sequence_uint32_field() const +{ + return m_unbounded_sequence_uint32_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint32_field + * @return Reference to member unbounded_sequence_uint32_field + */ +std::vector& CompleteTestType::unbounded_sequence_uint32_field() +{ + return m_unbounded_sequence_uint32_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field + */ +void CompleteTestType::unbounded_sequence_int64_field( + const std::vector& _unbounded_sequence_int64_field) +{ + m_unbounded_sequence_int64_field = _unbounded_sequence_int64_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field + */ +void CompleteTestType::unbounded_sequence_int64_field( + std::vector&& _unbounded_sequence_int64_field) +{ + m_unbounded_sequence_int64_field = std::move(_unbounded_sequence_int64_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int64_field + * @return Constant reference to member unbounded_sequence_int64_field + */ +const std::vector& CompleteTestType::unbounded_sequence_int64_field() const +{ + return m_unbounded_sequence_int64_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int64_field + * @return Reference to member unbounded_sequence_int64_field + */ +std::vector& CompleteTestType::unbounded_sequence_int64_field() +{ + return m_unbounded_sequence_int64_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field + */ +void CompleteTestType::unbounded_sequence_uint64_field( + const std::vector& _unbounded_sequence_uint64_field) +{ + m_unbounded_sequence_uint64_field = _unbounded_sequence_uint64_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field + */ +void CompleteTestType::unbounded_sequence_uint64_field( + std::vector&& _unbounded_sequence_uint64_field) +{ + m_unbounded_sequence_uint64_field = std::move(_unbounded_sequence_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint64_field + * @return Constant reference to member unbounded_sequence_uint64_field + */ +const std::vector& CompleteTestType::unbounded_sequence_uint64_field() const +{ + return m_unbounded_sequence_uint64_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint64_field + * @return Reference to member unbounded_sequence_uint64_field + */ +std::vector& CompleteTestType::unbounded_sequence_uint64_field() +{ + return m_unbounded_sequence_uint64_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field + */ +void CompleteTestType::unbounded_sequence_float_field( + const std::vector& _unbounded_sequence_float_field) +{ + m_unbounded_sequence_float_field = _unbounded_sequence_float_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field + */ +void CompleteTestType::unbounded_sequence_float_field( + std::vector&& _unbounded_sequence_float_field) +{ + m_unbounded_sequence_float_field = std::move(_unbounded_sequence_float_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_float_field + * @return Constant reference to member unbounded_sequence_float_field + */ +const std::vector& CompleteTestType::unbounded_sequence_float_field() const +{ + return m_unbounded_sequence_float_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_float_field + * @return Reference to member unbounded_sequence_float_field + */ +std::vector& CompleteTestType::unbounded_sequence_float_field() +{ + return m_unbounded_sequence_float_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field + */ +void CompleteTestType::unbounded_sequence_double_field( + const std::vector& _unbounded_sequence_double_field) +{ + m_unbounded_sequence_double_field = _unbounded_sequence_double_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field + */ +void CompleteTestType::unbounded_sequence_double_field( + std::vector&& _unbounded_sequence_double_field) +{ + m_unbounded_sequence_double_field = std::move(_unbounded_sequence_double_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_double_field + * @return Constant reference to member unbounded_sequence_double_field + */ +const std::vector& CompleteTestType::unbounded_sequence_double_field() const +{ + return m_unbounded_sequence_double_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_double_field + * @return Reference to member unbounded_sequence_double_field + */ +std::vector& CompleteTestType::unbounded_sequence_double_field() +{ + return m_unbounded_sequence_double_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field + */ +void CompleteTestType::unbounded_sequence_bool_field( + const std::vector& _unbounded_sequence_bool_field) +{ + m_unbounded_sequence_bool_field = _unbounded_sequence_bool_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field + */ +void CompleteTestType::unbounded_sequence_bool_field( + std::vector&& _unbounded_sequence_bool_field) +{ + m_unbounded_sequence_bool_field = std::move(_unbounded_sequence_bool_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_bool_field + * @return Constant reference to member unbounded_sequence_bool_field + */ +const std::vector& CompleteTestType::unbounded_sequence_bool_field() const +{ + return m_unbounded_sequence_bool_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_bool_field + * @return Reference to member unbounded_sequence_bool_field + */ +std::vector& CompleteTestType::unbounded_sequence_bool_field() +{ + return m_unbounded_sequence_bool_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field + */ +void CompleteTestType::unbounded_sequence_enum_field( + const std::vector& _unbounded_sequence_enum_field) +{ + m_unbounded_sequence_enum_field = _unbounded_sequence_enum_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field + */ +void CompleteTestType::unbounded_sequence_enum_field( + std::vector&& _unbounded_sequence_enum_field) +{ + m_unbounded_sequence_enum_field = std::move(_unbounded_sequence_enum_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_enum_field + * @return Constant reference to member unbounded_sequence_enum_field + */ +const std::vector& CompleteTestType::unbounded_sequence_enum_field() const +{ + return m_unbounded_sequence_enum_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_enum_field + * @return Reference to member unbounded_sequence_enum_field + */ +std::vector& CompleteTestType::unbounded_sequence_enum_field() +{ + return m_unbounded_sequence_enum_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field + */ +void CompleteTestType::unbounded_sequence_enum2_field( + const std::vector& _unbounded_sequence_enum2_field) +{ + m_unbounded_sequence_enum2_field = _unbounded_sequence_enum2_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field + */ +void CompleteTestType::unbounded_sequence_enum2_field( + std::vector&& _unbounded_sequence_enum2_field) +{ + m_unbounded_sequence_enum2_field = std::move(_unbounded_sequence_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_enum2_field + * @return Constant reference to member unbounded_sequence_enum2_field + */ +const std::vector& CompleteTestType::unbounded_sequence_enum2_field() const +{ + return m_unbounded_sequence_enum2_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_enum2_field + * @return Reference to member unbounded_sequence_enum2_field + */ +std::vector& CompleteTestType::unbounded_sequence_enum2_field() +{ + return m_unbounded_sequence_enum2_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field + */ +void CompleteTestType::unbounded_sequence_struct_field( + const std::vector& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = _unbounded_sequence_struct_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field + */ +void CompleteTestType::unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ +const std::vector& CompleteTestType::unbounded_sequence_struct_field() const +{ + return m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ +std::vector& CompleteTestType::unbounded_sequence_struct_field() +{ + return m_unbounded_sequence_struct_field; +} + +size_t CompleteTestType::getKeyMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t current_align = current_alignment; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + return current_align; +} + +bool CompleteTestType::isKeyDefined() +{ + return false; +} + +void CompleteTestType::serializeKey( + eprosima::fastcdr::Cdr& scdr) const +{ + (void) scdr; + +} + +KeyedCompleteTestType::KeyedCompleteTestType() +{ + // m_id com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1e4a7dd4 + m_id = 0; + // m_char_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@4f51b3e0 + m_char_field = 0; + // m_uint8_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@4b9e255 + m_uint8_field = 0; + // m_int16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5e57643e + m_int16_field = 0; + // m_uint16_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@133e16fd + m_uint16_field = 0; + // m_int32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@51b279c9 + m_int32_field = 0; + // m_uint32_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1ad282e0 + m_uint32_field = 0; + // m_int64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@7f416310 + m_int64_field = 0; + // m_uint64_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@1cab0bfb + m_uint64_field = 0; + // m_float_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@5e955596 + m_float_field = 0.0; + // m_double_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@50de0926 + m_double_field = 0.0; + // m_bool_field com.eprosima.idl.parser.typecode.PrimitiveTypeCode@2473b9ce + m_bool_field = false; + // m_string_field com.eprosima.idl.parser.typecode.StringTypeCode@60438a68 + m_string_field =""; + // m_enum_field com.eprosima.idl.parser.typecode.EnumTypeCode@3aeaafa6 + m_enum_field = ::RED; + // m_enum2_field com.eprosima.idl.parser.typecode.EnumTypeCode@76a3e297 + m_enum2_field = ::WOOD; + // m_struct_field com.eprosima.fastdds.idl.parser.typecode.StructTypeCode@fe18270 + + // m_array_char_field com.eprosima.idl.parser.typecode.ArrayTypeCode@140e5a13 + memset(&m_array_char_field, 0, (max_array_size) * 1); + // m_array_uint8_field com.eprosima.idl.parser.typecode.ArrayTypeCode@3439f68d + memset(&m_array_uint8_field, 0, (max_array_size) * 1); + // m_array_int16_field com.eprosima.idl.parser.typecode.ArrayTypeCode@dbd940d + memset(&m_array_int16_field, 0, (max_array_size) * 2); + // m_array_uint16_field com.eprosima.idl.parser.typecode.ArrayTypeCode@71d15f18 + memset(&m_array_uint16_field, 0, (max_array_size) * 2); + // m_array_int32_field com.eprosima.idl.parser.typecode.ArrayTypeCode@17695df3 + memset(&m_array_int32_field, 0, (max_array_size) * 4); + // m_array_uint32_field com.eprosima.idl.parser.typecode.ArrayTypeCode@6c9f5c0d + memset(&m_array_uint32_field, 0, (max_array_size) * 4); + // m_array_int64_field com.eprosima.idl.parser.typecode.ArrayTypeCode@de3a06f + memset(&m_array_int64_field, 0, (max_array_size) * 8); + // m_array_uint64_field com.eprosima.idl.parser.typecode.ArrayTypeCode@76b10754 + memset(&m_array_uint64_field, 0, (max_array_size) * 8); + // m_array_float_field com.eprosima.idl.parser.typecode.ArrayTypeCode@2bea5ab4 + memset(&m_array_float_field, 0, (max_array_size) * 4); + // m_array_double_field com.eprosima.idl.parser.typecode.ArrayTypeCode@3d8314f0 + memset(&m_array_double_field, 0, (max_array_size) * 8); + // m_array_bool_field com.eprosima.idl.parser.typecode.ArrayTypeCode@2df32bf7 + memset(&m_array_bool_field, 0, (max_array_size) * 1); + // m_array_enum_field com.eprosima.idl.parser.typecode.ArrayTypeCode@530612ba + memset(&m_array_enum_field, 0, (max_array_size) * 4); + // m_array_enum2_field com.eprosima.idl.parser.typecode.ArrayTypeCode@2a40cd94 + memset(&m_array_enum2_field, 0, (max_array_size) * 4); + // m_array_struct_field com.eprosima.idl.parser.typecode.ArrayTypeCode@f4168b8 + + // m_bounded_sequence_char_field com.eprosima.idl.parser.typecode.SequenceTypeCode@3bd94634 + + // m_bounded_sequence_uint8_field com.eprosima.idl.parser.typecode.SequenceTypeCode@58a90037 + + // m_bounded_sequence_int16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@74294adb + + // m_bounded_sequence_uint16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@70a9f84e + + // m_bounded_sequence_int32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@130f889 + + // m_bounded_sequence_uint32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1188e820 + + // m_bounded_sequence_int64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@2f490758 + + // m_bounded_sequence_uint64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@101df177 + + // m_bounded_sequence_float_field com.eprosima.idl.parser.typecode.SequenceTypeCode@166fa74d + + // m_bounded_sequence_double_field com.eprosima.idl.parser.typecode.SequenceTypeCode@40f08448 + + // m_bounded_sequence_bool_field com.eprosima.idl.parser.typecode.SequenceTypeCode@276438c9 + + // m_bounded_sequence_enum_field com.eprosima.idl.parser.typecode.SequenceTypeCode@588df31b + + // m_bounded_sequence_enum2_field com.eprosima.idl.parser.typecode.SequenceTypeCode@33b37288 + + // m_bounded_sequence_struct_field com.eprosima.idl.parser.typecode.SequenceTypeCode@77a57272 + + // m_unbounded_sequence_char_field com.eprosima.idl.parser.typecode.SequenceTypeCode@7181ae3f + + // m_unbounded_sequence_uint8_field com.eprosima.idl.parser.typecode.SequenceTypeCode@46238e3f + + // m_unbounded_sequence_int16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@6e2c9341 + + // m_unbounded_sequence_uint16_field com.eprosima.idl.parser.typecode.SequenceTypeCode@32464a14 + + // m_unbounded_sequence_int32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@4e4aea35 + + // m_unbounded_sequence_uint32_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1442d7b5 + + // m_unbounded_sequence_int64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1efee8e7 + + // m_unbounded_sequence_uint64_field com.eprosima.idl.parser.typecode.SequenceTypeCode@1ee807c6 + + // m_unbounded_sequence_float_field com.eprosima.idl.parser.typecode.SequenceTypeCode@76a4d6c + + // m_unbounded_sequence_double_field com.eprosima.idl.parser.typecode.SequenceTypeCode@517cd4b + + // m_unbounded_sequence_bool_field com.eprosima.idl.parser.typecode.SequenceTypeCode@6cc7b4de + + // m_unbounded_sequence_enum_field com.eprosima.idl.parser.typecode.SequenceTypeCode@32cf48b7 + + // m_unbounded_sequence_enum2_field com.eprosima.idl.parser.typecode.SequenceTypeCode@679b62af + + // m_unbounded_sequence_struct_field com.eprosima.idl.parser.typecode.SequenceTypeCode@5cdd8682 + + +} + +KeyedCompleteTestType::~KeyedCompleteTestType() +{ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +KeyedCompleteTestType::KeyedCompleteTestType( + const KeyedCompleteTestType& x) +{ + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; +} + +KeyedCompleteTestType::KeyedCompleteTestType( + KeyedCompleteTestType&& x) +{ + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); +} + +KeyedCompleteTestType& KeyedCompleteTestType::operator =( + const KeyedCompleteTestType& x) +{ + + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; + + return *this; +} + +KeyedCompleteTestType& KeyedCompleteTestType::operator =( + KeyedCompleteTestType&& x) +{ + + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); + + return *this; +} + +bool KeyedCompleteTestType::operator ==( + const KeyedCompleteTestType& x) const +{ + + return (m_id == x.m_id && m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); +} + +bool KeyedCompleteTestType::operator !=( + const KeyedCompleteTestType& x) const +{ + return !(*this == x); +} + +size_t KeyedCompleteTestType::getMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t initial_alignment = current_alignment; + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment); + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + for(size_t a = 0; a < (max_array_size); ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (max_seq_size * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < max_seq_size; ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (100 * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < 100; ++a) + { + current_alignment += StructType::getMaxCdrSerializedSize(current_alignment);} + + + return current_alignment - initial_alignment; +} + +size_t KeyedCompleteTestType::getCdrSerializedSize( + const KeyedCompleteTestType& data, + size_t current_alignment) +{ + (void)data; + size_t initial_alignment = current_alignment; + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + + + current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + current_alignment += StructType::getCdrSerializedSize(data.struct_field(), current_alignment); + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + if ((max_array_size) > 0) + { + current_alignment += ((max_array_size) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + for(size_t a = 0; a < data.array_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); + } + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_char_field().size() > 0) + { + current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint8_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int16_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint16_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int32_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint32_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_int64_field().size() > 0) + { + current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_uint64_field().size() > 0) + { + current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_float_field().size() > 0) + { + current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_double_field().size() > 0) + { + current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_bool_field().size() > 0) + { + current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_enum_field().size() > 0) + { + current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.bounded_sequence_enum2_field().size() > 0) + { + current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_char_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint8_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int16_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint16_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int32_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint32_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_int64_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_uint64_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_float_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_double_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_bool_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_enum_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + if (data.unbounded_sequence_enum2_field().size() > 0) + { + current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + } + + + + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + + for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) + { + current_alignment += StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} + + + return current_alignment - initial_alignment; +} + +void KeyedCompleteTestType::serialize( + eprosima::fastcdr::Cdr& scdr) const +{ + + scdr << m_id; + scdr << m_char_field; + scdr << m_uint8_field; + scdr << m_int16_field; + scdr << m_uint16_field; + scdr << m_int32_field; + scdr << m_uint32_field; + scdr << m_int64_field; + scdr << m_uint64_field; + scdr << m_float_field; + scdr << m_double_field; + scdr << m_bool_field; + scdr << m_string_field; + scdr << (uint32_t)m_enum_field; + scdr << (uint32_t)m_enum2_field; + scdr << m_struct_field; + scdr << m_array_char_field; + + scdr << m_array_uint8_field; + + scdr << m_array_int16_field; + + scdr << m_array_uint16_field; + + scdr << m_array_int32_field; + + scdr << m_array_uint32_field; + + scdr << m_array_int64_field; + + scdr << m_array_uint64_field; + + scdr << m_array_float_field; + + scdr << m_array_double_field; + + scdr << m_array_bool_field; + + scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); + + + scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); + + + scdr << m_array_struct_field; + + scdr << m_bounded_sequence_char_field; + scdr << m_bounded_sequence_uint8_field; + scdr << m_bounded_sequence_int16_field; + scdr << m_bounded_sequence_uint16_field; + scdr << m_bounded_sequence_int32_field; + scdr << m_bounded_sequence_uint32_field; + scdr << m_bounded_sequence_int64_field; + scdr << m_bounded_sequence_uint64_field; + scdr << m_bounded_sequence_float_field; + scdr << m_bounded_sequence_double_field; + scdr << m_bounded_sequence_bool_field; + scdr << static_cast(m_bounded_sequence_enum_field.size()); + scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); + + scdr << static_cast(m_bounded_sequence_enum2_field.size()); + scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); + + scdr << m_bounded_sequence_struct_field; + scdr << m_unbounded_sequence_char_field; + scdr << m_unbounded_sequence_uint8_field; + scdr << m_unbounded_sequence_int16_field; + scdr << m_unbounded_sequence_uint16_field; + scdr << m_unbounded_sequence_int32_field; + scdr << m_unbounded_sequence_uint32_field; + scdr << m_unbounded_sequence_int64_field; + scdr << m_unbounded_sequence_uint64_field; + scdr << m_unbounded_sequence_float_field; + scdr << m_unbounded_sequence_double_field; + scdr << m_unbounded_sequence_bool_field; + scdr << static_cast(m_unbounded_sequence_enum_field.size()); + scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); + + scdr << static_cast(m_unbounded_sequence_enum2_field.size()); + scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); + + scdr << m_unbounded_sequence_struct_field; + +} + +void KeyedCompleteTestType::deserialize( + eprosima::fastcdr::Cdr& dcdr) +{ + + dcdr >> m_id; + dcdr >> m_char_field; + dcdr >> m_uint8_field; + dcdr >> m_int16_field; + dcdr >> m_uint16_field; + dcdr >> m_int32_field; + dcdr >> m_uint32_field; + dcdr >> m_int64_field; + dcdr >> m_uint64_field; + dcdr >> m_float_field; + dcdr >> m_double_field; + dcdr >> m_bool_field; + dcdr >> m_string_field; + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum_field = (Color)enum_value; + } + + { + uint32_t enum_value = 0; + dcdr >> enum_value; + m_enum2_field = (Material)enum_value; + } + + dcdr >> m_struct_field; + dcdr >> m_array_char_field; + + dcdr >> m_array_uint8_field; + + dcdr >> m_array_int16_field; + + dcdr >> m_array_uint16_field; + + dcdr >> m_array_int32_field; + + dcdr >> m_array_uint32_field; + + dcdr >> m_array_int64_field; + + dcdr >> m_array_uint64_field; + + dcdr >> m_array_float_field; + + dcdr >> m_array_double_field; + + dcdr >> m_array_bool_field; + + dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); + + + dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); + + + dcdr >> m_array_struct_field; + + dcdr >> m_bounded_sequence_char_field; + dcdr >> m_bounded_sequence_uint8_field; + dcdr >> m_bounded_sequence_int16_field; + dcdr >> m_bounded_sequence_uint16_field; + dcdr >> m_bounded_sequence_int32_field; + dcdr >> m_bounded_sequence_uint32_field; + dcdr >> m_bounded_sequence_int64_field; + dcdr >> m_bounded_sequence_uint64_field; + dcdr >> m_bounded_sequence_float_field; + dcdr >> m_bounded_sequence_double_field; + dcdr >> m_bounded_sequence_bool_field; + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_bounded_sequence_enum_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); + } + + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_bounded_sequence_enum2_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); + } + + dcdr >> m_bounded_sequence_struct_field; + dcdr >> m_unbounded_sequence_char_field; + dcdr >> m_unbounded_sequence_uint8_field; + dcdr >> m_unbounded_sequence_int16_field; + dcdr >> m_unbounded_sequence_uint16_field; + dcdr >> m_unbounded_sequence_int32_field; + dcdr >> m_unbounded_sequence_uint32_field; + dcdr >> m_unbounded_sequence_int64_field; + dcdr >> m_unbounded_sequence_uint64_field; + dcdr >> m_unbounded_sequence_float_field; + dcdr >> m_unbounded_sequence_double_field; + dcdr >> m_unbounded_sequence_bool_field; + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_unbounded_sequence_enum_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); + } + + { + uint32_t seq_length = 0; + dcdr >> seq_length; + m_unbounded_sequence_enum2_field.resize(seq_length); + dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); + } + + dcdr >> m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function sets a value in member id + * @param _id New value for member id + */ +void KeyedCompleteTestType::id( + int32_t _id) +{ + m_id = _id; +} + +/*! + * @brief This function returns the value of member id + * @return Value of member id + */ +int32_t KeyedCompleteTestType::id() const +{ + return m_id; +} + +/*! + * @brief This function returns a reference to member id + * @return Reference to member id + */ +int32_t& KeyedCompleteTestType::id() +{ + return m_id; +} + +/*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ +void KeyedCompleteTestType::char_field( + char _char_field) +{ + m_char_field = _char_field; +} + +/*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ +char KeyedCompleteTestType::char_field() const +{ + return m_char_field; +} + +/*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ +char& KeyedCompleteTestType::char_field() +{ + return m_char_field; +} + +/*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ +void KeyedCompleteTestType::uint8_field( + uint8_t _uint8_field) +{ + m_uint8_field = _uint8_field; +} + +/*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ +uint8_t KeyedCompleteTestType::uint8_field() const +{ + return m_uint8_field; +} + +/*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ +uint8_t& KeyedCompleteTestType::uint8_field() +{ + return m_uint8_field; +} + +/*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ +void KeyedCompleteTestType::int16_field( + int16_t _int16_field) +{ + m_int16_field = _int16_field; +} + +/*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ +int16_t KeyedCompleteTestType::int16_field() const +{ + return m_int16_field; +} + +/*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ +int16_t& KeyedCompleteTestType::int16_field() +{ + return m_int16_field; +} + +/*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ +void KeyedCompleteTestType::uint16_field( + uint16_t _uint16_field) +{ + m_uint16_field = _uint16_field; +} + +/*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ +uint16_t KeyedCompleteTestType::uint16_field() const +{ + return m_uint16_field; +} + +/*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ +uint16_t& KeyedCompleteTestType::uint16_field() +{ + return m_uint16_field; +} + +/*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ +void KeyedCompleteTestType::int32_field( + int32_t _int32_field) +{ + m_int32_field = _int32_field; +} + +/*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ +int32_t KeyedCompleteTestType::int32_field() const +{ + return m_int32_field; +} + +/*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ +int32_t& KeyedCompleteTestType::int32_field() +{ + return m_int32_field; +} + +/*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ +void KeyedCompleteTestType::uint32_field( + uint32_t _uint32_field) +{ + m_uint32_field = _uint32_field; +} + +/*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ +uint32_t KeyedCompleteTestType::uint32_field() const +{ + return m_uint32_field; +} + +/*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ +uint32_t& KeyedCompleteTestType::uint32_field() +{ + return m_uint32_field; +} + +/*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ +void KeyedCompleteTestType::int64_field( + int64_t _int64_field) +{ + m_int64_field = _int64_field; +} + +/*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ +int64_t KeyedCompleteTestType::int64_field() const +{ + return m_int64_field; +} + +/*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ +int64_t& KeyedCompleteTestType::int64_field() +{ + return m_int64_field; +} + +/*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ +void KeyedCompleteTestType::uint64_field( + uint64_t _uint64_field) +{ + m_uint64_field = _uint64_field; +} + +/*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ +uint64_t KeyedCompleteTestType::uint64_field() const +{ + return m_uint64_field; +} + +/*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ +uint64_t& KeyedCompleteTestType::uint64_field() +{ + return m_uint64_field; +} + +/*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ +void KeyedCompleteTestType::float_field( + float _float_field) +{ + m_float_field = _float_field; +} + +/*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ +float KeyedCompleteTestType::float_field() const +{ + return m_float_field; +} + +/*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ +float& KeyedCompleteTestType::float_field() +{ + return m_float_field; +} + +/*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ +void KeyedCompleteTestType::double_field( + double _double_field) +{ + m_double_field = _double_field; +} + +/*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ +double KeyedCompleteTestType::double_field() const +{ + return m_double_field; +} + +/*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ +double& KeyedCompleteTestType::double_field() +{ + return m_double_field; +} + +/*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ +void KeyedCompleteTestType::bool_field( + bool _bool_field) +{ + m_bool_field = _bool_field; +} + +/*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ +bool KeyedCompleteTestType::bool_field() const +{ + return m_bool_field; +} + +/*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ +bool& KeyedCompleteTestType::bool_field() +{ + return m_bool_field; +} + +/*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ +void KeyedCompleteTestType::string_field( + const std::string& _string_field) +{ + m_string_field = _string_field; +} + +/*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ +void KeyedCompleteTestType::string_field( + std::string&& _string_field) +{ + m_string_field = std::move(_string_field); +} + +/*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ +const std::string& KeyedCompleteTestType::string_field() const +{ + return m_string_field; +} + +/*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ +std::string& KeyedCompleteTestType::string_field() +{ + return m_string_field; +} +/*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ +void KeyedCompleteTestType::enum_field( + Color _enum_field) +{ + m_enum_field = _enum_field; +} + +/*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ +Color KeyedCompleteTestType::enum_field() const +{ + return m_enum_field; +} + +/*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ +Color& KeyedCompleteTestType::enum_field() +{ + return m_enum_field; +} + +/*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ +void KeyedCompleteTestType::enum2_field( + Material _enum2_field) +{ + m_enum2_field = _enum2_field; +} + +/*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ +Material KeyedCompleteTestType::enum2_field() const +{ + return m_enum2_field; +} + +/*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ +Material& KeyedCompleteTestType::enum2_field() +{ + return m_enum2_field; +} + +/*! + * @brief This function copies the value in member struct_field + * @param _struct_field New value to be copied in member struct_field + */ +void KeyedCompleteTestType::struct_field( + const StructType& _struct_field) +{ + m_struct_field = _struct_field; +} + +/*! + * @brief This function moves the value in member struct_field + * @param _struct_field New value to be moved in member struct_field + */ +void KeyedCompleteTestType::struct_field( + StructType&& _struct_field) +{ + m_struct_field = std::move(_struct_field); +} + +/*! + * @brief This function returns a constant reference to member struct_field + * @return Constant reference to member struct_field + */ +const StructType& KeyedCompleteTestType::struct_field() const +{ + return m_struct_field; +} + +/*! + * @brief This function returns a reference to member struct_field + * @return Reference to member struct_field + */ +StructType& KeyedCompleteTestType::struct_field() +{ + return m_struct_field; +} +/*! + * @brief This function copies the value in member array_char_field + * @param _array_char_field New value to be copied in member array_char_field + */ +void KeyedCompleteTestType::array_char_field( + const std::array& _array_char_field) +{ + m_array_char_field = _array_char_field; +} + +/*! + * @brief This function moves the value in member array_char_field + * @param _array_char_field New value to be moved in member array_char_field + */ +void KeyedCompleteTestType::array_char_field( + std::array&& _array_char_field) +{ + m_array_char_field = std::move(_array_char_field); +} + +/*! + * @brief This function returns a constant reference to member array_char_field + * @return Constant reference to member array_char_field + */ +const std::array& KeyedCompleteTestType::array_char_field() const +{ + return m_array_char_field; +} + +/*! + * @brief This function returns a reference to member array_char_field + * @return Reference to member array_char_field + */ +std::array& KeyedCompleteTestType::array_char_field() +{ + return m_array_char_field; +} +/*! + * @brief This function copies the value in member array_uint8_field + * @param _array_uint8_field New value to be copied in member array_uint8_field + */ +void KeyedCompleteTestType::array_uint8_field( + const std::array& _array_uint8_field) +{ + m_array_uint8_field = _array_uint8_field; +} + +/*! + * @brief This function moves the value in member array_uint8_field + * @param _array_uint8_field New value to be moved in member array_uint8_field + */ +void KeyedCompleteTestType::array_uint8_field( + std::array&& _array_uint8_field) +{ + m_array_uint8_field = std::move(_array_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint8_field + * @return Constant reference to member array_uint8_field + */ +const std::array& KeyedCompleteTestType::array_uint8_field() const +{ + return m_array_uint8_field; +} + +/*! + * @brief This function returns a reference to member array_uint8_field + * @return Reference to member array_uint8_field + */ +std::array& KeyedCompleteTestType::array_uint8_field() +{ + return m_array_uint8_field; +} +/*! + * @brief This function copies the value in member array_int16_field + * @param _array_int16_field New value to be copied in member array_int16_field + */ +void KeyedCompleteTestType::array_int16_field( + const std::array& _array_int16_field) +{ + m_array_int16_field = _array_int16_field; +} + +/*! + * @brief This function moves the value in member array_int16_field + * @param _array_int16_field New value to be moved in member array_int16_field + */ +void KeyedCompleteTestType::array_int16_field( + std::array&& _array_int16_field) +{ + m_array_int16_field = std::move(_array_int16_field); +} + +/*! + * @brief This function returns a constant reference to member array_int16_field + * @return Constant reference to member array_int16_field + */ +const std::array& KeyedCompleteTestType::array_int16_field() const +{ + return m_array_int16_field; +} + +/*! + * @brief This function returns a reference to member array_int16_field + * @return Reference to member array_int16_field + */ +std::array& KeyedCompleteTestType::array_int16_field() +{ + return m_array_int16_field; +} +/*! + * @brief This function copies the value in member array_uint16_field + * @param _array_uint16_field New value to be copied in member array_uint16_field + */ +void KeyedCompleteTestType::array_uint16_field( + const std::array& _array_uint16_field) +{ + m_array_uint16_field = _array_uint16_field; +} + +/*! + * @brief This function moves the value in member array_uint16_field + * @param _array_uint16_field New value to be moved in member array_uint16_field + */ +void KeyedCompleteTestType::array_uint16_field( + std::array&& _array_uint16_field) +{ + m_array_uint16_field = std::move(_array_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint16_field + * @return Constant reference to member array_uint16_field + */ +const std::array& KeyedCompleteTestType::array_uint16_field() const +{ + return m_array_uint16_field; +} + +/*! + * @brief This function returns a reference to member array_uint16_field + * @return Reference to member array_uint16_field + */ +std::array& KeyedCompleteTestType::array_uint16_field() +{ + return m_array_uint16_field; +} +/*! + * @brief This function copies the value in member array_int32_field + * @param _array_int32_field New value to be copied in member array_int32_field + */ +void KeyedCompleteTestType::array_int32_field( + const std::array& _array_int32_field) +{ + m_array_int32_field = _array_int32_field; +} + +/*! + * @brief This function moves the value in member array_int32_field + * @param _array_int32_field New value to be moved in member array_int32_field + */ +void KeyedCompleteTestType::array_int32_field( + std::array&& _array_int32_field) +{ + m_array_int32_field = std::move(_array_int32_field); +} + +/*! + * @brief This function returns a constant reference to member array_int32_field + * @return Constant reference to member array_int32_field + */ +const std::array& KeyedCompleteTestType::array_int32_field() const +{ + return m_array_int32_field; +} + +/*! + * @brief This function returns a reference to member array_int32_field + * @return Reference to member array_int32_field + */ +std::array& KeyedCompleteTestType::array_int32_field() +{ + return m_array_int32_field; +} +/*! + * @brief This function copies the value in member array_uint32_field + * @param _array_uint32_field New value to be copied in member array_uint32_field + */ +void KeyedCompleteTestType::array_uint32_field( + const std::array& _array_uint32_field) +{ + m_array_uint32_field = _array_uint32_field; +} + +/*! + * @brief This function moves the value in member array_uint32_field + * @param _array_uint32_field New value to be moved in member array_uint32_field + */ +void KeyedCompleteTestType::array_uint32_field( + std::array&& _array_uint32_field) +{ + m_array_uint32_field = std::move(_array_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint32_field + * @return Constant reference to member array_uint32_field + */ +const std::array& KeyedCompleteTestType::array_uint32_field() const +{ + return m_array_uint32_field; +} + +/*! + * @brief This function returns a reference to member array_uint32_field + * @return Reference to member array_uint32_field + */ +std::array& KeyedCompleteTestType::array_uint32_field() +{ + return m_array_uint32_field; +} +/*! + * @brief This function copies the value in member array_int64_field + * @param _array_int64_field New value to be copied in member array_int64_field + */ +void KeyedCompleteTestType::array_int64_field( + const std::array& _array_int64_field) +{ + m_array_int64_field = _array_int64_field; +} + +/*! + * @brief This function moves the value in member array_int64_field + * @param _array_int64_field New value to be moved in member array_int64_field + */ +void KeyedCompleteTestType::array_int64_field( + std::array&& _array_int64_field) +{ + m_array_int64_field = std::move(_array_int64_field); +} + +/*! + * @brief This function returns a constant reference to member array_int64_field + * @return Constant reference to member array_int64_field + */ +const std::array& KeyedCompleteTestType::array_int64_field() const +{ + return m_array_int64_field; +} + +/*! + * @brief This function returns a reference to member array_int64_field + * @return Reference to member array_int64_field + */ +std::array& KeyedCompleteTestType::array_int64_field() +{ + return m_array_int64_field; +} +/*! + * @brief This function copies the value in member array_uint64_field + * @param _array_uint64_field New value to be copied in member array_uint64_field + */ +void KeyedCompleteTestType::array_uint64_field( + const std::array& _array_uint64_field) +{ + m_array_uint64_field = _array_uint64_field; +} + +/*! + * @brief This function moves the value in member array_uint64_field + * @param _array_uint64_field New value to be moved in member array_uint64_field + */ +void KeyedCompleteTestType::array_uint64_field( + std::array&& _array_uint64_field) +{ + m_array_uint64_field = std::move(_array_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member array_uint64_field + * @return Constant reference to member array_uint64_field + */ +const std::array& KeyedCompleteTestType::array_uint64_field() const +{ + return m_array_uint64_field; +} + +/*! + * @brief This function returns a reference to member array_uint64_field + * @return Reference to member array_uint64_field + */ +std::array& KeyedCompleteTestType::array_uint64_field() +{ + return m_array_uint64_field; +} +/*! + * @brief This function copies the value in member array_float_field + * @param _array_float_field New value to be copied in member array_float_field + */ +void KeyedCompleteTestType::array_float_field( + const std::array& _array_float_field) +{ + m_array_float_field = _array_float_field; +} + +/*! + * @brief This function moves the value in member array_float_field + * @param _array_float_field New value to be moved in member array_float_field + */ +void KeyedCompleteTestType::array_float_field( + std::array&& _array_float_field) +{ + m_array_float_field = std::move(_array_float_field); +} + +/*! + * @brief This function returns a constant reference to member array_float_field + * @return Constant reference to member array_float_field + */ +const std::array& KeyedCompleteTestType::array_float_field() const +{ + return m_array_float_field; +} + +/*! + * @brief This function returns a reference to member array_float_field + * @return Reference to member array_float_field + */ +std::array& KeyedCompleteTestType::array_float_field() +{ + return m_array_float_field; +} +/*! + * @brief This function copies the value in member array_double_field + * @param _array_double_field New value to be copied in member array_double_field + */ +void KeyedCompleteTestType::array_double_field( + const std::array& _array_double_field) +{ + m_array_double_field = _array_double_field; +} + +/*! + * @brief This function moves the value in member array_double_field + * @param _array_double_field New value to be moved in member array_double_field + */ +void KeyedCompleteTestType::array_double_field( + std::array&& _array_double_field) +{ + m_array_double_field = std::move(_array_double_field); +} + +/*! + * @brief This function returns a constant reference to member array_double_field + * @return Constant reference to member array_double_field + */ +const std::array& KeyedCompleteTestType::array_double_field() const +{ + return m_array_double_field; +} + +/*! + * @brief This function returns a reference to member array_double_field + * @return Reference to member array_double_field + */ +std::array& KeyedCompleteTestType::array_double_field() +{ + return m_array_double_field; +} +/*! + * @brief This function copies the value in member array_bool_field + * @param _array_bool_field New value to be copied in member array_bool_field + */ +void KeyedCompleteTestType::array_bool_field( + const std::array& _array_bool_field) +{ + m_array_bool_field = _array_bool_field; +} + +/*! + * @brief This function moves the value in member array_bool_field + * @param _array_bool_field New value to be moved in member array_bool_field + */ +void KeyedCompleteTestType::array_bool_field( + std::array&& _array_bool_field) +{ + m_array_bool_field = std::move(_array_bool_field); +} + +/*! + * @brief This function returns a constant reference to member array_bool_field + * @return Constant reference to member array_bool_field + */ +const std::array& KeyedCompleteTestType::array_bool_field() const +{ + return m_array_bool_field; +} + +/*! + * @brief This function returns a reference to member array_bool_field + * @return Reference to member array_bool_field + */ +std::array& KeyedCompleteTestType::array_bool_field() +{ + return m_array_bool_field; +} +/*! + * @brief This function copies the value in member array_enum_field + * @param _array_enum_field New value to be copied in member array_enum_field + */ +void KeyedCompleteTestType::array_enum_field( + const std::array& _array_enum_field) +{ + m_array_enum_field = _array_enum_field; +} + +/*! + * @brief This function moves the value in member array_enum_field + * @param _array_enum_field New value to be moved in member array_enum_field + */ +void KeyedCompleteTestType::array_enum_field( + std::array&& _array_enum_field) +{ + m_array_enum_field = std::move(_array_enum_field); +} + +/*! + * @brief This function returns a constant reference to member array_enum_field + * @return Constant reference to member array_enum_field + */ +const std::array& KeyedCompleteTestType::array_enum_field() const +{ + return m_array_enum_field; +} + +/*! + * @brief This function returns a reference to member array_enum_field + * @return Reference to member array_enum_field + */ +std::array& KeyedCompleteTestType::array_enum_field() +{ + return m_array_enum_field; +} +/*! + * @brief This function copies the value in member array_enum2_field + * @param _array_enum2_field New value to be copied in member array_enum2_field + */ +void KeyedCompleteTestType::array_enum2_field( + const std::array& _array_enum2_field) +{ + m_array_enum2_field = _array_enum2_field; +} + +/*! + * @brief This function moves the value in member array_enum2_field + * @param _array_enum2_field New value to be moved in member array_enum2_field + */ +void KeyedCompleteTestType::array_enum2_field( + std::array&& _array_enum2_field) +{ + m_array_enum2_field = std::move(_array_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member array_enum2_field + * @return Constant reference to member array_enum2_field + */ +const std::array& KeyedCompleteTestType::array_enum2_field() const +{ + return m_array_enum2_field; +} + +/*! + * @brief This function returns a reference to member array_enum2_field + * @return Reference to member array_enum2_field + */ +std::array& KeyedCompleteTestType::array_enum2_field() +{ + return m_array_enum2_field; +} +/*! + * @brief This function copies the value in member array_struct_field + * @param _array_struct_field New value to be copied in member array_struct_field + */ +void KeyedCompleteTestType::array_struct_field( + const std::array& _array_struct_field) +{ + m_array_struct_field = _array_struct_field; +} + +/*! + * @brief This function moves the value in member array_struct_field + * @param _array_struct_field New value to be moved in member array_struct_field + */ +void KeyedCompleteTestType::array_struct_field( + std::array&& _array_struct_field) +{ + m_array_struct_field = std::move(_array_struct_field); +} + +/*! + * @brief This function returns a constant reference to member array_struct_field + * @return Constant reference to member array_struct_field + */ +const std::array& KeyedCompleteTestType::array_struct_field() const +{ + return m_array_struct_field; +} + +/*! + * @brief This function returns a reference to member array_struct_field + * @return Reference to member array_struct_field + */ +std::array& KeyedCompleteTestType::array_struct_field() +{ + return m_array_struct_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field + */ +void KeyedCompleteTestType::bounded_sequence_char_field( + const std::vector& _bounded_sequence_char_field) +{ + m_bounded_sequence_char_field = _bounded_sequence_char_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field + */ +void KeyedCompleteTestType::bounded_sequence_char_field( + std::vector&& _bounded_sequence_char_field) +{ + m_bounded_sequence_char_field = std::move(_bounded_sequence_char_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_char_field + * @return Constant reference to member bounded_sequence_char_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_char_field() const +{ + return m_bounded_sequence_char_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_char_field + * @return Reference to member bounded_sequence_char_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_char_field() +{ + return m_bounded_sequence_char_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field + */ +void KeyedCompleteTestType::bounded_sequence_uint8_field( + const std::vector& _bounded_sequence_uint8_field) +{ + m_bounded_sequence_uint8_field = _bounded_sequence_uint8_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field + */ +void KeyedCompleteTestType::bounded_sequence_uint8_field( + std::vector&& _bounded_sequence_uint8_field) +{ + m_bounded_sequence_uint8_field = std::move(_bounded_sequence_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint8_field + * @return Constant reference to member bounded_sequence_uint8_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_uint8_field() const +{ + return m_bounded_sequence_uint8_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint8_field + * @return Reference to member bounded_sequence_uint8_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_uint8_field() +{ + return m_bounded_sequence_uint8_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field + */ +void KeyedCompleteTestType::bounded_sequence_int16_field( + const std::vector& _bounded_sequence_int16_field) +{ + m_bounded_sequence_int16_field = _bounded_sequence_int16_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field + */ +void KeyedCompleteTestType::bounded_sequence_int16_field( + std::vector&& _bounded_sequence_int16_field) +{ + m_bounded_sequence_int16_field = std::move(_bounded_sequence_int16_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int16_field + * @return Constant reference to member bounded_sequence_int16_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_int16_field() const +{ + return m_bounded_sequence_int16_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int16_field + * @return Reference to member bounded_sequence_int16_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_int16_field() +{ + return m_bounded_sequence_int16_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field + */ +void KeyedCompleteTestType::bounded_sequence_uint16_field( + const std::vector& _bounded_sequence_uint16_field) +{ + m_bounded_sequence_uint16_field = _bounded_sequence_uint16_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field + */ +void KeyedCompleteTestType::bounded_sequence_uint16_field( + std::vector&& _bounded_sequence_uint16_field) +{ + m_bounded_sequence_uint16_field = std::move(_bounded_sequence_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint16_field + * @return Constant reference to member bounded_sequence_uint16_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_uint16_field() const +{ + return m_bounded_sequence_uint16_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint16_field + * @return Reference to member bounded_sequence_uint16_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_uint16_field() +{ + return m_bounded_sequence_uint16_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field + */ +void KeyedCompleteTestType::bounded_sequence_int32_field( + const std::vector& _bounded_sequence_int32_field) +{ + m_bounded_sequence_int32_field = _bounded_sequence_int32_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field + */ +void KeyedCompleteTestType::bounded_sequence_int32_field( + std::vector&& _bounded_sequence_int32_field) +{ + m_bounded_sequence_int32_field = std::move(_bounded_sequence_int32_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int32_field + * @return Constant reference to member bounded_sequence_int32_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_int32_field() const +{ + return m_bounded_sequence_int32_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int32_field + * @return Reference to member bounded_sequence_int32_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_int32_field() +{ + return m_bounded_sequence_int32_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field + */ +void KeyedCompleteTestType::bounded_sequence_uint32_field( + const std::vector& _bounded_sequence_uint32_field) +{ + m_bounded_sequence_uint32_field = _bounded_sequence_uint32_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field + */ +void KeyedCompleteTestType::bounded_sequence_uint32_field( + std::vector&& _bounded_sequence_uint32_field) +{ + m_bounded_sequence_uint32_field = std::move(_bounded_sequence_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint32_field + * @return Constant reference to member bounded_sequence_uint32_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_uint32_field() const +{ + return m_bounded_sequence_uint32_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint32_field + * @return Reference to member bounded_sequence_uint32_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_uint32_field() +{ + return m_bounded_sequence_uint32_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field + */ +void KeyedCompleteTestType::bounded_sequence_int64_field( + const std::vector& _bounded_sequence_int64_field) +{ + m_bounded_sequence_int64_field = _bounded_sequence_int64_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field + */ +void KeyedCompleteTestType::bounded_sequence_int64_field( + std::vector&& _bounded_sequence_int64_field) +{ + m_bounded_sequence_int64_field = std::move(_bounded_sequence_int64_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_int64_field + * @return Constant reference to member bounded_sequence_int64_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_int64_field() const +{ + return m_bounded_sequence_int64_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_int64_field + * @return Reference to member bounded_sequence_int64_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_int64_field() +{ + return m_bounded_sequence_int64_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field + */ +void KeyedCompleteTestType::bounded_sequence_uint64_field( + const std::vector& _bounded_sequence_uint64_field) +{ + m_bounded_sequence_uint64_field = _bounded_sequence_uint64_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field + */ +void KeyedCompleteTestType::bounded_sequence_uint64_field( + std::vector&& _bounded_sequence_uint64_field) +{ + m_bounded_sequence_uint64_field = std::move(_bounded_sequence_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_uint64_field + * @return Constant reference to member bounded_sequence_uint64_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_uint64_field() const +{ + return m_bounded_sequence_uint64_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_uint64_field + * @return Reference to member bounded_sequence_uint64_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_uint64_field() +{ + return m_bounded_sequence_uint64_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field + */ +void KeyedCompleteTestType::bounded_sequence_float_field( + const std::vector& _bounded_sequence_float_field) +{ + m_bounded_sequence_float_field = _bounded_sequence_float_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field + */ +void KeyedCompleteTestType::bounded_sequence_float_field( + std::vector&& _bounded_sequence_float_field) +{ + m_bounded_sequence_float_field = std::move(_bounded_sequence_float_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_float_field + * @return Constant reference to member bounded_sequence_float_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_float_field() const +{ + return m_bounded_sequence_float_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_float_field + * @return Reference to member bounded_sequence_float_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_float_field() +{ + return m_bounded_sequence_float_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field + */ +void KeyedCompleteTestType::bounded_sequence_double_field( + const std::vector& _bounded_sequence_double_field) +{ + m_bounded_sequence_double_field = _bounded_sequence_double_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field + */ +void KeyedCompleteTestType::bounded_sequence_double_field( + std::vector&& _bounded_sequence_double_field) +{ + m_bounded_sequence_double_field = std::move(_bounded_sequence_double_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_double_field + * @return Constant reference to member bounded_sequence_double_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_double_field() const +{ + return m_bounded_sequence_double_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_double_field + * @return Reference to member bounded_sequence_double_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_double_field() +{ + return m_bounded_sequence_double_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field + */ +void KeyedCompleteTestType::bounded_sequence_bool_field( + const std::vector& _bounded_sequence_bool_field) +{ + m_bounded_sequence_bool_field = _bounded_sequence_bool_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field + */ +void KeyedCompleteTestType::bounded_sequence_bool_field( + std::vector&& _bounded_sequence_bool_field) +{ + m_bounded_sequence_bool_field = std::move(_bounded_sequence_bool_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_bool_field + * @return Constant reference to member bounded_sequence_bool_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_bool_field() const +{ + return m_bounded_sequence_bool_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_bool_field + * @return Reference to member bounded_sequence_bool_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_bool_field() +{ + return m_bounded_sequence_bool_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field + */ +void KeyedCompleteTestType::bounded_sequence_enum_field( + const std::vector& _bounded_sequence_enum_field) +{ + m_bounded_sequence_enum_field = _bounded_sequence_enum_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field + */ +void KeyedCompleteTestType::bounded_sequence_enum_field( + std::vector&& _bounded_sequence_enum_field) +{ + m_bounded_sequence_enum_field = std::move(_bounded_sequence_enum_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_enum_field + * @return Constant reference to member bounded_sequence_enum_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_enum_field() const +{ + return m_bounded_sequence_enum_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_enum_field + * @return Reference to member bounded_sequence_enum_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_enum_field() +{ + return m_bounded_sequence_enum_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field + */ +void KeyedCompleteTestType::bounded_sequence_enum2_field( + const std::vector& _bounded_sequence_enum2_field) +{ + m_bounded_sequence_enum2_field = _bounded_sequence_enum2_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field + */ +void KeyedCompleteTestType::bounded_sequence_enum2_field( + std::vector&& _bounded_sequence_enum2_field) +{ + m_bounded_sequence_enum2_field = std::move(_bounded_sequence_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_enum2_field + * @return Constant reference to member bounded_sequence_enum2_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_enum2_field() const +{ + return m_bounded_sequence_enum2_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_enum2_field + * @return Reference to member bounded_sequence_enum2_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_enum2_field() +{ + return m_bounded_sequence_enum2_field; +} +/*! + * @brief This function copies the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field + */ +void KeyedCompleteTestType::bounded_sequence_struct_field( + const std::vector& _bounded_sequence_struct_field) +{ + m_bounded_sequence_struct_field = _bounded_sequence_struct_field; +} + +/*! + * @brief This function moves the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field + */ +void KeyedCompleteTestType::bounded_sequence_struct_field( + std::vector&& _bounded_sequence_struct_field) +{ + m_bounded_sequence_struct_field = std::move(_bounded_sequence_struct_field); +} + +/*! + * @brief This function returns a constant reference to member bounded_sequence_struct_field + * @return Constant reference to member bounded_sequence_struct_field + */ +const std::vector& KeyedCompleteTestType::bounded_sequence_struct_field() const +{ + return m_bounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member bounded_sequence_struct_field + * @return Reference to member bounded_sequence_struct_field + */ +std::vector& KeyedCompleteTestType::bounded_sequence_struct_field() +{ + return m_bounded_sequence_struct_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field + */ +void KeyedCompleteTestType::unbounded_sequence_char_field( + const std::vector& _unbounded_sequence_char_field) +{ + m_unbounded_sequence_char_field = _unbounded_sequence_char_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field + */ +void KeyedCompleteTestType::unbounded_sequence_char_field( + std::vector&& _unbounded_sequence_char_field) +{ + m_unbounded_sequence_char_field = std::move(_unbounded_sequence_char_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_char_field + * @return Constant reference to member unbounded_sequence_char_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_char_field() const +{ + return m_unbounded_sequence_char_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_char_field + * @return Reference to member unbounded_sequence_char_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_char_field() +{ + return m_unbounded_sequence_char_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint8_field( + const std::vector& _unbounded_sequence_uint8_field) +{ + m_unbounded_sequence_uint8_field = _unbounded_sequence_uint8_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint8_field( + std::vector&& _unbounded_sequence_uint8_field) +{ + m_unbounded_sequence_uint8_field = std::move(_unbounded_sequence_uint8_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint8_field + * @return Constant reference to member unbounded_sequence_uint8_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_uint8_field() const +{ + return m_unbounded_sequence_uint8_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint8_field + * @return Reference to member unbounded_sequence_uint8_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_uint8_field() +{ + return m_unbounded_sequence_uint8_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field + */ +void KeyedCompleteTestType::unbounded_sequence_int16_field( + const std::vector& _unbounded_sequence_int16_field) +{ + m_unbounded_sequence_int16_field = _unbounded_sequence_int16_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field + */ +void KeyedCompleteTestType::unbounded_sequence_int16_field( + std::vector&& _unbounded_sequence_int16_field) +{ + m_unbounded_sequence_int16_field = std::move(_unbounded_sequence_int16_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int16_field + * @return Constant reference to member unbounded_sequence_int16_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_int16_field() const +{ + return m_unbounded_sequence_int16_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int16_field + * @return Reference to member unbounded_sequence_int16_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_int16_field() +{ + return m_unbounded_sequence_int16_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint16_field( + const std::vector& _unbounded_sequence_uint16_field) +{ + m_unbounded_sequence_uint16_field = _unbounded_sequence_uint16_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint16_field( + std::vector&& _unbounded_sequence_uint16_field) +{ + m_unbounded_sequence_uint16_field = std::move(_unbounded_sequence_uint16_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint16_field + * @return Constant reference to member unbounded_sequence_uint16_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_uint16_field() const +{ + return m_unbounded_sequence_uint16_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint16_field + * @return Reference to member unbounded_sequence_uint16_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_uint16_field() +{ + return m_unbounded_sequence_uint16_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field + */ +void KeyedCompleteTestType::unbounded_sequence_int32_field( + const std::vector& _unbounded_sequence_int32_field) +{ + m_unbounded_sequence_int32_field = _unbounded_sequence_int32_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field + */ +void KeyedCompleteTestType::unbounded_sequence_int32_field( + std::vector&& _unbounded_sequence_int32_field) +{ + m_unbounded_sequence_int32_field = std::move(_unbounded_sequence_int32_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int32_field + * @return Constant reference to member unbounded_sequence_int32_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_int32_field() const +{ + return m_unbounded_sequence_int32_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int32_field + * @return Reference to member unbounded_sequence_int32_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_int32_field() +{ + return m_unbounded_sequence_int32_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint32_field( + const std::vector& _unbounded_sequence_uint32_field) +{ + m_unbounded_sequence_uint32_field = _unbounded_sequence_uint32_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint32_field( + std::vector&& _unbounded_sequence_uint32_field) +{ + m_unbounded_sequence_uint32_field = std::move(_unbounded_sequence_uint32_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint32_field + * @return Constant reference to member unbounded_sequence_uint32_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_uint32_field() const +{ + return m_unbounded_sequence_uint32_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint32_field + * @return Reference to member unbounded_sequence_uint32_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_uint32_field() +{ + return m_unbounded_sequence_uint32_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field + */ +void KeyedCompleteTestType::unbounded_sequence_int64_field( + const std::vector& _unbounded_sequence_int64_field) +{ + m_unbounded_sequence_int64_field = _unbounded_sequence_int64_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field + */ +void KeyedCompleteTestType::unbounded_sequence_int64_field( + std::vector&& _unbounded_sequence_int64_field) +{ + m_unbounded_sequence_int64_field = std::move(_unbounded_sequence_int64_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_int64_field + * @return Constant reference to member unbounded_sequence_int64_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_int64_field() const +{ + return m_unbounded_sequence_int64_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_int64_field + * @return Reference to member unbounded_sequence_int64_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_int64_field() +{ + return m_unbounded_sequence_int64_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint64_field( + const std::vector& _unbounded_sequence_uint64_field) +{ + m_unbounded_sequence_uint64_field = _unbounded_sequence_uint64_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field + */ +void KeyedCompleteTestType::unbounded_sequence_uint64_field( + std::vector&& _unbounded_sequence_uint64_field) +{ + m_unbounded_sequence_uint64_field = std::move(_unbounded_sequence_uint64_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_uint64_field + * @return Constant reference to member unbounded_sequence_uint64_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_uint64_field() const +{ + return m_unbounded_sequence_uint64_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_uint64_field + * @return Reference to member unbounded_sequence_uint64_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_uint64_field() +{ + return m_unbounded_sequence_uint64_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field + */ +void KeyedCompleteTestType::unbounded_sequence_float_field( + const std::vector& _unbounded_sequence_float_field) +{ + m_unbounded_sequence_float_field = _unbounded_sequence_float_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field + */ +void KeyedCompleteTestType::unbounded_sequence_float_field( + std::vector&& _unbounded_sequence_float_field) +{ + m_unbounded_sequence_float_field = std::move(_unbounded_sequence_float_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_float_field + * @return Constant reference to member unbounded_sequence_float_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_float_field() const +{ + return m_unbounded_sequence_float_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_float_field + * @return Reference to member unbounded_sequence_float_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_float_field() +{ + return m_unbounded_sequence_float_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field + */ +void KeyedCompleteTestType::unbounded_sequence_double_field( + const std::vector& _unbounded_sequence_double_field) +{ + m_unbounded_sequence_double_field = _unbounded_sequence_double_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field + */ +void KeyedCompleteTestType::unbounded_sequence_double_field( + std::vector&& _unbounded_sequence_double_field) +{ + m_unbounded_sequence_double_field = std::move(_unbounded_sequence_double_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_double_field + * @return Constant reference to member unbounded_sequence_double_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_double_field() const +{ + return m_unbounded_sequence_double_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_double_field + * @return Reference to member unbounded_sequence_double_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_double_field() +{ + return m_unbounded_sequence_double_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field + */ +void KeyedCompleteTestType::unbounded_sequence_bool_field( + const std::vector& _unbounded_sequence_bool_field) +{ + m_unbounded_sequence_bool_field = _unbounded_sequence_bool_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field + */ +void KeyedCompleteTestType::unbounded_sequence_bool_field( + std::vector&& _unbounded_sequence_bool_field) +{ + m_unbounded_sequence_bool_field = std::move(_unbounded_sequence_bool_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_bool_field + * @return Constant reference to member unbounded_sequence_bool_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_bool_field() const +{ + return m_unbounded_sequence_bool_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_bool_field + * @return Reference to member unbounded_sequence_bool_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_bool_field() +{ + return m_unbounded_sequence_bool_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field + */ +void KeyedCompleteTestType::unbounded_sequence_enum_field( + const std::vector& _unbounded_sequence_enum_field) +{ + m_unbounded_sequence_enum_field = _unbounded_sequence_enum_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field + */ +void KeyedCompleteTestType::unbounded_sequence_enum_field( + std::vector&& _unbounded_sequence_enum_field) +{ + m_unbounded_sequence_enum_field = std::move(_unbounded_sequence_enum_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_enum_field + * @return Constant reference to member unbounded_sequence_enum_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_enum_field() const +{ + return m_unbounded_sequence_enum_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_enum_field + * @return Reference to member unbounded_sequence_enum_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_enum_field() +{ + return m_unbounded_sequence_enum_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field + */ +void KeyedCompleteTestType::unbounded_sequence_enum2_field( + const std::vector& _unbounded_sequence_enum2_field) +{ + m_unbounded_sequence_enum2_field = _unbounded_sequence_enum2_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field + */ +void KeyedCompleteTestType::unbounded_sequence_enum2_field( + std::vector&& _unbounded_sequence_enum2_field) +{ + m_unbounded_sequence_enum2_field = std::move(_unbounded_sequence_enum2_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_enum2_field + * @return Constant reference to member unbounded_sequence_enum2_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_enum2_field() const +{ + return m_unbounded_sequence_enum2_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_enum2_field + * @return Reference to member unbounded_sequence_enum2_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_enum2_field() +{ + return m_unbounded_sequence_enum2_field; +} +/*! + * @brief This function copies the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field + */ +void KeyedCompleteTestType::unbounded_sequence_struct_field( + const std::vector& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = _unbounded_sequence_struct_field; +} + +/*! + * @brief This function moves the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field + */ +void KeyedCompleteTestType::unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); +} + +/*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ +const std::vector& KeyedCompleteTestType::unbounded_sequence_struct_field() const +{ + return m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ +std::vector& KeyedCompleteTestType::unbounded_sequence_struct_field() +{ + return m_unbounded_sequence_struct_field; +} + +size_t KeyedCompleteTestType::getKeyMaxCdrSerializedSize( + size_t current_alignment) +{ + size_t current_align = current_alignment; + + + current_align += 4 + eprosima::fastcdr::Cdr::alignment(current_align, 4); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + return current_align; +} + +bool KeyedCompleteTestType::isKeyDefined() +{ + return true; +} + +void KeyedCompleteTestType::serializeKey( + eprosima::fastcdr::Cdr& scdr) const +{ + (void) scdr; + scdr << m_id; + +} diff --git a/fastdds_python/test/types/test_complete.h b/fastdds_python/test/types/test_complete.h new file mode 100644 index 00000000..60d7763e --- /dev/null +++ b/fastdds_python/test/types/test_complete.h @@ -0,0 +1,3568 @@ +// 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 test_complete.h + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool gen. + */ + +#ifndef _FAST_DDS_GENERATED_TEST_COMPLETE_H_ +#define _FAST_DDS_GENERATED_TEST_COMPLETE_H_ + + +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(test_complete_SOURCE) +#define test_complete_DllAPI __declspec( dllexport ) +#else +#define test_complete_DllAPI __declspec( dllimport ) +#endif // test_complete_SOURCE +#else +#define test_complete_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define test_complete_DllAPI +#endif // _WIN32 + +namespace eprosima { +namespace fastcdr { +class Cdr; +} // namespace fastcdr +} // namespace eprosima + + +/*! + * @brief This class represents the enumeration Color defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +enum Color : uint32_t +{ + RED, + GREEN, + BLUE, + YELLOW, + MAGENTA +}; +/*! + * @brief This class represents the enumeration Material defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +enum Material : uint32_t +{ + WOOD, + PLASTIC, + METAL, + CONCRETE, + STONE +}; +/*! + * @brief This class represents the structure StructType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class StructType +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport StructType(); + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~StructType(); + + /*! + * @brief Copy constructor. + * @param x Reference to the object StructType that will be copied. + */ + eProsima_user_DllExport StructType( + const StructType& x); + + /*! + * @brief Move constructor. + * @param x Reference to the object StructType that will be copied. + */ + eProsima_user_DllExport StructType( + StructType&& x); + + /*! + * @brief Copy assignment. + * @param x Reference to the object StructType that will be copied. + */ + eProsima_user_DllExport StructType& operator =( + const StructType& x); + + /*! + * @brief Move assignment. + * @param x Reference to the object StructType that will be copied. + */ + eProsima_user_DllExport StructType& operator =( + StructType&& x); + + /*! + * @brief Comparison operator. + * @param x StructType object to compare. + */ + eProsima_user_DllExport bool operator ==( + const StructType& x) const; + + /*! + * @brief Comparison operator. + * @param x StructType object to compare. + */ + eProsima_user_DllExport bool operator !=( + const StructType& x) const; + + /*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ + eProsima_user_DllExport void char_field( + char _char_field); + + /*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ + eProsima_user_DllExport char char_field() const; + + /*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ + eProsima_user_DllExport char& char_field(); + + /*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ + eProsima_user_DllExport void uint8_field( + uint8_t _uint8_field); + + /*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ + eProsima_user_DllExport uint8_t uint8_field() const; + + /*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ + eProsima_user_DllExport uint8_t& uint8_field(); + + /*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ + eProsima_user_DllExport void int16_field( + int16_t _int16_field); + + /*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ + eProsima_user_DllExport int16_t int16_field() const; + + /*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ + eProsima_user_DllExport int16_t& int16_field(); + + /*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ + eProsima_user_DllExport void uint16_field( + uint16_t _uint16_field); + + /*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ + eProsima_user_DllExport uint16_t uint16_field() const; + + /*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ + eProsima_user_DllExport uint16_t& uint16_field(); + + /*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ + eProsima_user_DllExport void int32_field( + int32_t _int32_field); + + /*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ + eProsima_user_DllExport int32_t int32_field() const; + + /*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ + eProsima_user_DllExport int32_t& int32_field(); + + /*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ + eProsima_user_DllExport void uint32_field( + uint32_t _uint32_field); + + /*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ + eProsima_user_DllExport uint32_t uint32_field() const; + + /*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ + eProsima_user_DllExport uint32_t& uint32_field(); + + /*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ + eProsima_user_DllExport void int64_field( + int64_t _int64_field); + + /*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ + eProsima_user_DllExport int64_t int64_field() const; + + /*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ + eProsima_user_DllExport int64_t& int64_field(); + + /*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ + eProsima_user_DllExport void uint64_field( + uint64_t _uint64_field); + + /*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ + eProsima_user_DllExport uint64_t uint64_field() const; + + /*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ + eProsima_user_DllExport uint64_t& uint64_field(); + + /*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ + eProsima_user_DllExport void float_field( + float _float_field); + + /*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ + eProsima_user_DllExport float float_field() const; + + /*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ + eProsima_user_DllExport float& float_field(); + + /*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ + eProsima_user_DllExport void double_field( + double _double_field); + + /*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ + eProsima_user_DllExport double double_field() const; + + /*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ + eProsima_user_DllExport double& double_field(); + + /*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ + eProsima_user_DllExport void bool_field( + bool _bool_field); + + /*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ + eProsima_user_DllExport bool bool_field() const; + + /*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ + eProsima_user_DllExport bool& bool_field(); + + /*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ + eProsima_user_DllExport void string_field( + const std::string& _string_field); + + /*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ + eProsima_user_DllExport void string_field( + std::string&& _string_field); + + /*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ + eProsima_user_DllExport const std::string& string_field() const; + + /*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ + eProsima_user_DllExport std::string& string_field(); + /*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ + eProsima_user_DllExport void enum_field( + Color _enum_field); + + /*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ + eProsima_user_DllExport Color enum_field() const; + + /*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ + eProsima_user_DllExport Color& enum_field(); + + /*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ + eProsima_user_DllExport void enum2_field( + Material _enum2_field); + + /*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ + eProsima_user_DllExport Material enum2_field() const; + + /*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ + eProsima_user_DllExport Material& enum2_field(); + + + /*! + * @brief This function returns the maximum serialized size of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function returns the serialized size of a data depending on the buffer alignment. + * @param data Data which is calculated its serialized size. + * @param current_alignment Buffer alignment. + * @return Serialized size. + */ + eProsima_user_DllExport static size_t getCdrSerializedSize( + const StructType& data, + size_t current_alignment = 0); + + + /*! + * @brief This function serializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& cdr) const; + + /*! + * @brief This function deserializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr); + + + + /*! + * @brief This function returns the maximum serialized size of the Key of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function tells you if the Key has been defined for this type + */ + eProsima_user_DllExport static bool isKeyDefined(); + + /*! + * @brief This function serializes the key members of an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serializeKey( + eprosima::fastcdr::Cdr& cdr) const; + +private: + + char m_char_field; + uint8_t m_uint8_field; + int16_t m_int16_field; + uint16_t m_uint16_field; + int32_t m_int32_field; + uint32_t m_uint32_field; + int64_t m_int64_field; + uint64_t m_uint64_field; + float m_float_field; + double m_double_field; + bool m_bool_field; + std::string m_string_field; + Color m_enum_field; + Material m_enum2_field; +}; +const uint32_t max_array_size = 3; +const uint32_t max_seq_size = 5; +/*! + * @brief This class represents the structure CompleteTestType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class CompleteTestType +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport CompleteTestType(); + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~CompleteTestType(); + + /*! + * @brief Copy constructor. + * @param x Reference to the object CompleteTestType that will be copied. + */ + eProsima_user_DllExport CompleteTestType( + const CompleteTestType& x); + + /*! + * @brief Move constructor. + * @param x Reference to the object CompleteTestType that will be copied. + */ + eProsima_user_DllExport CompleteTestType( + CompleteTestType&& x); + + /*! + * @brief Copy assignment. + * @param x Reference to the object CompleteTestType that will be copied. + */ + eProsima_user_DllExport CompleteTestType& operator =( + const CompleteTestType& x); + + /*! + * @brief Move assignment. + * @param x Reference to the object CompleteTestType that will be copied. + */ + eProsima_user_DllExport CompleteTestType& operator =( + CompleteTestType&& x); + + /*! + * @brief Comparison operator. + * @param x CompleteTestType object to compare. + */ + eProsima_user_DllExport bool operator ==( + const CompleteTestType& x) const; + + /*! + * @brief Comparison operator. + * @param x CompleteTestType object to compare. + */ + eProsima_user_DllExport bool operator !=( + const CompleteTestType& x) const; + + /*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ + eProsima_user_DllExport void char_field( + char _char_field); + + /*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ + eProsima_user_DllExport char char_field() const; + + /*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ + eProsima_user_DllExport char& char_field(); + + /*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ + eProsima_user_DllExport void uint8_field( + uint8_t _uint8_field); + + /*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ + eProsima_user_DllExport uint8_t uint8_field() const; + + /*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ + eProsima_user_DllExport uint8_t& uint8_field(); + + /*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ + eProsima_user_DllExport void int16_field( + int16_t _int16_field); + + /*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ + eProsima_user_DllExport int16_t int16_field() const; + + /*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ + eProsima_user_DllExport int16_t& int16_field(); + + /*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ + eProsima_user_DllExport void uint16_field( + uint16_t _uint16_field); + + /*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ + eProsima_user_DllExport uint16_t uint16_field() const; + + /*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ + eProsima_user_DllExport uint16_t& uint16_field(); + + /*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ + eProsima_user_DllExport void int32_field( + int32_t _int32_field); + + /*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ + eProsima_user_DllExport int32_t int32_field() const; + + /*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ + eProsima_user_DllExport int32_t& int32_field(); + + /*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ + eProsima_user_DllExport void uint32_field( + uint32_t _uint32_field); + + /*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ + eProsima_user_DllExport uint32_t uint32_field() const; + + /*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ + eProsima_user_DllExport uint32_t& uint32_field(); + + /*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ + eProsima_user_DllExport void int64_field( + int64_t _int64_field); + + /*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ + eProsima_user_DllExport int64_t int64_field() const; + + /*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ + eProsima_user_DllExport int64_t& int64_field(); + + /*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ + eProsima_user_DllExport void uint64_field( + uint64_t _uint64_field); + + /*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ + eProsima_user_DllExport uint64_t uint64_field() const; + + /*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ + eProsima_user_DllExport uint64_t& uint64_field(); + + /*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ + eProsima_user_DllExport void float_field( + float _float_field); + + /*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ + eProsima_user_DllExport float float_field() const; + + /*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ + eProsima_user_DllExport float& float_field(); + + /*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ + eProsima_user_DllExport void double_field( + double _double_field); + + /*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ + eProsima_user_DllExport double double_field() const; + + /*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ + eProsima_user_DllExport double& double_field(); + + /*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ + eProsima_user_DllExport void bool_field( + bool _bool_field); + + /*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ + eProsima_user_DllExport bool bool_field() const; + + /*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ + eProsima_user_DllExport bool& bool_field(); + + /*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ + eProsima_user_DllExport void string_field( + const std::string& _string_field); + + /*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ + eProsima_user_DllExport void string_field( + std::string&& _string_field); + + /*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ + eProsima_user_DllExport const std::string& string_field() const; + + /*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ + eProsima_user_DllExport std::string& string_field(); + /*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ + eProsima_user_DllExport void enum_field( + Color _enum_field); + + /*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ + eProsima_user_DllExport Color enum_field() const; + + /*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ + eProsima_user_DllExport Color& enum_field(); + + /*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ + eProsima_user_DllExport void enum2_field( + Material _enum2_field); + + /*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ + eProsima_user_DllExport Material enum2_field() const; + + /*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ + eProsima_user_DllExport Material& enum2_field(); + + /*! + * @brief This function copies the value in member struct_field + * @param _struct_field New value to be copied in member struct_field + */ + eProsima_user_DllExport void struct_field( + const StructType& _struct_field); + + /*! + * @brief This function moves the value in member struct_field + * @param _struct_field New value to be moved in member struct_field + */ + eProsima_user_DllExport void struct_field( + StructType&& _struct_field); + + /*! + * @brief This function returns a constant reference to member struct_field + * @return Constant reference to member struct_field + */ + eProsima_user_DllExport const StructType& struct_field() const; + + /*! + * @brief This function returns a reference to member struct_field + * @return Reference to member struct_field + */ + eProsima_user_DllExport StructType& struct_field(); + /*! + * @brief This function copies the value in member array_char_field + * @param _array_char_field New value to be copied in member array_char_field + */ + eProsima_user_DllExport void array_char_field( + const std::array& _array_char_field); + + /*! + * @brief This function moves the value in member array_char_field + * @param _array_char_field New value to be moved in member array_char_field + */ + eProsima_user_DllExport void array_char_field( + std::array&& _array_char_field); + + /*! + * @brief This function returns a constant reference to member array_char_field + * @return Constant reference to member array_char_field + */ + eProsima_user_DllExport const std::array& array_char_field() const; + + /*! + * @brief This function returns a reference to member array_char_field + * @return Reference to member array_char_field + */ + eProsima_user_DllExport std::array& array_char_field(); + /*! + * @brief This function copies the value in member array_uint8_field + * @param _array_uint8_field New value to be copied in member array_uint8_field + */ + eProsima_user_DllExport void array_uint8_field( + const std::array& _array_uint8_field); + + /*! + * @brief This function moves the value in member array_uint8_field + * @param _array_uint8_field New value to be moved in member array_uint8_field + */ + eProsima_user_DllExport void array_uint8_field( + std::array&& _array_uint8_field); + + /*! + * @brief This function returns a constant reference to member array_uint8_field + * @return Constant reference to member array_uint8_field + */ + eProsima_user_DllExport const std::array& array_uint8_field() const; + + /*! + * @brief This function returns a reference to member array_uint8_field + * @return Reference to member array_uint8_field + */ + eProsima_user_DllExport std::array& array_uint8_field(); + /*! + * @brief This function copies the value in member array_int16_field + * @param _array_int16_field New value to be copied in member array_int16_field + */ + eProsima_user_DllExport void array_int16_field( + const std::array& _array_int16_field); + + /*! + * @brief This function moves the value in member array_int16_field + * @param _array_int16_field New value to be moved in member array_int16_field + */ + eProsima_user_DllExport void array_int16_field( + std::array&& _array_int16_field); + + /*! + * @brief This function returns a constant reference to member array_int16_field + * @return Constant reference to member array_int16_field + */ + eProsima_user_DllExport const std::array& array_int16_field() const; + + /*! + * @brief This function returns a reference to member array_int16_field + * @return Reference to member array_int16_field + */ + eProsima_user_DllExport std::array& array_int16_field(); + /*! + * @brief This function copies the value in member array_uint16_field + * @param _array_uint16_field New value to be copied in member array_uint16_field + */ + eProsima_user_DllExport void array_uint16_field( + const std::array& _array_uint16_field); + + /*! + * @brief This function moves the value in member array_uint16_field + * @param _array_uint16_field New value to be moved in member array_uint16_field + */ + eProsima_user_DllExport void array_uint16_field( + std::array&& _array_uint16_field); + + /*! + * @brief This function returns a constant reference to member array_uint16_field + * @return Constant reference to member array_uint16_field + */ + eProsima_user_DllExport const std::array& array_uint16_field() const; + + /*! + * @brief This function returns a reference to member array_uint16_field + * @return Reference to member array_uint16_field + */ + eProsima_user_DllExport std::array& array_uint16_field(); + /*! + * @brief This function copies the value in member array_int32_field + * @param _array_int32_field New value to be copied in member array_int32_field + */ + eProsima_user_DllExport void array_int32_field( + const std::array& _array_int32_field); + + /*! + * @brief This function moves the value in member array_int32_field + * @param _array_int32_field New value to be moved in member array_int32_field + */ + eProsima_user_DllExport void array_int32_field( + std::array&& _array_int32_field); + + /*! + * @brief This function returns a constant reference to member array_int32_field + * @return Constant reference to member array_int32_field + */ + eProsima_user_DllExport const std::array& array_int32_field() const; + + /*! + * @brief This function returns a reference to member array_int32_field + * @return Reference to member array_int32_field + */ + eProsima_user_DllExport std::array& array_int32_field(); + /*! + * @brief This function copies the value in member array_uint32_field + * @param _array_uint32_field New value to be copied in member array_uint32_field + */ + eProsima_user_DllExport void array_uint32_field( + const std::array& _array_uint32_field); + + /*! + * @brief This function moves the value in member array_uint32_field + * @param _array_uint32_field New value to be moved in member array_uint32_field + */ + eProsima_user_DllExport void array_uint32_field( + std::array&& _array_uint32_field); + + /*! + * @brief This function returns a constant reference to member array_uint32_field + * @return Constant reference to member array_uint32_field + */ + eProsima_user_DllExport const std::array& array_uint32_field() const; + + /*! + * @brief This function returns a reference to member array_uint32_field + * @return Reference to member array_uint32_field + */ + eProsima_user_DllExport std::array& array_uint32_field(); + /*! + * @brief This function copies the value in member array_int64_field + * @param _array_int64_field New value to be copied in member array_int64_field + */ + eProsima_user_DllExport void array_int64_field( + const std::array& _array_int64_field); + + /*! + * @brief This function moves the value in member array_int64_field + * @param _array_int64_field New value to be moved in member array_int64_field + */ + eProsima_user_DllExport void array_int64_field( + std::array&& _array_int64_field); + + /*! + * @brief This function returns a constant reference to member array_int64_field + * @return Constant reference to member array_int64_field + */ + eProsima_user_DllExport const std::array& array_int64_field() const; + + /*! + * @brief This function returns a reference to member array_int64_field + * @return Reference to member array_int64_field + */ + eProsima_user_DllExport std::array& array_int64_field(); + /*! + * @brief This function copies the value in member array_uint64_field + * @param _array_uint64_field New value to be copied in member array_uint64_field + */ + eProsima_user_DllExport void array_uint64_field( + const std::array& _array_uint64_field); + + /*! + * @brief This function moves the value in member array_uint64_field + * @param _array_uint64_field New value to be moved in member array_uint64_field + */ + eProsima_user_DllExport void array_uint64_field( + std::array&& _array_uint64_field); + + /*! + * @brief This function returns a constant reference to member array_uint64_field + * @return Constant reference to member array_uint64_field + */ + eProsima_user_DllExport const std::array& array_uint64_field() const; + + /*! + * @brief This function returns a reference to member array_uint64_field + * @return Reference to member array_uint64_field + */ + eProsima_user_DllExport std::array& array_uint64_field(); + /*! + * @brief This function copies the value in member array_float_field + * @param _array_float_field New value to be copied in member array_float_field + */ + eProsima_user_DllExport void array_float_field( + const std::array& _array_float_field); + + /*! + * @brief This function moves the value in member array_float_field + * @param _array_float_field New value to be moved in member array_float_field + */ + eProsima_user_DllExport void array_float_field( + std::array&& _array_float_field); + + /*! + * @brief This function returns a constant reference to member array_float_field + * @return Constant reference to member array_float_field + */ + eProsima_user_DllExport const std::array& array_float_field() const; + + /*! + * @brief This function returns a reference to member array_float_field + * @return Reference to member array_float_field + */ + eProsima_user_DllExport std::array& array_float_field(); + /*! + * @brief This function copies the value in member array_double_field + * @param _array_double_field New value to be copied in member array_double_field + */ + eProsima_user_DllExport void array_double_field( + const std::array& _array_double_field); + + /*! + * @brief This function moves the value in member array_double_field + * @param _array_double_field New value to be moved in member array_double_field + */ + eProsima_user_DllExport void array_double_field( + std::array&& _array_double_field); + + /*! + * @brief This function returns a constant reference to member array_double_field + * @return Constant reference to member array_double_field + */ + eProsima_user_DllExport const std::array& array_double_field() const; + + /*! + * @brief This function returns a reference to member array_double_field + * @return Reference to member array_double_field + */ + eProsima_user_DllExport std::array& array_double_field(); + /*! + * @brief This function copies the value in member array_bool_field + * @param _array_bool_field New value to be copied in member array_bool_field + */ + eProsima_user_DllExport void array_bool_field( + const std::array& _array_bool_field); + + /*! + * @brief This function moves the value in member array_bool_field + * @param _array_bool_field New value to be moved in member array_bool_field + */ + eProsima_user_DllExport void array_bool_field( + std::array&& _array_bool_field); + + /*! + * @brief This function returns a constant reference to member array_bool_field + * @return Constant reference to member array_bool_field + */ + eProsima_user_DllExport const std::array& array_bool_field() const; + + /*! + * @brief This function returns a reference to member array_bool_field + * @return Reference to member array_bool_field + */ + eProsima_user_DllExport std::array& array_bool_field(); + /*! + * @brief This function copies the value in member array_enum_field + * @param _array_enum_field New value to be copied in member array_enum_field + */ + eProsima_user_DllExport void array_enum_field( + const std::array& _array_enum_field); + + /*! + * @brief This function moves the value in member array_enum_field + * @param _array_enum_field New value to be moved in member array_enum_field + */ + eProsima_user_DllExport void array_enum_field( + std::array&& _array_enum_field); + + /*! + * @brief This function returns a constant reference to member array_enum_field + * @return Constant reference to member array_enum_field + */ + eProsima_user_DllExport const std::array& array_enum_field() const; + + /*! + * @brief This function returns a reference to member array_enum_field + * @return Reference to member array_enum_field + */ + eProsima_user_DllExport std::array& array_enum_field(); + /*! + * @brief This function copies the value in member array_enum2_field + * @param _array_enum2_field New value to be copied in member array_enum2_field + */ + eProsima_user_DllExport void array_enum2_field( + const std::array& _array_enum2_field); + + /*! + * @brief This function moves the value in member array_enum2_field + * @param _array_enum2_field New value to be moved in member array_enum2_field + */ + eProsima_user_DllExport void array_enum2_field( + std::array&& _array_enum2_field); + + /*! + * @brief This function returns a constant reference to member array_enum2_field + * @return Constant reference to member array_enum2_field + */ + eProsima_user_DllExport const std::array& array_enum2_field() const; + + /*! + * @brief This function returns a reference to member array_enum2_field + * @return Reference to member array_enum2_field + */ + eProsima_user_DllExport std::array& array_enum2_field(); + /*! + * @brief This function copies the value in member array_struct_field + * @param _array_struct_field New value to be copied in member array_struct_field + */ + eProsima_user_DllExport void array_struct_field( + const std::array& _array_struct_field); + + /*! + * @brief This function moves the value in member array_struct_field + * @param _array_struct_field New value to be moved in member array_struct_field + */ + eProsima_user_DllExport void array_struct_field( + std::array&& _array_struct_field); + + /*! + * @brief This function returns a constant reference to member array_struct_field + * @return Constant reference to member array_struct_field + */ + eProsima_user_DllExport const std::array& array_struct_field() const; + + /*! + * @brief This function returns a reference to member array_struct_field + * @return Reference to member array_struct_field + */ + eProsima_user_DllExport std::array& array_struct_field(); + /*! + * @brief This function copies the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field + */ + eProsima_user_DllExport void bounded_sequence_char_field( + const std::vector& _bounded_sequence_char_field); + + /*! + * @brief This function moves the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field + */ + eProsima_user_DllExport void bounded_sequence_char_field( + std::vector&& _bounded_sequence_char_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_char_field + * @return Constant reference to member bounded_sequence_char_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_char_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_char_field + * @return Reference to member bounded_sequence_char_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field + */ + eProsima_user_DllExport void bounded_sequence_uint8_field( + const std::vector& _bounded_sequence_uint8_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field + */ + eProsima_user_DllExport void bounded_sequence_uint8_field( + std::vector&& _bounded_sequence_uint8_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint8_field + * @return Constant reference to member bounded_sequence_uint8_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint8_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint8_field + * @return Reference to member bounded_sequence_uint8_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field + */ + eProsima_user_DllExport void bounded_sequence_int16_field( + const std::vector& _bounded_sequence_int16_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field + */ + eProsima_user_DllExport void bounded_sequence_int16_field( + std::vector&& _bounded_sequence_int16_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int16_field + * @return Constant reference to member bounded_sequence_int16_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int16_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int16_field + * @return Reference to member bounded_sequence_int16_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field + */ + eProsima_user_DllExport void bounded_sequence_uint16_field( + const std::vector& _bounded_sequence_uint16_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field + */ + eProsima_user_DllExport void bounded_sequence_uint16_field( + std::vector&& _bounded_sequence_uint16_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint16_field + * @return Constant reference to member bounded_sequence_uint16_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint16_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint16_field + * @return Reference to member bounded_sequence_uint16_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field + */ + eProsima_user_DllExport void bounded_sequence_int32_field( + const std::vector& _bounded_sequence_int32_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field + */ + eProsima_user_DllExport void bounded_sequence_int32_field( + std::vector&& _bounded_sequence_int32_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int32_field + * @return Constant reference to member bounded_sequence_int32_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int32_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int32_field + * @return Reference to member bounded_sequence_int32_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field + */ + eProsima_user_DllExport void bounded_sequence_uint32_field( + const std::vector& _bounded_sequence_uint32_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field + */ + eProsima_user_DllExport void bounded_sequence_uint32_field( + std::vector&& _bounded_sequence_uint32_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint32_field + * @return Constant reference to member bounded_sequence_uint32_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint32_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint32_field + * @return Reference to member bounded_sequence_uint32_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field + */ + eProsima_user_DllExport void bounded_sequence_int64_field( + const std::vector& _bounded_sequence_int64_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field + */ + eProsima_user_DllExport void bounded_sequence_int64_field( + std::vector&& _bounded_sequence_int64_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int64_field + * @return Constant reference to member bounded_sequence_int64_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int64_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int64_field + * @return Reference to member bounded_sequence_int64_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field + */ + eProsima_user_DllExport void bounded_sequence_uint64_field( + const std::vector& _bounded_sequence_uint64_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field + */ + eProsima_user_DllExport void bounded_sequence_uint64_field( + std::vector&& _bounded_sequence_uint64_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint64_field + * @return Constant reference to member bounded_sequence_uint64_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint64_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint64_field + * @return Reference to member bounded_sequence_uint64_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + /*! + * @brief This function copies the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field + */ + eProsima_user_DllExport void bounded_sequence_float_field( + const std::vector& _bounded_sequence_float_field); + + /*! + * @brief This function moves the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field + */ + eProsima_user_DllExport void bounded_sequence_float_field( + std::vector&& _bounded_sequence_float_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_float_field + * @return Constant reference to member bounded_sequence_float_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_float_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_float_field + * @return Reference to member bounded_sequence_float_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + /*! + * @brief This function copies the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field + */ + eProsima_user_DllExport void bounded_sequence_double_field( + const std::vector& _bounded_sequence_double_field); + + /*! + * @brief This function moves the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field + */ + eProsima_user_DllExport void bounded_sequence_double_field( + std::vector&& _bounded_sequence_double_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_double_field + * @return Constant reference to member bounded_sequence_double_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_double_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_double_field + * @return Reference to member bounded_sequence_double_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + /*! + * @brief This function copies the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field + */ + eProsima_user_DllExport void bounded_sequence_bool_field( + const std::vector& _bounded_sequence_bool_field); + + /*! + * @brief This function moves the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field + */ + eProsima_user_DllExport void bounded_sequence_bool_field( + std::vector&& _bounded_sequence_bool_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_bool_field + * @return Constant reference to member bounded_sequence_bool_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_bool_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_bool_field + * @return Reference to member bounded_sequence_bool_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + /*! + * @brief This function copies the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field + */ + eProsima_user_DllExport void bounded_sequence_enum_field( + const std::vector& _bounded_sequence_enum_field); + + /*! + * @brief This function moves the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field + */ + eProsima_user_DllExport void bounded_sequence_enum_field( + std::vector&& _bounded_sequence_enum_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_enum_field + * @return Constant reference to member bounded_sequence_enum_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_enum_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_enum_field + * @return Reference to member bounded_sequence_enum_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + /*! + * @brief This function copies the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field + */ + eProsima_user_DllExport void bounded_sequence_enum2_field( + const std::vector& _bounded_sequence_enum2_field); + + /*! + * @brief This function moves the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field + */ + eProsima_user_DllExport void bounded_sequence_enum2_field( + std::vector&& _bounded_sequence_enum2_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_enum2_field + * @return Constant reference to member bounded_sequence_enum2_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_enum2_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_enum2_field + * @return Reference to member bounded_sequence_enum2_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + /*! + * @brief This function copies the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field + */ + eProsima_user_DllExport void bounded_sequence_struct_field( + const std::vector& _bounded_sequence_struct_field); + + /*! + * @brief This function moves the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field + */ + eProsima_user_DllExport void bounded_sequence_struct_field( + std::vector&& _bounded_sequence_struct_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_struct_field + * @return Constant reference to member bounded_sequence_struct_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_struct_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_struct_field + * @return Reference to member bounded_sequence_struct_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field + */ + eProsima_user_DllExport void unbounded_sequence_char_field( + const std::vector& _unbounded_sequence_char_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field + */ + eProsima_user_DllExport void unbounded_sequence_char_field( + std::vector&& _unbounded_sequence_char_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_char_field + * @return Constant reference to member unbounded_sequence_char_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_char_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_char_field + * @return Reference to member unbounded_sequence_char_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport void unbounded_sequence_uint8_field( + const std::vector& _unbounded_sequence_uint8_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport void unbounded_sequence_uint8_field( + std::vector&& _unbounded_sequence_uint8_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint8_field + * @return Constant reference to member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint8_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint8_field + * @return Reference to member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field + */ + eProsima_user_DllExport void unbounded_sequence_int16_field( + const std::vector& _unbounded_sequence_int16_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field + */ + eProsima_user_DllExport void unbounded_sequence_int16_field( + std::vector&& _unbounded_sequence_int16_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int16_field + * @return Constant reference to member unbounded_sequence_int16_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int16_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int16_field + * @return Reference to member unbounded_sequence_int16_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport void unbounded_sequence_uint16_field( + const std::vector& _unbounded_sequence_uint16_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport void unbounded_sequence_uint16_field( + std::vector&& _unbounded_sequence_uint16_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint16_field + * @return Constant reference to member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint16_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint16_field + * @return Reference to member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field + */ + eProsima_user_DllExport void unbounded_sequence_int32_field( + const std::vector& _unbounded_sequence_int32_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field + */ + eProsima_user_DllExport void unbounded_sequence_int32_field( + std::vector&& _unbounded_sequence_int32_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int32_field + * @return Constant reference to member unbounded_sequence_int32_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int32_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int32_field + * @return Reference to member unbounded_sequence_int32_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport void unbounded_sequence_uint32_field( + const std::vector& _unbounded_sequence_uint32_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport void unbounded_sequence_uint32_field( + std::vector&& _unbounded_sequence_uint32_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint32_field + * @return Constant reference to member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint32_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint32_field + * @return Reference to member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field + */ + eProsima_user_DllExport void unbounded_sequence_int64_field( + const std::vector& _unbounded_sequence_int64_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field + */ + eProsima_user_DllExport void unbounded_sequence_int64_field( + std::vector&& _unbounded_sequence_int64_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int64_field + * @return Constant reference to member unbounded_sequence_int64_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int64_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int64_field + * @return Reference to member unbounded_sequence_int64_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport void unbounded_sequence_uint64_field( + const std::vector& _unbounded_sequence_uint64_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport void unbounded_sequence_uint64_field( + std::vector&& _unbounded_sequence_uint64_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint64_field + * @return Constant reference to member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint64_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint64_field + * @return Reference to member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field + */ + eProsima_user_DllExport void unbounded_sequence_float_field( + const std::vector& _unbounded_sequence_float_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field + */ + eProsima_user_DllExport void unbounded_sequence_float_field( + std::vector&& _unbounded_sequence_float_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_float_field + * @return Constant reference to member unbounded_sequence_float_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_float_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_float_field + * @return Reference to member unbounded_sequence_float_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field + */ + eProsima_user_DllExport void unbounded_sequence_double_field( + const std::vector& _unbounded_sequence_double_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field + */ + eProsima_user_DllExport void unbounded_sequence_double_field( + std::vector&& _unbounded_sequence_double_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_double_field + * @return Constant reference to member unbounded_sequence_double_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_double_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_double_field + * @return Reference to member unbounded_sequence_double_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field + */ + eProsima_user_DllExport void unbounded_sequence_bool_field( + const std::vector& _unbounded_sequence_bool_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field + */ + eProsima_user_DllExport void unbounded_sequence_bool_field( + std::vector&& _unbounded_sequence_bool_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_bool_field + * @return Constant reference to member unbounded_sequence_bool_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_bool_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_bool_field + * @return Reference to member unbounded_sequence_bool_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field + */ + eProsima_user_DllExport void unbounded_sequence_enum_field( + const std::vector& _unbounded_sequence_enum_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field + */ + eProsima_user_DllExport void unbounded_sequence_enum_field( + std::vector&& _unbounded_sequence_enum_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_enum_field + * @return Constant reference to member unbounded_sequence_enum_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_enum_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_enum_field + * @return Reference to member unbounded_sequence_enum_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport void unbounded_sequence_enum2_field( + const std::vector& _unbounded_sequence_enum2_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport void unbounded_sequence_enum2_field( + std::vector&& _unbounded_sequence_enum2_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_enum2_field + * @return Constant reference to member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_enum2_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_enum2_field + * @return Reference to member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field + */ + eProsima_user_DllExport void unbounded_sequence_struct_field( + const std::vector& _unbounded_sequence_struct_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field + */ + eProsima_user_DllExport void unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_struct_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); + + /*! + * @brief This function returns the maximum serialized size of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function returns the serialized size of a data depending on the buffer alignment. + * @param data Data which is calculated its serialized size. + * @param current_alignment Buffer alignment. + * @return Serialized size. + */ + eProsima_user_DllExport static size_t getCdrSerializedSize( + const CompleteTestType& data, + size_t current_alignment = 0); + + + /*! + * @brief This function serializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& cdr) const; + + /*! + * @brief This function deserializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr); + + + + /*! + * @brief This function returns the maximum serialized size of the Key of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function tells you if the Key has been defined for this type + */ + eProsima_user_DllExport static bool isKeyDefined(); + + /*! + * @brief This function serializes the key members of an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serializeKey( + eprosima::fastcdr::Cdr& cdr) const; + +private: + + char m_char_field; + uint8_t m_uint8_field; + int16_t m_int16_field; + uint16_t m_uint16_field; + int32_t m_int32_field; + uint32_t m_uint32_field; + int64_t m_int64_field; + uint64_t m_uint64_field; + float m_float_field; + double m_double_field; + bool m_bool_field; + std::string m_string_field; + Color m_enum_field; + Material m_enum2_field; + StructType m_struct_field; + std::array m_array_char_field; + std::array m_array_uint8_field; + std::array m_array_int16_field; + std::array m_array_uint16_field; + std::array m_array_int32_field; + std::array m_array_uint32_field; + std::array m_array_int64_field; + std::array m_array_uint64_field; + std::array m_array_float_field; + std::array m_array_double_field; + std::array m_array_bool_field; + std::array m_array_enum_field; + std::array m_array_enum2_field; + std::array m_array_struct_field; + std::vector m_bounded_sequence_char_field; + std::vector m_bounded_sequence_uint8_field; + std::vector m_bounded_sequence_int16_field; + std::vector m_bounded_sequence_uint16_field; + std::vector m_bounded_sequence_int32_field; + std::vector m_bounded_sequence_uint32_field; + std::vector m_bounded_sequence_int64_field; + std::vector m_bounded_sequence_uint64_field; + std::vector m_bounded_sequence_float_field; + std::vector m_bounded_sequence_double_field; + std::vector m_bounded_sequence_bool_field; + std::vector m_bounded_sequence_enum_field; + std::vector m_bounded_sequence_enum2_field; + std::vector m_bounded_sequence_struct_field; + std::vector m_unbounded_sequence_char_field; + std::vector m_unbounded_sequence_uint8_field; + std::vector m_unbounded_sequence_int16_field; + std::vector m_unbounded_sequence_uint16_field; + std::vector m_unbounded_sequence_int32_field; + std::vector m_unbounded_sequence_uint32_field; + std::vector m_unbounded_sequence_int64_field; + std::vector m_unbounded_sequence_uint64_field; + std::vector m_unbounded_sequence_float_field; + std::vector m_unbounded_sequence_double_field; + std::vector m_unbounded_sequence_bool_field; + std::vector m_unbounded_sequence_enum_field; + std::vector m_unbounded_sequence_enum2_field; + std::vector m_unbounded_sequence_struct_field; +}; +/*! + * @brief This class represents the structure KeyedCompleteTestType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class KeyedCompleteTestType +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport KeyedCompleteTestType(); + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~KeyedCompleteTestType(); + + /*! + * @brief Copy constructor. + * @param x Reference to the object KeyedCompleteTestType that will be copied. + */ + eProsima_user_DllExport KeyedCompleteTestType( + const KeyedCompleteTestType& x); + + /*! + * @brief Move constructor. + * @param x Reference to the object KeyedCompleteTestType that will be copied. + */ + eProsima_user_DllExport KeyedCompleteTestType( + KeyedCompleteTestType&& x); + + /*! + * @brief Copy assignment. + * @param x Reference to the object KeyedCompleteTestType that will be copied. + */ + eProsima_user_DllExport KeyedCompleteTestType& operator =( + const KeyedCompleteTestType& x); + + /*! + * @brief Move assignment. + * @param x Reference to the object KeyedCompleteTestType that will be copied. + */ + eProsima_user_DllExport KeyedCompleteTestType& operator =( + KeyedCompleteTestType&& x); + + /*! + * @brief Comparison operator. + * @param x KeyedCompleteTestType object to compare. + */ + eProsima_user_DllExport bool operator ==( + const KeyedCompleteTestType& x) const; + + /*! + * @brief Comparison operator. + * @param x KeyedCompleteTestType object to compare. + */ + eProsima_user_DllExport bool operator !=( + const KeyedCompleteTestType& x) const; + + /*! + * @brief This function sets a value in member id + * @param _id New value for member id + */ + eProsima_user_DllExport void id( + int32_t _id); + + /*! + * @brief This function returns the value of member id + * @return Value of member id + */ + eProsima_user_DllExport int32_t id() const; + + /*! + * @brief This function returns a reference to member id + * @return Reference to member id + */ + eProsima_user_DllExport int32_t& id(); + + /*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ + eProsima_user_DllExport void char_field( + char _char_field); + + /*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ + eProsima_user_DllExport char char_field() const; + + /*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ + eProsima_user_DllExport char& char_field(); + + /*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ + eProsima_user_DllExport void uint8_field( + uint8_t _uint8_field); + + /*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ + eProsima_user_DllExport uint8_t uint8_field() const; + + /*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ + eProsima_user_DllExport uint8_t& uint8_field(); + + /*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ + eProsima_user_DllExport void int16_field( + int16_t _int16_field); + + /*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ + eProsima_user_DllExport int16_t int16_field() const; + + /*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ + eProsima_user_DllExport int16_t& int16_field(); + + /*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ + eProsima_user_DllExport void uint16_field( + uint16_t _uint16_field); + + /*! + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field + */ + eProsima_user_DllExport uint16_t uint16_field() const; + + /*! + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field + */ + eProsima_user_DllExport uint16_t& uint16_field(); + + /*! + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field + */ + eProsima_user_DllExport void int32_field( + int32_t _int32_field); + + /*! + * @brief This function returns the value of member int32_field + * @return Value of member int32_field + */ + eProsima_user_DllExport int32_t int32_field() const; + + /*! + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field + */ + eProsima_user_DllExport int32_t& int32_field(); + + /*! + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field + */ + eProsima_user_DllExport void uint32_field( + uint32_t _uint32_field); + + /*! + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field + */ + eProsima_user_DllExport uint32_t uint32_field() const; + + /*! + * @brief This function returns a reference to member uint32_field + * @return Reference to member uint32_field + */ + eProsima_user_DllExport uint32_t& uint32_field(); + + /*! + * @brief This function sets a value in member int64_field + * @param _int64_field New value for member int64_field + */ + eProsima_user_DllExport void int64_field( + int64_t _int64_field); + + /*! + * @brief This function returns the value of member int64_field + * @return Value of member int64_field + */ + eProsima_user_DllExport int64_t int64_field() const; + + /*! + * @brief This function returns a reference to member int64_field + * @return Reference to member int64_field + */ + eProsima_user_DllExport int64_t& int64_field(); + + /*! + * @brief This function sets a value in member uint64_field + * @param _uint64_field New value for member uint64_field + */ + eProsima_user_DllExport void uint64_field( + uint64_t _uint64_field); + + /*! + * @brief This function returns the value of member uint64_field + * @return Value of member uint64_field + */ + eProsima_user_DllExport uint64_t uint64_field() const; + + /*! + * @brief This function returns a reference to member uint64_field + * @return Reference to member uint64_field + */ + eProsima_user_DllExport uint64_t& uint64_field(); + + /*! + * @brief This function sets a value in member float_field + * @param _float_field New value for member float_field + */ + eProsima_user_DllExport void float_field( + float _float_field); + + /*! + * @brief This function returns the value of member float_field + * @return Value of member float_field + */ + eProsima_user_DllExport float float_field() const; + + /*! + * @brief This function returns a reference to member float_field + * @return Reference to member float_field + */ + eProsima_user_DllExport float& float_field(); + + /*! + * @brief This function sets a value in member double_field + * @param _double_field New value for member double_field + */ + eProsima_user_DllExport void double_field( + double _double_field); + + /*! + * @brief This function returns the value of member double_field + * @return Value of member double_field + */ + eProsima_user_DllExport double double_field() const; + + /*! + * @brief This function returns a reference to member double_field + * @return Reference to member double_field + */ + eProsima_user_DllExport double& double_field(); + + /*! + * @brief This function sets a value in member bool_field + * @param _bool_field New value for member bool_field + */ + eProsima_user_DllExport void bool_field( + bool _bool_field); + + /*! + * @brief This function returns the value of member bool_field + * @return Value of member bool_field + */ + eProsima_user_DllExport bool bool_field() const; + + /*! + * @brief This function returns a reference to member bool_field + * @return Reference to member bool_field + */ + eProsima_user_DllExport bool& bool_field(); + + /*! + * @brief This function copies the value in member string_field + * @param _string_field New value to be copied in member string_field + */ + eProsima_user_DllExport void string_field( + const std::string& _string_field); + + /*! + * @brief This function moves the value in member string_field + * @param _string_field New value to be moved in member string_field + */ + eProsima_user_DllExport void string_field( + std::string&& _string_field); + + /*! + * @brief This function returns a constant reference to member string_field + * @return Constant reference to member string_field + */ + eProsima_user_DllExport const std::string& string_field() const; + + /*! + * @brief This function returns a reference to member string_field + * @return Reference to member string_field + */ + eProsima_user_DllExport std::string& string_field(); + /*! + * @brief This function sets a value in member enum_field + * @param _enum_field New value for member enum_field + */ + eProsima_user_DllExport void enum_field( + Color _enum_field); + + /*! + * @brief This function returns the value of member enum_field + * @return Value of member enum_field + */ + eProsima_user_DllExport Color enum_field() const; + + /*! + * @brief This function returns a reference to member enum_field + * @return Reference to member enum_field + */ + eProsima_user_DllExport Color& enum_field(); + + /*! + * @brief This function sets a value in member enum2_field + * @param _enum2_field New value for member enum2_field + */ + eProsima_user_DllExport void enum2_field( + Material _enum2_field); + + /*! + * @brief This function returns the value of member enum2_field + * @return Value of member enum2_field + */ + eProsima_user_DllExport Material enum2_field() const; + + /*! + * @brief This function returns a reference to member enum2_field + * @return Reference to member enum2_field + */ + eProsima_user_DllExport Material& enum2_field(); + + /*! + * @brief This function copies the value in member struct_field + * @param _struct_field New value to be copied in member struct_field + */ + eProsima_user_DllExport void struct_field( + const StructType& _struct_field); + + /*! + * @brief This function moves the value in member struct_field + * @param _struct_field New value to be moved in member struct_field + */ + eProsima_user_DllExport void struct_field( + StructType&& _struct_field); + + /*! + * @brief This function returns a constant reference to member struct_field + * @return Constant reference to member struct_field + */ + eProsima_user_DllExport const StructType& struct_field() const; + + /*! + * @brief This function returns a reference to member struct_field + * @return Reference to member struct_field + */ + eProsima_user_DllExport StructType& struct_field(); + /*! + * @brief This function copies the value in member array_char_field + * @param _array_char_field New value to be copied in member array_char_field + */ + eProsima_user_DllExport void array_char_field( + const std::array& _array_char_field); + + /*! + * @brief This function moves the value in member array_char_field + * @param _array_char_field New value to be moved in member array_char_field + */ + eProsima_user_DllExport void array_char_field( + std::array&& _array_char_field); + + /*! + * @brief This function returns a constant reference to member array_char_field + * @return Constant reference to member array_char_field + */ + eProsima_user_DllExport const std::array& array_char_field() const; + + /*! + * @brief This function returns a reference to member array_char_field + * @return Reference to member array_char_field + */ + eProsima_user_DllExport std::array& array_char_field(); + /*! + * @brief This function copies the value in member array_uint8_field + * @param _array_uint8_field New value to be copied in member array_uint8_field + */ + eProsima_user_DllExport void array_uint8_field( + const std::array& _array_uint8_field); + + /*! + * @brief This function moves the value in member array_uint8_field + * @param _array_uint8_field New value to be moved in member array_uint8_field + */ + eProsima_user_DllExport void array_uint8_field( + std::array&& _array_uint8_field); + + /*! + * @brief This function returns a constant reference to member array_uint8_field + * @return Constant reference to member array_uint8_field + */ + eProsima_user_DllExport const std::array& array_uint8_field() const; + + /*! + * @brief This function returns a reference to member array_uint8_field + * @return Reference to member array_uint8_field + */ + eProsima_user_DllExport std::array& array_uint8_field(); + /*! + * @brief This function copies the value in member array_int16_field + * @param _array_int16_field New value to be copied in member array_int16_field + */ + eProsima_user_DllExport void array_int16_field( + const std::array& _array_int16_field); + + /*! + * @brief This function moves the value in member array_int16_field + * @param _array_int16_field New value to be moved in member array_int16_field + */ + eProsima_user_DllExport void array_int16_field( + std::array&& _array_int16_field); + + /*! + * @brief This function returns a constant reference to member array_int16_field + * @return Constant reference to member array_int16_field + */ + eProsima_user_DllExport const std::array& array_int16_field() const; + + /*! + * @brief This function returns a reference to member array_int16_field + * @return Reference to member array_int16_field + */ + eProsima_user_DllExport std::array& array_int16_field(); + /*! + * @brief This function copies the value in member array_uint16_field + * @param _array_uint16_field New value to be copied in member array_uint16_field + */ + eProsima_user_DllExport void array_uint16_field( + const std::array& _array_uint16_field); + + /*! + * @brief This function moves the value in member array_uint16_field + * @param _array_uint16_field New value to be moved in member array_uint16_field + */ + eProsima_user_DllExport void array_uint16_field( + std::array&& _array_uint16_field); + + /*! + * @brief This function returns a constant reference to member array_uint16_field + * @return Constant reference to member array_uint16_field + */ + eProsima_user_DllExport const std::array& array_uint16_field() const; + + /*! + * @brief This function returns a reference to member array_uint16_field + * @return Reference to member array_uint16_field + */ + eProsima_user_DllExport std::array& array_uint16_field(); + /*! + * @brief This function copies the value in member array_int32_field + * @param _array_int32_field New value to be copied in member array_int32_field + */ + eProsima_user_DllExport void array_int32_field( + const std::array& _array_int32_field); + + /*! + * @brief This function moves the value in member array_int32_field + * @param _array_int32_field New value to be moved in member array_int32_field + */ + eProsima_user_DllExport void array_int32_field( + std::array&& _array_int32_field); + + /*! + * @brief This function returns a constant reference to member array_int32_field + * @return Constant reference to member array_int32_field + */ + eProsima_user_DllExport const std::array& array_int32_field() const; + + /*! + * @brief This function returns a reference to member array_int32_field + * @return Reference to member array_int32_field + */ + eProsima_user_DllExport std::array& array_int32_field(); + /*! + * @brief This function copies the value in member array_uint32_field + * @param _array_uint32_field New value to be copied in member array_uint32_field + */ + eProsima_user_DllExport void array_uint32_field( + const std::array& _array_uint32_field); + + /*! + * @brief This function moves the value in member array_uint32_field + * @param _array_uint32_field New value to be moved in member array_uint32_field + */ + eProsima_user_DllExport void array_uint32_field( + std::array&& _array_uint32_field); + + /*! + * @brief This function returns a constant reference to member array_uint32_field + * @return Constant reference to member array_uint32_field + */ + eProsima_user_DllExport const std::array& array_uint32_field() const; + + /*! + * @brief This function returns a reference to member array_uint32_field + * @return Reference to member array_uint32_field + */ + eProsima_user_DllExport std::array& array_uint32_field(); + /*! + * @brief This function copies the value in member array_int64_field + * @param _array_int64_field New value to be copied in member array_int64_field + */ + eProsima_user_DllExport void array_int64_field( + const std::array& _array_int64_field); + + /*! + * @brief This function moves the value in member array_int64_field + * @param _array_int64_field New value to be moved in member array_int64_field + */ + eProsima_user_DllExport void array_int64_field( + std::array&& _array_int64_field); + + /*! + * @brief This function returns a constant reference to member array_int64_field + * @return Constant reference to member array_int64_field + */ + eProsima_user_DllExport const std::array& array_int64_field() const; + + /*! + * @brief This function returns a reference to member array_int64_field + * @return Reference to member array_int64_field + */ + eProsima_user_DllExport std::array& array_int64_field(); + /*! + * @brief This function copies the value in member array_uint64_field + * @param _array_uint64_field New value to be copied in member array_uint64_field + */ + eProsima_user_DllExport void array_uint64_field( + const std::array& _array_uint64_field); + + /*! + * @brief This function moves the value in member array_uint64_field + * @param _array_uint64_field New value to be moved in member array_uint64_field + */ + eProsima_user_DllExport void array_uint64_field( + std::array&& _array_uint64_field); + + /*! + * @brief This function returns a constant reference to member array_uint64_field + * @return Constant reference to member array_uint64_field + */ + eProsima_user_DllExport const std::array& array_uint64_field() const; + + /*! + * @brief This function returns a reference to member array_uint64_field + * @return Reference to member array_uint64_field + */ + eProsima_user_DllExport std::array& array_uint64_field(); + /*! + * @brief This function copies the value in member array_float_field + * @param _array_float_field New value to be copied in member array_float_field + */ + eProsima_user_DllExport void array_float_field( + const std::array& _array_float_field); + + /*! + * @brief This function moves the value in member array_float_field + * @param _array_float_field New value to be moved in member array_float_field + */ + eProsima_user_DllExport void array_float_field( + std::array&& _array_float_field); + + /*! + * @brief This function returns a constant reference to member array_float_field + * @return Constant reference to member array_float_field + */ + eProsima_user_DllExport const std::array& array_float_field() const; + + /*! + * @brief This function returns a reference to member array_float_field + * @return Reference to member array_float_field + */ + eProsima_user_DllExport std::array& array_float_field(); + /*! + * @brief This function copies the value in member array_double_field + * @param _array_double_field New value to be copied in member array_double_field + */ + eProsima_user_DllExport void array_double_field( + const std::array& _array_double_field); + + /*! + * @brief This function moves the value in member array_double_field + * @param _array_double_field New value to be moved in member array_double_field + */ + eProsima_user_DllExport void array_double_field( + std::array&& _array_double_field); + + /*! + * @brief This function returns a constant reference to member array_double_field + * @return Constant reference to member array_double_field + */ + eProsima_user_DllExport const std::array& array_double_field() const; + + /*! + * @brief This function returns a reference to member array_double_field + * @return Reference to member array_double_field + */ + eProsima_user_DllExport std::array& array_double_field(); + /*! + * @brief This function copies the value in member array_bool_field + * @param _array_bool_field New value to be copied in member array_bool_field + */ + eProsima_user_DllExport void array_bool_field( + const std::array& _array_bool_field); + + /*! + * @brief This function moves the value in member array_bool_field + * @param _array_bool_field New value to be moved in member array_bool_field + */ + eProsima_user_DllExport void array_bool_field( + std::array&& _array_bool_field); + + /*! + * @brief This function returns a constant reference to member array_bool_field + * @return Constant reference to member array_bool_field + */ + eProsima_user_DllExport const std::array& array_bool_field() const; + + /*! + * @brief This function returns a reference to member array_bool_field + * @return Reference to member array_bool_field + */ + eProsima_user_DllExport std::array& array_bool_field(); + /*! + * @brief This function copies the value in member array_enum_field + * @param _array_enum_field New value to be copied in member array_enum_field + */ + eProsima_user_DllExport void array_enum_field( + const std::array& _array_enum_field); + + /*! + * @brief This function moves the value in member array_enum_field + * @param _array_enum_field New value to be moved in member array_enum_field + */ + eProsima_user_DllExport void array_enum_field( + std::array&& _array_enum_field); + + /*! + * @brief This function returns a constant reference to member array_enum_field + * @return Constant reference to member array_enum_field + */ + eProsima_user_DllExport const std::array& array_enum_field() const; + + /*! + * @brief This function returns a reference to member array_enum_field + * @return Reference to member array_enum_field + */ + eProsima_user_DllExport std::array& array_enum_field(); + /*! + * @brief This function copies the value in member array_enum2_field + * @param _array_enum2_field New value to be copied in member array_enum2_field + */ + eProsima_user_DllExport void array_enum2_field( + const std::array& _array_enum2_field); + + /*! + * @brief This function moves the value in member array_enum2_field + * @param _array_enum2_field New value to be moved in member array_enum2_field + */ + eProsima_user_DllExport void array_enum2_field( + std::array&& _array_enum2_field); + + /*! + * @brief This function returns a constant reference to member array_enum2_field + * @return Constant reference to member array_enum2_field + */ + eProsima_user_DllExport const std::array& array_enum2_field() const; + + /*! + * @brief This function returns a reference to member array_enum2_field + * @return Reference to member array_enum2_field + */ + eProsima_user_DllExport std::array& array_enum2_field(); + /*! + * @brief This function copies the value in member array_struct_field + * @param _array_struct_field New value to be copied in member array_struct_field + */ + eProsima_user_DllExport void array_struct_field( + const std::array& _array_struct_field); + + /*! + * @brief This function moves the value in member array_struct_field + * @param _array_struct_field New value to be moved in member array_struct_field + */ + eProsima_user_DllExport void array_struct_field( + std::array&& _array_struct_field); + + /*! + * @brief This function returns a constant reference to member array_struct_field + * @return Constant reference to member array_struct_field + */ + eProsima_user_DllExport const std::array& array_struct_field() const; + + /*! + * @brief This function returns a reference to member array_struct_field + * @return Reference to member array_struct_field + */ + eProsima_user_DllExport std::array& array_struct_field(); + /*! + * @brief This function copies the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field + */ + eProsima_user_DllExport void bounded_sequence_char_field( + const std::vector& _bounded_sequence_char_field); + + /*! + * @brief This function moves the value in member bounded_sequence_char_field + * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field + */ + eProsima_user_DllExport void bounded_sequence_char_field( + std::vector&& _bounded_sequence_char_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_char_field + * @return Constant reference to member bounded_sequence_char_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_char_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_char_field + * @return Reference to member bounded_sequence_char_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field + */ + eProsima_user_DllExport void bounded_sequence_uint8_field( + const std::vector& _bounded_sequence_uint8_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint8_field + * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field + */ + eProsima_user_DllExport void bounded_sequence_uint8_field( + std::vector&& _bounded_sequence_uint8_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint8_field + * @return Constant reference to member bounded_sequence_uint8_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint8_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint8_field + * @return Reference to member bounded_sequence_uint8_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field + */ + eProsima_user_DllExport void bounded_sequence_int16_field( + const std::vector& _bounded_sequence_int16_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int16_field + * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field + */ + eProsima_user_DllExport void bounded_sequence_int16_field( + std::vector&& _bounded_sequence_int16_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int16_field + * @return Constant reference to member bounded_sequence_int16_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int16_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int16_field + * @return Reference to member bounded_sequence_int16_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field + */ + eProsima_user_DllExport void bounded_sequence_uint16_field( + const std::vector& _bounded_sequence_uint16_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint16_field + * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field + */ + eProsima_user_DllExport void bounded_sequence_uint16_field( + std::vector&& _bounded_sequence_uint16_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint16_field + * @return Constant reference to member bounded_sequence_uint16_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint16_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint16_field + * @return Reference to member bounded_sequence_uint16_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field + */ + eProsima_user_DllExport void bounded_sequence_int32_field( + const std::vector& _bounded_sequence_int32_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int32_field + * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field + */ + eProsima_user_DllExport void bounded_sequence_int32_field( + std::vector&& _bounded_sequence_int32_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int32_field + * @return Constant reference to member bounded_sequence_int32_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int32_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int32_field + * @return Reference to member bounded_sequence_int32_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field + */ + eProsima_user_DllExport void bounded_sequence_uint32_field( + const std::vector& _bounded_sequence_uint32_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint32_field + * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field + */ + eProsima_user_DllExport void bounded_sequence_uint32_field( + std::vector&& _bounded_sequence_uint32_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint32_field + * @return Constant reference to member bounded_sequence_uint32_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint32_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint32_field + * @return Reference to member bounded_sequence_uint32_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + /*! + * @brief This function copies the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field + */ + eProsima_user_DllExport void bounded_sequence_int64_field( + const std::vector& _bounded_sequence_int64_field); + + /*! + * @brief This function moves the value in member bounded_sequence_int64_field + * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field + */ + eProsima_user_DllExport void bounded_sequence_int64_field( + std::vector&& _bounded_sequence_int64_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_int64_field + * @return Constant reference to member bounded_sequence_int64_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_int64_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_int64_field + * @return Reference to member bounded_sequence_int64_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + /*! + * @brief This function copies the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field + */ + eProsima_user_DllExport void bounded_sequence_uint64_field( + const std::vector& _bounded_sequence_uint64_field); + + /*! + * @brief This function moves the value in member bounded_sequence_uint64_field + * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field + */ + eProsima_user_DllExport void bounded_sequence_uint64_field( + std::vector&& _bounded_sequence_uint64_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_uint64_field + * @return Constant reference to member bounded_sequence_uint64_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_uint64_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_uint64_field + * @return Reference to member bounded_sequence_uint64_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + /*! + * @brief This function copies the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field + */ + eProsima_user_DllExport void bounded_sequence_float_field( + const std::vector& _bounded_sequence_float_field); + + /*! + * @brief This function moves the value in member bounded_sequence_float_field + * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field + */ + eProsima_user_DllExport void bounded_sequence_float_field( + std::vector&& _bounded_sequence_float_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_float_field + * @return Constant reference to member bounded_sequence_float_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_float_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_float_field + * @return Reference to member bounded_sequence_float_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + /*! + * @brief This function copies the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field + */ + eProsima_user_DllExport void bounded_sequence_double_field( + const std::vector& _bounded_sequence_double_field); + + /*! + * @brief This function moves the value in member bounded_sequence_double_field + * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field + */ + eProsima_user_DllExport void bounded_sequence_double_field( + std::vector&& _bounded_sequence_double_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_double_field + * @return Constant reference to member bounded_sequence_double_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_double_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_double_field + * @return Reference to member bounded_sequence_double_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + /*! + * @brief This function copies the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field + */ + eProsima_user_DllExport void bounded_sequence_bool_field( + const std::vector& _bounded_sequence_bool_field); + + /*! + * @brief This function moves the value in member bounded_sequence_bool_field + * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field + */ + eProsima_user_DllExport void bounded_sequence_bool_field( + std::vector&& _bounded_sequence_bool_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_bool_field + * @return Constant reference to member bounded_sequence_bool_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_bool_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_bool_field + * @return Reference to member bounded_sequence_bool_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + /*! + * @brief This function copies the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field + */ + eProsima_user_DllExport void bounded_sequence_enum_field( + const std::vector& _bounded_sequence_enum_field); + + /*! + * @brief This function moves the value in member bounded_sequence_enum_field + * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field + */ + eProsima_user_DllExport void bounded_sequence_enum_field( + std::vector&& _bounded_sequence_enum_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_enum_field + * @return Constant reference to member bounded_sequence_enum_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_enum_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_enum_field + * @return Reference to member bounded_sequence_enum_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + /*! + * @brief This function copies the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field + */ + eProsima_user_DllExport void bounded_sequence_enum2_field( + const std::vector& _bounded_sequence_enum2_field); + + /*! + * @brief This function moves the value in member bounded_sequence_enum2_field + * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field + */ + eProsima_user_DllExport void bounded_sequence_enum2_field( + std::vector&& _bounded_sequence_enum2_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_enum2_field + * @return Constant reference to member bounded_sequence_enum2_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_enum2_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_enum2_field + * @return Reference to member bounded_sequence_enum2_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + /*! + * @brief This function copies the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field + */ + eProsima_user_DllExport void bounded_sequence_struct_field( + const std::vector& _bounded_sequence_struct_field); + + /*! + * @brief This function moves the value in member bounded_sequence_struct_field + * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field + */ + eProsima_user_DllExport void bounded_sequence_struct_field( + std::vector&& _bounded_sequence_struct_field); + + /*! + * @brief This function returns a constant reference to member bounded_sequence_struct_field + * @return Constant reference to member bounded_sequence_struct_field + */ + eProsima_user_DllExport const std::vector& bounded_sequence_struct_field() const; + + /*! + * @brief This function returns a reference to member bounded_sequence_struct_field + * @return Reference to member bounded_sequence_struct_field + */ + eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field + */ + eProsima_user_DllExport void unbounded_sequence_char_field( + const std::vector& _unbounded_sequence_char_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_char_field + * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field + */ + eProsima_user_DllExport void unbounded_sequence_char_field( + std::vector&& _unbounded_sequence_char_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_char_field + * @return Constant reference to member unbounded_sequence_char_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_char_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_char_field + * @return Reference to member unbounded_sequence_char_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport void unbounded_sequence_uint8_field( + const std::vector& _unbounded_sequence_uint8_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint8_field + * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport void unbounded_sequence_uint8_field( + std::vector&& _unbounded_sequence_uint8_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint8_field + * @return Constant reference to member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint8_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint8_field + * @return Reference to member unbounded_sequence_uint8_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field + */ + eProsima_user_DllExport void unbounded_sequence_int16_field( + const std::vector& _unbounded_sequence_int16_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int16_field + * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field + */ + eProsima_user_DllExport void unbounded_sequence_int16_field( + std::vector&& _unbounded_sequence_int16_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int16_field + * @return Constant reference to member unbounded_sequence_int16_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int16_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int16_field + * @return Reference to member unbounded_sequence_int16_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport void unbounded_sequence_uint16_field( + const std::vector& _unbounded_sequence_uint16_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint16_field + * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport void unbounded_sequence_uint16_field( + std::vector&& _unbounded_sequence_uint16_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint16_field + * @return Constant reference to member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint16_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint16_field + * @return Reference to member unbounded_sequence_uint16_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field + */ + eProsima_user_DllExport void unbounded_sequence_int32_field( + const std::vector& _unbounded_sequence_int32_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int32_field + * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field + */ + eProsima_user_DllExport void unbounded_sequence_int32_field( + std::vector&& _unbounded_sequence_int32_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int32_field + * @return Constant reference to member unbounded_sequence_int32_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int32_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int32_field + * @return Reference to member unbounded_sequence_int32_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport void unbounded_sequence_uint32_field( + const std::vector& _unbounded_sequence_uint32_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint32_field + * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport void unbounded_sequence_uint32_field( + std::vector&& _unbounded_sequence_uint32_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint32_field + * @return Constant reference to member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint32_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint32_field + * @return Reference to member unbounded_sequence_uint32_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field + */ + eProsima_user_DllExport void unbounded_sequence_int64_field( + const std::vector& _unbounded_sequence_int64_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_int64_field + * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field + */ + eProsima_user_DllExport void unbounded_sequence_int64_field( + std::vector&& _unbounded_sequence_int64_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_int64_field + * @return Constant reference to member unbounded_sequence_int64_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_int64_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_int64_field + * @return Reference to member unbounded_sequence_int64_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport void unbounded_sequence_uint64_field( + const std::vector& _unbounded_sequence_uint64_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_uint64_field + * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport void unbounded_sequence_uint64_field( + std::vector&& _unbounded_sequence_uint64_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_uint64_field + * @return Constant reference to member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_uint64_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_uint64_field + * @return Reference to member unbounded_sequence_uint64_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field + */ + eProsima_user_DllExport void unbounded_sequence_float_field( + const std::vector& _unbounded_sequence_float_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_float_field + * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field + */ + eProsima_user_DllExport void unbounded_sequence_float_field( + std::vector&& _unbounded_sequence_float_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_float_field + * @return Constant reference to member unbounded_sequence_float_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_float_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_float_field + * @return Reference to member unbounded_sequence_float_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field + */ + eProsima_user_DllExport void unbounded_sequence_double_field( + const std::vector& _unbounded_sequence_double_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_double_field + * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field + */ + eProsima_user_DllExport void unbounded_sequence_double_field( + std::vector&& _unbounded_sequence_double_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_double_field + * @return Constant reference to member unbounded_sequence_double_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_double_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_double_field + * @return Reference to member unbounded_sequence_double_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field + */ + eProsima_user_DllExport void unbounded_sequence_bool_field( + const std::vector& _unbounded_sequence_bool_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_bool_field + * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field + */ + eProsima_user_DllExport void unbounded_sequence_bool_field( + std::vector&& _unbounded_sequence_bool_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_bool_field + * @return Constant reference to member unbounded_sequence_bool_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_bool_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_bool_field + * @return Reference to member unbounded_sequence_bool_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field + */ + eProsima_user_DllExport void unbounded_sequence_enum_field( + const std::vector& _unbounded_sequence_enum_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_enum_field + * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field + */ + eProsima_user_DllExport void unbounded_sequence_enum_field( + std::vector&& _unbounded_sequence_enum_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_enum_field + * @return Constant reference to member unbounded_sequence_enum_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_enum_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_enum_field + * @return Reference to member unbounded_sequence_enum_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport void unbounded_sequence_enum2_field( + const std::vector& _unbounded_sequence_enum2_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_enum2_field + * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport void unbounded_sequence_enum2_field( + std::vector&& _unbounded_sequence_enum2_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_enum2_field + * @return Constant reference to member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_enum2_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_enum2_field + * @return Reference to member unbounded_sequence_enum2_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + /*! + * @brief This function copies the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field + */ + eProsima_user_DllExport void unbounded_sequence_struct_field( + const std::vector& _unbounded_sequence_struct_field); + + /*! + * @brief This function moves the value in member unbounded_sequence_struct_field + * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field + */ + eProsima_user_DllExport void unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field); + + /*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ + eProsima_user_DllExport const std::vector& unbounded_sequence_struct_field() const; + + /*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ + eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); + + /*! + * @brief This function returns the maximum serialized size of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function returns the serialized size of a data depending on the buffer alignment. + * @param data Data which is calculated its serialized size. + * @param current_alignment Buffer alignment. + * @return Serialized size. + */ + eProsima_user_DllExport static size_t getCdrSerializedSize( + const KeyedCompleteTestType& data, + size_t current_alignment = 0); + + + /*! + * @brief This function serializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& cdr) const; + + /*! + * @brief This function deserializes an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr); + + + + /*! + * @brief This function returns the maximum serialized size of the Key of an object + * depending on the buffer alignment. + * @param current_alignment Buffer alignment. + * @return Maximum serialized size. + */ + eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( + size_t current_alignment = 0); + + /*! + * @brief This function tells you if the Key has been defined for this type + */ + eProsima_user_DllExport static bool isKeyDefined(); + + /*! + * @brief This function serializes the key members of an object using CDR serialization. + * @param cdr CDR serialization object. + */ + eProsima_user_DllExport void serializeKey( + eprosima::fastcdr::Cdr& cdr) const; + +private: + + int32_t m_id; + char m_char_field; + uint8_t m_uint8_field; + int16_t m_int16_field; + uint16_t m_uint16_field; + int32_t m_int32_field; + uint32_t m_uint32_field; + int64_t m_int64_field; + uint64_t m_uint64_field; + float m_float_field; + double m_double_field; + bool m_bool_field; + std::string m_string_field; + Color m_enum_field; + Material m_enum2_field; + StructType m_struct_field; + std::array m_array_char_field; + std::array m_array_uint8_field; + std::array m_array_int16_field; + std::array m_array_uint16_field; + std::array m_array_int32_field; + std::array m_array_uint32_field; + std::array m_array_int64_field; + std::array m_array_uint64_field; + std::array m_array_float_field; + std::array m_array_double_field; + std::array m_array_bool_field; + std::array m_array_enum_field; + std::array m_array_enum2_field; + std::array m_array_struct_field; + std::vector m_bounded_sequence_char_field; + std::vector m_bounded_sequence_uint8_field; + std::vector m_bounded_sequence_int16_field; + std::vector m_bounded_sequence_uint16_field; + std::vector m_bounded_sequence_int32_field; + std::vector m_bounded_sequence_uint32_field; + std::vector m_bounded_sequence_int64_field; + std::vector m_bounded_sequence_uint64_field; + std::vector m_bounded_sequence_float_field; + std::vector m_bounded_sequence_double_field; + std::vector m_bounded_sequence_bool_field; + std::vector m_bounded_sequence_enum_field; + std::vector m_bounded_sequence_enum2_field; + std::vector m_bounded_sequence_struct_field; + std::vector m_unbounded_sequence_char_field; + std::vector m_unbounded_sequence_uint8_field; + std::vector m_unbounded_sequence_int16_field; + std::vector m_unbounded_sequence_uint16_field; + std::vector m_unbounded_sequence_int32_field; + std::vector m_unbounded_sequence_uint32_field; + std::vector m_unbounded_sequence_int64_field; + std::vector m_unbounded_sequence_uint64_field; + std::vector m_unbounded_sequence_float_field; + std::vector m_unbounded_sequence_double_field; + std::vector m_unbounded_sequence_bool_field; + std::vector m_unbounded_sequence_enum_field; + std::vector m_unbounded_sequence_enum2_field; + std::vector m_unbounded_sequence_struct_field; +}; + +#endif // _FAST_DDS_GENERATED_TEST_COMPLETE_H_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_complete.i b/fastdds_python/test/types/test_complete.i new file mode 100644 index 00000000..913acfa8 --- /dev/null +++ b/fastdds_python/test/types/test_complete.i @@ -0,0 +1,1092 @@ +// 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 test_complete.i + * This header file contains the SWIG interface of the described types in the IDL file. + * + * This file was generated by the tool gen. + */ + +%module test_complete + +// SWIG helper modules +%include "stdint.i" +%include "std_string.i" +%include "std_vector.i" +%include "std_array.i" +%include "std_map.i" +%include "typemaps.i" + +// Assignemt operators are ignored, as there is no such thing in Python. +// Trying to export them issues a warning +%ignore *::operator=; + +// Macro declarations +// Any macro used on the Fast DDS header files will give an error if it is not redefined here +#define RTPS_DllAPI +#define eProsima_user_DllExport + + +%{ +#include "test_complete.h" +%} + + + +//////////////////////////////////////////////////////// +// Binding for class StructType +//////////////////////////////////////////////////////// + +// Ignore overloaded methods that have no application on Python +// Otherwise they will issue a warning +%ignore StructType::StructType(StructType&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Avoid a warning ignoring all but one +%ignore StructType::char_field(char&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::char_field(); +%rename("%s") StructType::char_field() const; + +%ignore StructType::uint8_field(uint8_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::uint8_field(); +%rename("%s") StructType::uint8_field() const; + +%ignore StructType::int16_field(int16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::int16_field(); +%rename("%s") StructType::int16_field() const; + +%ignore StructType::uint16_field(uint16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::uint16_field(); +%rename("%s") StructType::uint16_field() const; + +%ignore StructType::int32_field(int32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::int32_field(); +%rename("%s") StructType::int32_field() const; + +%ignore StructType::uint32_field(uint32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::uint32_field(); +%rename("%s") StructType::uint32_field() const; + +%ignore StructType::int64_field(int64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::int64_field(); +%rename("%s") StructType::int64_field() const; + +%ignore StructType::uint64_field(uint64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::uint64_field(); +%rename("%s") StructType::uint64_field() const; + +%ignore StructType::float_field(float&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::float_field(); +%rename("%s") StructType::float_field() const; + +%ignore StructType::double_field(double&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::double_field(); +%rename("%s") StructType::double_field() const; + +%ignore StructType::bool_field(bool&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::bool_field(); +%rename("%s") StructType::bool_field() const; + +%ignore StructType::string_field(std::string&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::string_field(); +%rename("%s") StructType::string_field() const; + +%ignore StructType::enum_field(Color&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::enum_field(); +%rename("%s") StructType::enum_field() const; + +%ignore StructType::enum2_field(Material&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore StructType::enum2_field(); +%rename("%s") StructType::enum2_field() const; + + + + +//////////////////////////////////////////////////////// +// Binding for class CompleteTestType +//////////////////////////////////////////////////////// + +// Ignore overloaded methods that have no application on Python +// Otherwise they will issue a warning +%ignore CompleteTestType::CompleteTestType(CompleteTestType&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Avoid a warning ignoring all but one +%ignore CompleteTestType::char_field(char&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::char_field(); +%rename("%s") CompleteTestType::char_field() const; + +%ignore CompleteTestType::uint8_field(uint8_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::uint8_field(); +%rename("%s") CompleteTestType::uint8_field() const; + +%ignore CompleteTestType::int16_field(int16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::int16_field(); +%rename("%s") CompleteTestType::int16_field() const; + +%ignore CompleteTestType::uint16_field(uint16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::uint16_field(); +%rename("%s") CompleteTestType::uint16_field() const; + +%ignore CompleteTestType::int32_field(int32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::int32_field(); +%rename("%s") CompleteTestType::int32_field() const; + +%ignore CompleteTestType::uint32_field(uint32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::uint32_field(); +%rename("%s") CompleteTestType::uint32_field() const; + +%ignore CompleteTestType::int64_field(int64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::int64_field(); +%rename("%s") CompleteTestType::int64_field() const; + +%ignore CompleteTestType::uint64_field(uint64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::uint64_field(); +%rename("%s") CompleteTestType::uint64_field() const; + +%ignore CompleteTestType::float_field(float&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::float_field(); +%rename("%s") CompleteTestType::float_field() const; + +%ignore CompleteTestType::double_field(double&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::double_field(); +%rename("%s") CompleteTestType::double_field() const; + +%ignore CompleteTestType::bool_field(bool&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bool_field(); +%rename("%s") CompleteTestType::bool_field() const; + +%ignore CompleteTestType::string_field(std::string&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::string_field(); +%rename("%s") CompleteTestType::string_field() const; + +%ignore CompleteTestType::enum_field(Color&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::enum_field(); +%rename("%s") CompleteTestType::enum_field() const; + +%ignore CompleteTestType::enum2_field(Material&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::enum2_field(); +%rename("%s") CompleteTestType::enum2_field() const; + +%ignore CompleteTestType::struct_field(StructType&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::struct_field(); +%rename("%s") CompleteTestType::struct_field() const; + +%ignore CompleteTestType::array_char_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_char_field() const; +%template(char_max_array_size_array) std::array; +%ignore CompleteTestType::array_uint8_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_uint8_field() const; +%template(uint8_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_int16_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_int16_field() const; +%template(int16_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_uint16_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_uint16_field() const; +%template(uint16_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_int32_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_int32_field() const; +%template(int32_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_uint32_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_uint32_field() const; +%template(uint32_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_int64_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_int64_field() const; +%template(int64_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_uint64_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_uint64_field() const; +%template(uint64_t_max_array_size_array) std::array; +%ignore CompleteTestType::array_float_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_float_field() const; +%template(float_max_array_size_array) std::array; +%ignore CompleteTestType::array_double_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_double_field() const; +%template(double_max_array_size_array) std::array; +%ignore CompleteTestType::array_bool_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_bool_field() const; +%template(bool_max_array_size_array) std::array; +%ignore CompleteTestType::array_enum_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_enum_field() const; +%template(Color_max_array_size_array) std::array; +%ignore CompleteTestType::array_enum2_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_enum2_field() const; +%template(Material_max_array_size_array) std::array; +%ignore CompleteTestType::array_struct_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::array_struct_field() const; +%template(StructType_max_array_size_array) std::array; +%ignore CompleteTestType::bounded_sequence_char_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_char_field() const; +%template(char_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_uint8_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_uint8_field() const; +%template(uint8_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_int16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_int16_field() const; +%template(int16_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_uint16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_uint16_field() const; +%template(uint16_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_int32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_int32_field() const; +%template(int32_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_uint32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_uint32_field() const; +%template(uint32_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_int64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_int64_field() const; +%template(int64_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_uint64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_uint64_field() const; +%template(uint64_t_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_float_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_float_field() const; +%template(float_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_double_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_double_field() const; +%template(double_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_bool_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_bool_field() const; +%template(bool_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_enum_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_enum_field() const; +%template(Color_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_enum2_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_enum2_field() const; +%template(Material_vector) std::vector; + +%ignore CompleteTestType::bounded_sequence_struct_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::bounded_sequence_struct_field() const; +%template(StructType_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_char_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_char_field() const; +%template(char_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_uint8_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_uint8_field() const; +%template(uint8_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_int16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_int16_field() const; +%template(int16_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_uint16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_uint16_field() const; +%template(uint16_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_int32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_int32_field() const; +%template(int32_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_uint32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_uint32_field() const; +%template(uint32_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_int64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_int64_field() const; +%template(int64_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_uint64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_uint64_field() const; +%template(uint64_t_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_float_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_float_field() const; +%template(float_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_double_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_double_field() const; +%template(double_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_bool_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_bool_field() const; +%template(bool_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_enum_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_enum_field() const; +%template(Color_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_enum2_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_enum2_field() const; +%template(Material_vector) std::vector; + +%ignore CompleteTestType::unbounded_sequence_struct_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore CompleteTestType::unbounded_sequence_struct_field() const; +%template(StructType_vector) std::vector; + + +//////////////////////////////////////////////////////// +// Binding for class KeyedCompleteTestType +//////////////////////////////////////////////////////// + +// Ignore overloaded methods that have no application on Python +// Otherwise they will issue a warning +%ignore KeyedCompleteTestType::KeyedCompleteTestType(KeyedCompleteTestType&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Avoid a warning ignoring all but one +%ignore KeyedCompleteTestType::id(int32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::id(); +%rename("%s") KeyedCompleteTestType::id() const; + +%ignore KeyedCompleteTestType::char_field(char&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::char_field(); +%rename("%s") KeyedCompleteTestType::char_field() const; + +%ignore KeyedCompleteTestType::uint8_field(uint8_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::uint8_field(); +%rename("%s") KeyedCompleteTestType::uint8_field() const; + +%ignore KeyedCompleteTestType::int16_field(int16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::int16_field(); +%rename("%s") KeyedCompleteTestType::int16_field() const; + +%ignore KeyedCompleteTestType::uint16_field(uint16_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::uint16_field(); +%rename("%s") KeyedCompleteTestType::uint16_field() const; + +%ignore KeyedCompleteTestType::int32_field(int32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::int32_field(); +%rename("%s") KeyedCompleteTestType::int32_field() const; + +%ignore KeyedCompleteTestType::uint32_field(uint32_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::uint32_field(); +%rename("%s") KeyedCompleteTestType::uint32_field() const; + +%ignore KeyedCompleteTestType::int64_field(int64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::int64_field(); +%rename("%s") KeyedCompleteTestType::int64_field() const; + +%ignore KeyedCompleteTestType::uint64_field(uint64_t&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::uint64_field(); +%rename("%s") KeyedCompleteTestType::uint64_field() const; + +%ignore KeyedCompleteTestType::float_field(float&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::float_field(); +%rename("%s") KeyedCompleteTestType::float_field() const; + +%ignore KeyedCompleteTestType::double_field(double&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::double_field(); +%rename("%s") KeyedCompleteTestType::double_field() const; + +%ignore KeyedCompleteTestType::bool_field(bool&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bool_field(); +%rename("%s") KeyedCompleteTestType::bool_field() const; + +%ignore KeyedCompleteTestType::string_field(std::string&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::string_field(); +%rename("%s") KeyedCompleteTestType::string_field() const; + +%ignore KeyedCompleteTestType::enum_field(Color&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::enum_field(); +%rename("%s") KeyedCompleteTestType::enum_field() const; + +%ignore KeyedCompleteTestType::enum2_field(Material&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::enum2_field(); +%rename("%s") KeyedCompleteTestType::enum2_field() const; + +%ignore KeyedCompleteTestType::struct_field(StructType&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::struct_field(); +%rename("%s") KeyedCompleteTestType::struct_field() const; + +%ignore KeyedCompleteTestType::array_char_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_char_field() const; +%template(char_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_uint8_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_uint8_field() const; +%template(uint8_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_int16_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_int16_field() const; +%template(int16_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_uint16_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_uint16_field() const; +%template(uint16_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_int32_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_int32_field() const; +%template(int32_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_uint32_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_uint32_field() const; +%template(uint32_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_int64_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_int64_field() const; +%template(int64_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_uint64_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_uint64_field() const; +%template(uint64_t_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_float_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_float_field() const; +%template(float_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_double_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_double_field() const; +%template(double_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_bool_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_bool_field() const; +%template(bool_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_enum_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_enum_field() const; +%template(Color_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_enum2_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_enum2_field() const; +%template(Material_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::array_struct_field(std::array&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::array_struct_field() const; +%template(StructType_max_array_size_array) std::array; +%ignore KeyedCompleteTestType::bounded_sequence_char_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_char_field() const; +%template(char_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_uint8_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_uint8_field() const; +%template(uint8_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_int16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_int16_field() const; +%template(int16_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_uint16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_uint16_field() const; +%template(uint16_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_int32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_int32_field() const; +%template(int32_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_uint32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_uint32_field() const; +%template(uint32_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_int64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_int64_field() const; +%template(int64_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_uint64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_uint64_field() const; +%template(uint64_t_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_float_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_float_field() const; +%template(float_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_double_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_double_field() const; +%template(double_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_bool_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_bool_field() const; +%template(bool_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_enum_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_enum_field() const; +%template(Color_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_enum2_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_enum2_field() const; +%template(Material_vector) std::vector; + +%ignore KeyedCompleteTestType::bounded_sequence_struct_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::bounded_sequence_struct_field() const; +%template(StructType_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_char_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_char_field() const; +%template(char_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_uint8_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_uint8_field() const; +%template(uint8_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_int16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_int16_field() const; +%template(int16_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_uint16_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_uint16_field() const; +%template(uint16_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_int32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_int32_field() const; +%template(int32_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_uint32_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_uint32_field() const; +%template(uint32_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_int64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_int64_field() const; +%template(int64_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_uint64_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_uint64_field() const; +%template(uint64_t_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_float_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_float_field() const; +%template(float_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_double_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_double_field() const; +%template(double_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_bool_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_bool_field() const; +%template(bool_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_enum_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_enum_field() const; +%template(Color_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_enum2_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_enum2_field() const; +%template(Material_vector) std::vector; + +%ignore KeyedCompleteTestType::unbounded_sequence_struct_field(std::vector&&); + +// Overloaded getter methods shadow each other and are equivalent in python +// Const accesors produced constant enums instead of arrays/dictionaries when used +// We ignore them to prevent this +%ignore KeyedCompleteTestType::unbounded_sequence_struct_field() const; +%template(StructType_vector) std::vector; + + + +// Include the class interfaces +%include "test_complete.h" + +// Include the corresponding TopicDataType +%include "test_completePubSubTypes.i" diff --git a/fastdds_python/test/types/test_complete.idl b/fastdds_python/test/types/test_complete.idl new file mode 100644 index 00000000..dd0d10e8 --- /dev/null +++ b/fastdds_python/test/types/test_complete.idl @@ -0,0 +1,193 @@ +enum Color +{ + RED, + GREEN, + BLUE, + YELLOW, + MAGENTA +}; + +enum Material +{ + WOOD, + PLASTIC, + METAL, + CONCRETE, + STONE +}; + +@nested +struct StructType +{ + char char_field; + octet uint8_field; + short int16_field; + unsigned short uint16_field; + long int32_field; + unsigned long uint32_field; + long long int64_field; + unsigned long long uint64_field; + float float_field; + double double_field; + //long double long_double_field; + boolean bool_field; + string string_field; + Color enum_field; + Material enum2_field; +}; + +const unsigned long max_array_size = 3; +const unsigned long max_seq_size = 5; + +struct CompleteTestType +{ + // Direct fields + char char_field; + octet uint8_field; + short int16_field; + unsigned short uint16_field; + long int32_field; + unsigned long uint32_field; + long long int64_field; + unsigned long long uint64_field; + float float_field; + double double_field; + //long double long_double_field; + boolean bool_field; + string string_field; + Color enum_field; + Material enum2_field; + StructType struct_field; + + // Array fields + char array_char_field[max_array_size]; + octet array_uint8_field[max_array_size]; + short array_int16_field[max_array_size]; + unsigned short array_uint16_field[max_array_size]; + long array_int32_field[max_array_size]; + unsigned long array_uint32_field[max_array_size]; + long long array_int64_field[max_array_size]; + unsigned long long array_uint64_field[max_array_size]; + float array_float_field[max_array_size]; + double array_double_field[max_array_size]; + //long double array_long_double_field[max_array_size]; + boolean array_bool_field[max_array_size]; + //string array_string_field[max_array_size]; + Color array_enum_field[max_array_size]; + Material array_enum2_field[max_array_size]; + StructType array_struct_field[max_array_size]; + + // Bounded sequence fields + sequence bounded_sequence_char_field; + sequence bounded_sequence_uint8_field; + sequence bounded_sequence_int16_field; + sequence bounded_sequence_uint16_field; + sequence bounded_sequence_int32_field; + sequence bounded_sequence_uint32_field; + sequence bounded_sequence_int64_field; + sequence bounded_sequence_uint64_field; + sequence bounded_sequence_float_field; + sequence bounded_sequence_double_field; + //sequence bounded_sequence_long_double_field; + sequence bounded_sequence_bool_field; + //sequence bounded_sequence_string_field; + sequence bounded_sequence_enum_field; + sequence bounded_sequence_enum2_field; + sequence bounded_sequence_struct_field; + + // Unbounded sequence fields + sequence unbounded_sequence_char_field; + sequence unbounded_sequence_uint8_field; + sequence unbounded_sequence_int16_field; + sequence unbounded_sequence_uint16_field; + sequence unbounded_sequence_int32_field; + sequence unbounded_sequence_uint32_field; + sequence unbounded_sequence_int64_field; + sequence unbounded_sequence_uint64_field; + sequence unbounded_sequence_float_field; + sequence unbounded_sequence_double_field; + //sequence unbounded_sequence_long_double_field; + sequence unbounded_sequence_bool_field; + //sequence unbounded_sequence_string_field; + sequence unbounded_sequence_enum_field; + sequence unbounded_sequence_enum2_field; + sequence unbounded_sequence_struct_field; +}; + +struct KeyedCompleteTestType +{ + @key + long id; + + // Direct fields + char char_field; + octet uint8_field; + short int16_field; + unsigned short uint16_field; + long int32_field; + unsigned long uint32_field; + long long int64_field; + unsigned long long uint64_field; + float float_field; + double double_field; + //long double long_double_field; + boolean bool_field; + string string_field; + Color enum_field; + Material enum2_field; + StructType struct_field; + + // Array fields + char array_char_field[max_array_size]; + octet array_uint8_field[max_array_size]; + short array_int16_field[max_array_size]; + unsigned short array_uint16_field[max_array_size]; + long array_int32_field[max_array_size]; + unsigned long array_uint32_field[max_array_size]; + long long array_int64_field[max_array_size]; + unsigned long long array_uint64_field[max_array_size]; + float array_float_field[max_array_size]; + double array_double_field[max_array_size]; + //long double array_long_double_field[max_array_size]; + boolean array_bool_field[max_array_size]; + //string array_string_field[max_array_size]; + Color array_enum_field[max_array_size]; + Material array_enum2_field[max_array_size]; + StructType array_struct_field[max_array_size]; + + // Bounded sequence fields + sequence bounded_sequence_char_field; + sequence bounded_sequence_uint8_field; + sequence bounded_sequence_int16_field; + sequence bounded_sequence_uint16_field; + sequence bounded_sequence_int32_field; + sequence bounded_sequence_uint32_field; + sequence bounded_sequence_int64_field; + sequence bounded_sequence_uint64_field; + sequence bounded_sequence_float_field; + sequence bounded_sequence_double_field; + //sequence bounded_sequence_long_double_field; + sequence bounded_sequence_bool_field; + //sequence bounded_sequence_string_field; + sequence bounded_sequence_enum_field; + sequence bounded_sequence_enum2_field; + sequence bounded_sequence_struct_field; + + // Unbounded sequence fields + sequence unbounded_sequence_char_field; + sequence unbounded_sequence_uint8_field; + sequence unbounded_sequence_int16_field; + sequence unbounded_sequence_uint16_field; + sequence unbounded_sequence_int32_field; + sequence unbounded_sequence_uint32_field; + sequence unbounded_sequence_int64_field; + sequence unbounded_sequence_uint64_field; + sequence unbounded_sequence_float_field; + sequence unbounded_sequence_double_field; + //sequence unbounded_sequence_long_double_field; + sequence unbounded_sequence_bool_field; + //sequence unbounded_sequence_string_field; + sequence unbounded_sequence_enum_field; + sequence unbounded_sequence_enum2_field; + sequence unbounded_sequence_struct_field; +}; diff --git a/fastdds_python/test/types/test_completePubSubTypes.cxx b/fastdds_python/test/types/test_completePubSubTypes.cxx new file mode 100644 index 00000000..e2f341c5 --- /dev/null +++ b/fastdds_python/test/types/test_completePubSubTypes.cxx @@ -0,0 +1,454 @@ +// 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 test_completePubSubTypes.cpp + * This header file contains the implementation of the serialization functions. + * + * This file was generated by the tool fastcdrgen. + */ + + +#include +#include + +#include "test_completePubSubTypes.h" + +using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; +using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; + + + +StructTypePubSubType::StructTypePubSubType() +{ + setName("StructType"); + auto type_size = StructType::getMaxCdrSerializedSize(); + type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ + m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ + m_isGetKeyDefined = StructType::isKeyDefined(); + size_t keyLength = StructType::getKeyMaxCdrSerializedSize() > 16 ? + StructType::getKeyMaxCdrSerializedSize() : 16; + m_keyBuffer = reinterpret_cast(malloc(keyLength)); + memset(m_keyBuffer, 0, keyLength); +} + +StructTypePubSubType::~StructTypePubSubType() +{ + if (m_keyBuffer != nullptr) + { + free(m_keyBuffer); + } +} + +bool StructTypePubSubType::serialize( + void* data, + SerializedPayload_t* payload) +{ + StructType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + // Serialize encapsulation + ser.serialize_encapsulation(); + + try + { + // Serialize the object. + p_type->serialize(ser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + // Get the serialized length + payload->length = static_cast(ser.getSerializedDataLength()); + return true; +} + +bool StructTypePubSubType::deserialize( + SerializedPayload_t* payload, + void* data) +{ + try + { + //Convert DATA to pointer of your type + StructType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); + + // Object that deserializes the data. + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + + // Deserialize encapsulation. + deser.read_encapsulation(); + payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + + // Deserialize the object. + p_type->deserialize(deser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + return true; +} + +std::function StructTypePubSubType::getSerializedSizeProvider( + void* data) +{ + return [data]() -> uint32_t + { + return static_cast(type::getCdrSerializedSize(*static_cast(data))) + + 4u /*encapsulation*/; + }; +} + +void* StructTypePubSubType::createData() +{ + return reinterpret_cast(new StructType()); +} + +void StructTypePubSubType::deleteData( + void* data) +{ + delete(reinterpret_cast(data)); +} + +bool StructTypePubSubType::getKey( + void* data, + InstanceHandle_t* handle, + bool force_md5) +{ + if (!m_isGetKeyDefined) + { + return false; + } + + StructType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), + StructType::getKeyMaxCdrSerializedSize()); + + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); + p_type->serializeKey(ser); + if (force_md5 || StructType::getKeyMaxCdrSerializedSize() > 16) + { + m_md5.init(); + m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.finalize(); + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_md5.digest[i]; + } + } + else + { + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_keyBuffer[i]; + } + } + return true; +} + + + +CompleteTestTypePubSubType::CompleteTestTypePubSubType() +{ + setName("CompleteTestType"); + auto type_size = CompleteTestType::getMaxCdrSerializedSize(); + type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ + m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ + m_isGetKeyDefined = CompleteTestType::isKeyDefined(); + size_t keyLength = CompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? + CompleteTestType::getKeyMaxCdrSerializedSize() : 16; + m_keyBuffer = reinterpret_cast(malloc(keyLength)); + memset(m_keyBuffer, 0, keyLength); +} + +CompleteTestTypePubSubType::~CompleteTestTypePubSubType() +{ + if (m_keyBuffer != nullptr) + { + free(m_keyBuffer); + } +} + +bool CompleteTestTypePubSubType::serialize( + void* data, + SerializedPayload_t* payload) +{ + CompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + // Serialize encapsulation + ser.serialize_encapsulation(); + + try + { + // Serialize the object. + p_type->serialize(ser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + // Get the serialized length + payload->length = static_cast(ser.getSerializedDataLength()); + return true; +} + +bool CompleteTestTypePubSubType::deserialize( + SerializedPayload_t* payload, + void* data) +{ + try + { + //Convert DATA to pointer of your type + CompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); + + // Object that deserializes the data. + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + + // Deserialize encapsulation. + deser.read_encapsulation(); + payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + + // Deserialize the object. + p_type->deserialize(deser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + return true; +} + +std::function CompleteTestTypePubSubType::getSerializedSizeProvider( + void* data) +{ + return [data]() -> uint32_t + { + return static_cast(type::getCdrSerializedSize(*static_cast(data))) + + 4u /*encapsulation*/; + }; +} + +void* CompleteTestTypePubSubType::createData() +{ + return reinterpret_cast(new CompleteTestType()); +} + +void CompleteTestTypePubSubType::deleteData( + void* data) +{ + delete(reinterpret_cast(data)); +} + +bool CompleteTestTypePubSubType::getKey( + void* data, + InstanceHandle_t* handle, + bool force_md5) +{ + if (!m_isGetKeyDefined) + { + return false; + } + + CompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), + CompleteTestType::getKeyMaxCdrSerializedSize()); + + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); + p_type->serializeKey(ser); + if (force_md5 || CompleteTestType::getKeyMaxCdrSerializedSize() > 16) + { + m_md5.init(); + m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.finalize(); + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_md5.digest[i]; + } + } + else + { + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_keyBuffer[i]; + } + } + return true; +} + +KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType() +{ + setName("KeyedCompleteTestType"); + auto type_size = KeyedCompleteTestType::getMaxCdrSerializedSize(); + type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ + m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ + m_isGetKeyDefined = KeyedCompleteTestType::isKeyDefined(); + size_t keyLength = KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? + KeyedCompleteTestType::getKeyMaxCdrSerializedSize() : 16; + m_keyBuffer = reinterpret_cast(malloc(keyLength)); + memset(m_keyBuffer, 0, keyLength); +} + +KeyedCompleteTestTypePubSubType::~KeyedCompleteTestTypePubSubType() +{ + if (m_keyBuffer != nullptr) + { + free(m_keyBuffer); + } +} + +bool KeyedCompleteTestTypePubSubType::serialize( + void* data, + SerializedPayload_t* payload) +{ + KeyedCompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + // Serialize encapsulation + ser.serialize_encapsulation(); + + try + { + // Serialize the object. + p_type->serialize(ser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + // Get the serialized length + payload->length = static_cast(ser.getSerializedDataLength()); + return true; +} + +bool KeyedCompleteTestTypePubSubType::deserialize( + SerializedPayload_t* payload, + void* data) +{ + try + { + //Convert DATA to pointer of your type + KeyedCompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); + + // Object that deserializes the data. + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + + // Deserialize encapsulation. + deser.read_encapsulation(); + payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + + // Deserialize the object. + p_type->deserialize(deser); + } + catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/) + { + return false; + } + + return true; +} + +std::function KeyedCompleteTestTypePubSubType::getSerializedSizeProvider( + void* data) +{ + return [data]() -> uint32_t + { + return static_cast(type::getCdrSerializedSize(*static_cast(data))) + + 4u /*encapsulation*/; + }; +} + +void* KeyedCompleteTestTypePubSubType::createData() +{ + return reinterpret_cast(new KeyedCompleteTestType()); +} + +void KeyedCompleteTestTypePubSubType::deleteData( + void* data) +{ + delete(reinterpret_cast(data)); +} + +bool KeyedCompleteTestTypePubSubType::getKey( + void* data, + InstanceHandle_t* handle, + bool force_md5) +{ + if (!m_isGetKeyDefined) + { + return false; + } + + KeyedCompleteTestType* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), + KeyedCompleteTestType::getKeyMaxCdrSerializedSize()); + + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); + p_type->serializeKey(ser); + if (force_md5 || KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16) + { + m_md5.init(); + m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.finalize(); + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_md5.digest[i]; + } + } + else + { + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_keyBuffer[i]; + } + } + return true; +} + diff --git a/fastdds_python/test/types/test_completePubSubTypes.h b/fastdds_python/test/types/test_completePubSubTypes.h new file mode 100644 index 00000000..75fe79d8 --- /dev/null +++ b/fastdds_python/test/types/test_completePubSubTypes.h @@ -0,0 +1,233 @@ +// 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 test_completePubSubTypes.h + * This header file contains the declaration of the serialization functions. + * + * This file was generated by the tool fastcdrgen. + */ + + +#ifndef _FAST_DDS_GENERATED_TEST_COMPLETE_PUBSUBTYPES_H_ +#define _FAST_DDS_GENERATED_TEST_COMPLETE_PUBSUBTYPES_H_ + +#include +#include + +#include "test_complete.h" + +#if !defined(GEN_API_VER) || (GEN_API_VER != 1) +#error \ + Generated test_complete is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. +#endif // GEN_API_VER + + + +/*! + * @brief This class represents the TopicDataType of the type StructType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType +{ +public: + + typedef StructType type; + + eProsima_user_DllExport StructTypePubSubType(); + + eProsima_user_DllExport virtual ~StructTypePubSubType(); + + eProsima_user_DllExport virtual bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + + eProsima_user_DllExport virtual bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + void* data) override; + + eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + void* data) override; + + eProsima_user_DllExport virtual bool getKey( + void* data, + eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + bool force_md5 = false) override; + + eProsima_user_DllExport virtual void* createData() override; + + eProsima_user_DllExport virtual void deleteData( + void* data) override; + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + eProsima_user_DllExport inline bool is_bounded() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + eProsima_user_DllExport inline bool is_plain() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + eProsima_user_DllExport inline bool construct_sample( + void* memory) const override + { + (void)memory; + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + + MD5 m_md5; + unsigned char* m_keyBuffer; +}; + + +/*! + * @brief This class represents the TopicDataType of the type CompleteTestType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType +{ +public: + + typedef CompleteTestType type; + + eProsima_user_DllExport CompleteTestTypePubSubType(); + + eProsima_user_DllExport virtual ~CompleteTestTypePubSubType(); + + eProsima_user_DllExport virtual bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + + eProsima_user_DllExport virtual bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + void* data) override; + + eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + void* data) override; + + eProsima_user_DllExport virtual bool getKey( + void* data, + eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + bool force_md5 = false) override; + + eProsima_user_DllExport virtual void* createData() override; + + eProsima_user_DllExport virtual void deleteData( + void* data) override; + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + eProsima_user_DllExport inline bool is_bounded() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + eProsima_user_DllExport inline bool is_plain() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + eProsima_user_DllExport inline bool construct_sample( + void* memory) const override + { + (void)memory; + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + + MD5 m_md5; + unsigned char* m_keyBuffer; +}; +/*! + * @brief This class represents the TopicDataType of the type KeyedCompleteTestType defined by the user in the IDL file. + * @ingroup TEST_COMPLETE + */ +class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType +{ +public: + + typedef KeyedCompleteTestType type; + + eProsima_user_DllExport KeyedCompleteTestTypePubSubType(); + + eProsima_user_DllExport virtual ~KeyedCompleteTestTypePubSubType(); + + eProsima_user_DllExport virtual bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + + eProsima_user_DllExport virtual bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + void* data) override; + + eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + void* data) override; + + eProsima_user_DllExport virtual bool getKey( + void* data, + eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + bool force_md5 = false) override; + + eProsima_user_DllExport virtual void* createData() override; + + eProsima_user_DllExport virtual void deleteData( + void* data) override; + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + eProsima_user_DllExport inline bool is_bounded() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + eProsima_user_DllExport inline bool is_plain() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + eProsima_user_DllExport inline bool construct_sample( + void* memory) const override + { + (void)memory; + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + + MD5 m_md5; + unsigned char* m_keyBuffer; +}; + +#endif // _FAST_DDS_GENERATED_TEST_COMPLETE_PUBSUBTYPES_H_ \ No newline at end of file diff --git a/fastdds_python/src/swig/fastdds/dds/core/condition/GuardCondition.i b/fastdds_python/test/types/test_completePubSubTypes.i similarity index 58% rename from fastdds_python/src/swig/fastdds/dds/core/condition/GuardCondition.i rename to fastdds_python/test/types/test_completePubSubTypes.i index 71bea90f..10d74178 100644 --- a/fastdds_python/src/swig/fastdds/dds/core/condition/GuardCondition.i +++ b/fastdds_python/test/types/test_completePubSubTypes.i @@ -1,4 +1,4 @@ -// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// 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. @@ -12,8 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +/*! + * @file test_completePubSubTypes.i + * This header file contains the SWIG interface of the serialization functions. + * + * This file was generated by the tool fastcdrgen. + */ + +%import(module="fastdds") "fastdds/dds/topic/TopicDataType.hpp"; + %{ -#include "fastdds/dds/core/condition/GuardCondition.hpp" +#include "test_completePubSubTypes.h" %} -%include "fastdds/dds/core/condition/GuardCondition.hpp" +#define GEN_API_VER 1 + +%include "test_completePubSubTypes.h"