| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
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
19
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/SampleIdentity.hpp>
29#include <fastdds/rtps/common/Time_t.hpp>
30#include <fastdds/rtps/common/Types.hpp>
31#include <fastdds/dds/common/InstanceHandle.hpp>
32
33 namespace eprosima {
34 namespace fastdds {
35 namespace dds {
36
40 struct SampleInfo
41{
43 SampleStateKind sample_state;
44
46 ViewStateKind view_state;
47
49 InstanceStateKind instance_state;
50
52 int32_t disposed_generation_count;
53
55 int32_t no_writers_generation_count;
56
58 int32_t sample_rank;
59
61 int32_t generation_rank;
62
65 int32_t absolute_generation_rank;
66
68 rtps::Time_t source_timestamp;
69
71 rtps::Time_t reception_timestamp;
72
74 InstanceHandle_t instance_handle;
75
79 InstanceHandle_t publication_handle;
80
82 bool valid_data;
83
85 rtps::SampleIdentity sample_identity;
86
88 rtps::SampleIdentity related_sample_identity;
89
91 bool has_more_replies = false;
92
93};
94
95} // namespace dds
96} // namespace fastdds
97} // namespace eprosima
98
99#endif // FASTDDS_DDS_SUBSCRIBER__SAMPLEINFO_HPP
eprosima::fastdds::rtps::SampleIdentity
This class is used to specify a sample.
Definition SampleIdentity.hpp:34
eprosima::fastdds::rtps::Time_t
Structure Time_t, used to describe times at RTPS protocol.
Definition Time_t.hpp:38
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::InstanceHandle_t
eprosima::fastdds::rtps::InstanceHandle_t InstanceHandle_t
Definition InstanceHandle.hpp:31
eprosima::fastdds::dds::InstanceStateKind
InstanceStateKind
Indicates if the samples are from an alive DataWriter or not.
Definition InstanceState.hpp:64
eprosima::fastdds::dds::SampleStateKind
SampleStateKind
Indicates whether or not a sample has ever been read.
Definition SampleState.hpp:42
eprosima::fastdds::dds::ViewStateKind
ViewStateKind
Indicates whether or not an instance is new.
Definition ViewState.hpp:53
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::dds::SampleInfo
SampleInfo is the information that accompanies each sample that is ‘read’ or ‘taken.
Definition SampleInfo.hpp:41
eprosima::fastdds::dds::SampleInfo::sample_identity
rtps::SampleIdentity sample_identity
Sample Identity (Extension for RPC).
Definition SampleInfo.hpp:85
eprosima::fastdds::dds::SampleInfo::publication_handle
InstanceHandle_t publication_handle
identifies locally the DataWriter that modified the instance
Definition SampleInfo.hpp:79
eprosima::fastdds::dds::SampleInfo::generation_rank
int32_t generation_rank
the generation difference between the time the sample was received, and the time the most recent samp...
Definition SampleInfo.hpp:61
eprosima::fastdds::dds::SampleInfo::source_timestamp
rtps::Time_t source_timestamp
time provided by the DataWriter when the sample was written
Definition SampleInfo.hpp:68
eprosima::fastdds::dds::SampleInfo::related_sample_identity
rtps::SampleIdentity related_sample_identity
Related Sample Identity (Extension for RPC).
Definition SampleInfo.hpp:88
eprosima::fastdds::dds::SampleInfo::sample_state
SampleStateKind sample_state
indicates whether or not the corresponding data sample has already been read
Definition SampleInfo.hpp:43
eprosima::fastdds::dds::SampleInfo::absolute_generation_rank
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:65
eprosima::fastdds::dds::SampleInfo::no_writers_generation_count
int32_t no_writers_generation_count
number of times the instance had become alive after it was disposed because no writers
Definition SampleInfo.hpp:55
eprosima::fastdds::dds::SampleInfo::sample_rank
int32_t sample_rank
number of samples related to the same instance that follow in the collection
Definition SampleInfo.hpp:58
eprosima::fastdds::dds::SampleInfo::view_state
ViewStateKind view_state
indicates whether the DataReader has already seen samples for the most-current generation of the rela...
Definition SampleInfo.hpp:46
eprosima::fastdds::dds::SampleInfo::instance_state
InstanceStateKind instance_state
indicates whether the instance is currently in existence or, if it has been disposed,...
Definition SampleInfo.hpp:49
eprosima::fastdds::dds::SampleInfo::reception_timestamp
rtps::Time_t reception_timestamp
time provided by the DataReader when the sample was added to its history
Definition SampleInfo.hpp:71
eprosima::fastdds::dds::SampleInfo::valid_data
bool valid_data
whether the DataSample contains data or is only used to communicate of a change in the instance
Definition SampleInfo.hpp:82
eprosima::fastdds::dds::SampleInfo::has_more_replies
bool has_more_replies
Flag to indicate if there are more replies (Extension for RPC).
Definition SampleInfo.hpp:91
eprosima::fastdds::dds::SampleInfo::instance_handle
InstanceHandle_t instance_handle
identifies locally the corresponding instance
Definition SampleInfo.hpp:74
eprosima::fastdds::dds::SampleInfo::disposed_generation_count
int32_t disposed_generation_count
number of times the instance had become alive after it was disposed
Definition SampleInfo.hpp:52