Revision 7491c395

View differences:

doc/activitydiagrams/message/urtMessageInit.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="275px" preserveAspectRatio="none" style="width:418px;height:275px;" version="1.1" viewBox="0 0 418 275" width="418px" zoomAndPan="magnify"><defs><filter height="300%" id="f160ofdjzs96s" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="163.75" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="144" x="136.25" y="47.6611">urtMessageInit()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="211.25" y="68.6143"/><path d="M10,72.8594 L10,158.5234 A0,0 0 0 0 10,158.5234 L312,158.5234 A0,0 0 0 0 312,158.5234 L312,119.6914 L332,115.6914 L312,111.6914 L312,82.8594 L302,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#f160ofdjzs96s)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M302,72.8594 L302,82.8594 L312,82.8594 L302,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="61" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="65" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="65" y="89.4263">message</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="129" y="89.4263">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="261" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="261" x2="312" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="162" x="16" y="105.0591">The message to initialize.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="97" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="101" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="101" y="134.8247">payload</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="165" y="134.8247">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="225" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="225" x2="312" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="16" y="150.4575">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="66" y="150.4575">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="102" y="150.4575">for messages without payload.</text><ellipse cx="342" cy="115.6914" fill="#000000" filter="url(#f160ofdjzs96s)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f160ofdjzs96s)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="131" x="276.5" y="178.5234"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="286.5" y="199.6621">initialize members</text><path d="M129,223.3594 L129,263.625 A0,0 0 0 0 129,263.625 L311,263.625 A0,0 0 0 0 311,263.625 L311,247.4922 L331,243.4922 L311,239.4922 L311,233.3594 L301,223.3594 L129,223.3594 A0,0 0 0 0 129,223.3594 " fill="#FBFB77" filter="url(#f160ofdjzs96s)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M301,223.3594 L301,233.3594 L311,233.3594 L301,223.3594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="129" x2="143.5" y1="235.9258" y2="235.9258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="147.5" y="239.9263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="147.5" y="239.9263">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="196.5" y="239.9263"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="196.5" y="239.9263">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="296.5" y="239.9263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="296.5" x2="311" y1="235.9258" y2="235.9258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="135" y="255.5591">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="188" y="255.5591">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="292" y="255.5591">.</text><ellipse cx="342" cy="243.4922" fill="#FFFFFF" filter="url(#f160ofdjzs96s)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="342" cy="243.4922" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="342" x2="342" y1="125.6914" y2="178.5234"/><polygon fill="#A80036" points="338,168.5234,342,178.5234,346,168.5234,342,172.5234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="342" x2="342" y1="212.4922" y2="232.4922"/><polygon fill="#A80036" points="338,222.4922,342,232.4922,346,222.4922,342,226.4922" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[cf41be7f63b42d9455c93a9cc8728d76]
2
@startuml
3

  
4
title **µRtWare**\nurtMessageInit()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**message** : urt_message_t*"" - -
20
  The message to initialize.
21
  Must not be ""NULL"".
22
  - - ""**payload** : void*"" - -
23
  May be ""NULL"" for messages without payload.
24
end note
25

  
26

  
27
:initialize members;
28

  
29

  
30
stop
31
note
32
  - - **return** ""urt_status_t"" - -
33
  Returns ""URT_STATUS_OK"".
34
end note
35

  
36

  
37
@enduml
38

  
39
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
40
(GPL source distribution)
41
Java Runtime: OpenJDK Runtime Environment
42
JVM: OpenJDK 64-Bit Server VM
43
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
44
Operating System: Linux
45
Default Encoding: UTF-8
46
Language: en
47
Country: US
48
--></g></svg>
doc/activitydiagrams/message/urtMessageInit.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtMessageInit()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**message** : urt_message_t*"" --
35
  The message to initialize.
36
  Must not be ""NULL"".
37
  -- ""**payload** : void*"" --
38
  May be ""NULL"" for messages without payload.
39
end note
40

  
41
/'### PROCEDURE ##############################################################'/
42

  
43
:initialize members;
44

  
45
/'### STOP & RETURN ##########################################################'/
46

  
47
stop
48
note
49
  -- **return** ""urt_status_t"" --
50
  Returns ""URT_STATUS_OK"".
51
end note
52

  
53
/'### OUTRO ##################################################################'/
54

  
55
@enduml
doc/activitydiagrams/publisher/urtPublisherInit.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="692px" preserveAspectRatio="none" style="width:811px;height:692px;" version="1.1" viewBox="0 0 811 692" width="811px" zoomAndPan="magnify"><defs><filter height="300%" id="f1xffo3a9rerdo" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="360" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="150" x="329.5" y="47.6611">urtPublisherInit()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="407.5" y="68.6143"/><path d="M10,72.8594 L10,219.0547 A0,0 0 0 0 10,219.0547 L426,219.0547 A0,0 0 0 0 426,219.0547 L426,149.957 L446,145.957 L426,141.957 L426,82.8594 L416,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#f1xffo3a9rerdo)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M416,72.8594 L416,82.8594 L426,82.8594 L416,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="102" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="106" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="72" x="106" y="89.4263">publisher</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="144" x="186" y="89.4263">: urt_publisher_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="334" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="334" x2="426" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="16" y="105.0591">The publisher to initialize.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="134" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="138" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="138" y="134.8247">topic</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="186" y="134.8247">: urt_topic_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="302" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="302" x2="426" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="259" x="16" y="150.4575">The topic, this publisher is associated to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="114" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="118" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="118" y="180.2231">messages</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="190" y="180.2231">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="322" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="322" x2="426" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="9" x="16" y="195.856">A</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="29" y="195.856">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="346" x="65" y="195.856">terminated list of messages to contribute to the topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="16" y="210.9888">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="66" y="210.9888">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="202" x="102" y="210.9888">(no messages are contributed).</text><ellipse cx="456" cy="145.957" fill="#000000" filter="url(#f1xffo3a9rerdo)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="131" x="390.5" y="239.0547"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="400.5" y="260.1934">initialize members</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="416" y="341.4258"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="426" y="362.5645">lock topic</text><rect fill="#FFFFFF" filter="url(#f1xffo3a9rerdo)" height="145.5859" style="stroke: #000000; stroke-width: 2.0;" width="638" x="137" y="386.1963"/><path d="M294,387.1963 L294,395.4932 L284,405.4932 L137,405.4932 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="140" y="400.1914">contribute messages</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="474" x="219" y="422.4932"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="454" x="229" y="443.6318">set next pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="618" x="147" y="485.8135"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="598" x="157" y="506.9521">set next pointer of last message to contribute to the message after the topic's latest message</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="408" y="551.7822"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="418" y="572.9209">unlock topic</text><polygon fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" points="386,293.0234,526,293.0234,538,305.0234,526,317.0234,386,317.0234,374,305.0234,386,293.0234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="460" y="327.2339">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="386" y="308.8315">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="538" y="302.4292">no</text><polygon fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" points="456,605.751,468,617.751,456,629.751,444,617.751,456,605.751" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M243,640.6182 L243,680.8838 A0,0 0 0 0 243,680.8838 L425,680.8838 A0,0 0 0 0 425,680.8838 L425,664.751 L445,660.751 L425,656.751 L425,650.6182 L415,640.6182 L243,640.6182 A0,0 0 0 0 243,640.6182 " fill="#FBFB77" filter="url(#f1xffo3a9rerdo)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M415,640.6182 L415,650.6182 L425,650.6182 L415,640.6182 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="243" x2="257.5" y1="653.1846" y2="653.1846"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="261.5" y="657.1851"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="261.5" y="657.1851">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="310.5" y="657.1851"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="310.5" y="657.1851">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="410.5" y="657.1851"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="410.5" x2="425" y1="653.1846" y2="653.1846"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="249" y="672.8179">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="302" y="672.8179">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="406" y="672.8179">.</text><ellipse cx="456" cy="660.751" fill="#FFFFFF" filter="url(#f1xffo3a9rerdo)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="456" cy="660.751" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="155.957" y2="239.0547"/><polygon fill="#A80036" points="452,229.0547,456,239.0547,460,229.0547,456,233.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="456.4619" y2="485.8135"/><polygon fill="#A80036" points="452,475.8135,456,485.8135,460,475.8135,456,479.8135" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="375.3945" y2="422.4932"/><polygon fill="#A80036" points="452,412.4932,456,422.4932,460,412.4932,456,416.4932" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="519.7822" y2="551.7822"/><polygon fill="#A80036" points="452,541.7822,456,551.7822,460,541.7822,456,545.7822" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="317.0234" y2="341.4258"/><polygon fill="#A80036" points="452,331.4258,456,341.4258,460,331.4258,456,335.4258" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="538" x2="785" y1="305.0234" y2="305.0234"/><polygon fill="#A80036" points="781,455.8135,785,465.8135,789,455.8135,785,459.8135" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="305.0234" y2="617.751"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="468" y1="617.751" y2="617.751"/><polygon fill="#A80036" points="478,613.751,468,617.751,478,621.751,474,617.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="585.751" y2="605.751"/><polygon fill="#A80036" points="452,595.751,456,605.751,460,595.751,456,599.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="273.0234" y2="293.0234"/><polygon fill="#A80036" points="452,283.0234,456,293.0234,460,283.0234,456,287.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="629.751" y2="649.751"/><polygon fill="#A80036" points="452,639.751,456,649.751,460,639.751,456,643.751" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[cad571e197258dd00abff76ac285e5b2]
2
@startuml
3

  
4
title **µRtWare**\nurtPublisherInit()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**publisher** : urt_publisher_t*"" - -
20
  The publisher to initialize.
21
  Must not be ""NULL"".
22
  - - ""**topic** : urt_topic_t*"" - -
23
  The topic, this publisher is associated to.
24
  Must not be ""NULL"".
25
  - - ""**messages** : urt_message_t*"" - -
26
  A ""NULL"" terminated list of messages to contribute to the topic.
27
  May be ""NULL"" (no messages are contributed).
28
end note
29

  
30

  
31
:initialize members;
32
if (Messages to contribute?) then (yes)
33
  :lock topic;
34
  partition "contribute messages" {
35
    :set next pointer of topic's latest message to first message to contribute;
36
    :set next pointer of last message to contribute to the message after the topic's latest message;
37
  }
38
  :unlock topic;
39
else (no)
40
endif
41

  
42

  
43
stop
44
note
45
  - - **return** ""urt_status_t"" - -
46
  Returns ""URT_STATUS_OK"".
47
end note
48

  
49

  
50
@enduml
51

  
52
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
53
(GPL source distribution)
54
Java Runtime: OpenJDK Runtime Environment
55
JVM: OpenJDK 64-Bit Server VM
56
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
57
Operating System: Linux
58
Default Encoding: UTF-8
59
Language: en
60
Country: US
61
--></g></svg>
doc/activitydiagrams/publisher/urtPublisherInit.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtPublisherInit()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**publisher** : urt_publisher_t*"" --
35
  The publisher to initialize.
36
  Must not be ""NULL"".
37
  -- ""**topic** : urt_topic_t*"" --
38
  The topic, this publisher is associated to.
39
  Must not be ""NULL"".
40
  -- ""**messages** : urt_message_t*"" --
41
  A ""NULL"" terminated list of messages to contribute to the topic.
42
  May be ""NULL"" (no messages are contributed).
43
end note
44

  
45
/'### PROCEDURE ##############################################################'/
46

  
47
:initialize members;
48
if (Messages to contribute?) then (yes)
49
  :lock topic;
50
  partition "contribute messages" {
51
    :set next pointer of topic's latest message to first message to contribute;
52
    :set next pointer of last message to contribute to the message after the topic's latest message;
53
  }
54
  :unlock topic;
55
else (no)
56
endif
57

  
58
/'### STOP & RETURN ##########################################################'/
59

  
60
stop
61
note
62
  -- **return** ""urt_status_t"" --
63
  Returns ""URT_STATUS_OK"".
