|
SMACC2
|
#include <cl_lifecycle_node.hpp>


Public Types | |
| using | CancelPredicate = std::function<bool()> |
Public Member Functions | |
| ClLifecycleNode (std::string nodeName) | |
| virtual | ~ClLifecycleNode () |
| void | onInitialize () override |
| bool | changeState (uint8_t transition, const CancelPredicate &cancelled=CancelPredicate()) |
| bool | configure (const CancelPredicate &cancelled=CancelPredicate()) |
| bool | activate (const CancelPredicate &cancelled=CancelPredicate()) |
| bool | deactivate (const CancelPredicate &cancelled=CancelPredicate()) |
| bool | cleanup (const CancelPredicate &cancelled=CancelPredicate()) |
| bool | shutdown (const CancelPredicate &cancelled=CancelPredicate()) |
| bool | getState (uint8_t &state, const CancelPredicate &cancelled=CancelPredicate()) |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| Configure component for event posting during orthogonal allocation. | |
Public Member Functions inherited from smacc2::ISmaccClient | |
| ISmaccClient () | |
| virtual | ~ISmaccClient () |
| ISmaccClient (const ISmaccClient &)=delete | |
| ISmaccClient & | operator= (const ISmaccClient &)=delete |
| ISmaccClient (ISmaccClient &&)=delete | |
| ISmaccClient & | operator= (ISmaccClient &&)=delete |
| virtual std::string | getName () const |
| template<typename TComponent > | |
| TComponent * | getComponent () |
| template<typename TComponent > | |
| TComponent * | getComponent (const std::string &name) |
| template<typename TComponent > | |
| TComponent * | getComponent (int index) |
| virtual smacc2::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) |
| const std::vector< std::shared_ptr< ISmaccComponent > > & | iterateComponents () const |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
Private Attributes | |
| rclcpp::Client< lifecycle_msgs::srv::GetState >::SharedPtr | client_get_state_ |
| rclcpp::Client< lifecycle_msgs::srv::ChangeState >::SharedPtr | client_change_state_ |
| std::string | nodeName_ |
| CpLifecycleEventMonitor * | eventMonitor_ |
| const std::string | node_get_state_topic = "/get_state" |
| const std::string | node_change_state_topic = "/change_state" |
| lifecycle_msgs::msg::TransitionEvent::SharedPtr | lastTransitionEvent_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccClient | |
| template<typename TOrthogonal , typename TClient > | |
| void | onComponentInitialization () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createComponent (const TArgs &... targs) |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createNamedComponent (const std::string &name, const TArgs &... targs) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
Protected Attributes inherited from smacc2::ISmaccClient | |
| std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
Definition at line 196 of file cl_lifecycle_node.hpp.
| using cl_lifecycle_node::ClLifecycleNode::CancelPredicate = std::function<bool()> |
Definition at line 208 of file cl_lifecycle_node.hpp.
| cl_lifecycle_node::ClLifecycleNode::ClLifecycleNode | ( | std::string | nodeName | ) |
Definition at line 28 of file cl_lifecycle_node.cpp.
|
virtual |
Definition at line 33 of file cl_lifecycle_node.cpp.
| bool cl_lifecycle_node::ClLifecycleNode::activate | ( | const CancelPredicate & | cancelled = CancelPredicate() | ) |
Definition at line 137 of file cl_lifecycle_node.cpp.
References changeState().
Referenced by cl_lifecycle_node::CbActivate::onEntry().


| bool cl_lifecycle_node::ClLifecycleNode::changeState | ( | uint8_t | transition, |
| const CancelPredicate & | cancelled = CancelPredicate() ) |
Definition at line 97 of file cl_lifecycle_node.cpp.
References client_change_state_, and smacc2::ISmaccClient::getNode().
Referenced by activate(), cleanup(), configure(), deactivate(), and shutdown().


| bool cl_lifecycle_node::ClLifecycleNode::cleanup | ( | const CancelPredicate & | cancelled = CancelPredicate() | ) |
Definition at line 152 of file cl_lifecycle_node.cpp.
References changeState().
Referenced by cl_lifecycle_node::CbCleanup::onEntry().


| bool cl_lifecycle_node::ClLifecycleNode::configure | ( | const CancelPredicate & | cancelled = CancelPredicate() | ) |
Definition at line 147 of file cl_lifecycle_node.cpp.
References changeState().
Referenced by cl_lifecycle_node::CbConfigure::onEntry().


| bool cl_lifecycle_node::ClLifecycleNode::deactivate | ( | const CancelPredicate & | cancelled = CancelPredicate() | ) |
Definition at line 142 of file cl_lifecycle_node.cpp.
References changeState().
Referenced by cl_lifecycle_node::CbDeactivate::onEntry(), and cl_lifecycle_node::CbDeactivateOnExit::onExit().


| bool cl_lifecycle_node::ClLifecycleNode::getState | ( | uint8_t & | state, |
| const CancelPredicate & | cancelled = CancelPredicate() ) |
Definition at line 124 of file cl_lifecycle_node.cpp.
References client_get_state_, and smacc2::ISmaccClient::getNode().
Referenced by shutdown().


|
overridevirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 35 of file cl_lifecycle_node.cpp.
References client_change_state_, client_get_state_, smacc2::ISmaccClient::getNode(), node_change_state_topic, node_get_state_topic, and nodeName_.

|
inline |
Configure component for event posting during orthogonal allocation.
Definition at line 241 of file cl_lifecycle_node.hpp.
References smacc2::ISmaccClient::createComponent(), eventMonitor_, nodeName_, and onStateOrthogonalAllocation().
Referenced by onStateOrthogonalAllocation().


| bool cl_lifecycle_node::ClLifecycleNode::shutdown | ( | const CancelPredicate & | cancelled = CancelPredicate() | ) |
Definition at line 157 of file cl_lifecycle_node.cpp.
References changeState(), smacc2::ISmaccClient::getNode(), getState(), and nodeName_.
Referenced by cl_lifecycle_node::CbShutdown::onEntry().


|
private |
Definition at line 258 of file cl_lifecycle_node.hpp.
Referenced by changeState(), and onInitialize().
|
private |
Definition at line 257 of file cl_lifecycle_node.hpp.
Referenced by getState(), and onInitialize().
|
private |
Definition at line 263 of file cl_lifecycle_node.hpp.
Referenced by onStateOrthogonalAllocation().
|
private |
Definition at line 267 of file cl_lifecycle_node.hpp.
|
private |
Definition at line 265 of file cl_lifecycle_node.hpp.
Referenced by onInitialize().
|
private |
Definition at line 264 of file cl_lifecycle_node.hpp.
Referenced by onInitialize().
|
private |
Definition at line 260 of file cl_lifecycle_node.hpp.
Referenced by onInitialize(), onStateOrthogonalAllocation(), and shutdown().