.. _demos-section-label:

Demos
=====

.. _py-trees-demo-action-behaviour-program:

py-trees-demo-action-behaviour
------------------------------

.. automodule:: py_trees.demos.action
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo a complex action style behaviour

.. literalinclude:: ../py_trees/demos/action.py
   :language: python
   :linenos:
   :caption: py_trees/demos/action.py

.. _py-trees-demo-behaviour-lifecycle-program:

py-trees-demo-behaviour-lifecycle
---------------------------------

.. automodule:: py_trees.demos.lifecycle
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo the lifecycle of a behaviour

.. literalinclude:: ../py_trees/demos/lifecycle.py
   :language: python
   :linenos:
   :caption: py_trees/demos/lifecycle.py

.. _py-trees-demo-blackboard-program:

py-trees-demo-blackboard
------------------------

.. automodule:: py_trees.demos.blackboard
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo blackboard set/get and related behaviours

.. literalinclude:: ../py_trees/demos/blackboard.py
   :language: python
   :linenos:
   :caption: py_trees/demos/blackboard.py

.. _py-trees-demo-context-switching-program:

py-trees-demo-context-switching
-------------------------------

.. automodule:: py_trees.demos.context_switching
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo context switching use case with parallels

.. literalinclude:: ../py_trees/demos/context_switching.py
   :language: python
   :linenos:
   :caption: py_trees/demos/contex_switching.py

.. _py-trees-demo-dot-graphs-program:

py-trees-demo-dot-graphs
------------------------

.. automodule:: py_trees.demos.dot_graphs
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo dot graphs with varying visibility levels

.. literalinclude:: ../py_trees/demos/dot_graphs.py
   :language: python
   :linenos:
   :caption: py_trees/demos/dot_graphs.py

.. _py-trees-demo-logging-program:

py-trees-demo-logging
---------------------

.. automodule:: py_trees.demos.logging
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo tree logging to json files

.. literalinclude:: ../py_trees/demos/logging.py
   :language: python
   :linenos:
   :caption: py_trees/demos/logging.py

.. _py-trees-demo-selector-program:

py-trees-demo-selector
----------------------

.. automodule:: py_trees.demos.selector
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo priority switching in selectors

.. literalinclude:: ../py_trees/demos/selector.py
   :language: python
   :linenos:
   :caption: py_trees/demos/selector.py

.. _py-trees-demo-sequence-program:

py-trees-demo-sequence
----------------------

.. automodule:: py_trees.demos.sequence
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo sequences in action

.. literalinclude:: ../py_trees/demos/sequence.py
   :language: python
   :linenos:
   :caption: py_trees/demos/sequence.py

.. _py-trees-demo-tree-stewardship-program:

py-trees-demo-tree-stewardship
------------------------------

.. automodule:: py_trees.demos.stewardship
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo tree stewardship

.. literalinclude:: ../py_trees/demos/stewardship.py
   :language: python
   :linenos:
   :caption: py_trees/demos/stewardship.py

.. _py-trees-demo-pick-up-where-you-left-off-program:

py-trees-demo-pick-up-where-you-left-off
----------------------------------------

.. automodule:: py_trees.demos.pick_up_where_you_left_off
    :members:
    :special-members:
    :show-inheritance:
    :synopsis: demo the 'pickup where you left off' idiom

.. literalinclude:: ../py_trees/demos/pick_up_where_you_left_off.py
   :language: python
   :linenos:
   :caption: py_trees/demos/pick_up_where_you_left_off.py

