SMACC2
|
#include <cp_topic_subscriber.hpp>
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 () |
void | onInitialize () override |
Public Member Functions inherited from smacc2::ISmaccComponent | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Public Attributes | |
std::optional< int > | queueSize |
std::function< void(const MessageType &)> | postMessageEvent |
std::function< void(const MessageType &)> | postInitialMessageEvent |
smacc2::SmaccSignal< void(const MessageType &)> | onFirstMessageReceived_ |
smacc2::SmaccSignal< void(const MessageType &)> | onMessageReceived_ |
Private Member Functions | |
void | messageCallback (const MessageType &msg) |
Private Attributes | |
rclcpp::Subscription< MessageType >::SharedPtr | sub_ |
bool | firstMessage_ |
bool | initialized_ |
std::string | topicName_ |
Definition at line 34 of file cp_topic_subscriber.hpp.
typedef MessageType smacc2::components::CpTopicSubscriber< MessageType >::TMessageType |
Definition at line 39 of file cp_topic_subscriber.hpp.
|
inline |
Definition at line 41 of file cp_topic_subscriber.hpp.
References smacc2::components::CpTopicSubscriber< MessageType >::initialized_.
|
inline |
Definition at line 43 of file cp_topic_subscriber.hpp.
References smacc2::components::CpTopicSubscriber< MessageType >::topicName_.
|
inlinevirtual |
Definition at line 45 of file cp_topic_subscriber.hpp.
|
inlineprivate |
Definition at line 116 of file cp_topic_subscriber.hpp.
References smacc2::components::CpTopicSubscriber< MessageType >::firstMessage_, smacc2::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived_, smacc2::components::CpTopicSubscriber< MessageType >::onMessageReceived_, smacc2::components::CpTopicSubscriber< MessageType >::postInitialMessageEvent, and smacc2::components::CpTopicSubscriber< MessageType >::postMessageEvent.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
|
inline |
Definition at line 63 of file cp_topic_subscriber.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
|
inlineoverridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 88 of file cp_topic_subscriber.hpp.
References smacc2::components::CpTopicSubscriber< MessageType >::firstMessage_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getName(), smacc2::ISmaccComponent::getNode(), smacc2::components::CpTopicSubscriber< MessageType >::initialized_, smacc2::components::CpTopicSubscriber< MessageType >::messageCallback(), smacc2::components::CpTopicSubscriber< MessageType >::queueSize, smacc2::components::CpTopicSubscriber< MessageType >::sub_, and smacc2::components::CpTopicSubscriber< MessageType >::topicName_.
|
inline |
Definition at line 55 of file cp_topic_subscriber.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
|
inline |
Definition at line 71 of file cp_topic_subscriber.hpp.
References smacc2::ISmaccComponent::postEvent().
|
private |
Definition at line 112 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback(), and smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
|
private |
Definition at line 113 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::CpTopicSubscriber(), and smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
smacc2::SmaccSignal<void(const MessageType &)> smacc2::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived_ |
Definition at line 50 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback().
smacc2::SmaccSignal<void(const MessageType &)> smacc2::components::CpTopicSubscriber< MessageType >::onMessageReceived_ |
Definition at line 51 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc2::components::CpTopicSubscriber< MessageType >::postInitialMessageEvent |
Definition at line 48 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback().
std::function<void(const MessageType &)> smacc2::components::CpTopicSubscriber< MessageType >::postMessageEvent |
Definition at line 47 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback().
std::optional<int> smacc2::components::CpTopicSubscriber< MessageType >::queueSize |
Definition at line 37 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
|
private |
Definition at line 111 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
|
private |
Definition at line 114 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::CpTopicSubscriber(), and smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().