10#include <boost/optional/optional_io.hpp>
21template <
typename MessageType>
52 boost::signals2::connection
onMessageReceived(
void (T::*callback)(
const MessageType &), T *
object)
63 template <
typename TOrthogonal,
typename TSourceObject>
66 this->postMessageEvent = [=](
auto msg) {
72 this->postInitialMessageEvent = [=](
auto msg) {
90 ROS_ERROR(
"topic client with no topic name set. Skipping subscribing");
94 ROS_INFO_STREAM(
"[" << this->
getName() <<
"] Subscribing to topic: " << topicName);
virtual std::string getName() const
ISmaccStateMachine * getStateMachine()
boost::signals2::connection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)
smacc::SmaccSignal< void(const MessageType &)> onMessageReceived_
boost::signals2::connection onFirstMessageReceived(void(T::*callback)(const MessageType &), T *object)
boost::signals2::connection onMessageReceived(void(T::*callback)(const MessageType &), T *object)
boost::optional< int > queueSize
SmaccSubscriberClient(std::string topicname)
void onOrthogonalAllocation()
virtual ~SmaccSubscriberClient()
std::function< void(const MessageType &)> postInitialMessageEvent
void messageCallback(const MessageType &msg)
std::function< void(const MessageType &)> postMessageEvent
boost::optional< std::string > topicName
virtual void initialize()
smacc::SmaccSignal< void(const MessageType &)> onFirstMessageReceived_