64
end note
65

  
66
/'### OUTRO ##################################################################'/
67

  
68
@enduml
doc/activitydiagrams/publisher/urtPublisherPublish.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1255px" preserveAspectRatio="none" style="width:2678px;height:1255px;" version="1.1" viewBox="0 0 2678 1255" width="2678px" zoomAndPan="magnify"><defs><filter height="300%" id="f52skes7don2n" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="1293.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="183" x="1246.5" y="47.6611">urtPublisherPublish()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="1341" y="68.6143"/><path d="M351,72.8594 L351,264.4531 A0,0 0 0 0 351,264.4531 L736,264.4531 A0,0 0 0 0 736,264.4531 L736,172.6563 L756,168.6563 L736,164.6563 L736,82.8594 L726,72.8594 L351,72.8594 A0,0 0 0 0 351,72.8594 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M726,72.8594 L726,82.8594 L736,82.8594 L726,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="427.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="431.5" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="72" x="431.5" y="89.4263">publisher</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="144" x="511.5" y="89.4263">: urt_publisher_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="659.5" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="659.5" x2="736" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="197" x="357" y="105.0591">Pointer to the publisher to use.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="357" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="437" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="469" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="479.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="483.5" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="483.5" y="134.8247">payload</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="547.5" y="134.8247">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="607.5" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="607.5" x2="736" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="226" x="357" y="150.4575">Pointer to the data to be published.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="357" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="407" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="443" y="165.5903">for messages without payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="499.5" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="503.5" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="8" x="503.5" y="180.2231">n</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="64" x="519.5" y="180.2231">: size_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="587.5" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="587.5" x2="736" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="357" y="195.856">Size of the payload in bytes.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="475.5" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="479.5" y="210.4888"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="8" x="479.5" y="210.4888">t</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="495.5" y="210.4888">: urt_osTime_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="611.5" y="210.4888"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="611.5" x2="736" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="246" x="357" y="226.1216">Timestamp to be set for the message.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="455.5" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="459.5" y="240.7544"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="459.5" y="240.7544">timeout</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="523.5" y="240.7544">: urt_delay_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="631.5" y="240.7544"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="631.5" x2="736" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="364" x="357" y="256.3872">Timeout delay in case the message cannot be published.</text><ellipse cx="766" cy="168.6563" fill="#000000" filter="url(#f52skes7don2n)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="726" y="284.4531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="736" y="305.5918">lock topic</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="697.5" y="338.4219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="707.5" y="359.5605">lock next message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="705" y="448.1011"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="715" y="469.2397">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="524" x="504" y="502.0698"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="504" x="514" y="523.2085">wait for topic's condition variable (using topic's mutex) to be signaled or timeout</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="106" x="713" y="556.0386"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="86" x="723" y="577.1772">lock message</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="626,392.3906,906,392.3906,918,404.3906,906,416.3906,626,416.3906,614,404.3906,626,392.3906" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="770" y="426.6011">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="280" x="626" y="408.1987">HRT consumers left for the message or timeout?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="600" y="401.7964">no</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="713,632.0073,819,632.0073,831,644.0073,819,656.0073,713,656.0073,701,644.0073,713,632.0073" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="106" x="713" y="647.8154">Timeout occurred?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="681" y="641.4131">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="831" y="641.4131">no</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="36.5" y="666.0073"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="46.5" y="687.146">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="49.5" y="734.9761"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="59.5" y="756.1147">unlock topic</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="10" y="803.9448"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="20" y="825.0835">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="63" y="825.0835">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="666.0073"/><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="756.812"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="251" x="219" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="231" x="229" y="803.9507">iterate topic pointer to this message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="180" x="498" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="160" x="508" y="803.9507">copy payload to message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="187" x="706" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="716" y="803.9507">set origin time of message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="286" x="921" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="266" x="931" y="803.9507">set number of HRT consumers (from topic)</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="836.7808"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="652" y="877.7808"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="662" y="898.9194">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="398" x="1249" y="817.2964"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="378" x="1259" y="838.4351">set QoS rate timer (@topic) wrt. most critical HRT subscriber</text><path d="M1675,805.6323 L1675,830.7651 A0,0 0 0 0 1675,830.7651 L2170,830.7651 A0,0 0 0 0 2170,830.7651 L2170,823.6323 L2190,818.1987 L2170,815.6323 L2170,815.6323 L2160,805.6323 L1675,805.6323 A0,0 0 0 0 1675,805.6323 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M2160,805.6323 L2160,815.6323 L2170,815.6323 L2160,805.6323 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="474" x="1681" y="822.6992">No lock required since this timer is only accessed when the topic is locked.</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="434" x="2190" y="801.2144"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="414" x="2200" y="822.353">set QoS delay timer (@subscriber) wrt. origin time of the message</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2277,752.812,2537,752.812,2549,764.812,2537,776.812,2277,776.812,2265,764.812,2277,752.812" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="787.0225">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="260" x="2277" y="768.6201">QoS delay timer (@subscriber) is not armed?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="2549" y="762.2178">no</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2407,859.5854,2419,871.5854,2407,883.5854,2395,871.5854,2407,859.5854" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="208" x="2303" y="918.5854"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="188" x="2313" y="939.7241">iterate to next HRT subscriber</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2346,692.0073,2468,692.0073,2480,704.0073,2468,716.0073,2346,716.0073,2334,704.0073,2346,692.0073" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="726.2178">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="122" x="2346" y="707.8154">HRT subscribers left?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="2320" y="701.4131">no</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="994.5542"/><path d="M1053,1024.9722 L1053,1050.105 A0,0 0 0 0 1053,1050.105 L1389,1050.105 A0,0 0 0 0 1389,1050.105 L1389,1042.9722 L1409,1037.5386 L1389,1034.9722 L1389,1034.9722 L1379,1024.9722 L1053,1024.9722 A0,0 0 0 0 1053,1024.9722 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1379,1024.9722 L1379,1034.9722 L1389,1034.9722 L1379,1024.9722 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="315" x="1059" y="1042.0391">Msut be within topic lock because of HRT counter.</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="1409" y="1020.5542"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="59" x="1419" y="1041.6929">fire event</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="1400.5" y="1074.5229"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="1410.5" y="1095.6616">unlock topic</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="1371.5" y="1128.4917"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="1381.5" y="1149.6304">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="1424.5" y="1149.6304">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="766,1168.4604,778,1180.4604,766,1192.4604,754,1180.4604,766,1168.4604" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M455,1203.3276 L455,1243.5933 A0,0 0 0 0 455,1243.5933 L735,1243.5933 A0,0 0 0 0 735,1243.5933 L735,1227.4604 L755,1223.4604 L735,1219.4604 L735,1213.3276 L725,1203.3276 L455,1203.3276 A0,0 0 0 0 455,1203.3276 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M725,1203.3276 L725,1213.3276 L735,1213.3276 L725,1203.3276 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="455" x2="518.5" y1="1215.894" y2="1215.894"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="522.5" y="1219.8945"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="522.5" y="1219.8945">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="571.5" y="1219.8945"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="571.5" y="1219.8945">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="671.5" y="1219.8945"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="671.5" x2="735" y1="1215.894" y2="1215.894"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="461" y="1235.5273">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="514" y="1235.5273">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="74" x="646" y="1235.5273">on timeout.</text><ellipse cx="766" cy="1223.4604" fill="#FFFFFF" filter="url(#f52skes7don2n)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="766" cy="1223.4604" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="178.6563" y2="284.4531"/><polygon fill="#A80036" points="762,274.4531,766,284.4531,770,274.4531,766,278.4531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="318.4219" y2="338.4219"/><polygon fill="#A80036" points="762,328.4219,766,338.4219,770,328.4219,766,332.4219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="482.0698" y2="502.0698"/><polygon fill="#A80036" points="762,492.0698,766,502.0698,770,492.0698,766,496.0698" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="536.0386" y2="556.0386"/><polygon fill="#A80036" points="762,546.0386,766,556.0386,770,546.0386,766,550.0386" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="416.3906" y2="448.1011"/><polygon fill="#A80036" points="762,438.1011,766,448.1011,770,438.1011,766,442.1011" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="590.0073" y2="600.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="1040" y1="600.0073" y2="600.0073"/><polygon fill="#A80036" points="1036,510.6519,1040,500.6519,1044,510.6519,1040,506.6519" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1040" x2="1040" y1="404.3906" y2="600.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1040" x2="918" y1="404.3906" y2="404.3906"/><polygon fill="#A80036" points="928,400.3906,918,404.3906,928,408.3906,924,404.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="614" x2="492" y1="404.3906" y2="404.3906"/><polygon fill="#A80036" points="488,496.6519,492,506.6519,496,496.6519,492,500.6519" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="492" x2="492" y1="404.3906" y2="612.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="492" x2="766" y1="612.0073" y2="612.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="612.0073" y2="632.0073"/><polygon fill="#A80036" points="762,622.0073,766,632.0073,770,622.0073,766,626.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="372.3906" y2="392.3906"/><polygon fill="#A80036" points="762,382.3906,766,392.3906,770,382.3906,766,386.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="699.9761" y2="734.9761"/><polygon fill="#A80036" points="93.5,724.9761,97.5,734.9761,101.5,724.9761,97.5,728.9761" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="768.9448" y2="803.9448"/><polygon fill="#A80036" points="93.5,793.9448,97.5,803.9448,101.5,793.9448,97.5,797.9448" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="340.5,772.812,344.5,782.812,348.5,772.812,344.5,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="584,772.812,588,782.812,592,772.812,588,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="795.5,772.812,799.5,782.812,803.5,772.812,799.5,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="1060,772.812,1064,782.812,1068,772.812,1064,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="340.5,826.7808,344.5,836.7808,348.5,826.7808,344.5,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="584,826.7808,588,836.7808,592,826.7808,588,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="795.5,826.7808,799.5,836.7808,803.5,826.7808,799.5,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="1060,826.7808,1064,836.7808,1068,826.7808,1064,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="842.7808" y2="877.7808"/><polygon fill="#A80036" points="709,867.7808,713,877.7808,717,867.7808,713,871.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="776.812" y2="801.2144"/><polygon fill="#A80036" points="2403,791.2144,2407,801.2144,2411,791.2144,2407,795.2144" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2549" x2="2634" y1="764.812" y2="764.812"/><polygon fill="#A80036" points="2630,808.1987,2634,818.1987,2638,808.1987,2634,812.1987" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2634" y1="764.812" y2="871.5854"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2419" y1="871.5854" y2="871.5854"/><polygon fill="#A80036" points="2429,867.5854,2419,871.5854,2429,875.5854,2425,871.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="835.1831" y2="859.5854"/><polygon fill="#A80036" points="2403,849.5854,2407,859.5854,2411,849.5854,2407,853.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="883.5854" y2="918.5854"/><polygon fill="#A80036" points="2403,908.5854,2407,918.5854,2411,908.5854,2407,912.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="716.0073" y2="752.812"/><polygon fill="#A80036" points="2403,742.812,2407,752.812,2411,742.812,2407,746.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="952.5542" y2="962.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2652" y1="962.5542" y2="962.5542"/><polygon fill="#A80036" points="2648,844.2808,2652,834.2808,2656,844.2808,2652,840.2808" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2652" y1="704.0073" y2="962.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2480" y1="704.0073" y2="704.0073"/><polygon fill="#A80036" points="2490,700.0073,2480,704.0073,2490,708.0073,2486,704.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2334" x2="1661" y1="704.0073" y2="704.0073"/><polygon fill="#A80036" points="1657,830.2808,1661,840.2808,1665,830.2808,1661,834.2808" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="1661" y1="704.0073" y2="974.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="2407" y1="974.5542" y2="974.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="974.5542" y2="994.5542"/><polygon fill="#A80036" points="2403,984.5542,2407,994.5542,2411,984.5542,2407,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="672.0073" y2="756.812"/><polygon fill="#A80036" points="709,746.812,713,756.812,717,746.812,713,750.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="672.0073" y2="817.2964"/><polygon fill="#A80036" points="1444,807.2964,1448,817.2964,1452,807.2964,1448,811.2964" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="672.0073" y2="692.0073"/><polygon fill="#A80036" points="2403,682.0073,2407,692.0073,2411,682.0073,2407,686.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="911.7495" y2="994.5542"/><polygon fill="#A80036" points="709,984.5542,713,994.5542,717,984.5542,713,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="851.2651" y2="994.5542"/><polygon fill="#A80036" points="1444,984.5542,1448,994.5542,1452,984.5542,1448,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1000.5542" y2="1020.5542"/><polygon fill="#A80036" points="1444.5,1010.5542,1448.5,1020.5542,1452.5,1010.5542,1448.5,1014.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1054.5229" y2="1074.5229"/><polygon fill="#A80036" points="1444.5,1064.5229,1448.5,1074.5229,1452.5,1064.5229,1448.5,1068.5229" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1108.4917" y2="1128.4917"/><polygon fill="#A80036" points="1444.5,1118.4917,1448.5,1128.4917,1452.5,1118.4917,1448.5,1122.4917" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="701" x2="97.5" y1="644.0073" y2="644.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="644.0073" y2="666.0073"/><polygon fill="#A80036" points="93.5,656.0073,97.5,666.0073,101.5,656.0073,97.5,660.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="831" x2="1448.5" y1="644.0073" y2="644.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="644.0073" y2="666.0073"/><polygon fill="#A80036" points="1444.5,656.0073,1448.5,666.0073,1452.5,656.0073,1448.5,660.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="837.9136" y2="1180.4604"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="754" y1="1180.4604" y2="1180.4604"/><polygon fill="#A80036" points="744,1176.4604,754,1180.4604,744,1184.4604,748,1180.4604" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1162.4604" y2="1180.4604"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="778" y1="1180.4604" y2="1180.4604"/><polygon fill="#A80036" points="788,1176.4604,778,1180.4604,788,1184.4604,784,1180.4604" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="1192.4604" y2="1212.4604"/><polygon fill="#A80036" points="762,1202.4604,766,1212.4604,770,1202.4604,766,1206.4604" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[e44595ad172491fa748569169893175b]
2
@startuml
3

  
4
title **µRtWare**\nurtPublisherPublish()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**publisher** : urt_publisher_t*"" - -
20
  Pointer to the publisher to use.
21
  Must not be ""NULL"".
22
  - - ""**payload** : void*"" - -
23
  Pointer to the data to be published.
24
  May be ""NULL"" for messages without payload.
25
  - - ""**n** : size_t"" - -
26
  Size of the payload in bytes.
27
  - - ""**t** : urt_osTime_t"" - -
28
  Timestamp to be set for the message.
29
  - - ""**timeout** : urt_delay_t"" - -
30
  Timeout delay in case the message cannot be published.
31
end note
32

  
33

  
34
:lock topic;
35
:lock next message;
36
while (HRT consumers left for the message or timeout?) is (yes)
37
  :unlock message;
38
  :wait for topic's condition variable (using topic's mutex) to be signaled or timeout;
39
  :lock message;
40
endwhile (no)
41
if (Timeout occurred?) then (yes)
42
  :unlock message;
43
  :unlock topic;
44
  :return ""URT_STATUS_ERROR"";
45
else (no)
46
  fork
47
    fork
48
      :iterate topic pointer to this message;
49
    fork again
50
      :copy payload to message;
51
    fork again
52
      :set origin time of message;
53
    fork again
54
      :set number of HRT consumers (from topic);
55
    endfork
56
    :unlock message;
57
  fork again
58
    :set QoS rate timer (@topic) wrt. most critical HRT subscriber;
59
  fork again
60
    while (HRT subscribers left?) is (yes)
61
      if (QoS delay timer (@subscriber) is not armed?) then (yes)
62
        :set QoS delay timer (@subscriber) wrt. origin time of the message;
63
        note: No lock required since this timer is only accessed when the topic is locked.
64
      else (no)
65
      endif
66
      :iterate to next HRT subscriber;
67
    endwhile (no)
68
  endfork
69
  :fire event;
70
  note: Msut be within topic lock because of HRT counter.
71
  :unlock topic;
72
  :return ""URT_STATUS_OK"";
73
endif
74

  
75

  
76
stop
77
note
78
  - - **return** ""urt_status_t"" - -
79
  Returns ""URT_STATUS_ERROR"" on timeout.
80
end note
81

  
82

  
83
@enduml
84

  
85
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
86
(GPL source distribution)
87
Java Runtime: OpenJDK Runtime Environment
88
JVM: OpenJDK 64-Bit Server VM
89
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
90
Operating System: Linux
91
Default Encoding: UTF-8
92
Language: en
93
Country: US
94
--></g></svg>
doc/activitydiagrams/publisher/urtPublisherPublish.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtPublisherPublish()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**publisher** : urt_publisher_t*"" --
35
  Pointer to the publisher to use.
36
  Must not be ""NULL"".
37
  -- ""**payload** : void*"" --
38
  Pointer to the data to be published.
39
  May be ""NULL"" for messages without payload.
40
  -- ""**n** : size_t"" --
41
  Size of the payload in bytes.
42
  -- ""**t** : urt_osTime_t"" --
43
  Timestamp to be set for the message.
44
  -- ""**timeout** : urt_delay_t"" --
45
  Timeout delay in case the message cannot be published.
46
end note
47

  
48
/'### PROCEDURE ##############################################################'/
49

  
50
:lock topic;
51
:lock next message;
52
while (HRT consumers left for the message or timeout?) is (yes)
53
  :unlock message;
54
  :wait for topic's condition variable (using topic's mutex) to be signaled or timeout;
55
  :lock message;
56
endwhile (no)
57
if (Timeout occurred?) then (yes)
58
  :unlock message;
59
  :unlock topic;
60
  :return ""URT_STATUS_ERROR"";
61
else (no)
62
  fork
63
    fork
64
      :iterate topic pointer to this message;
65
    fork again
66
      :copy payload to message;
67
    fork again
68
      :set origin time of message;
69
    fork again
70
      :set number of HRT consumers (from topic);
71
    endfork
72
    :unlock message;
73
  fork again
74
    :set QoS rate timer (@topic) wrt. most critical HRT subscriber;
75
  fork again
76
    while (HRT subscribers left?) is (yes)
77
      if (QoS delay timer (@subscriber) is not armed?) then (yes)
78
        :set QoS delay timer (@subscriber) wrt. origin time of the message;
79
        note: No lock required since this timer is only accessed when the topic is locked.
80
      else (no)
81
      endif
82
      :iterate to next HRT subscriber;
83
    endwhile (no)
84
  endfork
85
  :fire event;
86
  note: Msut be within topic lock because of HRT counter.
87
  :unlock topic;
88
  :return ""URT_STATUS_OK"";
89
endif
90

  
91
/'### STOP & RETURN ##########################################################'/
92

  
93
stop
94
note
95
  -- **return** ""urt_status_t"" --
96
  Returns ""URT_STATUS_ERROR"" on timeout.
