Adds further ext deps as-is binaries copies from customers env.
Qt6 Migration CI / migrate (push) Canceled after 0s
Qt6 Migration CI / migrate (push) Canceled after 0s
This commit is contained in:
3700 files changed
+2132394
No files matched your search
+289
@@ -0,0 +1,289 @@
|
||||
// Copyright(c) 2006 to 2021 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_ANY_DATA_READER_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_ANY_DATA_READER_DELEGATE_HPP_
|
||||
|
||||
#include <dds/core/types.hpp>
|
||||
#include <dds/core/Time.hpp>
|
||||
#include <dds/core/InstanceHandle.hpp>
|
||||
#include <dds/core/status/Status.hpp>
|
||||
#include <dds/sub/status/detail/DataStateImpl.hpp>
|
||||
#include <dds/sub/qos/DataReaderQos.hpp>
|
||||
#include <dds/sub/Sample.hpp>
|
||||
#include <dds/sub/SampleInfo.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/topic/TopicTraits.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/ObjectSet.hpp>
|
||||
#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>
|
||||
#include <dds/topic/TopicDescription.hpp>
|
||||
#include <org/eclipse/cyclonedds/topic/CDRBlob.hpp>
|
||||
|
||||
#include <dds/topic/BuiltinTopic.hpp>
|
||||
|
||||
|
||||
namespace dds { namespace sub {
|
||||
template <typename DELEGATE>
|
||||
class TAnyDataReader;
|
||||
} }
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
class QueryContainer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
|
||||
class OMG_DDS_API SamplesHolder
|
||||
{
|
||||
public:
|
||||
SamplesHolder() {}
|
||||
virtual ~SamplesHolder() {}
|
||||
|
||||
virtual uint32_t get_length() const = 0;
|
||||
virtual SamplesHolder& operator++(int) = 0;
|
||||
virtual void append_sample(void *sample, const dds_sample_info_t *si) = 0;
|
||||
static dds::sub::SampleInfo sample_info_from_c(const dds_sample_info_t *si);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
|
||||
class QueryDelegate;
|
||||
|
||||
class OMG_DDS_API AnyDataReaderDelegate : public org::eclipse::cyclonedds::core::EntityDelegate
|
||||
{
|
||||
public:
|
||||
typedef ::dds::core::smart_ptr_traits< AnyDataReaderDelegate >::ref_type ref_type;
|
||||
typedef ::dds::core::smart_ptr_traits< AnyDataReaderDelegate >::weak_ref_type weak_ref_type;
|
||||
|
||||
AnyDataReaderDelegate(const dds::sub::qos::DataReaderQos& qos,
|
||||
const dds::topic::TopicDescription& td);
|
||||
virtual ~AnyDataReaderDelegate();
|
||||
|
||||
public:
|
||||
/* DDS API mirror. */
|
||||
dds::sub::qos::DataReaderQos qos() const;
|
||||
void qos(const dds::sub::qos::DataReaderQos& qos);
|
||||
|
||||
/* Let DataReader<T> implement the subscriber handling to circumvent circular dependencies. */
|
||||
virtual const dds::sub::TSubscriber<org::eclipse::cyclonedds::sub::SubscriberDelegate>& subscriber() const = 0;
|
||||
const dds::topic::TopicDescription& topic_description() const;
|
||||
|
||||
void wait_for_historical_data(const dds::core::Duration& timeout);
|
||||
|
||||
dds::core::status::LivelinessChangedStatus
|
||||
liveliness_changed_status();
|
||||
dds::core::status::SampleRejectedStatus
|
||||
sample_rejected_status();
|
||||
dds::core::status::SampleLostStatus
|
||||
sample_lost_status();
|
||||
dds::core::status::RequestedDeadlineMissedStatus
|
||||
requested_deadline_missed_status();
|
||||
dds::core::status::RequestedIncompatibleQosStatus
|
||||
requested_incompatible_qos_status();
|
||||
dds::core::status::SubscriptionMatchedStatus
|
||||
subscription_matched_status();
|
||||
|
||||
::dds::core::InstanceHandleSeq
|
||||
matched_publications();
|
||||
|
||||
template <typename FwdIterator>
|
||||
uint32_t
|
||||
matched_publications(FwdIterator begin, uint32_t max_size)
|
||||
{
|
||||
::dds::core::InstanceHandleSeq handleSeq = matched_publications();
|
||||
uint32_t seq_size = static_cast<uint32_t>(handleSeq.size());
|
||||
uint32_t size = (seq_size < max_size ? seq_size : max_size);
|
||||
for (uint32_t i = 0; i < size; i++, begin++) {
|
||||
*begin = handleSeq[i];
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
const dds::topic::PublicationBuiltinTopicData
|
||||
matched_publication_data(const ::dds::core::InstanceHandle& h);
|
||||
|
||||
public:
|
||||
/* Internal API. */
|
||||
dds::sub::TAnyDataReader<AnyDataReaderDelegate> wrapper_to_any();
|
||||
|
||||
static uint32_t get_ddsc_state_mask(const dds::sub::status::DataState& state);
|
||||
|
||||
void reset_data_available();
|
||||
|
||||
void add_query(org::eclipse::cyclonedds::sub::QueryDelegate& query);
|
||||
void remove_query(org::eclipse::cyclonedds::sub::QueryDelegate& query);
|
||||
|
||||
void setSample(void* sample);
|
||||
void* getSample() const;
|
||||
|
||||
bool is_loan_supported(const dds_entity_t reader) const;
|
||||
|
||||
void read_cdr(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void take_cdr(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_read(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_take(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_read_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_take_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_read_next_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void loaned_take_next_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void read(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void take(
|
||||
const dds_entity_t reader,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void read_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void take_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void read_next_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void take_next_instance(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
const dds::sub::status::DataState& mask,
|
||||
dds::sub::detail::SamplesHolder& samples,
|
||||
uint32_t max_samples);
|
||||
|
||||
void get_key_value(
|
||||
const dds_entity_t reader,
|
||||
const dds::core::InstanceHandle& handle,
|
||||
void *key);
|
||||
|
||||
dds_instance_handle_t lookup_instance(
|
||||
const dds_entity_t reader,
|
||||
const void *key) const;
|
||||
|
||||
void close();
|
||||
|
||||
private:
|
||||
void fini_samples_buffers(
|
||||
void**& c_sample_pointers,
|
||||
dds_sample_info_t*& c_sample_infos);
|
||||
|
||||
static dds_return_t collector_callback_fn (
|
||||
void *arg,
|
||||
const dds_sample_info_t *si,
|
||||
const struct ddsi_sertype *,
|
||||
struct ddsi_serdata *sd);
|
||||
|
||||
protected:
|
||||
org::eclipse::cyclonedds::core::ObjectSet queries;
|
||||
dds::sub::qos::DataReaderQos qos_;
|
||||
dds::topic::TopicDescription td_;
|
||||
|
||||
void *sample_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_ANY_DATA_READER_DELEGATE_HPP_ */
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_BUILTIN_SUBSCRIBER_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_BUILTIN_SUBSCRIBER_DELEGATE_HPP_
|
||||
|
||||
#include <dds/core/types.hpp>
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>
|
||||
#include <org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/Mutex.hpp>
|
||||
|
||||
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
|
||||
class OMG_DDS_API BuiltinSubscriberDelegate : public org::eclipse::cyclonedds::sub::SubscriberDelegate
|
||||
{
|
||||
public:
|
||||
BuiltinSubscriberDelegate(
|
||||
const dds::domain::DomainParticipant& dp,
|
||||
const dds::sub::qos::SubscriberQos& qos);
|
||||
|
||||
virtual ~BuiltinSubscriberDelegate() {};
|
||||
|
||||
std::vector<AnyDataReaderDelegate::ref_type>
|
||||
find_datareaders(const std::string& topic_name);
|
||||
|
||||
public:
|
||||
static SubscriberDelegate::ref_type
|
||||
get_builtin_subscriber(const dds::domain::DomainParticipant& dp);
|
||||
|
||||
static AnyDataReaderDelegate::ref_type
|
||||
get_builtin_reader(SubscriberDelegate& subscriber, const std::string& topic_name);
|
||||
|
||||
private:
|
||||
static org::eclipse::cyclonedds::core::Mutex builtinLock;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_BUILTIN_SUBSCRIBER_DELEGATE_HPP_ */
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_COHERENT_ACCESS_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_COHERENT_ACCESS_DELEGATE_HPP_
|
||||
|
||||
#include <dds/sub/Subscriber.hpp>
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
|
||||
class OMG_DDS_API CoherentAccessDelegate
|
||||
{
|
||||
public:
|
||||
CoherentAccessDelegate(const dds::sub::Subscriber sub);
|
||||
~CoherentAccessDelegate();
|
||||
|
||||
void end();
|
||||
|
||||
bool operator==(const CoherentAccessDelegate& other) const;
|
||||
|
||||
private:
|
||||
dds::sub::Subscriber sub;
|
||||
bool ended;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_COHERENT_ACCESS_DELEGATE_HPP_ */
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_GENERATION_COUNT_IMPL_HPP_
|
||||
#define CYCLONEDDS_SUB_GENERATION_COUNT_IMPL_HPP_
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
class GenerationCountImpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class org::eclipse::cyclonedds::sub::GenerationCountImpl
|
||||
{
|
||||
public:
|
||||
GenerationCountImpl() : d_(0), nw_(0) { }
|
||||
GenerationCountImpl(int32_t d, int32_t nw) : d_(d), nw_(nw) { }
|
||||
|
||||
public:
|
||||
inline int32_t disposed() const
|
||||
{
|
||||
return d_;
|
||||
}
|
||||
|
||||
inline void disposed(int32_t d)
|
||||
{
|
||||
this->d_ = d;
|
||||
}
|
||||
|
||||
inline int32_t no_writers() const
|
||||
{
|
||||
return nw_;
|
||||
}
|
||||
|
||||
inline void no_writers(int32_t nw)
|
||||
{
|
||||
this->nw_ = nw;
|
||||
}
|
||||
|
||||
|
||||
bool operator ==(const GenerationCountImpl& other) const
|
||||
{
|
||||
return other.d_ == d_ && other.nw_ == nw_;
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t d_, nw_;
|
||||
};
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_GENERATION_COUNT_IMPL_HPP_ */
|
||||
@@ -0,0 +1,118 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_QUERY_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_QUERY_DELEGATE_HPP_
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#include <dds/core/macros.hpp>
|
||||
#include <dds/sub/Subscriber.hpp>
|
||||
#include <dds/sub/AnyDataReader.hpp>
|
||||
|
||||
#include <org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/Mutex.hpp>
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
|
||||
|
||||
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
|
||||
|
||||
class OMG_DDS_API QueryDelegate : public virtual org::eclipse::cyclonedds::core::DDScObjectDelegate
|
||||
{
|
||||
public:
|
||||
typedef std::vector<std::string>::iterator iterator;
|
||||
typedef std::vector<std::string>::const_iterator const_iterator;
|
||||
typedef ::dds::core::smart_ptr_traits<QueryDelegate>::ref_type Ref;
|
||||
typedef ::dds::core::smart_ptr_traits<QueryDelegate>::weak_ref_type WeakRef;
|
||||
|
||||
public:
|
||||
QueryDelegate(const dds::sub::AnyDataReader& dr,
|
||||
const dds::sub::status::DataState& state_filter = dds::sub::status::DataState::any());
|
||||
|
||||
QueryDelegate(const dds::sub::AnyDataReader& dr,
|
||||
const std::string& query_expression,
|
||||
const dds::sub::status::DataState& state_filter = dds::sub::status::DataState::any());
|
||||
|
||||
QueryDelegate(const dds::sub::AnyDataReader& dr,
|
||||
const std::string& query_expression,
|
||||
const std::vector<std::string>& params,
|
||||
const dds::sub::status::DataState& state_filter = dds::sub::status::DataState::any());
|
||||
|
||||
virtual ~QueryDelegate();
|
||||
|
||||
void init(ObjectDelegate::weak_ref_type weak_ref);
|
||||
|
||||
void close();
|
||||
|
||||
const std::string& expression() const;
|
||||
|
||||
void expression(const std::string& expr);
|
||||
|
||||
iterator begin();
|
||||
|
||||
iterator end();
|
||||
|
||||
const_iterator begin() const;
|
||||
|
||||
const_iterator end() const;
|
||||
|
||||
void add_parameter(const std::string& param);
|
||||
|
||||
uint32_t parameters_length() const;
|
||||
|
||||
void parameters(const std::vector<std::string>& params);
|
||||
|
||||
std::vector<std::string> parameters();
|
||||
|
||||
void clear_parameters();
|
||||
|
||||
const dds::sub::AnyDataReader& data_reader() const;
|
||||
|
||||
virtual void state_filter(dds::sub::status::DataState& s);
|
||||
|
||||
virtual dds::sub::status::DataState state_filter();
|
||||
|
||||
virtual bool modify_state_filter(dds::sub::status::DataState& s);
|
||||
|
||||
bool state_filter_equal(dds::sub::status::DataState& s);
|
||||
|
||||
protected:
|
||||
void deinit();
|
||||
|
||||
private:
|
||||
dds::sub::AnyDataReader reader_;
|
||||
std::string expression_;
|
||||
std::vector<std::string> params_;
|
||||
dds::sub::status::DataState state_filter_;
|
||||
bool modified_;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_QUERY_DELEGATE_HPP_ */
|
||||
@@ -0,0 +1,65 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_RANK_IMPL_HPP_
|
||||
#define CYCLONEDDS_SUB_RANK_IMPL_HPP_
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
class RankImpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class org::eclipse::cyclonedds::sub::RankImpl
|
||||
{
|
||||
public:
|
||||
RankImpl() : s_(0), g_(0), ag_(0) { }
|
||||
RankImpl(int32_t s, int32_t g, int32_t ag) : s_(s), g_(g), ag_(ag) { }
|
||||
|
||||
public:
|
||||
inline int32_t absolute_generation() const
|
||||
{
|
||||
return ag_;
|
||||
}
|
||||
|
||||
inline int32_t generation() const
|
||||
{
|
||||
return g_;
|
||||
}
|
||||
|
||||
inline int32_t sample() const
|
||||
{
|
||||
return s_;
|
||||
}
|
||||
|
||||
bool operator ==(const RankImpl& other) const
|
||||
{
|
||||
return other.s_ == s_ && other.g_ == g_ && other.ag_;
|
||||
}
|
||||
private:
|
||||
int32_t s_;
|
||||
int32_t g_;
|
||||
int32_t ag_;
|
||||
};
|
||||
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_RANK_IMPL_HPP_ */
|
||||
@@ -0,0 +1,138 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_SAMPLE_INFO_IMPL_HPP_
|
||||
#define CYCLONEDDS_SUB_SAMPLE_INFO_IMPL_HPP_
|
||||
|
||||
#include <org/eclipse/cyclonedds/core/config.hpp>
|
||||
#include <dds/sub/Rank.hpp>
|
||||
#include <dds/sub/GenerationCount.hpp>
|
||||
#include <dds/core/Time.hpp>
|
||||
#include <dds/sub/status/DataState.hpp>
|
||||
#include <dds/core/InstanceHandle.hpp>
|
||||
|
||||
#include <dds/dds.h>
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
class SampleInfoImpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class org::eclipse::cyclonedds::sub::SampleInfoImpl
|
||||
{
|
||||
public:
|
||||
SampleInfoImpl() : valid_(false) { }
|
||||
|
||||
SampleInfoImpl(const dds_sample_info_t *from);
|
||||
|
||||
inline const dds::core::Time timestamp() const
|
||||
{
|
||||
return this->source_timestamp_;
|
||||
}
|
||||
|
||||
inline void timestamp(const dds::core::Time& t)
|
||||
{
|
||||
this->source_timestamp_ = t;
|
||||
}
|
||||
|
||||
inline const dds::sub::status::DataState state() const
|
||||
{
|
||||
return this->state_;
|
||||
}
|
||||
|
||||
inline void state(const dds::sub::status::DataState& s)
|
||||
{
|
||||
this->state_ = s;
|
||||
}
|
||||
|
||||
inline dds::sub::GenerationCount generation_count() const
|
||||
{
|
||||
return this->generation_count_;
|
||||
}
|
||||
|
||||
inline void generation_count(dds::sub::GenerationCount& c)
|
||||
{
|
||||
this->generation_count_ = c;
|
||||
}
|
||||
|
||||
inline dds::sub::Rank rank() const
|
||||
{
|
||||
return this->rank_;
|
||||
}
|
||||
|
||||
inline void rank(dds::sub::Rank& r)
|
||||
{
|
||||
this->rank_ = r;
|
||||
}
|
||||
|
||||
inline bool valid() const
|
||||
{
|
||||
return this->valid_;
|
||||
}
|
||||
|
||||
inline void valid(bool v)
|
||||
{
|
||||
this->valid_ = v;
|
||||
}
|
||||
|
||||
inline dds::core::InstanceHandle instance_handle() const
|
||||
{
|
||||
return this->instance_handle_;
|
||||
}
|
||||
|
||||
inline void instance_handle(dds::core::InstanceHandle& h)
|
||||
{
|
||||
this->instance_handle_ = h;
|
||||
}
|
||||
|
||||
inline dds::core::InstanceHandle publication_handle() const
|
||||
{
|
||||
return this->publication_handle_;
|
||||
}
|
||||
|
||||
inline void publication_handle(dds::core::InstanceHandle& h)
|
||||
{
|
||||
this->publication_handle_ = h;
|
||||
}
|
||||
|
||||
bool operator==(const SampleInfoImpl& other) const;
|
||||
|
||||
|
||||
private:
|
||||
static bool state_is_equal(
|
||||
const dds::sub::status::DataState& s1,
|
||||
const dds::sub::status::DataState& s2);
|
||||
|
||||
private:
|
||||
dds::core::Time source_timestamp_;
|
||||
dds::sub::status::DataState state_;
|
||||
dds::sub::GenerationCount generation_count_;
|
||||
dds::sub::Rank rank_;
|
||||
bool valid_;
|
||||
dds::core::InstanceHandle instance_handle_;
|
||||
dds::core::InstanceHandle publication_handle_;
|
||||
|
||||
};
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_SAMPLE_INFO_IMPL_HPP_ */
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_SUBSCRIBER_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_SUBSCRIBER_DELEGATE_HPP_
|
||||
|
||||
#include <dds/core/types.hpp>
|
||||
#include <dds/core/status/State.hpp>
|
||||
#include <dds/sub/AnyDataReader.hpp>
|
||||
#include <dds/sub/qos/SubscriberQos.hpp>
|
||||
#include <dds/sub/qos/DataReaderQos.hpp>
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
#include <org/eclipse/cyclonedds/ForwardDeclarations.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/EntityDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/EntitySet.hpp>
|
||||
#include <org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
|
||||
class OMG_DDS_API SubscriberDelegate : public org::eclipse::cyclonedds::core::EntityDelegate
|
||||
{
|
||||
public:
|
||||
typedef ::dds::core::smart_ptr_traits< SubscriberDelegate >::ref_type ref_type;
|
||||
typedef ::dds::core::smart_ptr_traits< SubscriberDelegate >::weak_ref_type weak_ref_type;
|
||||
|
||||
SubscriberDelegate(const dds::domain::DomainParticipant& dp,
|
||||
const dds::sub::qos::SubscriberQos& qos,
|
||||
dds::sub::SubscriberListener* listener,
|
||||
const dds::core::status::StatusMask& event_mask);
|
||||
|
||||
virtual ~SubscriberDelegate();
|
||||
|
||||
void init(ObjectDelegate::weak_ref_type weak_ref);
|
||||
|
||||
void close();
|
||||
|
||||
const dds::sub::qos::SubscriberQos& qos() const;
|
||||
void qos(const dds::sub::qos::SubscriberQos& sqos);
|
||||
|
||||
void default_datareader_qos(const dds::sub::qos::DataReaderQos& qos);
|
||||
dds::sub::qos::DataReaderQos default_datareader_qos() const;
|
||||
|
||||
void begin_coherent_access();
|
||||
void end_coherent_access();
|
||||
|
||||
/**
|
||||
* @internal This function initialises the delegate as the built in subscriber
|
||||
*/
|
||||
//void init_builtin(DDS::Subscriber_ptr sub);
|
||||
|
||||
void listener(dds::sub::SubscriberListener* listener,
|
||||
const ::dds::core::status::StatusMask& mask);
|
||||
dds::sub::SubscriberListener* listener() const;
|
||||
|
||||
const dds::domain::DomainParticipant& participant() const;
|
||||
|
||||
/** @internal @todo OSPL-1944 Subscriber Listener should return list of affected DataReaders (on_data_on_readers) **/
|
||||
// dds::sub::AnyDataReader get_datareaders(); // TODO: OSPL-1944?
|
||||
|
||||
bool contains_entity(
|
||||
const ::dds::core::InstanceHandle& handle);
|
||||
|
||||
void add_datareader(
|
||||
org::eclipse::cyclonedds::core::EntityDelegate& datareader);
|
||||
|
||||
void remove_datareader(
|
||||
org::eclipse::cyclonedds::core::EntityDelegate& datareader);
|
||||
|
||||
virtual std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type>
|
||||
find_datareaders(
|
||||
const std::string& topic_name);
|
||||
|
||||
std::vector<org::eclipse::cyclonedds::sub::AnyDataReaderDelegate::ref_type>
|
||||
get_datareaders(
|
||||
const dds::sub::status::DataState& mask);
|
||||
|
||||
void notify_datareaders();
|
||||
|
||||
dds::sub::TSubscriber<SubscriberDelegate>
|
||||
wrapper();
|
||||
|
||||
bool is_auto_enable() const;
|
||||
|
||||
void reset_data_on_readers();
|
||||
|
||||
// Subscriber events
|
||||
void on_data_readers(
|
||||
dds_entity_t);
|
||||
|
||||
// Reader events
|
||||
void on_requested_deadline_missed(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::RequestedDeadlineMissedStatusDelegate &sd);
|
||||
void on_requested_incompatible_qos(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::RequestedIncompatibleQosStatusDelegate &sd);
|
||||
void on_sample_rejected(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::SampleRejectedStatusDelegate &sd);
|
||||
void on_liveliness_changed(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::LivelinessChangedStatusDelegate &sd);
|
||||
void on_data_available(
|
||||
dds_entity_t reader);
|
||||
void on_subscription_matched(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::SubscriptionMatchedStatusDelegate &sd);
|
||||
void on_sample_lost(
|
||||
dds_entity_t reader,
|
||||
org::eclipse::cyclonedds::core::SampleLostStatusDelegate &sd);
|
||||
|
||||
private:
|
||||
dds::domain::DomainParticipant dp_;
|
||||
dds::sub::qos::SubscriberQos qos_;
|
||||
dds::sub::qos::DataReaderQos default_dr_qos_;
|
||||
|
||||
org::eclipse::cyclonedds::core::EntitySet readers;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_SUBSCRIBER_DELEGATE_HPP_ */
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_COND_QUERYCONDITION_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_COND_QUERYCONDITION_DELEGATE_HPP_
|
||||
|
||||
#include <org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp>
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
namespace cond
|
||||
{
|
||||
|
||||
class OMG_DDS_API QueryConditionDelegate :
|
||||
public org::eclipse::cyclonedds::sub::cond::ReadConditionDelegate
|
||||
{
|
||||
public:
|
||||
|
||||
typedef QueryDelegate::iterator iterator;
|
||||
typedef QueryDelegate::const_iterator const_iterator;
|
||||
|
||||
public:
|
||||
QueryConditionDelegate(
|
||||
const dds::sub::AnyDataReader& dr,
|
||||
const std::string& query_expression,
|
||||
const dds::sub::status::DataState& state_filter);
|
||||
|
||||
QueryConditionDelegate(
|
||||
const dds::sub::AnyDataReader& dr,
|
||||
const std::string& expression,
|
||||
const std::vector<std::string>& params,
|
||||
const dds::sub::status::DataState& data_state);
|
||||
|
||||
QueryConditionDelegate(
|
||||
const dds::sub::AnyDataReader& dr,
|
||||
const dds::sub::status::DataState& data_state);
|
||||
|
||||
~QueryConditionDelegate();
|
||||
|
||||
typedef bool (*Filter_fn) (const void * sample);
|
||||
|
||||
void set_filter(Filter_fn filter);
|
||||
|
||||
Filter_fn get_filter();
|
||||
|
||||
void init(ObjectDelegate::weak_ref_type weak_ref);
|
||||
protected:
|
||||
Filter_fn cpp_filter;
|
||||
|
||||
static bool trans_filter(const void *csample, const void *ctx);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_COND_QUERYCONDITION_DELEGATE_HPP_ */
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_COND_READCONDITION_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_COND_READCONDITION_DELEGATE_HPP_
|
||||
|
||||
#include <dds/sub/AnyDataReader.hpp>
|
||||
|
||||
#include <org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/sub/QueryDelegate.hpp>
|
||||
|
||||
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
namespace cond
|
||||
{
|
||||
|
||||
|
||||
class OMG_DDS_API ReadConditionDelegate :
|
||||
public virtual org::eclipse::cyclonedds::core::cond::ConditionDelegate,
|
||||
public virtual org::eclipse::cyclonedds::sub::QueryDelegate
|
||||
{
|
||||
public:
|
||||
ReadConditionDelegate(
|
||||
const dds::sub::AnyDataReader& dr,
|
||||
const dds::sub::status::DataState& state_filter);
|
||||
|
||||
~ReadConditionDelegate();
|
||||
|
||||
void init(ObjectDelegate::weak_ref_type weak_ref);
|
||||
|
||||
void close();
|
||||
|
||||
virtual bool trigger_value() const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_COND_READCONDITION_DELEGATE_HPP_ */
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
// Copyright(c) 2006 to 2021 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_QOS_DATA_READER_QOS_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_QOS_DATA_READER_QOS_DELEGATE_HPP_
|
||||
|
||||
#include <dds/core/detail/conformance.hpp>
|
||||
#include <org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp>
|
||||
|
||||
struct _DDS_NamedDataReaderQos;
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
namespace qos
|
||||
{
|
||||
|
||||
class OMG_DDS_API DataReaderQosDelegate
|
||||
{
|
||||
public:
|
||||
DataReaderQosDelegate();
|
||||
DataReaderQosDelegate(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate& tqos);
|
||||
|
||||
void policy(const dds::core::policy::UserData& user_data);
|
||||
void policy(const dds::core::policy::Durability& durability);
|
||||
void policy(const dds::core::policy::Deadline& deadline);
|
||||
void policy(const dds::core::policy::LatencyBudget& budget);
|
||||
void policy(const dds::core::policy::Liveliness& liveliness);
|
||||
void policy(const dds::core::policy::Reliability& reliability);
|
||||
void policy(const dds::core::policy::DestinationOrder& order);
|
||||
void policy(const dds::core::policy::History& history);
|
||||
void policy(const dds::core::policy::ResourceLimits& resources);
|
||||
void policy(const dds::core::policy::Ownership& ownership);
|
||||
void policy(const dds::core::policy::TimeBasedFilter& tfilter);
|
||||
void policy(const dds::core::policy::ReaderDataLifecycle& lifecycle);
|
||||
#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
void policy(const dds::core::policy::DataRepresentation& datarepresentation);
|
||||
void policy(const dds::core::policy::TypeConsistencyEnforcement& typeconsistencyenforcement);
|
||||
#endif // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
void policy(const dds::core::policy::PSMXInstances& psmxinstances);
|
||||
void policy(const dds::core::policy::IgnoreLocal& ignorelocal);
|
||||
|
||||
template <typename POLICY> const POLICY& policy() const;
|
||||
template <typename POLICY> POLICY& policy();
|
||||
|
||||
/* The returned ddsc QoS has to be freed. */
|
||||
dds_qos_t* ddsc_qos() const;
|
||||
void ddsc_qos(const dds_qos_t* qos, bool copy_flags);
|
||||
|
||||
void named_qos(const struct _DDS_NamedDataReaderQos &qos);
|
||||
|
||||
void check() const;
|
||||
|
||||
bool operator==(const DataReaderQosDelegate& other) const;
|
||||
DataReaderQosDelegate& operator =(const org::eclipse::cyclonedds::topic::qos::TopicQosDelegate& tqos);
|
||||
|
||||
const uint64_t &present() const {return present_;}
|
||||
uint64_t &present() {return present_;}
|
||||
private:
|
||||
uint64_t present_ = 0;
|
||||
dds::core::policy::UserData user_data_;
|
||||
dds::core::policy::Durability durability_;
|
||||
dds::core::policy::Deadline deadline_;
|
||||
dds::core::policy::LatencyBudget budget_;
|
||||
dds::core::policy::Liveliness liveliness_;
|
||||
dds::core::policy::Reliability reliability_;
|
||||
dds::core::policy::DestinationOrder order_;
|
||||
dds::core::policy::History history_;
|
||||
dds::core::policy::ResourceLimits resources_;
|
||||
dds::core::policy::Ownership ownership_;
|
||||
dds::core::policy::TimeBasedFilter tfilter_;
|
||||
dds::core::policy::ReaderDataLifecycle lifecycle_;
|
||||
#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
dds::core::policy::DataRepresentation datarepresentation_;
|
||||
dds::core::policy::TypeConsistencyEnforcement typeconsistencyenforcement_;
|
||||
#endif // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
dds::core::policy::PSMXInstances psmxinstances_;
|
||||
dds::core::policy::IgnoreLocal ignorelocal_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::Durability&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Durability>() const
|
||||
{
|
||||
return durability_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Durability&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Durability>();
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::UserData&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::UserData>() const
|
||||
{
|
||||
return user_data_;
|
||||
}
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::UserData&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::UserData>();
|
||||
|
||||
template<> inline const dds::core::policy::Deadline&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Deadline>() const
|
||||
{
|
||||
return deadline_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Deadline&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Deadline>();
|
||||
|
||||
template<> inline const dds::core::policy::LatencyBudget&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::LatencyBudget>() const
|
||||
{
|
||||
return budget_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::LatencyBudget&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::LatencyBudget>();
|
||||
|
||||
template<> inline const dds::core::policy::Liveliness&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Liveliness>() const
|
||||
{
|
||||
return liveliness_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Liveliness&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Liveliness>();
|
||||
|
||||
template<> inline const dds::core::policy::Reliability&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Reliability>() const
|
||||
{
|
||||
return reliability_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Reliability&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Reliability>();
|
||||
|
||||
template<> inline const dds::core::policy::DestinationOrder&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::DestinationOrder>() const
|
||||
{
|
||||
return order_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::DestinationOrder&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::DestinationOrder>();
|
||||
|
||||
template<> inline const dds::core::policy::History&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::History>() const
|
||||
{
|
||||
return history_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::History&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::History>();
|
||||
|
||||
|
||||
template<> inline const dds::core::policy::ResourceLimits&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::ResourceLimits>() const
|
||||
{
|
||||
return resources_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::ResourceLimits&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::ResourceLimits>();
|
||||
|
||||
template<> inline const dds::core::policy::Ownership&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Ownership>() const
|
||||
{
|
||||
return ownership_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Ownership&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::Ownership>();
|
||||
|
||||
template<> inline const dds::core::policy::TimeBasedFilter&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::TimeBasedFilter>() const
|
||||
{
|
||||
return tfilter_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::TimeBasedFilter&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::TimeBasedFilter>();
|
||||
|
||||
template<> inline const dds::core::policy::ReaderDataLifecycle&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::ReaderDataLifecycle>() const
|
||||
{
|
||||
return lifecycle_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::ReaderDataLifecycle&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::ReaderDataLifecycle>();
|
||||
|
||||
#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
template<> inline const dds::core::policy::DataRepresentation&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::DataRepresentation>() const
|
||||
{
|
||||
return datarepresentation_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::DataRepresentation&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::DataRepresentation>();
|
||||
|
||||
template<> inline const dds::core::policy::TypeConsistencyEnforcement&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::TypeConsistencyEnforcement>() const
|
||||
{
|
||||
return typeconsistencyenforcement_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::TypeConsistencyEnforcement&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::TypeConsistencyEnforcement>();
|
||||
#endif // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::PSMXInstances&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::PSMXInstances>();
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::PSMXInstances&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::PSMXInstances>() const
|
||||
{
|
||||
return psmxinstances_;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::IgnoreLocal&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::IgnoreLocal>() const
|
||||
{
|
||||
return ignorelocal_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::IgnoreLocal&
|
||||
DataReaderQosDelegate::policy<dds::core::policy::IgnoreLocal>();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_QOS_DATA_READER_QOS_DELEGATE_HPP_ */
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
// v. 1.0 which is available at
|
||||
// http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef CYCLONEDDS_SUB_QOS_SUBSCRIBER_QOS_DELEGATE_HPP_
|
||||
#define CYCLONEDDS_SUB_QOS_SUBSCRIBER_QOS_DELEGATE_HPP_
|
||||
|
||||
#include <dds/core/policy/CorePolicy.hpp>
|
||||
|
||||
struct _DDS_NamedSubscriberQos;
|
||||
|
||||
namespace org
|
||||
{
|
||||
namespace eclipse
|
||||
{
|
||||
namespace cyclonedds
|
||||
{
|
||||
namespace sub
|
||||
{
|
||||
namespace qos
|
||||
{
|
||||
|
||||
class OMG_DDS_API SubscriberQosDelegate
|
||||
{
|
||||
public:
|
||||
SubscriberQosDelegate();
|
||||
|
||||
void policy(const dds::core::policy::Presentation& presentation);
|
||||
void policy(const dds::core::policy::Partition& partition);
|
||||
void policy(const dds::core::policy::GroupData& grout_data);
|
||||
void policy(const dds::core::policy::EntityFactory& entity_factory);
|
||||
|
||||
template <typename POLICY> const POLICY& policy() const;
|
||||
template <typename POLICY> POLICY& policy();
|
||||
|
||||
/* The returned ddsc QoS has to be freed. */
|
||||
dds_qos_t* ddsc_qos() const;
|
||||
void ddsc_qos(const dds_qos_t* qos, bool copy_flags);
|
||||
|
||||
void named_qos(const struct _DDS_NamedSubscriberQos &qos);
|
||||
|
||||
void check() const;
|
||||
|
||||
bool operator ==(const SubscriberQosDelegate& other) const;
|
||||
|
||||
const uint64_t &present() const {return present_;}
|
||||
uint64_t &present() {return present_;}
|
||||
private:
|
||||
uint64_t present_ = 0;
|
||||
dds::core::policy::Presentation presentation_;
|
||||
dds::core::policy::Partition partition_;
|
||||
dds::core::policy::GroupData group_data_;
|
||||
dds::core::policy::EntityFactory entity_factory_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::Presentation&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::Presentation>() const
|
||||
{
|
||||
return presentation_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Presentation&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::Presentation>();
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::Partition&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::Partition>() const
|
||||
{
|
||||
return partition_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::Partition&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::Partition>();
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::GroupData&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::GroupData>() const
|
||||
{
|
||||
return group_data_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::GroupData&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::GroupData>();
|
||||
|
||||
|
||||
template<>
|
||||
inline const dds::core::policy::EntityFactory&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::EntityFactory>() const
|
||||
{
|
||||
return entity_factory_;
|
||||
}
|
||||
|
||||
template<>
|
||||
OMG_DDS_API dds::core::policy::EntityFactory&
|
||||
SubscriberQosDelegate::policy<dds::core::policy::EntityFactory>();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CYCLONEDDS_SUB_QOS_SUBSCRIBER_QOS_DELEGATE_HPP_ */
|
||||
Reference in new issue
Block a user