DomainParticipants¶
A Domain is a specific subsection of the DDS shared-dataspace and identified by its domain ID, which is a 32-bit unsigned integer.
Data exchanges are limited to the domain they are made on. For example, data exchanged on domain 2 is not visible on domain 8.
To exchange data you must create a DomainParticipant, which is an entrypoint for the program on the shared dataspace’s domain.
To specify the default domain ID:
dds_entity_t participant = dds_create_participant (DDS_DOMAIN_DEFAULT, NULL, NULL);
dds::domain::DomainParticipant participant(domain::default_id());
dp = DomainParticipant()
To specify with domain ID 5:
dds_entity_t participant = dds_create_participant (5, NULL, NULL);
dds::domain::DomainParticipant participant(5);
dp = DomainParticipant(5)
Important
You must have the same ID on both the reading side and the writing side, otherwise, they can not see each other.