Coverage Report

Created: 2022-08-24 06:18

/src/Fast-DDS/include/fastrtps/subscriber/SampleInfo.h
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
 * @file SampleInfo.h
17
 */
18
19
#ifndef SAMPLEINFO_H_
20
#define SAMPLEINFO_H_
21
22
#include <cstdint>
23
24
#include <fastdds/rtps/common/ChangeKind_t.hpp>
25
#include <fastdds/rtps/common/InstanceHandle.h>
26
#include <fastdds/rtps/common/SampleIdentity.h>
27
#include <fastdds/rtps/common/Time_t.h>
28
29
#include <fastrtps/fastrtps_dll.h>
30
31
namespace eprosima {
32
namespace fastrtps {
33
34
/**
35
 * Class SampleInfo_t with information that is provided along a sample when reading data from a Subscriber.
36
 * @ingroup FASTRTPS_MODULE
37
 */
38
class RTPS_DllAPI SampleInfo_t
39
{
40
public:
41
42
    SampleInfo_t()
43
        : sampleKind(rtps::ALIVE)
44
        , ownershipStrength(0)
45
        , sample_identity(rtps::SampleIdentity::unknown())
46
        , related_sample_identity(rtps::SampleIdentity::unknown())
47
0
    {
48
0
    }
49
50
    virtual ~SampleInfo_t()
51
0
    {
52
0
    }
53
54
    //!Sample kind.
55
    rtps::ChangeKind_t sampleKind;
56
    //!Ownership Strength of the writer of the sample (0 if the ownership kind is set to SHARED_OWNERSHIP_QOS).
57
    uint32_t ownershipStrength;
58
    //!Source timestamp of the sample.
59
    rtps::Time_t sourceTimestamp;
60
    //!Reception timestamp of the sample.
61
    rtps::Time_t receptionTimestamp;
62
    //!InstanceHandle of the data
63
    rtps::InstanceHandle_t iHandle;
64
65
    rtps::SampleIdentity sample_identity;
66
67
    rtps::SampleIdentity related_sample_identity;
68
};
69
70
} /* namespace fastrtps */
71
} /* namespace eprosima */
72
73
#endif /* SAMPLEINFO_H_ */