97
end note
98

  
99
/'### OUTRO ##################################################################'/
100

  
101
@enduml
doc/activitydiagrams/subscriber/urtSubscriberCalculateUsefulness.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="420px" preserveAspectRatio="none" style="width:880px;height:420px;" version="1.1" viewBox="0 0 880 420" width="880px" zoomAndPan="magnify"><defs><filter height="300%" id="f1bh34zu0bgazr" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="394.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="307" x="285.5" y="47.6611">urtSubscriberCalculateUsefulness()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="442" y="68.6143"/><path d="M73.5,72.8594 L73.5,158.5234 A0,0 0 0 0 73.5,158.5234 L424.5,158.5234 A0,0 0 0 0 424.5,158.5234 L424.5,119.6914 L444.5,115.6914 L424.5,111.6914 L424.5,82.8594 L414.5,72.8594 L73.5,72.8594 A0,0 0 0 0 73.5,72.8594 " fill="#FBFB77" filter="url(#f1bh34zu0bgazr)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M414.5,72.8594 L414.5,82.8594 L424.5,82.8594 L414.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="73.5" x2="125" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="129" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="129" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="217" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="373" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="373" x2="424.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="223" x="79.5" y="105.0591">The subscriber to be unsubscribed.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="79.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="159.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="191.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="73.5" x2="161" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="165" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="165" y="134.8247">latency</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="229" y="134.8247">: urt_delay_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="337" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="337" x2="424.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="330" x="79.5" y="150.4575">Delay (of a mesage) to calculate the usefulness for.</text><ellipse cx="454.5" cy="115.6914" fill="#000000" filter="url(#f1bh34zu0bgazr)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" points="375,178.5234,423,178.5234,435,190.5234,423,202.5234,375,202.5234,363,190.5234,375,178.5234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="22" x="403" y="212.7339">HRT</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="48" x="375" y="194.3315">RT class</text><path d="M10,238.6519 L10,263.7847 A0,0 0 0 0 10,263.7847 L344,263.7847 A0,0 0 0 0 344,263.7847 L344,256.6519 L364,251.2183 L344,248.6519 L344,248.6519 L334,238.6519 L10,238.6519 A0,0 0 0 0 10,238.6519 " fill="#FBFB77" filter="url(#f1bh34zu0bgazr)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M334,238.6519 L334,248.6519 L344,248.6519 L334,238.6519 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="313" x="16" y="255.7188">Otherwise some QoS timer would have triggered.</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="70" x="364" y="234.2339"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="374" y="255.3726">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="7" x="417" y="255.3726">1</text><polygon fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" points="535.5,178.5234,583.5,178.5234,595.5,190.5234,583.5,202.5234,535.5,202.5234,523.5,190.5234,535.5,178.5234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="563.5" y="212.7339">FRT</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="48" x="535.5" y="194.3315">RT class</text><polygon fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" points="529,234.2339,590,234.2339,602,246.2339,590,258.2339,529,258.2339,517,246.2339,529,234.2339" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="61" x="529" y="250.042">Timing ok?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="497" y="243.6396">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="602" y="243.6396">no</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="84" x="465" y="268.2339"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="475" y="289.3726">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="21" x="518" y="289.3726">1.0</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="84" x="570" y="268.2339"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="580" y="289.3726">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="21" x="623" y="289.3726">0.0</text><polygon fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" points="559.5,308.2026,571.5,320.2026,559.5,332.2026,547.5,320.2026,559.5,308.2026" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" points="702.5,178.5234,750.5,178.5234,762.5,190.5234,750.5,202.5234,702.5,202.5234,690.5,190.5234,702.5,178.5234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="22" x="730.5" y="212.7339">SRT</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="48" x="702.5" y="194.3315">RT class</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="22" x="762.5" y="187.9292">NRT</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="125" x="664" y="234.2339"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="105" x="674" y="255.3726">execute callback</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="99" x="677" y="303.2026"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="79" x="687" y="324.3413">return result</text><rect fill="#FEFECE" filter="url(#f1bh34zu0bgazr)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="70" x="799" y="265.3159"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="809" y="286.4546">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="7" x="852" y="286.4546">1</text><path d="M99.5,368.0386 L99.5,408.3042 A0,0 0 0 0 99.5,408.3042 L423.5,408.3042 A0,0 0 0 0 423.5,408.3042 L423.5,392.1714 L443.5,388.1714 L423.5,384.1714 L423.5,378.0386 L413.5,368.0386 L99.5,368.0386 A0,0 0 0 0 99.5,368.0386 " fill="#FBFB77" filter="url(#f1bh34zu0bgazr)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M413.5,368.0386 L413.5,378.0386 L423.5,378.0386 L413.5,368.0386 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="99.5" x2="213" y1="380.605" y2="380.605"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="217" y="384.6055"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="217" y="384.6055">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="266" y="384.6055"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="40" x="266" y="384.6055">float</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="310" y="384.6055"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="310" x2="423.5" y1="380.605" y2="380.605"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="255" x="105.5" y="400.2383">Returns the usefulness as a value within</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="40" x="364.5" y="400.2383">[0,1]</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="404.5" y="400.2383">.</text><ellipse cx="454.5" cy="388.1714" fill="#FFFFFF" filter="url(#f1bh34zu0bgazr)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="454.5" cy="388.1714" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="517" x2="507" y1="246.2339" y2="246.2339"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="507" x2="507" y1="246.2339" y2="268.2339"/><polygon fill="#A80036" points="503,258.2339,507,268.2339,511,258.2339,507,262.2339" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="602" x2="612" y1="246.2339" y2="246.2339"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="612" x2="612" y1="246.2339" y2="268.2339"/><polygon fill="#A80036" points="608,258.2339,612,268.2339,616,258.2339,612,262.2339" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="507" x2="507" y1="302.2026" y2="320.2026"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="507" x2="547.5" y1="320.2026" y2="320.2026"/><polygon fill="#A80036" points="537.5,316.2026,547.5,320.2026,537.5,324.2026,541.5,320.2026" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="612" x2="612" y1="302.2026" y2="320.2026"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="612" x2="571.5" y1="320.2026" y2="320.2026"/><polygon fill="#A80036" points="581.5,316.2026,571.5,320.2026,581.5,324.2026,577.5,320.2026" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="726.5" x2="726.5" y1="268.2026" y2="303.2026"/><polygon fill="#A80036" points="722.5,293.2026,726.5,303.2026,730.5,293.2026,726.5,297.2026" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="399" x2="399" y1="202.5234" y2="234.2339"/><polygon fill="#A80036" points="395,224.2339,399,234.2339,403,224.2339,399,228.2339" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="399" x2="399" y1="268.2026" y2="357.1714"/><polygon fill="#A80036" points="395,347.1714,399,357.1714,403,347.1714,399,351.1714" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="559.5" x2="559.5" y1="202.5234" y2="234.2339"/><polygon fill="#A80036" points="555.5,224.2339,559.5,234.2339,563.5,224.2339,559.5,228.2339" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="559.5" x2="559.5" y1="332.2026" y2="357.1714"/><polygon fill="#A80036" points="555.5,347.1714,559.5,357.1714,563.5,347.1714,559.5,351.1714" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="726.5" x2="726.5" y1="202.5234" y2="234.2339"/><polygon fill="#A80036" points="722.5,224.2339,726.5,234.2339,730.5,224.2339,726.5,228.2339" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="726.5" x2="726.5" y1="337.1714" y2="357.1714"/><polygon fill="#A80036" points="722.5,347.1714,726.5,357.1714,730.5,347.1714,726.5,351.1714" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="435" x2="523.5" y1="190.5234" y2="190.5234"/><polygon fill="#A80036" points="513.5,186.5234,523.5,190.5234,513.5,194.5234,517.5,190.5234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595.5" x2="690.5" y1="190.5234" y2="190.5234"/><polygon fill="#A80036" points="680.5,186.5234,690.5,190.5234,680.5,194.5234,684.5,190.5234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="454.5" y1="125.6914" y2="163.5234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="399" y1="163.5234" y2="163.5234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="399" x2="399" y1="163.5234" y2="178.5234"/><polygon fill="#A80036" points="395,168.5234,399,178.5234,403,168.5234,399,172.5234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="762.5" x2="834" y1="190.5234" y2="190.5234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="834" x2="834" y1="190.5234" y2="265.3159"/><polygon fill="#A80036" points="830,255.3159,834,265.3159,838,255.3159,834,259.3159" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="834" x2="834" y1="299.2847" y2="357.1714"/><polygon fill="#A80036" points="830,347.1714,834,357.1714,838,347.1714,834,351.1714" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="399" x2="834" y1="357.1714" y2="357.1714"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="454.5" x2="454.5" y1="357.1714" y2="377.1714"/><polygon fill="#A80036" points="450.5,367.1714,454.5,377.1714,458.5,367.1714,454.5,371.1714" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[bd3c76ff93e408c92db722d426e937fe]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberCalculateUsefulness()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber to be unsubscribed.
21
  Must not be ""NULL"".
22
  - - ""**latency** : urt_delay_t"" - -
23
  Delay (of a mesage) to calculate the usefulness for.
24
end note
25

  
26

  
27
if (RT class) then (HRT)
28
  :return ""1"";
29
  note: Otherwise some QoS timer would have triggered.
30
elseif (RT class) then (FRT)
31
  if (Timing ok?) then (yes)
32
    :return ""1.0"";
33
  else (no)
34
    :return ""0.0"";
35
  endif
36
elseif (RT class) then (SRT)
37
  :execute callback;
38
  :return result;
39
else (NRT)
40
  :return ""1"";
41
endif
42

  
43

  
44
stop
45
note
46
  - - **return** ""float"" - -
47
  Returns the usefulness as a value within ""[0,1]"".
48
end note
49

  
50

  
51
@enduml
52

  
53
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
54
(GPL source distribution)
55
Java Runtime: OpenJDK Runtime Environment
56
JVM: OpenJDK 64-Bit Server VM
57
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
58
Operating System: Linux
59
Default Encoding: UTF-8
60
Language: en
61
Country: US
62
--></g></svg>
doc/activitydiagrams/subscriber/urtSubscriberCalculateUsefulness.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtSubscriberCalculateUsefulness()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**subscriber** : urt_subscriber_t*"" --
35
  The subscriber to be unsubscribed.
36
  Must not be ""NULL"".
37
  -- ""**latency** : urt_delay_t"" --
38
  Delay (of a mesage) to calculate the usefulness for.
39
end note
40

  
41
/'### PROCEDURE ##############################################################'/
42

  
43
if (RT class) then (HRT)
44
  :return ""1"";
45
  note: Otherwise some QoS timer would have triggered.
46
elseif (RT class) then (FRT)
47
  if (Timing ok?) then (yes)
48
    :return ""1.0"";
49
  else (no)
50
    :return ""0.0"";
51
  endif
52
elseif (RT class) then (SRT)
53
  :execute callback;
54
  :return result;
55
else (NRT)
56
  :return ""1"";
57
endif
58

  
59
/'### STOP & RETURN ##########################################################'/
60

  
61
stop
62
note
63
  -- **return** ""float"" --
64
  Returns the usefulness as a value within ""[0,1]"".
