Subscriber: private DataReaderListener¶
This class represents a Fast DDS Subscriber within the Integration Service framework.
Its topic type definition and data instances are represented by means of the Fast DDS Dynamic Types API, which allows to get rid of TypeSupport for each used type and eases users the task of defining and using their own custom types on the go, by means of a valid IDL definition.
This class inherits from Fast DDS Data Reader Listener for reacting to datareader events, such as matching with publishers or receiving new data from them.
Subscriber(Participant *participant, const std::string &topic_name, const xtypes::DynamicType &message_type, TopicSubscriberSystem::SubscriptionCallback *is_callback)¶
Construct a new Subscriber object.
[in] topic_name: The topic that this DDS subscriber will attach to.
[in] message_type: A dynamic type definition of the topic’s type.
[in] is_callback: Callback function signature defined by the Integration Service, triggered each time a new data arrives to the DDS Subscriber.
DDSMiddlewareException: if some error occurs while creating the Fast DDS subscriber.
receive(const fastrtps::types::DynamicData *dds_message, fastdds::dds::SampleInfo sample_info)¶
Handle the receiving of a new message from the DDS dataspace.
[in] dds_message: The incoming message.
[in] sample_info: Structure containing the relevant information regarding the incoming message.