Go to the documentation of this file.
29 #ifndef ROSCPP_SUBSCRIPTION_CALLBACK_HELPER_H
30 #define ROSCPP_SUBSCRIPTION_CALLBACK_HELPER_H
35 #include "ros/forwards.h"
36 #include "ros/parameter_adapter.h"
37 #include "ros/message_traits.h"
38 #include "ros/builtin_message_traits.h"
39 #include "ros/serialization.h"
40 #include "ros/message_event.h"
41 #include <ros/static_assert.h>
76 virtual const std::type_info& getTypeInfo() = 0;
77 virtual bool isConst() = 0;
87 template<
typename P,
typename Enabled =
void>
116 return message_traits::hasHeader<typename ParameterAdapter<P>::Message>();
121 namespace ser = serialization;
131 ser::PreDeserializeParams<NonConstType> predes_params;
132 predes_params.message =
msg;
134 ser::PreDeserialize<NonConstType>::notify(predes_params);
165 #endif // ROSCPP_SUBSCRIPTION_CALLBACK_HELPER_H
virtual const std::type_info & getTypeInfo()
virtual void call(SubscriptionCallbackHelperCallParams ¶ms)
Concrete generic implementation of SubscriptionCallbackHelper for any normal message type....
SubscriptionCallbackHelperT(const Callback &callback, const CreateFunction &create=DefaultMessageCreator< NonConstType >())
std::add_const< NonConstType >::type ConstType
std::function< void(typename Adapter::Parameter)> Callback
std::shared_ptr< SubscriptionCallbackHelper > SubscriptionCallbackHelperPtr
std::shared_ptr< NonConstType > NonConstTypePtr
std::shared_ptr< ConstType > ConstTypePtr
Generally not for outside use. Adapts a function parameter type into the message type,...
std::function< NonConstTypePtr()> CreateFunction
virtual VoidConstPtr deserialize(const SubscriptionCallbackHelperDeserializeParams ¶ms)
std::shared_ptr< M_string > connection_header
virtual ~SubscriptionCallbackHelper()
void setCreateFunction(const CreateFunction &create)
static const bool is_const
void deserialize(Stream &stream, T &t)
Deserialize an object. Stream here should normally be a ros::serialization::IStream.
MessageEvent< void const > event
Event type for subscriptions, const ros::MessageEvent<M const>& can be used in your callback instead ...
ParameterAdapter< P >::Message NonConstType
Abstract base class used by subscriptions to deal with concrete message types through a common interf...
ParameterAdapter< P > Adapter
bool call(const std::string &service_name, MReq &req, MRes &res)
Invoke an RPC service.
ParameterAdapter< P >::Event Event
std::remove_reference< typename std::remove_const< M >::type >::type Message
std::shared_ptr< void const > VoidConstPtr
void callback(const sick_scan_xd::RadarScan::ConstPtr &oa)
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:12