| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DataReader.hpp
1// Copyright 2019 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__DATAREADER_HPP
21#define FASTDDS_DDS_SUBSCRIBER__DATAREADER_HPP
22
23#include <cstdint>
24#include <vector>
25
26#include <fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp>
27#include <fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.hpp>
28#include <fastdds/dds/core/Entity.hpp>
29#include <fastdds/dds/core/LoanableCollection.hpp>
30#include <fastdds/dds/core/LoanableSequence.hpp>
31#include <fastdds/dds/core/ReturnCode.hpp>
32#include <fastdds/dds/core/status/BaseStatus.hpp>
33#include <fastdds/dds/core/status/DeadlineMissedStatus.hpp>
34#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
35#include <fastdds/dds/core/status/SampleRejectedStatus.hpp>
36#include <fastdds/dds/core/status/StatusMask.hpp>
37#include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
38#include <fastdds/dds/subscriber/ReadCondition.hpp>
39#include <fastdds/dds/subscriber/SampleInfo.hpp>
40#include <fastdds/dds/topic/TypeSupport.hpp>
41
42#include <fastdds/fastdds_dll.hpp>
43
44#include <fastdds/rtps/common/LocatorList.hpp>
45#include <fastdds/rtps/common/Time_t.hpp>
46
47 namespace dds {
48 namespace sub {
49
50 class DataReader;
51
52} // namespace sub
53} // namespace dds
54
55 namespace eprosima {
56 namespace fastdds {
57 namespace rtps {
58 struct GUID_t;
59} // namespace rtps
60
61 namespace dds {
62
63 class Subscriber;
64 class SubscriberImpl;
65 class DataReaderImpl;
66 class DataReaderListener;
67 class DataReaderQos;
68 class DataWriter;
69 class TopicDescription;
70 struct LivelinessChangedStatus;
71
72// Not yet implemented
73 class QueryCondition;
74
75 using SampleInfoSeq = LoanableSequence<SampleInfo>;
76
82 class DataReader : public DomainEntity
83{
84 protected:
85
86 friend class DataReaderImpl;
87 friend class SubscriberImpl;
88
93 DataReader(
94 DataReaderImpl* impl,
95 const StatusMask& mask = StatusMask::all());
96
97 DataReader(
98 Subscriber* s,
99 TopicDescription* topic,
100 const DataReaderQos& qos,
101 DataReaderListener* listener = nullptr,
102 const StatusMask& mask = StatusMask::all());
103
104 public:
105
109 virtual ~DataReader();
110
117 FASTDDS_EXPORTED_API ReturnCode_t enable() override;
118
126 FASTDDS_EXPORTED_API bool wait_for_unread_message(
127 const fastdds::dds::Duration_t& timeout);
128
139 FASTDDS_EXPORTED_API ReturnCode_t wait_for_historical_data(
140 const fastdds::dds::Duration_t& max_wait) const;
141
142
146
148
306 FASTDDS_EXPORTED_API ReturnCode_t read(
307 LoanableCollection& data_values,
308 SampleInfoSeq& sample_infos,
309 int32_t max_samples = LENGTH_UNLIMITED,
310 SampleStateMask sample_states = ANY_SAMPLE_STATE,
311 ViewStateMask view_states = ANY_VIEW_STATE,
312 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
313
337 FASTDDS_EXPORTED_API ReturnCode_t read_w_condition(
338 LoanableCollection& data_values,
339 SampleInfoSeq& sample_infos,
340 int32_t max_samples,
341 ReadCondition* a_condition);
342
377 FASTDDS_EXPORTED_API ReturnCode_t read_instance(
378 LoanableCollection& data_values,
379 SampleInfoSeq& sample_infos,
380 int32_t max_samples = LENGTH_UNLIMITED,
381 const InstanceHandle_t& a_handle = HANDLE_NIL,
382 SampleStateMask sample_states = ANY_SAMPLE_STATE,
383 ViewStateMask view_states = ANY_VIEW_STATE,
384 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
385
442 FASTDDS_EXPORTED_API ReturnCode_t read_next_instance(
443 LoanableCollection& data_values,
444 SampleInfoSeq& sample_infos,
445 int32_t max_samples = LENGTH_UNLIMITED,
446 const InstanceHandle_t& previous_handle = HANDLE_NIL,
447 SampleStateMask sample_states = ANY_SAMPLE_STATE,
448 ViewStateMask view_states = ANY_VIEW_STATE,
449 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
450
480 FASTDDS_EXPORTED_API ReturnCode_t read_next_instance_w_condition(
481 LoanableCollection& data_values,
482 SampleInfoSeq& sample_infos,
483 int32_t max_samples,
484 const InstanceHandle_t& previous_handle,
485 ReadCondition* a_condition);
486
506 FASTDDS_EXPORTED_API ReturnCode_t read_next_sample(
507 void* data,
508 SampleInfo* info);
509
541 FASTDDS_EXPORTED_API ReturnCode_t take(
542 LoanableCollection& data_values,
543 SampleInfoSeq& sample_infos,
544 int32_t max_samples = LENGTH_UNLIMITED,
545 SampleStateMask sample_states = ANY_SAMPLE_STATE,
546 ViewStateMask view_states = ANY_VIEW_STATE,
547 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
548
570 FASTDDS_EXPORTED_API ReturnCode_t take_w_condition(
571 LoanableCollection& data_values,
572 SampleInfoSeq& sample_infos,
573 int32_t max_samples,
574 ReadCondition* a_condition);
575
604 FASTDDS_EXPORTED_API ReturnCode_t take_instance(
605 LoanableCollection& data_values,
606 SampleInfoSeq& sample_infos,
607 int32_t max_samples = LENGTH_UNLIMITED,
608 const InstanceHandle_t& a_handle = HANDLE_NIL,
609 SampleStateMask sample_states = ANY_SAMPLE_STATE,
610 ViewStateMask view_states = ANY_VIEW_STATE,
611 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
612
643 FASTDDS_EXPORTED_API ReturnCode_t take_next_instance(
644 LoanableCollection& data_values,
645 SampleInfoSeq& sample_infos,
646 int32_t max_samples = LENGTH_UNLIMITED,
647 const InstanceHandle_t& previous_handle = HANDLE_NIL,
648 SampleStateMask sample_states = ANY_SAMPLE_STATE,
649 ViewStateMask view_states = ANY_VIEW_STATE,
650 InstanceStateMask instance_states = ANY_INSTANCE_STATE);
651
680 FASTDDS_EXPORTED_API ReturnCode_t take_next_instance_w_condition(
681 LoanableCollection& data_values,
682 SampleInfoSeq& sample_infos,
683 int32_t max_samples,
684 const InstanceHandle_t& previous_handle,
685 ReadCondition* a_condition);
686
708 FASTDDS_EXPORTED_API ReturnCode_t take_next_sample(
709 void* data,
710 SampleInfo* info);
711
713
747 FASTDDS_EXPORTED_API ReturnCode_t return_loan(
748 LoanableCollection& data_values,
749 SampleInfoSeq& sample_infos);
750
768 FASTDDS_EXPORTED_API ReturnCode_t get_key_value(
769 void* key_holder,
770 const InstanceHandle_t& handle);
771
783 FASTDDS_EXPORTED_API InstanceHandle_t lookup_instance(
784 const void* instance) const;
785
795 FASTDDS_EXPORTED_API ReturnCode_t get_first_untaken_info(
796 SampleInfo* info);
797
805 FASTDDS_EXPORTED_API uint64_t get_unread_count() const;
806
814 FASTDDS_EXPORTED_API uint64_t get_unread_count(
815 bool mark_as_read) const;
816
822 FASTDDS_EXPORTED_API const fastdds::rtps::GUID_t& guid();
823
829 FASTDDS_EXPORTED_API const fastdds::rtps::GUID_t& guid() const;
830
836 FASTDDS_EXPORTED_API InstanceHandle_t get_instance_handle() const;
837
843 FASTDDS_EXPORTED_API TypeSupport type() const;
844
850 FASTDDS_EXPORTED_API const TopicDescription* get_topicdescription() const;
851
857 FASTDDS_EXPORTED_API ReturnCode_t get_requested_deadline_missed_status(
858 RequestedDeadlineMissedStatus& status);
859
867 FASTDDS_EXPORTED_API ReturnCode_t get_requested_incompatible_qos_status(
868 RequestedIncompatibleQosStatus& status);
869
878 FASTDDS_EXPORTED_API ReturnCode_t set_qos(
879 const DataReaderQos& qos);
880
886 FASTDDS_EXPORTED_API const DataReaderQos& get_qos() const;
887
895 FASTDDS_EXPORTED_API ReturnCode_t get_qos(
896 DataReaderQos& qos) const;
897
905 FASTDDS_EXPORTED_API ReturnCode_t set_listener(
906 DataReaderListener* listener);
907
916 FASTDDS_EXPORTED_API ReturnCode_t set_listener(
917 DataReaderListener* listener,
918 const StatusMask& mask);
924 FASTDDS_EXPORTED_API const DataReaderListener* get_listener() const;
925
926 /* TODO
927 FASTDDS_EXPORTED_API bool get_key_value(
928 void* data,
929 const InstanceHandle_t& handle);
930 */
931
939 FASTDDS_EXPORTED_API ReturnCode_t get_liveliness_changed_status(
940 LivelinessChangedStatus& status) const;
941
942
950 FASTDDS_EXPORTED_API ReturnCode_t get_sample_lost_status(
951 SampleLostStatus& status) const;
952
960 FASTDDS_EXPORTED_API ReturnCode_t get_sample_rejected_status(
961 SampleRejectedStatus& status) const;
962
969 FASTDDS_EXPORTED_API ReturnCode_t get_subscription_matched_status(
970 SubscriptionMatchedStatus& status) const;
971
981 FASTDDS_EXPORTED_API ReturnCode_t get_matched_publication_data(
982 PublicationBuiltinTopicData& publication_data,
983 const fastdds::rtps::InstanceHandle_t& publication_handle) const;
984
993 FASTDDS_EXPORTED_API ReturnCode_t get_matched_publications(
994 std::vector<InstanceHandle_t>& publication_handles) const;
995
1006 FASTDDS_EXPORTED_API ReadCondition* create_readcondition(
1007 SampleStateMask sample_states,
1008 ViewStateMask view_states,
1009 InstanceStateMask instance_states);
1010
1023 FASTDDS_EXPORTED_API QueryCondition* create_querycondition(
1024 SampleStateMask sample_states,
1025 ViewStateMask view_states,
1026 InstanceStateMask instance_states,
1027 const std::string& query_expression,
1028 const std::vector<std::string>& query_parameters);
1029
1036 FASTDDS_EXPORTED_API ReturnCode_t delete_readcondition(
1037 ReadCondition* a_condition);
1038
1043 FASTDDS_EXPORTED_API const Subscriber* get_subscriber() const;
1044
1054 FASTDDS_EXPORTED_API ReturnCode_t delete_contained_entities();
1055
1066 FASTDDS_EXPORTED_API bool is_sample_valid(
1067 const void* data,
1068 const SampleInfo* info) const;
1069
1078 FASTDDS_EXPORTED_API ReturnCode_t get_listening_locators(
1079 rtps::LocatorList& locators) const;
1080
1089 FASTDDS_EXPORTED_API ReturnCode_t get_subscription_builtin_topic_data(
1090 SubscriptionBuiltinTopicData& subscription_data) const;
1091
1107 FASTDDS_EXPORTED_API ReturnCode_t set_related_datawriter(
1108 const DataWriter* related_writer);
1109
1110 protected:
1111
1112 DataReaderImpl* impl_;
1113
1114 friend class ::dds::sub::DataReader;
1115
1116};
1117
1118} // namespace dds
1119} // namespace fastdds
1120} // namespace eprosima
1121
1122#endif // FASTDDS_DDS_SUBSCRIBER__DATAREADER_HPP
eprosima::fastdds::dds::DataReader::take_next_sample
FASTDDS_EXPORTED_API ReturnCode_t take_next_sample(void *data, SampleInfo *info)
This operation copies the next, non-previously accessed Data value from the DataReader and ‘removes’ ...
eprosima::fastdds::dds::DataReader::create_readcondition
FASTDDS_EXPORTED_API ReadCondition * create_readcondition(SampleStateMask sample_states, ViewStateMask view_states, InstanceStateMask instance_states)
This operation creates a ReadCondition.
eprosima::fastdds::dds::DataReader::get_topicdescription
FASTDDS_EXPORTED_API const TopicDescription * get_topicdescription() const
Get TopicDescription.
eprosima::fastdds::dds::DataReader::get_sample_rejected_status
FASTDDS_EXPORTED_API ReturnCode_t get_sample_rejected_status(SampleRejectedStatus &status) const
Get the SAMPLE_REJECTED communication status.
eprosima::fastdds::dds::DataReader::return_loan
FASTDDS_EXPORTED_API ReturnCode_t return_loan(LoanableCollection &data_values, SampleInfoSeq &sample_infos)
This operation indicates to the DataReader that the application is done accessing the collection of d...
eprosima::fastdds::dds::DataReader::impl_
DataReaderImpl * impl_
Definition DataReader.hpp:1112
eprosima::fastdds::dds::DataReader::DataReader
DataReader(Subscriber *s, TopicDescription *topic, const DataReaderQos &qos, DataReaderListener *listener=nullptr, const StatusMask &mask=StatusMask::all())
eprosima::fastdds::dds::DataReader::is_sample_valid
FASTDDS_EXPORTED_API bool is_sample_valid(const void *data, const SampleInfo *info) const
Checks whether a loaned sample is still valid or is corrupted.
eprosima::fastdds::dds::DataReader::read_next_instance_w_condition
FASTDDS_EXPORTED_API ReturnCode_t read_next_instance_w_condition(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples, const InstanceHandle_t &previous_handle, ReadCondition *a_condition)
This operation accesses a collection of Data values from the DataReader.
eprosima::fastdds::dds::DataReader::get_subscription_matched_status
FASTDDS_EXPORTED_API ReturnCode_t get_subscription_matched_status(SubscriptionMatchedStatus &status) const
Returns the subscription matched status.
eprosima::fastdds::dds::DataReader::get_unread_count
FASTDDS_EXPORTED_API uint64_t get_unread_count() const
Get the number of samples pending to be read.
eprosima::fastdds::dds::DataReader::guid
FASTDDS_EXPORTED_API const fastdds::rtps::GUID_t & guid()
Get associated GUID.
eprosima::fastdds::dds::DataReader::read_next_sample
FASTDDS_EXPORTED_API ReturnCode_t read_next_sample(void *data, SampleInfo *info)
This operation copies the next, non-previously accessed Data value from the DataReader; the operation...
eprosima::fastdds::dds::DataReader::take_instance
FASTDDS_EXPORTED_API ReturnCode_t take_instance(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, const InstanceHandle_t &a_handle=HANDLE_NIL, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::take_next_instance
FASTDDS_EXPORTED_API ReturnCode_t take_next_instance(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, const InstanceHandle_t &previous_handle=HANDLE_NIL, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::read_instance
FASTDDS_EXPORTED_API ReturnCode_t read_instance(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, const InstanceHandle_t &a_handle=HANDLE_NIL, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::get_key_value
FASTDDS_EXPORTED_API ReturnCode_t get_key_value(void *key_holder, const InstanceHandle_t &handle)
NOT YET IMPLEMENTED.
eprosima::fastdds::dds::DataReader::get_unread_count
FASTDDS_EXPORTED_API uint64_t get_unread_count(bool mark_as_read) const
Get the number of samples pending to be read.
eprosima::fastdds::dds::DataReader::~DataReader
virtual ~DataReader()
Destructor.
eprosima::fastdds::dds::DataReader::get_requested_deadline_missed_status
FASTDDS_EXPORTED_API ReturnCode_t get_requested_deadline_missed_status(RequestedDeadlineMissedStatus &status)
Get the requested deadline missed status.
eprosima::fastdds::dds::DataReader::guid
FASTDDS_EXPORTED_API const fastdds::rtps::GUID_t & guid() const
Get associated GUID.
eprosima::fastdds::dds::DataReader::DataReader
friend class ::dds::sub::DataReader
Definition DataReader.hpp:1114
eprosima::fastdds::dds::DataReader::take
FASTDDS_EXPORTED_API ReturnCode_t take(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::read
FASTDDS_EXPORTED_API ReturnCode_t read(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::get_requested_incompatible_qos_status
FASTDDS_EXPORTED_API ReturnCode_t get_requested_incompatible_qos_status(RequestedIncompatibleQosStatus &status)
Get the requested incompatible qos status.
eprosima::fastdds::dds::DataReader::get_subscriber
FASTDDS_EXPORTED_API const Subscriber * get_subscriber() const
Getter for the Subscriber.
eprosima::fastdds::dds::DataReader::set_qos
FASTDDS_EXPORTED_API ReturnCode_t set_qos(const DataReaderQos &qos)
Setter for the DataReaderQos.
eprosima::fastdds::dds::DataReader::get_matched_publication_data
FASTDDS_EXPORTED_API ReturnCode_t get_matched_publication_data(PublicationBuiltinTopicData &publication_data, const fastdds::rtps::InstanceHandle_t &publication_handle) const
Retrieves in a publication associated with the DataWriter.
eprosima::fastdds::dds::DataReader::wait_for_historical_data
FASTDDS_EXPORTED_API ReturnCode_t wait_for_historical_data(const fastdds::dds::Duration_t &max_wait) const
NOT YET IMPLEMENTED.
eprosima::fastdds::dds::DataReader::get_instance_handle
FASTDDS_EXPORTED_API InstanceHandle_t get_instance_handle() const
Getter for the associated InstanceHandle.
eprosima::fastdds::dds::DataReader::get_qos
FASTDDS_EXPORTED_API const DataReaderQos & get_qos() const
Getter for the DataReaderQos.
eprosima::fastdds::dds::DataReader::take_w_condition
FASTDDS_EXPORTED_API ReturnCode_t take_w_condition(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples, ReadCondition *a_condition)
This operation is analogous to read_w_condition except it accesses samples via the ‘take’ operation.
eprosima::fastdds::dds::DataReader::type
FASTDDS_EXPORTED_API TypeSupport type() const
Getter for the data type.
eprosima::fastdds::dds::DataReader::SubscriberImpl
friend class SubscriberImpl
Definition DataReader.hpp:87
eprosima::fastdds::dds::DataReader::get_matched_publications
FASTDDS_EXPORTED_API ReturnCode_t get_matched_publications(std::vector< InstanceHandle_t > &publication_handles) const
Fills the given vector with the InstanceHandle_t of matched DataReaders.
eprosima::fastdds::dds::DataReader::set_related_datawriter
FASTDDS_EXPORTED_API ReturnCode_t set_related_datawriter(const DataWriter *related_writer)
This operation sets the key of the DataWriter that is related to this DataReader.
eprosima::fastdds::dds::DataReader::lookup_instance
FASTDDS_EXPORTED_API InstanceHandle_t lookup_instance(const void *instance) const
Takes as a parameter an instance and returns a handle that can be used in subsequent operations that ...
eprosima::fastdds::dds::DataReader::read_w_condition
FASTDDS_EXPORTED_API ReturnCode_t read_w_condition(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples, ReadCondition *a_condition)
This operation accesses via ‘read’ the samples that match the criteria specified in the ReadCondition...
eprosima::fastdds::dds::DataReader::get_subscription_builtin_topic_data
FASTDDS_EXPORTED_API ReturnCode_t get_subscription_builtin_topic_data(SubscriptionBuiltinTopicData &subscription_data) const
Retrieve the subscription data discovery information.
eprosima::fastdds::dds::DataReader::create_querycondition
FASTDDS_EXPORTED_API QueryCondition * create_querycondition(SampleStateMask sample_states, ViewStateMask view_states, InstanceStateMask instance_states, const std::string &query_expression, const std::vector< std::string > &query_parameters)
This operation creates a QueryCondition.
eprosima::fastdds::dds::DataReader::delete_contained_entities
FASTDDS_EXPORTED_API ReturnCode_t delete_contained_entities()
This operation deletes all the entities that were created by means of the “create” operations on the ...
eprosima::fastdds::dds::DataReader::DataReaderImpl
friend class DataReaderImpl
Definition DataReader.hpp:86
eprosima::fastdds::dds::DataReader::delete_readcondition
FASTDDS_EXPORTED_API ReturnCode_t delete_readcondition(ReadCondition *a_condition)
This operation deletes a ReadCondition attached to the DataReader.
eprosima::fastdds::dds::DataReader::get_qos
FASTDDS_EXPORTED_API ReturnCode_t get_qos(DataReaderQos &qos) const
Getter for the DataReaderQos.
eprosima::fastdds::dds::DataReader::enable
FASTDDS_EXPORTED_API ReturnCode_t enable() override
This operation enables the DataReader.
eprosima::fastdds::dds::DataReader::get_listener
FASTDDS_EXPORTED_API const DataReaderListener * get_listener() const
Getter for the DataReaderListener.
eprosima::fastdds::dds::DataReader::take_next_instance_w_condition
FASTDDS_EXPORTED_API ReturnCode_t take_next_instance_w_condition(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples, const InstanceHandle_t &previous_handle, ReadCondition *a_condition)
This operation accesses a collection of Data values from the DataReader.
eprosima::fastdds::dds::DataReader::get_sample_lost_status
FASTDDS_EXPORTED_API ReturnCode_t get_sample_lost_status(SampleLostStatus &status) const
Get the SAMPLE_LOST communication status.
eprosima::fastdds::dds::DataReader::set_listener
FASTDDS_EXPORTED_API ReturnCode_t set_listener(DataReaderListener *listener, const StatusMask &mask)
Modifies the DataReaderListener.
eprosima::fastdds::dds::DataReader::get_liveliness_changed_status
FASTDDS_EXPORTED_API ReturnCode_t get_liveliness_changed_status(LivelinessChangedStatus &status) const
Get the liveliness changed status.
eprosima::fastdds::dds::DataReader::read_next_instance
FASTDDS_EXPORTED_API ReturnCode_t read_next_instance(LoanableCollection &data_values, SampleInfoSeq &sample_infos, int32_t max_samples=LENGTH_UNLIMITED, const InstanceHandle_t &previous_handle=HANDLE_NIL, SampleStateMask sample_states=ANY_SAMPLE_STATE, ViewStateMask view_states=ANY_VIEW_STATE, InstanceStateMask instance_states=ANY_INSTANCE_STATE)
Access a collection of data samples from the DataReader.
eprosima::fastdds::dds::DataReader::get_first_untaken_info
FASTDDS_EXPORTED_API ReturnCode_t get_first_untaken_info(SampleInfo *info)
Returns information about the first untaken sample.
eprosima::fastdds::dds::DataReader::set_listener
FASTDDS_EXPORTED_API ReturnCode_t set_listener(DataReaderListener *listener)
Modifies the DataReaderListener, sets the mask to StatusMask::all().
eprosima::fastdds::dds::DataReader::wait_for_unread_message
FASTDDS_EXPORTED_API bool wait_for_unread_message(const fastdds::dds::Duration_t &timeout)
Method to block the current thread until an unread message is available.
eprosima::fastdds::dds::DataReader::DataReader
DataReader(DataReaderImpl *impl, const StatusMask &mask=StatusMask::all())
Create a data reader, assigning its pointer to the associated implementation.
eprosima::fastdds::dds::DataReader::get_listening_locators
FASTDDS_EXPORTED_API ReturnCode_t get_listening_locators(rtps::LocatorList &locators) const
Get the list of locators on which this DataReader is listening.
eprosima::fastdds::dds::DataReaderListener
Class DataReaderListener, it should be used by the end user to implement specific callbacks to certai...
Definition DataReaderListener.hpp:41
eprosima::fastdds::dds::DataReaderQos
Class DataReaderQos, containing all the possible Qos that can be set for a determined DataReader.
Definition DataReaderQos.hpp:44
eprosima::fastdds::dds::DataWriter
Class DataWriter, contains the actual implementation of the behaviour of the DataWriter.
Definition DataWriter.hpp:67
eprosima::fastdds::dds::DomainEntity::DomainEntity
DomainEntity(const StatusMask &mask=StatusMask::all())
Constructor.
Definition Entity.hpp:184
eprosima::fastdds::dds::LoanableCollection
A collection of generic opaque pointers that can receive the buffer from outside (loan).
Definition LoanableCollection.hpp:34
eprosima::fastdds::dds::LoanableSequence
A type-safe, ordered collection of elements that can receive the buffer from outside (loan).
Definition LoanableSequence.hpp:63
eprosima::fastdds::dds::ReadCondition
A Condition specifically dedicated to read operations and attached to one DataReader.
Definition ReadCondition.hpp:52
eprosima::fastdds::dds::StatusMask
StatusMask is a bitmap or bitset field.
Definition StatusMask.hpp:48
eprosima::fastdds::dds::StatusMask::all
static StatusMask all()
Get all StatusMasks.
Definition StatusMask.hpp:104
eprosima::fastdds::dds::Subscriber
Class Subscriber, contains the public API that allows the user to control the reception of messages.
Definition Subscriber.hpp:66
eprosima::fastdds::dds::TopicDescription
Class TopicDescription, represents the fact that both publications and subscriptions are tied to a si...
Definition TopicDescription.hpp:38
eprosima::fastdds::dds::TypeSupport
Class TypeSupport used to provide the DomainRTPSParticipant with the methods to serialize,...
Definition TypeSupport.hpp:47
eprosima::fastdds::rtps::LocatorList
Class LocatorList, a Locator vector that doesn't allow duplicates.
Definition LocatorList.hpp:97
dds::sub
Definition DataReader.hpp:48
dds
Definition DomainParticipant.hpp:46
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::SampleStateMask
uint16_t SampleStateMask
A bit-mask (list) of sample states, i.e. SampleStateKind.
Definition SampleState.hpp:51
eprosima::fastdds::dds::ANY_INSTANCE_STATE
constexpr InstanceStateMask ANY_INSTANCE_STATE
Any instance state.
Definition InstanceState.hpp:81
eprosima::fastdds::dds::ANY_SAMPLE_STATE
constexpr SampleStateMask ANY_SAMPLE_STATE
Any sample state.
Definition SampleState.hpp:54
eprosima::fastdds::dds::LENGTH_UNLIMITED
const int32_t LENGTH_UNLIMITED
Definition Types.hpp:28
eprosima::fastdds::dds::SubscriptionBuiltinTopicData
rtps::SubscriptionBuiltinTopicData SubscriptionBuiltinTopicData
Definition SubscriptionBuiltinTopicData.hpp:28
eprosima::fastdds::dds::SampleInfoSeq
LoanableSequence< SampleInfo > SampleInfoSeq
Definition DataReader.hpp:75
eprosima::fastdds::dds::HANDLE_NIL
FASTDDS_EXPORTED_API const InstanceHandle_t HANDLE_NIL
eprosima::fastdds::dds::InstanceHandle_t
eprosima::fastdds::rtps::InstanceHandle_t InstanceHandle_t
Definition InstanceHandle.hpp:31
eprosima::fastdds::dds::RequestedIncompatibleQosStatus
IncompatibleQosStatus RequestedIncompatibleQosStatus
Alias of IncompatibleQosStatus.
Definition IncompatibleQosStatus.hpp:88
eprosima::fastdds::dds::RequestedDeadlineMissedStatus
DeadlineMissedStatus RequestedDeadlineMissedStatus
Typedef of DeadlineMissedStatus.
Definition DeadlineMissedStatus.hpp:59
eprosima::fastdds::dds::SampleLostStatus
BaseStatus SampleLostStatus
Alias of BaseStatus.
Definition BaseStatus.hpp:39
eprosima::fastdds::dds::Duration_t
Time_t Duration_t
Definition Time_t.hpp:91
eprosima::fastdds::dds::ViewStateMask
uint16_t ViewStateMask
A bit-mask (list) of view states, i.e. ViewStateKind.
Definition ViewState.hpp:62
eprosima::fastdds::dds::ReturnCode_t
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
eprosima::fastdds::dds::InstanceStateMask
uint16_t InstanceStateMask
A bit-mask (list) of instance states, i.e. InstanceStateKind.
Definition InstanceState.hpp:75
eprosima::fastdds::dds::ANY_VIEW_STATE
constexpr ViewStateMask ANY_VIEW_STATE
Any view state.
Definition ViewState.hpp:65
eprosima::fastdds::dds::PublicationBuiltinTopicData
rtps::PublicationBuiltinTopicData PublicationBuiltinTopicData
Definition PublicationBuiltinTopicData.hpp:28
eprosima
eProsima namespace.
eprosima::fastdds::dds::LivelinessChangedStatus
A struct storing the liveliness changed status.
Definition LivelinessChangedStatus.hpp:30
eprosima::fastdds::dds::SampleInfo
SampleInfo is the information that accompanies each sample that is ‘read’ or ‘taken.
Definition SampleInfo.hpp:41
eprosima::fastdds::dds::SampleRejectedStatus
A struct storing the sample rejected status.
Definition SampleRejectedStatus.hpp:45
eprosima::fastdds::dds::SubscriptionMatchedStatus
A structure storing the subscription status.
Definition SubscriptionMatchedStatus.hpp:33
eprosima::fastdds::rtps::GUID_t
Structure GUID_t, entity identifier, unique in DDS-RTPS Domain.
Definition Guid.hpp:40
eprosima::fastdds::rtps::InstanceHandle_t
Struct InstanceHandle_t, used to contain the key for WITH_KEY topics.
Definition InstanceHandle.hpp:154