Namespace dds::domain

namespace domain

Typedefs

typedef dds::domain::detail::DomainParticipant DomainParticipant

Functions

void ignore(const dds::domain::DomainParticipant &dp, const dds::core::InstanceHandle &handle)

This function enables you to ignore the entity represented by the given InstanceHandle for the specific DomainParticipant.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • handle – the InstanceHandle of the remote entity that has to be ignored

template<typename FwdIterator>
void ignore(const dds::domain::DomainParticipant &dp, FwdIterator begin, FwdIterator end)

This function enables you to ignore a series of entities whose instance handles are made available via the provided iterators.

Parameters
  • dp – the DomainParticipant for which the remote entity will be ignored

  • begin – the begin iterator for the InstanceHandle to ignore

  • end – the end iterator for the InstanceHandle to ignore

DomainParticipant find(uint32_t id)

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.

Parameters

id – the domain id

class DomainParticipantListener : public virtual dds::pub::PublisherListener, public virtual dds::sub::SubscriberListener, public virtual dds::topic::AnyTopicListener
#include <DomainParticipantListener.hpp>

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.

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.

// 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());

See also

for more information: Domain Participant

See also

for more information: Listener information

Subclassed by dds::domain::NoOpDomainParticipantListener

class NoOpDomainParticipantListener : public virtual dds::domain::DomainParticipantListener, public virtual dds::pub::NoOpPublisherListener, public virtual dds::sub::NoOpSubscriberListener, public virtual dds::topic::NoOpAnyTopicListener
#include <DomainParticipantListener.hpp>

DomainParticipant events Listener.

This listener is just like DomainParticipantListener, except that the application doesn’t have to implement all operations.

class ExampleListener :
               public virtual dds::domain::NoOpDomainParticipantListener
{
   // Not necessary to implement any Listener operations.
};

template<typename DELEGATE>
class TDomainParticipant : public dds::core::TEntity<DELEGATE>
#include <TDomainParticipant.hpp>

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 also

for more information: Domain Participant

namespace detail

Typedefs

typedef dds::domain::TDomainParticipant<org::eclipse::cyclonedds::domain::DomainParticipantDelegate> DomainParticipant
namespace qos

Typedefs

typedef dds::domain::qos::detail::DomainParticipantQos DomainParticipantQos
class DomainParticipantQos : public dds::core::EntityQos<org::eclipse::cyclonedds::domain::qos::DomainParticipantQosDelegate>
#include <DomainParticipantQos.hpp>

This class provides the basic mechanism for an application to specify Quality of Service attributes for a DomainParticipant.

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.

Attributes

QosPolicy

Desciption

Default Value

dds::core::policy::UserData

Additional information (info)

UserData::UserData(empty)

dds::core::policy::EntityFactory

Create enabled (info)

EntityFactory::AutoEnable()

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 also

for more information: DCPS_QoS

namespace detail