2.9. Create Subscriber¶
A DDS Subscriber contains zero or more DataReaders. A publishing application must create at least one DDS Publisher and then a DataReader for each Topic it wants to subscribe to.
Please refer to SubscriberQos and DataReaderQos for customizable policies for these DDS entities.
DDS_Subscriber *subscriber = NULL;
subscriber = DDS_DomainParticipant_create_subscriber(participant,
&DDS_SUBSCRIBER_QOS_DEFAULT,
NULL,
DDS_STATUS_MASK_NONE);
if (subscriber == NULL)
{
/* failure */
}
For more information, see Receiving Data.