.. _package-rst-communicationpatterns: =================================== Package rst.communicationpatterns =================================== Data types related to communication at the integration level. One example is :py:class:`TaskState ` which is used in the task state pattern. .. seealso:: Corresponding data types in ROS http://www.ros.org/wiki/actionlib_msgs Messages ======== .. container:: mess4ge-multi .. container:: mess4ge-graph .. digraph:: message_graph fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "1" [label=<
TaskStateCollection
TaskStateelement
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
TaskState
Originorigin
Statestate
UINT32serial
OCTET-VECTORwire_schema
OCTET-VECTORpayload
>,shape=box,style=filled,fillcolor="white"]; "4" [label=<
State
INITIATED0
ACCEPTED1
REJECTED2
UPDATE3
UPDATE_REJECTED4
ABORT5
ABORTED6
ABORT_FAILED7
RESULT_AVAILABLE8
COMPLETED9
FAILED10
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
Origin
SUBMITTER0
HANDLER1
>,shape=box,style=filled,fillcolor="white"]; "1":element -> "2" []; "2" -> "3" []; "2" -> "4" []; "2":state -> "4" []; "2":origin -> "3" []; .. container:: mess4ge-list .. container:: messages * :ref:`TaskStateCollection ` * :ref:`TaskState ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-communicationpatterns-taskstatecollection: Message TaskStateCollection --------------------------- .. container:: message-rst-communicationpatterns-taskstatecollection-multi .. container:: message-rst-communicationpatterns-taskstatecollection-documentation .. py:class:: rst.communicationpatterns.TaskStateCollection Collection of :py:class:`TaskState ` instances. Auto-generated. .. py:attribute:: element :type: array of :py:class:`rst.communicationpatterns.TaskState` The individual elements of the collection. Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific. .. container:: message-rst-communicationpatterns-taskstatecollection-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/communicationpatterns/TaskStateCollection.proto :lines: 12-22 :language: protobuf :emphasize-lines: 9-9 .. _message-rst-communicationpatterns-taskstate: Message TaskState ----------------- .. container:: message-rst-communicationpatterns-taskstate-multi .. container:: message-rst-communicationpatterns-taskstate-documentation .. py:class:: rst.communicationpatterns.TaskState Represents the initiation or update of a potentially long-running task. The task is represented as a current state (:py:attr:`state ` field) and a datum or "specification" (represented by the :py:attr:`wire_schema ` and :py:attr:`payload ` fields). .. seealso:: A detailed description of the task state protocol http://opensource.cit-ec.de/projects/xtt/wiki/TaskStateProtocol .. codeauthor:: Jan Moringen @create_collection .. py:attribute:: origin :type: :py:class:`rst.communicationpatterns.TaskState.Origin` Describes the origin of the update. Has to be :ref:`SUBMITTER ` when the task is being initiated. .. py:attribute:: state :type: :py:class:`rst.communicationpatterns.TaskState.State` State to which the task should be updated. Has to be :ref:`INITIATED ` when the task is being initiated. .. py:attribute:: serial :type: :py:class:`UINT32` TODO .. py:attribute:: wire_schema :type: :py:class:`OCTET-VECTOR` Type of the payload blob. This field and the :py:attr:`payload ` field are intended to be processed by a (de)serialization mechanism that decodes/encodes the payload blob according to the type information in wireSchema. .. todo:: type should be ascii-string .. py:attribute:: payload :type: :py:class:`OCTET-VECTOR` See :py:attr:`wire_schema `. .. container:: message-rst-communicationpatterns-taskstate-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 20-186 :language: protobuf :emphasize-lines: 135-135,143-143,148-148,160-160,165-165 .. _message-rst-communicationpatterns-taskstate-state: Message State ------------- .. container:: message-rst-communicationpatterns-taskstate-state-multi .. container:: message-rst-communicationpatterns-taskstate-state-documentation .. py:class:: rst.communicationpatterns.TaskState.State Possible states of the task an update of which the :py:class:`TaskState ` object represents. Initial task submission: Applicable in states: none (since initial submission) Possible values of :py:attr:`state `: * :ref:`INITIATED ` * :ref:`ACCEPTED ` * :ref:`REJECTED ` Updated of an accepted task: Applicable in states: :ref:`ACCEPTED ` Possible values of :py:attr:`state `: * :ref:`UPDATE ` * :ref:`UPDATE_REJECTED ` Aborting an accepted task: Applicable in states: :ref:`ACCEPTED ` Possible values of :py:attr:`state `: * :ref:`ABORT ` * :ref:`ABORTED ` * :ref:`ABORT_FAILED ` Final states: * :ref:`RESULT_AVAILABLE ` * :ref:`COMPLETED ` * :ref:`FAILED ` .. py:attribute:: INITIATED = 0 Client submits specification with :ref:`INITIATED ` state. Server accepts or rejects task and publishes specification with :ref:`ACCEPTED ` or :ref:`REJECTED ` state accordingly. .. py:attribute:: ACCEPTED = 1 See :ref:`INITIATED `. .. py:attribute:: REJECTED = 2 See :ref:`INITIATED `. .. py:attribute:: UPDATE = 3 Client publishes (modified) specification with :ref:`UPDATE ` state. Server accepts or rejects the update and publishes specification with :ref:`ACCEPTED ` or :ref:`UPDATE_REJECTED ` state accordingly. .. py:attribute:: UPDATE_REJECTED = 4 See :ref:`UPDATE `. .. py:attribute:: ABORT = 5 Client publishes specification with :ref:`ABORT ` state to request execution of the task to be aborted. Server accept or rejects this and publishes specification with :ref:`ABORTED ` or :ref:`ABORT_FAILED ` state accordingly. .. py:attribute:: ABORTED = 6 See :ref:`ABORT `. .. py:attribute:: ABORT_FAILED = 7 See :ref:`ABORT `. .. py:attribute:: RESULT_AVAILABLE = 8 .. todo:: document .. py:attribute:: COMPLETED = 9 See :ref:`RESULT_AVAILABLE `. .. py:attribute:: FAILED = 10 See :ref:`RESULT_AVAILABLE `. .. container:: message-rst-communicationpatterns-taskstate-state-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 62-130 :language: protobuf :emphasize-lines: 9-9,14-14,19-19,29-29,34-34,43-43,48-48,53-53,58-58,63-63,68-68 .. _message-rst-communicationpatterns-taskstate-origin: Message Origin -------------- .. container:: message-rst-communicationpatterns-taskstate-origin-multi .. container:: message-rst-communicationpatterns-taskstate-origin-documentation .. py:class:: rst.communicationpatterns.TaskState.Origin Describes the role of the component doing the update. .. py:attribute:: SUBMITTER = 0 The task state update is performed by the submitter. .. py:attribute:: HANDLER = 1 The task state update is performed by the handler. .. container:: message-rst-communicationpatterns-taskstate-origin-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 135-146 :language: protobuf :emphasize-lines: 6-6,11-11