65
end note
66

  
67
/'### OUTRO ##################################################################'/
68

  
69
@enduml
doc/activitydiagrams/subscriber/urtSubscriberFetchLatestMessage.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="2036px" preserveAspectRatio="none" style="width:1846px;height:2036px;" version="1.1" viewBox="0 0 1846 2036" width="1846px" zoomAndPan="magnify"><defs><filter height="300%" id="f1gna4y7n2gv27" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="877.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="309" x="767.5" y="47.6611">urtSubscriberFetchLatestMessage()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="925" y="68.6143"/><path d="M582.5,72.8594 L582.5,249.3203 A0,0 0 0 0 582.5,249.3203 L887.5,249.3203 A0,0 0 0 0 887.5,249.3203 L887.5,165.0898 L907.5,161.0898 L887.5,157.0898 L887.5,82.8594 L877.5,72.8594 L582.5,72.8594 A0,0 0 0 0 582.5,72.8594 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M877.5,72.8594 L877.5,82.8594 L887.5,82.8594 L877.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="611" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="615" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="615" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="703" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="859" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="859" x2="887.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="284" x="588.5" y="105.0591">The subscriber that shall fetch the message.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="588.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="668.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="700.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="671" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="675" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="675" y="134.8247">payload</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="739" y="134.8247">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="799" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="799" x2="887.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="238" x="588.5" y="150.4575">Pointer where to copy the payload to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="588.5" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="638.5" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="674.5" y="165.5903">for messages without payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="675" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="679" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="679" y="180.2231">bytes</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="64" x="727" y="180.2231">: size_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="795" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="795" x2="887.5" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="137" x="588.5" y="195.856">Payload size in bytes.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="643" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="647" y="210.4888"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="647" y="210.4888">latency</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="711" y="210.4888">: urt_delay_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="827" y="210.4888"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="827" x2="887.5" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="267" x="588.5" y="226.1216">The latency can be returned by reference.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="588.5" y="241.2544">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="638.5" y="241.2544">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="670.5" y="241.2544">.</text><ellipse cx="917.5" cy="161.0898" fill="#000000" filter="url(#f1gna4y7n2gv27)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="877.5" y="269.3203"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="887.5" y="290.459">lock topic</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="864,323.2891,971,323.2891,983,335.2891,971,347.2891,864,347.2891,852,335.2891,864,323.2891" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="864" y="339.0972">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="832" y="332.6948">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="983" y="332.6948">no</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="529.875" y="357.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="539.875" y="378.4277">lock next message</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1137.125,357.2891,1336.125,357.2891,1348.125,369.2891,1336.125,381.2891,1137.125,381.2891,1125.125,369.2891,1137.125,357.2891" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="199" x="1137.125" y="373.0972">Has a message been read before?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1105.125" y="366.6948">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1348.125" y="366.6948">no</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="166" x="932.375" y="391.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="146" x="942.375" y="412.4277">lock last read message</text><rect fill="#FFFFFF" filter="url(#f1gna4y7n2gv27)" height="319.9136" style="stroke: #000000; stroke-width: 2.0;" width="566" x="706.875" y="491.77"/><path d="M890.875,492.77 L890.875,501.0669 L880.875,511.0669 L706.875,511.0669 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="174" x="709.875" y="505.7651">find oldest valid message</text><path d="M716.875,532.4849 L716.875,557.6177 A0,0 0 0 0 716.875,557.6177 L926.875,557.6177 A0,0 0 0 0 926.875,557.6177 L926.875,550.4849 L946.875,545.0513 L926.875,542.4849 L926.875,542.4849 L916.875,532.4849 L716.875,532.4849 A0,0 0 0 0 716.875,532.4849 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M916.875,532.4849 L916.875,542.4849 L926.875,542.4849 L916.875,532.4849 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="189" x="722.875" y="549.5518">Locked two messages ahead.</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="946.875" y="528.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="956.875" y="549.2056">lock next message</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="453" x="788.875" y="637.7461"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="172" x="802.875" y="663.7461"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="812.875" y="684.8848">unlock current message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="225" x="1002.875" y="663.7461"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="205" x="1012.875" y="684.8848">lock one message further ahead</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="453" x="788.875" y="717.7148"/><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="882.375,582.0356,1148.375,582.0356,1160.375,594.0356,1148.375,606.0356,882.375,606.0356,870.375,594.0356,882.375,582.0356" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1019.375" y="616.2461">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="266" x="882.375" y="597.8438">Timestamp of next is younger than of current?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="856.375" y="591.4414">no</text><path d="M734.875,770.1328 L734.875,795.2656 A0,0 0 0 0 734.875,795.2656 L918.875,795.2656 A0,0 0 0 0 918.875,795.2656 L918.875,788.1328 L938.875,782.6992 L918.875,780.1328 L918.875,780.1328 L908.875,770.1328 L734.875,770.1328 A0,0 0 0 0 734.875,770.1328 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M908.875,770.1328 L908.875,780.1328 L918.875,780.1328 L908.875,770.1328 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="163" x="740.875" y="787.1997">One message still locked.</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="153" x="938.875" y="765.7148"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="133" x="948.875" y="786.8535">unlock next message</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="903.375,445.2578,1127.375,445.2578,1139.375,457.2578,1127.375,469.2578,903.375,469.2578,891.375,457.2578,903.375,445.2578" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1019.375" y="479.4683">no</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="224" x="903.375" y="461.0659">Message timestamp equals local copy?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1139.375" y="454.6636">yes</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1015.375,831.6836,1027.375,843.6836,1015.375,855.6836,1003.375,843.6836,1015.375,831.6836" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="286" x="1314.875" y="391.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="266" x="1324.875" y="412.4277">lock message after topic's latest message</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1236.625,861.6836,1248.625,873.6836,1236.625,885.6836,1224.625,873.6836,1236.625,861.6836" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="917.5,891.6836,929.5,903.6836,917.5,915.6836,905.5,903.6836,917.5,891.6836" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FFFFFF" filter="url(#f1gna4y7n2gv27)" height="522.687" style="stroke: #000000; stroke-width: 2.0;" width="990" x="421" y="926.4854"/><path d="M535,927.4854 L535,935.7822 L525,945.7822 L421,945.7822 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="104" x="424" y="940.4805">iterate to latest</text><path d="M575,967.2002 L575,992.333 A0,0 0 0 0 575,992.333 L785,992.333 A0,0 0 0 0 785,992.333 L785,985.2002 L805,979.7666 L785,977.2002 L785,977.2002 L775,967.2002 L575,967.2002 A0,0 0 0 0 575,967.2002 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M775,967.2002 L775,977.2002 L785,977.2002 L775,967.2002 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="189" x="581" y="984.2671">Locked two messages ahead.</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="225" x="805" y="962.7822"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="205" x="815" y="983.9209">lock one message further ahead</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="925" x="455" y="1072.4614"/><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="612" x="479" y="1146.8638"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="296" x="493" y="1172.8638"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="276" x="503" y="1194.0024">decrement HRT counter of current message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="817" y="1172.8638"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="240" x="827" y="1194.0024">update QoS delay timer (@subscriber)</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="612" x="479" y="1226.8325"/><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="731.5,1098.4614,838.5,1098.4614,850.5,1110.4614,838.5,1122.4614,731.5,1122.4614,719.5,1110.4614,731.5,1098.4614" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="789" y="1132.6719">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="731.5" y="1114.2695">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="850.5" y="1107.8672">no</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="785,1257.2349,797,1269.2349,785,1281.2349,773,1269.2349,785,1257.2349" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="172" x="699" y="1301.2349"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="709" y="1322.3735">unlock current message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="225" x="1141" y="1207.3481"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="205" x="1151" y="1228.4868">lock one message further ahead</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="925" x="455" y="1355.2036"/><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="756,1016.751,1079,1016.751,1091,1028.751,1079,1040.751,756,1040.751,744,1028.751,756,1016.751" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="921.5" y="1050.9614">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="323" x="756" y="1032.5591">Timestamp of next message is younger than of current?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="730" y="1026.1567">no</text><path d="M637,1407.6216 L637,1432.7544 A0,0 0 0 0 637,1432.7544 L821,1432.7544 A0,0 0 0 0 821,1432.7544 L821,1425.6216 L841,1420.188 L821,1417.6216 L821,1417.6216 L811,1407.6216 L637,1407.6216 A0,0 0 0 0 637,1407.6216 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M811,1407.6216 L811,1417.6216 L821,1417.6216 L811,1407.6216 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="163" x="643" y="1424.6885">One message still locked.</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="153" x="841" y="1403.2036"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="133" x="851" y="1424.3423">unlock next message</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1825" x="10" y="1469.1724"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="352" x="22" y="1652.4614"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="332" x="32" y="1673.6001">set last fetched message pointer to locked message</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="586" x="384" y="1578.0591"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="196" x="396" y="1652.4614"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="176" x="406" y="1673.6001">copy timestamp of message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="304" x="630" y="1652.4614"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="284" x="640" y="1673.6001">set latency value (now - message origin time)</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="662,1604.0591,902,1604.0591,914,1616.0591,902,1628.0591,662,1628.0591,650,1616.0591,662,1604.0591" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="786" y="1638.2695">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="240" x="662" y="1619.8672">Optional output argument "latency" given?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="914" y="1613.4648">no</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="782,1710.8325,794,1722.8325,782,1734.8325,770,1722.8325,782,1710.8325" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="586" x="384" y="1754.8325"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="163" x="998" y="1652.4614"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="143" x="1008" y="1673.6001">copy message payload</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="610" x="1199" y="1543.5747"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="296" x="1213" y="1569.5747"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="276" x="1223" y="1590.7134">decrement HRT counter of current message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="217" x="1252.5" y="1686.9458"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="197" x="1262.5" y="1708.0845">signal topic's condition variable</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1257.5,1638.5435,1464.5,1638.5435,1476.5,1650.5435,1464.5,1662.5435,1257.5,1662.5435,1245.5,1650.5435,1257.5,1638.5435" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1365" y="1672.7539">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="207" x="1257.5" y="1654.3516">At least one HRT counter became 0?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1476.5" y="1647.9492">no</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1361,1745.3169,1373,1757.3169,1361,1769.3169,1349,1757.3169,1361,1745.3169" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="1537" y="1652.4614"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="240" x="1547" y="1673.6001">update QoS delay timer (@subscriber)</text><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="610" x="1199" y="1789.3169"/><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1451.5,1495.1724,1558.5,1495.1724,1570.5,1507.1724,1558.5,1519.1724,1451.5,1519.1724,1439.5,1507.1724,1451.5,1495.1724" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1509" y="1529.3828">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="1451.5" y="1510.9805">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1570.5" y="1504.5781">no</text><polygon fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" points="1505,1815.3169,1517,1827.3169,1505,1839.3169,1493,1827.3169,1505,1815.3169" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#f1gna4y7n2gv27)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1825" x="10" y="1859.3169"/><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="856.5" y="1885.3169"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="866.5" y="1906.4556">unlock message</text><rect fill="#FEFECE" filter="url(#f1gna4y7n2gv27)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="869.5" y="1939.2856"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="879.5" y="1960.4243">unlock topic</text><path d="M704.5,1984.1216 L704.5,2024.3872 A0,0 0 0 0 704.5,2024.3872 L886.5,2024.3872 A0,0 0 0 0 886.5,2024.3872 L886.5,2008.2544 L906.5,2004.2544 L886.5,2000.2544 L886.5,1994.1216 L876.5,1984.1216 L704.5,1984.1216 A0,0 0 0 0 704.5,1984.1216 " fill="#FBFB77" filter="url(#f1gna4y7n2gv27)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M876.5,1984.1216 L876.5,1994.1216 L886.5,1994.1216 L876.5,1984.1216 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="704.5" x2="719" y1="1996.688" y2="1996.688"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="723" y="2000.6885"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="723" y="2000.6885">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="772" y="2000.6885"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="772" y="2000.6885">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="872" y="2000.6885"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="872" x2="886.5" y1="1996.688" y2="1996.688"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="710.5" y="2016.3213">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="763.5" y="2016.3213">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="867.5" y="2016.3213">.</text><ellipse cx="917.5" cy="2004.2544" fill="#FFFFFF" filter="url(#f1gna4y7n2gv27)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="917.5" cy="2004.2544" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="171.0898" y2="269.3203"/><polygon fill="#A80036" points="913.5,259.3203,917.5,269.3203,921.5,259.3203,917.5,263.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="888.875" x2="888.875" y1="643.7461" y2="663.7461"/><polygon fill="#A80036" points="884.875,653.7461,888.875,663.7461,892.875,653.7461,888.875,657.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1115.375" x2="1115.375" y1="643.7461" y2="663.7461"/><polygon fill="#A80036" points="1111.375,653.7461,1115.375,663.7461,1119.375,653.7461,1115.375,657.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="888.875" x2="888.875" y1="697.7148" y2="717.7148"/><polygon fill="#A80036" points="884.875,707.7148,888.875,717.7148,892.875,707.7148,888.875,711.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1115.375" x2="1115.375" y1="697.7148" y2="717.7148"/><polygon fill="#A80036" points="1111.375,707.7148,1115.375,717.7148,1119.375,707.7148,1115.375,711.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="606.0356" y2="637.7461"/><polygon fill="#A80036" points="1011.375,627.7461,1015.375,637.7461,1019.375,627.7461,1015.375,631.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="723.7148" y2="733.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1253.875" y1="733.7148" y2="733.7148"/><polygon fill="#A80036" points="1249.875,672.3281,1253.875,662.3281,1257.875,672.3281,1253.875,668.3281" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.875" x2="1253.875" y1="594.0356" y2="733.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.875" x2="1160.375" y1="594.0356" y2="594.0356"/><polygon fill="#A80036" points="1170.375,590.0356,1160.375,594.0356,1170.375,598.0356,1166.375,594.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="870.375" x2="776.875" y1="594.0356" y2="594.0356"/><polygon fill="#A80036" points="772.875,658.3281,776.875,668.3281,780.875,658.3281,776.875,662.3281" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="776.875" x2="776.875" y1="594.0356" y2="745.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="776.875" x2="1015.375" y1="745.7148" y2="745.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="745.7148" y2="765.7148"/><polygon fill="#A80036" points="1011.375,755.7148,1015.375,765.7148,1019.375,755.7148,1015.375,759.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="562.0356" y2="582.0356"/><polygon fill="#A80036" points="1011.375,572.0356,1015.375,582.0356,1019.375,572.0356,1015.375,576.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="469.2578" y2="528.0669"/><polygon fill="#A80036" points="1011.375,518.0669,1015.375,528.0669,1019.375,518.0669,1015.375,522.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1139.375" x2="1282.875" y1="457.2578" y2="457.2578"/><polygon fill="#A80036" points="1278.875,644.1797,1282.875,654.1797,1286.875,644.1797,1282.875,648.1797" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1282.875" x2="1282.875" y1="457.2578" y2="843.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1282.875" x2="1027.375" y1="843.6836" y2="843.6836"/><polygon fill="#A80036" points="1037.375,839.6836,1027.375,843.6836,1037.375,847.6836,1033.375,843.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="799.6836" y2="831.6836"/><polygon fill="#A80036" points="1011.375,821.6836,1015.375,831.6836,1019.375,821.6836,1015.375,825.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="425.2578" y2="445.2578"/><polygon fill="#A80036" points="1011.375,435.2578,1015.375,445.2578,1019.375,435.2578,1015.375,439.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1125.125" x2="1015.375" y1="369.2891" y2="369.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="369.2891" y2="391.2891"/><polygon fill="#A80036" points="1011.375,381.2891,1015.375,391.2891,1019.375,381.2891,1015.375,385.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1348.125" x2="1457.875" y1="369.2891" y2="369.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1457.875" y1="369.2891" y2="391.2891"/><polygon fill="#A80036" points="1453.875,381.2891,1457.875,391.2891,1461.875,381.2891,1457.875,385.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="855.6836" y2="873.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1224.625" y1="873.6836" y2="873.6836"/><polygon fill="#A80036" points="1214.625,869.6836,1224.625,873.6836,1214.625,877.6836,1218.625,873.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1457.875" y1="425.2578" y2="873.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1248.625" y1="873.6836" y2="873.6836"/><polygon fill="#A80036" points="1258.625,869.6836,1248.625,873.6836,1258.625,877.6836,1254.625,873.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="852" x2="598.375" y1="335.2891" y2="335.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="598.375" y1="335.2891" y2="357.2891"/><polygon fill="#A80036" points="594.375,347.2891,598.375,357.2891,602.375,347.2891,598.375,351.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="983" x2="1236.625" y1="335.2891" y2="335.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="1236.625" y1="335.2891" y2="357.2891"/><polygon fill="#A80036" points="1232.625,347.2891,1236.625,357.2891,1240.625,347.2891,1236.625,351.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="598.375" y1="391.2578" y2="903.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="905.5" y1="903.6836" y2="903.6836"/><polygon fill="#A80036" points="895.5,899.6836,905.5,903.6836,895.5,907.6836,899.5,903.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="1236.625" y1="885.6836" y2="903.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="929.5" y1="903.6836" y2="903.6836"/><polygon fill="#A80036" points="939.5,899.6836,929.5,903.6836,939.5,907.6836,935.5,903.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="303.2891" y2="323.2891"/><polygon fill="#A80036" points="913.5,313.2891,917.5,323.2891,921.5,313.2891,917.5,317.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="641" x2="641" y1="1152.8638" y2="1172.8638"/><polygon fill="#A80036" points="637,1162.8638,641,1172.8638,645,1162.8638,641,1166.8638" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="947" x2="947" y1="1152.8638" y2="1172.8638"/><polygon fill="#A80036" points="943,1162.8638,947,1172.8638,951,1162.8638,947,1166.8638" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="641" x2="641" y1="1206.8325" y2="1226.8325"/><polygon fill="#A80036" points="637,1216.8325,641,1226.8325,645,1216.8325,641,1220.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="947" x2="947" y1="1206.8325" y2="1226.8325"/><polygon fill="#A80036" points="943,1216.8325,947,1226.8325,951,1216.8325,947,1220.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="1122.4614" y2="1146.8638"/><polygon fill="#A80036" points="781,1136.8638,785,1146.8638,789,1136.8638,785,1140.8638" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="850.5" x2="1101" y1="1110.4614" y2="1110.4614"/><polygon fill="#A80036" points="1097,1179.8481,1101,1189.8481,1105,1179.8481,1101,1183.8481" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1101" x2="1101" y1="1110.4614" y2="1269.2349"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1101" x2="797" y1="1269.2349" y2="1269.2349"/><polygon fill="#A80036" points="807,1265.2349,797,1269.2349,807,1273.2349,803,1269.2349" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="1232.8325" y2="1257.2349"/><polygon fill="#A80036" points="781,1247.2349,785,1257.2349,789,1247.2349,785,1251.2349" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="1281.2349" y2="1301.2349"/><polygon fill="#A80036" points="781,1291.2349,785,1301.2349,789,1291.2349,785,1295.2349" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="1078.4614" y2="1098.4614"/><polygon fill="#A80036" points="781,1088.4614,785,1098.4614,789,1088.4614,785,1092.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.5" x2="1253.5" y1="1078.4614" y2="1207.3481"/><polygon fill="#A80036" points="1249.5,1197.3481,1253.5,1207.3481,1257.5,1197.3481,1253.5,1201.3481" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="1335.2036" y2="1355.2036"/><polygon fill="#A80036" points="781,1345.2036,785,1355.2036,789,1345.2036,785,1349.2036" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.5" x2="1253.5" y1="1241.3169" y2="1355.2036"/><polygon fill="#A80036" points="1249.5,1345.2036,1253.5,1355.2036,1257.5,1345.2036,1253.5,1349.2036" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1040.751" y2="1072.4614"/><polygon fill="#A80036" points="913.5,1062.4614,917.5,1072.4614,921.5,1062.4614,917.5,1066.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1361.2036" y2="1371.2036"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="1392" y1="1371.2036" y2="1371.2036"/><polygon fill="#A80036" points="1388,1215.9302,1392,1205.9302,1396,1215.9302,1392,1211.9302" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1392" x2="1392" y1="1028.751" y2="1371.2036"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1392" x2="1091" y1="1028.751" y2="1028.751"/><polygon fill="#A80036" points="1101,1024.751,1091,1028.751,1101,1032.751,1097,1028.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="744" x2="443" y1="1028.751" y2="1028.751"/><polygon fill="#A80036" points="439,1201.9302,443,1211.9302,447,1201.9302,443,1205.9302" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="443" x2="443" y1="1028.751" y2="1383.2036"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="443" x2="917.5" y1="1383.2036" y2="1383.2036"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1383.2036" y2="1403.2036"/><polygon fill="#A80036" points="913.5,1393.2036,917.5,1403.2036,921.5,1393.2036,917.5,1397.2036" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="996.751" y2="1016.751"/><polygon fill="#A80036" points="913.5,1006.751,917.5,1016.751,921.5,1006.751,917.5,1010.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="915.6836" y2="962.7822"/><polygon fill="#A80036" points="913.5,952.7822,917.5,962.7822,921.5,952.7822,917.5,956.7822" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1628.0591" y2="1652.4614"/><polygon fill="#A80036" points="778,1642.4614,782,1652.4614,786,1642.4614,782,1646.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="914" x2="944" y1="1616.0591" y2="1616.0591"/><polygon fill="#A80036" points="940,1659.4458,944,1669.4458,948,1659.4458,944,1663.4458" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="944" x2="944" y1="1616.0591" y2="1722.8325"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="944" x2="794" y1="1722.8325" y2="1722.8325"/><polygon fill="#A80036" points="804,1718.8325,794,1722.8325,804,1726.8325,800,1722.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1686.4302" y2="1710.8325"/><polygon fill="#A80036" points="778,1700.8325,782,1710.8325,786,1700.8325,782,1704.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="494" x2="494" y1="1584.0591" y2="1652.4614"/><polygon fill="#A80036" points="490,1642.4614,494,1652.4614,498,1642.4614,494,1646.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1584.0591" y2="1604.0591"/><polygon fill="#A80036" points="778,1594.0591,782,1604.0591,786,1594.0591,782,1598.0591" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="494" x2="494" y1="1686.4302" y2="1754.8325"/><polygon fill="#A80036" points="490,1744.8325,494,1754.8325,498,1744.8325,494,1748.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1734.8325" y2="1754.8325"/><polygon fill="#A80036" points="778,1744.8325,782,1754.8325,786,1744.8325,782,1748.8325" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1662.5435" y2="1686.9458"/><polygon fill="#A80036" points="1357,1676.9458,1361,1686.9458,1365,1676.9458,1361,1680.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1476.5" x2="1488.5" y1="1650.5435" y2="1650.5435"/><polygon fill="#A80036" points="1484.5,1693.9302,1488.5,1703.9302,1492.5,1693.9302,1488.5,1697.9302" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1488.5" x2="1488.5" y1="1650.5435" y2="1757.3169"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1488.5" x2="1373" y1="1757.3169" y2="1757.3169"/><polygon fill="#A80036" points="1383,1753.3169,1373,1757.3169,1383,1761.3169,1379,1757.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1720.9146" y2="1745.3169"/><polygon fill="#A80036" points="1357,1735.3169,1361,1745.3169,1365,1735.3169,1361,1739.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1603.5435" y2="1638.5435"/><polygon fill="#A80036" points="1357,1628.5435,1361,1638.5435,1365,1628.5435,1361,1632.5435" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1549.5747" y2="1569.5747"/><polygon fill="#A80036" points="1357,1559.5747,1361,1569.5747,1365,1559.5747,1361,1563.5747" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1667" x2="1667" y1="1549.5747" y2="1652.4614"/><polygon fill="#A80036" points="1663,1642.4614,1667,1652.4614,1671,1642.4614,1667,1646.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1769.3169" y2="1789.3169"/><polygon fill="#A80036" points="1357,1779.3169,1361,1789.3169,1365,1779.3169,1361,1783.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1667" x2="1667" y1="1686.4302" y2="1789.3169"/><polygon fill="#A80036" points="1663,1779.3169,1667,1789.3169,1671,1779.3169,1667,1783.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1519.1724" y2="1543.5747"/><polygon fill="#A80036" points="1501,1533.5747,1505,1543.5747,1509,1533.5747,1505,1537.5747" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1570.5" x2="1819" y1="1507.1724" y2="1507.1724"/><polygon fill="#A80036" points="1815,1659.4458,1819,1669.4458,1823,1659.4458,1819,1663.4458" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1819" x2="1819" y1="1507.1724" y2="1827.3169"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1819" x2="1517" y1="1827.3169" y2="1827.3169"/><polygon fill="#A80036" points="1527,1823.3169,1517,1827.3169,1527,1831.3169,1523,1827.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1795.3169" y2="1815.3169"/><polygon fill="#A80036" points="1501,1805.3169,1505,1815.3169,1509,1805.3169,1505,1809.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="198" x2="198" y1="1475.1724" y2="1652.4614"/><polygon fill="#A80036" points="194,1642.4614,198,1652.4614,202,1642.4614,198,1646.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="676" x2="676" y1="1475.1724" y2="1578.0591"/><polygon fill="#A80036" points="672,1568.0591,676,1578.0591,680,1568.0591,676,1572.0591" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1079.5" x2="1079.5" y1="1475.1724" y2="1652.4614"/><polygon fill="#A80036" points="1075.5,1642.4614,1079.5,1652.4614,1083.5,1642.4614,1079.5,1646.4614" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1475.1724" y2="1495.1724"/><polygon fill="#A80036" points="1501,1485.1724,1505,1495.1724,1509,1485.1724,1505,1489.1724" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="198" x2="198" y1="1686.4302" y2="1859.3169"/><polygon fill="#A80036" points="194,1849.3169,198,1859.3169,202,1849.3169,198,1853.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="676" x2="676" y1="1760.8325" y2="1859.3169"/><polygon fill="#A80036" points="672,1849.3169,676,1859.3169,680,1849.3169,676,1853.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1079.5" x2="1079.5" y1="1686.4302" y2="1859.3169"/><polygon fill="#A80036" points="1075.5,1849.3169,1079.5,1859.3169,1083.5,1849.3169,1079.5,1853.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1839.3169" y2="1859.3169"/><polygon fill="#A80036" points="1501,1849.3169,1505,1859.3169,1509,1849.3169,1505,1853.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1437.1724" y2="1469.1724"/><polygon fill="#A80036" points="913.5,1459.1724,917.5,1469.1724,921.5,1459.1724,917.5,1463.1724" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1865.3169" y2="1885.3169"/><polygon fill="#A80036" points="913.5,1875.3169,917.5,1885.3169,921.5,1875.3169,917.5,1879.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1919.2856" y2="1939.2856"/><polygon fill="#A80036" points="913.5,1929.2856,917.5,1939.2856,921.5,1929.2856,917.5,1933.2856" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1973.2544" y2="1993.2544"/><polygon fill="#A80036" points="913.5,1983.2544,917.5,1993.2544,921.5,1983.2544,917.5,1987.2544" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[182a4b501eba656a340bd6dd5b9ad214]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberFetchLatestMessage()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber that shall fetch the message.
21
  Must not be ""NULL"".
