|
SMACC2
|
#include <smacc_state_machine.hpp>


Public Member Functions | |
| ISmaccStateMachine (std::string stateMachineName, SignalDetector *signalDetector, const rclcpp::NodeOptions &nodeOptions=rclcpp::NodeOptions()) | |
| virtual | ~ISmaccStateMachine () |
| ISmaccStateMachine (const ISmaccStateMachine &)=delete | |
| ISmaccStateMachine & | operator= (const ISmaccStateMachine &)=delete |
| ISmaccStateMachine (ISmaccStateMachine &&)=delete | |
| ISmaccStateMachine & | operator= (ISmaccStateMachine &&)=delete |
| virtual void | reset () |
| virtual void | stop () |
| virtual void | eStop () |
| void | joinAsyncClientBehaviorThreads () |
| template<typename TOrthogonal > | |
| TOrthogonal * | getOrthogonal () |
| template<typename TOrthogonal , typename TClientBehavior > | |
| TClientBehavior * | getClientBehavior (int index=0) |
| const std::map< std::string, std::shared_ptr< smacc2::ISmaccOrthogonal > > & | getOrthogonals () const |
| template<typename SmaccComponentType > | |
| void | requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType, ISmaccOrthogonal *first=nullptr) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (const std::string &name, SmaccComponentType *&storage, ComponentRequirement requirementType, ISmaccOrthogonal *first=nullptr) |
| template<typename EventType > | |
| void | postEvent (EventType *ev, EventLifeTime evlifetime=EventLifeTime::ABSOLUTE) |
| template<typename EventType > | |
| void | postEvent (const boost::intrusive_ptr< EventType > &evHolder, EventLifeTime evlifetime=EventLifeTime::ABSOLUTE) |
| template<typename EventType > | |
| void | postEvent (EventLifeTime evlifetime=EventLifeTime::ABSOLUTE) |
| template<typename T > | |
| bool | getGlobalSMData (const std::string &name, T &ret) |
| template<typename T > | |
| void | setGlobalSMData (const std::string &name, T value) |
| std::string | getStateMachineName () |
| void | state_machine_visualization () |
| std::shared_ptr< SmaccStateInfo > | getCurrentStateInfo () |
| void | publishTransition (const SmaccTransitionInfo &transitionInfo) |
| virtual void | onInitialize () |
| this function should be implemented by the user to create the orthogonals | |
| virtual void | onUnhandledStInitializationFailure (const std::string &stateName, const std::string &what) |
| void | getTransitionLogHistory (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< smacc2_msgs::srv::SmaccGetTransitionHistory::Request > req, std::shared_ptr< smacc2_msgs::srv::SmaccGetTransitionHistory::Response > res) |
| template<typename TSmaccSignal , typename TMemberFunctionPrototype , typename TSmaccObjectType > | |
| smacc2::SmaccSignalConnection | createSignalConnection (TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object) |
| void | disconnectSmaccSignalObject (void *object_ptr) |
| template<typename T > | |
| std::enable_if_t< std::is_polymorphic< T >::value > | disconnectSmaccSignalObject (T *object) |
| template<typename StateType > | |
| void | notifyOnStateEntryStart (StateType *state) |
| template<typename StateType > | |
| void | notifyOnStateEntryEnd (StateType *state) |
| template<typename StateType > | |
| void | notifyOnRuntimeConfigured (StateType *state) |
| template<typename StateType > | |
| void | notifyOnStateExiting (StateType *state) |
| template<typename StateType > | |
| void | notifyOnStateExited (StateType *state) |
| template<typename StateType > | |
| void | notifyOnRuntimeConfigurationFinished (StateType *state) |
| int64_t | getCurrentStateCounter () const |
| ISmaccState * | getCurrentState () const |
| const SmaccStateMachineInfo & | getStateMachineInfo () |
| template<typename InitialStateType > | |
| void | buildStateMachineInfo () |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () |
| std::recursive_mutex & | getMutex () |
Protected Member Functions | |
| void | checkStateMachineConsistence () |
| void | initializeROS (const std::string &shortname) |
| void | onInitialized () |
| template<typename TOrthogonal > | |
| void | createOrthogonal () |
Protected Attributes | |
| rclcpp::Node::SharedPtr | nh_ |
| rclcpp::TimerBase::SharedPtr | timer_ |
| rclcpp::Publisher< smacc2_msgs::msg::SmaccStateMachine >::SharedPtr | stateMachinePub_ |
| rclcpp::Publisher< smacc2_msgs::msg::SmaccStatus >::SharedPtr | stateMachineStatusPub_ |
| rclcpp::Publisher< smacc2_msgs::msg::SmaccTransitionLogEntry >::SharedPtr | transitionLogPub_ |
| rclcpp::Publisher< smacc2_msgs::msg::SmaccEvent >::SharedPtr | eventsLogPub_ |
| rclcpp::Service< smacc2_msgs::srv::SmaccGetTransitionHistory >::SharedPtr | transitionHistoryService_ |
| std::vector< ISmaccState * > | currentState_ |
| std::shared_ptr< SmaccStateInfo > | currentStateInfo_ |
| smacc2_msgs::msg::SmaccStatus | status_msg_ |
| std::map< std::string, std::shared_ptr< smacc2::ISmaccOrthogonal > > | orthogonals_ |
| std::shared_ptr< SmaccStateMachineInfo > | stateMachineInfo_ |
Private Member Functions | |
| void | lockStateMachine (const std::string &msg) |
| void | unlockStateMachine (const std::string &msg) |
| template<typename EventType > | |
| void | propagateEventToStateReactors (ISmaccState *st, EventType *ev) |
| void | updateStatusMessage () |
Private Attributes | |
| std::recursive_mutex | m_mutex_ |
| std::recursive_mutex | eventQueueMutex_ |
| std::atomic< StateMachineInternalAction > | stateMachineCurrentAction |
| std::map< void *, std::shared_ptr< CallbackCounterSemaphore > > | stateCallbackConnections |
| std::map< std::string, std::pair< std::function< std::string()>, boost::any > > | globalData_ |
| std::deque< smacc2_msgs::msg::SmaccTransitionLogEntry > | transitionLogHistory_ |
| std::mutex | transitionLogMutex_ |
| size_t | transitionLogHistorySize_ = 1000 |
| smacc2::SMRunMode | runMode_ |
| SignalDetector * | signalDetector_ |
| int64_t | stateSeqCounter_ = 0 |
Static Private Attributes | |
| static thread_local int | reactorWalkDepth_ = 0 |
Friends | |
| class | ISmaccState |
| class | SignalDetector |
Definition at line 67 of file smacc_state_machine.hpp.
| smacc2::ISmaccStateMachine::ISmaccStateMachine | ( | std::string | stateMachineName, |
| SignalDetector * | signalDetector, | ||
| const rclcpp::NodeOptions & | nodeOptions = rclcpp::NodeOptions() ) |
Definition at line 38 of file smacc_state_machine.cpp.
References smacc2::DEBUG, smacc2::SignalDetector::initialize(), nh_, smacc2::RELEASE, runMode_, and signalDetector_.

