urtware / doc / statediagrams / subscriber / urtSubscriberSubscribe.svg @ 7491c395
History | View | Annotate | Download (18.561 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="1016px" preserveAspectRatio="none" style="width:1090px;height:1016px;" version="1.1" viewBox="0 0 1090 1016" width="1090px" zoomAndPan="magnify"><defs><filter height="300%" id="fdenaefteqn3b" 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="499.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="218" x="435" y="47.6611">urtSubscriberSubscribe()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="547" y="68.6143"/><ellipse cx="544.5" cy="82.8594" fill="#000000" filter="url(#fdenaefteqn3b)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="304" x="392.5" y="112.8594"/><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="141" x="416.5" y="187.2617"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="121" x="426.5" y="208.4004">set rtclass member</text><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="423.5,138.8594,550.5,138.8594,562.5,150.8594,550.5,162.8594,423.5,162.8594,411.5,150.8594,423.5,138.8594" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="491" y="173.0698">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="127" x="423.5" y="154.6675">Was rtclass specified?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="562.5" y="148.2651">no</text><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="487,241.2305,499,253.2305,487,265.2305,475,253.2305,487,241.2305" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="75" x="607.5" y="187.2617"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="55" x="617.5" y="208.4004">set topic</text><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="304" x="392.5" y="285.2305"/><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="504.5" y="311.2305"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="514.5" y="332.3691">lock topic</text><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1069" x="10" y="365.1992"/><rect fill="#FFFFFF" filter="url(#fdenaefteqn3b)" height="151.2344" style="stroke: #000000; stroke-width: 2.0;" width="668" x="34" y="437.7114"/><path d="M191,438.7114 L191,447.0083 L181,457.0083 L34,457.0083 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="37" y="451.7065">contribute messages</text><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="475" x="130.5" y="474.0083"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="140.5" y="495.147">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="164.5" y="495.147">next</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="399" x="196.5" y="495.147">pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="648" x="44" y="542.9771"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="54" y="564.1157">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="78" y="564.1157">next</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="572" x="110" y="564.1157">pointer of last message to contribute to message formerly after the topic's latest message</text><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="270.5,391.1992,465.5,391.1992,477.5,403.1992,465.5,415.1992,270.5,415.1992,258.5,403.1992,270.5,391.1992" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="372" y="425.4097">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="195" x="270.5" y="407.0073">Messages specified to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="477.5" y="400.605">no</text><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="368,608.9458,380,620.9458,368,632.9458,356,620.9458,368,608.9458" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="313" x="752" y="500.3442"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="293" x="762" y="521.4829">set message pointer to topic's latest message</text><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1069" x="10" y="652.9458"/><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="567" x="261" y="727.3481"/><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="190" x="275" y="753.3481"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="170" x="285" y="774.4868">increase topic HRT counter</text><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="321" x="493" y="753.3481"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="301" x="503" y="774.4868">insert subscriber to topic list of HRT subscribers</text><rect fill="#000000" filter="url(#fdenaefteqn3b)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="567" x="261" y="807.3169"/><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="491,678.9458,598,678.9458,610,690.9458,598,702.9458,491,702.9458,479,690.9458,491,678.9458" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="548.5" y="713.1563">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="491" y="694.7539">Is HRT subscriber?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="610" y="688.3516">no</text><polygon fill="#FEFECE" filter="url(#fdenaefteqn3b)" points="544.5,833.3169,556.5,845.3169,544.5,857.3169,532.5,845.3169,544.5,833.3169" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M120,881.7349 L120,906.8677 A0,0 0 0 0 120,906.8677 L421,906.8677 A0,0 0 0 0 421,906.8677 L421,899.7349 L441,894.3013 L421,891.7349 L421,891.7349 L411,881.7349 L120,881.7349 A0,0 0 0 0 120,881.7349 " fill="#FBFB77" filter="url(#fdenaefteqn3b)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M411,881.7349 L411,891.7349 L421,891.7349 L411,881.7349 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="280" x="126" y="898.8018">Must be within lock because of HRT counter.</text><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="207" x="441" y="877.3169"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="187" x="451" y="898.4556">register to topic event source</text><rect fill="#FEFECE" filter="url(#fdenaefteqn3b)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="496.5" y="931.2856"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="506.5" y="952.4243">unlock topic</text><ellipse cx="544.5" cy="995.2544" fill="none" filter="url(#fdenaefteqn3b)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="545" cy="995.7544" fill="#000000" filter="url(#fdenaefteqn3b)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="487" x2="487" y1="162.8594" y2="187.2617"/><polygon fill="#A80036" points="483,177.2617,487,187.2617,491,177.2617,487,181.2617" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="562.5" x2="574.5" y1="150.8594" y2="150.8594"/><polygon fill="#A80036" points="570.5,194.2461,574.5,204.2461,578.5,194.2461,574.5,198.2461" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="574.5" x2="574.5" y1="150.8594" y2="253.2305"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="574.5" x2="499" y1="253.2305" y2="253.2305"/><polygon fill="#A80036" points="509,249.2305,499,253.2305,509,257.2305,505,253.2305" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="487" x2="487" y1="221.2305" y2="241.2305"/><polygon fill="#A80036" points="483,231.2305,487,241.2305,491,231.2305,487,235.2305" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="487" x2="487" y1="118.8594" y2="138.8594"/><polygon fill="#A80036" points="483,128.8594,487,138.8594,491,128.8594,487,132.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="645" x2="645" y1="118.8594" y2="187.2617"/><polygon fill="#A80036" points="641,177.2617,645,187.2617,649,177.2617,645,181.2617" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="487" x2="487" y1="265.2305" y2="285.2305"/><polygon fill="#A80036" points="483,275.2305,487,285.2305,491,275.2305,487,279.2305" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="645" x2="645" y1="221.2305" y2="285.2305"/><polygon fill="#A80036" points="641,275.2305,645,285.2305,649,275.2305,645,279.2305" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="92.8594" y2="112.8594"/><polygon fill="#A80036" points="540.5,102.8594,544.5,112.8594,548.5,102.8594,544.5,106.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="291.2305" y2="311.2305"/><polygon fill="#A80036" points="540.5,301.2305,544.5,311.2305,548.5,301.2305,544.5,305.2305" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="368" x2="368" y1="507.9771" y2="542.9771"/><polygon fill="#A80036" points="364,532.9771,368,542.9771,372,532.9771,368,536.9771" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="368" x2="368" y1="415.1992" y2="474.0083"/><polygon fill="#A80036" points="364,464.0083,368,474.0083,372,464.0083,368,468.0083" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="477.5" x2="712" y1="403.1992" y2="403.1992"/><polygon fill="#A80036" points="708,507.3286,712,517.3286,716,507.3286,712,511.3286" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="712" x2="712" y1="403.1992" y2="620.9458"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="712" x2="380" y1="620.9458" y2="620.9458"/><polygon fill="#A80036" points="390,616.9458,380,620.9458,390,624.9458,386,620.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="368" x2="368" y1="576.9458" y2="608.9458"/><polygon fill="#A80036" points="364,598.9458,368,608.9458,372,598.9458,368,602.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="368" x2="368" y1="371.1992" y2="391.1992"/><polygon fill="#A80036" points="364,381.1992,368,391.1992,372,381.1992,368,385.1992" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="908.5" x2="908.5" y1="371.1992" y2="500.3442"/><polygon fill="#A80036" points="904.5,490.3442,908.5,500.3442,912.5,490.3442,908.5,494.3442" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="368" x2="368" y1="632.9458" y2="652.9458"/><polygon fill="#A80036" points="364,642.9458,368,652.9458,372,642.9458,368,646.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="908.5" x2="908.5" y1="534.313" y2="652.9458"/><polygon fill="#A80036" points="904.5,642.9458,908.5,652.9458,912.5,642.9458,908.5,646.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="345.1992" y2="365.1992"/><polygon fill="#A80036" points="540.5,355.1992,544.5,365.1992,548.5,355.1992,544.5,359.1992" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="370" x2="370" y1="733.3481" y2="753.3481"/><polygon fill="#A80036" points="366,743.3481,370,753.3481,374,743.3481,370,747.3481" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.5" x2="653.5" y1="733.3481" y2="753.3481"/><polygon fill="#A80036" points="649.5,743.3481,653.5,753.3481,657.5,743.3481,653.5,747.3481" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="370" x2="370" y1="787.3169" y2="807.3169"/><polygon fill="#A80036" points="366,797.3169,370,807.3169,374,797.3169,370,801.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.5" x2="653.5" y1="787.3169" y2="807.3169"/><polygon fill="#A80036" points="649.5,797.3169,653.5,807.3169,657.5,797.3169,653.5,801.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="702.9458" y2="727.3481"/><polygon fill="#A80036" points="540.5,717.3481,544.5,727.3481,548.5,717.3481,544.5,721.3481" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="610" x2="838" y1="690.9458" y2="690.9458"/><polygon fill="#A80036" points="834,760.3325,838,770.3325,842,760.3325,838,764.3325" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="838" x2="838" y1="690.9458" y2="845.3169"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="838" x2="556.5" y1="845.3169" y2="845.3169"/><polygon fill="#A80036" points="566.5,841.3169,556.5,845.3169,566.5,849.3169,562.5,845.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="813.3169" y2="833.3169"/><polygon fill="#A80036" points="540.5,823.3169,544.5,833.3169,548.5,823.3169,544.5,827.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="658.9458" y2="678.9458"/><polygon fill="#A80036" points="540.5,668.9458,544.5,678.9458,548.5,668.9458,544.5,672.9458" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="857.3169" y2="877.3169"/><polygon fill="#A80036" points="540.5,867.3169,544.5,877.3169,548.5,867.3169,544.5,871.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="911.2856" y2="931.2856"/><polygon fill="#A80036" points="540.5,921.2856,544.5,931.2856,548.5,921.2856,544.5,925.2856" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="544.5" x2="544.5" y1="965.2544" y2="985.2544"/><polygon fill="#A80036" points="540.5,975.2544,544.5,985.2544,548.5,975.2544,544.5,979.2544" style="stroke: #A80036; stroke-width: 1.0;"/><!-- |
---|---|
2 |
@startuml |
3 |
|
4 |
title **µRtWare**\nurtSubscriberSubscribe()\n |
5 |
|
6 |
|
7 |
|
8 |
start |
9 |
fork |
10 |
if (Was rtclass specified?) then (yes) |
11 |
:set rtclass member; |
12 |
else (no) |
13 |
endif |
14 |
fork again |
15 |
:set topic; |
16 |
endfork |
17 |
:lock topic; |
18 |
fork |
19 |
if (Messages specified to contribute?) then (yes) |
20 |
partition "contribute messages" { |
21 |
:set ""next"" pointer of topic's latest message to first message to contribute; |
22 |
:set ""next"" pointer of last message to contribute to message formerly after the topic's latest message; |
23 |
} |
24 |
else (no) |
25 |
endif |
26 |
fork again |
27 |
:set message pointer to topic's latest message; |
28 |
endfork |
29 |
if (Is HRT subscriber?) then (yes) |
30 |
fork |
31 |
:increase topic HRT counter; |
32 |
fork again |
33 |
:insert subscriber to topic list of HRT subscribers; |
34 |
endfork |
35 |
else (no) |
36 |
endif |
37 |
:register to topic event source; |
38 |
note |
39 |
Must be within lock because of HRT counter. |
40 |
endnote |
41 |
:unlock topic; |
42 |
stop |
43 |
|
44 |
@enduml |
45 |
|
46 |
PlantUML version 1.2018.11(Sat Sep 22 18:43:53 CEST 2018) |
47 |
(GPL source distribution) |
48 |
Java Runtime: OpenJDK Runtime Environment |
49 |
JVM: OpenJDK 64-Bit Server VM |
50 |
Java Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13 |
51 |
Operating System: Linux |
52 |
OS Version: 4.15.0-36-generic |
53 |
Default Encoding: UTF-8 |
54 |
Language: en |
55 |
Country: US |
56 |
--></g></svg> |