8 #ifndef DAQIF_SUBSCRIPTION_HPP_
9 #define DAQIF_SUBSCRIPTION_HPP_
14 #include <mal/Mal.hpp>
15 #include <mal/ps/Subscription.hpp>
22 template <
class TopicType>
24 std::unique_ptr<elt::mal::ps::Subscriber<TopicType>>
subscriber;
31 template <
class TopicType,
class Func>
34 auto subscriber =
mal.getSubscriber<TopicType>(
35 elt::mal::Uri(uri), elt::mal::ps::qos::QoS::DEFAULT, elt::mal::Mal::Properties());
37 subscriber->subscribeAsync(elt::mal::ps::DataEventFilter<TopicType>::all(), func);
38 return {std::move(subscriber), std::move(subscription)};
42 #endif // #ifndef DAQIF_SUBSCRIPTION_HPP_