SMACC2
|
#include <smacc_subscriber_client.hpp>
Public Types | |
typedef MessageType | TMessageType |
Public Attributes | |
std::optional< std::string > | topicName |
std::optional< int > | queueSize |
smacc2::SmaccSignal< void(const MessageType &)> | onFirstMessageReceived_ |
smacc2::SmaccSignal< void(const MessageType &)> | onMessageReceived_ |
std::function< void(const MessageType &)> | postMessageEvent |
std::function< void(const MessageType &)> | postInitialMessageEvent |
Protected Member Functions | |
void | onInitialize () override |
Protected Member Functions inherited from smacc2::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) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () |
Private Member Functions | |
void | messageCallback (const MessageType &msg) |
Private Attributes | |
rclcpp::Subscription< MessageType >::SharedPtr | sub_ |
bool | firstMessage_ |
bool | initialized_ |
Additional Inherited Members | |
Protected Attributes inherited from smacc2::ISmaccClient | |
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
Definition at line 38 of file smacc_subscriber_client.hpp.
typedef MessageType smacc2::client_bases::SmaccSubscriberClient< MessageType >::TMessageType |
Definition at line 44 of file smacc_subscriber_client.hpp.
|
inline |
Definition at line 46 of file smacc_subscriber_client.hpp.
References smacc2::client_bases::SmaccSubscriberClient< MessageType >::initialized_.
|
inline |
Definition at line 48 of file smacc_subscriber_client.hpp.
References smacc2::client_bases::SmaccSubscriberClient< MessageType >::topicName.
|
inlinevirtual |
Definition at line 50 of file smacc_subscriber_client.hpp.
|
inlineprivate |
Definition at line 127 of file smacc_subscriber_client.hpp.
References smacc2::client_bases::SmaccSubscriberClient< MessageType >::firstMessage_, smacc2::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived_, smacc2::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived_, smacc2::client_bases::SmaccSubscriberClient< MessageType >::postInitialMessageEvent, and smacc2::client_bases::SmaccSubscriberClient< MessageType >::postMessageEvent.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize().
|
inline |
Definition at line 66 of file smacc_subscriber_client.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inlineoverrideprotectedvirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 94 of file smacc_subscriber_client.hpp.
References smacc2::client_bases::SmaccSubscriberClient< MessageType >::firstMessage_, smacc2::ISmaccClient::getLogger(), smacc2::ISmaccClient::getName(), smacc2::ISmaccClient::getNode(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::initialized_, smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::queueSize, smacc2::client_bases::SmaccSubscriberClient< MessageType >::sub_, and smacc2::client_bases::SmaccSubscriberClient< MessageType >::topicName.
Referenced by cl_multirole_sensor::ClMultiroleSensor< MessageType >::onInitialize().
|
inline |
Definition at line 59 of file smacc_subscriber_client.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
Referenced by smacc2::client_behaviors::CbSubscriptionCallbackBase< TMsg >::onEntry(), and cl_multirole_sensor::ClMultiroleSensor< MessageType >::onInitialize().
|
inline |
Definition at line 74 of file smacc_subscriber_client.hpp.
References smacc2::ISmaccClient::postEvent().
|
private |
Definition at line 124 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback(), and smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize().
|
private |
Definition at line 125 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize(), and smacc2::client_bases::SmaccSubscriberClient< MessageType >::SmaccSubscriberClient().
smacc2::SmaccSignal<void(const MessageType &)> smacc2::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived_ |
Definition at line 52 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
smacc2::SmaccSignal<void(const MessageType &)> smacc2::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived_ |
Definition at line 53 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc2::client_bases::SmaccSubscriberClient< MessageType >::postInitialMessageEvent |
Definition at line 56 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc2::client_bases::SmaccSubscriberClient< MessageType >::postMessageEvent |
Definition at line 55 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::messageCallback().
std::optional<int> smacc2::client_bases::SmaccSubscriberClient< MessageType >::queueSize |
Definition at line 42 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize().
|
private |
Definition at line 123 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize().
std::optional<std::string> smacc2::client_bases::SmaccSubscriberClient< MessageType >::topicName |
Definition at line 41 of file smacc_subscriber_client.hpp.
Referenced by smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize(), and smacc2::client_bases::SmaccSubscriberClient< MessageType >::SmaccSubscriberClient().