22
  - - ""**payload** : void*"" - -
23
  Pointer where to copy the payload to.
24
  May be ""NULL"" for messages without payload.
25
  - - ""**bytes** : size_t"" - -
26
  Payload size in bytes.
27
  - - ""**latency** : urt_delay_t*"" - -
28
  The latency can be returned by reference.
29
  May be ""NULL"".
30
end note
31

  
32

  
33
:lock topic;
34
if (Is HRT subscriber?) then (yes)
35
  :lock next message;
36
else (no)
37
  if (Has a message been read before?) then (yes)
38
    :lock last read message;
39
    if (Message timestamp equals local copy?) then (yes)
40
    else (no)
41
      partition "find oldest valid message" {
42
        :lock next message;
43
        note: Locked two messages ahead.
44
        while (Timestamp of next is younger than of current?) is (yes)
45
          fork
46
            :unlock current message;
47
          fork again
48
            :lock one message further ahead;
49
          endfork
50
        endwhile (no)
51
        :unlock next message;
52
        note: One message still locked.
53
      }
54
    endif
55
  else (no)
56
    :lock message after topic's latest message;
57
  endif
58
endif
59
partition "iterate to latest" {
60
  :lock one message further ahead;
61
  note: Locked two messages ahead.
62
  while (Timestamp of next message is younger than of current?) is (yes)
63
    fork
64
      if (Is HRT subscriber?) then (yes)
65
        fork
66
          :decrement HRT counter of current message;
67
        fork again
68
          :update QoS delay timer (@subscriber);
69
        endfork
70
      else (no)
71
      endif
72
      :unlock current message;
73
    fork again
74
      :lock one message further ahead;
75
    endfork
76
  endwhile (no)
77
  :unlock next message;
78
  note: One message still locked.
79
}
80
fork
81
  :set last fetched message pointer to locked message;
82
fork again
83
  fork
84
    :copy timestamp of message;
85
  fork again
86
    if (Optional output argument "latency" given?) then (yes)
87
      :set latency value (now - message origin time);
88
    else (no)
89
    endif
90
  endfork
91
fork again
92
  :copy message payload;
93
fork again
94
  if (Is HRT subscriber?) then (yes)
95
    fork
96
      :decrement HRT counter of current message;
97
      if (At least one HRT counter became 0?) then (yes)
98
        :signal topic's condition variable;
99
      else (no)
100
      endif
101
    fork again
102
      :update QoS delay timer (@subscriber);
103
    endfork
104
  else (no)
105
  endif
106
endfork
107
:unlock message;
108
:unlock topic;
109

  
110

  
111
stop
112
note
113
  - - **return** ""urt_status_t"" - -
114
  Returns ""URT_STATUS_OK"".
115
end note
116

  
117

  
118
@enduml
119

  
120
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
121
(GPL source distribution)
122
Java Runtime: OpenJDK Runtime Environment
123
JVM: OpenJDK 64-Bit Server VM
124
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
125
Operating System: Linux
126
Default Encoding: UTF-8
127
Language: en
128
Country: US
129
--></g></svg>
doc/activitydiagrams/subscriber/urtSubscriberFetchLatestMessage.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtSubscriberFetchLatestMessage()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**subscriber** : urt_subscriber_t*"" --
35
  The subscriber that shall fetch the message.
36
  Must not be ""NULL"".
37
  -- ""**payload** : void*"" --
38
  Pointer where to copy the payload to.
39
  May be ""NULL"" for messages without payload.
40
  -- ""**bytes** : size_t"" --
41
  Payload size in bytes.
42
  -- ""**latency** : urt_delay_t*"" --
43
  The latency can be returned by reference.
44
  May be ""NULL"".
45
end note
46

  
47
/'### PROCEDURE ##############################################################'/
48

  
49
:lock topic;
50
if (Is HRT subscriber?) then (yes)
51
  :lock next message;
52
else (no)
53
  if (Has a message been read before?) then (yes)
54
    :lock last read message;
55
    if (Message timestamp equals local copy?) then (yes)
56
    else (no)
57
      partition "find oldest valid message" {
58
        :lock next message;
59
        note: Locked two messages ahead.
60
        while (Timestamp of next is younger than of current?) is (yes)
61
          fork
62
            :unlock current message;
63
          fork again
64
            :lock one message further ahead;
65
          endfork
66
        endwhile (no)
67
        :unlock next message;
68
        note: One message still locked.
69
      }
70
    endif
71
  else (no)
72
    :lock message after topic's latest message;
73
  endif
74
endif
75
partition "iterate to latest" {
76
  :lock one message further ahead;
77
  note: Locked two messages ahead.
78
  while (Timestamp of next message is younger than of current?) is (yes)
79
    fork
80
      if (Is HRT subscriber?) then (yes)
81
        fork
82
          :decrement HRT counter of current message;
83
        fork again
84
          :update QoS delay timer (@subscriber);
85
        endfork
86
      else (no)
87
      endif
88
      :unlock current message;
89
    fork again
90
      :lock one message further ahead;
91
    endfork
92
  endwhile (no)
93
  :unlock next message;
94
  note: One message still locked.
95
}
96
fork
97
  :set last fetched message pointer to locked message;
98
fork again
99
  fork
100
    :copy timestamp of message;
101
  fork again
102
    if (Optional output argument "latency" given?) then (yes)
103
      :set latency value (now - message origin time);
104
    else (no)
105
    endif
106
  endfork
107
fork again
108
  :copy message payload;
109
fork again
110
  if (Is HRT subscriber?) then (yes)
111
    fork
112
      :decrement HRT counter of current message;
113
      if (At least one HRT counter became 0?) then (yes)
114
        :signal topic's condition variable;
115
      else (no)
116
      endif
117
    fork again
118
      :update QoS delay timer (@subscriber);
119
    endfork
120
  else (no)
121
  endif
122
endfork
123
:unlock message;
124
:unlock topic;
125

  
126
/'### STOP & RETURN ##########################################################'/
127

  
128
stop
129
note
130
  -- **return** ""urt_status_t"" --
131
  Returns ""URT_STATUS_OK"".
