SMACC2
|
#include <smacc_client.hpp>
Public Member Functions | |
ISmaccClient () | |
virtual | ~ISmaccClient () |
virtual void | onInitialize () |
virtual std::string | getName () const |
template<typename TComponent > | |
TComponent * | getComponent () |
template<typename TComponent > | |
TComponent * | getComponent (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) |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
Protected Member Functions | |
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 () |
Protected Attributes | |
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
Private Member Functions | |
void | initialize () |
void | setStateMachine (ISmaccStateMachine *stateMachine) |
void | setOrthogonal (ISmaccOrthogonal *orthogonal) |
Private Attributes | |
ISmaccStateMachine * | stateMachine_ |
ISmaccOrthogonal * | orthogonal_ |
Friends | |
class | ISmaccOrthogonal |
class | ISmaccComponent |
Definition at line 44 of file smacc_client.hpp.
smacc2::ISmaccClient::ISmaccClient | ( | ) |
Definition at line 26 of file client.cpp.
|
virtual |
Definition at line 28 of file client.cpp.
void smacc2::ISmaccClient::connectSignal | ( | TSmaccSignal & | signal, |
void(T::*)() | callback, | ||
T * | object | ||
) |
Definition at line 138 of file smacc_client_impl.hpp.
References callback(), smacc2::ISmaccStateMachine::createSignalConnection(), and getStateMachine().
|
protected |
Definition at line 131 of file smacc_client_impl.hpp.
Referenced by smacc2::ClientHandler< TOrthogonal, TClient >::createComponent(), and smacc2::ISmaccComponent::createSiblingComponent().
|
protected |
Definition at line 91 of file smacc_client_impl.hpp.
References components_, getLogger(), getName(), and getStateMachine().
Referenced by smacc2::ClientHandler< TOrthogonal, TClient >::createNamedComponent(), and smacc2::ISmaccComponent::createSiblingNamedComponent().
TComponent * smacc2::ISmaccClient::getComponent |
Definition at line 41 of file smacc_client_impl.hpp.
Referenced by cl_nav2z::CbNavigateGlobalPosition::execute(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbNavigateNextWaypoint::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbUndoPathBackwards::onEntry(), cl_nav2z::CbWaitPose::onEntry(), sm_dance_bot::radial_motion_states::StiRadialReturn::onExit(), sm_dance_bot_strikes_back::radial_motion_states::StiRadialReturn::onExit(), cl_nav2z::CbUndoPathBackwards::onExit(), sm_autoware_avp::clients::ClAutoware::onInitialize(), smacc2::ISmaccComponent::requiresComponent(), sm_dance_bot_strikes_back::f_pattern_states::StiFPatternForward1< SS >::runtimeConfigure(), sm_dance_bot_strikes_back::radial_motion_states::StiRadialEndPoint::runtimeConfigure(), sm_dance_bot_warehouse::f_pattern_states::StiFPatternForward1< SS >::runtimeConfigure(), sm_dance_bot_warehouse_2::f_pattern_states::StiFPatternForward1< SS >::runtimeConfigure(), and cl_nav2z::WaypointNavigator::sendNextGoal().
TComponent * smacc2::ISmaccClient::getComponent | ( | int | index | ) |
Definition at line 47 of file smacc_client_impl.hpp.
References components_.
TComponent * smacc2::ISmaccClient::getComponent | ( | std::string | name | ) |
Definition at line 71 of file smacc_client_impl.hpp.
References components_.
void smacc2::ISmaccClient::getComponents | ( | std::vector< std::shared_ptr< ISmaccComponent > > & | components | ) |
Definition at line 34 of file client.cpp.
References components_.
|
inlineprotected |
Definition at line 103 of file smacc_client.hpp.
References getNode().
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::cancelGoal(), sm_autoware_avp::clients::ClAutoware::checkGoalReached(), smacc2::client_bases::SmaccPublisherClient::configure(), createNamedComponent(), smacc2::ISmaccComponent::getLogger(), smacc2::client_bases::SmaccServiceClient< ServiceType >::onInitialize(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize(), cl_multirole_sensor::ClMultiroleSensor< MessageType >::onInitialize(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), cl_keyboard::ClKeyboard::onOrthogonalAllocation(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult(), cl_move_group_interface::ClMoveGroup::postEventMotionExecutionFailed(), cl_move_group_interface::ClMoveGroup::postEventMotionExecutionSucceded(), cl_keyboard::ClKeyboard::postKeyEvent(), smacc2::client_bases::SmaccActionClientBase< ActionType >::postResultEvent(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
|
virtual |
Reimplemented in smacc2::client_bases::ISmaccActionClient, sm_dance_bot::cl_led::ClLED, sm_dance_bot_strikes_back::cl_led::ClLED, sm_dance_bot_warehouse::cl_led::ClLED, sm_dance_bot_warehouse_2::cl_led::ClLED, and sm_dance_bot_warehouse_3::cl_led::ClLED.
Definition at line 42 of file client.cpp.
References smacc2::introspection::demangleSymbol().
Referenced by sm_autoware_avp::clients::ClAutoware::checkGoalReached(), smacc2::client_bases::SmaccPublisherClient::configure(), createNamedComponent(), smacc2::client_bases::SmaccServiceClient< ServiceType >::onInitialize(), and smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize().
|
protected |
Definition at line 60 of file client.cpp.
References smacc2::ISmaccStateMachine::getNode(), and getStateMachine().
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::cancelGoal(), sm_autoware_avp::clients::ClAutoware::checkGoalReached(), smacc2::client_bases::SmaccPublisherClient::configure(), getLogger(), smacc2::ISmaccComponent::getNode(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onInitialize(), smacc2::client_bases::SmaccServiceClient< ServiceType >::onInitialize(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onInitialize(), cl_move_group_interface::ClMoveGroup::onInitialize(), cl_multirole_sensor::ClMultiroleSensor< MessageType >::onInitialize(), and cl_ros_timer::ClRosTimer::onInitialize().
|
inline |
Definition at line 88 of file smacc_client_impl.hpp.
References stateMachine_.
Referenced by connectSignal(), createNamedComponent(), getNode(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived(), cl_keyboard::ClKeyboard::OnKeyPress(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived(), cl_multirole_sensor::ClMultiroleSensor< MessageType >::onMessageTimeout(), cl_move_group_interface::ClMoveGroup::onMotionExecutionFailed(), cl_move_group_interface::ClMoveGroup::onMotionExecutionSuccedded(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), cl_ros_timer::ClRosTimer::onTimerTick(), and cl_nav2z::WaypointNavigator::sendNextGoal().
|
virtual |
Definition at line 55 of file client.cpp.
References smacc2::introspection::TypeInfo::getFromStdTypeInfo().
|
private |
Definition at line 30 of file client.cpp.
References onInitialize().
|
virtual |
Reimplemented in smacc2::client_bases::SmaccActionClientBase< ActionType >, smacc2::client_bases::SmaccActionClientBase< nav2_msgs::action::NavigateToPose >, smacc2::client_bases::SmaccActionClientBase< sm_dance_bot::action::LEDControl >, smacc2::client_bases::SmaccActionClientBase< sm_dance_bot_strikes_back::action::LEDControl >, smacc2::client_bases::SmaccActionClientBase< sm_dance_bot_warehouse::action::LEDControl >, smacc2::client_bases::SmaccActionClientBase< sm_dance_bot_warehouse_2::action::LEDControl >, smacc2::client_bases::SmaccActionClientBase< sm_dance_bot_warehouse_3::action::LEDControl >, smacc2::client_bases::SmaccServiceClient< ServiceType >, smacc2::client_bases::SmaccServiceClient< std_srvs::srv::SetBool >, smacc2::client_bases::SmaccSubscriberClient< MessageType >, smacc2::client_bases::SmaccSubscriberClient< std_msgs::msg::UInt16 >, smacc2::client_bases::SmaccSubscriberClient< sensor_msgs::msg::LaserScan >, smacc2::client_bases::SmaccSubscriberClient< sensor_msgs::msg::Temperature >, smacc2::client_bases::SmaccSubscriberClient< std_msgs::msg::Float32 >, smacc2::client_bases::SmaccSubscriberClient< std_msgs::msg::Int32 >, smacc2::client_bases::SmaccSubscriberClient< TMsg >, cl_keyboard::ClKeyboard, cl_move_group_interface::ClMoveGroup, cl_multirole_sensor::ClMultiroleSensor< MessageType >, cl_multirole_sensor::ClMultiroleSensor< sensor_msgs::msg::LaserScan >, cl_multirole_sensor::ClMultiroleSensor< sensor_msgs::msg::Temperature >, cl_ros_timer::ClRosTimer, sm_autoware_avp::clients::ClAutoware, sm_dance_bot::cl_string_publisher::ClStringPublisher, sm_dance_bot_strikes_back::cl_string_publisher::ClStringPublisher, sm_dance_bot_warehouse::cl_string_publisher::ClStringPublisher, sm_dance_bot_warehouse_2::cl_string_publisher::ClStringPublisher, sm_dance_bot_warehouse_3::cl_string_publisher::ClStringPublisher, and sm_husky_barrel_search_1::cl_led_array::ClLedArray.
Definition at line 32 of file client.cpp.
Referenced by initialize().
|
inlineprotected |
Definition at line 88 of file smacc_client.hpp.
void smacc2::ISmaccClient::postEvent |
Definition at line 35 of file smacc_client_impl.hpp.
References smacc2::ISmaccStateMachine::postEvent(), and stateMachine_.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onOrthogonalAllocation(), cl_multirole_sensor::ClMultiroleSensor< MessageType >::onOrthogonalAllocation(), sm_autoware_avp::clients::ClAutoware::onOrthogonalAllocation(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::postResultEvent().
void smacc2::ISmaccClient::postEvent | ( | const EventType & | ev | ) |
Definition at line 29 of file smacc_client_impl.hpp.
References smacc2::ISmaccStateMachine::postEvent(), and stateMachine_.
void smacc2::ISmaccClient::requiresClient | ( | SmaccClientType *& | storage | ) |
Definition at line 144 of file smacc_client_impl.hpp.
References orthogonal_, and smacc2::ISmaccOrthogonal::requiresClient().
Referenced by smacc2::ISmaccComponent::requiresClient().
|
private |
|
private |
Definition at line 48 of file client.cpp.
References stateMachine_.
|
friend |
Definition at line 121 of file smacc_client.hpp.
|
friend |
Definition at line 120 of file smacc_client.hpp.
|
protected |
Definition at line 93 of file smacc_client.hpp.
Referenced by createNamedComponent(), getComponent(), and getComponents().
|
private |
Definition at line 108 of file smacc_client.hpp.
Referenced by requiresClient(), and setOrthogonal().
|
private |
Definition at line 107 of file smacc_client.hpp.
Referenced by getStateMachine(), postEvent(), and setStateMachine().