3.8. Create Subscriber¶
A subscribing application needs to create a DDS Subscriber and then a DataReader for each Topic to which it wants to subscribe.
In RTI Connext DDS Micro, SubscriberQos in general contains no policies that need to be customized, while DataReaderQos does contain several customizable policies.
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 the Receiving Data section in the User’s Manual.