CoreDX DDS Modern C++ API
|
The DomainParticipant is used to configure, create and destroy Publisher, Subscriber and Topic objects. More...
Public Member Functions | |
DomainParticipant (uint32_t did) | |
Create a new DomainParticipant object. More... | |
DomainParticipant (uint32_t id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::none()) | |
Create a new DomainParticipant object. More... | |
void | listener (Listener *the_listener, const dds::core::status::StatusMask &event_mask) |
Register a listener with the DomainParticipant. More... | |
Listener * | listener () const |
Get the listener of this DomainParticipant. | |
const dds::domain::qos::DomainParticipantQos & | qos () const |
Return the DomainParticipantQos setting for this instance. More... | |
uint32_t | domain_id () const |
This operation retrieves the domain_id used to create the DomainParticipant. More... | |
void | assert_liveliness () |
This operation manually asserts the liveliness of the DataWriter. More... | |
bool | contains_entity (const dds::core::InstanceHandle &handle) |
This operation checks whether or not the given a_handle represents an Entity that was created from the DomainParticipant. More... | |
dds::core::Time | current_time () const |
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. | |
Public Member Functions inherited from dds::core::Entity | |
void | enable () |
This operation enables the Entity. More... | |
const dds::core::status::StatusMask | status_changes () |
This operation retrieves the list of communication statuses in the Entity that are triggered.That is, the list of statuses whose value has changed since the last time the application read the status. More... | |
const dds::core::InstanceHandle | instance_handle () const |
This operation returns the InstanceHandle_t that represents the Entity. | |
void | close () |
This method closes the entity and releases all resources associated with DDS, such as threads, sockets, buffers, etc. More... | |
void | retain () |
Indicates that references to this object may go out of scope but that the application expects to look it up again later. More... | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
Static Public Member Functions | |
static const dds::domain::qos::DomainParticipantFactoryQos & | participant_factory_qos () |
static void | participant_factory_qos (const dds::domain::qos::DomainParticipantFactoryQos &the_qos) |
The DomainParticipant is used to configure, create and destroy Publisher, Subscriber and Topic objects.
The DomainParticipant is a container for the objects that it creates. The objects operate within the domain identified by the domain_id provided when the DomainParticipant was created. Objects within different domains do not communicate or interfere with each other.
dds::domain::DomainParticipant::DomainParticipant | ( | uint32_t | did | ) |
Create 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 DomainParticipantQos passed as argument.
did | the id of the domain joined by the new DomainParticipant. |
dds::domain::DomainParticipant::DomainParticipant | ( | uint32_t | id, |
const dds::domain::qos::DomainParticipantQos & | qos, | ||
dds::domain::DomainParticipantListener * | listener = NULL , |
||
const dds::core::status::StatusMask & | mask = dds::core::status::StatusMask::none() |
||
) |
Create 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 DomainParticipantQos passed as argument.
id | the id of the domain joined by this DomainParticipant. |
qos | the QoS settings for this DomainParticipant |
listener | a listener to install (optional) |
mask | the StatusMask indicating which status events should trigger a listener callback |
void dds::domain::DomainParticipant::assert_liveliness | ( | ) |
This operation manually asserts the liveliness of the DataWriter.
This is used in combination with the LIVELINESS QoS policy (see Section 7.1.3, Supported QoS, on page 96) to indicate to the Service that the entity remains active. This operation need only be used if the LIVELINESS setting is either MANUAL_BY_PARTICIPANT or MANUAL_BY_TOPIC. Otherwise, it has no effect.
Note Writing data via the write operation on a DataWriter asserts liveliness on the DataWriter itself and its DomainParticipant. Consequently the use of assert_liveliness is only needed if the application is not writing data regularly.
bool dds::domain::DomainParticipant::contains_entity | ( | const dds::core::InstanceHandle & | handle | ) |
This operation checks whether or not the given a_handle represents an Entity that was created from the 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.
handle | the instance handle for which the containement relationship has to be checked. |
uint32_t dds::domain::DomainParticipant::domain_id | ( | ) | const |
This operation retrieves the domain_id used to create the DomainParticipant.
The domain_id identifies the DDS domain to which the DomainParticipant belongs. As described in the introduction to Section 7.1.2.2.1, DomainParticipant Class, on page 22 each DDS domain represents a separate data communication plane isolated from other domains.
void dds::domain::DomainParticipant::listener | ( | Listener * | the_listener, |
const dds::core::status::StatusMask & | event_mask | ||
) |
Register a listener with the DomainParticipant.
The notifications received by the listener depend on the status mask with which it was registered.
the_listener | the listener |
event_mask | the mask defining which events should trigger a listener callback |
const dds::domain::qos::DomainParticipantQos& dds::domain::DomainParticipant::qos | ( | ) | const |
Return the DomainParticipantQos setting for this instance.