|
virtual |
Definition at line 71 of file smacc_state_machine.cpp.
References smacc2::introspection::globalNh_, and nh_.
|
delete |
|
delete |
| void smacc2::ISmaccStateMachine::buildStateMachineInfo | ( | ) |
Definition at line 844 of file smacc_state_machine_impl.hpp.
References checkStateMachineConsistence(), getNode(), and stateMachineInfo_.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl().


|
protected |
Definition at line 287 of file smacc_state_machine.cpp.
Referenced by buildStateMachineInfo().

|
protected |
Definition at line 86 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangledTypeName(), getLogger(), m_mutex_, and orthogonals_.

| smacc2::SmaccSignalConnection smacc2::ISmaccStateMachine::createSignalConnection | ( | TSmaccSignal & | signal, |
| TMemberFunctionPrototype | callback, | ||
| TSmaccObjectType * | object ) |
Definition at line 463 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangledTypeName(), smacc2::introspection::demangleSymbol(), getLogger(), m_mutex_, and stateCallbackConnections.
Referenced by smacc2::ISmaccClient::connectSignal(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_core_components::CpActionClient< ActionType >::onAborted(), cl_gcalcli::CpCalendarPoller::onAgendaUpdated(), cl_isaac_apriltag::CpAprilTagTracker::onAprilTagDetected(), cl_keyboard::components::CpKeyboardListener1::OnArrowPress(), cl_gcalcli::CpGcalcliConnection::onAuthenticationRequired(), cl_nav2z::CpBondListener::onBondMessage(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), smacc2::client_core_components::CpActionClient< ActionType >::onCancelled(), smacc2::client_core_components::CpSubprocessExecutor::onCommandCompleted(), smacc2::client_core_components::CpSubprocessExecutor::onCommandFailed(), cl_modbus_tcp_relay::CpModbusConnection::onConnectionError(), cl_gcalcli::CpGcalcliConnection::onConnectionLost(), cl_modbus_tcp_relay::CpModbusConnection::onConnectionLost(), cl_gcalcli::CpGcalcliConnection::onConnectionRestored(), cl_modbus_tcp_relay::CpModbusConnection::onConnectionRestored(), cl_gcalcli::CpCalendarEventListener::onEventDetected(), cl_gcalcli::CpCalendarEventListener::onEventEnded(), cl_gcalcli::CpCalendarEventListener::onEventStarted(), smacc2::client_core_components::CpServiceClient< ServiceType >::onFailure(), smacc2::SmaccAsyncClientBehavior::onFailure(), smacc2::client_core_components::CpActionClient< ActionType >::onFeedback(), smacc2::SmaccAsyncClientBehavior::onFinished(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onFirstMessageReceived(), cl_keyboard::components::CpKeyboardListener1::OnKeyPress(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived(), smacc2::client_core_components::CpTopicSubscriber< MessageType >::onMessageReceived(), cl_generic_sensor::components::CpMessageTimeout< MessageType >::onMessageTimeout(), cl_moveit2z::CpMoveGroupInterface::onMotionExecutionFailed(), cl_moveit2z::CpMoveGroupInterface::onMotionExecutionSucceeded(), cl_nav2z::components::CpNav2ActionInterface::onNavigationAborted(), cl_nav2z::components::CpNav2ActionInterface::onNavigationCancelled(), cl_nav2z::components::CpNav2ActionInterface::onNavigationFeedback(), cl_nav2z::components::CpNav2ActionInterface::onNavigationSucceeded(), cl_px4_mr::CpForwardObstacleGuard::onObstacleCleared(), cl_px4_mr::CpForwardObstacleGuard::onObstacleTooClose(), cl_modbus_tcp_relay::CpModbusRelay::onReadComplete(), smacc2::client_core_components::CpServiceClient< ServiceType >::onRequestSent(), smacc2::client_core_components::CpServiceClient< ServiceType >::onResponse(), smacc2::client_bases::SmaccServiceServerClient< TService >::onServiceRequestReceived(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), smacc2::client_core_components::CpActionClient< ActionType >::onSucceeded(), smacc2::SmaccAsyncClientBehavior::onSuccess(), cl_ros2_timer::CbTimerCountdownLoop::onTimerTick(), cl_ros2_timer::CbTimerCountdownOnce::onTimerTick(), smacc2::client_core_components::CpRos2Timer::onTimerTick(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionActivate(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionActiveShutdown(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionCleanup(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionConfigure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionCreate(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionDeactivate(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionDestroy(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionInactiveShutdown(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActivateError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActivateFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActivateSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActiveShutdownError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActiveShutdownFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnActiveShutdownSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnCleanupError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnCleanupFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnCleanupSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnConfigureError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnConfigureFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnConfigureSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnDeactivateError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnDeactivateFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnDeactivateSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnErrorError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnErrorFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnErrorSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnShutdownError(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnShutdownFailure(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionOnShutdownSuccess(), cl_lifecycle_node::CpLifecycleEventMonitor::onTransitionUnconfiguredShutdown(), cl_modbus_tcp_relay::CpModbusRelay::onWriteFailure(), cl_modbus_tcp_relay::CpModbusRelay::onWriteSuccess(), cl_http::CbHttpRequestBase::runtimeConfigure(), smacc2::client_behaviors::CbWaitTopicMessage< TMessage >::runtimeConfigure(), cl_px4_mr::CbArmPX4::wireCompletionSignals(), cl_px4_mr::CbChangeAltitude::wireCompletionSignals(), cl_px4_mr::CbDisarmPX4::wireCompletionSignals(), cl_px4_mr::CbFollowWaypoints::wireCompletionSignals(), cl_px4_mr::CbGoToLocation::wireCompletionSignals(), cl_px4_mr::CbLand::wireCompletionSignals(), cl_px4_mr::CbReturnToHome::wireCompletionSignals(), cl_px4_mr::CbTakeOff::wireCompletionSignals(), and cl_rgb::CbWaitForFrame::wireCompletionSignals().


|
inline |
Definition at line 176 of file smacc_state_machine.hpp.
References disconnectSmaccSignalObject().

| void smacc2::ISmaccStateMachine::disconnectSmaccSignalObject | ( | void * | object_ptr | ) |
Definition at line 83 of file smacc_state_machine.cpp.
References nh_, and stateCallbackConnections.
Referenced by disconnectSmaccSignalObject(), notifyOnStateExited(), and smacc2::ISmaccOrthogonal::onDispose().

|
virtual |
Reimplemented in smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >.
Definition at line 105 of file smacc_state_machine.cpp.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::eStop().

|
inline |
Definition at line 101 of file smacc_state_machine.hpp.
References getClientBehavior(), and getOrthogonal().
Referenced by smacc2::ISmaccState::getClientBehavior(), and getClientBehavior().


|
inline |
Definition at line 854 of file smacc_state_machine_impl.hpp.
References currentState_.
Referenced by smacc2::ISmaccClientBehavior::getTraceStateName(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().

|
inline |
Definition at line 852 of file smacc_state_machine_impl.hpp.
References stateSeqCounter_.
|
inline |
Definition at line 148 of file smacc_state_machine.hpp.
References currentStateInfo_.
| bool smacc2::ISmaccStateMachine::getGlobalSMData | ( | const std::string & | name, |
| T & | ret ) |
Definition at line 297 of file smacc_state_machine_impl.hpp.
References getLogger(), globalData_, and m_mutex_.
Referenced by smacc2::ISmaccOrthogonal::getGlobalSMData(), and smacc2::ISmaccState::getGlobalSMData().


|
inline |
Definition at line 210 of file smacc_state_machine.hpp.
References nh_.
Referenced by createOrthogonal(), createSignalConnection(), getGlobalSMData(), getOrthogonal(), smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl(), notifyOnStateEntryEnd(), notifyOnStateEntryStart(), notifyOnStateExited(), notifyOnStateExiting(), onUnhandledStInitializationFailure(), postEvent(), postEvent(), propagateEventToStateReactors(), requiresComponent(), and requiresComponent().

|
inline |
| rclcpp::Node::SharedPtr smacc2::ISmaccStateMachine::getNode | ( | ) |
Definition at line 99 of file smacc_state_machine.cpp.
References nh_.
Referenced by buildStateMachineInfo(), smacc2::ISmaccClient::getNode(), smacc2::ISmaccClientBehavior::getNode(), smacc2::ISmaccOrthogonal::getNode(), smacc2::SignalDetector::getNode(), smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl(), smacc2::SignalDetector::pollOnce(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().

| TOrthogonal * smacc2::ISmaccStateMachine::getOrthogonal | ( | ) |
Definition at line 48 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangledTypeName(), getLogger(), m_mutex_, and orthogonals_.
Referenced by getClientBehavior(), and smacc2::ISmaccState::getOrthogonal().


| const std::map< std::string, std::shared_ptr< smacc2::ISmaccOrthogonal > > & smacc2::ISmaccStateMachine::getOrthogonals | ( | ) | const |
Definition at line 128 of file smacc_state_machine.cpp.
References orthogonals_.
Referenced by smacc2::introspection::SmaccStateMachineInfo::assembleSMStructureMessage(), smacc2::SignalDetector::findUpdatableClientsAndComponents(), smacc2::SignalDetector::findUpdatableStateElements(), and smacc2::ISmaccState::requiresClient().

|
inline |
Definition at line 856 of file smacc_state_machine_impl.hpp.
References stateMachineInfo_.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateInfo().

| std::string smacc2::ISmaccStateMachine::getStateMachineName | ( | ) |
Definition at line 282 of file smacc_state_machine.cpp.
References smacc2::introspection::demangleSymbol().

| void smacc2::ISmaccStateMachine::getTransitionLogHistory | ( | const std::shared_ptr< rmw_request_id_t > | request_header, |
| const std::shared_ptr< smacc2_msgs::srv::SmaccGetTransitionHistory::Request > | req, | ||
| std::shared_ptr< smacc2_msgs::srv::SmaccGetTransitionHistory::Response > | res ) |
Definition at line 242 of file smacc_state_machine.cpp.
References nh_, transitionLogHistory_, and transitionLogMutex_.
Referenced by initializeROS().

|
protected |
Definition at line 208 of file smacc_state_machine.cpp.
References eventsLogPub_, getTransitionLogHistory(), nh_, smacc2::SignalDetector::notifyRosInitialized(), signalDetector_, stateMachinePub_, stateMachineStatusPub_, transitionHistoryService_, transitionLogHistorySize_, and transitionLogPub_.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl().


| void smacc2::ISmaccStateMachine::joinAsyncClientBehaviorThreads | ( | ) |
Definition at line 107 of file smacc_state_machine.cpp.
References orthogonals_.
Referenced by smacc2::SignalDetector::joinAsyncClientBehaviorThreads().

|
private |
Definition at line 270 of file smacc_state_machine.cpp.
Referenced by notifyOnStateExited().

| void smacc2::ISmaccStateMachine::notifyOnRuntimeConfigurationFinished | ( | StateType * | state | ) |
Definition at line 631 of file smacc_state_machine_impl.hpp.
References currentState_, m_mutex_, smacc2::SignalDetector::notifyStateConfigured(), orthogonals_, signalDetector_, smacc2::STATE_ENTERING, stateMachineCurrentAction, and updateStatusMessage().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().


| void smacc2::ISmaccStateMachine::notifyOnRuntimeConfigured | ( | StateType * | state | ) |
Definition at line 652 of file smacc_state_machine_impl.hpp.
References smacc2::STATE_CONFIGURING, and stateMachineCurrentAction.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().

| void smacc2::ISmaccStateMachine::notifyOnStateEntryEnd | ( | StateType * | state | ) |
Definition at line 555 of file smacc_state_machine_impl.hpp.
References currentState_, smacc2::introspection::demangleSymbol(), getLogger(), m_mutex_, smacc2::SignalDetector::notifyStateInitializationFailed(), orthogonals_, signalDetector_, smacc2::STATE_RUNNING, stateMachineCurrentAction, and updateStatusMessage().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().


| void smacc2::ISmaccStateMachine::notifyOnStateEntryStart | ( | StateType * | state | ) |
Definition at line 539 of file smacc_state_machine_impl.hpp.
References currentState_, currentStateInfo_, smacc2::introspection::demangleSymbol(), getLogger(), m_mutex_, orthogonals_, stateMachineInfo_, and stateSeqCounter_.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().


| void smacc2::ISmaccStateMachine::notifyOnStateExited | ( | StateType * | state | ) |
Definition at line 721 of file smacc_state_machine_impl.hpp.
References currentState_, smacc2::introspection::demangleSymbol(), disconnectSmaccSignalObject(), getLogger(), lockStateMachine(), smacc2::SignalDetector::notifyStateExited(), orthogonals_, signalDetector_, stateMachineCurrentAction, smacc2::TRANSITIONING, and unlockStateMachine().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit().


| void smacc2::ISmaccStateMachine::notifyOnStateExiting | ( | StateType * | state | ) |
Definition at line 658 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangleSymbol(), getLogger(), orthogonals_, smacc2::STATE_EXITING, and stateMachineCurrentAction.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit().


|
virtual |
this function should be implemented by the user to create the orthogonals
Definition at line 188 of file smacc_state_machine.cpp.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl().

|
protected |
Definition at line 201 of file smacc_state_machine.cpp.
References nh_, state_machine_visualization(), and timer_.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl().


|
virtual |
Definition at line 190 of file smacc_state_machine.cpp.
References getLogger().
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::unconsumed_event().


|
delete |
|
delete |
| void smacc2::ISmaccStateMachine::postEvent | ( | const boost::intrusive_ptr< EventType > & | evHolder, |
| EventLifeTime | evlifetime = EventLifeTime::ABSOLUTE ) |
Definition at line 210 of file smacc_state_machine_impl.hpp.
References smacc2::CURRENT_STATE, currentState_, smacc2::introspection::EventLabel(), eventQueueMutex_, eventsLogPub_, eventtypename, getLogger(), smacc2::introspection::TypeInfo::getTypeInfoFromType(), smacc2::SignalDetector::postEvent(), propagateEventToStateReactors(), smacc2::SignalDetector::queueWorkItem(), reactorWalkDepth_, signalDetector_, smacc2_event, smacc2::STATE_EXITING, stateMachineCurrentAction, and smacc2::TRANSITIONING.

| void smacc2::ISmaccStateMachine::postEvent | ( | EventLifeTime | evlifetime = EventLifeTime::ABSOLUTE | ) |
Definition at line 289 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangleSymbol(), getLogger(), smacc2::makeEvent(), and postEvent().

| void smacc2::ISmaccStateMachine::postEvent | ( | EventType * | ev, |
| EventLifeTime | evlifetime = EventLifeTime::ABSOLUTE ) |
Definition at line 203 of file smacc_state_machine_impl.hpp.
References postEvent().
Referenced by smacc2::ISmaccClient::postEvent(), smacc2::ISmaccClient::postEvent(), smacc2::ISmaccClientBehavior::postEvent(), smacc2::ISmaccComponent::postEvent(), smacc2::ISmaccComponent::postEvent(), smacc2::ISmaccState::postEvent(), smacc2::ISmaccState::postEvent(), postEvent(), postEvent(), smacc2::postStInitializationFailure(), and smacc2::StateReactor::setOutputEvent().


|
private |
Definition at line 809 of file smacc_state_machine_impl.hpp.
References smacc2::introspection::demangleSymbol(), smacc2::introspection::demangleType(), smacc2::ISmaccState::getClassName(), getLogger(), smacc2::ISmaccState::getParentState(), smacc2::ISmaccState::getStateReactors(), and propagateEventToStateReactors().
Referenced by postEvent(), and propagateEventToStateReactors().


| void smacc2::ISmaccStateMachine::publishTransition | ( | const SmaccTransitionInfo & | transitionInfo | ) |
Definition at line 170 of file smacc_state_machine.cpp.
References nh_, smacc2::introspection::transitionInfoToMsg(), transitionLogHistory_, transitionLogHistorySize_, transitionLogMutex_, and transitionLogPub_.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl(), and smacc2::ISmaccState::notifyTransitionFromTransitionTypeInfo().


| void smacc2::ISmaccStateMachine::requiresComponent | ( | const std::string & | name, |
| SmaccComponentType *& | storage, | ||
| ComponentRequirement | requirementType, | ||
| ISmaccOrthogonal * | first = nullptr ) |
Definition at line 160 of file smacc_state_machine_impl.hpp.
References smacc2::ISmaccOrthogonal::clients_, smacc2::introspection::demangleSymbol(), getLogger(), smacc2::HARD, m_mutex_, and orthogonals_.

| void smacc2::ISmaccStateMachine::requiresComponent | ( | SmaccComponentType *& | storage, |
| ComponentRequirement | requirementType, | ||
| ISmaccOrthogonal * | first = nullptr ) |
Definition at line 118 of file smacc_state_machine_impl.hpp.
References smacc2::ISmaccOrthogonal::clients_, smacc2::introspection::demangleSymbol(), getLogger(), smacc2::HARD, m_mutex_, and orthogonals_.
Referenced by smacc2::ISmaccClientBehavior::requiresComponent(), smacc2::ISmaccClientBehavior::requiresComponent(), smacc2::ISmaccOrthogonal::requiresComponent(), smacc2::ISmaccState::requiresComponent(), and smacc2::ISmaccState::requiresComponent().


|
virtual |
Reimplemented in smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >.
Definition at line 101 of file smacc_state_machine.cpp.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::reset().

| void smacc2::ISmaccStateMachine::setGlobalSMData | ( | const std::string & | name, |
| T | value ) |
Definition at line 332 of file smacc_state_machine_impl.hpp.
References globalData_, m_mutex_, and updateStatusMessage().
Referenced by smacc2::ISmaccOrthogonal::setGlobalSMData(), and smacc2::ISmaccState::setGlobalSMData().


| void smacc2::ISmaccStateMachine::state_machine_visualization | ( | ) |
Definition at line 254 of file smacc_state_machine.cpp.
References m_mutex_, nh_, stateMachineInfo_, stateMachinePub_, stateMachineStatusPub_, and status_msg_.
Referenced by onInitialized().

|
virtual |
Reimplemented in smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >.
Definition at line 103 of file smacc_state_machine.cpp.
Referenced by smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::stop().

|
private |
Definition at line 276 of file smacc_state_machine.cpp.
Referenced by notifyOnStateExited().

|
private |
Definition at line 133 of file smacc_state_machine.cpp.
References currentStateInfo_, smacc2::DEBUG, globalData_, m_mutex_, nh_, runMode_, stateMachineStatusPub_, and status_msg_.
Referenced by notifyOnRuntimeConfigurationFinished(), notifyOnStateEntryEnd(), and setGlobalSMData().

|
friend |
Definition at line 292 of file smacc_state_machine.hpp.
|
friend |
Definition at line 293 of file smacc_state_machine.hpp.
|
protected |
Definition at line 238 of file smacc_state_machine.hpp.
Referenced by getCurrentState(), notifyOnRuntimeConfigurationFinished(), notifyOnStateEntryEnd(), notifyOnStateEntryStart(), notifyOnStateExited(), and postEvent().
|
protected |
Definition at line 240 of file smacc_state_machine.hpp.
Referenced by getCurrentStateInfo(), notifyOnStateEntryStart(), and updateStatusMessage().
|
private |
Definition at line 252 of file smacc_state_machine.hpp.
Referenced by postEvent().
|
protected |
Definition at line 232 of file smacc_state_machine.hpp.
Referenced by initializeROS(), and postEvent().
|
private |
Definition at line 264 of file smacc_state_machine.hpp.
Referenced by getGlobalSMData(), setGlobalSMData(), and updateStatusMessage().
|
private |
Definition at line 251 of file smacc_state_machine.hpp.
Referenced by createOrthogonal(), createSignalConnection(), getGlobalSMData(), getMutex(), getOrthogonal(), lockStateMachine(), notifyOnRuntimeConfigurationFinished(), notifyOnStateEntryEnd(), notifyOnStateEntryStart(), smacc2::SignalDetector::pollOnce(), requiresComponent(), requiresComponent(), setGlobalSMData(), state_machine_visualization(), unlockStateMachine(), and updateStatusMessage().
|
protected |
Definition at line 225 of file smacc_state_machine.hpp.
Referenced by disconnectSmaccSignalObject(), getLogger(), getNode(), getTransitionLogHistory(), initializeROS(), ISmaccStateMachine(), lockStateMachine(), onInitialized(), publishTransition(), state_machine_visualization(), unlockStateMachine(), updateStatusMessage(), and ~ISmaccStateMachine().
|
protected |
Definition at line 245 of file smacc_state_machine.hpp.
Referenced by createOrthogonal(), getOrthogonal(), getOrthogonals(), joinAsyncClientBehaviorThreads(), notifyOnRuntimeConfigurationFinished(), notifyOnStateEntryEnd(), notifyOnStateEntryStart(), notifyOnStateExited(), notifyOnStateExiting(), requiresComponent(), and requiresComponent().
|
staticprivate |
Definition at line 288 of file smacc_state_machine.hpp.
Referenced by postEvent().
|
private |
Definition at line 273 of file smacc_state_machine.hpp.
Referenced by ISmaccStateMachine(), and updateStatusMessage().
|
private |
Definition at line 276 of file smacc_state_machine.hpp.
Referenced by initializeROS(), ISmaccStateMachine(), notifyOnRuntimeConfigurationFinished(), notifyOnStateEntryEnd(), notifyOnStateExited(), and postEvent().
|
private |
Definition at line 261 of file smacc_state_machine.hpp.
Referenced by createSignalConnection(), and disconnectSmaccSignalObject().
|
private |
Definition at line 258 of file smacc_state_machine.hpp.
Referenced by notifyOnRuntimeConfigurationFinished(), notifyOnRuntimeConfigured(), notifyOnStateEntryEnd(), notifyOnStateExited(), notifyOnStateExiting(), smacc2::SignalDetector::pollOnce(), and postEvent().
|
protected |
Definition at line 248 of file smacc_state_machine.hpp.
Referenced by buildStateMachineInfo(), getStateMachineInfo(), smacc2::SmaccStateMachineBase< DerivedStateMachine, InitialStateType >::initiate_impl(), notifyOnStateEntryStart(), and state_machine_visualization().
|
protected |
Definition at line 228 of file smacc_state_machine.hpp.
Referenced by initializeROS(), and state_machine_visualization().
|
protected |
Definition at line 229 of file smacc_state_machine.hpp.
Referenced by initializeROS(), state_machine_visualization(), and updateStatusMessage().
|
private |
Definition at line 278 of file smacc_state_machine.hpp.
Referenced by getCurrentStateCounter(), and notifyOnStateEntryStart().
|
protected |
Definition at line 242 of file smacc_state_machine.hpp.
Referenced by state_machine_visualization(), and updateStatusMessage().
|
protected |
Definition at line 227 of file smacc_state_machine.hpp.
Referenced by onInitialized().
|
protected |
Definition at line 234 of file smacc_state_machine.hpp.
Referenced by initializeROS().
|
private |
Definition at line 269 of file smacc_state_machine.hpp.
Referenced by getTransitionLogHistory(), and publishTransition().
|
private |
Definition at line 271 of file smacc_state_machine.hpp.
Referenced by initializeROS(), and publishTransition().
|
private |
Definition at line 270 of file smacc_state_machine.hpp.
Referenced by getTransitionLogHistory(), and publishTransition().
|
protected |
Definition at line 230 of file smacc_state_machine.hpp.
Referenced by initializeROS(), and publishTransition().