SMACC
|
#include <smacc_subscriber_client.h>
Public Types | |
typedef MessageType | TMessageType |
Public Member Functions | |
SmaccSubscriberClient () | |
SmaccSubscriberClient (std::string topicname) | |
virtual | ~SmaccSubscriberClient () |
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::ISmaccClient | |
ISmaccClient () | |
virtual | ~ISmaccClient () |
virtual void | initialize () |
virtual std::string | getName () const |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TComponent > | |
TComponent * | getComponent () |
template<typename TComponent > | |
TComponent * | getComponent (std::string name) |
virtual smacc::introspection::TypeInfo::Ptr | getType () |
ISmaccStateMachine * | getStateMachine () |
template<typename TSmaccSignal , typename T > | |
void | connectSignal (TSmaccSignal &signal, void(T::*callback)(), T *object) |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
void | getComponents (std::vector< std::shared_ptr< ISmaccComponent > > &components) |
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::ISmaccClient | |
std::map< ComponentKey, std::shared_ptr< smacc::ISmaccComponent > > | components_ |
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::ISmaccClient | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createNamedComponent (std::string name, TArgs... targs) |
void | setStateMachine (ISmaccStateMachine *stateMachine) |
void | setOrthogonal (ISmaccOrthogonal *orthogonal) |
Definition at line 22 of file smacc_subscriber_client.h.
typedef MessageType smacc::client_bases::SmaccSubscriberClient< MessageType >::TMessageType |
Definition at line 28 of file smacc_subscriber_client.h.
|
inline |
Definition at line 30 of file smacc_subscriber_client.h.
References smacc::client_bases::SmaccSubscriberClient< MessageType >::initialized_.
|
inline |
Definition at line 35 of file smacc_subscriber_client.h.
References smacc::client_bases::SmaccSubscriberClient< MessageType >::topicName.
|
inlinevirtual |
Definition at line 40 of file smacc_subscriber_client.h.
References smacc::client_bases::SmaccSubscriberClient< MessageType >::sub_.
|
inlinevirtual |
Reimplemented from smacc::ISmaccClient.
Reimplemented in cl_keyboard::ClKeyboard, and cl_multirole_sensor::ClMultiroleSensor< MessageType >.
Definition at line 79 of file smacc_subscriber_client.h.
References smacc::client_bases::SmaccSubscriberClient< MessageType >::firstMessage_, smacc::ISmaccClient::getName(), smacc::client_bases::SmaccSubscriberClient< MessageType >::initialized_, smacc::client_bases::SmaccSubscriberClient< MessageType >::nh_, smacc::client_bases::SmaccSubscriberClient< MessageType >::queueSize, smacc::client_bases::SmaccSubscriberClient< MessageType >::sub_, and smacc::client_bases::SmaccSubscriberClient< MessageType >::topicName.
Referenced by cl_multirole_sensor::ClMultiroleSensor< MessageType >::initialize().
|
inlineprivate |
Definition at line 110 of file smacc_subscriber_client.h.
References smacc::client_bases::SmaccSubscriberClient< MessageType >::firstMessage_, smacc::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived_, smacc::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived_, smacc::client_bases::SmaccSubscriberClient< MessageType >::postInitialMessageEvent, and smacc::client_bases::SmaccSubscriberClient< MessageType >::postMessageEvent.
|
inline |
Definition at line 58 of file smacc_subscriber_client.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 52 of file smacc_subscriber_client.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
Referenced by cl_multirole_sensor::ClMultiroleSensor< MessageType >::initialize(), and smacc::CbSubscriptionCallbackBase< TMsg >::onEntry().
|
inline |
Definition at line 64 of file smacc_subscriber_client.h.
References smacc::ISmaccClient::postEvent().
|
private |
Definition at line 107 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize(), and smacc::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
|
private |
Definition at line 108 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize(), and smacc::client_bases::SmaccSubscriberClient< MessageType >::SmaccSubscriberClient().
|
protected |
Definition at line 103 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize(), and cl_multirole_sensor::ClMultiroleSensor< MessageType >::initialize().
smacc::SmaccSignal<void(const MessageType &)> smacc::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived_ |
Definition at line 45 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
smacc::SmaccSignal<void(const MessageType &)> smacc::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived_ |
Definition at line 46 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc::client_bases::SmaccSubscriberClient< MessageType >::postInitialMessageEvent |
Definition at line 49 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc::client_bases::SmaccSubscriberClient< MessageType >::postMessageEvent |
Definition at line 48 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
boost::optional<int> smacc::client_bases::SmaccSubscriberClient< MessageType >::queueSize |
Definition at line 26 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize().
|
private |
Definition at line 106 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize(), and smacc::client_bases::SmaccSubscriberClient< MessageType >::~SmaccSubscriberClient().
boost::optional<std::string> smacc::client_bases::SmaccSubscriberClient< MessageType >::topicName |
Definition at line 25 of file smacc_subscriber_client.h.
Referenced by smacc::client_bases::SmaccSubscriberClient< MessageType >::initialize(), and smacc::client_bases::SmaccSubscriberClient< MessageType >::SmaccSubscriberClient().