Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / service / urtServiceDispatch.svg @ 2d315870

History | View | Annotate | Download (27.581 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="983px" preserveAspectRatio="none" style="width:1463px;height:983px;" version="1.1" viewBox="0 0 1463 983" width="1463px" zoomAndPan="magnify"><defs><filter height="300%" id="f10elgj1fk1eyi" 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="686.25" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="181" x="640.25" y="47.6611">urtServiceDispatch()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="733.75" y="68.6143"/><path d="M581.25,72.8594 L581.25,274.4531 L901.25,274.4531 L901.25,82.8594 L891.25,72.8594 L581.25,72.8594 " fill="#FBFB77" filter="url(#f10elgj1fk1eyi)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M891.25,72.8594 L891.25,82.8594 L901.25,82.8594 L891.25,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="660.75" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="664.75" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="52" x="664.75" y="89.4263">service</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="97" x="720.75" y="89.4263">: urt_service_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="821.75" x2="901.25" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="237" x="587.25" y="105.0591">The service to dispatch a request for.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="587.25" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="667.25" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="699.25" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="685.25" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="689.25" y="134.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="59" x="689.25" y="134.8247">payload</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="41" x="752.25" y="134.8247">: void*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="797.25" x2="901.25" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="272" x="587.25" y="150.4575">Pointer where to store the payload (if any).</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="587.25" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="637.25" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="213" x="673.25" y="165.5903">if the service expects no payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="692.25" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="696.25" y="180.2231"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="41" x="696.25" y="180.2231">bytes</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="45" x="741.25" y="180.2231">: size_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="790.25" x2="901.25" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="587.25" y="195.856">Size of the payload in bytes.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="280" x="587.25" y="210.9888">Must be 0 if the service expects no payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="901.25" y1="219.0547" y2="219.0547"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="901.25" y1="221.0547" y2="221.0547"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="581.25" x2="646.75" y1="231.6211" y2="231.6211"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="650.75" y="235.6216"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="650.75" y="235.6216">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="132" x="699.75" y="235.6216">: urt_baserequest_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="835.75" x2="901.25" y1="231.6211" y2="231.6211"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="283" x="587.25" y="251.2544">Pointer to the request to be processed next.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="587.25" y="266.3872">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="637.25" y="266.3872">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="209" x="673.25" y="266.3872">if there are no pending requests.</text><ellipse cx="741.25" cy="304.4531" fill="#000000" filter="url(#f10elgj1fk1eyi)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="93" x="694.75" y="334.4531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="73" x="704.75" y="355.5918">lock service</text><path d="M17.75,434.1323 L17.75,489.5308 A0,0 0 0 0 17.75,489.5308 L578.75,489.5308 A0,0 0 0 0 578.75,489.5308 L578.75,465.8315 L598.75,461.8315 L578.75,457.8315 L578.75,444.1323 L568.75,434.1323 L17.75,434.1323 A0,0 0 0 0 17.75,434.1323 " fill="#FBFB77" filter="url(#f10elgj1fk1eyi)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M568.75,434.1323 L568.75,444.1323 L578.75,444.1323 L568.75,434.1323 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="414" x="23.75" y="451.1992">No need to lock the request because it is enqueued at this point.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="531" x="23.75" y="466.332">Enqueued requests must not be altered without the according service to be locked.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="540" x="23.75" y="481.4648">Since the service has been locked, no enqueued requests will be modified externally.</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="285" x="598.75" y="444.8472"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="134" x="608.75" y="465.9858">access first request (</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="126" x="742.75" y="465.9858">requestQueue_front</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="5" x="868.75" y="465.9858">)</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="251" x="615.75" y="509.5308"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="52" x="625.75" y="530.6694">proceed</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="126" x="681.75" y="530.6694">requestQueue_front</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="45" x="811.75" y="530.6694">pointer</text><rect fill="#000000" filter="url(#f10elgj1fk1eyi)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1417.5" x="10" y="563.4995"/><polygon fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" points="162,610.9019,447,610.9019,459,622.9019,447,634.9019,162,634.9019,150,622.9019,162,610.9019" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="243" x="162" y="626.71">This was the last request (pointer became</text><text fill="#000000" font-family="monospace" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="28" x="409" y="626.71">NULL</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="10" x="437" y="626.71">)?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="130" y="620.3076">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="459" y="620.3076">no</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="212" x="34" y="644.9019"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="44" y="666.0405">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="119" x="68" y="666.0405">requestQueue_back</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="13" x="191" y="666.0405">to</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="208" y="666.0405">NULL</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="223" x="357.5" y="644.9019"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="73" x="367.5" y="666.0405">set request</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="444.5" y="666.0405">next</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="62" x="476.5" y="666.0405">pointer to</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="542.5" y="666.0405">NULL</text><polygon fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" points="304.5,684.8706,316.5,696.8706,304.5,708.8706,292.5,696.8706,304.5,684.8706" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" points="646,589.4995,824,589.4995,836,601.4995,824,613.4995,646,613.4995,634,601.4995,646,589.4995" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="739" y="623.71">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="178" x="646" y="605.3076">This was the last HRT request?</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="233" x="618.5" y="646.3042"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="628.5" y="667.4429">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="140" x="652.5" y="667.4429">requestQueue_hrtBack</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="13" x="796.5" y="667.4429">to</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="813.5" y="667.4429">NULL</text><polygon fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" points="890.5,589.4995,1092.5,589.4995,1104.5,601.4995,1092.5,613.4995,890.5,613.4995,878.5,601.4995,890.5,589.4995" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="995.5" y="623.71">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="202" x="890.5" y="605.3076">This was the last FRT/SRT request?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="1104.5" y="598.9053">no</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="240" x="871.5" y="646.3042"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="881.5" y="667.4429">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="147" x="905.5" y="667.4429">requestQueue_fsrtBack</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="13" x="1056.5" y="667.4429">to</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="1073.5" y="667.4429">NULL</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="269" x="1146.5" y="642.9019"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="249" x="1156.5" y="664.0405">copy payload from request to argument</text><rect fill="#000000" filter="url(#f10elgj1fk1eyi)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1417.5" x="10" y="748.8706"/><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="109" x="686.75" y="774.8706"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="89" x="696.75" y="796.0093">unlock service</text><path d="M418.25,827.2729 L418.25,852.4058 A0,0 0 0 0 418.25,852.4058 L710.25,852.4058 A0,0 0 0 0 710.25,852.4058 L710.25,845.2729 L730.25,839.8394 L710.25,837.2729 L710.25,837.2729 L700.25,827.2729 L418.25,827.2729 A0,0 0 0 0 418.25,827.2729 " fill="#FBFB77" filter="url(#f10elgj1fk1eyi)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M700.25,827.2729 L700.25,837.2729 L710.25,837.2729 L700.25,827.2729 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="271" x="424.25" y="844.3398">Returns pointer to the dispatched request.</text><ellipse cx="741.25" cy="839.8394" fill="#FFFFFF" filter="url(#f10elgj1fk1eyi)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="741.25" cy="839.8394" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" points="685.25,388.4219,797.25,388.4219,809.25,400.4219,797.25,412.4219,685.25,412.4219,673.25,400.4219,685.25,388.4219" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="745.25" y="422.6323">no</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="685.25" y="404.23">Request list empty?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="809.25" y="397.8276">yes</text><rect fill="#FEFECE" filter="url(#f10elgj1fk1eyi)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="109" x="686.75" y="894.4058"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="89" x="696.75" y="915.5444">unlock service</text><path d="M600.25,946.8081 L600.25,971.9409 A0,0 0 0 0 600.25,971.9409 L710.25,971.9409 A0,0 0 0 0 710.25,971.9409 L710.25,964.8081 L730.25,959.3745 L710.25,956.8081 L710.25,956.8081 L700.25,946.8081 L600.25,946.8081 A0,0 0 0 0 600.25,946.8081 " fill="#FBFB77" filter="url(#f10elgj1fk1eyi)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M700.25,946.8081 L700.25,956.8081 L710.25,956.8081 L700.25,946.8081 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="606.25" y="963.875">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="659.25" y="963.875">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="691.25" y="963.875">.</text><ellipse cx="741.25" cy="959.3745" fill="#FFFFFF" filter="url(#f10elgj1fk1eyi)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="741.25" cy="959.3745" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="274.4531" y2="294.4531"/><polygon fill="#A80036" points="737.25,284.4531,741.25,294.4531,745.25,284.4531,741.25,288.4531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="314.4531" y2="334.4531"/><polygon fill="#A80036" points="737.25,324.4531,741.25,334.4531,745.25,324.4531,741.25,328.4531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="478.8159" y2="509.5308"/><polygon fill="#A80036" points="737.25,499.5308,741.25,509.5308,745.25,499.5308,741.25,503.5308" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="150" x2="140" y1="622.9019" y2="622.9019"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="140" x2="140" y1="622.9019" y2="644.9019"/><polygon fill="#A80036" points="136,634.9019,140,644.9019,144,634.9019,140,638.9019" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="459" x2="469" y1="622.9019" y2="622.9019"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="469" x2="469" y1="622.9019" y2="644.9019"/><polygon fill="#A80036" points="465,634.9019,469,644.9019,473,634.9019,469,638.9019" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="140" x2="140" y1="678.8706" y2="696.8706"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="140" x2="292.5" y1="696.8706" y2="696.8706"/><polygon fill="#A80036" points="282.5,692.8706,292.5,696.8706,282.5,700.8706,286.5,696.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="469" x2="469" y1="678.8706" y2="696.8706"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="469" x2="316.5" y1="696.8706" y2="696.8706"/><polygon fill="#A80036" points="326.5,692.8706,316.5,696.8706,326.5,700.8706,322.5,696.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="735" x2="735" y1="613.4995" y2="646.3042"/><polygon fill="#A80036" points="731,636.3042,735,646.3042,739,636.3042,735,640.3042" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="735" x2="735" y1="680.2729" y2="728.8706"/><polygon fill="#A80036" points="731,718.8706,735,728.8706,739,718.8706,735,722.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="991.5" x2="991.5" y1="613.4995" y2="646.3042"/><polygon fill="#A80036" points="987.5,636.3042,991.5,646.3042,995.5,636.3042,991.5,640.3042" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="991.5" x2="991.5" y1="680.2729" y2="728.8706"/><polygon fill="#A80036" points="987.5,718.8706,991.5,728.8706,995.5,718.8706,991.5,722.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="836" x2="878.5" y1="601.4995" y2="601.4995"/><polygon fill="#A80036" points="868.5,597.4995,878.5,601.4995,868.5,605.4995,872.5,601.4995" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="890" x2="890" y1="569.4995" y2="574.4995"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="890" x2="735" y1="574.4995" y2="574.4995"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="735" x2="735" y1="574.4995" y2="589.4995"/><polygon fill="#A80036" points="731,579.4995,735,589.4995,739,579.4995,735,583.4995" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1104.5" x2="1132.5" y1="601.4995" y2="601.4995"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1132.5" x2="1132.5" y1="601.4995" y2="728.8706"/><polygon fill="#A80036" points="1128.5,718.8706,1132.5,728.8706,1136.5,718.8706,1132.5,722.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="735" x2="1132.5" y1="728.8706" y2="728.8706"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="304.5" x2="304.5" y1="569.4995" y2="610.9019"/><polygon fill="#A80036" points="300.5,600.9019,304.5,610.9019,308.5,600.9019,304.5,604.9019" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1281" x2="1281" y1="569.4995" y2="642.9019"/><polygon fill="#A80036" points="1277,632.9019,1281,642.9019,1285,632.9019,1281,636.9019" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="304.5" x2="304.5" y1="708.8706" y2="748.8706"/><polygon fill="#A80036" points="300.5,738.8706,304.5,748.8706,308.5,738.8706,304.5,742.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="890" x2="890" y1="728.8706" y2="748.8706"/><polygon fill="#A80036" points="886,738.8706,890,748.8706,894,738.8706,890,742.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1281" x2="1281" y1="676.8706" y2="748.8706"/><polygon fill="#A80036" points="1277,738.8706,1281,748.8706,1285,738.8706,1281,742.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="543.4995" y2="563.4995"/><polygon fill="#A80036" points="737.25,553.4995,741.25,563.4995,745.25,553.4995,741.25,557.4995" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="754.8706" y2="774.8706"/><polygon fill="#A80036" points="737.25,764.8706,741.25,774.8706,745.25,764.8706,741.25,768.8706" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="808.8394" y2="828.8394"/><polygon fill="#A80036" points="737.25,818.8394,741.25,828.8394,745.25,818.8394,741.25,822.8394" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="412.4219" y2="444.8472"/><polygon fill="#A80036" points="737.25,434.8472,741.25,444.8472,745.25,434.8472,741.25,438.8472" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="809.25" x2="1437.5" y1="400.4219" y2="400.4219"/><polygon fill="#A80036" points="1433.5,631.7534,1437.5,641.7534,1441.5,631.7534,1437.5,635.7534" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1437.5" x2="1437.5" y1="400.4219" y2="874.4058"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1437.5" x2="741.25" y1="874.4058" y2="874.4058"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="874.4058" y2="894.4058"/><polygon fill="#A80036" points="737.25,884.4058,741.25,894.4058,745.25,884.4058,741.25,888.4058" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="368.4219" y2="388.4219"/><polygon fill="#A80036" points="737.25,378.4219,741.25,388.4219,745.25,378.4219,741.25,382.4219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="741.25" x2="741.25" y1="928.3745" y2="948.3745"/><polygon fill="#A80036" points="737.25,938.3745,741.25,948.3745,745.25,938.3745,741.25,942.3745" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[ebb7fc4ba667a6ccf7cb9627ac3cc94e]
2
@startuml
3

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

    
6

    
7
note
8
  - - **service** : urt_service_t* - -
9
  The service to dispatch a request for.
10
  Must not be ""NULL"".
11
  - - **payload** : void* - -
12
  Pointer where to store the payload (if any).
13
  May be ""NULL"" if the service expects no payload.
14
  - - **bytes** : size_t - -
15
  Size of the payload in bytes.
16
  Must be 0 if the service expects no payload.
17
  ====
18
  - - **return** : urt_baserequest_t* - -
19
  Pointer to the request to be processed next.
20
  May be ""NULL"" if there are no pending requests.
21
endnote
22

    
23

    
24
start
25
:lock service;
26
if (Request list empty?) then (no)
27
  :access first request (""requestQueue_front"");
28
  note
29
    No need to lock the request because it is enqueued at this point.
30
    Enqueued requests must not be altered without the according service to be locked.
31
    Since the service has been locked, no enqueued requests will be modified externally.
32
  endnote
33
  :proceed ""requestQueue_front"" pointer;
34
  fork
35
    if (This was the last request (pointer became ""NULL"")?) then (yes)
36
      :set ""requestQueue_back"" to ""NULL"";
37
    else (no)
38
      :set request ""next"" pointer to ""NULL"";
39
    endif
40
  fork again
41
    if (This was the last HRT request?) then (yes)
42
      :set ""requestQueue_hrtBack"" to ""NULL"";
43
    elseif (This was the last FRT/SRT request?) then (yes)
44
      :set ""requestQueue_fsrtBack"" to ""NULL"";
45
    else (no)
46
    endif
47
  fork again
48
    :copy payload from request to argument;
49
  endfork
50
  :unlock service;
51
  stop
52
  note
53
    Returns pointer to the dispatched request.
54
  endnote
55
else (yes)
56
endif
57
:unlock service;
58
stop
59
note
60
  Returns ""NULL"".
61
endnote
62

    
63

    
64
@enduml
65

    
66
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
67
(GPL source distribution)
68
Java Runtime: OpenJDK Runtime Environment
69
JVM: OpenJDK 64-Bit Server VM
70
Java Version: 11.0.7+10-post-Ubuntu-2ubuntu218.04
71
Operating System: Linux
72
Default Encoding: UTF-8
73
Language: en
74
Country: US
75
--></g></svg>