Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21371] Change monitor service writer entity id (backport #5070) #5089

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/cpp/statistics/rtps/GuidUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 29,22 @@ namespace eprosima {
namespace fastdds {
namespace statistics {

/**
* Checks whether an entity id corresponds to a builtin monitor service writer.
* @param [in] entity_id The entity id to check.
* @return true when the entity id corresponds to a builtin monitor service writer.
*/
inline bool is_monitor_service_builtin(
const fastrtps::rtps::EntityId_t& entity_id)
{
bool ret = false;
#ifdef FASTDDS_STATISTICS
ret = ENTITYID_MONITOR_SERVICE_WRITER == entity_id.to_uint32();
#endif // ifdef FASTDDS_STATISTICS
static_cast<void>(entity_id);
return ret;
}

/**
* Checks whether an entity id corresponds to a builtin statistics writer.
* @param [in] entity_id The entity id to check.
Expand All @@ -37,7 53,7 @@ namespace statistics {
inline bool is_statistics_builtin(
const fastrtps::rtps::EntityId_t& entity_id)
{
return 0x60 == (0xE0 & entity_id.value[3]);
return 0x60 == (0xE0 & entity_id.value[3]) || is_monitor_service_builtin(entity_id);
}

/**
Expand Down
Loading