diff --git a/include/fastdds/statistics/monitorservice_types.idl b/include/fastdds/statistics/monitorservice_types.idl index 0b7ec9e09cd..da16812a48e 100644 --- a/include/fastdds/statistics/monitorservice_types.idl +++ b/include/fastdds/statistics/monitorservice_types.idl @@ -67,6 +67,7 @@ module statistics { struct DeadlineMissedStatus_s { unsigned long total_count; + unsigned long total_count_change; octet last_instance_handle[16]; }; diff --git a/src/cpp/statistics/types/monitorservice_types.cxx b/src/cpp/statistics/types/monitorservice_types.cxx index 2ea9407d9ef..05470aca79d 100644 --- a/src/cpp/statistics/types/monitorservice_types.cxx +++ b/src/cpp/statistics/types/monitorservice_types.cxx @@ -781,6 +781,7 @@ DeadlineMissedStatus_s::DeadlineMissedStatus_s( const DeadlineMissedStatus_s& x) { m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; m_last_instance_handle = x.m_last_instance_handle; } @@ -788,6 +789,7 @@ DeadlineMissedStatus_s::DeadlineMissedStatus_s( DeadlineMissedStatus_s&& x) noexcept { m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; m_last_instance_handle = std::move(x.m_last_instance_handle); } @@ -796,6 +798,7 @@ DeadlineMissedStatus_s& DeadlineMissedStatus_s::operator =( { m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; m_last_instance_handle = x.m_last_instance_handle; return *this; } @@ -805,6 +808,7 @@ DeadlineMissedStatus_s& DeadlineMissedStatus_s::operator =( { m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; m_last_instance_handle = std::move(x.m_last_instance_handle); return *this; } @@ -813,6 +817,7 @@ bool DeadlineMissedStatus_s::operator ==( const DeadlineMissedStatus_s& x) const { return (m_total_count == x.m_total_count && + m_total_count_change == x.m_total_count_change && m_last_instance_handle == x.m_last_instance_handle); } @@ -851,6 +856,35 @@ uint32_t& DeadlineMissedStatus_s::total_count() } +/*! + * @brief This function sets a value in member total_count_change + * @param _total_count_change New value for member total_count_change + */ +void DeadlineMissedStatus_s::total_count_change( + uint32_t _total_count_change) +{ + m_total_count_change = _total_count_change; +} + +/*! + * @brief This function returns the value of member total_count_change + * @return Value of member total_count_change + */ +uint32_t DeadlineMissedStatus_s::total_count_change() const +{ + return m_total_count_change; +} + +/*! + * @brief This function returns a reference to member total_count_change + * @return Reference to member total_count_change + */ +uint32_t& DeadlineMissedStatus_s::total_count_change() +{ + return m_total_count_change; +} + + /*! * @brief This function copies the value in member last_instance_handle * @param _last_instance_handle New value to be copied in member last_instance_handle diff --git a/src/cpp/statistics/types/monitorservice_types.h b/src/cpp/statistics/types/monitorservice_types.h index 08f713a0ee3..553f8be8aa0 100644 --- a/src/cpp/statistics/types/monitorservice_types.h +++ b/src/cpp/statistics/types/monitorservice_types.h @@ -811,6 +811,26 @@ class DeadlineMissedStatus_s eProsima_user_DllExport uint32_t& total_count(); + /*! + * @brief This function sets a value in member total_count_change + * @param _total_count_change New value for member total_count_change + */ + eProsima_user_DllExport void total_count_change( + uint32_t _total_count_change); + + /*! + * @brief This function returns the value of member total_count_change + * @return Value of member total_count_change + */ + eProsima_user_DllExport uint32_t total_count_change() const; + + /*! + * @brief This function returns a reference to member total_count_change + * @return Reference to member total_count_change + */ + eProsima_user_DllExport uint32_t& total_count_change(); + + /*! * @brief This function copies the value in member last_instance_handle * @param _last_instance_handle New value to be copied in member last_instance_handle @@ -840,6 +860,7 @@ class DeadlineMissedStatus_s private: uint32_t m_total_count{0}; + uint32_t m_total_count_change{0}; std::array m_last_instance_handle{0}; }; diff --git a/src/cpp/statistics/types/monitorservice_typesCdrAux.hpp b/src/cpp/statistics/types/monitorservice_typesCdrAux.hpp index f50dc36ec34..9c228ae2c1d 100644 --- a/src/cpp/statistics/types/monitorservice_typesCdrAux.hpp +++ b/src/cpp/statistics/types/monitorservice_typesCdrAux.hpp @@ -33,7 +33,7 @@ constexpr uint32_t eprosima_fastdds_statistics_BaseStatus_s_max_key_cdr_typesize -constexpr uint32_t eprosima_fastdds_statistics_DeadlineMissedStatus_s_max_cdr_typesize {24UL}; +constexpr uint32_t eprosima_fastdds_statistics_DeadlineMissedStatus_s_max_cdr_typesize {28UL}; constexpr uint32_t eprosima_fastdds_statistics_DeadlineMissedStatus_s_max_key_cdr_typesize {0UL}; diff --git a/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp b/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp index 1a0877a6868..9a5d2f953af 100644 --- a/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp +++ b/src/cpp/statistics/types/monitorservice_typesCdrAux.ipp @@ -558,6 +558,9 @@ eProsima_user_DllExport size_t calculate_serialized_size( data.total_count(), current_alignment); calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.total_count_change(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), data.last_instance_handle(), current_alignment); @@ -581,7 +584,8 @@ eProsima_user_DllExport void serialize( scdr << eprosima::fastcdr::MemberId(0) << data.total_count() - << eprosima::fastcdr::MemberId(1) << data.last_instance_handle() + << eprosima::fastcdr::MemberId(1) << data.total_count_change() + << eprosima::fastcdr::MemberId(2) << data.last_instance_handle() ; scdr.end_serialize_type(current_state); } @@ -606,6 +610,10 @@ eProsima_user_DllExport void deserialize( break; case 1: + dcdr >> data.total_count_change(); + break; + + case 2: dcdr >> data.last_instance_handle(); break; diff --git a/src/cpp/statistics/types/monitorservice_typesv1.cxx b/src/cpp/statistics/types/monitorservice_typesv1.cxx index 89494b4018c..35937497049 100644 --- a/src/cpp/statistics/types/monitorservice_typesv1.cxx +++ b/src/cpp/statistics/types/monitorservice_typesv1.cxx @@ -92,7 +92,7 @@ struct FindType { -#define eprosima_fastdds_statistics_DeadlineMissedStatus_s_max_cdr_typesize 24ULL; +#define eprosima_fastdds_statistics_DeadlineMissedStatus_s_max_cdr_typesize 28ULL; #define eprosima_fastdds_statistics_detail_EntityId_s_max_cdr_typesize 8ULL; #define eprosima_fastdds_statistics_QosPolicyCount_s_max_cdr_typesize 12ULL; #define eprosima_fastdds_statistics_detail_SequenceNumber_s_max_cdr_typesize 12ULL; @@ -1301,6 +1301,8 @@ DeadlineMissedStatus_s::DeadlineMissedStatus_s() { // unsigned long m_total_count m_total_count = 0; + // unsigned long m_total_count_change + m_total_count_change = 0; // octet m_last_instance_handle memset(&m_last_instance_handle, 0, ((16)) * 1); @@ -1316,6 +1318,9 @@ DeadlineMissedStatus_s::DeadlineMissedStatus_s( m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; + + m_last_instance_handle = x.m_last_instance_handle; } @@ -1326,6 +1331,9 @@ DeadlineMissedStatus_s::DeadlineMissedStatus_s( m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; + + m_last_instance_handle = std::move(x.m_last_instance_handle); } @@ -1336,6 +1344,9 @@ DeadlineMissedStatus_s& DeadlineMissedStatus_s::operator =( m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; + + m_last_instance_handle = x.m_last_instance_handle; return *this; @@ -1347,6 +1358,9 @@ DeadlineMissedStatus_s& DeadlineMissedStatus_s::operator =( m_total_count = x.m_total_count; + m_total_count_change = x.m_total_count_change; + + m_last_instance_handle = std::move(x.m_last_instance_handle); return *this; @@ -1356,6 +1370,7 @@ bool DeadlineMissedStatus_s::operator ==( const DeadlineMissedStatus_s& x) const { return (m_total_count == x.m_total_count && + m_total_count_change == x.m_total_count_change && m_last_instance_handle == x.m_last_instance_handle); } @@ -1382,6 +1397,9 @@ size_t DeadlineMissedStatus_s::getCdrSerializedSize( current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); + + current_alignment += (((16)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); @@ -1395,6 +1413,8 @@ void DeadlineMissedStatus_s::serialize( { scdr << m_total_count; + scdr << m_total_count_change; + scdr << m_last_instance_handle; @@ -1407,6 +1427,10 @@ void DeadlineMissedStatus_s::deserialize( + dcdr >> m_total_count_change; + + + dcdr >> m_last_instance_handle; @@ -1453,6 +1477,35 @@ uint32_t& DeadlineMissedStatus_s::total_count() } +/*! + * @brief This function sets a value in member total_count_change + * @param _total_count_change New value for member total_count_change + */ +void DeadlineMissedStatus_s::total_count_change( + uint32_t _total_count_change) +{ + m_total_count_change = _total_count_change; +} + +/*! + * @brief This function returns the value of member total_count_change + * @return Value of member total_count_change + */ +uint32_t DeadlineMissedStatus_s::total_count_change() const +{ + return m_total_count_change; +} + +/*! + * @brief This function returns a reference to member total_count_change + * @return Reference to member total_count_change + */ +uint32_t& DeadlineMissedStatus_s::total_count_change() +{ + return m_total_count_change; +} + + /*! * @brief This function copies the value in member last_instance_handle * @param _last_instance_handle New value to be copied in member last_instance_handle diff --git a/src/cpp/statistics/types/monitorservice_typesv1.h b/src/cpp/statistics/types/monitorservice_typesv1.h index 21ef65f1cf8..dba990c0187 100644 --- a/src/cpp/statistics/types/monitorservice_typesv1.h +++ b/src/cpp/statistics/types/monitorservice_typesv1.h @@ -1069,6 +1069,26 @@ namespace eprosima { eProsima_user_DllExport uint32_t& total_count(); + /*! + * @brief This function sets a value in member total_count_change + * @param _total_count_change New value for member total_count_change + */ + eProsima_user_DllExport void total_count_change( + uint32_t _total_count_change); + + /*! + * @brief This function returns the value of member total_count_change + * @return Value of member total_count_change + */ + eProsima_user_DllExport uint32_t total_count_change() const; + + /*! + * @brief This function returns a reference to member total_count_change + * @return Reference to member total_count_change + */ + eProsima_user_DllExport uint32_t& total_count_change(); + + /*! * @brief This function copies the value in member last_instance_handle * @param _last_instance_handle New value to be copied in member last_instance_handle @@ -1150,6 +1170,7 @@ namespace eprosima { private: uint32_t m_total_count; + uint32_t m_total_count_change; std::array m_last_instance_handle; };