132
end note
133

  
134
/'### OUTRO ##################################################################'/
135

  
136
@enduml
doc/activitydiagrams/subscriber/urtSubscriberFetchNextMessage.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1502px" preserveAspectRatio="none" style="width:1846px;height:1502px;" version="1.1" viewBox="0 0 1846 1502" width="1846px" zoomAndPan="magnify"><defs><filter height="300%" id="fxzoig5nbtsvt" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="877.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="299" x="772.5" y="47.6611">urtSubscriberFetchNextMessage()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="925" y="68.6143"/><path d="M582.5,72.8594 L582.5,249.3203 A0,0 0 0 0 582.5,249.3203 L887.5,249.3203 A0,0 0 0 0 887.5,249.3203 L887.5,165.0898 L907.5,161.0898 L887.5,157.0898 L887.5,82.8594 L877.5,72.8594 L582.5,72.8594 A0,0 0 0 0 582.5,72.8594 " fill="#FBFB77" filter="url(#fxzoig5nbtsvt)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M877.5,72.8594 L877.5,82.8594 L887.5,82.8594 L877.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="611" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="615" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="615" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="703" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="859" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="859" x2="887.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="284" x="588.5" y="105.0591">The subscriber that shall fetch the message.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="588.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="668.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="700.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="671" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="675" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="675" y="134.8247">payload</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="739" y="134.8247">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="799" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="799" x2="887.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="238" x="588.5" y="150.4575">Pointer where to copy the payload to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="588.5" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="638.5" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="674.5" y="165.5903">for messages without payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="675" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="679" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="679" y="180.2231">bytes</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="64" x="727" y="180.2231">: size_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="795" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="795" x2="887.5" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="137" x="588.5" y="195.856">Payload size in bytes.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="582.5" x2="643" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="647" y="210.4888"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="647" y="210.4888">latency</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="711" y="210.4888">: urt_delay_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="827" y="210.4888"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="827" x2="887.5" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="267" x="588.5" y="226.1216">The latency can be returned by reference.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="588.5" y="241.2544">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="638.5" y="241.2544">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="670.5" y="241.2544">.</text><ellipse cx="917.5" cy="161.0898" fill="#000000" filter="url(#fxzoig5nbtsvt)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="877.5" y="269.3203"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="887.5" y="290.459">lock topic</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="864,323.2891,971,323.2891,983,335.2891,971,347.2891,864,347.2891,852,335.2891,864,323.2891" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="864" y="339.0972">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="832" y="332.6948">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="983" y="332.6948">no</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="529.875" y="357.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="539.875" y="378.4277">lock next message</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1137.125,357.2891,1336.125,357.2891,1348.125,369.2891,1336.125,381.2891,1137.125,381.2891,1125.125,369.2891,1137.125,357.2891" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="199" x="1137.125" y="373.0972">Has a message been read before?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1105.125" y="366.6948">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1348.125" y="366.6948">no</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="166" x="932.375" y="391.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="146" x="942.375" y="412.4277">lock last read message</text><rect fill="#FFFFFF" filter="url(#fxzoig5nbtsvt)" height="319.9136" style="stroke: #000000; stroke-width: 2.0;" width="566" x="706.875" y="491.77"/><path d="M890.875,492.77 L890.875,501.0669 L880.875,511.0669 L706.875,511.0669 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="174" x="709.875" y="505.7651">find oldest valid message</text><path d="M716.875,532.4849 L716.875,557.6177 A0,0 0 0 0 716.875,557.6177 L926.875,557.6177 A0,0 0 0 0 926.875,557.6177 L926.875,550.4849 L946.875,545.0513 L926.875,542.4849 L926.875,542.4849 L916.875,532.4849 L716.875,532.4849 A0,0 0 0 0 716.875,532.4849 " fill="#FBFB77" filter="url(#fxzoig5nbtsvt)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M916.875,532.4849 L916.875,542.4849 L926.875,542.4849 L916.875,532.4849 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="189" x="722.875" y="549.5518">Locked two messages ahead.</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="946.875" y="528.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="956.875" y="549.2056">lock next message</text><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="453" x="788.875" y="637.7461"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="172" x="802.875" y="663.7461"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="812.875" y="684.8848">unlock current message</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="225" x="1002.875" y="663.7461"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="205" x="1012.875" y="684.8848">lock one message further ahead</text><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="453" x="788.875" y="717.7148"/><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="853.875,582.0356,1176.875,582.0356,1188.875,594.0356,1176.875,606.0356,853.875,606.0356,841.875,594.0356,853.875,582.0356" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1019.375" y="616.2461">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="323" x="853.875" y="597.8438">Timestamp of next message is younger than of current?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="827.875" y="591.4414">no</text><path d="M734.875,770.1328 L734.875,795.2656 A0,0 0 0 0 734.875,795.2656 L918.875,795.2656 A0,0 0 0 0 918.875,795.2656 L918.875,788.1328 L938.875,782.6992 L918.875,780.1328 L918.875,780.1328 L908.875,770.1328 L734.875,770.1328 A0,0 0 0 0 734.875,770.1328 " fill="#FBFB77" filter="url(#fxzoig5nbtsvt)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M908.875,770.1328 L908.875,780.1328 L918.875,780.1328 L908.875,770.1328 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="163" x="740.875" y="787.1997">One message still locked.</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="153" x="938.875" y="765.7148"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="133" x="948.875" y="786.8535">unlock next message</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="903.375,445.2578,1127.375,445.2578,1139.375,457.2578,1127.375,469.2578,903.375,469.2578,891.375,457.2578,903.375,445.2578" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1019.375" y="479.4683">no</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="224" x="903.375" y="461.0659">Message timestamp equals local copy?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1139.375" y="454.6636">yes</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1015.375,831.6836,1027.375,843.6836,1015.375,855.6836,1003.375,843.6836,1015.375,831.6836" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="286" x="1314.875" y="391.2891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="266" x="1324.875" y="412.4277">lock message after topic's latest message</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1236.625,861.6836,1248.625,873.6836,1236.625,885.6836,1224.625,873.6836,1236.625,861.6836" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="917.5,891.6836,929.5,903.6836,917.5,915.6836,905.5,903.6836,917.5,891.6836" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1825" x="10" y="935.6836"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="352" x="22" y="1118.9727"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="332" x="32" y="1140.1113">set last fetched message pointer to locked message</text><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="586" x="384" y="1044.5703"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="196" x="396" y="1118.9727"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="176" x="406" y="1140.1113">copy timestamp of message</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="304" x="630" y="1118.9727"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="284" x="640" y="1140.1113">set latency value (now - message origin time)</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="662,1070.5703,902,1070.5703,914,1082.5703,902,1094.5703,662,1094.5703,650,1082.5703,662,1070.5703" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="786" y="1104.7808">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="240" x="662" y="1086.3784">Optional output argument "latency" given?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="914" y="1079.9761">no</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="782,1177.3438,794,1189.3438,782,1201.3438,770,1189.3438,782,1177.3438" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="586" x="384" y="1221.3438"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="163" x="998" y="1118.9727"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="143" x="1008" y="1140.1113">copy message payload</text><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="610" x="1199" y="1010.0859"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="296" x="1213" y="1036.0859"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="276" x="1223" y="1057.2246">decrement HRT counter of current message</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="217" x="1252.5" y="1153.457"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="197" x="1262.5" y="1174.5957">signal topic's condition variable</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1293.5,1105.0547,1428.5,1105.0547,1440.5,1117.0547,1428.5,1129.0547,1293.5,1129.0547,1281.5,1117.0547,1293.5,1105.0547" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1365" y="1139.2651">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="135" x="1293.5" y="1120.8628">HRT counter became 0?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1440.5" y="1114.4604">no</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1361,1211.8281,1373,1223.8281,1361,1235.8281,1349,1223.8281,1361,1211.8281" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="1537" y="1118.9727"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="240" x="1547" y="1140.1113">update QoS delay timer (@subscriber)</text><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="610" x="1199" y="1255.8281"/><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1451.5,961.6836,1558.5,961.6836,1570.5,973.6836,1558.5,985.6836,1451.5,985.6836,1439.5,973.6836,1451.5,961.6836" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1509" y="995.894">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="1451.5" y="977.4917">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1570.5" y="971.0894">no</text><polygon fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" points="1505,1281.8281,1517,1293.8281,1505,1305.8281,1493,1293.8281,1505,1281.8281" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#fxzoig5nbtsvt)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1825" x="10" y="1325.8281"/><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="856.5" y="1351.8281"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="866.5" y="1372.9668">unlock message</text><rect fill="#FEFECE" filter="url(#fxzoig5nbtsvt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="869.5" y="1405.7969"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="879.5" y="1426.9355">unlock topic</text><path d="M704.5,1450.6328 L704.5,1490.8984 A0,0 0 0 0 704.5,1490.8984 L886.5,1490.8984 A0,0 0 0 0 886.5,1490.8984 L886.5,1474.7656 L906.5,1470.7656 L886.5,1466.7656 L886.5,1460.6328 L876.5,1450.6328 L704.5,1450.6328 A0,0 0 0 0 704.5,1450.6328 " fill="#FBFB77" filter="url(#fxzoig5nbtsvt)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M876.5,1450.6328 L876.5,1460.6328 L886.5,1460.6328 L876.5,1450.6328 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="704.5" x2="719" y1="1463.1992" y2="1463.1992"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="723" y="1467.1997"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="723" y="1467.1997">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="772" y="1467.1997"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="772" y="1467.1997">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="872" y="1467.1997"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="872" x2="886.5" y1="1463.1992" y2="1463.1992"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="710.5" y="1482.8325">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="763.5" y="1482.8325">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="867.5" y="1482.8325">.</text><ellipse cx="917.5" cy="1470.7656" fill="#FFFFFF" filter="url(#fxzoig5nbtsvt)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="917.5" cy="1470.7656" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="171.0898" y2="269.3203"/><polygon fill="#A80036" points="913.5,259.3203,917.5,269.3203,921.5,259.3203,917.5,263.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="888.875" x2="888.875" y1="643.7461" y2="663.7461"/><polygon fill="#A80036" points="884.875,653.7461,888.875,663.7461,892.875,653.7461,888.875,657.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1115.375" x2="1115.375" y1="643.7461" y2="663.7461"/><polygon fill="#A80036" points="1111.375,653.7461,1115.375,663.7461,1119.375,653.7461,1115.375,657.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="888.875" x2="888.875" y1="697.7148" y2="717.7148"/><polygon fill="#A80036" points="884.875,707.7148,888.875,717.7148,892.875,707.7148,888.875,711.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1115.375" x2="1115.375" y1="697.7148" y2="717.7148"/><polygon fill="#A80036" points="1111.375,707.7148,1115.375,717.7148,1119.375,707.7148,1115.375,711.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="606.0356" y2="637.7461"/><polygon fill="#A80036" points="1011.375,627.7461,1015.375,637.7461,1019.375,627.7461,1015.375,631.7461" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="723.7148" y2="733.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1253.875" y1="733.7148" y2="733.7148"/><polygon fill="#A80036" points="1249.875,672.3281,1253.875,662.3281,1257.875,672.3281,1253.875,668.3281" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.875" x2="1253.875" y1="594.0356" y2="733.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1253.875" x2="1188.875" y1="594.0356" y2="594.0356"/><polygon fill="#A80036" points="1198.875,590.0356,1188.875,594.0356,1198.875,598.0356,1194.875,594.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="841.875" x2="776.875" y1="594.0356" y2="594.0356"/><polygon fill="#A80036" points="772.875,658.3281,776.875,668.3281,780.875,658.3281,776.875,662.3281" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="776.875" x2="776.875" y1="594.0356" y2="745.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="776.875" x2="1015.375" y1="745.7148" y2="745.7148"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="745.7148" y2="765.7148"/><polygon fill="#A80036" points="1011.375,755.7148,1015.375,765.7148,1019.375,755.7148,1015.375,759.7148" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="562.0356" y2="582.0356"/><polygon fill="#A80036" points="1011.375,572.0356,1015.375,582.0356,1019.375,572.0356,1015.375,576.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="469.2578" y2="528.0669"/><polygon fill="#A80036" points="1011.375,518.0669,1015.375,528.0669,1019.375,518.0669,1015.375,522.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1139.375" x2="1282.875" y1="457.2578" y2="457.2578"/><polygon fill="#A80036" points="1278.875,644.1797,1282.875,654.1797,1286.875,644.1797,1282.875,648.1797" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1282.875" x2="1282.875" y1="457.2578" y2="843.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1282.875" x2="1027.375" y1="843.6836" y2="843.6836"/><polygon fill="#A80036" points="1037.375,839.6836,1027.375,843.6836,1037.375,847.6836,1033.375,843.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="799.6836" y2="831.6836"/><polygon fill="#A80036" points="1011.375,821.6836,1015.375,831.6836,1019.375,821.6836,1015.375,825.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="425.2578" y2="445.2578"/><polygon fill="#A80036" points="1011.375,435.2578,1015.375,445.2578,1019.375,435.2578,1015.375,439.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1125.125" x2="1015.375" y1="369.2891" y2="369.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="369.2891" y2="391.2891"/><polygon fill="#A80036" points="1011.375,381.2891,1015.375,391.2891,1019.375,381.2891,1015.375,385.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1348.125" x2="1457.875" y1="369.2891" y2="369.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1457.875" y1="369.2891" y2="391.2891"/><polygon fill="#A80036" points="1453.875,381.2891,1457.875,391.2891,1461.875,381.2891,1457.875,385.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1015.375" y1="855.6836" y2="873.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1015.375" x2="1224.625" y1="873.6836" y2="873.6836"/><polygon fill="#A80036" points="1214.625,869.6836,1224.625,873.6836,1214.625,877.6836,1218.625,873.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1457.875" y1="425.2578" y2="873.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1457.875" x2="1248.625" y1="873.6836" y2="873.6836"/><polygon fill="#A80036" points="1258.625,869.6836,1248.625,873.6836,1258.625,877.6836,1254.625,873.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="852" x2="598.375" y1="335.2891" y2="335.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="598.375" y1="335.2891" y2="357.2891"/><polygon fill="#A80036" points="594.375,347.2891,598.375,357.2891,602.375,347.2891,598.375,351.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="983" x2="1236.625" y1="335.2891" y2="335.2891"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="1236.625" y1="335.2891" y2="357.2891"/><polygon fill="#A80036" points="1232.625,347.2891,1236.625,357.2891,1240.625,347.2891,1236.625,351.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="598.375" y1="391.2578" y2="903.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="598.375" x2="905.5" y1="903.6836" y2="903.6836"/><polygon fill="#A80036" points="895.5,899.6836,905.5,903.6836,895.5,907.6836,899.5,903.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="1236.625" y1="885.6836" y2="903.6836"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1236.625" x2="929.5" y1="903.6836" y2="903.6836"/><polygon fill="#A80036" points="939.5,899.6836,929.5,903.6836,939.5,907.6836,935.5,903.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="303.2891" y2="323.2891"/><polygon fill="#A80036" points="913.5,313.2891,917.5,323.2891,921.5,313.2891,917.5,317.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1094.5703" y2="1118.9727"/><polygon fill="#A80036" points="778,1108.9727,782,1118.9727,786,1108.9727,782,1112.9727" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="914" x2="944" y1="1082.5703" y2="1082.5703"/><polygon fill="#A80036" points="940,1125.957,944,1135.957,948,1125.957,944,1129.957" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="944" x2="944" y1="1082.5703" y2="1189.3438"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="944" x2="794" y1="1189.3438" y2="1189.3438"/><polygon fill="#A80036" points="804,1185.3438,794,1189.3438,804,1193.3438,800,1189.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1152.9414" y2="1177.3438"/><polygon fill="#A80036" points="778,1167.3438,782,1177.3438,786,1167.3438,782,1171.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="494" x2="494" y1="1050.5703" y2="1118.9727"/><polygon fill="#A80036" points="490,1108.9727,494,1118.9727,498,1108.9727,494,1112.9727" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1050.5703" y2="1070.5703"/><polygon fill="#A80036" points="778,1060.5703,782,1070.5703,786,1060.5703,782,1064.5703" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="494" x2="494" y1="1152.9414" y2="1221.3438"/><polygon fill="#A80036" points="490,1211.3438,494,1221.3438,498,1211.3438,494,1215.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="782" x2="782" y1="1201.3438" y2="1221.3438"/><polygon fill="#A80036" points="778,1211.3438,782,1221.3438,786,1211.3438,782,1215.3438" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1129.0547" y2="1153.457"/><polygon fill="#A80036" points="1357,1143.457,1361,1153.457,1365,1143.457,1361,1147.457" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1440.5" x2="1479.5" y1="1117.0547" y2="1117.0547"/><polygon fill="#A80036" points="1475.5,1160.4414,1479.5,1170.4414,1483.5,1160.4414,1479.5,1164.4414" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1479.5" x2="1479.5" y1="1117.0547" y2="1223.8281"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1479.5" x2="1373" y1="1223.8281" y2="1223.8281"/><polygon fill="#A80036" points="1383,1219.8281,1373,1223.8281,1383,1227.8281,1379,1223.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1187.4258" y2="1211.8281"/><polygon fill="#A80036" points="1357,1201.8281,1361,1211.8281,1365,1201.8281,1361,1205.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1070.0547" y2="1105.0547"/><polygon fill="#A80036" points="1357,1095.0547,1361,1105.0547,1365,1095.0547,1361,1099.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1016.0859" y2="1036.0859"/><polygon fill="#A80036" points="1357,1026.0859,1361,1036.0859,1365,1026.0859,1361,1030.0859" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1667" x2="1667" y1="1016.0859" y2="1118.9727"/><polygon fill="#A80036" points="1663,1108.9727,1667,1118.9727,1671,1108.9727,1667,1112.9727" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1361" x2="1361" y1="1235.8281" y2="1255.8281"/><polygon fill="#A80036" points="1357,1245.8281,1361,1255.8281,1365,1245.8281,1361,1249.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1667" x2="1667" y1="1152.9414" y2="1255.8281"/><polygon fill="#A80036" points="1663,1245.8281,1667,1255.8281,1671,1245.8281,1667,1249.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="985.6836" y2="1010.0859"/><polygon fill="#A80036" points="1501,1000.0859,1505,1010.0859,1509,1000.0859,1505,1004.0859" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1570.5" x2="1819" y1="973.6836" y2="973.6836"/><polygon fill="#A80036" points="1815,1125.957,1819,1135.957,1823,1125.957,1819,1129.957" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1819" x2="1819" y1="973.6836" y2="1293.8281"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1819" x2="1517" y1="1293.8281" y2="1293.8281"/><polygon fill="#A80036" points="1527,1289.8281,1517,1293.8281,1527,1297.8281,1523,1293.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1261.8281" y2="1281.8281"/><polygon fill="#A80036" points="1501,1271.8281,1505,1281.8281,1509,1271.8281,1505,1275.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="198" x2="198" y1="941.6836" y2="1118.9727"/><polygon fill="#A80036" points="194,1108.9727,198,1118.9727,202,1108.9727,198,1112.9727" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="676" x2="676" y1="941.6836" y2="1044.5703"/><polygon fill="#A80036" points="672,1034.5703,676,1044.5703,680,1034.5703,676,1038.5703" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1079.5" x2="1079.5" y1="941.6836" y2="1118.9727"/><polygon fill="#A80036" points="1075.5,1108.9727,1079.5,1118.9727,1083.5,1108.9727,1079.5,1112.9727" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="941.6836" y2="961.6836"/><polygon fill="#A80036" points="1501,951.6836,1505,961.6836,1509,951.6836,1505,955.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="198" x2="198" y1="1152.9414" y2="1325.8281"/><polygon fill="#A80036" points="194,1315.8281,198,1325.8281,202,1315.8281,198,1319.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="676" x2="676" y1="1227.3438" y2="1325.8281"/><polygon fill="#A80036" points="672,1315.8281,676,1325.8281,680,1315.8281,676,1319.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1079.5" x2="1079.5" y1="1152.9414" y2="1325.8281"/><polygon fill="#A80036" points="1075.5,1315.8281,1079.5,1325.8281,1083.5,1315.8281,1079.5,1319.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1505" x2="1505" y1="1305.8281" y2="1325.8281"/><polygon fill="#A80036" points="1501,1315.8281,1505,1325.8281,1509,1315.8281,1505,1319.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="915.6836" y2="935.6836"/><polygon fill="#A80036" points="913.5,925.6836,917.5,935.6836,921.5,925.6836,917.5,929.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1331.8281" y2="1351.8281"/><polygon fill="#A80036" points="913.5,1341.8281,917.5,1351.8281,921.5,1341.8281,917.5,1345.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1385.7969" y2="1405.7969"/><polygon fill="#A80036" points="913.5,1395.7969,917.5,1405.7969,921.5,1395.7969,917.5,1399.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="917.5" x2="917.5" y1="1439.7656" y2="1459.7656"/><polygon fill="#A80036" points="913.5,1449.7656,917.5,1459.7656,921.5,1449.7656,917.5,1453.7656" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[804dba0a3dfc14e378c76df0975152bd]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberFetchNextMessage()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber that shall fetch the message.
21
  Must not be ""NULL"".
22
  - - ""**payload** : void*"" - -
23
  Pointer where to copy the payload to.
24
  May be ""NULL"" for messages without payload.
25
  - - ""**bytes** : size_t"" - -
26
  Payload size in bytes.
27
  - - ""**latency** : urt_delay_t*"" - -
28
  The latency can be returned by reference.
29
  May be ""NULL"".
30
end note
31

  
32

  
33
:lock topic;
34
if (Is HRT subscriber?) then (yes)
35
  :lock next message;
36
else (no)
37
  if (Has a message been read before?) then (yes)
38
    :lock last read message;
39
    if (Message timestamp equals local copy?) then (yes)
40
    else (no)
41
      partition "find oldest valid message" {
42
        :lock next message;
43
        note: Locked two messages ahead.
44
        while (Timestamp of next message is younger than of current?) is (yes)
45
          fork
46
            :unlock current message;
47
          fork again
48
            :lock one message further ahead;
49
          endfork
50
        endwhile (no)
51
        :unlock next message;
52
        note: One message still locked.
53
      }
54
    endif
55
  else (no)
56
    :lock message after topic's latest message;
57
  endif
58
endif
59
fork
60
  :set last fetched message pointer to locked message;
61
fork again
62
  fork
63
    :copy timestamp of message;
64
  fork again
65
    if (Optional output argument "latency" given?) then (yes)
66
      :set latency value (now - message origin time);
67
    else (no)
68
    endif
69
  endfork
70
fork again
71
  :copy message payload;
72
fork again
73
  if (Is HRT subscriber?) then (yes)
74
    fork
75
      :decrement HRT counter of current message;
76
      if (HRT counter became 0?) then (yes)
77
        :signal topic's condition variable;
78
      else (no)
79
      endif
80
    fork again
81
      :update QoS delay timer (@subscriber);
82
    endfork
83
  else (no)
84
  endif
85
endfork
86
:unlock message;
87
:unlock topic;
88

  
89

  
90
stop
91
note
92
  - - **return** ""urt_status_t"" - -
93
  Returns ""URT_STATUS_OK"".
94
end note
95

  
96

  
97
@enduml
98

  
99
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
100
(GPL source distribution)
101
Java Runtime: OpenJDK Runtime Environment
102
JVM: OpenJDK 64-Bit Server VM
103
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
104
Operating System: Linux
105
Default Encoding: UTF-8
106
Language: en
107
Country: US
108
--></g></svg>
doc/activitydiagrams/subscriber/urtSubscriberFetchNextMessage.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtSubscriberFetchNextMessage()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**subscriber** : urt_subscriber_t*"" --
35
  The subscriber that shall fetch the message.
36
  Must not be ""NULL"".
37
  -- ""**payload** : void*"" --
38
  Pointer where to copy the payload to.
39
  May be ""NULL"" for messages without payload.
40
  -- ""**bytes** : size_t"" --
41
  Payload size in bytes.
42
  -- ""**latency** : urt_delay_t*"" --
43
  The latency can be returned by reference.
44
  May be ""NULL"".
45
end note
46

  
47
/'### PROCEDURE ##############################################################'/
48

  
49
:lock topic;
50
if (Is HRT subscriber?) then (yes)
51
  :lock next message;
52
else (no)
53
  if (Has a message been read before?) then (yes)
54
    :lock last read message;
55
    if (Message timestamp equals local copy?) then (yes)
56
    else (no)
57
      partition "find oldest valid message" {
58
        :lock next message;
59
        note: Locked two messages ahead.
60
        while (Timestamp of next message is younger than of current?) is (yes)
61
          fork
62
            :unlock current message;
63
          fork again
64
            :lock one message further ahead;
65
          endfork
66
        endwhile (no)
67
        :unlock next message;
68
        note: One message still locked.
69
      }
70
    endif
71
  else (no)
72
    :lock message after topic's latest message;
73
  endif
74
endif
75
fork
76
  :set last fetched message pointer to locked message;
77
fork again
78
  fork
79
    :copy timestamp of message;
80
  fork again
81
    if (Optional output argument "latency" given?) then (yes)
82
      :set latency value (now - message origin time);
83
    else (no)
84
    endif
85
  endfork
86
fork again
87
  :copy message payload;
88
fork again
89
  if (Is HRT subscriber?) then (yes)
90
    fork
91
      :decrement HRT counter of current message;
92
      if (HRT counter became 0?) then (yes)
93
        :signal topic's condition variable;
94
      else (no)
95
      endif
96
    fork again
97
      :update QoS delay timer (@subscriber);
98
    endfork
99
  else (no)
100
  endif
101
endfork
102
:unlock message;
103
:unlock topic;
104

  
105
/'### STOP & RETURN ##########################################################'/
106

  
107
stop
108
note
109
  -- **return** ""urt_status_t"" --
110
  Returns ""URT_STATUS_OK"".
