13 #include <type_traits>
16 #include <boost/function.hpp>
17 #include <boost/shared_ptr.hpp>
112 const ::ros::M_string& remappings);
148 template <
class Message>
149 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
151 const ::cras::SimpleTopicStatusParam<Message>& defaultDiagParams, const ::std::string& diagNamespace,
152 const ::std::string& topic,
const size_t queueSize,
const bool latch =
false)
154 auto pub = this->
template advertise<Message>(topic, queueSize, latch);
155 auto result = ::std::make_unique<::cras::DiagnosedPublisher<Message>>(
156 pub, this->
getDiagParams(diagNamespace, topic), defaultDiagParams);
171 template <
class Message>
172 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
174 const ::cras::SimpleTopicStatusParam<Message>& defaultDiagParams, const ::std::string& diagNamespace,
177 const auto topic = options.
topic;
179 auto result = ::std::make_unique<::cras::DiagnosedPublisher<Message>>(
180 pub, this->
getDiagParams(diagNamespace, topic), defaultDiagParams);
196 template <
class Message>
197 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
199 const ::std::string& topic,
const size_t queueSize,
const bool latch =
false)
202 topic, queueSize, latch);
214 template <
class Message>
215 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
234 template <
class Message>
235 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
237 const ::std::string& topic,
const size_t queueSize,
const bool latch =
false)
239 return this->
template advertiseDiagnosed<Message>(
updater,
"", topic, queueSize, latch);
251 template <
class Message>
252 ::std::unique_ptr<::cras::DiagnosedPublisher<Message>>
255 return this->
template advertiseDiagnosed<Message>(
updater,
"", options);
274 template <typename M, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
275 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
278 const ::std::string& topic, uint32_t queue_size,
void(*cb)(M), ::
ros::TransportHints hints = {})
280 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>(
281 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>(
282 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, hints));
283 result->attach(updater);
284 return ::std::move(result);
299 template <typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
300 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
302 const ::cras::SimpleTopicStatusParam<Message>& defaultDiagParams, const ::std::string& diagNamespace,
303 const ::std::string& topic, uint32_t queue_size,
304 const boost::function<
void(const ::boost::shared_ptr<Message>&)>& cb, ::
ros::TransportHints hints = {})
306 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>(new ::cras::DiagnosedSubscriber<Message>(
307 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, hints));
308 result->attach(updater);
309 return ::std::move(result);
325 template <typename C, typename = ::std::enable_if_t<::cras::IsMessageParam<C>::value>>
326 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<C>>>
329 const ::std::string& topic, uint32_t queue_size,
332 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<C>>>(
333 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<C>>(
334 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, obj, hints));
335 result->attach(updater);
336 return ::std::move(result);
353 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
354 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
357 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M), T* obj, ::
ros::TransportHints hints = {})
359 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>(
360 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>(
361 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, obj, hints));
362 result->attach(updater);
363 return ::std::move(result);
380 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
381 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
384 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M)
const, T* obj, ::
ros::TransportHints hints = {})
386 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>(
387 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>(
388 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, obj, hints));
389 result->attach(updater);
390 return ::std::move(result);
407 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
408 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
411 const ::std::string& topic, uint32_t queue_size,
414 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>(
415 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>(
416 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, obj, hints));
417 result->attach(updater);
418 return ::std::move(result);
435 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
436 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
439 const ::std::string& topic, uint32_t queue_size,
440 void(T::*cb)(M)
const, const ::boost::shared_ptr<T>& obj, ::
ros::TransportHints hints = {})
442 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>(
443 new ::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>(
444 *
this, this->
getDiagParams(diagNamespace, topic), defaultDiagParams, topic, queue_size, cb, obj, hints));
445 result->attach(updater);
446 return ::std::move(result);
458 template<typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
459 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
461 const ::cras::SimpleTopicStatusParam<Message>& defaultDiagParams, const ::std::string& diagNamespace,
464 auto result = ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>(new ::cras::DiagnosedSubscriber<Message>(
465 *
this, this->
getDiagParams(diagNamespace, options.
topic), defaultDiagParams, options));
467 return ::std::move(result);
481 template <typename M, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
482 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
484 const ::std::string& topic, uint32_t queue_size,
void(*cb)(M), ::
ros::TransportHints hints = {})
487 diagNamespace, topic, queue_size, cb, hints);
501 template <typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
502 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
504 const ::std::string& topic, uint32_t queue_size,
505 const boost::function<
void(const ::boost::shared_ptr<Message>&)>& cb, ::
ros::TransportHints hints = {})
508 topic, queue_size, cb, hints);
523 template <typename C, typename = ::std::enable_if_t<::cras::IsMessageParam<C>::value>>
524 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<C>>>
526 const ::std::string& topic, uint32_t queue_size,
530 diagNamespace, topic, queue_size, cb, obj, hints);
546 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
547 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
549 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M), T* obj, ::
ros::TransportHints hints = {})
552 diagNamespace, topic, queue_size, cb, obj, hints);
568 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
569 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
571 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M)
const, T* obj, ::
ros::TransportHints hints = {})
574 diagNamespace, topic, queue_size, cb, obj, hints);
590 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
591 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
593 const ::std::string& topic, uint32_t queue_size,
597 diagNamespace, topic, queue_size, cb, obj, hints);
613 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
614 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
616 const ::std::string& topic, uint32_t queue_size,
617 void(T::*cb)(M)
const, const ::boost::shared_ptr<T>& obj, ::
ros::TransportHints hints = {})
620 diagNamespace, topic, queue_size, cb, obj, hints);
631 template<typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
632 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
637 diagNamespace, options);
651 template <typename M, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
652 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
654 const ::std::string& topic, uint32_t queue_size,
void(*cb)(M), ::
ros::TransportHints hints = {})
656 return this->
template subscribeDiagnosed<M>(updater,
"", topic, queue_size, cb, hints);
670 template <typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
671 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
673 const ::std::string& topic, uint32_t queue_size,
674 const boost::function<
void(const ::boost::shared_ptr<Message>&)>& cb, ::
ros::TransportHints hints = {})
676 return this->
template subscribeDiagnosed<Message>(updater,
"", topic, queue_size, cb, hints);
690 template <typename C, typename = ::std::enable_if_t<::cras::IsMessageParam<C>::value>>
691 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<C>>>
693 const ::std::string& topic, uint32_t queue_size,
696 return this->
template subscribeDiagnosed<C>(updater,
"", topic, queue_size, cb, obj, hints);
712 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
713 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
715 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M), T* obj, ::
ros::TransportHints hints = {})
717 return this->
template subscribeDiagnosed<M>(updater,
"", topic, queue_size, cb, obj, hints);
733 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
734 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
736 const ::std::string& topic, uint32_t queue_size,
void(T::*cb)(M)
const, T* obj, ::
ros::TransportHints hints = {})
738 return this->
template subscribeDiagnosed<M>(updater,
"", topic, queue_size, cb, obj, hints);
754 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
755 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
757 const ::std::string& topic, uint32_t queue_size,
760 return this->
template subscribeDiagnosed<M>(updater,
"", topic, queue_size, cb, obj, hints);
776 template<typename M, class T, typename = ::std::enable_if_t<::cras::IsMessageParam<M>::value>>
777 ::std::unique_ptr<::cras::DiagnosedSubscriber<::cras::BaseMessage<M>>>
779 const ::std::string& topic, uint32_t queue_size,
780 void(T::*cb)(M)
const, const ::boost::shared_ptr<T>& obj, ::
ros::TransportHints hints = {})
782 return this->
template subscribeDiagnosed<M>(updater,
"", topic, queue_size, cb, obj, hints);
793 template<typename Message, typename = ::std::enable_if_t<::ros::message_traits::IsMessage<Message>::value>>
794 ::std::unique_ptr<::cras::DiagnosedSubscriber<Message>>
797 return this->
template subscribeDiagnosed<Message>(
updater,
"", options);