Fast DDS  Version 3.6.1.0
Fast DDS
SampleInfo.hpp
1 // Copyright 2020 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 
20 #ifndef FASTDDS_DDS_SUBSCRIBER__SAMPLEINFO_HPP
21 #define FASTDDS_DDS_SUBSCRIBER__SAMPLEINFO_HPP
22 
23 #include <fastdds/dds/subscriber/InstanceState.hpp>
24 #include <fastdds/dds/subscriber/SampleState.hpp>
25 #include <fastdds/dds/subscriber/ViewState.hpp>
26 #include <fastdds/dds/topic/TypeSupport.hpp>
27 
28 #include <fastdds/rtps/common/OriginalWriterInfo.hpp>
29 #include <fastdds/rtps/common/SampleIdentity.hpp>
30 #include <fastdds/rtps/common/Time_t.hpp>
31 #include <fastdds/rtps/common/Types.hpp>
32 #include <fastdds/dds/common/InstanceHandle.hpp>
33 
34 namespace eprosima {
35 namespace fastdds {
36 namespace dds {
37 
41 struct SampleInfo
42 {
45 
48 
51 
54 
57 
59  int32_t sample_rank;
60 
62  int32_t generation_rank;
63 
67 
70 
73 
76 
81 
84 
86  bool valid_data;
87 
90 
93 
95  bool has_more_replies = false;
96 
97 };
98 
99 } // namespace dds
100 } // namespace fastdds
101 } // namespace eprosima
102 
103 #endif // FASTDDS_DDS_SUBSCRIBER__SAMPLEINFO_HPP
Definition: OriginalWriterInfo.hpp:31
This class is used to specify a sample.
Definition: SampleIdentity.hpp:34
Structure Time_t, used to describe times at RTPS protocol.
Definition: Time_t.hpp:38
Definition: DomainParticipant.hpp:46
InstanceStateKind
Indicates if the samples are from an alive eprosima::fastdds::dds::DataWriter or not.
Definition: InstanceState.hpp:64
SampleStateKind
Indicates whether or not a sample has ever been read.
Definition: SampleState.hpp:42
ViewStateKind
Indicates whether or not an instance is new.
Definition: ViewState.hpp:53
SampleInfo is the information that accompanies each sample that is ‘read’ or ‘taken.
Definition: SampleInfo.hpp:42
rtps::SampleIdentity sample_identity
Sample Identity (Extension for RPC)
Definition: SampleInfo.hpp:89
InstanceHandle_t publication_handle
identifies locally the DataWriter that modified the instance
Definition: SampleInfo.hpp:80
int32_t generation_rank
the generation difference between the time the sample was received, and the time the most recent samp...
Definition: SampleInfo.hpp:62
rtps::Time_t source_timestamp
time provided by the DataWriter when the sample was written
Definition: SampleInfo.hpp:69
rtps::SampleIdentity related_sample_identity
Related Sample Identity (Extension for RPC)
Definition: SampleInfo.hpp:92
SampleStateKind sample_state
indicates whether or not the corresponding data sample has already been read
Definition: SampleInfo.hpp:44
int32_t absolute_generation_rank
the generation difference between the time the sample was received, and the time the most recent samp...
Definition: SampleInfo.hpp:66
int32_t no_writers_generation_count
number of times the instance had become alive after it was disposed because no writers
Definition: SampleInfo.hpp:56
int32_t sample_rank
number of samples related to the same instance that follow in the collection
Definition: SampleInfo.hpp:59
ViewStateKind view_state
indicates whether the DataReader has already seen samples for the most-current generation of the rela...
Definition: SampleInfo.hpp:47
InstanceStateKind instance_state
indicates whether the instance is currently in existence or, if it has been disposed,...
Definition: SampleInfo.hpp:50
rtps::Time_t reception_timestamp
time provided by the DataReader when the sample was added to its history
Definition: SampleInfo.hpp:72
rtps::OriginalWriterInfo original_writer_info
Original writer info.
Definition: SampleInfo.hpp:83
bool valid_data
whether the DataSample contains data or is only used to communicate of a change in the instance
Definition: SampleInfo.hpp:86
bool has_more_replies
Flag to indicate if there are more replies (Extension for RPC)
Definition: SampleInfo.hpp:95
InstanceHandle_t instance_handle
identifies locally the corresponding instance
Definition: SampleInfo.hpp:75
int32_t disposed_generation_count
number of times the instance had become alive after it was disposed
Definition: SampleInfo.hpp:53
Struct InstanceHandle_t, used to contain the key for WITH_KEY topics.
Definition: InstanceHandle.hpp:154