Statistics
| Branch: | Revision:

urtware / doc / statediagrams / core / urtCoreSynchronizeNodes.svg @ 35c9457f

History | View | Annotate | Download (10.595 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="618px" preserveAspectRatio="none" style="width:416px;height:618px;" version="1.1" viewBox="0 0 416 618" width="416px" zoomAndPan="magnify"><defs><filter height="300%" id="f1r9x1l3440zyt" 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="162.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="246" x="84" y="47.6611">urtCoreSynchronizeNodes()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="210" y="68.6143"/><ellipse cx="212" cy="82.8594" fill="#000000" filter="url(#f1r9x1l3440zyt)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="138" x="143" y="112.8594"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="118" x="153" y="133.998">acquire mutex lock</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="260" x="82" y="166.8281"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="66" x="92" y="187.9668">set node's</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="35" x="162" y="187.9668">stage</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="131" x="201" y="187.9668">variable to argument</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="316" x="54" y="276.5073"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="220" x="64" y="297.646">compare argument with the node's</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="35" x="288" y="297.646">stage</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="33" x="327" y="297.646">value</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="146" x="139" y="339.5737"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="126" x="149" y="360.7124">iterate to next node</text><polygon fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" points="154.5,220.7969,269.5,220.7969,281.5,232.7969,269.5,244.7969,154.5,244.7969,142.5,232.7969,154.5,220.7969" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="216" y="255.0073">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="154.5" y="236.605">Nodes left to check?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="128.5" y="230.2026">no</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="109" x="157.5" y="415.5425"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="89" x="167.5" y="436.6812">release mutex</text><polygon fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" points="117.5,469.5112,306.5,469.5112,318.5,481.5112,306.5,493.5112,117.5,493.5112,105.5,481.5112,117.5,469.5112" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="189" x="117.5" y="485.3193">Are all nodes in the same stage?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="85.5" y="478.917">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="318.5" y="478.917">no</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="171" x="10" y="503.5112"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="151" x="20" y="524.6499">broadcast control event</text><rect fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="153" x="252" y="503.5112"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="133" x="262" y="524.6499">wait for control event</text><polygon fill="#FEFECE" filter="url(#f1r9x1l3440zyt)" points="212,543.48,224,555.48,212,567.48,200,555.48,212,543.48" style="stroke: #A80036; stroke-width: 1.5;"/><ellipse cx="212" cy="597.48" fill="none" filter="url(#f1r9x1l3440zyt)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="212.5" cy="597.98" fill="#000000" filter="url(#f1r9x1l3440zyt)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="92.8594" y2="112.8594"/><polygon fill="#A80036" points="208,102.8594,212,112.8594,216,102.8594,212,106.8594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="146.8281" y2="166.8281"/><polygon fill="#A80036" points="208,156.8281,212,166.8281,216,156.8281,212,160.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="310.4761" y2="339.5737"/><polygon fill="#A80036" points="208,329.5737,212,339.5737,216,329.5737,212,333.5737" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="244.7969" y2="276.5073"/><polygon fill="#A80036" points="208,266.5073,212,276.5073,216,266.5073,212,270.5073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="373.5425" y2="383.5425"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="382" y1="383.5425" y2="383.5425"/><polygon fill="#A80036" points="378,319.5737,382,309.5737,386,319.5737,382,315.5737" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="382" x2="382" y1="232.7969" y2="383.5425"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="382" x2="281.5" y1="232.7969" y2="232.7969"/><polygon fill="#A80036" points="291.5,228.7969,281.5,232.7969,291.5,236.7969,287.5,232.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="142.5" x2="42" y1="232.7969" y2="232.7969"/><polygon fill="#A80036" points="38,305.5737,42,315.5737,46,305.5737,42,309.5737" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="42" x2="42" y1="232.7969" y2="395.5425"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="42" x2="212" y1="395.5425" y2="395.5425"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="395.5425" y2="415.5425"/><polygon fill="#A80036" points="208,405.5425,212,415.5425,216,405.5425,212,409.5425" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="200.7969" y2="220.7969"/><polygon fill="#A80036" points="208,210.7969,212,220.7969,216,210.7969,212,214.7969" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="105.5" x2="95.5" y1="481.5112" y2="481.5112"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95.5" x2="95.5" y1="481.5112" y2="503.5112"/><polygon fill="#A80036" points="91.5,493.5112,95.5,503.5112,99.5,493.5112,95.5,497.5112" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="318.5" x2="328.5" y1="481.5112" y2="481.5112"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="328.5" x2="328.5" y1="481.5112" y2="503.5112"/><polygon fill="#A80036" points="324.5,493.5112,328.5,503.5112,332.5,493.5112,328.5,497.5112" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95.5" x2="95.5" y1="537.48" y2="555.48"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="95.5" x2="200" y1="555.48" y2="555.48"/><polygon fill="#A80036" points="190,551.48,200,555.48,190,559.48,194,555.48" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="328.5" x2="328.5" y1="537.48" y2="555.48"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="328.5" x2="224" y1="555.48" y2="555.48"/><polygon fill="#A80036" points="234,551.48,224,555.48,234,559.48,230,555.48" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="449.5112" y2="469.5112"/><polygon fill="#A80036" points="208,459.5112,212,469.5112,216,459.5112,212,463.5112" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="212" x2="212" y1="567.48" y2="587.48"/><polygon fill="#A80036" points="208,577.48,212,587.48,216,577.48,212,581.48" style="stroke: #A80036; stroke-width: 1.0;"/><!--
2
@startuml
3

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

    
6

    
7

    
8
start
9
:acquire mutex lock;
10
:set node's ""stage"" variable to argument;
11
while (Nodes left to check?) is (yes)
12
  :compare argument with the node's ""stage"" value;
13
  :iterate to next node;
14
endwhile (no)
15
:release mutex;
16
if (Are all nodes in the same stage?) then (yes)
17
  :broadcast control event;
18
else (no)
19
  :wait for control event;
20
endif
21
stop
22

    
23
@enduml
24

    
25
PlantUML version 1.2018.11(Sat Sep 22 18:43:53 CEST 2018)
26
(GPL source distribution)
27
Java Runtime: OpenJDK Runtime Environment
28
JVM: OpenJDK 64-Bit Server VM
29
Java Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
30
Operating System: Linux
31
OS Version: 4.15.0-36-generic
32
Default Encoding: UTF-8
33
Language: en
34
Country: US
35
--></g></svg>