======================== State machine navigation ======================== .. currentmodule:: ansys.scadeone.core.swan State machine class ------------------- The :py:attr:`StateMachine.all_transitions` method returns all transitions in the state machine. +-----------------------------------------------+---------------------------------------------------------------+ | Property / method | Description | +===============================================+===============================================================+ | :py:attr:`StateMachine.states` | List of states in the state machine. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:attr:`StateMachine.initial_state` | Get the initial state of the state machine. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:attr:`StateMachine.default_state` | Get the default state of the state machine. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:meth:`StateMachine.get_state()` | Get a specific state by its name or lunum. | +-----------------------------------------------+---------------------------------------------------------------+ State class ----------- +-----------------------------------------------+---------------------------------------------------------------+ | Property / method | Description | +===============================================+===============================================================+ | :py:attr:`State.weak_transitions` | List of weak transitions from the state. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:attr:`State.strong_transitions` | List of strong transitions from the state. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:meth:`State.get_targets()` | Get all direct target states reachable from this state. | +-----------------------------------------------+---------------------------------------------------------------+ Transition class ---------------- +-----------------------------------------------+-------------------------------------------------------------------------------------------+ | Property / method | Description | +===============================================+===========================================================================================+ | :py:attr:`Transition.head` | Destination of the transition, which can be a :py:class:`State` or a :py:class:`Fork`. | +-----------------------------------------------+-------------------------------------------------------------------------------------------+ | :py:attr:`Transition.tail` | Source of the transition, which can be a :py:class:`State` or a :py:class:`Fork`. | +-----------------------------------------------+-------------------------------------------------------------------------------------------+ Fork class ---------- +-----------------------------------------------+---------------------------------------------------------------+ | Property / method | Description | +===============================================+===============================================================+ | :py:attr:`Fork.transitions` | List of out-going transitions from the fork. | +-----------------------------------------------+---------------------------------------------------------------+ | :py:attr:`Fork.from_transition` | Incoming transition to the fork. | +-----------------------------------------------+---------------------------------------------------------------+ Examples -------- Check the :ref:`state machine example ` for more details.