.. _package-rst-communicationpatterns: =================================== Package rst.communicationpatterns =================================== *Not documented* 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=<
ResourceAllocation
ASCII-STRINGid
Statestate
Prioritypriority
UINT32importance
Initiatorinitiator
Policypolicy
Intervalslot
Intervalconstraints
ASCII-STRINGresource_ids
ASCII-STRINGdescription
>,shape=box,style=filled,fillcolor="white"]; "6" [label=<
Interval
Timestampbegin
Timestampend
>,shape=box,style=filled,fillcolor="white"]; "7" [label=<
Timestamp
UINT64time
>,shape=box,style=filled,fillcolor="white"]; "5" [label=<
Policy
PRESERVE0
MAXIMUM10
FIRST20
>,shape=box,style=filled,fillcolor="white"]; "4" [label=<
Initiator
SYSTEM0
HUMAN10
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
Priority
NO0
LOW1
NORMAL2
HIGH3
URGENT4
EMERGENCY5
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
State
REQUESTED10
SCHEDULED20
REJECTED30
CANCELLED40
ALLOCATED50
ABORTED60
RELEASED70
>,shape=box,style=filled,fillcolor="white"]; "1" -> "5"[dir=both,arrowtail=odiamond]; "1" -> "4"[dir=both,arrowtail=odiamond]; "1" -> "3"[dir=both,arrowtail=odiamond]; "1" -> "2"[dir=both,arrowtail=odiamond]; "1":constraints -> "6"[]; "1":slot -> "6"[]; "1":policy -> "5"[]; "1":initiator -> "4"[]; "1":priority -> "3"[]; "1":state -> "2"[]; "6":end -> "7"[]; "6":begin -> "7"[]; .. container:: mess4ge-list .. container:: messages * :ref:`ResourceAllocation ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-communicationpatterns-resourceallocation: Message ResourceAllocation -------------------------- .. container:: message-rst-communicationpatterns-resourceallocation-multi .. container:: message-rst-communicationpatterns-resourceallocation-documentation .. py:class:: rst.communicationpatterns.ResourceAllocation Allocate resources for exclusive access with a certain priority and estimated duration. The type is meant to be exchanged between a scheduling component and its clients based on the current state in the allocations life cycle. Target resources can be specified by one or more string identifiers. In order to allow a scheduling component to arbitrate between allocations, also an initiator (human or system), a numerical importance value and a conflict resolution strategy have to be specified. Scheduling components are advised to evaluate information in the following order: i) Prefer a higher priority ii) Prefer a human initiator over a system initiator iii) Prefer a higher importance value .. codeauthor:: Patrick Holthaus .. py:attribute:: id :type: :py:class:`ASCII-STRING` Identifier of the current resource allocation attempt, i.e., not the resource itself. .. py:attribute:: state :type: :py:class:`rst.communicationpatterns.ResourceAllocation.State` Current state of resource allocation. .. py:attribute:: priority :type: :py:class:`rst.communicationpatterns.ResourceAllocation.Priority` Priority of resource allocation. .. py:attribute:: importance :type: :py:class:`UINT32` Importance of resource allocation. Higher importance values indicate that an allocation attempt should be preferred over attempts with lower importance if both have the same priority and initiator. If no importance value is specified, its value is assumed to be zero. .. py:attribute:: initiator :type: :py:class:`rst.communicationpatterns.ResourceAllocation.Initiator` Initiator of resource allocation. .. py:attribute:: policy :type: :py:class:`rst.communicationpatterns.ResourceAllocation.Policy` Conflict resolution policy. .. py:attribute:: slot :type: :py:class:`rst.timing.Interval` Expected starting point and end of resource allocation. .. py:attribute:: constraints :type: :py:class:`rst.timing.Interval` In case of conflicts, outer limits for shifting the interval can be specified using a constraint interval. .. py:attribute:: resource_ids :type: array of :py:class:`ASCII-STRING` Specifies the resources that are requested for allocation. The collection must contain at least one element. Elements can be specified in an arbitrary order. Given resources are treated in their entirety, i.e., if one element causes a conflict, the whole allocation is affected. .. py:attribute:: description :type: :py:class:`ASCII-STRING` A description of or reason for the resource allocation request. .. container:: message-rst-communicationpatterns-resourceallocation-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/sandbox/rst/communicationpatterns/ResourceAllocation.proto :lines: 30-246 :language: protobuf :emphasize-lines: 159-159,164-164,169-169,179-179,184-184,189-189,194-194,200-200,210-210,215-215 .. _message-rst-communicationpatterns-resourceallocation-state: Message State ------------- .. container:: message-rst-communicationpatterns-resourceallocation-state-multi .. container:: message-rst-communicationpatterns-resourceallocation-state-documentation .. py:class:: rst.communicationpatterns.ResourceAllocation.State Life cycle of a single allocation attempt. .. py:attribute:: REQUESTED = 10 Initial state: Resource requested for allocation in by a client component. .. py:attribute:: SCHEDULED = 20 Resource allocation scheduled by the server component when being requested. .. py:attribute:: REJECTED = 30 Resource allocation rejected by the server component when being requested, e.g. if the resource is busy. .. py:attribute:: CANCELLED = 40 Resource allocation cancelled while scheduled (before allocation) by either server or client. .. py:attribute:: ALLOCATED = 50 Resource is now allocated for the client at the server. .. py:attribute:: ABORTED = 60 Resource allocation aborted abnormally (during allocation) by either server or client. .. py:attribute:: RELEASED = 70 Resource released normally (after allocation) by either server or client. .. container:: message-rst-communicationpatterns-resourceallocation-state-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/sandbox/rst/communicationpatterns/ResourceAllocation.proto :lines: 35-78 :language: protobuf :emphasize-lines: 7-7,13-13,19-19,25-25,30-30,36-36,42-42 .. _message-rst-communicationpatterns-resourceallocation-priority: Message Priority ---------------- .. container:: message-rst-communicationpatterns-resourceallocation-priority-multi .. container:: message-rst-communicationpatterns-resourceallocation-priority-documentation .. py:class:: rst.communicationpatterns.ResourceAllocation.Priority Priority ranking scheme for resource allocation when interacting with humans. Greater numeric values indicate higher priority. .. py:attribute:: NO = 0 No priority or unspecified. May be dismissed or cancelled at any time; dismiss if resource busy. .. py:attribute:: LOW = 1 Interaction not affected or no user interaction. Allowed to begin at later times. .. py:attribute:: NORMAL = 2 Interaction affected non-critically. Subsequent interactions only affected marginally; should start immediately. .. py:attribute:: HIGH = 3 Interaction severely affected. Has to be be completed to ensure intact communication and common conceptions; start immediately. .. py:attribute:: URGENT = 4 Required for continued interaction or system operation. Start immediately. .. py:attribute:: EMERGENCY = 5 Human or hardware safety threatened. Begin immediately; divert resources as necessary; overtime may be authorized. .. container:: message-rst-communicationpatterns-resourceallocation-priority-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/sandbox/rst/communicationpatterns/ResourceAllocation.proto :lines: 86-134 :language: protobuf :emphasize-lines: 9-9,16-16,24-24,32-32,39-39,47-47 .. _message-rst-communicationpatterns-resourceallocation-initiator: Message Initiator ----------------- .. container:: message-rst-communicationpatterns-resourceallocation-initiator-multi .. container:: message-rst-communicationpatterns-resourceallocation-initiator-documentation .. py:class:: rst.communicationpatterns.ResourceAllocation.Initiator Specifies the request's initiator. Automatically or periodically occurring allocations can generally be considered system-initiated while e.g. routines invoked from verbal interactions are initiated by a human. .. py:attribute:: SYSTEM = 0 Resource is required by a system component. .. py:attribute:: HUMAN = 10 Resource is requested by a human interaction partner. .. container:: message-rst-communicationpatterns-resourceallocation-initiator-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/sandbox/rst/communicationpatterns/ResourceAllocation.proto :lines: 143-155 :language: protobuf :emphasize-lines: 6-6,11-11 .. _message-rst-communicationpatterns-resourceallocation-policy: Message Policy -------------- .. container:: message-rst-communicationpatterns-resourceallocation-policy-multi .. container:: message-rst-communicationpatterns-resourceallocation-policy-documentation .. py:class:: rst.communicationpatterns.ResourceAllocation.Policy Specifies a request's conflict resolution policy. I.e., gives the scheduler a hint how it is allowed to modify the request in case of conflicts. .. py:attribute:: PRESERVE = 0 Only allocate as a single, unmodified interval. .. py:attribute:: MAXIMUM = 10 Allocate maximum amount of time available, shrink interval if needed. .. py:attribute:: FIRST = 20 Allocate the first time slot available, shrink interval if needed. .. container:: message-rst-communicationpatterns-resourceallocation-policy-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-trunk/upstream/RST-0.19.0-Linux/share/rst0.19/proto/sandbox/rst/communicationpatterns/ResourceAllocation.proto :lines: 163-182 :language: protobuf :emphasize-lines: 6-6,12-12,18-18