urtware / doc / activitydiagrams / service / urtServiceAcquireRequest.svg @ 03ed5026
History | View | Annotate | Download (12.477 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="466px" preserveAspectRatio="none" style="width:710px;height:466px;" version="1.1" viewBox="0 0 710 466" width="710px" zoomAndPan="magnify"><defs><filter height="300%" id="fm08xyzpmczn8" 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="309.75" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="245" x="231.75" y="47.6611">urtServiceAcquireRequest()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="357.25" y="68.6143"/><path d="M103.5,72.8594 L103.5,229.0547 L698.5,229.0547 L698.5,82.8594 L688.5,72.8594 L103.5,72.8594 " fill="#FBFB77" filter="url(#fm08xyzpmczn8)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M688.5,72.8594 L688.5,82.8594 L698.5,82.8594 L688.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="103.5" x2="320.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="324.5" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="52" x="324.5" y="89.4263">service</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="97" x="380.5" y="89.4263">: urt_service_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="481.5" x2="698.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="268" x="109.5" y="105.0591">The service that shall acquire the request.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="109.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="189.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="221.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="103.5" x2="300.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="304.5" y="134.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="57" x="304.5" y="134.8247">request</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="132" x="365.5" y="134.8247">: urt_baserequest_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="501.5" x2="698.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="176" x="109.5" y="150.4575">The request to be acquired.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="109.5" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="189.5" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="221.5" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="103.5" x2="698.5" y1="173.6563" y2="173.6563"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="103.5" x2="698.5" y1="175.6563" y2="175.6563"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="103.5" x2="330" y1="186.2227" y2="186.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="334" y="190.2231"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="334" y="190.2231">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="85" x="383" y="190.2231">: urt_status_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="472" x2="698.5" y1="186.2227" y2="186.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="109.5" y="205.856">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="162.5" y="205.856">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="270.5" y="205.856">in case of success.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="109.5" y="220.9888">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="162.5" y="220.9888">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="301" x="382.5" y="220.9888">if the service has lost ownership of the request.</text><ellipse cx="401" cy="259.0547" fill="#000000" filter="url(#fm08xyzpmczn8)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><path d="M43,293.4727 L43,318.6055 A0,0 0 0 0 43,318.6055 L332,318.6055 A0,0 0 0 0 332,318.6055 L332,311.4727 L352,306.0391 L332,303.4727 L332,303.4727 L322,293.4727 L43,293.4727 A0,0 0 0 0 43,293.4727 " fill="#FBFB77" filter="url(#fm08xyzpmczn8)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M322,293.4727 L322,303.4727 L332,303.4727 L322,293.4727 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="268" x="49" y="310.5396">Execution is blocked until mutex is locked.</text><rect fill="#FEFECE" filter="url(#fm08xyzpmczn8)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="98" x="352" y="289.0547"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="78" x="362" y="310.1934">lock request</text><polygon fill="#FEFECE" filter="url(#fm08xyzpmczn8)" points="294.5,343.0234,507.5,343.0234,519.5,355.0234,507.5,367.0234,294.5,367.0234,282.5,355.0234,294.5,343.0234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="213" x="294.5" y="358.8315">This service is owner of the request?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="262.5" y="352.4292">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="519.5" y="352.4292">no</text><path d="M10,377.0234 L10,402.1563 A0,0 0 0 0 10,402.1563 L192,402.1563 A0,0 0 0 0 192,402.1563 L192,395.0234 L212,389.5898 L192,387.0234 L192,387.0234 L182,377.0234 L10,377.0234 A0,0 0 0 0 10,377.0234 " fill="#FBFB77" filter="url(#fm08xyzpmczn8)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M182,377.0234 L182,387.0234 L192,387.0234 L182,377.0234 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="16" y="394.0903">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="69" y="394.0903">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="173" y="394.0903">.</text><ellipse cx="223" cy="389.5898" fill="#FFFFFF" filter="url(#fm08xyzpmczn8)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="223" cy="389.5898" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#fm08xyzpmczn8)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="114" x="522" y="377.0234"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="94" x="532" y="398.1621">unlock request</text><path d="M254,429.4258 L254,454.5586 A0,0 0 0 0 254,454.5586 L548,454.5586 A0,0 0 0 0 548,454.5586 L548,447.4258 L568,441.9922 L548,439.4258 L548,439.4258 L538,429.4258 L254,429.4258 A0,0 0 0 0 254,429.4258 " fill="#FBFB77" filter="url(#fm08xyzpmczn8)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M538,429.4258 L538,439.4258 L548,439.4258 L538,429.4258 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="260" y="446.4927">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="313" y="446.4927">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="529" y="446.4927">.</text><ellipse cx="579" cy="441.9922" fill="#FFFFFF" filter="url(#fm08xyzpmczn8)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="579" cy="441.9922" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="401" x2="401" y1="229.0547" y2="249.0547"/><polygon fill="#A80036" points="397,239.0547,401,249.0547,405,239.0547,401,243.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="401" x2="401" y1="269.0547" y2="289.0547"/><polygon fill="#A80036" points="397,279.0547,401,289.0547,405,279.0547,401,283.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="579" x2="579" y1="410.9922" y2="430.9922"/><polygon fill="#A80036" points="575,420.9922,579,430.9922,583,420.9922,579,424.9922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="282.5" x2="223" y1="355.0234" y2="355.0234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="223" x2="223" y1="355.0234" y2="378.5898"/><polygon fill="#A80036" points="219,368.5898,223,378.5898,227,368.5898,223,372.5898" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="519.5" x2="579" y1="355.0234" y2="355.0234"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="579" x2="579" y1="355.0234" y2="377.0234"/><polygon fill="#A80036" points="575,367.0234,579,377.0234,583,367.0234,579,371.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="401" x2="401" y1="323.0234" y2="343.0234"/><polygon fill="#A80036" points="397,333.0234,401,343.0234,405,333.0234,401,337.0234" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[b640d5edd444f1a758d61a68633c34c7] |
---|---|
2 |
@startuml |
3 |
|
4 |
title **µRtWare**\nurtServiceAcquireRequest()\n |
5 |
|
6 |
|
7 |
note |
8 |
- - **service** : urt_service_t* - - |
9 |
The service that shall acquire the request. |
10 |
Must not be ""NULL"". |
11 |
- - **request** : urt_baserequest_t* - - |
12 |
The request to be acquired. |
13 |
Must not be ""NULL"". |
14 |
==== |
15 |
- - **return** : urt_status_t - - |
16 |
Returns ""URT_STATUS_OK"" in case of success. |
17 |
Returns ""URT_STATUS_REQUEST_BADOWNER"" if the service has lost ownership of the request. |
18 |
endnote |
19 |
|
20 |
|
21 |
start |
22 |
:lock request; |
23 |
note |
24 |
Execution is blocked until mutex is locked. |
25 |
endnote |
26 |
if (This service is owner of the request?) then (yes) |
27 |
stop |
28 |
note |
29 |
Returns ""URT_STATUS_OK"". |
30 |
endnote |
31 |
else (no) |
32 |
:unlock request; |
33 |
stop |
34 |
note |
35 |
Returns ""URT_STATUS_REQUEST_BADOWNER"". |
36 |
endnote |
37 |
endif |
38 |
|
39 |
|
40 |
@enduml |
41 |
|
42 |
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020) |
43 |
(GPL source distribution) |
44 |
Java Runtime: OpenJDK Runtime Environment |
45 |
JVM: OpenJDK 64-Bit Server VM |
46 |
Java Version: 11.0.7+10-post-Ubuntu-2ubuntu218.04 |
47 |
Operating System: Linux |
48 |
Default Encoding: UTF-8 |
49 |
Language: en |
50 |
Country: US |
51 |
--></g></svg> |