init
This commit is contained in:
32
unitree_SDK/include/ddscxx/dds/domain/DomainParticipant.hpp
Normal file
32
unitree_SDK/include/ddscxx/dds/domain/DomainParticipant.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef OMG_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_
|
||||
#define OMG_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dds/domain/detail/DomainParticipant.hpp>
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
typedef dds::domain::detail::DomainParticipant DomainParticipant;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_ */
|
||||
@@ -0,0 +1,208 @@
|
||||
#ifndef OMG_DDS_DOMAIN_DOMAINPARTICIPANT_LISTENER_HPP_
|
||||
#define OMG_DDS_DOMAIN_DOMAINPARTICIPANT_LISTENER_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dds/pub/PublisherListener.hpp>
|
||||
#include <dds/sub/SubscriberListener.hpp>
|
||||
#include <dds/topic/AnyTopicListener.hpp>
|
||||
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
|
||||
DDSCXX_WARNING_MSVC_OFF(4250)
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* DomainParticipant events Listener
|
||||
*
|
||||
* Since a DomainParticipant is an Entity, it has the ability to have a Listener
|
||||
* associated with it. In this case, the associated Listener should be of type
|
||||
* DomainParticipantListener. This interface must be implemented by the
|
||||
* application. A user-defined class must be provided by the application which must
|
||||
* extend from the DomainParticipantListener class.
|
||||
*
|
||||
* <b><i>
|
||||
* All operations for this interface must be implemented in the user-defined class, it is
|
||||
* up to the application whether an operation is empty or contains some functionality.
|
||||
* </i></b>
|
||||
*
|
||||
* The DomainParticipantListener provides a generic mechanism (actually a
|
||||
* callback function) for the Data Distribution Service to notify the application of
|
||||
* relevant asynchronous status change events, such as a missed deadline, violation of
|
||||
* a QosPolicy setting, etc. The DomainParticipantListener is related to
|
||||
* changes in communication status StatusConditions.
|
||||
*
|
||||
* @code{.cpp}
|
||||
* // Application example listener
|
||||
* class ExampleListener :
|
||||
* public virtual dds::domain::DomainParticipantListener
|
||||
* {
|
||||
* public:
|
||||
* virtual void on_inconsistent_topic (
|
||||
* dds::topic::AnyTopic& topic,
|
||||
* const dds::core::status::InconsistentTopicStatus& status)
|
||||
* {
|
||||
* std::cout << "on_inconsistent_topic" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_offered_deadline_missed (
|
||||
* dds::pub::AnyDataWriter& writer,
|
||||
* const dds::core::status::OfferedDeadlineMissedStatus& status)
|
||||
* {
|
||||
* std::cout << "on_offered_deadline_missed" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_offered_incompatible_qos (
|
||||
* dds::pub::AnyDataWriter& writer,
|
||||
* const dds::core::status::OfferedIncompatibleQosStatus& status)
|
||||
* {
|
||||
* std::cout << "on_offered_incompatible_qos" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_liveliness_lost (
|
||||
* dds::pub::AnyDataWriter& writer,
|
||||
* const dds::core::status::LivelinessLostStatus& status)
|
||||
* {
|
||||
* std::cout << "on_liveliness_lost" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_publication_matched (
|
||||
* dds::pub::AnyDataWriter& writer,
|
||||
* const dds::core::status::PublicationMatchedStatus& status)
|
||||
* {
|
||||
* std::cout << "on_publication_matched" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_requested_deadline_missed (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::RequestedDeadlineMissedStatus & status)
|
||||
* {
|
||||
* std::cout << "on_requested_deadline_missed" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_requested_incompatible_qos (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::RequestedIncompatibleQosStatus & status)
|
||||
* {
|
||||
* std::cout << "on_requested_incompatible_qos" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_sample_rejected (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::SampleRejectedStatus & status)
|
||||
* {
|
||||
* std::cout << "on_sample_rejected" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_liveliness_changed (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::LivelinessChangedStatus & status)
|
||||
* {
|
||||
* std::cout << "on_liveliness_changed" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_data_available (
|
||||
* dds::sub::AnyDataReader& reader)
|
||||
* {
|
||||
* std::cout << "on_data_available" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_subscription_matched (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::SubscriptionMatchedStatus & status)
|
||||
* {
|
||||
* std::cout << "on_subscription_matched" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_sample_lost (
|
||||
* dds::sub::AnyDataReader& reader,
|
||||
* const dds::core::status::SampleLostStatus & status)
|
||||
* {
|
||||
* std::cout << "on_sample_lost" << std::endl;
|
||||
* }
|
||||
*
|
||||
* virtual void on_data_on_readers (
|
||||
* dds::sub::Subscriber& subs)
|
||||
* {
|
||||
* std::cout << "on_data_on_readers" << std::endl;
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* // Create DomainParticipant with the listener
|
||||
* dds::domain::DomainParticipant participant(org::eclipse::cyclonedds::domain::default_id(),
|
||||
* dds::domain::DomainParticipant::default_participant_qos(),
|
||||
* new ExampleListener(),
|
||||
* dds::core::status::StatusMask::all());
|
||||
*
|
||||
* @endcode
|
||||
*
|
||||
* @see for more information: @ref DCPS_Modules_DomainParticipant "Domain Participant"
|
||||
* @see for more information: @ref DCPS_Modules_Infrastructure_Listener "Listener information"
|
||||
*/
|
||||
class OMG_DDS_API DomainParticipantListener :
|
||||
public virtual dds::pub::PublisherListener,
|
||||
public virtual dds::sub::SubscriberListener,
|
||||
public virtual dds::topic::AnyTopicListener
|
||||
{
|
||||
public:
|
||||
/** @cond */
|
||||
virtual ~DomainParticipantListener() { }
|
||||
/** @endcond */
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* DomainParticipant events Listener
|
||||
*
|
||||
* This listener is just like DomainParticipantListener, except
|
||||
* that the application doesn't have to implement all operations.
|
||||
*
|
||||
* @code{.cpp}
|
||||
* class ExampleListener :
|
||||
* public virtual dds::domain::NoOpDomainParticipantListener
|
||||
* {
|
||||
* // Not necessary to implement any Listener operations.
|
||||
* };
|
||||
* @endcode
|
||||
*
|
||||
* @see dds::domain::DomainParticipantListener
|
||||
*/
|
||||
class OMG_DDS_API NoOpDomainParticipantListener :
|
||||
public virtual DomainParticipantListener,
|
||||
public virtual dds::pub::NoOpPublisherListener,
|
||||
public virtual dds::sub::NoOpSubscriberListener,
|
||||
public virtual dds::topic::NoOpAnyTopicListener
|
||||
{
|
||||
public:
|
||||
/** @cond */
|
||||
virtual ~NoOpDomainParticipantListener() { }
|
||||
/** @endcond */
|
||||
};
|
||||
|
||||
DDSCXX_WARNING_MSVC_ON(4250)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_DOMAINPARTICIPANT_LISTENER_HPP_ */
|
||||
521
unitree_SDK/include/ddscxx/dds/domain/TDomainParticipant.hpp
Normal file
521
unitree_SDK/include/ddscxx/dds/domain/TDomainParticipant.hpp
Normal file
@@ -0,0 +1,521 @@
|
||||
#ifndef OMG_TDDS_DOMAIN_DOMAIN_PARTICIPANT_HPP_
|
||||
#define OMG_TDDS_DOMAIN_DOMAIN_PARTICIPANT_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <dds/ddsi/ddsi_config.h>
|
||||
#include <dds/core/detail/conformance.hpp>
|
||||
#include <dds/core/types.hpp>
|
||||
#include <dds/core/Time.hpp>
|
||||
#include <dds/core/Entity.hpp>
|
||||
//#include <dds/core/cond/StatusCondition.hpp>
|
||||
#include <dds/domain/qos/DomainParticipantQos.hpp>
|
||||
|
||||
#include <dds/topic/qos/TopicQos.hpp>
|
||||
|
||||
#include <dds/pub/qos/PublisherQos.hpp>
|
||||
#include <dds/sub/qos/SubscriberQos.hpp>
|
||||
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
|
||||
template <typename DELEGATE>
|
||||
class TDomainParticipant;
|
||||
|
||||
class DomainParticipantListener;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* A DomainParticipant represents the local membership of the application in a
|
||||
* Domain.
|
||||
*
|
||||
* The DomainParticipant represents the participation of the application on
|
||||
* a communication plane that isolates applications running on the same
|
||||
* set of physical computers from each other. A domain establishes a virtual
|
||||
* network linking all applications that share the same domainId and isolating
|
||||
* them from applications running on different domains. In this way, several
|
||||
* independent distributed applications can coexist in the same physical
|
||||
* network without interfering, or even being aware of each other.
|
||||
*
|
||||
* @see for more information: @ref DCPS_Modules_DomainParticipant "Domain Participant"
|
||||
*/
|
||||
template <typename DELEGATE>
|
||||
class dds::domain::TDomainParticipant : public ::dds::core::TEntity<DELEGATE>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Local representation of the dds::domain::DomainParticipantListener
|
||||
*/
|
||||
typedef dds::domain::DomainParticipantListener Listener;
|
||||
|
||||
public:
|
||||
OMG_DDS_REF_TYPE_PROTECTED_DC(TDomainParticipant, dds::core::TEntity, DELEGATE)
|
||||
OMG_DDS_EXPLICIT_REF_BASE(TDomainParticipant, dds::core::Entity)
|
||||
OMG_DDS_COMPLETE_RULE_OF_FIVE_VIRTUAL_DEFAULT(TDomainParticipant)
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a new DomainParticipant object. The DomainParticipant signifies
|
||||
* that the calling application intends to join the Domain identified by
|
||||
* the domain_id argument.
|
||||
*
|
||||
* The DomainParticipant will be created with the QoS values specified on the last
|
||||
* successful call to
|
||||
* @link dds::domain::DomainParticipant::default_participant_qos(const ::dds::domain::qos::DomainParticipantQos& qos)
|
||||
* DomainParticipant::default_publisher_qos(qos) @endlink or, if the call was never
|
||||
* made, the @ref anchor_dds_domain_domainparticipant_qos_defaults "default" values.
|
||||
*
|
||||
* @param id the id of the domain joined by the new DomainParticipant
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
TDomainParticipant(uint32_t id);
|
||||
|
||||
/**
|
||||
* Creates a new DomainParticipant object. The DomainParticipant signifies
|
||||
* that the calling application intends to join the Domain identified by
|
||||
* the domain_id argument.
|
||||
*
|
||||
* The DomainParticipant will be created with the DomainParticipantQos
|
||||
* passed as an argument.
|
||||
*
|
||||
* It is possible to provide a specific configuration.
|
||||
* Please be aware that the given domain_id always takes precedence over
|
||||
* the configuration. Also, if a domain with the same ID was created
|
||||
* previously (either through the config argument, environment var or
|
||||
* default), that configuration is used.
|
||||
*
|
||||
* | id | config | in config | previous | result |
|
||||
* +----+--------+-----------+----------+-------------------------------+
|
||||
* | n | no | n.a. | no | n, environment/default config |
|
||||
* | n | no | n.a. | yes | n, previous config |
|
||||
* | n | yes | no | no | n, default config (with n id) |
|
||||
* | n | yes | yes/any | no | n, given config |
|
||||
* | n | yes | no | yes | n, previous config |
|
||||
* | n | yes | yes/any | yes | n, previous config |
|
||||
*
|
||||
* @param id the id of the domain joined by the new DomainParticipant
|
||||
* @param qos the QoS settings for the new DomainParticipant
|
||||
* @param listener the listener
|
||||
* @param event_mask the mask defining the events for which the listener
|
||||
* will be notified.
|
||||
* @param config when not empty, the value is used as either the name
|
||||
* of the file containing the configuration or, when it
|
||||
* starts with '<', taken to be the XML representation
|
||||
* of the configuration. When not empty, the id argument of
|
||||
* this constructor has to have a specific value and can not
|
||||
* be org::eclipse::cyclonedds::domain::default_id().
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
TDomainParticipant(uint32_t id,
|
||||
const dds::domain::qos::DomainParticipantQos& qos,
|
||||
dds::domain::DomainParticipantListener* listener = NULL,
|
||||
const dds::core::status::StatusMask& event_mask = dds::core::status::StatusMask::none(),
|
||||
const std::string& config = std::string());
|
||||
|
||||
TDomainParticipant(uint32_t id,
|
||||
const dds::domain::qos::DomainParticipantQos& qos,
|
||||
dds::domain::DomainParticipantListener* listener,
|
||||
const dds::core::status::StatusMask& event_mask,
|
||||
const ddsi_config& config);
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Register a listener with the DomainParticipant.
|
||||
*
|
||||
* The notifications received by the listener depend on the
|
||||
* status mask with which it was registered.
|
||||
*
|
||||
* Listener un-registration is performed by setting the listener to NULL.
|
||||
*
|
||||
* See also @ref DCPS_Modules_Infrastructure_Listener "listener information".
|
||||
*
|
||||
* @param listener the listener
|
||||
* @param event_mask the mask defining the events for which the listener
|
||||
* will be notified.
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::UnsupportedError
|
||||
* A status was selected that cannot be supported because
|
||||
* the infrastructure does not maintain the required connectivity information.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
void listener(Listener* listener,
|
||||
const ::dds::core::status::StatusMask& event_mask);
|
||||
|
||||
/**
|
||||
* Get the listener of this DomainParticipant.
|
||||
*
|
||||
* See also @ref DCPS_Modules_Infrastructure_Listener "listener information".
|
||||
*
|
||||
* @return the listener
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
*/
|
||||
Listener* listener() const;
|
||||
|
||||
/**
|
||||
* Gets the DomainParticipantQos setting for this instance.
|
||||
*
|
||||
* @return the qos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
const dds::domain::qos::DomainParticipantQos& qos() const;
|
||||
|
||||
/**
|
||||
* Sets the DomainParticipantQos setting for this instance.
|
||||
*
|
||||
* @param qos the qos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
void qos(const dds::domain::qos::DomainParticipantQos& qos);
|
||||
|
||||
/**
|
||||
* This operation retrieves the domain_id used to create the
|
||||
* DomainParticipant. The domain_id identifies the DDS domain
|
||||
* to which the DomainParticipant belongs.
|
||||
*
|
||||
* Each DDS domain represents a separate data communication
|
||||
* plane isolated from other domains.
|
||||
*
|
||||
* @return the domain id
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
*/
|
||||
uint32_t domain_id() const;
|
||||
|
||||
|
||||
/**
|
||||
* This operation will manually assert the liveliness for the DomainParticipant.
|
||||
*
|
||||
* This way, the Data Distribution Service is informed that the DomainParticipant
|
||||
* is still alive. This operation only needs to be used when the DomainParticipant
|
||||
* contains DataWriters with the dds:core::policy::LivelinessQosPolicy::ManualByParticipant(),
|
||||
* and it will only affect the liveliness of those DataWriters.
|
||||
*
|
||||
* Writing data via the write operation of a DataWriter will assert the liveliness on
|
||||
* the DataWriter itself and its DomainParticipant. Therefore,
|
||||
* assert_liveliness is only needed when not writing regularly.
|
||||
* The liveliness should be asserted by the application, depending on the
|
||||
* LivelinessQosPolicy.
|
||||
*
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
*/
|
||||
void assert_liveliness();
|
||||
|
||||
|
||||
/**
|
||||
* This operation checks whether or not the given handle represents
|
||||
* an Entity that was created by using this DomainParticipant.
|
||||
*
|
||||
* The containment applies recursively. That is, it applies both to
|
||||
* entities (TopicDescription, Publisher, or Subscriber) created directly
|
||||
* using the DomainParticipant as well as entities created using a
|
||||
* contained Publisher, or Subscriber as the factory, and so forth.
|
||||
*
|
||||
* @param handle the instance handle for which the containement
|
||||
* relationship has to be checked
|
||||
* @return true if the handle belongs to an Entity belonging
|
||||
* to this DomainParticipant
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
*/
|
||||
bool contains_entity(const ::dds::core::InstanceHandle& handle);
|
||||
|
||||
/**
|
||||
* This operation returns the current value of the time that the service
|
||||
* uses to time-stamp data writes and to set the reception timestamp
|
||||
* for the data updates it receives.
|
||||
*
|
||||
* @return the current time
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
*/
|
||||
dds::core::Time current_time() const;
|
||||
|
||||
/** @copydoc dds::domain::DomainParticipant::qos(const dds::domain::qos::DomainParticipantQos& qos) */
|
||||
TDomainParticipant& operator << (const dds::domain::qos::DomainParticipantQos& qos);
|
||||
|
||||
/** @copydoc dds::domain::DomainParticipant::qos() */
|
||||
const TDomainParticipant& operator >> (dds::domain::qos::DomainParticipantQos& qos) const;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Gets the default DomainParticipantQos.
|
||||
*
|
||||
* This operation gets an object with the default global DomainParticipant
|
||||
* QosPolicy settings which is used for newly
|
||||
* created DomainParticipant objects, in case no QoS was provided during the creation.
|
||||
*
|
||||
* The values retrieved by this operation match the set of values specified on the last
|
||||
* successful call to
|
||||
* dds::domain::DomainParticipant::default_participant_qos(const ::dds::domain::qos::DomainParticipantQos& qos),
|
||||
* or, if the call was never made, the @ref anchor_dds_domain_domainparticipant_qos_defaults "default" values.
|
||||
*
|
||||
* @return the default DomainParticipantQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
static dds::domain::qos::DomainParticipantQos default_participant_qos();
|
||||
|
||||
/**
|
||||
* Sets the default DomainParticipantQos.
|
||||
*
|
||||
* This QoS will be used by all following DomainParticipant creations when no
|
||||
* QoS was given during those creations or the QoS is given that was returned
|
||||
* by dds::domain::DomainParticipant::default_participant_qos().
|
||||
*
|
||||
* @param qos the default DomainParticipantQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
static void default_participant_qos(const ::dds::domain::qos::DomainParticipantQos& qos);
|
||||
|
||||
/**
|
||||
* Gets the default PublisherQos of the DomainParticipant.
|
||||
*
|
||||
* This operation gets an object with the default Publisher QosPolicy settings of
|
||||
* the DomainParticipant (that is the PublisherQos) which is used for newly
|
||||
* created Publisher objects, in case no QoS was provided during the creation.
|
||||
*
|
||||
* The values retrieved by this operation match the set of values specified on the last
|
||||
* successful call to
|
||||
* dds::domain::DomainParticipant::default_publisher_qos(const ::dds::pub::qos::PublisherQos& qos),
|
||||
* or, if the call was never made, the @ref anchor_dds_pub_publisher_qos_defaults "default" values.
|
||||
*
|
||||
* @return the default PublisherQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
dds::pub::qos::PublisherQos default_publisher_qos() const;
|
||||
|
||||
/**
|
||||
* Sets the default PublisherQos of the DomainParticipant.
|
||||
*
|
||||
* This operation sets the default PublisherQos of the DomainParticipant which
|
||||
* is used for newly created Publisher objects, when no QoS is provided.
|
||||
*
|
||||
* The PublisherQos is always self consistent, because its policies do not depend on each
|
||||
* other. This means that this operation never throws dds::core::InconsistentPolicyError.
|
||||
*
|
||||
* The values set by this operation are returned by dds::domain::DomainParticipant::default_publisher_qos().
|
||||
*
|
||||
* @param qos the default PublisherQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::UnsupportedError
|
||||
* One or more of the selected QosPolicy values are
|
||||
* currently not supported by OpenSplice.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
TDomainParticipant& default_publisher_qos(const ::dds::pub::qos::PublisherQos& qos);
|
||||
|
||||
/**
|
||||
* Gets the default SubscriberQos of the DomainParticipant.
|
||||
*
|
||||
* This operation gets an object with the default Subscriber QosPolicy settings of
|
||||
* the DomainParticipant (that is the SubscriberQos) which is used for newly
|
||||
* created Subscriber objects, in case no QoS was provided during the creation.
|
||||
*
|
||||
* The values retrieved by this operation match the set of values specified on the last
|
||||
* successful call to
|
||||
* dds::domain::DomainParticipant::default_subscriber_qos(const :dds::sub::qos::SubscriberQos& qos),
|
||||
* or, if the call was never made, the @ref anchor_dds_sub_subscriber_qos_defaults "default" values.
|
||||
*
|
||||
* @return the default SubscriberQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
dds::sub::qos::SubscriberQos default_subscriber_qos() const;
|
||||
|
||||
/**
|
||||
* Sets the default SubscriberQos of the DomainParticipant.
|
||||
*
|
||||
* This operation sets the default SubscriberQos of the DomainParticipant which
|
||||
* is used for newly created Subscriber objects, when no QoS is provided.
|
||||
*
|
||||
* The SubscriberQos is always self consistent, because its policies do not depend on each
|
||||
* other. This means that this operation never throws dds::core::InconsistentPolicyError.
|
||||
*
|
||||
* The values set by this operation are returned by dds::domain::DomainParticipant::default_subscriber_qos().
|
||||
*
|
||||
* @param qos the default SubscriberQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::UnsupportedError
|
||||
* One or more of the selected QosPolicy values are
|
||||
* currently not supported by OpenSplice.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
TDomainParticipant& default_subscriber_qos(const ::dds::sub::qos::SubscriberQos& qos);
|
||||
|
||||
/**
|
||||
* Gets the default TopicQos of the DomainParticipant.
|
||||
*
|
||||
* This operation gets an object with the default Topic QosPolicy settings of
|
||||
* the DomainParticipant (that is the TopicQos) which is used for newly
|
||||
* created Topic objects, in case no QoS was provided during the creation.
|
||||
*
|
||||
* The values retrieved by this operation match the set of values specified on the last
|
||||
* successful call to
|
||||
* dds::domain::DomainParticipant::default_topic_qos(const dds::topic::qos::TopicQos& qos),
|
||||
* or, if the call was never made, the @ref anchor_dds_topic_qos_defaults "default" values.
|
||||
*
|
||||
* @return the default TopicQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
dds::topic::qos::TopicQos default_topic_qos() const;
|
||||
|
||||
/**
|
||||
* Sets the default TopicQos of the DomainParticipant.
|
||||
*
|
||||
* This operation sets the default SubscriberQos of the DomainParticipant which
|
||||
* is used for newly created Subscriber objects, when no QoS is provided.
|
||||
*
|
||||
* This operation checks if the TopicQos is self consistent. If it is not, the
|
||||
* operation has no effect and throws dds::core::InconsistentPolicyError.
|
||||
*
|
||||
* The values set by this operation are returned by dds::domain::DomainParticipant::default_topic_qos().
|
||||
*
|
||||
* @param qos the default TopicQos
|
||||
* @throws dds::core::Error
|
||||
* An internal error has occurred.
|
||||
* @throws dds::core::NullReferenceError
|
||||
* The entity was not properly created and references to dds::core::null.
|
||||
* @throws dds::core::AlreadyClosedError
|
||||
* The entity has already been closed.
|
||||
* @throws dds::core::UnsupportedError
|
||||
* One or more of the selected QosPolicy values are
|
||||
* currently not supported by OpenSplice.
|
||||
* @throws dds::core::InconsistentPolicyError
|
||||
* The parameter qos contains conflicting QosPolicy settings,
|
||||
* e.g. a history depth that is higher than the specified resource limits.
|
||||
* @throws dds::core::OutOfResourcesError
|
||||
* The Data Distribution Service ran out of resources to
|
||||
* complete this operation.
|
||||
*/
|
||||
TDomainParticipant& default_topic_qos(const dds::topic::qos::TopicQos& qos);
|
||||
|
||||
//=============================================================================
|
||||
};
|
||||
|
||||
|
||||
#endif /* OMG_TDDS_DOMAIN_DOMAIN_PARTICIPANT_HPP_ */
|
||||
27
unitree_SDK/include/ddscxx/dds/domain/ddsdomain.hpp
Normal file
27
unitree_SDK/include/ddscxx/dds/domain/ddsdomain.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef OMG_DDS_DOMAIN_PACKAGE_INCLUDE_HPP_
|
||||
#define OMG_DDS_DOMAIN_PACKAGE_INCLUDE_HPP_
|
||||
|
||||
#include <dds/domain/find.hpp>
|
||||
#include <dds/domain/discovery.hpp>
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
#include <dds/domain/detail/ddsdomain.hpp>
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_PACKAGE_INCLUDE_HPP_ */
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef OMG_DDS_DOMAIN_DETAIL_DOMAINPARTICIPANT_HPP_
|
||||
#define OMG_DDS_DOMAIN_DETAIL_DOMAINPARTICIPANT_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dds/domain/detail/TDomainParticipantImpl.hpp>
|
||||
//#include <dds/domain/TDomainParticipant.hpp>
|
||||
//#include <org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp>
|
||||
|
||||
namespace dds {
|
||||
namespace domain {
|
||||
namespace detail {
|
||||
typedef dds::domain::TDomainParticipant< org::eclipse::cyclonedds::domain::DomainParticipantDelegate >
|
||||
DomainParticipant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_DETAIL_DOMAINPARTICIPANT_HPP_ */
|
||||
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
#ifndef CYCLONEDDS_DDS_DOMAIN_TDOMAINPARTICIPANT_IMPL_HPP_
|
||||
#define CYCLONEDDS_DDS_DOMAIN_TDOMAINPARTICIPANT_IMPL_HPP_
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
/*
|
||||
* OMG PSM class declaration
|
||||
*/
|
||||
#include <dds/domain/TDomainParticipant.hpp>
|
||||
#include <org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp>
|
||||
#include <org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp>
|
||||
#include <org/eclipse/cyclonedds/core/ReportUtils.hpp>
|
||||
|
||||
|
||||
// Implementation
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>::TDomainParticipant(uint32_t did):
|
||||
::dds::core::Reference<DELEGATE>(
|
||||
new DELEGATE(did,
|
||||
org::eclipse::cyclonedds::domain::DomainParticipantDelegate::default_participant_qos(),
|
||||
NULL,
|
||||
dds::core::status::StatusMask::none(),
|
||||
std::string()))
|
||||
{
|
||||
this->delegate()->init(this->impl_);
|
||||
org::eclipse::cyclonedds::domain::DomainParticipantRegistry::insert(*this);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>::TDomainParticipant(uint32_t id,
|
||||
const dds::domain::qos::DomainParticipantQos& qos,
|
||||
dds::domain::DomainParticipantListener* listener,
|
||||
const dds::core::status::StatusMask& mask,
|
||||
const std::string& config) :
|
||||
::dds::core::Reference<DELEGATE>(new DELEGATE(id, qos, listener, mask, config))
|
||||
{
|
||||
this->delegate()->init(this->impl_);
|
||||
org::eclipse::cyclonedds::domain::DomainParticipantRegistry::insert(*this);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>::TDomainParticipant(uint32_t id,
|
||||
const dds::domain::qos::DomainParticipantQos& qos,
|
||||
dds::domain::DomainParticipantListener* listener,
|
||||
const dds::core::status::StatusMask& mask,
|
||||
const ddsi_config& config) :
|
||||
::dds::core::Reference<DELEGATE>(new DELEGATE(id, qos, listener, mask, config))
|
||||
{
|
||||
this->delegate()->init(this->impl_);
|
||||
org::eclipse::cyclonedds::domain::DomainParticipantRegistry::insert(*this);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
void TDomainParticipant<DELEGATE>::listener(Listener* listener,
|
||||
const ::dds::core::status::StatusMask& event_mask)
|
||||
{
|
||||
this->delegate()->listener(listener, event_mask);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
typename TDomainParticipant<DELEGATE>::Listener* TDomainParticipant<DELEGATE>::listener() const
|
||||
{
|
||||
return this->delegate()->listener();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
const dds::domain::qos::DomainParticipantQos&
|
||||
TDomainParticipant<DELEGATE>::qos() const
|
||||
{
|
||||
return this->delegate()->qos();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
void TDomainParticipant<DELEGATE>::qos(const dds::domain::qos::DomainParticipantQos& qos)
|
||||
{
|
||||
this->delegate()->qos(qos);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
uint32_t TDomainParticipant<DELEGATE>::domain_id() const
|
||||
{
|
||||
return this->delegate()->domain_id();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
void TDomainParticipant<DELEGATE>::assert_liveliness()
|
||||
{
|
||||
this->delegate()->assert_liveliness();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
bool TDomainParticipant<DELEGATE>::contains_entity(const ::dds::core::InstanceHandle& handle)
|
||||
{
|
||||
return this->delegate()->contains_entity(handle);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
dds::core::Time TDomainParticipant<DELEGATE>::current_time() const
|
||||
{
|
||||
return this->delegate()->current_time();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
dds::domain::qos::DomainParticipantQos TDomainParticipant<DELEGATE>::default_participant_qos()
|
||||
{
|
||||
return DELEGATE::default_participant_qos();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
void TDomainParticipant<DELEGATE>::default_participant_qos(const ::dds::domain::qos::DomainParticipantQos& qos)
|
||||
{
|
||||
DELEGATE::default_participant_qos(qos);
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
dds::pub::qos::PublisherQos TDomainParticipant<DELEGATE>::default_publisher_qos() const
|
||||
{
|
||||
return this->delegate()->default_publisher_qos();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>& TDomainParticipant<DELEGATE>::default_publisher_qos(
|
||||
const ::dds::pub::qos::PublisherQos& qos)
|
||||
{
|
||||
this->delegate()->default_publisher_qos(qos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
dds::sub::qos::SubscriberQos TDomainParticipant<DELEGATE>::default_subscriber_qos() const
|
||||
{
|
||||
return this->delegate()->default_subscriber_qos();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>& TDomainParticipant<DELEGATE>::default_subscriber_qos(
|
||||
const ::dds::sub::qos::SubscriberQos& qos)
|
||||
{
|
||||
this->delegate()->default_subscriber_qos(qos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
dds::topic::qos::TopicQos TDomainParticipant<DELEGATE>::default_topic_qos() const
|
||||
{
|
||||
return this->delegate()->default_topic_qos();
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>& TDomainParticipant<DELEGATE>::default_topic_qos(const dds::topic::qos::TopicQos& qos)
|
||||
{
|
||||
this->delegate()->default_topic_qos(qos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
TDomainParticipant<DELEGATE>& TDomainParticipant<DELEGATE>::operator << (const dds::domain::qos::DomainParticipantQos& qos)
|
||||
{
|
||||
this->qos(qos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename DELEGATE>
|
||||
const TDomainParticipant<DELEGATE>& TDomainParticipant<DELEGATE>::operator >> (dds::domain::qos::DomainParticipantQos& qos) const
|
||||
{
|
||||
qos = this->qos();
|
||||
return *this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// End of implementation
|
||||
|
||||
#endif /* CYCLONEDDS_DDS_DOMAIN_TDOMAINPARTICIPANT_IMPL_HPP_ */
|
||||
17
unitree_SDK/include/ddscxx/dds/domain/detail/ddsdomain.hpp
Normal file
17
unitree_SDK/include/ddscxx/dds/domain/detail/ddsdomain.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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 OMG_DDS_DOMAIN_PACKAGE_DETAIL_INCLUDE_HPP_
|
||||
#define OMG_DDS_DOMAIN_PACKAGE_DETAIL_INCLUDE_HPP_
|
||||
|
||||
/* Nothing to 'post' include. */
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_PACKAGE_DETAIL_INCLUDE_HPP_ */
|
||||
70
unitree_SDK/include/ddscxx/dds/domain/discovery.hpp
Normal file
70
unitree_SDK/include/ddscxx/dds/domain/discovery.hpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef OMG_DDS_DOMAIN_DISCOVERY_HPP_
|
||||
#define OMG_DDS_DOMAIN_DISCOVERY_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#include <dds/core/InstanceHandle.hpp>
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
|
||||
/**
|
||||
* This function enables you to ignore the entity
|
||||
* represented by the given InstanceHandle for the specific
|
||||
* DomainParticipant.
|
||||
*
|
||||
* <b><i>This operation is not yet implemented. It is scheduled for a future release.</i></b>
|
||||
*
|
||||
* @param dp the DomainParticipant for which the remote
|
||||
* entity will be ignored
|
||||
*
|
||||
* @param handle the InstanceHandle of the remote entity that
|
||||
* has to be ignored
|
||||
*
|
||||
*/
|
||||
void OMG_DDS_API ignore(const dds::domain::DomainParticipant& dp, const dds::core::InstanceHandle& handle);
|
||||
|
||||
/**
|
||||
* This function enables you to ignore a series of entities
|
||||
* whose instance handles are made available via the provided iterators.
|
||||
*
|
||||
* <b><i>This operation is not yet implemented. It is scheduled for a future release.</i></b>
|
||||
*
|
||||
* @param dp the DomainParticipant for which the remote
|
||||
* entity will be ignored
|
||||
*
|
||||
* @param begin the begin iterator for the InstanceHandle
|
||||
* to ignore
|
||||
*
|
||||
* @param end the end iterator for the InstanceHandle
|
||||
* to ignore
|
||||
*
|
||||
*/
|
||||
template <typename FwdIterator>
|
||||
void ignore(const dds::domain::DomainParticipant& dp, FwdIterator begin, FwdIterator end);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* OMG_DDS_DOMAIN_DISCOVERY_HPP_ */
|
||||
43
unitree_SDK/include/ddscxx/dds/domain/find.hpp
Normal file
43
unitree_SDK/include/ddscxx/dds/domain/find.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef OMG_DDS_DOMAIN_FIND_HPP_
|
||||
#define OMG_DDS_DOMAIN_FIND_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* This operation retrieves a previously-created DomainParticipant
|
||||
* belonging to the specified domain_id. If no such DomainParticipant
|
||||
* exists, the operation will return a dds::core::null DomainParticipant.
|
||||
*
|
||||
* @param id the domain id
|
||||
*/
|
||||
OMG_DDS_API
|
||||
DomainParticipant find(uint32_t id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_FIND_HPP_ */
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef OMG_DDS_DOMAIN_QOS_DOMAINPARTICIPANTQOS_HPP_
|
||||
#define OMG_DDS_DOMAIN_QOS_DOMAINPARTICIPANTQOS_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dds/domain/qos/detail/DomainParticipantQos.hpp>
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace domain
|
||||
{
|
||||
namespace qos
|
||||
{
|
||||
typedef dds::domain::qos::detail::DomainParticipantQos DomainParticipantQos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_QOS_DOMAINPARTICIPANTQOS_HPP_ */
|
||||
@@ -0,0 +1,89 @@
|
||||
#ifndef OMG_DDS_DOMAIN_QOS_DETAIL_DOMAINPARTICIPANTQOS_HPP_
|
||||
#define OMG_DDS_DOMAIN_QOS_DETAIL_DOMAINPARTICIPANTQOS_HPP_
|
||||
|
||||
/* Copyright 2010, Object Management Group, Inc.
|
||||
* Copyright 2010, PrismTech, Corp.
|
||||
* Copyright 2010, Real-Time Innovations, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#include <dds/core/detail/TEntityQosImpl.hpp>
|
||||
#include <org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp>
|
||||
|
||||
#ifdef DOXYGEN_FOR_ISOCPP
|
||||
/* The above macro is never (and must never) be defined in normal compilation.
|
||||
*
|
||||
* The class below is just used to create informative API documentation.
|
||||
* The predoxygen.py script will copy this over the QoS API header file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* This class provides the basic mechanism for an application to specify Quality of
|
||||
* Service attributes for a DomainParticipant.
|
||||
*
|
||||
* @par Attributes
|
||||
* @anchor anchor_dds_domain_domainparticipant_qos_defaults
|
||||
* QosPolicy | Desciption | Default Value
|
||||
* --------------------------------------------------- | -------------------------------------------------------| --------------------
|
||||
* dds::core::policy::UserData | Additional information (@ref DCPS_QoS_UserData "info") | UserData::UserData(empty)
|
||||
* dds::core::policy::EntityFactory | Create enabled (@ref DCPS_QoS_EntityFactory "info") | EntityFactory::AutoEnable()
|
||||
*
|
||||
* A QosPolicy can be set when the DomainParticipant is created or modified with the
|
||||
* set qos operations.
|
||||
* Both operations take the DomainParticipantQos object as a parameter. There may be
|
||||
* cases where several policies are in conflict. Consistency checking is performed each
|
||||
* time the policies are modified when they are being created and, in case they are
|
||||
* already enabled, via the set qos operation.
|
||||
*
|
||||
* Some QosPolicy have "immutable" semantics meaning that they can only be
|
||||
* specified either at DomainParticipant creation time or prior to calling the enable
|
||||
* operation on the DomainParticipant.
|
||||
*
|
||||
* @see for more information: @ref DCPS_QoS
|
||||
*/
|
||||
class dds::domain::qos::DomainParticipantQos : public ::dds::core::EntityQos<org::eclipse::cyclonedds::domain::qos::DomainParticipantQosDelegate>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Create @ref anchor_dds_domain_domainparticipant_qos_defaults "default" QoS.
|
||||
*/
|
||||
DomainParticipantQos() {}
|
||||
|
||||
/**
|
||||
* Create QoS with policies copied from the given QoS.
|
||||
*
|
||||
* @param qos the QoS to copy policies from.
|
||||
*/
|
||||
DomainParticipantQos(const DomainParticipantQos& qos);
|
||||
};
|
||||
|
||||
#else /* DOXYGEN_FOR_ISOCPP */
|
||||
|
||||
namespace dds {
|
||||
namespace domain {
|
||||
namespace qos {
|
||||
namespace detail {
|
||||
typedef ::dds::core::TEntityQos< ::org::eclipse::cyclonedds::domain::qos::DomainParticipantQosDelegate >
|
||||
DomainParticipantQos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* DOXYGEN_FOR_ISOCPP */
|
||||
|
||||
#endif /* OMG_DDS_DOMAIN_QOS_DETAIL_DOMAINPARTICIPANTQOS_HPP_ */
|
||||
Reference in New Issue
Block a user