Statistics
| Branch: | Revision:

urtware / doc / statediagrams / subscriber / urtSubscriberUnsubscribe.svg @ e98c61a8

History | View | Annotate | Download (17.247 KB)

1 35c9457f Thomas Schöpping
<?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="696px" preserveAspectRatio="none" style="width:1416px;height:696px;" version="1.1" viewBox="0 0 1416 696" width="1416px" zoomAndPan="magnify"><defs><filter height="300%" id="f1rz7zm3yl9o1y" 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="662.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="240" x="587" y="47.6611">urtSubscriberUnsubscribe()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="710" y="68.6143"/><ellipse cx="996.75" cy="82.8594" fill="#000000" filter="url(#f1rz7zm3yl9o1y)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" points="943.25,112.8594,1050.25,112.8594,1062.25,124.8594,1050.25,136.8594,943.25,136.8594,931.25,124.8594,943.25,112.8594" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="943.25" y="128.6675">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="911.25" y="122.2651">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1062.25" y="122.2651">no</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="600.5" y="146.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="610.5" y="167.998">lock topic</text><rect fill="#000000" filter="url(#f1rz7zm3yl9o1y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1261" x="10" y="200.8281"/><path d="M24,342.6172 L24,367.75 A0,0 0 0 0 24,367.75 L323,367.75 A0,0 0 0 0 323,367.75 L323,360.6172 L343,355.1836 L323,352.6172 L323,352.6172 L313,342.6172 L24,342.6172 A0,0 0 0 0 24,342.6172 " fill="#FBFB77" filter="url(#f1rz7zm3yl9o1y)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M313,342.6172 L313,352.6172 L323,352.6172 L313,342.6172 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="278" x="30" y="359.6841">must be within lock because of HRT counter</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="124" x="343" y="338.1992"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="104" x="353" y="359.3379">unregister event</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="195" x="495" y="338.1992"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="175" x="505" y="359.3379">decrease topic HRT counter</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="302" x="718" y="255.3125"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="282" x="728" y="276.4512">remove self from topic list of HRT subscribers</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="218" x="760" y="372.6836"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="198" x="770" y="393.8223">update QoS rate timer (@topic)</text><polygon fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" points="785,324.2813,953,324.2813,965,336.2813,953,348.2813,785,348.2813,773,336.2813,785,324.2813" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="873" y="358.4917">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="168" x="785" y="340.0894">Was most critical subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="965" y="333.687">no</text><polygon fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" points="869,431.0547,881,443.0547,869,455.0547,857,443.0547,869,431.0547" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="106" x="1105.5" y="287.6328"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="86" x="1115.5" y="308.7715">lock message</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="160" x="1078.5" y="356.6016"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="140" x="1088.5" y="377.7402">decrease HRT counter</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="1097.5" y="425.5703"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="1107.5" y="446.709">unlock message</text><polygon fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" points="1084,226.8281,1233,226.8281,1245,238.8281,1233,250.8281,1084,250.8281,1072,238.8281,1084,226.8281" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="1162.5" y="261.0386">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="149" x="1084" y="242.6362">Unfetched messages left?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1058" y="236.2339">no</text><rect fill="#000000" filter="url(#f1rz7zm3yl9o1y)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1261" x="10" y="501.5391"/><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="592.5" y="527.5391"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="602.5" y="548.6777">unlock topic</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="124" x="1281" y="146.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="104" x="1291" y="167.998">unregister event</text><polygon fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" points="996.75,567.5078,1008.75,579.5078,996.75,591.5078,984.75,579.5078,996.75,567.5078" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M847.25,615.9258 L847.25,641.0586 A0,0 0 0 0 847.25,641.0586 L919.25,641.0586 A0,0 0 0 0 919.25,641.0586 L919.25,633.9258 L939.25,628.4922 L919.25,625.9258 L919.25,625.9258 L909.25,615.9258 L847.25,615.9258 A0,0 0 0 0 847.25,615.9258 " fill="#FBFB77" filter="url(#f1rz7zm3yl9o1y)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M909.25,615.9258 L909.25,625.9258 L919.25,625.9258 L909.25,615.9258 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="51" x="853.25" y="632.9927">optional</text><rect fill="#FEFECE" filter="url(#f1rz7zm3yl9o1y)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="115" x="939.25" y="611.5078"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="95" x="949.25" y="632.6465">reset members</text><ellipse cx="996.75" cy="675.4766" fill="none" filter="url(#f1rz7zm3yl9o1y)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="997.25" cy="675.9766" fill="#000000" filter="url(#f1rz7zm3yl9o1y)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="869" x2="869" y1="348.2813" y2="372.6836"/><polygon fill="#A80036" points="865,362.6836,869,372.6836,873,362.6836,869,366.6836" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="965" x2="988" y1="336.2813" y2="336.2813"/><polygon fill="#A80036" points="984,379.668,988,389.668,992,379.668,988,383.668" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="988" x2="988" y1="336.2813" y2="443.0547"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="988" x2="881" y1="443.0547" y2="443.0547"/><polygon fill="#A80036" points="891,439.0547,881,443.0547,891,447.0547,887,443.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="869" x2="869" y1="406.6523" y2="431.0547"/><polygon fill="#A80036" points="865,421.0547,869,431.0547,873,421.0547,869,425.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="869" x2="869" y1="289.2813" y2="324.2813"/><polygon fill="#A80036" points="865,314.2813,869,324.2813,873,314.2813,869,318.2813" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="321.6016" y2="356.6016"/><polygon fill="#A80036" points="1154.5,346.6016,1158.5,356.6016,1162.5,346.6016,1158.5,350.6016" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="390.5703" y2="425.5703"/><polygon fill="#A80036" points="1154.5,415.5703,1158.5,425.5703,1162.5,415.5703,1158.5,419.5703" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="250.8281" y2="287.6328"/><polygon fill="#A80036" points="1154.5,277.6328,1158.5,287.6328,1162.5,277.6328,1158.5,281.6328" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="459.5391" y2="469.5391"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1257" y1="469.5391" y2="469.5391"/><polygon fill="#A80036" points="1253,365.1836,1257,355.1836,1261,365.1836,1257,361.1836" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1257" x2="1257" y1="238.8281" y2="469.5391"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1257" x2="1245" y1="238.8281" y2="238.8281"/><polygon fill="#A80036" points="1255,234.8281,1245,238.8281,1255,242.8281,1251,238.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1072" x2="1060" y1="238.8281" y2="238.8281"/><polygon fill="#A80036" points="1056,351.1836,1060,361.1836,1064,351.1836,1060,355.1836" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1060" x2="1060" y1="238.8281" y2="481.5391"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1060" x2="1158.5" y1="481.5391" y2="481.5391"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="481.5391" y2="501.5391"/><polygon fill="#A80036" points="1154.5,491.5391,1158.5,501.5391,1162.5,491.5391,1158.5,495.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="206.8281" y2="338.1992"/><polygon fill="#A80036" points="401,328.1992,405,338.1992,409,328.1992,405,332.1992" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="592.5" x2="592.5" y1="206.8281" y2="338.1992"/><polygon fill="#A80036" points="588.5,328.1992,592.5,338.1992,596.5,328.1992,592.5,332.1992" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="869" x2="869" y1="206.8281" y2="255.3125"/><polygon fill="#A80036" points="865,245.3125,869,255.3125,873,245.3125,869,249.3125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1158.5" x2="1158.5" y1="206.8281" y2="226.8281"/><polygon fill="#A80036" points="1154.5,216.8281,1158.5,226.8281,1162.5,216.8281,1158.5,220.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="372.168" y2="501.5391"/><polygon fill="#A80036" points="401,491.5391,405,501.5391,409,491.5391,405,495.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="592.5" x2="592.5" y1="372.168" y2="501.5391"/><polygon fill="#A80036" points="588.5,491.5391,592.5,501.5391,596.5,491.5391,592.5,495.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="869" x2="869" y1="455.0547" y2="501.5391"/><polygon fill="#A80036" points="865,491.5391,869,501.5391,873,491.5391,869,495.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="640.5" x2="640.5" y1="180.8281" y2="200.8281"/><polygon fill="#A80036" points="636.5,190.8281,640.5,200.8281,644.5,190.8281,640.5,194.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="640.5" x2="640.5" y1="507.5391" y2="527.5391"/><polygon fill="#A80036" points="636.5,517.5391,640.5,527.5391,644.5,517.5391,640.5,521.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="931.25" x2="640.5" y1="124.8594" y2="124.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="640.5" x2="640.5" y1="124.8594" y2="146.8594"/><polygon fill="#A80036" points="636.5,136.8594,640.5,146.8594,644.5,136.8594,640.5,140.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1062.25" x2="1343" y1="124.8594" y2="124.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1343" x2="1343" y1="124.8594" y2="146.8594"/><polygon fill="#A80036" points="1339,136.8594,1343,146.8594,1347,136.8594,1343,140.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="640.5" x2="640.5" y1="561.5078" y2="579.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="640.5" x2="984.75" y1="579.5078" y2="579.5078"/><polygon fill="#A80036" points="974.75,575.5078,984.75,579.5078,974.75,583.5078,978.75,579.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1343" x2="1343" y1="180.8281" y2="579.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1343" x2="1008.75" y1="579.5078" y2="579.5078"/><polygon fill="#A80036" points="1018.75,575.5078,1008.75,579.5078,1018.75,583.5078,1014.75,579.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="996.75" x2="996.75" y1="92.8594" y2="112.8594"/><polygon fill="#A80036" points="992.75,102.8594,996.75,112.8594,1000.75,102.8594,996.75,106.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="996.75" x2="996.75" y1="591.5078" y2="611.5078"/><polygon fill="#A80036" points="992.75,601.5078,996.75,611.5078,1000.75,601.5078,996.75,605.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="996.75" x2="996.75" y1="645.4766" y2="665.4766"/><polygon fill="#A80036" points="992.75,655.4766,996.75,665.4766,1000.75,655.4766,996.75,659.4766" style="stroke: #A80036; stroke-width: 1.0;"/><!--
2
@startuml
3
4
title **µRtWare**\nurtSubscriberUnsubscribe()\n
5
6
7
8
start
9
if (Is HRT subscriber?) then (yes)
10
  :lock topic;
11
  fork
12
    :unregister event;
13
    note left
14
      must be within lock because of HRT counter
15
    endnote
16
  fork again
17
    :decrease topic HRT counter;
18
  fork again
19
    :remove self from topic list of HRT subscribers;
20
    if (Was most critical subscriber?) then (yes)
21
      :update QoS rate timer (@topic);
22
    else (no)
23
    endif
24
  fork again
25
    while (Unfetched messages left?) is (yes)
26
      :lock message;
27
      :decrease HRT counter;
28
      :unlock message;
29
    endwhile (no)
30
  endfork
31
  :unlock topic;
32
else (no)
33
  :unregister event;
34
endif
35
:reset members;
36
note left
37
  optional
38
end note
39
stop
40
41
@enduml
42
43
PlantUML version 1.2018.11(Sat Sep 22 18:43:53 CEST 2018)
44
(GPL source distribution)
45
Java Runtime: OpenJDK Runtime Environment
46
JVM: OpenJDK 64-Bit Server VM
47
Java Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
48
Operating System: Linux
49
OS Version: 4.15.0-36-generic
50
Default Encoding: UTF-8
51
Language: en
52
Country: US
53
--></g></svg>