|
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 |
| smacc2::SmaccSignal< void(const MessageType &)> | onFirstMessageReceived_ |
| smacc2::SmaccSignal< void(const MessageType &)> | onMessageReceived_ |
| std::function< void(const MessageType &)> | postMessageEvent |
| std::function< void(const MessageType &)> | postInitialMessageEvent |
Private Member Functions | |
| void | messageCallback (const MessageType &msg) |
Private Attributes | |
| rclcpp::Subscription< MessageType >::SharedPtr | sub_ |
| bool | firstMessage_ |
| bool | initialized_ |
| std::string | topicName_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
| virtual void | onInitialize () |
| 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) |
| 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) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
| ISmaccStateMachine * | getStateMachine () |
Protected Attributes inherited from smacc2::ISmaccComponent | |
| ISmaccStateMachine * | stateMachine_ |
| ISmaccClient * | owner_ |
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 113 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 61 of file cp_topic_subscriber.hpp.
References callback(), smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().

|
inlineoverridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 84 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 54 of file cp_topic_subscriber.hpp.
References callback(), smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
Referenced by sm_autoware_avp::clients::ClAutoware::onInitialize().


|
inline |
Definition at line 69 of file cp_topic_subscriber.hpp.
References smacc2::ISmaccComponent::postEvent().

|
private |
Definition at line 109 of file cp_topic_subscriber.hpp.
Referenced by smacc2::components::CpTopicSubscriber< MessageType >::messageCallback(), and smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().
|
private |
Definition at line 110 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 47 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 48 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 51 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 50 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 108 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 >::CpTopicSubscriber(), and smacc2::components::CpTopicSubscriber< MessageType >::onInitialize().