.. _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/corlab.css"; node [fontsize=11] node [fontname="Arial"] edge [fontsize=11] edge [fontname="Arial"] "1" [label=<
TaskState
Originorigin
Statestate
UINT32serial
OCTET-VECTORwire_schema
OCTET-VECTORpayload
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
State
INITIATED0
ACCEPTED1
REJECTED2
UPDATE3
UPDATE_REJECTED4
ABORT5
ABORTED6
ABORT_FAILED7
RESULT_AVAILABLE8
COMPLETED9
FAILED10
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
Origin
SUBMITTER0
HANDLER1
>,shape=box,style=filled,fillcolor="white"]; "1" -> "2" [dir=both,arrowtail=odiamond]; "1" -> "3" [dir=both,arrowtail=odiamond]; "1":state -> "3" []; "1":origin -> "2" []; .. container:: mess4ge-list .. container:: messages * :ref:`TaskState ` .. container:: clearer clearer: should be made invisible via css .. _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 .. py:attribute:: origin :type: :py:class:`rst.communicationpatterns.TaskState.Origin` Describes the origin of the update. Has to be :py:attr:`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 :py:attr:`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.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 17-179 :language: protobuf :emphasize-lines: 131-131,139-139,144-144,156-156,161-161 .. _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 `: * :py:attr:`INITIATED ` * :py:attr:`ACCEPTED ` * :py:attr:`REJECTED ` Updated of an accepted task: Applicable in states: :py:attr:`ACCEPTED ` Possible values of :py:attr:`state `: * :py:attr:`UPDATE ` * :py:attr:`UPDATE_REJECTED ` Aborting an accepted task: Applicable in states: :py:attr:`ACCEPTED ` Possible values of :py:attr:`state `: * :py:attr:`ABORT ` * :py:attr:`ABORTED ` * :py:attr:`ABORT_FAILED ` Final states: * :py:attr:`RESULT_AVAILABLE ` * :py:attr:`COMPLETED ` * :py:attr:`FAILED ` .. py:attribute:: INITIATED = 0 Client submits specification with :py:attr:`INITIATED ` state. Server accepts or rejects task and publishes specification with :py:attr:`ACCEPTED ` or :py:attr:`REJECTED ` state accordingly. .. py:attribute:: ACCEPTED = 1 See :py:attr:`INITIATED `. .. py:attribute:: REJECTED = 2 See :py:attr:`INITIATED `. .. py:attribute:: UPDATE = 3 Client publishes (modified) specification with :py:attr:`UPDATE ` state. Server accepts or rejects the update and publishes specification with :py:attr:`ACCEPTED ` or :py:attr:`UPDATE_REJECTED ` state accordingly. .. py:attribute:: UPDATE_REJECTED = 4 See :py:attr:`UPDATE `. .. py:attribute:: ABORT = 5 .. todo:: document .. py:attribute:: ABORTED = 6 See :py:attr:`ABORT `. .. py:attribute:: ABORT_FAILED = 7 See :py:attr:`ABORT `. .. py:attribute:: RESULT_AVAILABLE = 8 .. todo:: document .. py:attribute:: COMPLETED = 9 See :py:attr:`RESULT_AVAILABLE `. .. py:attribute:: FAILED = 10 See :py:attr:`RESULT_AVAILABLE `. .. container:: message-rst-communicationpatterns-taskstate-state-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 59-123 :language: protobuf :emphasize-lines: 9-9,14-14,19-19,29-29,34-34,39-39,44-44,49-49,54-54,59-59,64-64 .. _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.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/communicationpatterns/TaskState.proto :lines: 128-139 :language: protobuf :emphasize-lines: 6-6,11-11