Statistics
| Branch: | Revision:

urtware / doc / statediagrams / subscriber / unsubscribe.svg @ 6ebd2388

History | View | Annotate | Download (16.66 KB)

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="750px" preserveAspectRatio="none" style="width:945px;height:750px;" version="1.1" viewBox="0 0 945 750" width="945px" zoomAndPan="magnify"><defs><filter height="300%" id="fykcvhyo0zvei" 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="427" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="240" x="351.5" y="47.6611">urtSubscriberUnsubscribe()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="474.5" y="68.6143"/><ellipse cx="643.5" cy="82.8594" fill="#000000" filter="url(#fykcvhyo0zvei)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fykcvhyo0zvei)" points="590,112.8594,697,112.8594,709,124.8594,697,136.8594,590,136.8594,578,124.8594,590,112.8594" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="590" y="128.6675">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="558" y="122.2651">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="709" y="122.2651">no</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="365" y="146.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="375" y="167.998">lock topic</text><path d="M24,205.2461 L24,230.3789 A0,0 0 0 0 24,230.3789 L323,230.3789 A0,0 0 0 0 323,230.3789 L323,223.2461 L343,217.8125 L323,215.2461 L323,215.2461 L313,205.2461 L24,205.2461 A0,0 0 0 0 24,205.2461 " fill="#FBFB77" filter="url(#fykcvhyo0zvei)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M313,205.2461 L313,215.2461 L323,215.2461 L313,205.2461 " 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="222.313">must be within lock because of HRT counter</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="124" x="343" y="200.8281"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="104" x="353" y="221.9668">unregister event</text><rect fill="#000000" filter="url(#fykcvhyo0zvei)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="790" x="10" y="254.7969"/><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="195" x="24" y="392.168"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="175" x="34" y="413.3066">decrease topic HRT counter</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="302" x="247" y="309.2813"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="282" x="257" y="330.4199">remove self from topic list of HRT subscribers</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="172" x="312" y="426.6523"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="322" y="447.791">update QoS Timer (rate)</text><polygon fill="#FEFECE" filter="url(#fykcvhyo0zvei)" points="314,378.25,482,378.25,494,390.25,482,402.25,314,402.25,302,390.25,314,378.25" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="402" y="412.4604">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="168" x="314" y="394.0581">Was most critical subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="494" y="387.6558">no</text><polygon fill="#FEFECE" filter="url(#fykcvhyo0zvei)" points="398,485.0234,410,497.0234,398,509.0234,386,497.0234,398,485.0234" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="106" x="634.5" y="341.6016"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="86" x="644.5" y="362.7402">lock message</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="160" x="607.5" y="410.5703"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="140" x="617.5" y="431.709">decrease HRT counter</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="626.5" y="479.5391"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="636.5" y="500.6777">unlock message</text><polygon fill="#FEFECE" filter="url(#fykcvhyo0zvei)" points="613,280.7969,762,280.7969,774,292.7969,762,304.7969,613,304.7969,601,292.7969,613,280.7969" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="691.5" y="315.0073">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="149" x="613" y="296.605">Unfetched messages left?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="587" y="290.2026">no</text><rect fill="#000000" filter="url(#fykcvhyo0zvei)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="790" x="10" y="555.5078"/><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="357" y="581.5078"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="367" y="602.6465">unlock topic</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="124" x="810" y="146.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="104" x="820" y="167.998">unregister event</text><polygon fill="#FEFECE" filter="url(#fykcvhyo0zvei)" points="643.5,621.4766,655.5,633.4766,643.5,645.4766,631.5,633.4766,643.5,621.4766" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M494,669.8945 L494,695.0273 A0,0 0 0 0 494,695.0273 L566,695.0273 A0,0 0 0 0 566,695.0273 L566,687.8945 L586,682.4609 L566,679.8945 L566,679.8945 L556,669.8945 L494,669.8945 A0,0 0 0 0 494,669.8945 " fill="#FBFB77" filter="url(#fykcvhyo0zvei)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M556,669.8945 L556,679.8945 L566,679.8945 L556,669.8945 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="51" x="500" y="686.9614">optional</text><rect fill="#FEFECE" filter="url(#fykcvhyo0zvei)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="115" x="586" y="665.4766"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="95" x="596" y="686.6152">reset members</text><ellipse cx="643.5" cy="729.4453" fill="none" filter="url(#fykcvhyo0zvei)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="644" cy="729.9453" fill="#000000" filter="url(#fykcvhyo0zvei)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="180.8281" y2="200.8281"/><polygon fill="#A80036" points="401,190.8281,405,200.8281,409,190.8281,405,194.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="398" x2="398" y1="402.25" y2="426.6523"/><polygon fill="#A80036" points="394,416.6523,398,426.6523,402,416.6523,398,420.6523" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="494" x2="506" y1="390.25" y2="390.25"/><polygon fill="#A80036" points="502,433.6367,506,443.6367,510,433.6367,506,437.6367" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="506" x2="506" y1="390.25" y2="497.0234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="506" x2="410" y1="497.0234" y2="497.0234"/><polygon fill="#A80036" points="420,493.0234,410,497.0234,420,501.0234,416,497.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="398" x2="398" y1="460.6211" y2="485.0234"/><polygon fill="#A80036" points="394,475.0234,398,485.0234,402,475.0234,398,479.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="398" x2="398" y1="343.25" y2="378.25"/><polygon fill="#A80036" points="394,368.25,398,378.25,402,368.25,398,372.25" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="375.5703" y2="410.5703"/><polygon fill="#A80036" points="683.5,400.5703,687.5,410.5703,691.5,400.5703,687.5,404.5703" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="444.5391" y2="479.5391"/><polygon fill="#A80036" points="683.5,469.5391,687.5,479.5391,691.5,469.5391,687.5,473.5391" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="304.7969" y2="341.6016"/><polygon fill="#A80036" points="683.5,331.6016,687.5,341.6016,691.5,331.6016,687.5,335.6016" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="513.5078" y2="523.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="786" y1="523.5078" y2="523.5078"/><polygon fill="#A80036" points="782,419.1523,786,409.1523,790,419.1523,786,415.1523" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="786" x2="786" y1="292.7969" y2="523.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="786" x2="774" y1="292.7969" y2="292.7969"/><polygon fill="#A80036" points="784,288.7969,774,292.7969,784,296.7969,780,292.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="601" x2="589" y1="292.7969" y2="292.7969"/><polygon fill="#A80036" points="585,405.1523,589,415.1523,593,405.1523,589,409.1523" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="589" x2="589" y1="292.7969" y2="535.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="589" x2="687.5" y1="535.5078" y2="535.5078"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="535.5078" y2="555.5078"/><polygon fill="#A80036" points="683.5,545.5078,687.5,555.5078,691.5,545.5078,687.5,549.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="121.5" x2="121.5" y1="260.7969" y2="392.168"/><polygon fill="#A80036" points="117.5,382.168,121.5,392.168,125.5,382.168,121.5,386.168" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="398" x2="398" y1="260.7969" y2="309.2813"/><polygon fill="#A80036" points="394,299.2813,398,309.2813,402,299.2813,398,303.2813" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="687.5" x2="687.5" y1="260.7969" y2="280.7969"/><polygon fill="#A80036" points="683.5,270.7969,687.5,280.7969,691.5,270.7969,687.5,274.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="121.5" x2="121.5" y1="426.1367" y2="555.5078"/><polygon fill="#A80036" points="117.5,545.5078,121.5,555.5078,125.5,545.5078,121.5,549.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="398" x2="398" y1="509.0234" y2="555.5078"/><polygon fill="#A80036" points="394,545.5078,398,555.5078,402,545.5078,398,549.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="234.7969" y2="254.7969"/><polygon fill="#A80036" points="401,244.7969,405,254.7969,409,244.7969,405,248.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="561.5078" y2="581.5078"/><polygon fill="#A80036" points="401,571.5078,405,581.5078,409,571.5078,405,575.5078" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="578" x2="405" y1="124.8594" y2="124.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="124.8594" y2="146.8594"/><polygon fill="#A80036" points="401,136.8594,405,146.8594,409,136.8594,405,140.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="709" x2="872" y1="124.8594" y2="124.8594"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="872" x2="872" y1="124.8594" y2="146.8594"/><polygon fill="#A80036" points="868,136.8594,872,146.8594,876,136.8594,872,140.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="405" y1="615.4766" y2="633.4766"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="405" x2="631.5" y1="633.4766" y2="633.4766"/><polygon fill="#A80036" points="621.5,629.4766,631.5,633.4766,621.5,637.4766,625.5,633.4766" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="872" x2="872" y1="180.8281" y2="633.4766"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="872" x2="655.5" y1="633.4766" y2="633.4766"/><polygon fill="#A80036" points="665.5,629.4766,655.5,633.4766,665.5,637.4766,661.5,633.4766" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="643.5" x2="643.5" y1="92.8594" y2="112.8594"/><polygon fill="#A80036" points="639.5,102.8594,643.5,112.8594,647.5,102.8594,643.5,106.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="643.5" x2="643.5" y1="645.4766" y2="665.4766"/><polygon fill="#A80036" points="639.5,655.4766,643.5,665.4766,647.5,655.4766,643.5,659.4766" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="643.5" x2="643.5" y1="699.4453" y2="719.4453"/><polygon fill="#A80036" points="639.5,709.4453,643.5,719.4453,647.5,709.4453,643.5,713.4453" 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
  :unregister event;
12
  note left
13
    must be within lock because of HRT counter
14
  endnote
15
  fork
16
    :decrease topic HRT counter;
17
  fork again
18
    :remove self from topic list of HRT subscribers;
19
    if (Was most critical subscriber?) then (yes)
20
      :update QoS Timer (rate);
21
    else (no)
22
    endif
23
  fork again
24
    while (Unfetched messages left?) is (yes)
25
      :lock message;
26
      :decrease HRT counter;
27
      :unlock message;
28
    endwhile (no)
29
  endfork
30
  :unlock topic;
31
else (no)
32
  :unregister event;
33
endif
34
:reset members;
35
note left
36
  optional
37
end note
38
stop
39

    
40
@enduml
41

    
42
PlantUML version 1.2018.11(Sat Sep 22 18:43:53 CEST 2018)
43
(GPL source distribution)
44
Java Runtime: OpenJDK Runtime Environment
45
JVM: OpenJDK 64-Bit Server VM
46
Java Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
47
Operating System: Linux
48
OS Version: 4.15.0-36-generic
49
Default Encoding: UTF-8
50
Language: en
51
Country: US
52
--></g></svg>