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