SMACC
|
#include <cp_topic_subscriber.h>
Public Types | |
typedef MessageType | TMessageType |
Public Member Functions | |
CpTopicSubscriber () | |
CpTopicSubscriber (std::string topicname) | |
virtual | ~CpTopicSubscriber () |
template<typename T > | |
boost::signals2::connection | onMessageReceived (void(T::*callback)(const MessageType &), T *object) |
template<typename T > | |
boost::signals2::connection | onFirstMessageReceived (void(T::*callback)(const MessageType &), T *object) |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
virtual void | initialize () |
Public Member Functions inherited from smacc::ISmaccComponent | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Public Attributes | |
boost::optional< std::string > | topicName |
boost::optional< int > | queueSize |
smacc::SmaccSignal< void(const MessageType &)> | onFirstMessageReceived_ |
smacc::SmaccSignal< void(const MessageType &)> | onMessageReceived_ |
std::function< void(const MessageType &)> | postMessageEvent |
std::function< void(const MessageType &)> | postInitialMessageEvent |
Protected Attributes | |
ros::NodeHandle | nh_ |
Protected Attributes inherited from smacc::ISmaccComponent | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Private Member Functions | |
void | messageCallback (const MessageType &msg) |
Private Attributes | |
ros::Subscriber | sub_ |
bool | firstMessage_ |
bool | initialized_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc::ISmaccComponent | |
virtual void | initialize (ISmaccClient *owner) |
void | setStateMachine (ISmaccStateMachine *stateMachine) |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage) |
template<typename TClient > | |
void | requiresClient (TClient *&requiredClientStorage) |
virtual void | onInitialize () |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingNamedComponent (std::string name, TArgs... targs) |
Definition at line 15 of file cp_topic_subscriber.h.
typedef MessageType smacc::components::CpTopicSubscriber< MessageType >::TMessageType |
Definition at line 21 of file cp_topic_subscriber.h.
|
inline |
Definition at line 23 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::initialized_.
|
inline |
Definition at line 28 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::topicName.
|
inlinevirtual |
Definition at line 33 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::sub_.
|
inlinevirtual |
Definition at line 72 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::firstMessage_, smacc::ISmaccComponent::getName(), smacc::components::CpTopicSubscriber< MessageType >::initialized_, smacc::components::CpTopicSubscriber< MessageType >::nh_, smacc::components::CpTopicSubscriber< MessageType >::queueSize, smacc::components::CpTopicSubscriber< MessageType >::sub_, and smacc::components::CpTopicSubscriber< MessageType >::topicName.
|
inlineprivate |
Definition at line 103 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::firstMessage_, smacc::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived_, smacc::components::CpTopicSubscriber< MessageType >::onMessageReceived_, smacc::components::CpTopicSubscriber< MessageType >::postInitialMessageEvent, and smacc::components::CpTopicSubscriber< MessageType >::postMessageEvent.
|
inline |
Definition at line 51 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived_.
|
inline |
Definition at line 45 of file cp_topic_subscriber.h.
References smacc::components::CpTopicSubscriber< MessageType >::onMessageReceived_.
|
inline |
Definition at line 57 of file cp_topic_subscriber.h.
References smacc::ISmaccComponent::postEvent().
|
private |
Definition at line 100 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::initialize(), and smacc::components::CpTopicSubscriber< MessageType >::messageCallback().
|
private |
Definition at line 101 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::CpTopicSubscriber(), and smacc::components::CpTopicSubscriber< MessageType >::initialize().
|
protected |
Definition at line 96 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::initialize().
smacc::SmaccSignal<void(const MessageType &)> smacc::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived_ |
Definition at line 38 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::messageCallback(), and smacc::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived().
smacc::SmaccSignal<void(const MessageType &)> smacc::components::CpTopicSubscriber< MessageType >::onMessageReceived_ |
Definition at line 39 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::messageCallback(), and smacc::components::CpTopicSubscriber< MessageType >::onMessageReceived().
std::function<void(const MessageType &)> smacc::components::CpTopicSubscriber< MessageType >::postInitialMessageEvent |
Definition at line 42 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc::components::CpTopicSubscriber< MessageType >::postMessageEvent |
Definition at line 41 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::messageCallback().
boost::optional<int> smacc::components::CpTopicSubscriber< MessageType >::queueSize |
Definition at line 19 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::initialize().
|
private |
Definition at line 99 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::initialize(), and smacc::components::CpTopicSubscriber< MessageType >::~CpTopicSubscriber().
boost::optional<std::string> smacc::components::CpTopicSubscriber< MessageType >::topicName |
Definition at line 18 of file cp_topic_subscriber.h.
Referenced by smacc::components::CpTopicSubscriber< MessageType >::CpTopicSubscriber(), and smacc::components::CpTopicSubscriber< MessageType >::initialize().