Coverage Report

Created: 2026-02-14 07:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/Fast-DDS/src/cpp/rtps/common/GuidPrefix_t.cpp
Line
Count
Source
1
// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
/*!
16
 * @file GuidPrefix_t.cpp
17
 */
18
19
#include <rtps/common/GuidUtils.hpp>
20
21
#include <fastdds/rtps/common/GuidPrefix_t.hpp>
22
23
namespace eprosima {
24
namespace fastdds {
25
namespace rtps {
26
27
bool GuidPrefix_t::is_on_same_host_as(
28
        const GuidPrefix_t& other_guid_prefix) const
29
0
{
30
0
    return memcmp(value, other_guid_prefix.value, 4) == 0;
31
0
}
32
33
bool GuidPrefix_t::is_from_this_host() const
34
0
{
35
0
    return is_on_same_host_as(GuidUtils::instance().prefix());
36
0
}
37
38
bool GuidPrefix_t::is_on_same_process_as(
39
        const GuidPrefix_t& other_guid_prefix) const
40
0
{
41
0
    return memcmp(value, other_guid_prefix.value, 8) == 0;
42
0
}
43
44
bool GuidPrefix_t::is_from_this_process() const
45
0
{
46
0
    return is_on_same_process_as(GuidUtils::instance().prefix());
47
0
}
48
49
} // namsepace rtps
50
} // namespace fastdds
51
} // namespace eprosima