111
end note
112

  
113
/'### OUTRO ##################################################################'/
114

  
115
@enduml
doc/activitydiagrams/subscriber/urtSubscriberInit.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="245px" preserveAspectRatio="none" style="width:385px;height:245px;" version="1.1" viewBox="0 0 385 245" width="385px" zoomAndPan="magnify"><defs><filter height="300%" id="f6uexfk9udhqe" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="147.25" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="162" x="110.75" y="47.6611">urtSubscriberInit()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="194.75" y="68.6143"/><path d="M10,72.8594 L10,128.2578 A0,0 0 0 0 10,128.2578 L279,128.2578 A0,0 0 0 0 279,128.2578 L279,104.5586 L299,100.5586 L279,96.5586 L279,82.8594 L269,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#f6uexfk9udhqe)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M269,72.8594 L269,82.8594 L279,82.8594 L269,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="20.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="24.5" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="24.5" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="112.5" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="268.5" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="268.5" x2="279" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="169" x="16" y="105.0591">The subscriber to initialize.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><ellipse cx="309" cy="100.5586" fill="#000000" filter="url(#f6uexfk9udhqe)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f6uexfk9udhqe)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="131" x="243.5" y="148.2578"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="253.5" y="169.3965">initialize members</text><path d="M96,193.0938 L96,233.3594 A0,0 0 0 0 96,233.3594 L278,233.3594 A0,0 0 0 0 278,233.3594 L278,217.2266 L298,213.2266 L278,209.2266 L278,203.0938 L268,193.0938 L96,193.0938 A0,0 0 0 0 96,193.0938 " fill="#FBFB77" filter="url(#f6uexfk9udhqe)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M268,193.0938 L268,203.0938 L278,203.0938 L268,193.0938 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="96" x2="110.5" y1="205.6602" y2="205.6602"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="114.5" y="209.6606"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="114.5" y="209.6606">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="163.5" y="209.6606"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="163.5" y="209.6606">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="263.5" y="209.6606"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="263.5" x2="278" y1="205.6602" y2="205.6602"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="102" y="225.2935">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="155" y="225.2935">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="259" y="225.2935">.</text><ellipse cx="309" cy="213.2266" fill="#FFFFFF" filter="url(#f6uexfk9udhqe)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="309" cy="213.2266" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="309" x2="309" y1="110.5586" y2="148.2578"/><polygon fill="#A80036" points="305,138.2578,309,148.2578,313,138.2578,309,142.2578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="309" x2="309" y1="182.2266" y2="202.2266"/><polygon fill="#A80036" points="305,192.2266,309,202.2266,313,192.2266,309,196.2266" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[ffaca355b74f349bc9f1411a91e3e6e0]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberInit()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber to initialize.
21
  Must not be ""NULL"".
22
end note
23

  
24

  
25
:initialize members;
26

  
27

  
28
stop
29
note
30
  - - **return** ""urt_status_t"" - -
31
  Returns ""URT_STATUS_OK"".
32
end note
33

  
34

  
35
@enduml
36

  
37
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
38
(GPL source distribution)
39
Java Runtime: OpenJDK Runtime Environment
40
JVM: OpenJDK 64-Bit Server VM
41
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
42
Operating System: Linux
43
Default Encoding: UTF-8
44
Language: en
45
Country: US
46
--></g></svg>
doc/activitydiagrams/subscriber/urtSubscriberInit.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtSubscriberInit()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**subscriber** : urt_subscriber_t*"" --
35
  The subscriber to initialize.
36
  Must not be ""NULL"".
37
end note
38

  
39
/'### PROCEDURE ##############################################################'/
40

  
41
:initialize members;
42

  
43
/'### STOP & RETURN ##########################################################'/
44

  
45
stop
46
note
47
  -- **return** ""urt_status_t"" --
48
  Returns ""URT_STATUS_OK"".
49
end note
50

  
51
/'### OUTRO ##################################################################'/
52

  
53
@enduml
doc/activitydiagrams/subscriber/urtSubscriberSubscribeFrt.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1079px" preserveAspectRatio="none" style="width:1747px;height:1079px;" version="1.1" viewBox="0 0 1747 1079" width="1747px" zoomAndPan="magnify"><defs><filter height="300%" id="f555gmqt6z79y" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="828.375" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="158" x="793.875" y="47.6611">urtSubscriberFrt()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="875.875" y="68.6143"/><path d="M10,72.8594 L10,370.3828 A0,0 0 0 0 10,370.3828 L710,370.3828 A0,0 0 0 0 710,370.3828 L710,225.6211 L730,221.6211 L710,217.6211 L710,82.8594 L700,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#f555gmqt6z79y)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M700,72.8594 L700,82.8594 L710,82.8594 L700,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="236" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="240" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="240" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="328" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="484" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="484" x2="710" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="298" x="16" y="105.0591">The subscriber which shall subscribe to a topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="276" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="280" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="280" y="134.8247">topic</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="328" y="134.8247">: urt_topic_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="444" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="444" x2="710" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="16" y="150.4575">The topic to subscribe to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="256" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="260" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="260" y="180.2231">messages</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="332" y="180.2231">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="464" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="464" x2="710" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="303" x="16" y="195.856">List of messages to be contributed to the topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="373" x="16" y="210.9888">Those messages must not be associated to another topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="517" x="16" y="226.1216">Once a message was contributed, it cannot be removed from the topic anymore.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="268" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="272" y="240.7544"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="272" y="240.7544">deadline</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="344" y="240.7544">: urt_delay_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="452" y="240.7544"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="452" x2="710" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="267" x="16" y="256.3872">Maximum latency to consume messages.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="329" x="16" y="271.52">A value of 0 indicates, that latency is of no concern.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="276" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="280" y="286.1528"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="280" y="286.1528">rate</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="320" y="286.1528">: urt_delay_t_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="444" y="286.1528"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="444" x2="710" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="621" x="16" y="301.7856">Expected minimum rate of new messages (= mamximum time between consecutive messages).</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="309" x="16" y="316.9185">A value of 0 indicates, that rate is of no concern.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="268" y1="327.5508" y2="327.5508"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="272" y="331.5513"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="48" x="272" y="331.5513">jitter</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="328" y="331.5513">: urt_delay_t_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="452" y="331.5513"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="452" x2="710" y1="327.5508" y2="327.5508"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="679" x="16" y="347.1841">Maximum allowed jitter (difference between maximum and minimum latency) when consuming messages.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="312" x="16" y="362.3169">A value of 0 indicates, that jitter is of no concern.</text><ellipse cx="740" cy="221.6211" fill="#000000" filter="url(#f555gmqt6z79y)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f555gmqt6z79y)" points="682.5,390.3828,797.5,390.3828,809.5,402.3828,797.5,414.3828,682.5,414.3828,670.5,402.3828,682.5,390.3828" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="682.5" y="406.1909">Is topic already set?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="650.5" y="399.7886">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="809.5" y="399.7886">no</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="277.75" y="424.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="287.75" y="445.5215">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="330.75" y="445.5215">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#f555gmqt6z79y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="230" x="999.75" y="424.3828"/><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="99" x="1013.75" y="450.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="79" x="1023.75" y="471.5215">set FRT data</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="75" x="1140.75" y="450.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="55" x="1150.75" y="471.5215">set topic</text><rect fill="#000000" filter="url(#f555gmqt6z79y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="230" x="999.75" y="504.3516"/><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="1074.75" y="530.3516"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="1084.75" y="551.4902">lock topic</text><rect fill="#000000" filter="url(#f555gmqt6z79y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1264" x="472.75" y="584.3203"/><rect fill="#FFFFFF" filter="url(#f555gmqt6z79y)" height="151.2344" style="stroke: #000000; stroke-width: 2.0;" width="638" x="496.75" y="656.8325"/><path d="M653.75,657.8325 L653.75,666.1294 L643.75,676.1294 L496.75,676.1294 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="499.75" y="670.8276">contribute messages</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="474" x="578.75" y="693.1294"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="454" x="588.75" y="714.2681">set next pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="618" x="506.75" y="762.0981"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="598" x="516.75" y="783.2368">set next pointer of last message to contribute to the message after the topic's latest message</text><polygon fill="#FEFECE" filter="url(#f555gmqt6z79y)" points="745.75,610.3203,885.75,610.3203,897.75,622.3203,885.75,634.3203,745.75,634.3203,733.75,622.3203,745.75,610.3203" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="819.75" y="644.5308">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="745.75" y="626.1284">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="897.75" y="619.7261">no</text><polygon fill="#FEFECE" filter="url(#f555gmqt6z79y)" points="815.75,828.0669,827.75,840.0669,815.75,852.0669,803.75,840.0669,815.75,828.0669" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="313" x="1184.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="293" x="1194.75" y="740.604">set message pointer to topic's latest message</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="217" x="1507.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="197" x="1517.75" y="740.604">register to topic's event source</text><rect fill="#000000" filter="url(#f555gmqt6z79y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1264" x="472.75" y="872.0669"/><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="1066.75" y="898.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="1076.75" y="919.2056">unlock topic</text><rect fill="#FEFECE" filter="url(#f555gmqt6z79y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="1037.75" y="952.0356"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="1047.75" y="973.1743">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="1090.75" y="973.1743">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#f555gmqt6z79y)" points="740,992.0044,752,1004.0044,740,1016.0044,728,1004.0044,740,992.0044" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M181,1026.8716 L181,1067.1372 A0,0 0 0 0 181,1067.1372 L709,1067.1372 A0,0 0 0 0 709,1067.1372 L709,1051.0044 L729,1047.0044 L709,1043.0044 L709,1036.8716 L699,1026.8716 L181,1026.8716 A0,0 0 0 0 181,1026.8716 " fill="#FBFB77" filter="url(#f555gmqt6z79y)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M699,1026.8716 L699,1036.8716 L709,1036.8716 L699,1026.8716 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="181" x2="368.5" y1="1039.438" y2="1039.438"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="372.5" y="1043.4385"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="372.5" y="1043.4385">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="421.5" y="1043.4385"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="421.5" y="1043.4385">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="521.5" y="1043.4385"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="521.5" x2="709" y1="1039.438" y2="1039.438"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="187" y="1059.0713">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="240" y="1059.0713">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="322" x="372" y="1059.0713">if the subscriber was already associated to a topic.</text><ellipse cx="740" cy="1047.0044" fill="#FFFFFF" filter="url(#f555gmqt6z79y)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="740" cy="1047.0044" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1063.25" x2="1063.25" y1="430.3828" y2="450.3828"/><polygon fill="#A80036" points="1059.25,440.3828,1063.25,450.3828,1067.25,440.3828,1063.25,444.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1178.25" x2="1178.25" y1="430.3828" y2="450.3828"/><polygon fill="#A80036" points="1174.25,440.3828,1178.25,450.3828,1182.25,440.3828,1178.25,444.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1063.25" x2="1063.25" y1="484.3516" y2="504.3516"/><polygon fill="#A80036" points="1059.25,494.3516,1063.25,504.3516,1067.25,494.3516,1063.25,498.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1178.25" x2="1178.25" y1="484.3516" y2="504.3516"/><polygon fill="#A80036" points="1174.25,494.3516,1178.25,504.3516,1182.25,494.3516,1178.25,498.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="510.3516" y2="530.3516"/><polygon fill="#A80036" points="1110.75,520.3516,1114.75,530.3516,1118.75,520.3516,1114.75,524.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="815.75" x2="815.75" y1="727.0981" y2="762.0981"/><polygon fill="#A80036" points="811.75,752.0981,815.75,762.0981,819.75,752.0981,815.75,756.0981" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="815.75" x2="815.75" y1="634.3203" y2="693.1294"/><polygon fill="#A80036" points="811.75,683.1294,815.75,693.1294,819.75,683.1294,815.75,687.1294" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="897.75" x2="1144.75" y1="622.3203" y2="622.3203"/><polygon fill="#A80036" points="1140.75,726.4497,1144.75,736.4497,1148.75,726.4497,1144.75,730.4497" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1144.75" x2="1144.75" y1="622.3203" y2="840.0669"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1144.75" x2="827.75" y1="840.0669" y2="840.0669"/><polygon fill="#A80036" points="837.75,836.0669,827.75,840.0669,837.75,844.0669,833.75,840.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="815.75" x2="815.75" y1="796.0669" y2="828.0669"/><polygon fill="#A80036" points="811.75,818.0669,815.75,828.0669,819.75,818.0669,815.75,822.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="815.75" x2="815.75" y1="590.3203" y2="610.3203"/><polygon fill="#A80036" points="811.75,600.3203,815.75,610.3203,819.75,600.3203,815.75,604.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1341.25" x2="1341.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="1337.25,709.4653,1341.25,719.4653,1345.25,709.4653,1341.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1616.25" x2="1616.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="1612.25,709.4653,1616.25,719.4653,1620.25,709.4653,1616.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="815.75" x2="815.75" y1="852.0669" y2="872.0669"/><polygon fill="#A80036" points="811.75,862.0669,815.75,872.0669,819.75,862.0669,815.75,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1341.25" x2="1341.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="1337.25,862.0669,1341.25,872.0669,1345.25,862.0669,1341.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1616.25" x2="1616.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="1612.25,862.0669,1616.25,872.0669,1620.25,862.0669,1616.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="564.3203" y2="584.3203"/><polygon fill="#A80036" points="1110.75,574.3203,1114.75,584.3203,1118.75,574.3203,1114.75,578.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="878.0669" y2="898.0669"/><polygon fill="#A80036" points="1110.75,888.0669,1114.75,898.0669,1118.75,888.0669,1114.75,892.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="932.0356" y2="952.0356"/><polygon fill="#A80036" points="1110.75,942.0356,1114.75,952.0356,1118.75,942.0356,1114.75,946.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="670.5" x2="365.25" y1="402.3828" y2="402.3828"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="365.25" x2="365.25" y1="402.3828" y2="424.3828"/><polygon fill="#A80036" points="361.25,414.3828,365.25,424.3828,369.25,414.3828,365.25,418.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="809.5" x2="1114.75" y1="402.3828" y2="402.3828"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="402.3828" y2="424.3828"/><polygon fill="#A80036" points="1110.75,414.3828,1114.75,424.3828,1118.75,414.3828,1114.75,418.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="365.25" x2="365.25" y1="458.3516" y2="1004.0044"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="365.25" x2="728" y1="1004.0044" y2="1004.0044"/><polygon fill="#A80036" points="718,1000.0044,728,1004.0044,718,1008.0044,722,1004.0044" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="1114.75" y1="986.0044" y2="1004.0044"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1114.75" x2="752" y1="1004.0044" y2="1004.0044"/><polygon fill="#A80036" points="762,1000.0044,752,1004.0044,762,1008.0044,758,1004.0044" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="740" x2="740" y1="231.6211" y2="390.3828"/><polygon fill="#A80036" points="736,380.3828,740,390.3828,744,380.3828,740,384.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="740" x2="740" y1="1016.0044" y2="1036.0044"/><polygon fill="#A80036" points="736,1026.0044,740,1036.0044,744,1026.0044,740,1030.0044" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[a74ab46ba53b86df339b4734eb9fd9c0]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberFrt()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber which shall subscribe to a topic.
21
  Must not be ""NULL"".
22
  - - ""**topic** : urt_topic_t*"" - -
23
  The topic to subscribe to.
24
  Must not be ""NULL"".
25
  - - ""**messages** : urt_message_t*"" - -
26
  List of messages to be contributed to the topic.
27
  Those messages must not be associated to another topic.
28
  Once a message was contributed, it cannot be removed from the topic anymore.
29
  - - ""**deadline** : urt_delay_t"" - -
30
  Maximum latency to consume messages.
31
  A value of 0 indicates, that latency is of no concern.
32
  - - ""**rate** : urt_delay_t_t"" - -
33
  Expected minimum rate of new messages (= mamximum time between consecutive messages).
34
  A value of 0 indicates, that rate is of no concern.
35
  - - ""**jitter** : urt_delay_t_t"" - -
36
  Maximum allowed jitter (difference between maximum and minimum latency) when consuming messages.
37
  A value of 0 indicates, that jitter is of no concern.
38
end note
39

  
40

  
41
if (Is topic already set?) then (yes)
42
  :return ""URT_STATUS_ERROR"";
43
else (no)
44
  fork
45
    :set FRT data;
46
  fork again
47
    :set topic;
48
  endfork
49
  :lock topic;
50
  fork
51
    if (Messages to contribute?) then (yes)
52
      partition "contribute messages" {
53
        :set next pointer of topic's latest message to first message to contribute;
54
        :set next pointer of last message to contribute to the message after the topic's latest message;
55
      }
56
    else (no)
57
    endif
58
  fork again
59
    :set message pointer to topic's latest message;
60
  fork again
61
    :register to topic's event source;
62
  endfork
63
  :unlock topic;
64
  :return ""URT_STATUS_OK"";
65
endif
66

  
67

  
68
stop
69
note
70
  - - **return** ""urt_status_t"" - -
71
  Returns ""URT_STATUS_ERROR"" if the subscriber was already associated to a topic.
