Coverage Report

Created: 2025-06-13 06:46

/src/Fast-DDS/src/cpp/rtps/reader/RTPSReader.cpp
Line
Count
Source (jump to first uncovered line)
1
// Copyright 2016 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
 * RTPSReader.cpp
17
 *
18
 */
19
#include <fastdds/rtps/reader/RTPSReader.hpp>
20
21
#include <fastdds/rtps/Endpoint.hpp>
22
#include <fastdds/rtps/attributes/ReaderAttributes.hpp>
23
#include <fastdds/rtps/common/Guid.hpp>
24
#include <fastdds/rtps/history/ReaderHistory.hpp>
25
26
#include <rtps/participant/RTPSParticipantImpl.hpp>
27
28
29
namespace eprosima {
30
namespace fastdds {
31
namespace rtps {
32
33
RTPSReader::RTPSReader(
34
        RTPSParticipantImpl* pimpl,
35
        const GUID_t& guid,
36
        const ReaderAttributes& att,
37
        ReaderHistory* hist)
38
0
    : Endpoint(pimpl, guid, att.endpoint)
39
0
    , history_(hist)
40
0
{
41
0
    history_->mp_reader = this;
42
0
    history_->mp_mutex = &mp_mutex;
43
0
}
44
45
RTPSReader::~RTPSReader()
46
0
{
47
0
    history_->mp_reader = nullptr;
48
0
    history_->mp_mutex = nullptr;
49
0
}
50
51
} /* namespace rtps */
52
} /* namespace fastdds */
53
} /* namespace eprosima */