72
end note
73

  
74

  
75
@enduml
76

  
77
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
78
(GPL source distribution)
79
Java Runtime: OpenJDK Runtime Environment
80
JVM: OpenJDK 64-Bit Server VM
81
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
82
Operating System: Linux
83
Default Encoding: UTF-8
84
Language: en
85
Country: US
86
--></g></svg>
doc/activitydiagrams/subscriber/urtSubscriberSubscribeFrt.uml
1
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5

  
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7

  
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12

  
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17

  
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21

  
22
/'### INTRO ##################################################################'/
23

  
24
@startuml
25

  
26
title **µRtWare**\nurtSubscriberFrt()\n
27

  
28
!include ../../functions.iuml
29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33
note
34
  -- ""**subscriber** : urt_subscriber_t*"" --
35
  The subscriber which shall subscribe to a topic.
36
  Must not be ""NULL"".
37
  -- ""**topic** : urt_topic_t*"" --
38
  The topic to subscribe to.
39
  Must not be ""NULL"".
40
  -- ""**messages** : urt_message_t*"" --
41
  List of messages to be contributed to the topic.
42
  Those messages must not be associated to another topic.
43
  Once a message was contributed, it cannot be removed from the topic anymore.
44
  -- ""**deadline** : urt_delay_t"" --
45
  Maximum latency to consume messages.
46
  A value of 0 indicates, that latency is of no concern.
47
  -- ""**rate** : urt_delay_t_t"" --
48
  Expected minimum rate of new messages (= mamximum time between consecutive messages).
49
  A value of 0 indicates, that rate is of no concern.
50
  -- ""**jitter** : urt_delay_t_t"" --
51
  Maximum allowed jitter (difference between maximum and minimum latency) when consuming messages.
52
  A value of 0 indicates, that jitter is of no concern.
53
end note
54

  
55
/'### PROCEDURE ##############################################################'/
56

  
57
if (Is topic already set?) then (yes)
58
  :return ""URT_STATUS_ERROR"";
59
else (no)
60
  fork
61
    :set FRT data;
62
  fork again
63
    :set topic;
64
  endfork
65
  :lock topic;
66
  fork
67
    if (Messages to contribute?) then (yes)
68
      partition "contribute messages" {
69
        :set next pointer of topic's latest message to first message to contribute;
70
        :set next pointer of last message to contribute to the message after the topic's latest message;
71
      }
72
    else (no)
73
    endif
74
  fork again
75
    :set message pointer to topic's latest message;
76
  fork again
77
    :register to topic's event source;
78
  endfork
79
  :unlock topic;
80
  :return ""URT_STATUS_OK"";
81
endif
82

  
83
/'### STOP & RETURN ##########################################################'/
84

  
85
stop
86
note
87
  -- **return** ""urt_status_t"" --
88
  Returns ""URT_STATUS_ERROR"" if the subscriber was already associated to a topic.
89
end note
90

  
91
/'### OUTRO ##################################################################'/
92

  
93
@enduml
doc/activitydiagrams/subscriber/urtSubscriberSubscribeHrt.svg
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1079px" preserveAspectRatio="none" style="width:2149px;height:1079px;" version="1.1" viewBox="0 0 2149 1079" width="2149px" zoomAndPan="magnify"><defs><filter height="300%" id="fuj8ganickisx" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="1029.375" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="162" x="992.875" y="47.6611">urtSubscriberHrt()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="1076.875" y="68.6143"/><path d="M10,72.8594 L10,370.3828 A0,0 0 0 0 10,370.3828 L710,370.3828 A0,0 0 0 0 710,370.3828 L710,225.6211 L730,221.6211 L710,217.6211 L710,82.8594 L700,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#fuj8ganickisx)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M700,72.8594 L700,82.8594 L710,82.8594 L700,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="236" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="240" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="240" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="328" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="484" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="484" x2="710" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="298" x="16" y="105.0591">The subscriber which shall subscribe to a topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="276" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="280" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="280" y="134.8247">topic</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="328" y="134.8247">: urt_topic_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="444" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="444" x2="710" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="16" y="150.4575">The topic to subscribe to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="256" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="260" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="260" y="180.2231">messages</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="332" y="180.2231">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="464" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="464" x2="710" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="303" x="16" y="195.856">List of messages to be contributed to the topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="373" x="16" y="210.9888">Those messages must not be associated to another topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="517" x="16" y="226.1216">Once a message was contributed, it cannot be removed from the topic anymore.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="268" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="272" y="240.7544"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="272" y="240.7544">deadline</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="344" y="240.7544">: urt_delay_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="452" y="240.7544"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="452" x2="710" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="267" x="16" y="256.3872">Maximum latency to consume messages.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="329" x="16" y="271.52">A value of 0 indicates, that latency is of no concern.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="276" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="280" y="286.1528"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="280" y="286.1528">rate</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="320" y="286.1528">: urt_delay_t_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="444" y="286.1528"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="444" x2="710" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="621" x="16" y="301.7856">Expected minimum rate of new messages (= mamximum time between consecutive messages).</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="309" x="16" y="316.9185">A value of 0 indicates, that rate is of no concern.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="268" y1="327.5508" y2="327.5508"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="272" y="331.5513"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="48" x="272" y="331.5513">jitter</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="328" y="331.5513">: urt_delay_t_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="452" y="331.5513"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="452" x2="710" y1="327.5508" y2="327.5508"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="679" x="16" y="347.1841">Maximum allowed jitter (difference between maximum and minimum latency) when consuming messages.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="312" x="16" y="362.3169">A value of 0 indicates, that jitter is of no concern.</text><ellipse cx="740" cy="221.6211" fill="#000000" filter="url(#fuj8ganickisx)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fuj8ganickisx)" points="682.5,390.3828,797.5,390.3828,809.5,402.3828,797.5,414.3828,682.5,414.3828,670.5,402.3828,682.5,390.3828" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="682.5" y="406.1909">Is topic already set?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="650.5" y="399.7886">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="809.5" y="399.7886">no</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="128.75" y="424.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="138.75" y="445.5215">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="181.75" y="445.5215">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#fuj8ganickisx)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="231" x="1121.75" y="424.3828"/><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="101" x="1135.75" y="450.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="81" x="1145.75" y="471.5215">set HRT data</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="75" x="1264.75" y="450.3828"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="55" x="1274.75" y="471.5215">set topic</text><rect fill="#000000" filter="url(#fuj8ganickisx)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="231" x="1121.75" y="504.3516"/><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="1197.75" y="530.3516"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="1207.75" y="551.4902">lock topic</text><rect fill="#000000" filter="url(#fuj8ganickisx)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1815" x="323.75" y="584.3203"/><rect fill="#FFFFFF" filter="url(#fuj8ganickisx)" height="151.2344" style="stroke: #000000; stroke-width: 2.0;" width="638" x="347.75" y="656.8325"/><path d="M504.75,657.8325 L504.75,666.1294 L494.75,676.1294 L347.75,676.1294 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="350.75" y="670.8276">contribute messages</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="474" x="429.75" y="693.1294"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="454" x="439.75" y="714.2681">set next pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="618" x="357.75" y="762.0981"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="598" x="367.75" y="783.2368">set next pointer of last message to contribute to the message after the topic's latest message</text><polygon fill="#FEFECE" filter="url(#fuj8ganickisx)" points="596.75,610.3203,736.75,610.3203,748.75,622.3203,736.75,634.3203,596.75,634.3203,584.75,622.3203,596.75,610.3203" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="670.75" y="644.5308">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="596.75" y="626.1284">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="748.75" y="619.7261">no</text><polygon fill="#FEFECE" filter="url(#fuj8ganickisx)" points="666.75,828.0669,678.75,840.0669,666.75,852.0669,654.75,840.0669,666.75,828.0669" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="313" x="1009.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="293" x="1019.75" y="740.604">set message pointer to topic's latest message</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="217" x="1349.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="197" x="1359.75" y="740.604">register to topic's event source</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="331" x="1576.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="311" x="1586.75" y="740.604">insert subscriber to topic's list of HRT subscribers</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="209" x="1917.75" y="719.4653"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="189" x="1927.75" y="740.604">increment topic's HRT counter</text><rect fill="#000000" filter="url(#fuj8ganickisx)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1815" x="323.75" y="872.0669"/><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="1189.75" y="898.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="1199.75" y="919.2056">unlock topic</text><rect fill="#FEFECE" filter="url(#fuj8ganickisx)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="1160.75" y="952.0356"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="1170.75" y="973.1743">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="1213.75" y="973.1743">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#fuj8ganickisx)" points="740,992.0044,752,1004.0044,740,1016.0044,728,1004.0044,740,992.0044" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M181,1026.8716 L181,1067.1372 A0,0 0 0 0 181,1067.1372 L709,1067.1372 A0,0 0 0 0 709,1067.1372 L709,1051.0044 L729,1047.0044 L709,1043.0044 L709,1036.8716 L699,1026.8716 L181,1026.8716 A0,0 0 0 0 181,1026.8716 " fill="#FBFB77" filter="url(#fuj8ganickisx)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M699,1026.8716 L699,1036.8716 L709,1036.8716 L699,1026.8716 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="181" x2="368.5" y1="1039.438" y2="1039.438"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="372.5" y="1043.4385"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="372.5" y="1043.4385">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="421.5" y="1043.4385"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="421.5" y="1043.4385">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="521.5" y="1043.4385"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="521.5" x2="709" y1="1039.438" y2="1039.438"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="187" y="1059.0713">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="240" y="1059.0713">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="322" x="372" y="1059.0713">if the subscriber was already associated to a topic.</text><ellipse cx="740" cy="1047.0044" fill="#FFFFFF" filter="url(#fuj8ganickisx)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="740" cy="1047.0044" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1186.25" x2="1186.25" y1="430.3828" y2="450.3828"/><polygon fill="#A80036" points="1182.25,440.3828,1186.25,450.3828,1190.25,440.3828,1186.25,444.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1302.25" x2="1302.25" y1="430.3828" y2="450.3828"/><polygon fill="#A80036" points="1298.25,440.3828,1302.25,450.3828,1306.25,440.3828,1302.25,444.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1186.25" x2="1186.25" y1="484.3516" y2="504.3516"/><polygon fill="#A80036" points="1182.25,494.3516,1186.25,504.3516,1190.25,494.3516,1186.25,498.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1302.25" x2="1302.25" y1="484.3516" y2="504.3516"/><polygon fill="#A80036" points="1298.25,494.3516,1302.25,504.3516,1306.25,494.3516,1302.25,498.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="510.3516" y2="530.3516"/><polygon fill="#A80036" points="1233.75,520.3516,1237.75,530.3516,1241.75,520.3516,1237.75,524.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="666.75" x2="666.75" y1="727.0981" y2="762.0981"/><polygon fill="#A80036" points="662.75,752.0981,666.75,762.0981,670.75,752.0981,666.75,756.0981" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="666.75" x2="666.75" y1="634.3203" y2="693.1294"/><polygon fill="#A80036" points="662.75,683.1294,666.75,693.1294,670.75,683.1294,666.75,687.1294" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="748.75" x2="995.75" y1="622.3203" y2="622.3203"/><polygon fill="#A80036" points="991.75,726.4497,995.75,736.4497,999.75,726.4497,995.75,730.4497" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="995.75" x2="995.75" y1="622.3203" y2="840.0669"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="995.75" x2="678.75" y1="840.0669" y2="840.0669"/><polygon fill="#A80036" points="688.75,836.0669,678.75,840.0669,688.75,844.0669,684.75,840.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="666.75" x2="666.75" y1="796.0669" y2="828.0669"/><polygon fill="#A80036" points="662.75,818.0669,666.75,828.0669,670.75,818.0669,666.75,822.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="666.75" x2="666.75" y1="590.3203" y2="610.3203"/><polygon fill="#A80036" points="662.75,600.3203,666.75,610.3203,670.75,600.3203,666.75,604.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1166.25" x2="1166.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="1162.25,709.4653,1166.25,719.4653,1170.25,709.4653,1166.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1458.25" x2="1458.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="1454.25,709.4653,1458.25,719.4653,1462.25,709.4653,1458.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1742.25" x2="1742.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="1738.25,709.4653,1742.25,719.4653,1746.25,709.4653,1742.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2022.25" x2="2022.25" y1="590.3203" y2="719.4653"/><polygon fill="#A80036" points="2018.25,709.4653,2022.25,719.4653,2026.25,709.4653,2022.25,713.4653" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="666.75" x2="666.75" y1="852.0669" y2="872.0669"/><polygon fill="#A80036" points="662.75,862.0669,666.75,872.0669,670.75,862.0669,666.75,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1166.25" x2="1166.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="1162.25,862.0669,1166.25,872.0669,1170.25,862.0669,1166.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1458.25" x2="1458.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="1454.25,862.0669,1458.25,872.0669,1462.25,862.0669,1458.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1742.25" x2="1742.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="1738.25,862.0669,1742.25,872.0669,1746.25,862.0669,1742.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2022.25" x2="2022.25" y1="753.4341" y2="872.0669"/><polygon fill="#A80036" points="2018.25,862.0669,2022.25,872.0669,2026.25,862.0669,2022.25,866.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="564.3203" y2="584.3203"/><polygon fill="#A80036" points="1233.75,574.3203,1237.75,584.3203,1241.75,574.3203,1237.75,578.3203" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="878.0669" y2="898.0669"/><polygon fill="#A80036" points="1233.75,888.0669,1237.75,898.0669,1241.75,888.0669,1237.75,892.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="932.0356" y2="952.0356"/><polygon fill="#A80036" points="1233.75,942.0356,1237.75,952.0356,1241.75,942.0356,1237.75,946.0356" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="670.5" x2="216.25" y1="402.3828" y2="402.3828"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="216.25" x2="216.25" y1="402.3828" y2="424.3828"/><polygon fill="#A80036" points="212.25,414.3828,216.25,424.3828,220.25,414.3828,216.25,418.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="809.5" x2="1237.75" y1="402.3828" y2="402.3828"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="402.3828" y2="424.3828"/><polygon fill="#A80036" points="1233.75,414.3828,1237.75,424.3828,1241.75,414.3828,1237.75,418.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="216.25" x2="216.25" y1="458.3516" y2="1004.0044"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="216.25" x2="728" y1="1004.0044" y2="1004.0044"/><polygon fill="#A80036" points="718,1000.0044,728,1004.0044,718,1008.0044,722,1004.0044" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="1237.75" y1="986.0044" y2="1004.0044"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1237.75" x2="752" y1="1004.0044" y2="1004.0044"/><polygon fill="#A80036" points="762,1000.0044,752,1004.0044,762,1008.0044,758,1004.0044" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="740" x2="740" y1="231.6211" y2="390.3828"/><polygon fill="#A80036" points="736,380.3828,740,390.3828,744,380.3828,740,384.3828" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="740" x2="740" y1="1016.0044" y2="1036.0044"/><polygon fill="#A80036" points="736,1026.0044,740,1036.0044,744,1026.0044,740,1030.0044" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[86f4e621ff1428b72db951ab1c7d8a26]
2
@startuml
3

  
4
title **µRtWare**\nurtSubscriberHrt()\n
5

  
6

  
7

  
8

  
9

  
10

  
11

  
12

  
13

  
14

  
15

  
16

  
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber which shall subscribe to a topic.
21
  Must not be ""NULL"".
22
  - - ""**topic** : urt_topic_t*"" - -
23
  The topic to subscribe to.
24
  Must not be ""NULL"".
25
  - - ""**messages** : urt_message_t*"" - -
26
  List of messages to be contributed to the topic.
27
  Those messages must not be associated to another topic.
28
  Once a message was contributed, it cannot be removed from the topic anymore.
29
  - - ""**deadline** : urt_delay_t"" - -
30
  Maximum latency to consume messages.
31
  A value of 0 indicates, that latency is of no concern.
32
  - - ""**rate** : urt_delay_t_t"" - -
33
  Expected minimum rate of new messages (= mamximum time between consecutive messages).
34
  A value of 0 indicates, that rate is of no concern.
35
  - - ""**jitter** : urt_delay_t_t"" - -
36
  Maximum allowed jitter (difference between maximum and minimum latency) when consuming messages.
37
  A value of 0 indicates, that jitter is of no concern.
38
end note
39

  
40

  
41
if (Is topic already set?) then (yes)
42
  :return ""URT_STATUS_ERROR"";
43
else (no)
44
  fork
45
    :set HRT data;
46
  fork again
47
    :set topic;
48
  endfork
49
  :lock topic;
50
  fork
51
    if (Messages to contribute?) then (yes)
52
      partition "contribute messages" {
53
        :set next pointer of topic's latest message to first message to contribute;
54
        :set next pointer of last message to contribute to the message after the topic's latest message;
55
      }
56
    else (no)
57
    endif
58
  fork again
59
    :set message pointer to topic's latest message;
60
  fork again
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff